/*! elementor - v3.25.0 - 20-11-2024 */ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js": /*!********************************************************************************!*\ !*** ../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js ***! \********************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ isPropValid) /* harmony export */ }); /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js"); // eslint-disable-next-line no-undef var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) { return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 /* o */ && prop.charCodeAt(1) === 110 /* n */ && prop.charCodeAt(2) < 91; } /* Z+1 */ ); /***/ }), /***/ "../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js": /*!********************************************************************!*\ !*** ../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js ***! \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ memoize) /* harmony export */ }); function memoize(fn) { var cache = Object.create(null); return function (arg) { if (cache[arg] === undefined) cache[arg] = fn(arg); return cache[arg]; }; } /***/ }), /***/ "../node_modules/@emotion/stylis/dist/stylis.browser.esm.js": /*!******************************************************************!*\ !*** ../node_modules/@emotion/stylis/dist/stylis.browser.esm.js ***! \******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); function stylis_min (W) { function M(d, c, e, h, a) { for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) { g = e.charCodeAt(l); l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++); if (0 === b + n + v + m) { if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) { switch (g) { case 32: case 9: case 59: case 13: case 10: break; default: f += e.charAt(l); } g = 59; } switch (g) { case 123: f = f.trim(); q = f.charCodeAt(0); k = 1; for (t = ++l; l < B;) { switch (g = e.charCodeAt(l)) { case 123: k++; break; case 125: k--; break; case 47: switch (g = e.charCodeAt(l + 1)) { case 42: case 47: a: { for (u = l + 1; u < J; ++u) { switch (e.charCodeAt(u)) { case 47: if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) { l = u + 1; break a; } break; case 10: if (47 === g) { l = u + 1; break a; } } } l = u; } } break; case 91: g++; case 40: g++; case 34: case 39: for (; l++ < J && e.charCodeAt(l) !== g;) { } } if (0 === k) break; l++; } k = e.substring(t, l); 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0)); switch (q) { case 64: 0 < r && (f = f.replace(N, '')); g = f.charCodeAt(1); switch (g) { case 100: case 109: case 115: case 45: r = c; break; default: r = O; } k = M(c, r, k, g, a + 1); t = k.length; 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = '')); if (0 < t) switch (g) { case 115: f = f.replace(da, ea); case 100: case 109: case 45: k = f + '{' + k + '}'; break; case 107: f = f.replace(fa, '$1 $2'); k = f + '{' + k + '}'; k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k; break; default: k = f + k, 112 === h && (k = (p += k, '')); } else k = ''; break; default: k = M(c, X(c, f, I), k, h, a + 1); } F += k; k = I = r = u = q = 0; f = ''; g = e.charCodeAt(++l); break; case 125: case 59: f = (0 < r ? f.replace(N, '') : f).trim(); if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) { case 0: break; case 64: if (105 === g || 99 === g) { G += f + e.charAt(l); break; } default: 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2))); } I = r = u = q = 0; f = ''; g = e.charCodeAt(++l); } } switch (g) { case 13: case 10: 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00'); 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h); z = 1; D++; break; case 59: case 125: if (0 === b + n + v + m) { z++; break; } default: z++; y = e.charAt(l); switch (g) { case 9: case 32: if (0 === n + m + b) switch (x) { case 44: case 58: case 9: case 32: y = ''; break; default: 32 !== g && (y = ' '); } break; case 0: y = '\\0'; break; case 12: y = '\\f'; break; case 11: y = '\\v'; break; case 38: 0 === n + b + m && (r = I = 1, y = '\f' + y); break; case 108: if (0 === n + b + m + E && 0 < u) switch (l - u) { case 2: 112 === x && 58 === e.charCodeAt(l - 3) && (E = x); case 8: 111 === K && (E = K); } break; case 58: 0 === n + b + m && (u = l); break; case 44: 0 === b + v + n + m && (r = 1, y += '\r'); break; case 34: case 39: 0 === b && (n = n === g ? 0 : 0 === n ? g : n); break; case 91: 0 === n + b + v && m++; break; case 93: 0 === n + b + v && m--; break; case 41: 0 === n + b + m && v--; break; case 40: if (0 === n + b + m) { if (0 === q) switch (2 * x + 3 * K) { case 533: break; default: q = 1; } v++; } break; case 64: 0 === b + v + n + m + u + k && (k = 1); break; case 42: case 47: if (!(0 < n + m + v)) switch (b) { case 0: switch (2 * g + 3 * e.charCodeAt(l + 1)) { case 235: b = 47; break; case 220: t = l, b = 42; } break; case 42: 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0); } } 0 === b && (f += y); } K = x; x = g; l++; } t = p.length; if (0 < t) { r = c; if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F; p = r.join(',') + '{' + p + '}'; if (0 !== w * E) { 2 !== w || L(p, 2) || (E = 0); switch (E) { case 111: p = p.replace(ha, ':-moz-$1') + p; break; case 112: p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p; } E = 0; } } return G + p + F; } function X(d, c, e) { var h = c.trim().split(ia); c = h; var a = h.length, m = d.length; switch (m) { case 0: case 1: var b = 0; for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) { c[b] = Z(d, c[b], e).trim(); } break; default: var v = b = 0; for (c = []; b < a; ++b) { for (var n = 0; n < m; ++n) { c[v++] = Z(d[n] + ' ', h[b], e).trim(); } } } return c; } function Z(d, c, e) { var h = c.charCodeAt(0); 33 > h && (h = (c = c.trim()).charCodeAt(0)); switch (h) { case 38: return c.replace(F, '$1' + d.trim()); case 58: return d.trim() + c.replace(F, '$1' + d.trim()); default: if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim()); } return d + c; } function P(d, c, e, h) { var a = d + ';', m = 2 * c + 3 * e + 4 * h; if (944 === m) { d = a.indexOf(':', 9) + 1; var b = a.substring(d, a.length - 1).trim(); b = a.substring(0, d).trim() + b + ';'; return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b; } if (0 === w || 2 === w && !L(a, 1)) return a; switch (m) { case 1015: return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a; case 951: return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a; case 963: return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a; case 1009: if (100 !== a.charCodeAt(4)) break; case 969: case 942: return '-webkit-' + a + a; case 978: return '-webkit-' + a + '-moz-' + a + a; case 1019: case 983: return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a; case 883: if (45 === a.charCodeAt(8)) return '-webkit-' + a + a; if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a; break; case 932: if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) { case 103: return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a; case 115: return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a; case 98: return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a; } return '-webkit-' + a + '-ms-' + a + a; case 964: return '-webkit-' + a + '-ms-flex-' + a + a; case 1023: if (99 !== a.charCodeAt(8)) break; b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify'); return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a; case 1005: return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a; case 1e3: b = a.substring(13).trim(); c = b.indexOf('-') + 1; switch (b.charCodeAt(0) + b.charCodeAt(c)) { case 226: b = a.replace(G, 'tb'); break; case 232: b = a.replace(G, 'tb-rl'); break; case 220: b = a.replace(G, 'lr'); break; default: return a; } return '-webkit-' + a + '-ms-' + b + a; case 1017: if (-1 === a.indexOf('sticky', 9)) break; case 975: c = (a = d).length - 10; b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim(); switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) { case 203: if (111 > b.charCodeAt(8)) break; case 115: a = a.replace(b, '-webkit-' + b) + ';' + a; break; case 207: case 102: a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a; } return a + ';'; case 938: if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) { case 105: return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a; case 115: return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a; default: return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a; } break; case 973: case 989: if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break; case 931: case 953: if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a; break; case 962: if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a; } return a; } function L(d, c) { var e = d.indexOf(1 === c ? ':' : '{'), h = d.substring(0, 3 !== c ? e : 10); e = d.substring(e + 1, d.length - 1); return R(2 !== c ? h : h.replace(na, '$1'), e, c); } function ea(d, c) { var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2)); return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')'; } function H(d, c, e, h, a, m, b, v, n, q) { for (var g = 0, x = c, w; g < A; ++g) { switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) { case void 0: case !1: case !0: case null: break; default: x = w; } } if (x !== c) return x; } function T(d) { switch (d) { case void 0: case null: A = S.length = 0; break; default: if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) { T(d[c]); } else Y = !!d | 0; } return T; } function U(d) { d = d.prefix; void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0); return U; } function B(d, c) { var e = d; 33 > e.charCodeAt(0) && (e = e.trim()); V = e; e = [V]; if (0 < A) { var h = H(-1, c, e, e, D, z, 0, 0, 0, 0); void 0 !== h && 'string' === typeof h && (c = h); } var a = M(O, e, c, 0, 0); 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h)); V = ''; E = 0; z = D = 1; return a; } var ca = /^\0+/g, N = /[\0\r\f]/g, aa = /: */g, ka = /zoo|gra/, ma = /([,: ])(transform)/g, ia = /,\r+?/g, F = /([\t\r\n ])*\f?&/g, fa = /@(k\w+)\s*(\S*)\s*/, Q = /::(place)/g, ha = /:(read-only)/g, G = /[svh]\w+-[tblr]{2}/, da = /\(\s*(.*)\s*\)/g, oa = /([\s\S]*?);/g, ba = /-self|flex-/g, na = /[^]*?(:[rp][el]a[\w-]+)[^]*/, la = /stretch|:\s*\w+\-(?:conte|avail)/, ja = /([^-])(image-set\()/, z = 1, D = 1, E = 0, w = 1, O = [], S = [], A = 0, R = null, Y = 0, V = ''; B.use = T; B.set = U; void 0 !== W && U(W); return B; } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stylis_min); /***/ }), /***/ "../node_modules/@wordpress/element/build-module/create-interpolate-element.js": /*!*************************************************************************************!*\ !*** ../node_modules/@wordpress/element/build-module/create-interpolate-element.js ***! \*************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./react */ "react"); /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_0__); /** * Internal dependencies */ /** * Object containing a React element. * * @typedef {import('react').ReactElement} Element */ let indoc, offset, output, stack; /** * Matches tags in the localized string * * This is used for extracting the tag pattern groups for parsing the localized * string and along with the map converting it to a react element. * * There are four references extracted using this tokenizer: * * match: Full match of the tag (i.e. , ,
) * isClosing: The closing slash, if it exists. * name: The name portion of the tag (strong, br) (if ) * isSelfClosed: The slash on a self closing tag, if it exists. * * @type {RegExp} */ const tokenizer = /<(\/)?(\w+)\s*(\/)?>/g; /** * The stack frame tracking parse progress. * * @typedef Frame * * @property {Element} element A parent element which may still have * @property {number} tokenStart Offset at which parent element first * appears. * @property {number} tokenLength Length of string marking start of parent * element. * @property {number} [prevOffset] Running offset at which parsing should * continue. * @property {number} [leadingTextStart] Offset at which last closing element * finished, used for finding text between * elements. * @property {Element[]} children Children. */ /** * Tracks recursive-descent parse state. * * This is a Stack frame holding parent elements until all children have been * parsed. * * @private * @param {Element} element A parent element which may still have * nested children not yet parsed. * @param {number} tokenStart Offset at which parent element first * appears. * @param {number} tokenLength Length of string marking start of parent * element. * @param {number} [prevOffset] Running offset at which parsing should * continue. * @param {number} [leadingTextStart] Offset at which last closing element * finished, used for finding text between * elements. * * @return {Frame} The stack frame tracking parse progress. */ function createFrame(element, tokenStart, tokenLength, prevOffset, leadingTextStart) { return { element, tokenStart, tokenLength, prevOffset, leadingTextStart, children: [] }; } /** * This function creates an interpolated element from a passed in string with * specific tags matching how the string should be converted to an element via * the conversion map value. * * @example * For example, for the given string: * * "This is a string with a link and a self-closing * tag" * * You would have something like this as the conversionMap value: * * ```js * { * span: , * a: , * CustomComponentB: , * } * ``` * * @param {string} interpolatedString The interpolation string to be parsed. * @param {Record} conversionMap The map used to convert the string to * a react element. * @throws {TypeError} * @return {Element} A wp element. */ const createInterpolateElement = (interpolatedString, conversionMap) => { indoc = interpolatedString; offset = 0; output = []; stack = []; tokenizer.lastIndex = 0; if (!isValidConversionMap(conversionMap)) { throw new TypeError('The conversionMap provided is not valid. It must be an object with values that are React Elements'); } do { // twiddle our thumbs } while (proceed(conversionMap)); return (0,_react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, ...output); }; /** * Validate conversion map. * * A map is considered valid if it's an object and every value in the object * is a React Element * * @private * * @param {Object} conversionMap The map being validated. * * @return {boolean} True means the map is valid. */ const isValidConversionMap = conversionMap => { const isObject = typeof conversionMap === 'object'; const values = isObject && Object.values(conversionMap); return isObject && values.length && values.every(element => (0,_react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(element)); }; /** * This is the iterator over the matches in the string. * * @private * * @param {Object} conversionMap The conversion map for the string. * * @return {boolean} true for continuing to iterate, false for finished. */ function proceed(conversionMap) { const next = nextToken(); const [tokenType, name, startOffset, tokenLength] = next; const stackDepth = stack.length; const leadingTextStart = startOffset > offset ? offset : null; if (!conversionMap[name]) { addText(); return false; } switch (tokenType) { case 'no-more-tokens': if (stackDepth !== 0) { const { leadingTextStart: stackLeadingText, tokenStart } = stack.pop(); output.push(indoc.substr(stackLeadingText, tokenStart)); } addText(); return false; case 'self-closed': if (0 === stackDepth) { if (null !== leadingTextStart) { output.push(indoc.substr(leadingTextStart, startOffset - leadingTextStart)); } output.push(conversionMap[name]); offset = startOffset + tokenLength; return true; } // Otherwise we found an inner element. addChild(createFrame(conversionMap[name], startOffset, tokenLength)); offset = startOffset + tokenLength; return true; case 'opener': stack.push(createFrame(conversionMap[name], startOffset, tokenLength, startOffset + tokenLength, leadingTextStart)); offset = startOffset + tokenLength; return true; case 'closer': // If we're not nesting then this is easy - close the block. if (1 === stackDepth) { closeOuterElement(startOffset); offset = startOffset + tokenLength; return true; } // Otherwise we're nested and we have to close out the current // block and add it as a innerBlock to the parent. const stackTop = stack.pop(); const text = indoc.substr(stackTop.prevOffset, startOffset - stackTop.prevOffset); stackTop.children.push(text); stackTop.prevOffset = startOffset + tokenLength; const frame = createFrame(stackTop.element, stackTop.tokenStart, stackTop.tokenLength, startOffset + tokenLength); frame.children = stackTop.children; addChild(frame); offset = startOffset + tokenLength; return true; default: addText(); return false; } } /** * Grabs the next token match in the string and returns it's details. * * @private * * @return {Array} An array of details for the token matched. */ function nextToken() { const matches = tokenizer.exec(indoc); // We have no more tokens. if (null === matches) { return ['no-more-tokens']; } const startedAt = matches.index; const [match, isClosing, name, isSelfClosed] = matches; const length = match.length; if (isSelfClosed) { return ['self-closed', name, startedAt, length]; } if (isClosing) { return ['closer', name, startedAt, length]; } return ['opener', name, startedAt, length]; } /** * Pushes text extracted from the indoc string to the output stack given the * current rawLength value and offset (if rawLength is provided ) or the * indoc.length and offset. * * @private */ function addText() { const length = indoc.length - offset; if (0 === length) { return; } output.push(indoc.substr(offset, length)); } /** * Pushes a child element to the associated parent element's children for the * parent currently active in the stack. * * @private * * @param {Frame} frame The Frame containing the child element and it's * token information. */ function addChild(frame) { const { element, tokenStart, tokenLength, prevOffset, children } = frame; const parent = stack[stack.length - 1]; const text = indoc.substr(parent.prevOffset, tokenStart - parent.prevOffset); if (text) { parent.children.push(text); } parent.children.push((0,_react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(element, null, ...children)); parent.prevOffset = prevOffset ? prevOffset : tokenStart + tokenLength; } /** * This is called for closing tags. It creates the element currently active in * the stack. * * @private * * @param {number} endOffset Offset at which the closing tag for the element * begins in the string. If this is greater than the * prevOffset attached to the element, then this * helps capture any remaining nested text nodes in * the element. */ function closeOuterElement(endOffset) { const { element, leadingTextStart, prevOffset, tokenStart, children } = stack.pop(); const text = endOffset ? indoc.substr(prevOffset, endOffset - prevOffset) : indoc.substr(prevOffset); if (text) { children.push(text); } if (null !== leadingTextStart) { output.push(indoc.substr(leadingTextStart, tokenStart - leadingTextStart)); } output.push((0,_react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(element, null, ...children)); } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createInterpolateElement); //# sourceMappingURL=create-interpolate-element.js.map /***/ }), /***/ "../node_modules/@wordpress/element/build-module/index.js": /*!****************************************************************!*\ !*** ../node_modules/@wordpress/element/build-module/index.js ***! \****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Children: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Children), /* harmony export */ Component: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Component), /* harmony export */ Fragment: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Fragment), /* harmony export */ Platform: () => (/* reexport safe */ _platform__WEBPACK_IMPORTED_MODULE_4__["default"]), /* harmony export */ PureComponent: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.PureComponent), /* harmony export */ RawHTML: () => (/* reexport safe */ _raw_html__WEBPACK_IMPORTED_MODULE_6__["default"]), /* harmony export */ StrictMode: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.StrictMode), /* harmony export */ Suspense: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.Suspense), /* harmony export */ cloneElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.cloneElement), /* harmony export */ concatChildren: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.concatChildren), /* harmony export */ createContext: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createContext), /* harmony export */ createElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createElement), /* harmony export */ createInterpolateElement: () => (/* reexport safe */ _create_interpolate_element__WEBPACK_IMPORTED_MODULE_0__["default"]), /* harmony export */ createPortal: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.createPortal), /* harmony export */ createRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.createRef), /* harmony export */ createRoot: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.createRoot), /* harmony export */ findDOMNode: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.findDOMNode), /* harmony export */ flushSync: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.flushSync), /* harmony export */ forwardRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.forwardRef), /* harmony export */ hydrate: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.hydrate), /* harmony export */ hydrateRoot: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.hydrateRoot), /* harmony export */ isEmptyElement: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_3__.isEmptyElement), /* harmony export */ isValidElement: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.isValidElement), /* harmony export */ lazy: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.lazy), /* harmony export */ memo: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.memo), /* harmony export */ render: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.render), /* harmony export */ renderToString: () => (/* reexport safe */ _serialize__WEBPACK_IMPORTED_MODULE_5__["default"]), /* harmony export */ startTransition: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.startTransition), /* harmony export */ switchChildrenNodeName: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.switchChildrenNodeName), /* harmony export */ unmountComponentAtNode: () => (/* reexport safe */ _react_platform__WEBPACK_IMPORTED_MODULE_2__.unmountComponentAtNode), /* harmony export */ useCallback: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useCallback), /* harmony export */ useContext: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useContext), /* harmony export */ useDebugValue: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useDebugValue), /* harmony export */ useDeferredValue: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useDeferredValue), /* harmony export */ useEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useEffect), /* harmony export */ useId: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useId), /* harmony export */ useImperativeHandle: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle), /* harmony export */ useInsertionEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useInsertionEffect), /* harmony export */ useLayoutEffect: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect), /* harmony export */ useMemo: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useMemo), /* harmony export */ useReducer: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useReducer), /* harmony export */ useRef: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useRef), /* harmony export */ useState: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useState), /* harmony export */ useSyncExternalStore: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useSyncExternalStore), /* harmony export */ useTransition: () => (/* reexport safe */ _react__WEBPACK_IMPORTED_MODULE_1__.useTransition) /* harmony export */ }); /* harmony import */ var _create_interpolate_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create-interpolate-element */ "../node_modules/@wordpress/element/build-module/create-interpolate-element.js"); /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react */ "../node_modules/@wordpress/element/build-module/react.js"); /* harmony import */ var _react_platform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./react-platform */ "../node_modules/@wordpress/element/build-module/react-platform.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "../node_modules/@wordpress/element/build-module/utils.js"); /* harmony import */ var _platform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./platform */ "../node_modules/@wordpress/element/build-module/platform.js"); /* harmony import */ var _serialize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./serialize */ "../node_modules/@wordpress/element/build-module/serialize.js"); /* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./raw-html */ "../node_modules/@wordpress/element/build-module/raw-html.js"); //# sourceMappingURL=index.js.map /***/ }), /***/ "../node_modules/@wordpress/element/build-module/platform.js": /*!*******************************************************************!*\ !*** ../node_modules/@wordpress/element/build-module/platform.js ***! \*******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /** * Parts of this source were derived and modified from react-native-web, * released under the MIT license. * * Copyright (c) 2016-present, Nicolas Gallagher. * Copyright (c) 2015-present, Facebook, Inc. * */ const Platform = { OS: 'web', select: spec => 'web' in spec ? spec.web : spec.default, isWeb: true }; /** * Component used to detect the current Platform being used. * Use Platform.OS === 'web' to detect if running on web enviroment. * * This is the same concept as the React Native implementation. * * @see https://reactnative.dev/docs/platform-specific-code#platform-module * * Here is an example of how to use the select method: * @example * ```js * import { Platform } from '@wordpress/element'; * * const placeholderLabel = Platform.select( { * native: __( 'Add media' ), * web: __( 'Drag images, upload new ones or select files from your library.' ), * } ); * ``` */ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Platform); //# sourceMappingURL=platform.js.map /***/ }), /***/ "../node_modules/@wordpress/element/build-module/raw-html.js": /*!*******************************************************************!*\ !*** ../node_modules/@wordpress/element/build-module/raw-html.js ***! \*******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ RawHTML) /* harmony export */ }); /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./react */ "react"); /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_0__); /** * Internal dependencies */ /** @typedef {{children: string} & import('react').ComponentPropsWithoutRef<'div'>} RawHTMLProps */ /** * Component used as equivalent of Fragment with unescaped HTML, in cases where * it is desirable to render dangerous HTML without needing a wrapper element. * To preserve additional props, a `div` wrapper _will_ be created if any props * aside from `children` are passed. * * @param {RawHTMLProps} props Children should be a string of HTML or an array * of strings. Other props will be passed through * to the div wrapper. * * @return {JSX.Element} Dangerously-rendering component. */ function RawHTML({ children, ...props }) { let rawHtml = ''; // Cast children as an array, and concatenate each element if it is a string. _react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).forEach(child => { if (typeof child === 'string' && child.trim() !== '') { rawHtml += child; } }); // The `div` wrapper will be stripped by the `renderElement` serializer in // `./serialize.js` unless there are non-children props present. return (0,_react__WEBPACK_IMPORTED_MODULE_0__.createElement)('div', { dangerouslySetInnerHTML: { __html: rawHtml }, ...props }); } //# sourceMappingURL=raw-html.js.map /***/ }), /***/ "../node_modules/@wordpress/element/build-module/react-platform.js": /*!*************************************************************************!*\ !*** ../node_modules/@wordpress/element/build-module/react-platform.js ***! \*************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ createPortal: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.createPortal), /* harmony export */ createRoot: () => (/* reexport safe */ react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot), /* harmony export */ findDOMNode: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.findDOMNode), /* harmony export */ flushSync: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.flushSync), /* harmony export */ hydrate: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.hydrate), /* harmony export */ hydrateRoot: () => (/* reexport safe */ react_dom_client__WEBPACK_IMPORTED_MODULE_1__.hydrateRoot), /* harmony export */ render: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.render), /* harmony export */ unmountComponentAtNode: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.unmountComponentAtNode) /* harmony export */ }); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js"); /** * External dependencies */ /** * Creates a portal into which a component can be rendered. * * @see https://github.com/facebook/react/issues/10309#issuecomment-318433235 * * @param {import('react').ReactElement} child Any renderable child, such as an element, * string, or fragment. * @param {HTMLElement} container DOM node into which element should be rendered. */ /** * Finds the dom node of a React component. * * @param {import('react').ComponentType} component Component's instance. */ /** * Forces React to flush any updates inside the provided callback synchronously. * * @param {Function} callback Callback to run synchronously. */ /** * Renders a given element into the target DOM node. * * @deprecated since WordPress 6.2.0. Use `createRoot` instead. * @see https://react.dev/reference/react-dom/render */ /** * Hydrates a given element into the target DOM node. * * @deprecated since WordPress 6.2.0. Use `hydrateRoot` instead. * @see https://react.dev/reference/react-dom/hydrate */ /** * Creates a new React root for the target DOM node. * * @since 6.2.0 Introduced in WordPress core. * @see https://react.dev/reference/react-dom/client/createRoot */ /** * Creates a new React root for the target DOM node and hydrates it with a pre-generated markup. * * @since 6.2.0 Introduced in WordPress core. * @see https://react.dev/reference/react-dom/client/hydrateRoot */ /** * Removes any mounted element from the target DOM node. * * @deprecated since WordPress 6.2.0. Use `root.unmount()` instead. * @see https://react.dev/reference/react-dom/unmountComponentAtNode */ //# sourceMappingURL=react-platform.js.map /***/ }), /***/ "../node_modules/@wordpress/element/build-module/react.js": /*!****************************************************************!*\ !*** ../node_modules/@wordpress/element/build-module/react.js ***! \****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Children: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Children), /* harmony export */ Component: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Component), /* harmony export */ Fragment: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Fragment), /* harmony export */ PureComponent: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.PureComponent), /* harmony export */ StrictMode: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.StrictMode), /* harmony export */ Suspense: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.Suspense), /* harmony export */ cloneElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.cloneElement), /* harmony export */ concatChildren: () => (/* binding */ concatChildren), /* harmony export */ createContext: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createContext), /* harmony export */ createElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createElement), /* harmony export */ createRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.createRef), /* harmony export */ forwardRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.forwardRef), /* harmony export */ isValidElement: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.isValidElement), /* harmony export */ lazy: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.lazy), /* harmony export */ memo: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.memo), /* harmony export */ startTransition: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.startTransition), /* harmony export */ switchChildrenNodeName: () => (/* binding */ switchChildrenNodeName), /* harmony export */ useCallback: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useCallback), /* harmony export */ useContext: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useContext), /* harmony export */ useDebugValue: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useDebugValue), /* harmony export */ useDeferredValue: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useDeferredValue), /* harmony export */ useEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useEffect), /* harmony export */ useId: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useId), /* harmony export */ useImperativeHandle: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle), /* harmony export */ useInsertionEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useInsertionEffect), /* harmony export */ useLayoutEffect: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect), /* harmony export */ useMemo: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useMemo), /* harmony export */ useReducer: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useReducer), /* harmony export */ useRef: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useRef), /* harmony export */ useState: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useState), /* harmony export */ useSyncExternalStore: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore), /* harmony export */ useTransition: () => (/* reexport safe */ react__WEBPACK_IMPORTED_MODULE_0__.useTransition) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /** * External dependencies */ // eslint-disable-next-line @typescript-eslint/no-restricted-imports /** * Object containing a React element. * * @typedef {import('react').ReactElement} Element */ /** * Object containing a React component. * * @typedef {import('react').ComponentType} ComponentType */ /** * Object containing a React synthetic event. * * @typedef {import('react').SyntheticEvent} SyntheticEvent */ /** * Object containing a React synthetic event. * * @template T * @typedef {import('react').RefObject} RefObject */ /** * Object that provides utilities for dealing with React children. */ /** * Creates a copy of an element with extended props. * * @param {Element} element Element * @param {?Object} props Props to apply to cloned element * * @return {Element} Cloned element. */ /** * A base class to create WordPress Components (Refs, state and lifecycle hooks) */ /** * Creates a context object containing two components: a provider and consumer. * * @param {Object} defaultValue A default data stored in the context. * * @return {Object} Context object. */ /** * Returns a new element of given type. Type can be either a string tag name or * another function which itself returns an element. * * @param {?(string|Function)} type Tag name or element creator * @param {Object} props Element properties, either attribute * set to apply to DOM node or values to * pass through to element creator * @param {...Element} children Descendant elements * * @return {Element} Element. */ /** * Returns an object tracking a reference to a rendered element via its * `current` property as either a DOMElement or Element, dependent upon the * type of element rendered with the ref attribute. * * @return {Object} Ref object. */ /** * Component enhancer used to enable passing a ref to its wrapped component. * Pass a function argument which receives `props` and `ref` as its arguments, * returning an element using the forwarded ref. The return value is a new * component which forwards its ref. * * @param {Function} forwarder Function passed `props` and `ref`, expected to * return an element. * * @return {Component} Enhanced component. */ /** * A component which renders its children without any wrapping element. */ /** * Checks if an object is a valid React Element. * * @param {Object} objectToCheck The object to be checked. * * @return {boolean} true if objectToTest is a valid React Element and false otherwise. */ /** * @see https://reactjs.org/docs/react-api.html#reactmemo */ /** * Component that activates additional checks and warnings for its descendants. */ /** * @see https://reactjs.org/docs/hooks-reference.html#usecallback */ /** * @see https://reactjs.org/docs/hooks-reference.html#usecontext */ /** * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue */ /** * @see https://reactjs.org/docs/hooks-reference.html#usedeferredvalue */ /** * @see https://reactjs.org/docs/hooks-reference.html#useeffect */ /** * @see https://reactjs.org/docs/hooks-reference.html#useid */ /** * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle */ /** * @see https://reactjs.org/docs/hooks-reference.html#useinsertioneffect */ /** * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect */ /** * @see https://reactjs.org/docs/hooks-reference.html#usememo */ /** * @see https://reactjs.org/docs/hooks-reference.html#usereducer */ /** * @see https://reactjs.org/docs/hooks-reference.html#useref */ /** * @see https://reactjs.org/docs/hooks-reference.html#usestate */ /** * @see https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore */ /** * @see https://reactjs.org/docs/hooks-reference.html#usetransition */ /** * @see https://reactjs.org/docs/react-api.html#starttransition */ /** * @see https://reactjs.org/docs/react-api.html#reactlazy */ /** * @see https://reactjs.org/docs/react-api.html#reactsuspense */ /** * @see https://reactjs.org/docs/react-api.html#reactpurecomponent */ /** * Concatenate two or more React children objects. * * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate. * * @return {Array} The concatenated value. */ function concatChildren(...childrenArguments) { return childrenArguments.reduce((accumulator, children, i) => { react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children, (child, j) => { if (child && 'string' !== typeof child) { child = (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(child, { key: [i, j].join() }); } accumulator.push(child); }); return accumulator; }, []); } /** * Switches the nodeName of all the elements in the children object. * * @param {?Object} children Children object. * @param {string} nodeName Node name. * * @return {?Object} The updated children object. */ function switchChildrenNodeName(children, nodeName) { return children && react__WEBPACK_IMPORTED_MODULE_0__.Children.map(children, (elt, index) => { if (typeof elt?.valueOf() === 'string') { return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(nodeName, { key: index }, elt); } const { children: childrenProp, ...props } = elt.props; return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(nodeName, { key: index, ...props }, childrenProp); }); } //# sourceMappingURL=react.js.map /***/ }), /***/ "../node_modules/@wordpress/element/build-module/serialize.js": /*!********************************************************************!*\ !*** ../node_modules/@wordpress/element/build-module/serialize.js ***! \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), /* harmony export */ hasPrefix: () => (/* binding */ hasPrefix), /* harmony export */ renderAttributes: () => (/* binding */ renderAttributes), /* harmony export */ renderComponent: () => (/* binding */ renderComponent), /* harmony export */ renderElement: () => (/* binding */ renderElement), /* harmony export */ renderNativeComponent: () => (/* binding */ renderNativeComponent), /* harmony export */ renderStyle: () => (/* binding */ renderStyle) /* harmony export */ }); /* harmony import */ var is_plain_object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-plain-object */ "../node_modules/@wordpress/element/node_modules/is-plain-object/dist/is-plain-object.mjs"); /* harmony import */ var change_case__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! change-case */ "../node_modules/param-case/dist.es2015/index.js"); /* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/escape-html */ "../node_modules/@wordpress/escape-html/build-module/index.js"); /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./react */ "react"); /* harmony import */ var _react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _raw_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./raw-html */ "../node_modules/@wordpress/element/build-module/raw-html.js"); /** * Parts of this source were derived and modified from fast-react-render, * released under the MIT license. * * https://github.com/alt-j/fast-react-render * * Copyright (c) 2016 Andrey Morozov * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** @typedef {import('react').ReactElement} ReactElement */ const { Provider, Consumer } = (0,_react__WEBPACK_IMPORTED_MODULE_1__.createContext)(undefined); const ForwardRef = (0,_react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(() => { return null; }); /** * Valid attribute types. * * @type {Set} */ const ATTRIBUTES_TYPES = new Set(['string', 'boolean', 'number']); /** * Element tags which can be self-closing. * * @type {Set} */ const SELF_CLOSING_TAGS = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']); /** * Boolean attributes are attributes whose presence as being assigned is * meaningful, even if only empty. * * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3 * * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ] * .filter( ( tr ) => tr.lastChild.textContent.indexOf( 'Boolean attribute' ) !== -1 ) * .reduce( ( result, tr ) => Object.assign( result, { * [ tr.firstChild.textContent.trim() ]: true * } ), {} ) ).sort(); * * @type {Set} */ const BOOLEAN_ATTRIBUTES = new Set(['allowfullscreen', 'allowpaymentrequest', 'allowusermedia', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'defer', 'disabled', 'download', 'formnovalidate', 'hidden', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'selected', 'typemustmatch']); /** * Enumerated attributes are attributes which must be of a specific value form. * Like boolean attributes, these are meaningful if specified, even if not of a * valid enumerated value. * * See: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#enumerated-attribute * Extracted from: https://html.spec.whatwg.org/multipage/indices.html#attributes-3 * * Object.keys( [ ...document.querySelectorAll( '#attributes-1 > tbody > tr' ) ] * .filter( ( tr ) => /^("(.+?)";?\s*)+/.test( tr.lastChild.textContent.trim() ) ) * .reduce( ( result, tr ) => Object.assign( result, { * [ tr.firstChild.textContent.trim() ]: true * } ), {} ) ).sort(); * * Some notable omissions: * * - `alt`: https://blog.whatwg.org/omit-alt * * @type {Set} */ const ENUMERATED_ATTRIBUTES = new Set(['autocapitalize', 'autocomplete', 'charset', 'contenteditable', 'crossorigin', 'decoding', 'dir', 'draggable', 'enctype', 'formenctype', 'formmethod', 'http-equiv', 'inputmode', 'kind', 'method', 'preload', 'scope', 'shape', 'spellcheck', 'translate', 'type', 'wrap']); /** * Set of CSS style properties which support assignment of unitless numbers. * Used in rendering of style properties, where `px` unit is assumed unless * property is included in this set or value is zero. * * Generated via: * * Object.entries( document.createElement( 'div' ).style ) * .filter( ( [ key ] ) => ( * ! /^(webkit|ms|moz)/.test( key ) && * ( e.style[ key ] = 10 ) && * e.style[ key ] === '10' * ) ) * .map( ( [ key ] ) => key ) * .sort(); * * @type {Set} */ const CSS_PROPERTIES_SUPPORTS_UNITLESS = new Set(['animation', 'animationIterationCount', 'baselineShift', 'borderImageOutset', 'borderImageSlice', 'borderImageWidth', 'columnCount', 'cx', 'cy', 'fillOpacity', 'flexGrow', 'flexShrink', 'floodOpacity', 'fontWeight', 'gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart', 'lineHeight', 'opacity', 'order', 'orphans', 'r', 'rx', 'ry', 'shapeImageThreshold', 'stopOpacity', 'strokeDasharray', 'strokeDashoffset', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'tabSize', 'widows', 'x', 'y', 'zIndex', 'zoom']); /** * Returns true if the specified string is prefixed by one of an array of * possible prefixes. * * @param {string} string String to check. * @param {string[]} prefixes Possible prefixes. * * @return {boolean} Whether string has prefix. */ function hasPrefix(string, prefixes) { return prefixes.some(prefix => string.indexOf(prefix) === 0); } /** * Returns true if the given prop name should be ignored in attributes * serialization, or false otherwise. * * @param {string} attribute Attribute to check. * * @return {boolean} Whether attribute should be ignored. */ function isInternalAttribute(attribute) { return 'key' === attribute || 'children' === attribute; } /** * Returns the normal form of the element's attribute value for HTML. * * @param {string} attribute Attribute name. * @param {*} value Non-normalized attribute value. * * @return {*} Normalized attribute value. */ function getNormalAttributeValue(attribute, value) { switch (attribute) { case 'style': return renderStyle(value); } return value; } /** * This is a map of all SVG attributes that have dashes. Map(lower case prop => dashed lower case attribute). * We need this to render e.g strokeWidth as stroke-width. * * List from: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute. */ const SVG_ATTRIBUTE_WITH_DASHES_LIST = ['accentHeight', 'alignmentBaseline', 'arabicForm', 'baselineShift', 'capHeight', 'clipPath', 'clipRule', 'colorInterpolation', 'colorInterpolationFilters', 'colorProfile', 'colorRendering', 'dominantBaseline', 'enableBackground', 'fillOpacity', 'fillRule', 'floodColor', 'floodOpacity', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontWeight', 'glyphName', 'glyphOrientationHorizontal', 'glyphOrientationVertical', 'horizAdvX', 'horizOriginX', 'imageRendering', 'letterSpacing', 'lightingColor', 'markerEnd', 'markerMid', 'markerStart', 'overlinePosition', 'overlineThickness', 'paintOrder', 'panose1', 'pointerEvents', 'renderingIntent', 'shapeRendering', 'stopColor', 'stopOpacity', 'strikethroughPosition', 'strikethroughThickness', 'strokeDasharray', 'strokeDashoffset', 'strokeLinecap', 'strokeLinejoin', 'strokeMiterlimit', 'strokeOpacity', 'strokeWidth', 'textAnchor', 'textDecoration', 'textRendering', 'underlinePosition', 'underlineThickness', 'unicodeBidi', 'unicodeRange', 'unitsPerEm', 'vAlphabetic', 'vHanging', 'vIdeographic', 'vMathematical', 'vectorEffect', 'vertAdvY', 'vertOriginX', 'vertOriginY', 'wordSpacing', 'writingMode', 'xmlnsXlink', 'xHeight'].reduce((map, attribute) => { // The keys are lower-cased for more robust lookup. map[attribute.toLowerCase()] = attribute; return map; }, {}); /** * This is a map of all case-sensitive SVG attributes. Map(lowercase key => proper case attribute). * The keys are lower-cased for more robust lookup. * Note that this list only contains attributes that contain at least one capital letter. * Lowercase attributes don't need mapping, since we lowercase all attributes by default. */ const CASE_SENSITIVE_SVG_ATTRIBUTES = ['allowReorder', 'attributeName', 'attributeType', 'autoReverse', 'baseFrequency', 'baseProfile', 'calcMode', 'clipPathUnits', 'contentScriptType', 'contentStyleType', 'diffuseConstant', 'edgeMode', 'externalResourcesRequired', 'filterRes', 'filterUnits', 'glyphRef', 'gradientTransform', 'gradientUnits', 'kernelMatrix', 'kernelUnitLength', 'keyPoints', 'keySplines', 'keyTimes', 'lengthAdjust', 'limitingConeAngle', 'markerHeight', 'markerUnits', 'markerWidth', 'maskContentUnits', 'maskUnits', 'numOctaves', 'pathLength', 'patternContentUnits', 'patternTransform', 'patternUnits', 'pointsAtX', 'pointsAtY', 'pointsAtZ', 'preserveAlpha', 'preserveAspectRatio', 'primitiveUnits', 'refX', 'refY', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'specularConstant', 'specularExponent', 'spreadMethod', 'startOffset', 'stdDeviation', 'stitchTiles', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'surfaceScale', 'systemLanguage', 'tableValues', 'targetX', 'targetY', 'textLength', 'viewBox', 'viewTarget', 'xChannelSelector', 'yChannelSelector'].reduce((map, attribute) => { // The keys are lower-cased for more robust lookup. map[attribute.toLowerCase()] = attribute; return map; }, {}); /** * This is a map of all SVG attributes that have colons. * Keys are lower-cased and stripped of their colons for more robust lookup. */ const SVG_ATTRIBUTES_WITH_COLONS = ['xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'xmlns:xlink'].reduce((map, attribute) => { map[attribute.replace(':', '').toLowerCase()] = attribute; return map; }, {}); /** * Returns the normal form of the element's attribute name for HTML. * * @param {string} attribute Non-normalized attribute name. * * @return {string} Normalized attribute name. */ function getNormalAttributeName(attribute) { switch (attribute) { case 'htmlFor': return 'for'; case 'className': return 'class'; } const attributeLowerCase = attribute.toLowerCase(); if (CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]) { return CASE_SENSITIVE_SVG_ATTRIBUTES[attributeLowerCase]; } else if (SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]) { return (0,change_case__WEBPACK_IMPORTED_MODULE_2__.paramCase)(SVG_ATTRIBUTE_WITH_DASHES_LIST[attributeLowerCase]); } else if (SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]) { return SVG_ATTRIBUTES_WITH_COLONS[attributeLowerCase]; } return attributeLowerCase; } /** * Returns the normal form of the style property name for HTML. * * - Converts property names to kebab-case, e.g. 'backgroundColor' → 'background-color' * - Leaves custom attributes alone, e.g. '--myBackgroundColor' → '--myBackgroundColor' * - Converts vendor-prefixed property names to -kebab-case, e.g. 'MozTransform' → '-moz-transform' * * @param {string} property Property name. * * @return {string} Normalized property name. */ function getNormalStylePropertyName(property) { if (property.startsWith('--')) { return property; } if (hasPrefix(property, ['ms', 'O', 'Moz', 'Webkit'])) { return '-' + (0,change_case__WEBPACK_IMPORTED_MODULE_2__.paramCase)(property); } return (0,change_case__WEBPACK_IMPORTED_MODULE_2__.paramCase)(property); } /** * Returns the normal form of the style property value for HTML. Appends a * default pixel unit if numeric, not a unitless property, and not zero. * * @param {string} property Property name. * @param {*} value Non-normalized property value. * * @return {*} Normalized property value. */ function getNormalStylePropertyValue(property, value) { if (typeof value === 'number' && 0 !== value && !CSS_PROPERTIES_SUPPORTS_UNITLESS.has(property)) { return value + 'px'; } return value; } /** * Serializes a React element to string. * * @param {import('react').ReactNode} element Element to serialize. * @param {Object} [context] Context object. * @param {Object} [legacyContext] Legacy context object. * * @return {string} Serialized element. */ function renderElement(element, context, legacyContext = {}) { if (null === element || undefined === element || false === element) { return ''; } if (Array.isArray(element)) { return renderChildren(element, context, legacyContext); } switch (typeof element) { case 'string': return (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(element); case 'number': return element.toString(); } const { type, props } = /** @type {{type?: any, props?: any}} */ element; switch (type) { case _react__WEBPACK_IMPORTED_MODULE_1__.StrictMode: case _react__WEBPACK_IMPORTED_MODULE_1__.Fragment: return renderChildren(props.children, context, legacyContext); case _raw_html__WEBPACK_IMPORTED_MODULE_4__["default"]: const { children, ...wrapperProps } = props; return renderNativeComponent(!Object.keys(wrapperProps).length ? null : 'div', { ...wrapperProps, dangerouslySetInnerHTML: { __html: children } }, context, legacyContext); } switch (typeof type) { case 'string': return renderNativeComponent(type, props, context, legacyContext); case 'function': if (type.prototype && typeof type.prototype.render === 'function') { return renderComponent(type, props, context, legacyContext); } return renderElement(type(props, legacyContext), context, legacyContext); } switch (type && type.$$typeof) { case Provider.$$typeof: return renderChildren(props.children, props.value, legacyContext); case Consumer.$$typeof: return renderElement(props.children(context || type._currentValue), context, legacyContext); case ForwardRef.$$typeof: return renderElement(type.render(props), context, legacyContext); } return ''; } /** * Serializes a native component type to string. * * @param {?string} type Native component type to serialize, or null if * rendering as fragment of children content. * @param {Object} props Props object. * @param {Object} [context] Context object. * @param {Object} [legacyContext] Legacy context object. * * @return {string} Serialized element. */ function renderNativeComponent(type, props, context, legacyContext = {}) { let content = ''; if (type === 'textarea' && props.hasOwnProperty('value')) { // Textarea children can be assigned as value prop. If it is, render in // place of children. Ensure to omit so it is not assigned as attribute // as well. content = renderChildren(props.value, context, legacyContext); const { value, ...restProps } = props; props = restProps; } else if (props.dangerouslySetInnerHTML && typeof props.dangerouslySetInnerHTML.__html === 'string') { // Dangerous content is left unescaped. content = props.dangerouslySetInnerHTML.__html; } else if (typeof props.children !== 'undefined') { content = renderChildren(props.children, context, legacyContext); } if (!type) { return content; } const attributes = renderAttributes(props); if (SELF_CLOSING_TAGS.has(type)) { return '<' + type + attributes + '/>'; } return '<' + type + attributes + '>' + content + ''; } /** @typedef {import('react').ComponentType} ComponentType */ /** * Serializes a non-native component type to string. * * @param {ComponentType} Component Component type to serialize. * @param {Object} props Props object. * @param {Object} [context] Context object. * @param {Object} [legacyContext] Legacy context object. * * @return {string} Serialized element */ function renderComponent(Component, props, context, legacyContext = {}) { const instance = new ( /** @type {import('react').ComponentClass} */ Component)(props, legacyContext); if (typeof // Ignore reason: Current prettier reformats parens and mangles type assertion // prettier-ignore /** @type {{getChildContext?: () => unknown}} */ instance.getChildContext === 'function') { Object.assign(legacyContext, /** @type {{getChildContext?: () => unknown}} */instance.getChildContext()); } const html = renderElement(instance.render(), context, legacyContext); return html; } /** * Serializes an array of children to string. * * @param {import('react').ReactNodeArray} children Children to serialize. * @param {Object} [context] Context object. * @param {Object} [legacyContext] Legacy context object. * * @return {string} Serialized children. */ function renderChildren(children, context, legacyContext = {}) { let result = ''; children = Array.isArray(children) ? children : [children]; for (let i = 0; i < children.length; i++) { const child = children[i]; result += renderElement(child, context, legacyContext); } return result; } /** * Renders a props object as a string of HTML attributes. * * @param {Object} props Props object. * * @return {string} Attributes string. */ function renderAttributes(props) { let result = ''; for (const key in props) { const attribute = getNormalAttributeName(key); if (!(0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.isValidAttributeName)(attribute)) { continue; } let value = getNormalAttributeValue(key, props[key]); // If value is not of serializeable type, skip. if (!ATTRIBUTES_TYPES.has(typeof value)) { continue; } // Don't render internal attribute names. if (isInternalAttribute(key)) { continue; } const isBooleanAttribute = BOOLEAN_ATTRIBUTES.has(attribute); // Boolean attribute should be omitted outright if its value is false. if (isBooleanAttribute && value === false) { continue; } const isMeaningfulAttribute = isBooleanAttribute || hasPrefix(key, ['data-', 'aria-']) || ENUMERATED_ATTRIBUTES.has(attribute); // Only write boolean value as attribute if meaningful. if (typeof value === 'boolean' && !isMeaningfulAttribute) { continue; } result += ' ' + attribute; // Boolean attributes should write attribute name, but without value. // Mere presence of attribute name is effective truthiness. if (isBooleanAttribute) { continue; } if (typeof value === 'string') { value = (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeAttribute)(value); } result += '="' + value + '"'; } return result; } /** * Renders a style object as a string attribute value. * * @param {Object} style Style object. * * @return {string} Style attribute value. */ function renderStyle(style) { // Only generate from object, e.g. tolerate string value. if (!(0,is_plain_object__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(style)) { return style; } let result; for (const property in style) { const value = style[property]; if (null === value || undefined === value) { continue; } if (result) { result += ';'; } else { result = ''; } const normalName = getNormalStylePropertyName(property); const normalValue = getNormalStylePropertyValue(property, value); result += normalName + ':' + normalValue; } return result; } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (renderElement); //# sourceMappingURL=serialize.js.map /***/ }), /***/ "../node_modules/@wordpress/element/build-module/utils.js": /*!****************************************************************!*\ !*** ../node_modules/@wordpress/element/build-module/utils.js ***! \****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ isEmptyElement: () => (/* binding */ isEmptyElement) /* harmony export */ }); /** * Checks if the provided WP element is empty. * * @param {*} element WP element to check. * @return {boolean} True when an element is considered empty. */ const isEmptyElement = element => { if (typeof element === 'number') { return false; } if (typeof element?.valueOf() === 'string' || Array.isArray(element)) { return !element.length; } return !element; }; //# sourceMappingURL=utils.js.map /***/ }), /***/ "../node_modules/@wordpress/escape-html/build-module/escape-greater.js": /*!*****************************************************************************!*\ !*** ../node_modules/@wordpress/escape-html/build-module/escape-greater.js ***! \*****************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ __unstableEscapeGreaterThan) /* harmony export */ }); /** * Returns a string with greater-than sign replaced. * * Note that if a resolution for Trac#45387 comes to fruition, it is no longer * necessary for `__unstableEscapeGreaterThan` to exist. * * See: https://core.trac.wordpress.org/ticket/45387 * * @param {string} value Original string. * * @return {string} Escaped string. */ function __unstableEscapeGreaterThan(value) { return value.replace(/>/g, '>'); } //# sourceMappingURL=escape-greater.js.map /***/ }), /***/ "../node_modules/@wordpress/escape-html/build-module/index.js": /*!********************************************************************!*\ !*** ../node_modules/@wordpress/escape-html/build-module/index.js ***! \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ escapeAmpersand: () => (/* binding */ escapeAmpersand), /* harmony export */ escapeAttribute: () => (/* binding */ escapeAttribute), /* harmony export */ escapeEditableHTML: () => (/* binding */ escapeEditableHTML), /* harmony export */ escapeHTML: () => (/* binding */ escapeHTML), /* harmony export */ escapeLessThan: () => (/* binding */ escapeLessThan), /* harmony export */ escapeQuotationMark: () => (/* binding */ escapeQuotationMark), /* harmony export */ isValidAttributeName: () => (/* binding */ isValidAttributeName) /* harmony export */ }); /* harmony import */ var _escape_greater__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./escape-greater */ "../node_modules/@wordpress/escape-html/build-module/escape-greater.js"); /** * Internal dependencies */ /** * Regular expression matching invalid attribute names. * * "Attribute names must consist of one or more characters other than controls, * U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=), * and noncharacters." * * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 * * @type {RegExp} */ const REGEXP_INVALID_ATTRIBUTE_NAME = /[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/; /** * Returns a string with ampersands escaped. Note that this is an imperfect * implementation, where only ampersands which do not appear as a pattern of * named, decimal, or hexadecimal character references are escaped. Invalid * named references (i.e. ambiguous ampersand) are still permitted. * * @see https://w3c.github.io/html/syntax.html#character-references * @see https://w3c.github.io/html/syntax.html#ambiguous-ampersand * @see https://w3c.github.io/html/syntax.html#named-character-references * * @param {string} value Original string. * * @return {string} Escaped string. */ function escapeAmpersand(value) { return value.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi, '&'); } /** * Returns a string with quotation marks replaced. * * @param {string} value Original string. * * @return {string} Escaped string. */ function escapeQuotationMark(value) { return value.replace(/"/g, '"'); } /** * Returns a string with less-than sign replaced. * * @param {string} value Original string. * * @return {string} Escaped string. */ function escapeLessThan(value) { return value.replace(/ { "use strict"; var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom")); var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js"); function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } /** * Support conditional rendering of a React App to the DOM, based on the React version. * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions. * * @param { React.ReactElement } app The app to render. * @param { HTMLElement } domElement The DOM element to render the app into. * * @return {{ unmount: () => void }} The unmount function. */ function render(app, domElement) { var unmountFunction; try { var root = (0, _client.createRoot)(domElement); root.render(app); unmountFunction = function unmountFunction() { root.unmount(); }; } catch (e) { // eslint-disable-next-line react/no-deprecated ReactDOM.render(app, domElement); unmountFunction = function unmountFunction() { // eslint-disable-next-line react/no-deprecated ReactDOM.unmountComponentAtNode(domElement); }; } return { unmount: unmountFunction }; } var _default = { render: render }; exports["default"] = _default; /***/ }), /***/ "../modules/ai/assets/js/editor/actions-data.js": /*!******************************************************!*\ !*** ../modules/ai/assets/js/editor/actions-data.js ***! \******************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.vocalTones = exports.translateLanguages = exports.textareaAutocomplete = exports.textAutocomplete = exports.codeHtmlAutocomplete = exports.codeCssAutocomplete = void 0; var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); var textAutocomplete = [(0, _i18n.__)('Craft a catchy slogan for', 'elementor'), (0, _i18n.__)('Write a strong section header for', 'elementor'), (0, _i18n.__)('Create a blog title for', 'elementor'), (0, _i18n.__)('Suggest a 4 word headline for', 'elementor'), (0, _i18n.__)('Write an attention grabbing title for', 'elementor')]; exports.textAutocomplete = textAutocomplete; var textareaAutocomplete = [(0, _i18n.__)('Write a product description for', 'elementor'), (0, _i18n.__)('Create a blog post for', 'elementor'), (0, _i18n.__)('Craft an about us section for', 'elementor'), (0, _i18n.__)('Offer a few sentences to invite visitors to', 'elementor'), (0, _i18n.__)('Write microcopy for a submission form that includes', 'elementor')]; exports.textareaAutocomplete = textareaAutocomplete; var codeHtmlAutocomplete = [(0, _i18n.__)('GA event fired on every button element click (assume GA was loaded)', 'elementor'), (0, _i18n.__)('Iframe code to embed a Spotify widget on my web page. My ID is 1234567890', 'elementor'), (0, _i18n.__)('Write an embed code of Google Analytics', 'elementor'), (0, _i18n.__)('Write an embed code of Facebook Pixel', 'elementor'), (0, _i18n.__)('HTML code that embeds the following PDF into a webpage: link to PDF', 'elementor')]; exports.codeHtmlAutocomplete = codeHtmlAutocomplete; var codeCssAutocomplete = [(0, _i18n.__)('On hover, animate 20% bigger, rotate 10 deg CCW', 'elementor'), (0, _i18n.__)('Add a circle-shaped clip mask, semi transparent on hover', 'elementor'), (0, _i18n.__)('Rainbow colored animated text gradient', 'elementor'), (0, _i18n.__)('Add a 3D shadow to the text', 'elementor')]; exports.codeCssAutocomplete = codeCssAutocomplete; var vocalTones = [{ label: (0, _i18n.__)('Casual', 'elementor') }, { label: (0, _i18n.__)('Confidence', 'elementor') }, { label: (0, _i18n.__)('Formal', 'elementor') }, { label: (0, _i18n.__)('Friendly', 'elementor') }, { label: (0, _i18n.__)('Inspirational', 'elementor') }, { label: (0, _i18n.__)('Motivational', 'elementor') }, { label: (0, _i18n.__)('Nostalgic', 'elementor') }, { label: (0, _i18n.__)('Playful', 'elementor') }, { label: (0, _i18n.__)('Professional', 'elementor') }, { label: (0, _i18n.__)('Scientific', 'elementor') }, { label: (0, _i18n.__)('Straightforward', 'elementor') }, { label: (0, _i18n.__)('Witty', 'elementor') }]; exports.vocalTones = vocalTones; var translateLanguages = [{ label: (0, _i18n.__)('Arabic', 'elementor'), value: 'ar-SA' }, { label: (0, _i18n.__)('Chinese', 'elementor'), value: 'zh-CN' }, { label: (0, _i18n.__)('Czech', 'elementor'), value: 'cs-CZ' }, { label: (0, _i18n.__)('Danish', 'elementor'), value: 'da-DK' }, { label: (0, _i18n.__)('Dutch', 'elementor'), value: 'nl-NL' }, { label: (0, _i18n.__)('English', 'elementor'), value: 'en-US' }, { label: (0, _i18n.__)('Finnish', 'elementor'), value: 'fi-FI' }, { label: (0, _i18n.__)('French', 'elementor'), value: 'fr-FR' }, { label: (0, _i18n.__)('German', 'elementor'), value: 'de-DE' }, { label: (0, _i18n.__)('Greek', 'elementor'), value: 'el-GR' }, { label: (0, _i18n.__)('Hebrew', 'elementor'), value: 'he-IL' }, { label: (0, _i18n.__)('Hungarian', 'elementor'), value: 'hu-HU' }, { label: (0, _i18n.__)('Indonesian', 'elementor'), value: 'id-ID' }, { label: (0, _i18n.__)('Italian', 'elementor'), value: 'it-IT' }, { label: (0, _i18n.__)('Japanese', 'elementor'), value: 'ja-JP' }, { label: (0, _i18n.__)('Korean', 'elementor'), value: 'ko-KR' }, { label: (0, _i18n.__)('Persian', 'elementor'), value: 'fa-IR' }, { label: (0, _i18n.__)('Polish', 'elementor'), value: 'pl-PL' }, { label: (0, _i18n.__)('Portuguese', 'elementor'), value: 'pt-PT' }, { label: (0, _i18n.__)('Russian', 'elementor'), value: 'ru-RU' }, { label: (0, _i18n.__)('Spanish', 'elementor'), value: 'es-ES' }, { label: (0, _i18n.__)('Swedish', 'elementor'), value: 'sv-SE' }, { label: (0, _i18n.__)('Thai', 'elementor'), value: 'th-TH' }, { label: (0, _i18n.__)('Turkish', 'elementor'), value: 'tr-TR' }, { label: (0, _i18n.__)('Vietnamese', 'elementor'), value: 'vi-VN' }]; exports.translateLanguages = translateLanguages; /***/ }), /***/ "../modules/ai/assets/js/editor/ai-behavior.js": /*!*****************************************************!*\ !*** ../modules/ai/assets/js/editor/ai-behavior.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); var _react = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js")); var _app = _interopRequireDefault(__webpack_require__(/*! ./app */ "../modules/ai/assets/js/editor/app.js")); var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); var _aiExcerpt = _interopRequireDefault(__webpack_require__(/*! ./ai-excerpt */ "../modules/ai/assets/js/editor/ai-excerpt.js")); var _useFeaturedImagePrompt = _interopRequireDefault(__webpack_require__(/*! ./hooks/use-featured-image-prompt */ "../modules/ai/assets/js/editor/hooks/use-featured-image-prompt.js")); var _components = __webpack_require__(/*! ../media-library/components */ "../modules/ai/assets/js/media-library/components.js"); var _requestsIds = __webpack_require__(/*! ./context/requests-ids */ "../modules/ai/assets/js/editor/context/requests-ids.js"); var _react2 = _interopRequireDefault(__webpack_require__(/*! react */ "react")); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var AiBehavior = /*#__PURE__*/function (_Marionette$Behavior) { (0, _inherits2.default)(AiBehavior, _Marionette$Behavior); var _super = _createSuper(AiBehavior); function AiBehavior() { (0, _classCallCheck2.default)(this, AiBehavior); return _super.apply(this, arguments); } (0, _createClass2.default)(AiBehavior, [{ key: "initialize", value: function initialize() { this.type = 'text'; this.controlType = 'text'; this.buttonLabel = (0, _i18n.__)('Write with AI', 'elementor'); this.editButtonLabel = (0, _i18n.__)('Edit with AI', 'elementor'); this.isLabelBlock = false; this.additionalOptions = {}; this.context = {}; this.config = window.ElementorAiConfig; } }, { key: "ui", value: function ui() { return { aiButton: '.e-ai-button' }; } }, { key: "events", value: function events() { return { 'click @ui.aiButton': 'onAiButtonClick' }; } }, { key: "getTextualContent", value: function getTextualContent() { var _window$elementor$$pr; var pageTextContent = []; // Use elementorFrontend to loop through all the elements in the Elementor editor var clonedCurrentLayout = (_window$elementor$$pr = window.elementor.$previewContents[0]) === null || _window$elementor$$pr === void 0 ? void 0 : _window$elementor$$pr.cloneNode(true); clonedCurrentLayout.querySelectorAll('.elementor-editor-element-settings, #elementor-add-new-section, .elementor-add-section-inner, header, footer').forEach(function (handle) { return handle.remove(); }); var walkDOM = function walkDOM(node) { var _node$classList; var ancestorOfElementorElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; ancestorOfElementorElement = ((_node$classList = node.classList) === null || _node$classList === void 0 ? void 0 : _node$classList.contains('elementor-element')) || ancestorOfElementorElement; // Check if the node type is TEXT_NODE if (Node.TEXT_NODE === node.nodeType && ancestorOfElementorElement) { var _node$textContent; var cleanText = ((_node$textContent = node.textContent) !== null && _node$textContent !== void 0 ? _node$textContent : '').trim().replace(/\t+/g, '\t').replace(/\n+/g, '\n').replace(/\s+/g, ' '); if (cleanText) { pageTextContent.push(cleanText); } } else { // If not a text node, iterate over its child nodes node.childNodes.forEach(function (child) { return walkDOM(child, ancestorOfElementorElement); }); } }; walkDOM(clonedCurrentLayout); // Trim any extra whitespace return pageTextContent.join('\n'); } }, { key: "onAiButtonClick", value: function onAiButtonClick(event) { var _elementor, _elementor$getPrefere; event.stopPropagation(); var colorScheme = ((_elementor = elementor) === null || _elementor === void 0 ? void 0 : (_elementor$getPrefere = _elementor.getPreferences) === null || _elementor$getPrefere === void 0 ? void 0 : _elementor$getPrefere.call(_elementor, 'ui_theme')) || 'auto'; var isRTL = elementorCommon.config.isRTL; var rootElement = document.createElement('div'); document.body.append(rootElement); window.elementorAiCurrentContext = this.getOption('context'); var _ReactUtils$render = _react.default.render(this.getElementToRender(rootElement, colorScheme, isRTL), rootElement), unmount = _ReactUtils$render.unmount; this.unmount = unmount; } }, { key: "getElementToRender", value: function getElementToRender(rootElement, colorScheme, isRTL) { var _this = this; var onClose = function onClose() { _this.handleClose(); rootElement.remove(); }; if ('post_featured_image' === this.options.context.controlName) { var FEATURED_IMAGE_RATIO = '4:3'; return /*#__PURE__*/_react2.default.createElement(_components.AIMediaGenerateApp, { onClose: onClose, predefinedPrompt: this.getTextualContent(), textToImageHook: _useFeaturedImagePrompt.default, getControlValue: this.getOption('getControlValue'), setControlValue: this.getOption('setControlValue'), initialSettings: { aspectRatio: FEATURED_IMAGE_RATIO } }); } if ('excerpt' === this.getOption('type')) { return /*#__PURE__*/_react2.default.createElement(_requestsIds.RequestIdsProvider, null, /*#__PURE__*/_react2.default.createElement(_aiExcerpt.default, { onClose: onClose, currExcerpt: this.getOption('getControlValue')(), updateExcerpt: this.getOption('setControlValue'), postTextualContent: this.getTextualContent() })); } return /*#__PURE__*/_react2.default.createElement(_app.default, { type: this.getOption('type'), controlType: this.getOption('controlType'), getControlValue: this.getOption('getControlValue'), setControlValue: this.getOption('setControlValue'), additionalOptions: this.getOption('additionalOptions'), onClose: onClose, colorScheme: colorScheme, isRTL: isRTL }); } }, { key: "handleClose", value: function handleClose() { if (this.unmount) { this.unmount(); } } }, { key: "getAiButtonLabel", value: function getAiButtonLabel() { var _this$getOption; var defaultValue = (_this$getOption = this.getOption('additionalOptions')) === null || _this$getOption === void 0 ? void 0 : _this$getOption.defaultValue; var currentValue = this.getOption('getControlValue')(); var isMedia = 'media' === this.getOption('type'); var isDefaultValue = !isMedia && defaultValue === currentValue || isMedia && (currentValue === null || currentValue === void 0 ? void 0 : currentValue.url) === (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.url); return isDefaultValue ? this.getOption('buttonLabel') : this.getOption('editButtonLabel'); } }, { key: "onRender", value: function onRender() { var isPromotion = !this.config.is_get_started; var buttonLabel = this.getAiButtonLabel(); var $button = jQuery('