| 1 |
(function(react, react_dom, _wordpress_i18n) { |
| 2 |
|
| 3 |
//#region \0rolldown/runtime.js |
| 4 |
var __create = Object.create; |
| 5 |
var __defProp = Object.defineProperty; |
| 6 |
var __name = (target, value) => __defProp(target, "name", { |
| 7 |
value, |
| 8 |
configurable: true |
| 9 |
}); |
| 10 |
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
| 11 |
var __getOwnPropNames = Object.getOwnPropertyNames; |
| 12 |
var __getProtoOf = Object.getPrototypeOf; |
| 13 |
var __hasOwnProp = Object.prototype.hasOwnProperty; |
| 14 |
var __esmMin = (fn, res, err) => () => { |
| 15 |
if (err) throw err[0]; |
| 16 |
try { |
| 17 |
return fn && (res = fn(fn = 0)), res; |
| 18 |
} catch (e) { |
| 19 |
throw err = [e], e; |
| 20 |
} |
| 21 |
}; |
| 22 |
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); |
| 23 |
var __exportAll = (all, no_symbols) => { |
| 24 |
let target = {}; |
| 25 |
for (var name in all) { |
| 26 |
__defProp(target, name, { |
| 27 |
get: all[name], |
| 28 |
enumerable: true |
| 29 |
}); |
| 30 |
} |
| 31 |
if (!no_symbols) { |
| 32 |
__defProp(target, Symbol.toStringTag, { value: "Module" }); |
| 33 |
} |
| 34 |
return target; |
| 35 |
}; |
| 36 |
var __copyProps = (to, from, except, desc) => { |
| 37 |
if (from && typeof from === "object" || typeof from === "function") { |
| 38 |
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { |
| 39 |
key = keys[i]; |
| 40 |
if (!__hasOwnProp.call(to, key) && key !== except) { |
| 41 |
__defProp(to, key, { |
| 42 |
get: ((k) => from[k]).bind(null, key), |
| 43 |
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable |
| 44 |
}); |
| 45 |
} |
| 46 |
} |
| 47 |
} |
| 48 |
return to; |
| 49 |
}; |
| 50 |
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { |
| 51 |
value: mod, |
| 52 |
enumerable: true |
| 53 |
}) : target, mod)); |
| 54 |
|
| 55 |
//#endregion |
| 56 |
react = __toESM(react); |
| 57 |
react_dom = __toESM(react_dom); |
| 58 |
|
| 59 |
//#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js |
| 60 |
function asyncGeneratorStep(n, t, e, r, o, a, c) { |
| 61 |
try { |
| 62 |
var i = n[a](c); |
| 63 |
var u = i.value; |
| 64 |
} catch (n) { |
| 65 |
e(n); |
| 66 |
return; |
| 67 |
} |
| 68 |
i.done ? t(u) : Promise.resolve(u).then(r, o); |
| 69 |
} |
| 70 |
function _asyncToGenerator(n) { |
| 71 |
return function() { |
| 72 |
var t = this; |
| 73 |
var e = arguments; |
| 74 |
return new Promise(function(r, o) { |
| 75 |
var a = n.apply(t, e); |
| 76 |
function _next(n) { |
| 77 |
asyncGeneratorStep(a, r, o, _next, _throw, "next", n); |
| 78 |
} |
| 79 |
function _throw(n) { |
| 80 |
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); |
| 81 |
} |
| 82 |
_next(void 0); |
| 83 |
}); |
| 84 |
}; |
| 85 |
} |
| 86 |
|
| 87 |
//#endregion |
| 88 |
//#region node_modules/@babel/runtime/helpers/OverloadYield.js |
| 89 |
var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 90 |
function _OverloadYield(e, d) { |
| 91 |
this.v = e, this.k = d; |
| 92 |
} |
| 93 |
module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 94 |
})); |
| 95 |
|
| 96 |
//#endregion |
| 97 |
//#region node_modules/@babel/runtime/helpers/regeneratorDefine.js |
| 98 |
var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 99 |
function _regeneratorDefine(e, r, n, t) { |
| 100 |
var i = Object.defineProperty; |
| 101 |
try { |
| 102 |
i({}, "", {}); |
| 103 |
} catch (e) { |
| 104 |
i = 0; |
| 105 |
} |
| 106 |
module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { |
| 107 |
function o(r, n) { |
| 108 |
_regeneratorDefine(e, r, function(e) { |
| 109 |
return this._invoke(r, n, e); |
| 110 |
}); |
| 111 |
} |
| 112 |
r ? i ? i(e, r, { |
| 113 |
value: n, |
| 114 |
enumerable: !t, |
| 115 |
configurable: !t, |
| 116 |
writable: !t |
| 117 |
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); |
| 118 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); |
| 119 |
} |
| 120 |
module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 121 |
})); |
| 122 |
|
| 123 |
//#endregion |
| 124 |
//#region node_modules/@babel/runtime/helpers/regenerator.js |
| 125 |
var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 126 |
var regeneratorDefine = require_regeneratorDefine(); |
| 127 |
function _regenerator() { |
| 128 |
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ |
| 129 |
var e; |
| 130 |
var t; |
| 131 |
var r = "function" == typeof Symbol ? Symbol : {}; |
| 132 |
var n = r.iterator || "@@iterator"; |
| 133 |
var o = r.toStringTag || "@@toStringTag"; |
| 134 |
function i(r, n, o, i) { |
| 135 |
var c = n && n.prototype instanceof Generator ? n : Generator; |
| 136 |
var u = Object.create(c.prototype); |
| 137 |
return regeneratorDefine(u, "_invoke", function(r, n, o) { |
| 138 |
var i; |
| 139 |
var c; |
| 140 |
var u; |
| 141 |
var f = 0; |
| 142 |
var p = o || []; |
| 143 |
var y = !1; |
| 144 |
var G = { |
| 145 |
p: 0, |
| 146 |
n: 0, |
| 147 |
v: e, |
| 148 |
a: d, |
| 149 |
f: d.bind(e, 4), |
| 150 |
d: function d(t, r) { |
| 151 |
return i = t, c = 0, u = e, G.n = r, a; |
| 152 |
} |
| 153 |
}; |
| 154 |
function d(r, n) { |
| 155 |
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { |
| 156 |
var o; |
| 157 |
var i = p[t]; |
| 158 |
var d = G.p; |
| 159 |
var l = i[2]; |
| 160 |
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); |
| 161 |
} |
| 162 |
if (o || r > 1) return a; |
| 163 |
throw y = !0, n; |
| 164 |
} |
| 165 |
return function(o, p, l) { |
| 166 |
if (f > 1) throw TypeError("Generator is already running"); |
| 167 |
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { |
| 168 |
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); |
| 169 |
try { |
| 170 |
if (f = 2, i) { |
| 171 |
if (c || (o = "next"), t = i[o]) { |
| 172 |
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); |
| 173 |
if (!t.done) return t; |
| 174 |
u = t.value, c < 2 && (c = 0); |
| 175 |
} else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); |
| 176 |
i = e; |
| 177 |
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; |
| 178 |
} catch (t) { |
| 179 |
i = e, c = 1, u = t; |
| 180 |
} finally { |
| 181 |
f = 1; |
| 182 |
} |
| 183 |
} |
| 184 |
return { |
| 185 |
value: t, |
| 186 |
done: y |
| 187 |
}; |
| 188 |
}; |
| 189 |
}(r, o, i), !0), u; |
| 190 |
} |
| 191 |
var a = {}; |
| 192 |
function Generator() {} |
| 193 |
function GeneratorFunction() {} |
| 194 |
function GeneratorFunctionPrototype() {} |
| 195 |
t = Object.getPrototypeOf; |
| 196 |
var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() { |
| 197 |
return this; |
| 198 |
}), t); |
| 199 |
var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); |
| 200 |
function f(e) { |
| 201 |
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; |
| 202 |
} |
| 203 |
return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function() { |
| 204 |
return this; |
| 205 |
}), regeneratorDefine(u, "toString", function() { |
| 206 |
return "[object Generator]"; |
| 207 |
}), (module.exports = _regenerator = function _regenerator() { |
| 208 |
return { |
| 209 |
w: i, |
| 210 |
m: f |
| 211 |
}; |
| 212 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports)(); |
| 213 |
} |
| 214 |
module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 215 |
})); |
| 216 |
|
| 217 |
//#endregion |
| 218 |
//#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js |
| 219 |
var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 220 |
var OverloadYield = require_OverloadYield(); |
| 221 |
var regeneratorDefine = require_regeneratorDefine(); |
| 222 |
function AsyncIterator(t, e) { |
| 223 |
function n(r, o, i, f) { |
| 224 |
try { |
| 225 |
var c = t[r](o); |
| 226 |
var u = c.value; |
| 227 |
return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) { |
| 228 |
n("next", t, i, f); |
| 229 |
}, function(t) { |
| 230 |
n("throw", t, i, f); |
| 231 |
}) : e.resolve(u).then(function(t) { |
| 232 |
c.value = t, i(c); |
| 233 |
}, function(t) { |
| 234 |
return n("throw", t, i, f); |
| 235 |
}); |
| 236 |
} catch (t) { |
| 237 |
f(t); |
| 238 |
} |
| 239 |
} |
| 240 |
var r; |
| 241 |
this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() { |
| 242 |
return this; |
| 243 |
})), regeneratorDefine(this, "_invoke", function(t, o, i) { |
| 244 |
function f() { |
| 245 |
return new e(function(e, r) { |
| 246 |
n(t, i, e, r); |
| 247 |
}); |
| 248 |
} |
| 249 |
return r = r ? r.then(f, f) : f(); |
| 250 |
}, !0); |
| 251 |
} |
| 252 |
module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 253 |
})); |
| 254 |
|
| 255 |
//#endregion |
| 256 |
//#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js |
| 257 |
var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 258 |
var regenerator = require_regenerator$1(); |
| 259 |
var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); |
| 260 |
function _regeneratorAsyncGen(r, e, t, o, n) { |
| 261 |
return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); |
| 262 |
} |
| 263 |
module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 264 |
})); |
| 265 |
|
| 266 |
//#endregion |
| 267 |
//#region node_modules/@babel/runtime/helpers/regeneratorAsync.js |
| 268 |
var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 269 |
var regeneratorAsyncGen = require_regeneratorAsyncGen(); |
| 270 |
function _regeneratorAsync(n, e, r, t, o) { |
| 271 |
var a = regeneratorAsyncGen(n, e, r, t, o); |
| 272 |
return a.next().then(function(n) { |
| 273 |
return n.done ? n.value : a.next(); |
| 274 |
}); |
| 275 |
} |
| 276 |
module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 277 |
})); |
| 278 |
|
| 279 |
//#endregion |
| 280 |
//#region node_modules/@babel/runtime/helpers/regeneratorKeys.js |
| 281 |
var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 282 |
function _regeneratorKeys(e) { |
| 283 |
var n = Object(e); |
| 284 |
var r = []; |
| 285 |
for (var t in n) r.unshift(t); |
| 286 |
return function e() { |
| 287 |
for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; |
| 288 |
return e.done = !0, e; |
| 289 |
}; |
| 290 |
} |
| 291 |
module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 292 |
})); |
| 293 |
|
| 294 |
//#endregion |
| 295 |
//#region node_modules/@babel/runtime/helpers/typeof.js |
| 296 |
var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 297 |
function _typeof(o) { |
| 298 |
"@babel/helpers - typeof"; |
| 299 |
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { |
| 300 |
return typeof o; |
| 301 |
} : function(o) { |
| 302 |
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 303 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); |
| 304 |
} |
| 305 |
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 306 |
})); |
| 307 |
|
| 308 |
//#endregion |
| 309 |
//#region node_modules/@babel/runtime/helpers/regeneratorValues.js |
| 310 |
var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 311 |
var _typeof = require_typeof()["default"]; |
| 312 |
function _regeneratorValues(e) { |
| 313 |
if (null != e) { |
| 314 |
var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"]; |
| 315 |
var r = 0; |
| 316 |
if (t) return t.call(e); |
| 317 |
if ("function" == typeof e.next) return e; |
| 318 |
if (!isNaN(e.length)) return { next: function next() { |
| 319 |
return e && r >= e.length && (e = void 0), { |
| 320 |
value: e && e[r++], |
| 321 |
done: !e |
| 322 |
}; |
| 323 |
} }; |
| 324 |
} |
| 325 |
throw new TypeError(_typeof(e) + " is not iterable"); |
| 326 |
} |
| 327 |
module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 328 |
})); |
| 329 |
|
| 330 |
//#endregion |
| 331 |
//#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js |
| 332 |
var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 333 |
var OverloadYield = require_OverloadYield(); |
| 334 |
var regenerator = require_regenerator$1(); |
| 335 |
var regeneratorAsync = require_regeneratorAsync(); |
| 336 |
var regeneratorAsyncGen = require_regeneratorAsyncGen(); |
| 337 |
var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); |
| 338 |
var regeneratorKeys = require_regeneratorKeys(); |
| 339 |
var regeneratorValues = require_regeneratorValues(); |
| 340 |
function _regeneratorRuntime() { |
| 341 |
"use strict"; |
| 342 |
var r = regenerator(); |
| 343 |
var e = r.m(_regeneratorRuntime); |
| 344 |
var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; |
| 345 |
function n(r) { |
| 346 |
var e = "function" == typeof r && r.constructor; |
| 347 |
return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); |
| 348 |
} |
| 349 |
var o = { |
| 350 |
"throw": 1, |
| 351 |
"return": 2, |
| 352 |
"break": 3, |
| 353 |
"continue": 3 |
| 354 |
}; |
| 355 |
function a(r) { |
| 356 |
var e; |
| 357 |
var t; |
| 358 |
return function(n) { |
| 359 |
e || (e = { |
| 360 |
stop: function stop() { |
| 361 |
return t(n.a, 2); |
| 362 |
}, |
| 363 |
"catch": function _catch() { |
| 364 |
return n.v; |
| 365 |
}, |
| 366 |
abrupt: function abrupt(r, e) { |
| 367 |
return t(n.a, o[r], e); |
| 368 |
}, |
| 369 |
delegateYield: function delegateYield(r, o, a) { |
| 370 |
return e.resultName = o, t(n.d, regeneratorValues(r), a); |
| 371 |
}, |
| 372 |
finish: function finish(r) { |
| 373 |
return t(n.f, r); |
| 374 |
} |
| 375 |
}, t = function t(r, _t, o) { |
| 376 |
n.p = e.prev, n.n = e.next; |
| 377 |
try { |
| 378 |
return r(_t, o); |
| 379 |
} finally { |
| 380 |
e.next = n.n; |
| 381 |
} |
| 382 |
}), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; |
| 383 |
try { |
| 384 |
return r.call(this, e); |
| 385 |
} finally { |
| 386 |
n.p = e.prev, n.n = e.next; |
| 387 |
} |
| 388 |
}; |
| 389 |
} |
| 390 |
return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { |
| 391 |
return { |
| 392 |
wrap: function wrap(e, t, n, o) { |
| 393 |
return r.w(a(e), t, n, o && o.reverse()); |
| 394 |
}, |
| 395 |
isGeneratorFunction: n, |
| 396 |
mark: r.m, |
| 397 |
awrap: function awrap(r, e) { |
| 398 |
return new OverloadYield(r, e); |
| 399 |
}, |
| 400 |
AsyncIterator: regeneratorAsyncIterator, |
| 401 |
async: function async(r, e, t, o, u) { |
| 402 |
return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); |
| 403 |
}, |
| 404 |
keys: regeneratorKeys, |
| 405 |
values: regeneratorValues |
| 406 |
}; |
| 407 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports)(); |
| 408 |
} |
| 409 |
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 410 |
})); |
| 411 |
|
| 412 |
//#endregion |
| 413 |
//#region node_modules/@babel/runtime/regenerator/index.js |
| 414 |
var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 415 |
var runtime = require_regeneratorRuntime()(); |
| 416 |
module.exports = runtime; |
| 417 |
try { |
| 418 |
regeneratorRuntime = runtime; |
| 419 |
} catch (accidentalStrictMode) { |
| 420 |
if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime; |
| 421 |
else Function("r", "regeneratorRuntime = r")(runtime); |
| 422 |
} |
| 423 |
})); |
| 424 |
|
| 425 |
//#endregion |
| 426 |
//#region node_modules/react-dom/client.js |
| 427 |
var require_client = /* @__PURE__ */ __commonJSMin(((exports) => { |
| 428 |
var m$1 = (globalThis.ReactDOM); |
| 429 |
var i = m$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; |
| 430 |
exports.createRoot = function(c, o) { |
| 431 |
i.usingClientEntryPoint = true; |
| 432 |
try { |
| 433 |
return m$1.createRoot(c, o); |
| 434 |
} finally { |
| 435 |
i.usingClientEntryPoint = false; |
| 436 |
} |
| 437 |
}; |
| 438 |
})); |
| 439 |
|
| 440 |
//#endregion |
| 441 |
//#region assets/dev/js/utils/react.js |
| 442 |
var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator()); |
| 443 |
var import_client = require_client(); |
| 444 |
/** |
| 445 |
* Support conditional rendering of a React App to the DOM, based on the React version. |
| 446 |
* We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions. |
| 447 |
* |
| 448 |
* @param {Promise.resolve(React).ReactElement} app The app to render. |
| 449 |
* @param {HTMLElement} domElement The DOM element to render the app into. |
| 450 |
* |
| 451 |
* @return {{ unmount: () => void }} The unmount function. |
| 452 |
*/ |
| 453 |
function render(app, domElement) { |
| 454 |
var unmountFunction; |
| 455 |
try { |
| 456 |
var root = (0, import_client.createRoot)(domElement); |
| 457 |
root.render(app); |
| 458 |
unmountFunction = function unmountFunction() { |
| 459 |
root.unmount(); |
| 460 |
}; |
| 461 |
} catch (e) { |
| 462 |
react_dom.render(app, domElement); |
| 463 |
unmountFunction = function unmountFunction() { |
| 464 |
react_dom.unmountComponentAtNode(domElement); |
| 465 |
}; |
| 466 |
} |
| 467 |
return { unmount: unmountFunction }; |
| 468 |
} |
| 469 |
var react_default = { render }; |
| 470 |
|
| 471 |
//#endregion |
| 472 |
//#region \0vite/preload-helper.js |
| 473 |
var scriptRel = "modulepreload"; |
| 474 |
var assetsURL = function(dep) { |
| 475 |
return "/" + dep; |
| 476 |
}; |
| 477 |
var seen = {}; |
| 478 |
var __vitePreload = function preload(baseModule, deps, importerUrl) { |
| 479 |
let promise = Promise.resolve(); |
| 480 |
if (false && deps && deps.length > 0) { |
| 481 |
const links = document.getElementsByTagName("link"); |
| 482 |
const cspNonceMeta = document.querySelector("meta[property=csp-nonce]"); |
| 483 |
const cspNonce = (cspNonceMeta === null || cspNonceMeta === void 0 ? void 0 : cspNonceMeta.nonce) || (cspNonceMeta === null || cspNonceMeta === void 0 ? void 0 : cspNonceMeta.getAttribute("nonce")); |
| 484 |
function allSettled(promises) { |
| 485 |
return Promise.all(promises.map((p) => Promise.resolve(p).then((value) => ({ |
| 486 |
status: "fulfilled", |
| 487 |
value |
| 488 |
}), (reason) => ({ |
| 489 |
status: "rejected", |
| 490 |
reason |
| 491 |
})))); |
| 492 |
} |
| 493 |
function importMetaResolve(specifier) { |
| 494 |
if ({}.resolve) return {}.resolve(specifier); |
| 495 |
return new URL( |
| 496 |
specifier, |
| 497 |
/** #__KEEP__ */ |
| 498 |
{}.url |
| 499 |
).href; |
| 500 |
} |
| 501 |
promise = allSettled(deps.map((dep) => { |
| 502 |
dep = assetsURL(dep, importerUrl); |
| 503 |
dep = importMetaResolve(dep); |
| 504 |
if (dep in seen) return; |
| 505 |
seen[dep] = true; |
| 506 |
const isCss = dep.endsWith(".css"); |
| 507 |
for (let i = links.length - 1; i >= 0; i--) { |
| 508 |
const link = links[i]; |
| 509 |
if (link.href === dep && (!isCss || link.rel === "stylesheet")) return; |
| 510 |
} |
| 511 |
const link = document.createElement("link"); |
| 512 |
link.rel = isCss ? "stylesheet" : scriptRel; |
| 513 |
if (!isCss) link.as = "script"; |
| 514 |
link.crossOrigin = ""; |
| 515 |
link.href = dep; |
| 516 |
if (cspNonce) link.setAttribute("nonce", cspNonce); |
| 517 |
document.head.appendChild(link); |
| 518 |
if (isCss) return new Promise((res, rej) => { |
| 519 |
link.addEventListener("load", res); |
| 520 |
link.addEventListener("error", () => rej(/* @__PURE__ */ new Error(`Unable to preload CSS for ${dep}`))); |
| 521 |
}); |
| 522 |
})); |
| 523 |
} |
| 524 |
function handlePreloadError(err) { |
| 525 |
const e = new Event("vite:preloadError", { cancelable: true }); |
| 526 |
e.payload = err; |
| 527 |
window.dispatchEvent(e); |
| 528 |
if (!e.defaultPrevented) throw err; |
| 529 |
} |
| 530 |
return promise.then((res) => { |
| 531 |
for (const item of res || []) { |
| 532 |
if (item.status !== "rejected") continue; |
| 533 |
handlePreloadError(item.reason); |
| 534 |
} |
| 535 |
return baseModule().catch(handlePreloadError); |
| 536 |
}); |
| 537 |
}; |
| 538 |
|
| 539 |
//#endregion |
| 540 |
//#region node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js |
| 541 |
function _taggedTemplateLiteral(e, t) { |
| 542 |
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); |
| 543 |
} |
| 544 |
var init_taggedTemplateLiteral = __esmMin((() => {})); |
| 545 |
|
| 546 |
//#endregion |
| 547 |
//#region node_modules/styled-components/node_modules/tslib/tslib.es6.mjs |
| 548 |
function __spreadArray(to, from, pack) { |
| 549 |
if (pack || arguments.length === 2) { |
| 550 |
for (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) { |
| 551 |
if (!ar) ar = Array.prototype.slice.call(from, 0, i); |
| 552 |
ar[i] = from[i]; |
| 553 |
} |
| 554 |
} |
| 555 |
return to.concat(ar || Array.prototype.slice.call(from)); |
| 556 |
} |
| 557 |
var __assign; |
| 558 |
var init_tslib_es6 = __esmMin((() => { |
| 559 |
__assign = function() { |
| 560 |
__assign = Object.assign || function __assign(t) { |
| 561 |
for (var s, i = 1, n = arguments.length; i < n; i++) { |
| 562 |
s = arguments[i]; |
| 563 |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; |
| 564 |
} |
| 565 |
return t; |
| 566 |
}; |
| 567 |
return __assign.apply(this, arguments); |
| 568 |
}; |
| 569 |
})); |
| 570 |
|
| 571 |
//#endregion |
| 572 |
//#region node_modules/styled-components/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js |
| 573 |
function memoize(fn) { |
| 574 |
var cache = Object.create(null); |
| 575 |
return function(arg) { |
| 576 |
if (cache[arg] === void 0) cache[arg] = fn(arg); |
| 577 |
return cache[arg]; |
| 578 |
}; |
| 579 |
} |
| 580 |
var init_emotion_memoize_esm = __esmMin((() => {})); |
| 581 |
|
| 582 |
//#endregion |
| 583 |
//#region node_modules/styled-components/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js |
| 584 |
var reactPropsRegex, isPropValid; |
| 585 |
var init_emotion_is_prop_valid_esm = __esmMin((() => { |
| 586 |
init_emotion_memoize_esm(); |
| 587 |
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)-.*))$/; |
| 588 |
isPropValid = /* #__PURE__ */ memoize(function(prop) { |
| 589 |
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91; |
| 590 |
}); |
| 591 |
})); |
| 592 |
|
| 593 |
//#endregion |
| 594 |
//#region node_modules/shallowequal/index.js |
| 595 |
var require_shallowequal = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 596 |
module.exports = function shallowEqual(objA, objB, compare, compareContext) { |
| 597 |
var ret = compare ? compare.call(compareContext, objA, objB) : void 0; |
| 598 |
if (ret !== void 0) return !!ret; |
| 599 |
if (objA === objB) return true; |
| 600 |
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) return false; |
| 601 |
var keysA = Object.keys(objA); |
| 602 |
var keysB = Object.keys(objB); |
| 603 |
if (keysA.length !== keysB.length) return false; |
| 604 |
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); |
| 605 |
for (var idx = 0; idx < keysA.length; idx++) { |
| 606 |
var key = keysA[idx]; |
| 607 |
if (!bHasOwnProperty(key)) return false; |
| 608 |
var valueA = objA[key]; |
| 609 |
var valueB = objB[key]; |
| 610 |
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; |
| 611 |
if (ret === false || ret === void 0 && valueA !== valueB) return false; |
| 612 |
} |
| 613 |
return true; |
| 614 |
}; |
| 615 |
})); |
| 616 |
|
| 617 |
//#endregion |
| 618 |
//#region node_modules/styled-components/node_modules/stylis/src/Enum.js |
| 619 |
var MS, MOZ, WEBKIT, COMMENT, RULESET, DECLARATION, IMPORT, KEYFRAMES, LAYER; |
| 620 |
var init_Enum = __esmMin((() => { |
| 621 |
MS = "-ms-"; |
| 622 |
MOZ = "-moz-"; |
| 623 |
WEBKIT = "-webkit-"; |
| 624 |
COMMENT = "comm"; |
| 625 |
RULESET = "rule"; |
| 626 |
DECLARATION = "decl"; |
| 627 |
IMPORT = "@import"; |
| 628 |
KEYFRAMES = "@keyframes"; |
| 629 |
LAYER = "@layer"; |
| 630 |
})); |
| 631 |
|
| 632 |
//#endregion |
| 633 |
//#region node_modules/styled-components/node_modules/stylis/src/Utility.js |
| 634 |
/** |
| 635 |
* @param {string} value |
| 636 |
* @param {number} length |
| 637 |
* @return {number} |
| 638 |
*/ |
| 639 |
function hash(value, length) { |
| 640 |
return charat(value, 0) ^ 45 ? (((length << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0; |
| 641 |
} |
| 642 |
/** |
| 643 |
* @param {string} value |
| 644 |
* @return {string} |
| 645 |
*/ |
| 646 |
function trim(value) { |
| 647 |
return value.trim(); |
| 648 |
} |
| 649 |
/** |
| 650 |
* @param {string} value |
| 651 |
* @param {RegExp} pattern |
| 652 |
* @return {string?} |
| 653 |
*/ |
| 654 |
function match(value, pattern) { |
| 655 |
return (value = pattern.exec(value)) ? value[0] : value; |
| 656 |
} |
| 657 |
/** |
| 658 |
* @param {string} value |
| 659 |
* @param {(string|RegExp)} pattern |
| 660 |
* @param {string} replacement |
| 661 |
* @return {string} |
| 662 |
*/ |
| 663 |
function replace(value, pattern, replacement) { |
| 664 |
return value.replace(pattern, replacement); |
| 665 |
} |
| 666 |
/** |
| 667 |
* @param {string} value |
| 668 |
* @param {string} search |
| 669 |
* @param {number} position |
| 670 |
* @return {number} |
| 671 |
*/ |
| 672 |
function indexof(value, search, position) { |
| 673 |
return value.indexOf(search, position); |
| 674 |
} |
| 675 |
/** |
| 676 |
* @param {string} value |
| 677 |
* @param {number} index |
| 678 |
* @return {number} |
| 679 |
*/ |
| 680 |
function charat(value, index) { |
| 681 |
return value.charCodeAt(index) | 0; |
| 682 |
} |
| 683 |
/** |
| 684 |
* @param {string} value |
| 685 |
* @param {number} begin |
| 686 |
* @param {number} end |
| 687 |
* @return {string} |
| 688 |
*/ |
| 689 |
function substr(value, begin, end) { |
| 690 |
return value.slice(begin, end); |
| 691 |
} |
| 692 |
/** |
| 693 |
* @param {string} value |
| 694 |
* @return {number} |
| 695 |
*/ |
| 696 |
function strlen(value) { |
| 697 |
return value.length; |
| 698 |
} |
| 699 |
/** |
| 700 |
* @param {any[]} value |
| 701 |
* @return {number} |
| 702 |
*/ |
| 703 |
function sizeof(value) { |
| 704 |
return value.length; |
| 705 |
} |
| 706 |
/** |
| 707 |
* @param {any} value |
| 708 |
* @param {any[]} array |
| 709 |
* @return {any} |
| 710 |
*/ |
| 711 |
function append(value, array) { |
| 712 |
return array.push(value), value; |
| 713 |
} |
| 714 |
/** |
| 715 |
* @param {string[]} array |
| 716 |
* @param {function} callback |
| 717 |
* @return {string} |
| 718 |
*/ |
| 719 |
function combine(array, callback) { |
| 720 |
return array.map(callback).join(""); |
| 721 |
} |
| 722 |
/** |
| 723 |
* @param {string[]} array |
| 724 |
* @param {RegExp} pattern |
| 725 |
* @return {string[]} |
| 726 |
*/ |
| 727 |
function filter(array, pattern) { |
| 728 |
return array.filter(function(value) { |
| 729 |
return !match(value, pattern); |
| 730 |
}); |
| 731 |
} |
| 732 |
var abs, from, assign; |
| 733 |
var init_Utility = __esmMin((() => { |
| 734 |
abs = Math.abs; |
| 735 |
from = String.fromCharCode; |
| 736 |
assign = Object.assign; |
| 737 |
})); |
| 738 |
|
| 739 |
//#endregion |
| 740 |
//#region node_modules/styled-components/node_modules/stylis/src/Tokenizer.js |
| 741 |
/** |
| 742 |
* @param {string} value |
| 743 |
* @param {object | null} root |
| 744 |
* @param {object | null} parent |
| 745 |
* @param {string} type |
| 746 |
* @param {string[] | string} props |
| 747 |
* @param {object[] | string} children |
| 748 |
* @param {object[]} siblings |
| 749 |
* @param {number} length |
| 750 |
*/ |
| 751 |
function node(value, root, parent, type, props, children, length, siblings) { |
| 752 |
return { |
| 753 |
value, |
| 754 |
root, |
| 755 |
parent, |
| 756 |
type, |
| 757 |
props, |
| 758 |
children, |
| 759 |
line, |
| 760 |
column, |
| 761 |
length, |
| 762 |
return: "", |
| 763 |
siblings |
| 764 |
}; |
| 765 |
} |
| 766 |
/** |
| 767 |
* @param {object} root |
| 768 |
* @param {object} props |
| 769 |
* @return {object} |
| 770 |
*/ |
| 771 |
function copy(root, props) { |
| 772 |
return assign(node("", null, null, "", null, null, 0, root.siblings), root, { length: -root.length }, props); |
| 773 |
} |
| 774 |
/** |
| 775 |
* @param {object} root |
| 776 |
*/ |
| 777 |
function lift(root) { |
| 778 |
while (root.root) root = copy(root.root, { children: [root] }); |
| 779 |
append(root, root.siblings); |
| 780 |
} |
| 781 |
/** |
| 782 |
* @return {number} |
| 783 |
*/ |
| 784 |
function char() { |
| 785 |
return character; |
| 786 |
} |
| 787 |
/** |
| 788 |
* @return {number} |
| 789 |
*/ |
| 790 |
function prev() { |
| 791 |
character = position > 0 ? charat(characters, --position) : 0; |
| 792 |
if (column--, character === 10) column = 1, line--; |
| 793 |
return character; |
| 794 |
} |
| 795 |
/** |
| 796 |
* @return {number} |
| 797 |
*/ |
| 798 |
function next() { |
| 799 |
character = position < length ? charat(characters, position++) : 0; |
| 800 |
if (column++, character === 10) column = 1, line++; |
| 801 |
return character; |
| 802 |
} |
| 803 |
/** |
| 804 |
* @return {number} |
| 805 |
*/ |
| 806 |
function peek() { |
| 807 |
return charat(characters, position); |
| 808 |
} |
| 809 |
/** |
| 810 |
* @return {number} |
| 811 |
*/ |
| 812 |
function caret() { |
| 813 |
return position; |
| 814 |
} |
| 815 |
/** |
| 816 |
* @param {number} begin |
| 817 |
* @param {number} end |
| 818 |
* @return {string} |
| 819 |
*/ |
| 820 |
function slice(begin, end) { |
| 821 |
return substr(characters, begin, end); |
| 822 |
} |
| 823 |
/** |
| 824 |
* @param {number} type |
| 825 |
* @return {number} |
| 826 |
*/ |
| 827 |
function token(type) { |
| 828 |
switch (type) { |
| 829 |
case 0: |
| 830 |
case 9: |
| 831 |
case 10: |
| 832 |
case 13: |
| 833 |
case 32: return 5; |
| 834 |
case 33: |
| 835 |
case 43: |
| 836 |
case 44: |
| 837 |
case 47: |
| 838 |
case 62: |
| 839 |
case 64: |
| 840 |
case 126: |
| 841 |
case 59: |
| 842 |
case 123: |
| 843 |
case 125: return 4; |
| 844 |
case 58: return 3; |
| 845 |
case 34: |
| 846 |
case 39: |
| 847 |
case 40: |
| 848 |
case 91: return 2; |
| 849 |
case 41: |
| 850 |
case 93: return 1; |
| 851 |
} |
| 852 |
return 0; |
| 853 |
} |
| 854 |
/** |
| 855 |
* @param {string} value |
| 856 |
* @return {any[]} |
| 857 |
*/ |
| 858 |
function alloc(value) { |
| 859 |
return line = column = 1, length = strlen(characters = value), position = 0, []; |
| 860 |
} |
| 861 |
/** |
| 862 |
* @param {any} value |
| 863 |
* @return {any} |
| 864 |
*/ |
| 865 |
function dealloc(value) { |
| 866 |
return characters = "", value; |
| 867 |
} |
| 868 |
/** |
| 869 |
* @param {number} type |
| 870 |
* @return {string} |
| 871 |
*/ |
| 872 |
function delimit(type) { |
| 873 |
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type))); |
| 874 |
} |
| 875 |
/** |
| 876 |
* @param {number} type |
| 877 |
* @return {string} |
| 878 |
*/ |
| 879 |
function whitespace(type) { |
| 880 |
while (character = peek()) if (character < 33) next(); |
| 881 |
else break; |
| 882 |
return token(type) > 2 || token(character) > 3 ? "" : " "; |
| 883 |
} |
| 884 |
/** |
| 885 |
* @param {number} index |
| 886 |
* @param {number} count |
| 887 |
* @return {string} |
| 888 |
*/ |
| 889 |
function escaping(index, count) { |
| 890 |
while (--count && next()) if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97) break; |
| 891 |
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32)); |
| 892 |
} |
| 893 |
/** |
| 894 |
* @param {number} type |
| 895 |
* @return {number} |
| 896 |
*/ |
| 897 |
function delimiter(type) { |
| 898 |
while (next()) switch (character) { |
| 899 |
case type: return position; |
| 900 |
case 34: |
| 901 |
case 39: |
| 902 |
if (type !== 34 && type !== 39) delimiter(character); |
| 903 |
break; |
| 904 |
case 40: |
| 905 |
if (type === 41) delimiter(type); |
| 906 |
break; |
| 907 |
case 92: |
| 908 |
next(); |
| 909 |
break; |
| 910 |
} |
| 911 |
return position; |
| 912 |
} |
| 913 |
/** |
| 914 |
* @param {number} type |
| 915 |
* @param {number} index |
| 916 |
* @return {number} |
| 917 |
*/ |
| 918 |
function commenter(type, index) { |
| 919 |
while (next()) if (type + character === 57) break; |
| 920 |
else if (type + character === 84 && peek() === 47) break; |
| 921 |
return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next()); |
| 922 |
} |
| 923 |
/** |
| 924 |
* @param {number} index |
| 925 |
* @return {string} |
| 926 |
*/ |
| 927 |
function identifier(index) { |
| 928 |
while (!token(peek())) next(); |
| 929 |
return slice(index, position); |
| 930 |
} |
| 931 |
var line, column, length, position, character, characters; |
| 932 |
var init_Tokenizer = __esmMin((() => { |
| 933 |
init_Utility(); |
| 934 |
line = 1; |
| 935 |
column = 1; |
| 936 |
length = 0; |
| 937 |
position = 0; |
| 938 |
character = 0; |
| 939 |
characters = ""; |
| 940 |
})); |
| 941 |
|
| 942 |
//#endregion |
| 943 |
//#region node_modules/styled-components/node_modules/stylis/src/Parser.js |
| 944 |
/** |
| 945 |
* @param {string} value |
| 946 |
* @return {object[]} |
| 947 |
*/ |
| 948 |
function compile(value) { |
| 949 |
return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value)); |
| 950 |
} |
| 951 |
/** |
| 952 |
* @param {string} value |
| 953 |
* @param {object} root |
| 954 |
* @param {object?} parent |
| 955 |
* @param {string[]} rule |
| 956 |
* @param {string[]} rules |
| 957 |
* @param {string[]} rulesets |
| 958 |
* @param {number[]} pseudo |
| 959 |
* @param {number[]} points |
| 960 |
* @param {string[]} declarations |
| 961 |
* @return {object} |
| 962 |
*/ |
| 963 |
function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) { |
| 964 |
var index = 0; |
| 965 |
var offset = 0; |
| 966 |
var length = pseudo; |
| 967 |
var atrule = 0; |
| 968 |
var property = 0; |
| 969 |
var previous = 0; |
| 970 |
var variable = 1; |
| 971 |
var scanning = 1; |
| 972 |
var ampersand = 1; |
| 973 |
var character = 0; |
| 974 |
var type = ""; |
| 975 |
var props = rules; |
| 976 |
var children = rulesets; |
| 977 |
var reference = rule; |
| 978 |
var characters = type; |
| 979 |
while (scanning) switch (previous = character, character = next()) { |
| 980 |
case 40: if (previous != 108 && charat(characters, length - 1) == 58) { |
| 981 |
if (indexof(characters += replace(delimit(character), "&", "&\f"), "&\f", abs(index ? points[index - 1] : 0)) != -1) ampersand = -1; |
| 982 |
break; |
| 983 |
} |
| 984 |
case 34: |
| 985 |
case 39: |
| 986 |
case 91: |
| 987 |
characters += delimit(character); |
| 988 |
break; |
| 989 |
case 9: |
| 990 |
case 10: |
| 991 |
case 13: |
| 992 |
case 32: |
| 993 |
characters += whitespace(previous); |
| 994 |
break; |
| 995 |
case 92: |
| 996 |
characters += escaping(caret() - 1, 7); |
| 997 |
continue; |
| 998 |
case 47: |
| 999 |
switch (peek()) { |
| 1000 |
case 42: |
| 1001 |
case 47: |
| 1002 |
append(comment(commenter(next(), caret()), root, parent, declarations), declarations); |
| 1003 |
break; |
| 1004 |
default: characters += "/"; |
| 1005 |
} |
| 1006 |
break; |
| 1007 |
case 123 * variable: points[index++] = strlen(characters) * ampersand; |
| 1008 |
case 125 * variable: |
| 1009 |
case 59: |
| 1010 |
case 0: |
| 1011 |
switch (character) { |
| 1012 |
case 0: |
| 1013 |
case 125: scanning = 0; |
| 1014 |
case 59 + offset: |
| 1015 |
if (ampersand == -1) characters = replace(characters, /\f/g, ""); |
| 1016 |
if (property > 0 && strlen(characters) - length) append(property > 32 ? declaration(characters + ";", rule, parent, length - 1, declarations) : declaration(replace(characters, " ", "") + ";", rule, parent, length - 2, declarations), declarations); |
| 1017 |
break; |
| 1018 |
case 59: characters += ";"; |
| 1019 |
default: |
| 1020 |
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets); |
| 1021 |
if (character === 123) if (offset === 0) parse(characters, root, reference, reference, props, rulesets, length, points, children); |
| 1022 |
else switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) { |
| 1023 |
case 100: |
| 1024 |
case 108: |
| 1025 |
case 109: |
| 1026 |
case 115: |
| 1027 |
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children); |
| 1028 |
break; |
| 1029 |
default: parse(characters, reference, reference, reference, [""], children, 0, points, children); |
| 1030 |
} |
| 1031 |
} |
| 1032 |
index = offset = property = 0, variable = ampersand = 1, type = characters = "", length = pseudo; |
| 1033 |
break; |
| 1034 |
case 58: length = 1 + strlen(characters), property = previous; |
| 1035 |
default: |
| 1036 |
if (variable < 1) { |
| 1037 |
if (character == 123) --variable; |
| 1038 |
else if (character == 125 && variable++ == 0 && prev() == 125) continue; |
| 1039 |
} |
| 1040 |
switch (characters += from(character), character * variable) { |
| 1041 |
case 38: |
| 1042 |
ampersand = offset > 0 ? 1 : (characters += "\f", -1); |
| 1043 |
break; |
| 1044 |
case 44: |
| 1045 |
points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1; |
| 1046 |
break; |
| 1047 |
case 64: |
| 1048 |
if (peek() === 45) characters += delimit(next()); |
| 1049 |
atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++; |
| 1050 |
break; |
| 1051 |
case 45: if (previous === 45 && strlen(characters) == 2) variable = 0; |
| 1052 |
} |
| 1053 |
} |
| 1054 |
return rulesets; |
| 1055 |
} |
| 1056 |
/** |
| 1057 |
* @param {string} value |
| 1058 |
* @param {object} root |
| 1059 |
* @param {object?} parent |
| 1060 |
* @param {number} index |
| 1061 |
* @param {number} offset |
| 1062 |
* @param {string[]} rules |
| 1063 |
* @param {number[]} points |
| 1064 |
* @param {string} type |
| 1065 |
* @param {string[]} props |
| 1066 |
* @param {string[]} children |
| 1067 |
* @param {number} length |
| 1068 |
* @param {object[]} siblings |
| 1069 |
* @return {object} |
| 1070 |
*/ |
| 1071 |
function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length, siblings) { |
| 1072 |
var post = offset - 1; |
| 1073 |
var rule = offset === 0 ? rules : [""]; |
| 1074 |
var size = sizeof(rule); |
| 1075 |
for (var i = 0, j = 0, k = 0; i < index; ++i) for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x]))) props[k++] = z; |
| 1076 |
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings); |
| 1077 |
} |
| 1078 |
/** |
| 1079 |
* @param {number} value |
| 1080 |
* @param {object} root |
| 1081 |
* @param {object?} parent |
| 1082 |
* @param {object[]} siblings |
| 1083 |
* @return {object} |
| 1084 |
*/ |
| 1085 |
function comment(value, root, parent, siblings) { |
| 1086 |
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings); |
| 1087 |
} |
| 1088 |
/** |
| 1089 |
* @param {string} value |
| 1090 |
* @param {object} root |
| 1091 |
* @param {object?} parent |
| 1092 |
* @param {number} length |
| 1093 |
* @param {object[]} siblings |
| 1094 |
* @return {object} |
| 1095 |
*/ |
| 1096 |
function declaration(value, root, parent, length, siblings) { |
| 1097 |
return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings); |
| 1098 |
} |
| 1099 |
var init_Parser = __esmMin((() => { |
| 1100 |
init_Enum(); |
| 1101 |
init_Utility(); |
| 1102 |
init_Tokenizer(); |
| 1103 |
})); |
| 1104 |
|
| 1105 |
//#endregion |
| 1106 |
//#region node_modules/styled-components/node_modules/stylis/src/Prefixer.js |
| 1107 |
/** |
| 1108 |
* @param {string} value |
| 1109 |
* @param {number} length |
| 1110 |
* @param {object[]} children |
| 1111 |
* @return {string} |
| 1112 |
*/ |
| 1113 |
function prefix(value, length, children) { |
| 1114 |
switch (hash(value, length)) { |
| 1115 |
case 5103: return WEBKIT + "print-" + value + value; |
| 1116 |
case 5737: |
| 1117 |
case 4201: |
| 1118 |
case 3177: |
| 1119 |
case 3433: |
| 1120 |
case 1641: |
| 1121 |
case 4457: |
| 1122 |
case 2921: |
| 1123 |
case 5572: |
| 1124 |
case 6356: |
| 1125 |
case 5844: |
| 1126 |
case 3191: |
| 1127 |
case 6645: |
| 1128 |
case 3005: |
| 1129 |
case 6391: |
| 1130 |
case 5879: |
| 1131 |
case 5623: |
| 1132 |
case 6135: |
| 1133 |
case 4599: |
| 1134 |
case 4855: |
| 1135 |
case 4215: |
| 1136 |
case 6389: |
| 1137 |
case 5109: |
| 1138 |
case 5365: |
| 1139 |
case 5621: |
| 1140 |
case 3829: return WEBKIT + value + value; |
| 1141 |
case 4789: return MOZ + value + value; |
| 1142 |
case 5349: |
| 1143 |
case 4246: |
| 1144 |
case 4810: |
| 1145 |
case 6968: |
| 1146 |
case 2756: return WEBKIT + value + MOZ + value + MS + value + value; |
| 1147 |
case 5936: switch (charat(value, length + 11)) { |
| 1148 |
case 114: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value; |
| 1149 |
case 108: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value; |
| 1150 |
case 45: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value; |
| 1151 |
} |
| 1152 |
case 6828: |
| 1153 |
case 4268: |
| 1154 |
case 2903: return WEBKIT + value + MS + value + value; |
| 1155 |
case 6165: return WEBKIT + value + MS + "flex-" + value + value; |
| 1156 |
case 5187: return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value; |
| 1157 |
case 5443: return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/g, "") + (!match(value, /flex-|baseline/) ? MS + "grid-row-" + replace(value, /flex-|-self/g, "") : "") + value; |
| 1158 |
case 4675: return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/g, "") + value; |
| 1159 |
case 5548: return WEBKIT + value + MS + replace(value, "shrink", "negative") + value; |
| 1160 |
case 5292: return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value; |
| 1161 |
case 6060: return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value; |
| 1162 |
case 4554: return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value; |
| 1163 |
case 6187: return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value; |
| 1164 |
case 5495: |
| 1165 |
case 3959: return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1"); |
| 1166 |
case 4968: return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value; |
| 1167 |
case 4200: |
| 1168 |
if (!match(value, /flex-|baseline/)) return MS + "grid-column-align" + substr(value, length) + value; |
| 1169 |
break; |
| 1170 |
case 2592: |
| 1171 |
case 3360: return MS + replace(value, "template-", "") + value; |
| 1172 |
case 4384: |
| 1173 |
case 3616: |
| 1174 |
if (children && children.some(function(element, index) { |
| 1175 |
return length = index, match(element.props, /grid-\w+-end/); |
| 1176 |
})) return ~indexof(value + (children = children[length].value), "span", 0) ? value : MS + replace(value, "-start", "") + value + MS + "grid-row-span:" + (~indexof(children, "span", 0) ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ";"; |
| 1177 |
return MS + replace(value, "-start", "") + value; |
| 1178 |
case 4896: |
| 1179 |
case 4128: return children && children.some(function(element) { |
| 1180 |
return match(element.props, /grid-\w+-start/); |
| 1181 |
}) ? value : MS + replace(replace(value, "-end", "-span"), "span ", "") + value; |
| 1182 |
case 4095: |
| 1183 |
case 3583: |
| 1184 |
case 4068: |
| 1185 |
case 2532: return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value; |
| 1186 |
case 8116: |
| 1187 |
case 7059: |
| 1188 |
case 5753: |
| 1189 |
case 5535: |
| 1190 |
case 5445: |
| 1191 |
case 5701: |
| 1192 |
case 4933: |
| 1193 |
case 4677: |
| 1194 |
case 5533: |
| 1195 |
case 5789: |
| 1196 |
case 5021: |
| 1197 |
case 4765: |
| 1198 |
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) { |
| 1199 |
case 109: if (charat(value, length + 4) !== 45) break; |
| 1200 |
case 102: return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length + 3) == 108 ? "$3" : "$2-$3")) + value; |
| 1201 |
case 115: return ~indexof(value, "stretch", 0) ? prefix(replace(value, "stretch", "fill-available"), length, children) + value : value; |
| 1202 |
} |
| 1203 |
break; |
| 1204 |
case 5152: |
| 1205 |
case 5920: return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(_, a, b, c, d, e, f) { |
| 1206 |
return MS + a + ":" + b + f + (c ? MS + a + "-span:" + (d ? e : +e - +b) + f : "") + value; |
| 1207 |
}); |
| 1208 |
case 4949: |
| 1209 |
if (charat(value, length + 6) === 121) return replace(value, ":", ":" + WEBKIT) + value; |
| 1210 |
break; |
| 1211 |
case 6444: |
| 1212 |
switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) { |
| 1213 |
case 120: return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value; |
| 1214 |
case 100: return replace(value, ":", ":" + MS) + value; |
| 1215 |
} |
| 1216 |
break; |
| 1217 |
case 5719: |
| 1218 |
case 2647: |
| 1219 |
case 2135: |
| 1220 |
case 3927: |
| 1221 |
case 2391: return replace(value, "scroll-", "scroll-snap-") + value; |
| 1222 |
} |
| 1223 |
return value; |
| 1224 |
} |
| 1225 |
var init_Prefixer = __esmMin((() => { |
| 1226 |
init_Enum(); |
| 1227 |
init_Utility(); |
| 1228 |
})); |
| 1229 |
|
| 1230 |
//#endregion |
| 1231 |
//#region node_modules/styled-components/node_modules/stylis/src/Serializer.js |
| 1232 |
/** |
| 1233 |
* @param {object[]} children |
| 1234 |
* @param {function} callback |
| 1235 |
* @return {string} |
| 1236 |
*/ |
| 1237 |
function serialize(children, callback) { |
| 1238 |
var output = ""; |
| 1239 |
for (var i = 0; i < children.length; i++) output += callback(children[i], i, children, callback) || ""; |
| 1240 |
return output; |
| 1241 |
} |
| 1242 |
/** |
| 1243 |
* @param {object} element |
| 1244 |
* @param {number} index |
| 1245 |
* @param {object[]} children |
| 1246 |
* @param {function} callback |
| 1247 |
* @return {string} |
| 1248 |
*/ |
| 1249 |
function stringify(element, index, children, callback) { |
| 1250 |
switch (element.type) { |
| 1251 |
case LAYER: if (element.children.length) break; |
| 1252 |
case IMPORT: |
| 1253 |
case DECLARATION: return element.return = element.return || element.value; |
| 1254 |
case COMMENT: return ""; |
| 1255 |
case KEYFRAMES: return element.return = element.value + "{" + serialize(element.children, callback) + "}"; |
| 1256 |
case RULESET: if (!strlen(element.value = element.props.join(","))) return ""; |
| 1257 |
} |
| 1258 |
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : ""; |
| 1259 |
} |
| 1260 |
var init_Serializer = __esmMin((() => { |
| 1261 |
init_Enum(); |
| 1262 |
init_Utility(); |
| 1263 |
})); |
| 1264 |
|
| 1265 |
//#endregion |
| 1266 |
//#region node_modules/styled-components/node_modules/stylis/src/Middleware.js |
| 1267 |
/** |
| 1268 |
* @param {function[]} collection |
| 1269 |
* @return {function} |
| 1270 |
*/ |
| 1271 |
function middleware(collection) { |
| 1272 |
var length = sizeof(collection); |
| 1273 |
return function(element, index, children, callback) { |
| 1274 |
var output = ""; |
| 1275 |
for (var i = 0; i < length; i++) output += collection[i](element, index, children, callback) || ""; |
| 1276 |
return output; |
| 1277 |
}; |
| 1278 |
} |
| 1279 |
/** |
| 1280 |
* @param {function} callback |
| 1281 |
* @return {function} |
| 1282 |
*/ |
| 1283 |
function rulesheet(callback) { |
| 1284 |
return function(element) { |
| 1285 |
if (!element.root) { |
| 1286 |
if (element = element.return) callback(element); |
| 1287 |
} |
| 1288 |
}; |
| 1289 |
} |
| 1290 |
/** |
| 1291 |
* @param {object} element |
| 1292 |
* @param {number} index |
| 1293 |
* @param {object[]} children |
| 1294 |
* @param {function} callback |
| 1295 |
*/ |
| 1296 |
function prefixer(element, index, children, callback) { |
| 1297 |
if (element.length > -1) { |
| 1298 |
if (!element.return) switch (element.type) { |
| 1299 |
case DECLARATION: |
| 1300 |
element.return = prefix(element.value, element.length, children); |
| 1301 |
return; |
| 1302 |
case KEYFRAMES: return serialize([copy(element, { value: replace(element.value, "@", "@" + WEBKIT) })], callback); |
| 1303 |
case RULESET: if (element.length) return combine(children = element.props, function(value) { |
| 1304 |
switch (match(value, callback = /(::plac\w+|:read-\w+)/)) { |
| 1305 |
case ":read-only": |
| 1306 |
case ":read-write": |
| 1307 |
lift(copy(element, { props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")] })); |
| 1308 |
lift(copy(element, { props: [value] })); |
| 1309 |
assign(element, { props: filter(children, callback) }); |
| 1310 |
break; |
| 1311 |
case "::placeholder": |
| 1312 |
lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")] })); |
| 1313 |
lift(copy(element, { props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")] })); |
| 1314 |
lift(copy(element, { props: [replace(value, /:(plac\w+)/, MS + "input-$1")] })); |
| 1315 |
lift(copy(element, { props: [value] })); |
| 1316 |
assign(element, { props: filter(children, callback) }); |
| 1317 |
break; |
| 1318 |
} |
| 1319 |
return ""; |
| 1320 |
}); |
| 1321 |
} |
| 1322 |
} |
| 1323 |
} |
| 1324 |
var init_Middleware = __esmMin((() => { |
| 1325 |
init_Enum(); |
| 1326 |
init_Utility(); |
| 1327 |
init_Tokenizer(); |
| 1328 |
init_Serializer(); |
| 1329 |
init_Prefixer(); |
| 1330 |
})); |
| 1331 |
|
| 1332 |
//#endregion |
| 1333 |
//#region node_modules/styled-components/node_modules/stylis/index.js |
| 1334 |
var init_stylis = __esmMin((() => { |
| 1335 |
init_Enum(); |
| 1336 |
init_Utility(); |
| 1337 |
init_Parser(); |
| 1338 |
init_Prefixer(); |
| 1339 |
init_Tokenizer(); |
| 1340 |
init_Serializer(); |
| 1341 |
init_Middleware(); |
| 1342 |
})); |
| 1343 |
|
| 1344 |
//#endregion |
| 1345 |
//#region node_modules/styled-components/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js |
| 1346 |
var unitlessKeys; |
| 1347 |
var init_emotion_unitless_esm = __esmMin((() => { |
| 1348 |
unitlessKeys = { |
| 1349 |
animationIterationCount: 1, |
| 1350 |
aspectRatio: 1, |
| 1351 |
borderImageOutset: 1, |
| 1352 |
borderImageSlice: 1, |
| 1353 |
borderImageWidth: 1, |
| 1354 |
boxFlex: 1, |
| 1355 |
boxFlexGroup: 1, |
| 1356 |
boxOrdinalGroup: 1, |
| 1357 |
columnCount: 1, |
| 1358 |
columns: 1, |
| 1359 |
flex: 1, |
| 1360 |
flexGrow: 1, |
| 1361 |
flexPositive: 1, |
| 1362 |
flexShrink: 1, |
| 1363 |
flexNegative: 1, |
| 1364 |
flexOrder: 1, |
| 1365 |
gridRow: 1, |
| 1366 |
gridRowEnd: 1, |
| 1367 |
gridRowSpan: 1, |
| 1368 |
gridRowStart: 1, |
| 1369 |
gridColumn: 1, |
| 1370 |
gridColumnEnd: 1, |
| 1371 |
gridColumnSpan: 1, |
| 1372 |
gridColumnStart: 1, |
| 1373 |
msGridRow: 1, |
| 1374 |
msGridRowSpan: 1, |
| 1375 |
msGridColumn: 1, |
| 1376 |
msGridColumnSpan: 1, |
| 1377 |
fontWeight: 1, |
| 1378 |
lineHeight: 1, |
| 1379 |
opacity: 1, |
| 1380 |
order: 1, |
| 1381 |
orphans: 1, |
| 1382 |
tabSize: 1, |
| 1383 |
widows: 1, |
| 1384 |
zIndex: 1, |
| 1385 |
zoom: 1, |
| 1386 |
WebkitLineClamp: 1, |
| 1387 |
fillOpacity: 1, |
| 1388 |
floodOpacity: 1, |
| 1389 |
stopOpacity: 1, |
| 1390 |
strokeDasharray: 1, |
| 1391 |
strokeDashoffset: 1, |
| 1392 |
strokeMiterlimit: 1, |
| 1393 |
strokeOpacity: 1, |
| 1394 |
strokeWidth: 1 |
| 1395 |
}; |
| 1396 |
})); |
| 1397 |
|
| 1398 |
//#endregion |
| 1399 |
//#region node_modules/styled-components/dist/styled-components.browser.esm.js |
| 1400 |
function I(e, t, n) { |
| 1401 |
return void 0 === n && (n = C), e.theme !== n.theme && e.theme || t || n.theme; |
| 1402 |
} |
| 1403 |
function R(e) { |
| 1404 |
return e.replace(O, "-").replace(D, ""); |
| 1405 |
} |
| 1406 |
function x(e) { |
| 1407 |
var t; |
| 1408 |
var n = ""; |
| 1409 |
for (t = Math.abs(e); t > k; t = t / k | 0) n = j(t % k) + n; |
| 1410 |
return (j(t % k) + n).replace(T, "$1-$2"); |
| 1411 |
} |
| 1412 |
function $(e) { |
| 1413 |
return x(z(e) >>> 0); |
| 1414 |
} |
| 1415 |
function B(e) { |
| 1416 |
return "string" == typeof e && e || e.displayName || e.name || "Component"; |
| 1417 |
} |
| 1418 |
function L(e) { |
| 1419 |
return "string" == typeof e && e.charAt(0) === e.charAt(0).toLowerCase(); |
| 1420 |
} |
| 1421 |
function X(e) { |
| 1422 |
return ("type" in (t = e) && t.type.$$typeof) === Y ? U : "$$typeof" in e ? J[e.$$typeof] : q; |
| 1423 |
var t; |
| 1424 |
} |
| 1425 |
function oe(e, t, n) { |
| 1426 |
if ("string" != typeof t) { |
| 1427 |
if (ne) { |
| 1428 |
var o = te(t); |
| 1429 |
o && o !== ne && oe(e, o, n); |
| 1430 |
} |
| 1431 |
var r = K(t); |
| 1432 |
Q && (r = r.concat(Q(t))); |
| 1433 |
for (var s = X(e), i = X(t), a = 0; a < r.length; ++a) { |
| 1434 |
var c = r[a]; |
| 1435 |
if (!(c in H || n && n[c] || i && c in i || s && c in s)) { |
| 1436 |
var l = ee(t, c); |
| 1437 |
try { |
| 1438 |
Z(e, c, l); |
| 1439 |
} catch (e) {} |
| 1440 |
} |
| 1441 |
} |
| 1442 |
} |
| 1443 |
return e; |
| 1444 |
} |
| 1445 |
function re(e) { |
| 1446 |
return "function" == typeof e; |
| 1447 |
} |
| 1448 |
function se(e) { |
| 1449 |
return "object" == typeof e && "styledComponentId" in e; |
| 1450 |
} |
| 1451 |
function ie(e, t) { |
| 1452 |
return e && t ? "".concat(e, " ").concat(t) : e || t || ""; |
| 1453 |
} |
| 1454 |
function ae(e, t) { |
| 1455 |
if (0 === e.length) return ""; |
| 1456 |
for (var n = e[0], o = 1; o < e.length; o++) n += t ? t + e[o] : e[o]; |
| 1457 |
return n; |
| 1458 |
} |
| 1459 |
function ce(e) { |
| 1460 |
return null !== e && "object" == typeof e && e.constructor.name === Object.name && !("props" in e && e.$$typeof); |
| 1461 |
} |
| 1462 |
function le(e, t, n) { |
| 1463 |
if (void 0 === n && (n = !1), !n && !ce(e) && !Array.isArray(e)) return t; |
| 1464 |
if (Array.isArray(t)) for (var o = 0; o < t.length; o++) e[o] = le(e[o], t[o]); |
| 1465 |
else if (ce(t)) for (var o in t) e[o] = le(e[o], t[o]); |
| 1466 |
return e; |
| 1467 |
} |
| 1468 |
function ue(e, t) { |
| 1469 |
Object.defineProperty(e, "toString", { value: t }); |
| 1470 |
} |
| 1471 |
function de() { |
| 1472 |
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; |
| 1473 |
for (var n = e[0], o = [], r = 1, s = e.length; r < s; r += 1) o.push(e[r]); |
| 1474 |
return o.forEach(function(e) { |
| 1475 |
n = n.replace(/%[a-z]/, e); |
| 1476 |
}), n; |
| 1477 |
} |
| 1478 |
function he(t) { |
| 1479 |
for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o]; |
| 1480 |
return new Error(de.apply(void 0, __spreadArray([pe[t]], n, !1)).trim()); |
| 1481 |
} |
| 1482 |
function Ce() { |
| 1483 |
return "undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : null; |
| 1484 |
} |
| 1485 |
function Ve(e, t) { |
| 1486 |
return e.map(function(e) { |
| 1487 |
return "rule" === e.type && (e.value = "".concat(t, " ").concat(e.value), e.value = e.value.replaceAll(",", ",".concat(t, " ")), e.props = e.props.map(function(e) { |
| 1488 |
return "".concat(t, " ").concat(e); |
| 1489 |
})), Array.isArray(e.children) && "@keyframes" !== e.type && (e.children = Ve(e.children, t)), e; |
| 1490 |
}); |
| 1491 |
} |
| 1492 |
function Fe(e) { |
| 1493 |
var t; |
| 1494 |
var n; |
| 1495 |
var o; |
| 1496 |
var r = void 0 === e ? C : e; |
| 1497 |
var s = r.options; |
| 1498 |
var i = void 0 === s ? C : s; |
| 1499 |
var a = r.plugins; |
| 1500 |
var c = void 0 === a ? _ : a; |
| 1501 |
var l = function(e, o, r) { |
| 1502 |
return r.startsWith(n) && r.endsWith(n) && r.replaceAll(n, "").length > 0 ? ".".concat(t) : e; |
| 1503 |
}; |
| 1504 |
var u = c.slice(); |
| 1505 |
u.push(function(e) { |
| 1506 |
e.type === "rule" && e.value.includes("&") && (e.props[0] = e.props[0].replace(je, n).replace(o, l)); |
| 1507 |
}), i.prefix && u.push(prefixer), u.push(stringify); |
| 1508 |
var p = function(e, r, s, a) { |
| 1509 |
void 0 === r && (r = ""), void 0 === s && (s = ""), void 0 === a && (a = "&"), t = a, n = r, o = new RegExp("\\".concat(n, "\\b"), "g"); |
| 1510 |
var c = e.replace(xe, ""); |
| 1511 |
var l = compile(s || r ? "".concat(s, " ").concat(r, " { ").concat(c, " }") : c); |
| 1512 |
i.namespace && (l = Ve(l, i.namespace)); |
| 1513 |
var p = []; |
| 1514 |
return serialize(l, middleware(u.concat(rulesheet(function(e) { |
| 1515 |
return p.push(e); |
| 1516 |
})))), p; |
| 1517 |
}; |
| 1518 |
return p.hash = c.length ? c.reduce(function(e, t) { |
| 1519 |
return t.name || he(15), M(e, t.name); |
| 1520 |
}, F).toString() : "", p; |
| 1521 |
} |
| 1522 |
function Ge() { |
| 1523 |
return (0, react.useContext)($e); |
| 1524 |
} |
| 1525 |
function Ye(e) { |
| 1526 |
var t = (0, react.useState)(e.stylisPlugins); |
| 1527 |
var n = t[0]; |
| 1528 |
var r = t[1]; |
| 1529 |
var c = Ge().styleSheet; |
| 1530 |
var l = (0, react.useMemo)(function() { |
| 1531 |
var t = c; |
| 1532 |
return e.sheet ? t = e.sheet : e.target && (t = t.reconstructWithOptions({ target: e.target }, !1)), e.disableCSSOMInjection && (t = t.reconstructWithOptions({ useCSSOMInjection: !1 })), t; |
| 1533 |
}, [ |
| 1534 |
e.disableCSSOMInjection, |
| 1535 |
e.sheet, |
| 1536 |
e.target, |
| 1537 |
c |
| 1538 |
]); |
| 1539 |
var u = (0, react.useMemo)(function() { |
| 1540 |
return Fe({ |
| 1541 |
options: { |
| 1542 |
namespace: e.namespace, |
| 1543 |
prefix: e.enableVendorPrefixes |
| 1544 |
}, |
| 1545 |
plugins: n |
| 1546 |
}); |
| 1547 |
}, [ |
| 1548 |
e.enableVendorPrefixes, |
| 1549 |
e.namespace, |
| 1550 |
n |
| 1551 |
]); |
| 1552 |
(0, react.useEffect)(function() { |
| 1553 |
(0, import_shallowequal.default)(n, e.stylisPlugins) || r(e.stylisPlugins); |
| 1554 |
}, [e.stylisPlugins]); |
| 1555 |
var d = (0, react.useMemo)(function() { |
| 1556 |
return { |
| 1557 |
shouldForwardProp: e.shouldForwardProp, |
| 1558 |
styleSheet: l, |
| 1559 |
stylis: u |
| 1560 |
}; |
| 1561 |
}, [ |
| 1562 |
e.shouldForwardProp, |
| 1563 |
l, |
| 1564 |
u |
| 1565 |
]); |
| 1566 |
return react.default.createElement($e.Provider, { value: d }, react.default.createElement(Le.Provider, { value: u }, e.children)); |
| 1567 |
} |
| 1568 |
function He(e) { |
| 1569 |
for (var t = "", n = 0; n < e.length; n++) { |
| 1570 |
var o = e[n]; |
| 1571 |
if (1 === n && "-" === o && "-" === e[0]) return e; |
| 1572 |
qe(o) ? t += "-" + o.toLowerCase() : t += o; |
| 1573 |
} |
| 1574 |
return t.startsWith("ms-") ? "-" + t : t; |
| 1575 |
} |
| 1576 |
function Xe(e, t, n, o) { |
| 1577 |
if (Ue(e)) return []; |
| 1578 |
if (se(e)) return [".".concat(e.styledComponentId)]; |
| 1579 |
if (re(e)) { |
| 1580 |
if (!re(s = e) || s.prototype && s.prototype.isReactComponent || !t) return [e]; |
| 1581 |
var r = e(t); |
| 1582 |
return "object" != typeof r || Array.isArray(r) || r instanceof We || ce(r) || null === r || console.error("".concat(B(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), Xe(r, t, n, o); |
| 1583 |
} |
| 1584 |
var s; |
| 1585 |
return e instanceof We ? n ? (e.inject(n, o), [e.getName(o)]) : [e] : ce(e) ? Je(e) : Array.isArray(e) ? Array.prototype.concat.apply(_, e.map(function(e) { |
| 1586 |
return Xe(e, t, n, o); |
| 1587 |
})) : [e.toString()]; |
| 1588 |
} |
| 1589 |
function Ze(e) { |
| 1590 |
for (var t = 0; t < e.length; t += 1) { |
| 1591 |
var n = e[t]; |
| 1592 |
if (re(n) && !se(n)) return !1; |
| 1593 |
} |
| 1594 |
return !0; |
| 1595 |
} |
| 1596 |
function it(e, r, s) { |
| 1597 |
var i = se(e); |
| 1598 |
var a = e; |
| 1599 |
var c = !L(e); |
| 1600 |
var p = r.attrs; |
| 1601 |
var d = void 0 === p ? _ : p; |
| 1602 |
var h = r.componentId; |
| 1603 |
var f = void 0 === h ? function(e, t) { |
| 1604 |
var n = "string" != typeof e ? "sc" : R(e); |
| 1605 |
rt[n] = (rt[n] || 0) + 1; |
| 1606 |
var o = "".concat(n, "-").concat($(v + n + rt[n])); |
| 1607 |
return t ? "".concat(t, "-").concat(o) : o; |
| 1608 |
}(r.displayName, r.parentComponentId) : h; |
| 1609 |
var m = r.displayName; |
| 1610 |
var y = void 0 === m ? function(e) { |
| 1611 |
return L(e) ? "styled.".concat(e) : "Styled(".concat(B(e), ")"); |
| 1612 |
}(e) : m; |
| 1613 |
var g = r.displayName && r.componentId ? "".concat(R(r.displayName), "-").concat(r.componentId) : r.componentId || f; |
| 1614 |
var S = i && a.attrs ? a.attrs.concat(d).filter(Boolean) : d; |
| 1615 |
var w = r.shouldForwardProp; |
| 1616 |
if (i && a.shouldForwardProp) { |
| 1617 |
var b = a.shouldForwardProp; |
| 1618 |
if (r.shouldForwardProp) { |
| 1619 |
var E = r.shouldForwardProp; |
| 1620 |
w = function(e, t) { |
| 1621 |
return b(e, t) && E(e, t); |
| 1622 |
}; |
| 1623 |
} else w = b; |
| 1624 |
} |
| 1625 |
var N = new Qe(s, g, i ? a.componentStyle : void 0); |
| 1626 |
function O(e, r) { |
| 1627 |
return function(e, r, s) { |
| 1628 |
var i = e.attrs; |
| 1629 |
var a = e.componentStyle; |
| 1630 |
var c = e.defaultProps; |
| 1631 |
var p = e.foldedComponentIds; |
| 1632 |
var d = e.styledComponentId; |
| 1633 |
var h = e.target; |
| 1634 |
var f = react.default.useContext(et); |
| 1635 |
var m = Ge(); |
| 1636 |
var y = e.shouldForwardProp || m.shouldForwardProp; |
| 1637 |
(0, react.useDebugValue)(d); |
| 1638 |
var v = I(r, f, c) || C; |
| 1639 |
var g = function(e, n, o) { |
| 1640 |
for (var r, s = __assign(__assign({}, n), { |
| 1641 |
className: void 0, |
| 1642 |
theme: o |
| 1643 |
}), i = 0; i < e.length; i += 1) { |
| 1644 |
var a = re(r = e[i]) ? r(s) : r; |
| 1645 |
for (var c in a) s[c] = "className" === c ? ie(s[c], a[c]) : "style" === c ? __assign(__assign({}, s[c]), a[c]) : a[c]; |
| 1646 |
} |
| 1647 |
return n.className && (s.className = ie(s.className, n.className)), s; |
| 1648 |
}(i, r, v); |
| 1649 |
var S = g.as || h; |
| 1650 |
var w = {}; |
| 1651 |
for (var b in g) void 0 === g[b] || "$" === b[0] || "as" === b || "theme" === b && g.theme === v || ("forwardedAs" === b ? w.as = g.forwardedAs : y && !y(b, S) || (w[b] = g[b], y || isPropValid(b) || st.has(b) || !A.has(S) || (st.add(b), console.warn("styled-components: it looks like an unknown prop \"".concat(b, "\" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)"))))); |
| 1652 |
var E = function(e, t) { |
| 1653 |
var n = Ge(); |
| 1654 |
var o = e.generateAndInjectStyles(t, n.styleSheet, n.stylis); |
| 1655 |
return (0, react.useDebugValue)(o), o; |
| 1656 |
}(a, g); |
| 1657 |
e.warnTooManyClasses && e.warnTooManyClasses(E); |
| 1658 |
var N = ie(p, d); |
| 1659 |
return E && (N += " " + E), g.className && (N += " " + g.className), w[L(S) && !A.has(S) ? "class" : "className"] = N, s && (w.ref = s), (0, react.createElement)(S, w); |
| 1660 |
}(D, e, r); |
| 1661 |
} |
| 1662 |
O.displayName = y; |
| 1663 |
var D = react.default.forwardRef(O); |
| 1664 |
return D.attrs = S, D.componentStyle = N, D.displayName = y, D.shouldForwardProp = w, D.foldedComponentIds = i ? ie(a.foldedComponentIds, a.styledComponentId) : "", D.styledComponentId = g, D.target = i ? a.target : e, Object.defineProperty(D, "defaultProps", { |
| 1665 |
get: function() { |
| 1666 |
return this._foldedDefaultProps; |
| 1667 |
}, |
| 1668 |
set: function(e) { |
| 1669 |
this._foldedDefaultProps = i ? function(e) { |
| 1670 |
for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n]; |
| 1671 |
for (var o = 0, r = t; o < r.length; o++) le(e, r[o], !0); |
| 1672 |
return e; |
| 1673 |
}({}, a.defaultProps, e) : e; |
| 1674 |
} |
| 1675 |
}), P(y, g), D.warnTooManyClasses = function(e, t) { |
| 1676 |
var n = {}; |
| 1677 |
var o = !1; |
| 1678 |
return function(r) { |
| 1679 |
if (!o && (n[r] = !0, Object.keys(n).length >= 200)) { |
| 1680 |
var s = t ? " with the id of \"".concat(t, "\"") : ""; |
| 1681 |
console.warn("Over ".concat(200, " classes were generated for component ").concat(e).concat(s, ".\n") + "Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"), o = !0, n = {}; |
| 1682 |
} |
| 1683 |
}; |
| 1684 |
}(y, g), ue(D, function() { |
| 1685 |
return ".".concat(D.styledComponentId); |
| 1686 |
}), c && oe(D, e, { |
| 1687 |
attrs: !0, |
| 1688 |
componentStyle: !0, |
| 1689 |
displayName: !0, |
| 1690 |
foldedComponentIds: !0, |
| 1691 |
shouldForwardProp: !0, |
| 1692 |
styledComponentId: !0, |
| 1693 |
target: !0 |
| 1694 |
}), D; |
| 1695 |
} |
| 1696 |
function at(e, t) { |
| 1697 |
for (var n = [e[0]], o = 0, r = t.length; o < r; o += 1) n.push(t[o], e[o + 1]); |
| 1698 |
return n; |
| 1699 |
} |
| 1700 |
function lt(t) { |
| 1701 |
for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o]; |
| 1702 |
if (re(t) || ce(t)) return ct(Xe(at(_, __spreadArray([t], n, !0)))); |
| 1703 |
var r = t; |
| 1704 |
return 0 === n.length && 1 === r.length && "string" == typeof r[0] ? Xe(r) : ct(Xe(at(r, n))); |
| 1705 |
} |
| 1706 |
function ut(n, o, r) { |
| 1707 |
if (void 0 === r && (r = C), !o) throw he(1, o); |
| 1708 |
var s = function(t) { |
| 1709 |
for (var s = [], i = 1; i < arguments.length; i++) s[i - 1] = arguments[i]; |
| 1710 |
return n(o, r, lt.apply(void 0, __spreadArray([t], s, !1))); |
| 1711 |
}; |
| 1712 |
return s.attrs = function(e) { |
| 1713 |
return ut(n, o, __assign(__assign({}, r), { attrs: Array.prototype.concat(r.attrs, e).filter(Boolean) })); |
| 1714 |
}, s.withConfig = function(e) { |
| 1715 |
return ut(n, o, __assign(__assign({}, r), e)); |
| 1716 |
}, s; |
| 1717 |
} |
| 1718 |
var import_shallowequal, f, m, y, v, g, S, w, E, N, P, _, C, A, O, D, T, k, j, V, F, M, z, G, Y, W, q, H, U, J, Z, K, Q, ee, te, ne, pe, fe, me, ye, ve, ge, Se, we, be, Ee, Ne, Pe, _e, Ie, Ae, Oe, De, Re, Te, ke, je, xe, Me, ze, $e, Be, Le, We, qe, Ue, Je, Ke, Qe, et, tt, rt, st, ct, pt, dt, ht, vt, St; |
| 1719 |
var init_styled_components_browser_esm = __esmMin((() => { |
| 1720 |
init_tslib_es6(); |
| 1721 |
init_emotion_is_prop_valid_esm(); |
| 1722 |
import_shallowequal = /* @__PURE__ */ __toESM(require_shallowequal()); |
| 1723 |
init_stylis(); |
| 1724 |
init_emotion_unitless_esm(); |
| 1725 |
f = "undefined" != typeof process && ({}.REACT_APP_SC_ATTR || {}.SC_ATTR) || "data-styled"; |
| 1726 |
m = "active"; |
| 1727 |
y = "data-styled-version"; |
| 1728 |
v = "6.1.19"; |
| 1729 |
g = "/*!sc*/\n"; |
| 1730 |
S = "undefined" != typeof window && "undefined" != typeof document; |
| 1731 |
w = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== {}.REACT_APP_SC_DISABLE_SPEEDY && "" !== {}.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== {}.REACT_APP_SC_DISABLE_SPEEDY && {}.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== {}.SC_DISABLE_SPEEDY && "" !== {}.SC_DISABLE_SPEEDY ? "false" !== {}.SC_DISABLE_SPEEDY && {}.SC_DISABLE_SPEEDY : true); |
| 1732 |
E = /invalid hook call/i; |
| 1733 |
N = /* @__PURE__ */ new Set(); |
| 1734 |
P = function(t, n) { |
| 1735 |
var o = n ? " with the id of \"".concat(n, "\"") : ""; |
| 1736 |
var s = "The component ".concat(t).concat(o, " has been created dynamically.\n") + "You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n"; |
| 1737 |
var i = console.error; |
| 1738 |
try { |
| 1739 |
var a = !0; |
| 1740 |
console.error = function(t) { |
| 1741 |
for (var n = [], o = 1; o < arguments.length; o++) n[o - 1] = arguments[o]; |
| 1742 |
E.test(t) ? (a = !1, N.delete(s)) : i.apply(void 0, __spreadArray([t], n, !1)); |
| 1743 |
}, (0, react.useRef)(), a && !N.has(s) && (console.warn(s), N.add(s)); |
| 1744 |
} catch (e) { |
| 1745 |
E.test(e.message) && N.delete(s); |
| 1746 |
} finally { |
| 1747 |
console.error = i; |
| 1748 |
} |
| 1749 |
}; |
| 1750 |
_ = Object.freeze([]); |
| 1751 |
C = Object.freeze({}); |
| 1752 |
A = /* @__PURE__ */ new Set([ |
| 1753 |
"a", |
| 1754 |
"abbr", |
| 1755 |
"address", |
| 1756 |
"area", |
| 1757 |
"article", |
| 1758 |
"aside", |
| 1759 |
"audio", |
| 1760 |
"b", |
| 1761 |
"base", |
| 1762 |
"bdi", |
| 1763 |
"bdo", |
| 1764 |
"big", |
| 1765 |
"blockquote", |
| 1766 |
"body", |
| 1767 |
"br", |
| 1768 |
"button", |
| 1769 |
"canvas", |
| 1770 |
"caption", |
| 1771 |
"cite", |
| 1772 |
"code", |
| 1773 |
"col", |
| 1774 |
"colgroup", |
| 1775 |
"data", |
| 1776 |
"datalist", |
| 1777 |
"dd", |
| 1778 |
"del", |
| 1779 |
"details", |
| 1780 |
"dfn", |
| 1781 |
"dialog", |
| 1782 |
"div", |
| 1783 |
"dl", |
| 1784 |
"dt", |
| 1785 |
"em", |
| 1786 |
"embed", |
| 1787 |
"fieldset", |
| 1788 |
"figcaption", |
| 1789 |
"figure", |
| 1790 |
"footer", |
| 1791 |
"form", |
| 1792 |
"h1", |
| 1793 |
"h2", |
| 1794 |
"h3", |
| 1795 |
"h4", |
| 1796 |
"h5", |
| 1797 |
"h6", |
| 1798 |
"header", |
| 1799 |
"hgroup", |
| 1800 |
"hr", |
| 1801 |
"html", |
| 1802 |
"i", |
| 1803 |
"iframe", |
| 1804 |
"img", |
| 1805 |
"input", |
| 1806 |
"ins", |
| 1807 |
"kbd", |
| 1808 |
"keygen", |
| 1809 |
"label", |
| 1810 |
"legend", |
| 1811 |
"li", |
| 1812 |
"link", |
| 1813 |
"main", |
| 1814 |
"map", |
| 1815 |
"mark", |
| 1816 |
"menu", |
| 1817 |
"menuitem", |
| 1818 |
"meta", |
| 1819 |
"meter", |
| 1820 |
"nav", |
| 1821 |
"noscript", |
| 1822 |
"object", |
| 1823 |
"ol", |
| 1824 |
"optgroup", |
| 1825 |
"option", |
| 1826 |
"output", |
| 1827 |
"p", |
| 1828 |
"param", |
| 1829 |
"picture", |
| 1830 |
"pre", |
| 1831 |
"progress", |
| 1832 |
"q", |
| 1833 |
"rp", |
| 1834 |
"rt", |
| 1835 |
"ruby", |
| 1836 |
"s", |
| 1837 |
"samp", |
| 1838 |
"script", |
| 1839 |
"section", |
| 1840 |
"select", |
| 1841 |
"small", |
| 1842 |
"source", |
| 1843 |
"span", |
| 1844 |
"strong", |
| 1845 |
"style", |
| 1846 |
"sub", |
| 1847 |
"summary", |
| 1848 |
"sup", |
| 1849 |
"table", |
| 1850 |
"tbody", |
| 1851 |
"td", |
| 1852 |
"textarea", |
| 1853 |
"tfoot", |
| 1854 |
"th", |
| 1855 |
"thead", |
| 1856 |
"time", |
| 1857 |
"tr", |
| 1858 |
"track", |
| 1859 |
"u", |
| 1860 |
"ul", |
| 1861 |
"use", |
| 1862 |
"var", |
| 1863 |
"video", |
| 1864 |
"wbr", |
| 1865 |
"circle", |
| 1866 |
"clipPath", |
| 1867 |
"defs", |
| 1868 |
"ellipse", |
| 1869 |
"foreignObject", |
| 1870 |
"g", |
| 1871 |
"image", |
| 1872 |
"line", |
| 1873 |
"linearGradient", |
| 1874 |
"marker", |
| 1875 |
"mask", |
| 1876 |
"path", |
| 1877 |
"pattern", |
| 1878 |
"polygon", |
| 1879 |
"polyline", |
| 1880 |
"radialGradient", |
| 1881 |
"rect", |
| 1882 |
"stop", |
| 1883 |
"svg", |
| 1884 |
"text", |
| 1885 |
"tspan" |
| 1886 |
]); |
| 1887 |
O = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g; |
| 1888 |
D = /(^-|-$)/g; |
| 1889 |
T = /(a)(d)/gi; |
| 1890 |
k = 52; |
| 1891 |
j = function(e) { |
| 1892 |
return String.fromCharCode(e + (e > 25 ? 39 : 97)); |
| 1893 |
}; |
| 1894 |
; |
| 1895 |
F = 5381; |
| 1896 |
M = function(e, t) { |
| 1897 |
for (var n = t.length; n;) e = 33 * e ^ t.charCodeAt(--n); |
| 1898 |
return e; |
| 1899 |
}; |
| 1900 |
z = function(e) { |
| 1901 |
return M(F, e); |
| 1902 |
}; |
| 1903 |
G = "function" == typeof Symbol && Symbol.for; |
| 1904 |
Y = G ? Symbol.for("react.memo") : 60115; |
| 1905 |
W = G ? Symbol.for("react.forward_ref") : 60112; |
| 1906 |
q = { |
| 1907 |
childContextTypes: !0, |
| 1908 |
contextType: !0, |
| 1909 |
contextTypes: !0, |
| 1910 |
defaultProps: !0, |
| 1911 |
displayName: !0, |
| 1912 |
getDefaultProps: !0, |
| 1913 |
getDerivedStateFromError: !0, |
| 1914 |
getDerivedStateFromProps: !0, |
| 1915 |
mixins: !0, |
| 1916 |
propTypes: !0, |
| 1917 |
type: !0 |
| 1918 |
}; |
| 1919 |
H = { |
| 1920 |
name: !0, |
| 1921 |
length: !0, |
| 1922 |
prototype: !0, |
| 1923 |
caller: !0, |
| 1924 |
callee: !0, |
| 1925 |
arguments: !0, |
| 1926 |
arity: !0 |
| 1927 |
}; |
| 1928 |
U = { |
| 1929 |
$$typeof: !0, |
| 1930 |
compare: !0, |
| 1931 |
defaultProps: !0, |
| 1932 |
displayName: !0, |
| 1933 |
propTypes: !0, |
| 1934 |
type: !0 |
| 1935 |
}; |
| 1936 |
J = ((V = {})[W] = { |
| 1937 |
$$typeof: !0, |
| 1938 |
render: !0, |
| 1939 |
defaultProps: !0, |
| 1940 |
displayName: !0, |
| 1941 |
propTypes: !0 |
| 1942 |
}, V[Y] = U, V); |
| 1943 |
Z = Object.defineProperty; |
| 1944 |
K = Object.getOwnPropertyNames; |
| 1945 |
Q = Object.getOwnPropertySymbols; |
| 1946 |
ee = Object.getOwnPropertyDescriptor; |
| 1947 |
te = Object.getPrototypeOf; |
| 1948 |
ne = Object.prototype; |
| 1949 |
pe = { |
| 1950 |
1: "Cannot create styled-component for component: %s.\n\n", |
| 1951 |
2: "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n", |
| 1952 |
3: "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n", |
| 1953 |
4: "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n", |
| 1954 |
5: "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n", |
| 1955 |
6: "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n", |
| 1956 |
7: "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n", |
| 1957 |
8: "ThemeProvider: Please make your \"theme\" prop an object.\n\n", |
| 1958 |
9: "Missing document `<head>`\n\n", |
| 1959 |
10: "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n", |
| 1960 |
11: "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n", |
| 1961 |
12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", |
| 1962 |
13: "%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n", |
| 1963 |
14: "ThemeProvider: \"theme\" prop is required.\n\n", |
| 1964 |
15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", |
| 1965 |
16: "Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n", |
| 1966 |
17: "CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n", |
| 1967 |
18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" |
| 1968 |
}; |
| 1969 |
fe = function() { |
| 1970 |
function e(e) { |
| 1971 |
this.groupSizes = /* @__PURE__ */ new Uint32Array(512), this.length = 512, this.tag = e; |
| 1972 |
} |
| 1973 |
return e.prototype.indexOfGroup = function(e) { |
| 1974 |
for (var t = 0, n = 0; n < e; n++) t += this.groupSizes[n]; |
| 1975 |
return t; |
| 1976 |
}, e.prototype.insertRules = function(e, t) { |
| 1977 |
if (e >= this.groupSizes.length) { |
| 1978 |
for (var n = this.groupSizes, o = n.length, r = o; e >= r;) if ((r <<= 1) < 0) throw he(16, "".concat(e)); |
| 1979 |
this.groupSizes = new Uint32Array(r), this.groupSizes.set(n), this.length = r; |
| 1980 |
for (var s = o; s < r; s++) this.groupSizes[s] = 0; |
| 1981 |
} |
| 1982 |
for (var i = this.indexOfGroup(e + 1), a = (s = 0, t.length); s < a; s++) this.tag.insertRule(i, t[s]) && (this.groupSizes[e]++, i++); |
| 1983 |
}, e.prototype.clearGroup = function(e) { |
| 1984 |
if (e < this.length) { |
| 1985 |
var t = this.groupSizes[e]; |
| 1986 |
var n = this.indexOfGroup(e); |
| 1987 |
var o = n + t; |
| 1988 |
this.groupSizes[e] = 0; |
| 1989 |
for (var r = n; r < o; r++) this.tag.deleteRule(n); |
| 1990 |
} |
| 1991 |
}, e.prototype.getGroup = function(e) { |
| 1992 |
var t = ""; |
| 1993 |
if (e >= this.length || 0 === this.groupSizes[e]) return t; |
| 1994 |
for (var n = this.groupSizes[e], o = this.indexOfGroup(e), r = o + n, s = o; s < r; s++) t += "".concat(this.tag.getRule(s)).concat(g); |
| 1995 |
return t; |
| 1996 |
}, e; |
| 1997 |
}(); |
| 1998 |
me = 1 << 30; |
| 1999 |
ye = /* @__PURE__ */ new Map(); |
| 2000 |
ve = /* @__PURE__ */ new Map(); |
| 2001 |
ge = 1; |
| 2002 |
Se = function(e) { |
| 2003 |
if (ye.has(e)) return ye.get(e); |
| 2004 |
for (; ve.has(ge);) ge++; |
| 2005 |
var t = ge++; |
| 2006 |
if ((0 | t) < 0 || t > me) throw he(16, "".concat(t)); |
| 2007 |
return ye.set(e, t), ve.set(t, e), t; |
| 2008 |
}; |
| 2009 |
we = function(e, t) { |
| 2010 |
ge = t + 1, ye.set(e, t), ve.set(t, e); |
| 2011 |
}; |
| 2012 |
be = "style[".concat(f, "][").concat(y, "=\"").concat(v, "\"]"); |
| 2013 |
Ee = new RegExp("^".concat(f, "\\.g(\\d+)\\[id=\"([\\w\\d-]+)\"\\].*?\"([^\"]*)")); |
| 2014 |
Ne = function(e, t, n) { |
| 2015 |
for (var o, r = n.split(","), s = 0, i = r.length; s < i; s++) (o = r[s]) && e.registerName(t, o); |
| 2016 |
}; |
| 2017 |
Pe = function(e, t) { |
| 2018 |
for (var n, o = (null !== (n = t.textContent) && void 0 !== n ? n : "").split(g), r = [], s = 0, i = o.length; s < i; s++) { |
| 2019 |
var a = o[s].trim(); |
| 2020 |
if (a) { |
| 2021 |
var c = a.match(Ee); |
| 2022 |
if (c) { |
| 2023 |
var l = 0 | parseInt(c[1], 10); |
| 2024 |
var u = c[2]; |
| 2025 |
0 !== l && (we(u, l), Ne(e, u, c[3]), e.getTag().insertRules(l, r)), r.length = 0; |
| 2026 |
} else r.push(a); |
| 2027 |
} |
| 2028 |
} |
| 2029 |
}; |
| 2030 |
_e = function(e) { |
| 2031 |
for (var t = document.querySelectorAll(be), n = 0, o = t.length; n < o; n++) { |
| 2032 |
var r = t[n]; |
| 2033 |
r && r.getAttribute(f) !== m && (Pe(e, r), r.parentNode && r.parentNode.removeChild(r)); |
| 2034 |
} |
| 2035 |
}; |
| 2036 |
Ie = function(e) { |
| 2037 |
var t = document.head; |
| 2038 |
var n = e || t; |
| 2039 |
var o = document.createElement("style"); |
| 2040 |
var r = function(e) { |
| 2041 |
var t = Array.from(e.querySelectorAll("style[".concat(f, "]"))); |
| 2042 |
return t[t.length - 1]; |
| 2043 |
}(n); |
| 2044 |
var s = void 0 !== r ? r.nextSibling : null; |
| 2045 |
o.setAttribute(f, m), o.setAttribute(y, v); |
| 2046 |
var i = Ce(); |
| 2047 |
return i && o.setAttribute("nonce", i), n.insertBefore(o, s), o; |
| 2048 |
}; |
| 2049 |
Ae = function() { |
| 2050 |
function e(e) { |
| 2051 |
this.element = Ie(e), this.element.appendChild(document.createTextNode("")), this.sheet = function(e) { |
| 2052 |
if (e.sheet) return e.sheet; |
| 2053 |
for (var t = document.styleSheets, n = 0, o = t.length; n < o; n++) { |
| 2054 |
var r = t[n]; |
| 2055 |
if (r.ownerNode === e) return r; |
| 2056 |
} |
| 2057 |
throw he(17); |
| 2058 |
}(this.element), this.length = 0; |
| 2059 |
} |
| 2060 |
return e.prototype.insertRule = function(e, t) { |
| 2061 |
try { |
| 2062 |
return this.sheet.insertRule(t, e), this.length++, !0; |
| 2063 |
} catch (e) { |
| 2064 |
return !1; |
| 2065 |
} |
| 2066 |
}, e.prototype.deleteRule = function(e) { |
| 2067 |
this.sheet.deleteRule(e), this.length--; |
| 2068 |
}, e.prototype.getRule = function(e) { |
| 2069 |
var t = this.sheet.cssRules[e]; |
| 2070 |
return t && t.cssText ? t.cssText : ""; |
| 2071 |
}, e; |
| 2072 |
}(); |
| 2073 |
Oe = function() { |
| 2074 |
function e(e) { |
| 2075 |
this.element = Ie(e), this.nodes = this.element.childNodes, this.length = 0; |
| 2076 |
} |
| 2077 |
return e.prototype.insertRule = function(e, t) { |
| 2078 |
if (e <= this.length && e >= 0) { |
| 2079 |
var n = document.createTextNode(t); |
| 2080 |
return this.element.insertBefore(n, this.nodes[e] || null), this.length++, !0; |
| 2081 |
} |
| 2082 |
return !1; |
| 2083 |
}, e.prototype.deleteRule = function(e) { |
| 2084 |
this.element.removeChild(this.nodes[e]), this.length--; |
| 2085 |
}, e.prototype.getRule = function(e) { |
| 2086 |
return e < this.length ? this.nodes[e].textContent : ""; |
| 2087 |
}, e; |
| 2088 |
}(); |
| 2089 |
De = function() { |
| 2090 |
function e(e) { |
| 2091 |
this.rules = [], this.length = 0; |
| 2092 |
} |
| 2093 |
return e.prototype.insertRule = function(e, t) { |
| 2094 |
return e <= this.length && (this.rules.splice(e, 0, t), this.length++, !0); |
| 2095 |
}, e.prototype.deleteRule = function(e) { |
| 2096 |
this.rules.splice(e, 1), this.length--; |
| 2097 |
}, e.prototype.getRule = function(e) { |
| 2098 |
return e < this.length ? this.rules[e] : ""; |
| 2099 |
}, e; |
| 2100 |
}(); |
| 2101 |
Re = S; |
| 2102 |
Te = { |
| 2103 |
isServer: !S, |
| 2104 |
useCSSOMInjection: !w |
| 2105 |
}; |
| 2106 |
ke = function() { |
| 2107 |
function e(e, n, o) { |
| 2108 |
void 0 === e && (e = C), void 0 === n && (n = {}); |
| 2109 |
var r = this; |
| 2110 |
this.options = __assign(__assign({}, Te), e), this.gs = n, this.names = new Map(o), this.server = !!e.isServer, !this.server && S && Re && (Re = !1, _e(this)), ue(this, function() { |
| 2111 |
return function(e) { |
| 2112 |
for (var t = e.getTag(), n = t.length, o = "", r = function(n) { |
| 2113 |
var r = function(e) { |
| 2114 |
return ve.get(e); |
| 2115 |
}(n); |
| 2116 |
if (void 0 === r) return "continue"; |
| 2117 |
var s = e.names.get(r); |
| 2118 |
var i = t.getGroup(n); |
| 2119 |
if (void 0 === s || !s.size || 0 === i.length) return "continue"; |
| 2120 |
var a = "".concat(f, ".g").concat(n, "[id=\"").concat(r, "\"]"); |
| 2121 |
var c = ""; |
| 2122 |
void 0 !== s && s.forEach(function(e) { |
| 2123 |
e.length > 0 && (c += "".concat(e, ",")); |
| 2124 |
}), o += "".concat(i).concat(a, "{content:\"").concat(c, "\"}").concat(g); |
| 2125 |
}, s = 0; s < n; s++) r(s); |
| 2126 |
return o; |
| 2127 |
}(r); |
| 2128 |
}); |
| 2129 |
} |
| 2130 |
return e.registerId = function(e) { |
| 2131 |
return Se(e); |
| 2132 |
}, e.prototype.rehydrate = function() { |
| 2133 |
!this.server && S && _e(this); |
| 2134 |
}, e.prototype.reconstructWithOptions = function(n, o) { |
| 2135 |
return void 0 === o && (o = !0), new e(__assign(__assign({}, this.options), n), this.gs, o && this.names || void 0); |
| 2136 |
}, e.prototype.allocateGSInstance = function(e) { |
| 2137 |
return this.gs[e] = (this.gs[e] || 0) + 1; |
| 2138 |
}, e.prototype.getTag = function() { |
| 2139 |
return this.tag || (this.tag = (e = function(e) { |
| 2140 |
var t = e.useCSSOMInjection; |
| 2141 |
var n = e.target; |
| 2142 |
return e.isServer ? new De(n) : t ? new Ae(n) : new Oe(n); |
| 2143 |
}(this.options), new fe(e))); |
| 2144 |
var e; |
| 2145 |
}, e.prototype.hasNameForId = function(e, t) { |
| 2146 |
return this.names.has(e) && this.names.get(e).has(t); |
| 2147 |
}, e.prototype.registerName = function(e, t) { |
| 2148 |
if (Se(e), this.names.has(e)) this.names.get(e).add(t); |
| 2149 |
else { |
| 2150 |
var n = /* @__PURE__ */ new Set(); |
| 2151 |
n.add(t), this.names.set(e, n); |
| 2152 |
} |
| 2153 |
}, e.prototype.insertRules = function(e, t, n) { |
| 2154 |
this.registerName(e, t), this.getTag().insertRules(Se(e), n); |
| 2155 |
}, e.prototype.clearNames = function(e) { |
| 2156 |
this.names.has(e) && this.names.get(e).clear(); |
| 2157 |
}, e.prototype.clearRules = function(e) { |
| 2158 |
this.getTag().clearGroup(Se(e)), this.clearNames(e); |
| 2159 |
}, e.prototype.clearTag = function() { |
| 2160 |
this.tag = void 0; |
| 2161 |
}, e; |
| 2162 |
}(); |
| 2163 |
je = /&/g; |
| 2164 |
xe = /^\s*\/\/.*$/gm; |
| 2165 |
Me = new ke(); |
| 2166 |
ze = Fe(); |
| 2167 |
$e = react.default.createContext({ |
| 2168 |
shouldForwardProp: void 0, |
| 2169 |
styleSheet: Me, |
| 2170 |
stylis: ze |
| 2171 |
}); |
| 2172 |
Be = $e.Consumer; |
| 2173 |
Le = react.default.createContext(void 0); |
| 2174 |
We = function() { |
| 2175 |
function e(e, t) { |
| 2176 |
var n = this; |
| 2177 |
this.inject = function(e, t) { |
| 2178 |
void 0 === t && (t = ze); |
| 2179 |
var o = n.name + t.hash; |
| 2180 |
e.hasNameForId(n.id, o) || e.insertRules(n.id, o, t(n.rules, o, "@keyframes")); |
| 2181 |
}, this.name = e, this.id = "sc-keyframes-".concat(e), this.rules = t, ue(this, function() { |
| 2182 |
throw he(12, String(n.name)); |
| 2183 |
}); |
| 2184 |
} |
| 2185 |
return e.prototype.getName = function(e) { |
| 2186 |
return void 0 === e && (e = ze), this.name + e.hash; |
| 2187 |
}, e; |
| 2188 |
}(); |
| 2189 |
qe = function(e) { |
| 2190 |
return e >= "A" && e <= "Z"; |
| 2191 |
}; |
| 2192 |
Ue = function(e) { |
| 2193 |
return null == e || !1 === e || "" === e; |
| 2194 |
}; |
| 2195 |
Je = function(t) { |
| 2196 |
var n; |
| 2197 |
var o; |
| 2198 |
var r = []; |
| 2199 |
for (var s in t) { |
| 2200 |
var i = t[s]; |
| 2201 |
t.hasOwnProperty(s) && !Ue(i) && (Array.isArray(i) && i.isCss || re(i) ? r.push("".concat(He(s), ":"), i, ";") : ce(i) ? r.push.apply(r, __spreadArray(__spreadArray(["".concat(s, " {")], Je(i), !1), ["}"], !1)) : r.push("".concat(He(s), ": ").concat((n = s, null == (o = i) || "boolean" == typeof o || "" === o ? "" : "number" != typeof o || 0 === o || n in unitlessKeys || n.startsWith("--") ? String(o).trim() : "".concat(o, "px")), ";"))); |
| 2202 |
} |
| 2203 |
return r; |
| 2204 |
}; |
| 2205 |
Ke = z(v); |
| 2206 |
Qe = function() { |
| 2207 |
function e(e, t, n) { |
| 2208 |
this.rules = e, this.staticRulesId = "", this.isStatic = false, this.componentId = t, this.baseHash = M(Ke, t), this.baseStyle = n, ke.registerId(t); |
| 2209 |
} |
| 2210 |
return e.prototype.generateAndInjectStyles = function(e, t, n) { |
| 2211 |
var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(e, t, n) : ""; |
| 2212 |
if (this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) o = ie(o, this.staticRulesId); |
| 2213 |
else { |
| 2214 |
var r = ae(Xe(this.rules, e, t, n)); |
| 2215 |
var s = x(M(this.baseHash, r) >>> 0); |
| 2216 |
if (!t.hasNameForId(this.componentId, s)) { |
| 2217 |
var i = n(r, ".".concat(s), void 0, this.componentId); |
| 2218 |
t.insertRules(this.componentId, s, i); |
| 2219 |
} |
| 2220 |
o = ie(o, s), this.staticRulesId = s; |
| 2221 |
} |
| 2222 |
else { |
| 2223 |
for (var a = M(this.baseHash, n.hash), c = "", l = 0; l < this.rules.length; l++) { |
| 2224 |
var u = this.rules[l]; |
| 2225 |
if ("string" == typeof u) c += u, a = M(a, u); |
| 2226 |
else if (u) { |
| 2227 |
var p = ae(Xe(u, e, t, n)); |
| 2228 |
a = M(a, p + l), c += p; |
| 2229 |
} |
| 2230 |
} |
| 2231 |
if (c) { |
| 2232 |
var d = x(a >>> 0); |
| 2233 |
t.hasNameForId(this.componentId, d) || t.insertRules(this.componentId, d, n(c, ".".concat(d), void 0, this.componentId)), o = ie(o, d); |
| 2234 |
} |
| 2235 |
} |
| 2236 |
return o; |
| 2237 |
}, e; |
| 2238 |
}(); |
| 2239 |
et = react.default.createContext(void 0); |
| 2240 |
tt = et.Consumer; |
| 2241 |
rt = {}; |
| 2242 |
st = /* @__PURE__ */ new Set(); |
| 2243 |
ct = function(e) { |
| 2244 |
return Object.assign(e, { isCss: !0 }); |
| 2245 |
}; |
| 2246 |
pt = function(e) { |
| 2247 |
return ut(it, e); |
| 2248 |
}; |
| 2249 |
dt = pt; |
| 2250 |
A.forEach(function(e) { |
| 2251 |
dt[e] = pt(e); |
| 2252 |
}); |
| 2253 |
ht = function() { |
| 2254 |
function e(e, t) { |
| 2255 |
this.rules = e, this.componentId = t, this.isStatic = Ze(e), ke.registerId(this.componentId + 1); |
| 2256 |
} |
| 2257 |
return e.prototype.createStyles = function(e, t, n, o) { |
| 2258 |
var r = o(ae(Xe(this.rules, t, n, o)), ""); |
| 2259 |
var s = this.componentId + e; |
| 2260 |
n.insertRules(s, s, r); |
| 2261 |
}, e.prototype.removeStyles = function(e, t) { |
| 2262 |
t.clearRules(this.componentId + e); |
| 2263 |
}, e.prototype.renderStyles = function(e, t, n, o) { |
| 2264 |
e > 2 && ke.registerId(this.componentId + e), this.removeStyles(e, n), this.createStyles(e, t, n, o); |
| 2265 |
}, e; |
| 2266 |
}(); |
| 2267 |
vt = function() { |
| 2268 |
function e() { |
| 2269 |
var e = this; |
| 2270 |
this._emitSheetCSS = function() { |
| 2271 |
var t = e.instance.toString(); |
| 2272 |
if (!t) return ""; |
| 2273 |
var n = Ce(); |
| 2274 |
var o = ae([ |
| 2275 |
n && "nonce=\"".concat(n, "\""), |
| 2276 |
"".concat(f, "=\"true\""), |
| 2277 |
"".concat(y, "=\"").concat(v, "\"") |
| 2278 |
].filter(Boolean), " "); |
| 2279 |
return "<style ".concat(o, ">").concat(t, "</style>"); |
| 2280 |
}, this.getStyleTags = function() { |
| 2281 |
if (e.sealed) throw he(2); |
| 2282 |
return e._emitSheetCSS(); |
| 2283 |
}, this.getStyleElement = function() { |
| 2284 |
var n; |
| 2285 |
if (e.sealed) throw he(2); |
| 2286 |
var r = e.instance.toString(); |
| 2287 |
if (!r) return []; |
| 2288 |
var s = ((n = {})[f] = "", n[y] = v, n.dangerouslySetInnerHTML = { __html: r }, n); |
| 2289 |
var i = Ce(); |
| 2290 |
return i && (s.nonce = i), [react.default.createElement("style", __assign({}, s, { key: "sc-0-0" }))]; |
| 2291 |
}, this.seal = function() { |
| 2292 |
e.sealed = !0; |
| 2293 |
}, this.instance = new ke({ isServer: !0 }), this.sealed = !1; |
| 2294 |
} |
| 2295 |
return e.prototype.collectStyles = function(e) { |
| 2296 |
if (this.sealed) throw he(2); |
| 2297 |
return react.default.createElement(Ye, { sheet: this.instance }, e); |
| 2298 |
}, e.prototype.interleaveWithNodeStream = function(e) { |
| 2299 |
throw he(3); |
| 2300 |
}, e; |
| 2301 |
}(); |
| 2302 |
"undefined" != typeof navigator && "ReactNative" === navigator.product && console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"); |
| 2303 |
St = "__sc-".concat(f, "__"); |
| 2304 |
"undefined" != typeof window && (window[St] || (window[St] = 0), 1 === window[St] && console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."), window[St] += 1); |
| 2305 |
})); |
| 2306 |
|
| 2307 |
//#endregion |
| 2308 |
//#region node_modules/@babel/runtime/helpers/esm/extends.js |
| 2309 |
function _extends() { |
| 2310 |
return _extends = Object.assign ? Object.assign.bind() : function(n) { |
| 2311 |
for (var e = 1; e < arguments.length; e++) { |
| 2312 |
var t = arguments[e]; |
| 2313 |
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); |
| 2314 |
} |
| 2315 |
return n; |
| 2316 |
}, _extends.apply(null, arguments); |
| 2317 |
} |
| 2318 |
var init_extends = __esmMin((() => {})); |
| 2319 |
|
| 2320 |
//#endregion |
| 2321 |
//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js |
| 2322 |
function _arrayLikeToArray$1(r, a) { |
| 2323 |
(null == a || a > r.length) && (a = r.length); |
| 2324 |
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; |
| 2325 |
return n; |
| 2326 |
} |
| 2327 |
var init_arrayLikeToArray = __esmMin((() => { |
| 2328 |
__name(_arrayLikeToArray$1, "_arrayLikeToArray"); |
| 2329 |
})); |
| 2330 |
|
| 2331 |
//#endregion |
| 2332 |
//#region node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js |
| 2333 |
function _arrayWithoutHoles(r) { |
| 2334 |
if (Array.isArray(r)) return _arrayLikeToArray$1(r); |
| 2335 |
} |
| 2336 |
var init_arrayWithoutHoles = __esmMin((() => { |
| 2337 |
init_arrayLikeToArray(); |
| 2338 |
})); |
| 2339 |
|
| 2340 |
//#endregion |
| 2341 |
//#region node_modules/@babel/runtime/helpers/esm/iterableToArray.js |
| 2342 |
function _iterableToArray(r) { |
| 2343 |
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); |
| 2344 |
} |
| 2345 |
var init_iterableToArray = __esmMin((() => {})); |
| 2346 |
|
| 2347 |
//#endregion |
| 2348 |
//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js |
| 2349 |
function _unsupportedIterableToArray$1(r, a) { |
| 2350 |
if (r) { |
| 2351 |
if ("string" == typeof r) return _arrayLikeToArray$1(r, a); |
| 2352 |
var t = {}.toString.call(r).slice(8, -1); |
| 2353 |
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; |
| 2354 |
} |
| 2355 |
} |
| 2356 |
var init_unsupportedIterableToArray = __esmMin((() => { |
| 2357 |
init_arrayLikeToArray(); |
| 2358 |
__name(_unsupportedIterableToArray$1, "_unsupportedIterableToArray"); |
| 2359 |
})); |
| 2360 |
|
| 2361 |
//#endregion |
| 2362 |
//#region node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js |
| 2363 |
function _nonIterableSpread() { |
| 2364 |
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 2365 |
} |
| 2366 |
var init_nonIterableSpread = __esmMin((() => {})); |
| 2367 |
|
| 2368 |
//#endregion |
| 2369 |
//#region node_modules/@babel/runtime/helpers/esm/toConsumableArray.js |
| 2370 |
function _toConsumableArray(r) { |
| 2371 |
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread(); |
| 2372 |
} |
| 2373 |
var init_toConsumableArray = __esmMin((() => { |
| 2374 |
init_arrayWithoutHoles(); |
| 2375 |
init_iterableToArray(); |
| 2376 |
init_unsupportedIterableToArray(); |
| 2377 |
init_nonIterableSpread(); |
| 2378 |
})); |
| 2379 |
|
| 2380 |
//#endregion |
| 2381 |
//#region node_modules/@babel/runtime/helpers/esm/typeof.js |
| 2382 |
function _typeof(o) { |
| 2383 |
"@babel/helpers - typeof"; |
| 2384 |
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { |
| 2385 |
return typeof o; |
| 2386 |
} : function(o) { |
| 2387 |
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 2388 |
}, _typeof(o); |
| 2389 |
} |
| 2390 |
var init_typeof = __esmMin((() => {})); |
| 2391 |
|
| 2392 |
//#endregion |
| 2393 |
//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js |
| 2394 |
function toPrimitive(t, r) { |
| 2395 |
if ("object" != _typeof(t) || !t) return t; |
| 2396 |
var e = t[Symbol.toPrimitive]; |
| 2397 |
if (void 0 !== e) { |
| 2398 |
var i = e.call(t, r || "default"); |
| 2399 |
if ("object" != _typeof(i)) return i; |
| 2400 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 2401 |
} |
| 2402 |
return ("string" === r ? String : Number)(t); |
| 2403 |
} |
| 2404 |
var init_toPrimitive = __esmMin((() => { |
| 2405 |
init_typeof(); |
| 2406 |
})); |
| 2407 |
|
| 2408 |
//#endregion |
| 2409 |
//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js |
| 2410 |
function toPropertyKey(t) { |
| 2411 |
var i = toPrimitive(t, "string"); |
| 2412 |
return "symbol" == _typeof(i) ? i : i + ""; |
| 2413 |
} |
| 2414 |
var init_toPropertyKey = __esmMin((() => { |
| 2415 |
init_typeof(); |
| 2416 |
init_toPrimitive(); |
| 2417 |
})); |
| 2418 |
|
| 2419 |
//#endregion |
| 2420 |
//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js |
| 2421 |
function _defineProperty(e, r, t) { |
| 2422 |
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { |
| 2423 |
value: t, |
| 2424 |
enumerable: !0, |
| 2425 |
configurable: !0, |
| 2426 |
writable: !0 |
| 2427 |
}) : e[r] = t, e; |
| 2428 |
} |
| 2429 |
var init_defineProperty = __esmMin((() => { |
| 2430 |
init_toPropertyKey(); |
| 2431 |
})); |
| 2432 |
|
| 2433 |
//#endregion |
| 2434 |
//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js |
| 2435 |
function _arrayWithHoles(r) { |
| 2436 |
if (Array.isArray(r)) return r; |
| 2437 |
} |
| 2438 |
var init_arrayWithHoles = __esmMin((() => {})); |
| 2439 |
|
| 2440 |
//#endregion |
| 2441 |
//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js |
| 2442 |
function _iterableToArrayLimit(r, l) { |
| 2443 |
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; |
| 2444 |
if (null != t) { |
| 2445 |
var e; |
| 2446 |
var n; |
| 2447 |
var i; |
| 2448 |
var u; |
| 2449 |
var a = []; |
| 2450 |
var f = !0; |
| 2451 |
var o = !1; |
| 2452 |
try { |
| 2453 |
if (i = (t = t.call(r)).next, 0 === l) { |
| 2454 |
if (Object(t) !== t) return; |
| 2455 |
f = !1; |
| 2456 |
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); |
| 2457 |
} catch (r) { |
| 2458 |
o = !0, n = r; |
| 2459 |
} finally { |
| 2460 |
try { |
| 2461 |
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; |
| 2462 |
} finally { |
| 2463 |
if (o) throw n; |
| 2464 |
} |
| 2465 |
} |
| 2466 |
return a; |
| 2467 |
} |
| 2468 |
} |
| 2469 |
var init_iterableToArrayLimit = __esmMin((() => {})); |
| 2470 |
|
| 2471 |
//#endregion |
| 2472 |
//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js |
| 2473 |
function _nonIterableRest() { |
| 2474 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 2475 |
} |
| 2476 |
var init_nonIterableRest = __esmMin((() => {})); |
| 2477 |
|
| 2478 |
//#endregion |
| 2479 |
//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js |
| 2480 |
function _slicedToArray(r, e) { |
| 2481 |
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$1(r, e) || _nonIterableRest(); |
| 2482 |
} |
| 2483 |
var init_slicedToArray = __esmMin((() => { |
| 2484 |
init_arrayWithHoles(); |
| 2485 |
init_iterableToArrayLimit(); |
| 2486 |
init_unsupportedIterableToArray(); |
| 2487 |
init_nonIterableRest(); |
| 2488 |
})); |
| 2489 |
|
| 2490 |
//#endregion |
| 2491 |
//#region modules/styleguide/assets/js/frontend/hooks/use-debounced-callback.js |
| 2492 |
function useDebouncedCallback(callback, wait) { |
| 2493 |
var timeout = (0, react.useRef)(); |
| 2494 |
return (0, react.useCallback)(function() { |
| 2495 |
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; |
| 2496 |
var later = function later() { |
| 2497 |
clearTimeout(timeout.current); |
| 2498 |
callback.apply(void 0, args); |
| 2499 |
}; |
| 2500 |
clearTimeout(timeout.current); |
| 2501 |
timeout.current = setTimeout(later, wait); |
| 2502 |
}, [callback, wait]); |
| 2503 |
} |
| 2504 |
var init_use_debounced_callback = __esmMin((() => {})); |
| 2505 |
|
| 2506 |
//#endregion |
| 2507 |
//#region modules/styleguide/assets/js/frontend/contexts/settings.js |
| 2508 |
function ownKeys$1(e, r) { |
| 2509 |
var t = Object.keys(e); |
| 2510 |
if (Object.getOwnPropertySymbols) { |
| 2511 |
var o = Object.getOwnPropertySymbols(e); |
| 2512 |
r && (o = o.filter(function(r) { |
| 2513 |
return Object.getOwnPropertyDescriptor(e, r).enumerable; |
| 2514 |
})), t.push.apply(t, o); |
| 2515 |
} |
| 2516 |
return t; |
| 2517 |
} |
| 2518 |
function _objectSpread$1(e) { |
| 2519 |
for (var r = 1; r < arguments.length; r++) { |
| 2520 |
var t = null != arguments[r] ? arguments[r] : {}; |
| 2521 |
r % 2 ? ownKeys$1(Object(t), !0).forEach(function(r) { |
| 2522 |
_defineProperty(e, r, t[r]); |
| 2523 |
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r) { |
| 2524 |
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); |
| 2525 |
}); |
| 2526 |
} |
| 2527 |
return e; |
| 2528 |
} |
| 2529 |
function _createForOfIteratorHelper(r, e) { |
| 2530 |
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; |
| 2531 |
if (!t) { |
| 2532 |
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { |
| 2533 |
t && (r = t); |
| 2534 |
var _n = 0; |
| 2535 |
var F = function F() {}; |
| 2536 |
return { |
| 2537 |
s: F, |
| 2538 |
n: function n() { |
| 2539 |
return _n >= r.length ? { done: !0 } : { |
| 2540 |
done: !1, |
| 2541 |
value: r[_n++] |
| 2542 |
}; |
| 2543 |
}, |
| 2544 |
e: function e(r) { |
| 2545 |
throw r; |
| 2546 |
}, |
| 2547 |
f: F |
| 2548 |
}; |
| 2549 |
} |
| 2550 |
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 2551 |
} |
| 2552 |
var o; |
| 2553 |
var a = !0; |
| 2554 |
var u = !1; |
| 2555 |
return { |
| 2556 |
s: function s() { |
| 2557 |
t = t.call(r); |
| 2558 |
}, |
| 2559 |
n: function n() { |
| 2560 |
var r = t.next(); |
| 2561 |
return a = r.done, r; |
| 2562 |
}, |
| 2563 |
e: function e(r) { |
| 2564 |
u = !0, o = r; |
| 2565 |
}, |
| 2566 |
f: function f() { |
| 2567 |
try { |
| 2568 |
a || null == t.return || t.return(); |
| 2569 |
} finally { |
| 2570 |
if (u) throw o; |
| 2571 |
} |
| 2572 |
} |
| 2573 |
}; |
| 2574 |
} |
| 2575 |
function _unsupportedIterableToArray(r, a) { |
| 2576 |
if (r) { |
| 2577 |
if ("string" == typeof r) return _arrayLikeToArray(r, a); |
| 2578 |
var t = {}.toString.call(r).slice(8, -1); |
| 2579 |
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; |
| 2580 |
} |
| 2581 |
} |
| 2582 |
function _arrayLikeToArray(r, a) { |
| 2583 |
(null == a || a > r.length) && (a = r.length); |
| 2584 |
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; |
| 2585 |
return n; |
| 2586 |
} |
| 2587 |
var SettingsContext, useSettings, SettingsProvider; |
| 2588 |
var init_settings = __esmMin((() => { |
| 2589 |
init_extends(); |
| 2590 |
init_toConsumableArray(); |
| 2591 |
init_defineProperty(); |
| 2592 |
init_slicedToArray(); |
| 2593 |
init_use_debounced_callback(); |
| 2594 |
__name(ownKeys$1, "ownKeys"); |
| 2595 |
__name(_objectSpread$1, "_objectSpread"); |
| 2596 |
SettingsContext = (0, react.createContext)(null); |
| 2597 |
useSettings = function useSettings() { |
| 2598 |
return (0, react.useContext)(SettingsContext); |
| 2599 |
}; |
| 2600 |
SettingsProvider = function SettingsProvider(props) { |
| 2601 |
var _useState2 = _slicedToArray((0, react.useState)("idle"), 2); |
| 2602 |
var status = _useState2[0]; |
| 2603 |
var setStatus = _useState2[1]; |
| 2604 |
var _useState4 = _slicedToArray((0, react.useState)(/* @__PURE__ */ new Map()), 2); |
| 2605 |
var settings = _useState4[0]; |
| 2606 |
var _setSettings = _useState4[1]; |
| 2607 |
var settingsRef = (0, react.useRef)(settings); |
| 2608 |
var setSettings = function setSettings(newSettings) { |
| 2609 |
settingsRef.current = newSettings; |
| 2610 |
_setSettings(newSettings); |
| 2611 |
}; |
| 2612 |
(0, react.useEffect)(function() { |
| 2613 |
setStatus("loaded"); |
| 2614 |
}, [settings]); |
| 2615 |
var getInitialSettings = function getInitialSettings() { |
| 2616 |
setStatus("loading"); |
| 2617 |
var kitSettings = elementor.documents.getCurrent().config.settings.settings; |
| 2618 |
setSettings(/* @__PURE__ */ new Map([ |
| 2619 |
["colors", /* @__PURE__ */ new Map([["system_colors", kitSettings.system_colors], ["custom_colors", kitSettings.custom_colors]])], |
| 2620 |
["fonts", /* @__PURE__ */ new Map([ |
| 2621 |
["system_typography", kitSettings.system_typography], |
| 2622 |
["custom_typography", kitSettings.custom_typography], |
| 2623 |
["fallback_font", kitSettings.default_generic_fonts] |
| 2624 |
])], |
| 2625 |
["config", /* @__PURE__ */ new Map([["is_debug", elementorCommon.config.isElementorDebug]])] |
| 2626 |
])); |
| 2627 |
}; |
| 2628 |
var onCommandEvent = (0, react.useCallback)(function(event) { |
| 2629 |
switch (event.detail.command) { |
| 2630 |
case "document/elements/settings": |
| 2631 |
onSettingsChange(event.detail.args); |
| 2632 |
break; |
| 2633 |
case "document/repeater/insert": |
| 2634 |
onInsert(event.detail.args); |
| 2635 |
break; |
| 2636 |
case "document/repeater/remove": |
| 2637 |
onRemove(event.detail.args); |
| 2638 |
break; |
| 2639 |
default: break; |
| 2640 |
} |
| 2641 |
}, []); |
| 2642 |
/** |
| 2643 |
* Triggered when a color or font is changed. |
| 2644 |
* Has a 100ms debounce. |
| 2645 |
* |
| 2646 |
* @param {{container: {model: {attributes: {name: string}}, id: number}, settings: {}}} args |
| 2647 |
*/ |
| 2648 |
var onSettingsChange = useDebouncedCallback(function(args) { |
| 2649 |
var name = args.container.model.attributes.name; |
| 2650 |
var newSettings = new Map(settingsRef.current); |
| 2651 |
var _iterator = _createForOfIteratorHelper(newSettings.entries()); |
| 2652 |
var _step; |
| 2653 |
try { |
| 2654 |
for (_iterator.s(); !(_step = _iterator.n()).done;) { |
| 2655 |
var _step$value = _slicedToArray(_step.value, 2); |
| 2656 |
var group = _step$value[0]; |
| 2657 |
var groupSettings = _step$value[1]; |
| 2658 |
if (!groupSettings.has(name)) continue; |
| 2659 |
if (Array.isArray(groupSettings.get(name))) { |
| 2660 |
var index = groupSettings.get(name).findIndex(function(item) { |
| 2661 |
return item._id === args.container.id; |
| 2662 |
}); |
| 2663 |
if (-1 === index) return; |
| 2664 |
newSettings.get(group).get(name)[index] = _objectSpread$1(_objectSpread$1({}, groupSettings.get(name)[index]), args.settings); |
| 2665 |
} else newSettings.get(group).set(name, args.settings); |
| 2666 |
} |
| 2667 |
} catch (err) { |
| 2668 |
_iterator.e(err); |
| 2669 |
} finally { |
| 2670 |
_iterator.f(); |
| 2671 |
} |
| 2672 |
setSettings(newSettings); |
| 2673 |
}, 100); |
| 2674 |
/** |
| 2675 |
* Triggered when a new custom color or font is created. |
| 2676 |
* |
| 2677 |
* @param {{name: string, model: string, options: {at: number}}} args |
| 2678 |
*/ |
| 2679 |
var onInsert = function onInsert(args) { |
| 2680 |
var name = args.name; |
| 2681 |
var newSettings = new Map(settingsRef.current); |
| 2682 |
var _iterator2 = _createForOfIteratorHelper(newSettings.entries()); |
| 2683 |
var _step2; |
| 2684 |
try { |
| 2685 |
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { |
| 2686 |
var _args$options; |
| 2687 |
var _step2$value = _slicedToArray(_step2.value, 2); |
| 2688 |
var group = _step2$value[0]; |
| 2689 |
var groupSettings = _step2$value[1]; |
| 2690 |
if (!groupSettings.has(name)) continue; |
| 2691 |
var newArray = _toConsumableArray(groupSettings.get(name)); |
| 2692 |
var at = void 0 === ((_args$options = args.options) === null || _args$options === void 0 ? void 0 : _args$options.at) ? newArray.length : args.options.at; |
| 2693 |
newSettings.get(group).set(name, [].concat(_toConsumableArray(newArray.slice(0, at)), [args.model], _toConsumableArray(newArray.slice(at)))); |
| 2694 |
} |
| 2695 |
} catch (err) { |
| 2696 |
_iterator2.e(err); |
| 2697 |
} finally { |
| 2698 |
_iterator2.f(); |
| 2699 |
} |
| 2700 |
setSettings(newSettings); |
| 2701 |
}; |
| 2702 |
/** |
| 2703 |
* Triggered when a custom color or font is removed. |
| 2704 |
* |
| 2705 |
* @param {{name: string, index: number}} args |
| 2706 |
*/ |
| 2707 |
var onRemove = function onRemove(args) { |
| 2708 |
var name = args.name; |
| 2709 |
var newSettings = new Map(settingsRef.current); |
| 2710 |
var _iterator3 = _createForOfIteratorHelper(newSettings.entries()); |
| 2711 |
var _step3; |
| 2712 |
try { |
| 2713 |
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { |
| 2714 |
var _step3$value = _slicedToArray(_step3.value, 2); |
| 2715 |
var group = _step3$value[0]; |
| 2716 |
var groupSettings = _step3$value[1]; |
| 2717 |
if (!groupSettings.has(name)) continue; |
| 2718 |
var newArray = _toConsumableArray(groupSettings.get(name)); |
| 2719 |
newSettings.get(group).set(name, newArray.filter(function(item, index) { |
| 2720 |
return index !== args.index; |
| 2721 |
})); |
| 2722 |
} |
| 2723 |
} catch (err) { |
| 2724 |
_iterator3.e(err); |
| 2725 |
} finally { |
| 2726 |
_iterator3.f(); |
| 2727 |
} |
| 2728 |
setSettings(newSettings); |
| 2729 |
}; |
| 2730 |
(0, react.useEffect)(function() { |
| 2731 |
getInitialSettings(); |
| 2732 |
window.top.addEventListener("elementor/commands/run/after", onCommandEvent, { passive: true }); |
| 2733 |
return function() { |
| 2734 |
window.top.removeEventListener("elementor/commands/run/after", onCommandEvent); |
| 2735 |
}; |
| 2736 |
}, []); |
| 2737 |
var value = { |
| 2738 |
settings, |
| 2739 |
isReady: "loaded" === status |
| 2740 |
}; |
| 2741 |
return /*#__PURE__*/ react.default.createElement(SettingsContext.Provider, _extends({ value }, props)); |
| 2742 |
}; |
| 2743 |
})); |
| 2744 |
|
| 2745 |
//#endregion |
| 2746 |
//#region modules/styleguide/assets/js/frontend/hooks/use-intersection-observer.js |
| 2747 |
function useIntersectionObserver(callback) { |
| 2748 |
var observer; |
| 2749 |
var elements = []; |
| 2750 |
(0, react.useEffect)(function() { |
| 2751 |
observer = new IntersectionObserver(function(entries) { |
| 2752 |
var intersectingArea = entries.find(function(entry) { |
| 2753 |
return entry.isIntersecting; |
| 2754 |
}); |
| 2755 |
if (intersectingArea) callback(intersectingArea); |
| 2756 |
}, {}); |
| 2757 |
return function() { |
| 2758 |
observer.disconnect(); |
| 2759 |
}; |
| 2760 |
}, []); |
| 2761 |
var observe = function observe() { |
| 2762 |
if (elements.length !== 0) elements.forEach(function(element) { |
| 2763 |
if (element) observer.observe(element); |
| 2764 |
}); |
| 2765 |
}; |
| 2766 |
var unobserve = function unobserve() { |
| 2767 |
if (elements.length !== 0) elements.forEach(function(element) { |
| 2768 |
if (element) observer.unobserve(element); |
| 2769 |
}); |
| 2770 |
}; |
| 2771 |
return { setObservedElements: function setObservedElements(observedElements) { |
| 2772 |
unobserve(); |
| 2773 |
elements = observedElements; |
| 2774 |
observe(); |
| 2775 |
} }; |
| 2776 |
} |
| 2777 |
var init_use_intersection_observer = __esmMin((() => {})); |
| 2778 |
|
| 2779 |
//#endregion |
| 2780 |
//#region modules/styleguide/assets/js/frontend/contexts/active-context.js |
| 2781 |
function ownKeys(e, r) { |
| 2782 |
var t = Object.keys(e); |
| 2783 |
if (Object.getOwnPropertySymbols) { |
| 2784 |
var o = Object.getOwnPropertySymbols(e); |
| 2785 |
r && (o = o.filter(function(r) { |
| 2786 |
return Object.getOwnPropertyDescriptor(e, r).enumerable; |
| 2787 |
})), t.push.apply(t, o); |
| 2788 |
} |
| 2789 |
return t; |
| 2790 |
} |
| 2791 |
function _objectSpread(e) { |
| 2792 |
for (var r = 1; r < arguments.length; r++) { |
| 2793 |
var t = null != arguments[r] ? arguments[r] : {}; |
| 2794 |
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { |
| 2795 |
_defineProperty(e, r, t[r]); |
| 2796 |
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { |
| 2797 |
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); |
| 2798 |
}); |
| 2799 |
} |
| 2800 |
return e; |
| 2801 |
} |
| 2802 |
function useActiveContext() { |
| 2803 |
return (0, react.useContext)(ActiveContext); |
| 2804 |
} |
| 2805 |
var ActiveContext, ActiveProvider; |
| 2806 |
var init_active_context = __esmMin((() => { |
| 2807 |
init_extends(); |
| 2808 |
init_defineProperty(); |
| 2809 |
init_slicedToArray(); |
| 2810 |
init_settings(); |
| 2811 |
init_use_intersection_observer(); |
| 2812 |
ActiveContext = (0, react.createContext)(null); |
| 2813 |
ActiveProvider = function ActiveProvider(props) { |
| 2814 |
var _useState2 = _slicedToArray((0, react.useState)({ |
| 2815 |
element: "", |
| 2816 |
area: "" |
| 2817 |
}), 2); |
| 2818 |
var active = _useState2[0]; |
| 2819 |
var setActive = _useState2[1]; |
| 2820 |
var colorsAreaRef = (0, react.useRef)(null); |
| 2821 |
var fontsAreaRef = (0, react.useRef)(null); |
| 2822 |
var isReady = useSettings().isReady; |
| 2823 |
var setObservedElements = useIntersectionObserver(function(intersectingArea) { |
| 2824 |
if (colorsAreaRef.current === intersectingArea.target) { |
| 2825 |
activateArea("colors", { scroll: false }); |
| 2826 |
return; |
| 2827 |
} |
| 2828 |
if (fontsAreaRef.current === intersectingArea.target) activateArea("fonts", { scroll: false }); |
| 2829 |
}).setObservedElements; |
| 2830 |
var activateElement = function activateElement(type, source, id) { |
| 2831 |
if ("color" === source) window.top.$e.route("panel/global/global-colors", { activeControl: "".concat(type, "/").concat(id, "/color") }, { history: false }); |
| 2832 |
if ("typography" === source) window.top.$e.route("panel/global/global-typography", { activeControl: "".concat(type, "/").concat(id, "/typography_typography") }, { history: false }); |
| 2833 |
}; |
| 2834 |
var getElementControl = function getElementControl(type, source, id) { |
| 2835 |
if ("color" === source) return "".concat(type, "/").concat(id, "/color"); |
| 2836 |
if ("typography" === source) return "".concat(type, "/").concat(id, "/typography_typography"); |
| 2837 |
}; |
| 2838 |
var activateArea = function activateArea(area) { |
| 2839 |
var _ref$scroll = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).scroll; |
| 2840 |
if (_ref$scroll === void 0 ? true : _ref$scroll) scrollToArea(area); |
| 2841 |
setActive(function(prevState) { |
| 2842 |
return _objectSpread(_objectSpread({}, prevState), {}, { area }); |
| 2843 |
}); |
| 2844 |
}; |
| 2845 |
var scrollToArea = function scrollToArea(area) { |
| 2846 |
("colors" === area ? colorsAreaRef : fontsAreaRef).current.scrollIntoView({ |
| 2847 |
behavior: "smooth", |
| 2848 |
block: "start", |
| 2849 |
inline: "start" |
| 2850 |
}); |
| 2851 |
}; |
| 2852 |
(0, react.useEffect)(function() { |
| 2853 |
if (window.top.$e.routes.is("panel/global/global-colors")) scrollToArea("colors"); |
| 2854 |
if (window.top.$e.routes.is("panel/global/global-typography")) scrollToArea("fonts"); |
| 2855 |
}, []); |
| 2856 |
(0, react.useEffect)(function() { |
| 2857 |
if (!isReady) return; |
| 2858 |
setObservedElements([colorsAreaRef.current, fontsAreaRef.current]); |
| 2859 |
window.top.$e.routes.on("run:after", function(component, route, args) { |
| 2860 |
if ("panel/global/global-typography" === route) setActive(function() { |
| 2861 |
return { |
| 2862 |
area: "fonts", |
| 2863 |
element: args.activeControl |
| 2864 |
}; |
| 2865 |
}); |
| 2866 |
if ("panel/global/global-colors" === route) setActive(function() { |
| 2867 |
return { |
| 2868 |
area: "colors", |
| 2869 |
element: args.activeControl |
| 2870 |
}; |
| 2871 |
}); |
| 2872 |
}); |
| 2873 |
}, [isReady]); |
| 2874 |
var value = { |
| 2875 |
activeElement: active.element, |
| 2876 |
activeArea: active.area, |
| 2877 |
activateElement, |
| 2878 |
activateArea, |
| 2879 |
colorsAreaRef, |
| 2880 |
fontsAreaRef, |
| 2881 |
getElementControl |
| 2882 |
}; |
| 2883 |
return /*#__PURE__*/ react.default.createElement(ActiveContext.Provider, _extends({ value }, props)); |
| 2884 |
}; |
| 2885 |
})); |
| 2886 |
|
| 2887 |
//#endregion |
| 2888 |
//#region node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js |
| 2889 |
/** @license React v16.13.1 |
| 2890 |
* react-is.development.js |
| 2891 |
* |
| 2892 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 2893 |
* |
| 2894 |
* This source code is licensed under the MIT license found in the |
| 2895 |
* LICENSE file in the root directory of this source tree. |
| 2896 |
*/ |
| 2897 |
var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => { |
| 2898 |
(function() { |
| 2899 |
"use strict"; |
| 2900 |
var hasSymbol = typeof Symbol === "function" && Symbol.for; |
| 2901 |
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103; |
| 2902 |
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106; |
| 2903 |
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107; |
| 2904 |
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108; |
| 2905 |
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114; |
| 2906 |
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109; |
| 2907 |
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110; |
| 2908 |
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111; |
| 2909 |
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111; |
| 2910 |
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112; |
| 2911 |
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113; |
| 2912 |
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120; |
| 2913 |
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115; |
| 2914 |
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116; |
| 2915 |
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121; |
| 2916 |
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117; |
| 2917 |
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118; |
| 2918 |
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119; |
| 2919 |
function isValidElementType(type) { |
| 2920 |
return typeof type === "string" || typeof type === "function" || type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); |
| 2921 |
} |
| 2922 |
function typeOf(object) { |
| 2923 |
if (typeof object === "object" && object !== null) { |
| 2924 |
var $$typeof = object.$$typeof; |
| 2925 |
switch ($$typeof) { |
| 2926 |
case REACT_ELEMENT_TYPE: |
| 2927 |
var type = object.type; |
| 2928 |
switch (type) { |
| 2929 |
case REACT_ASYNC_MODE_TYPE: |
| 2930 |
case REACT_CONCURRENT_MODE_TYPE: |
| 2931 |
case REACT_FRAGMENT_TYPE: |
| 2932 |
case REACT_PROFILER_TYPE: |
| 2933 |
case REACT_STRICT_MODE_TYPE: |
| 2934 |
case REACT_SUSPENSE_TYPE: return type; |
| 2935 |
default: |
| 2936 |
var $$typeofType = type && type.$$typeof; |
| 2937 |
switch ($$typeofType) { |
| 2938 |
case REACT_CONTEXT_TYPE: |
| 2939 |
case REACT_FORWARD_REF_TYPE: |
| 2940 |
case REACT_LAZY_TYPE: |
| 2941 |
case REACT_MEMO_TYPE: |
| 2942 |
case REACT_PROVIDER_TYPE: return $$typeofType; |
| 2943 |
default: return $$typeof; |
| 2944 |
} |
| 2945 |
} |
| 2946 |
case REACT_PORTAL_TYPE: return $$typeof; |
| 2947 |
} |
| 2948 |
} |
| 2949 |
} |
| 2950 |
var AsyncMode = REACT_ASYNC_MODE_TYPE; |
| 2951 |
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; |
| 2952 |
var ContextConsumer = REACT_CONTEXT_TYPE; |
| 2953 |
var ContextProvider = REACT_PROVIDER_TYPE; |
| 2954 |
var Element = REACT_ELEMENT_TYPE; |
| 2955 |
var ForwardRef = REACT_FORWARD_REF_TYPE; |
| 2956 |
var Fragment = REACT_FRAGMENT_TYPE; |
| 2957 |
var Lazy = REACT_LAZY_TYPE; |
| 2958 |
var Memo = REACT_MEMO_TYPE; |
| 2959 |
var Portal = REACT_PORTAL_TYPE; |
| 2960 |
var Profiler = REACT_PROFILER_TYPE; |
| 2961 |
var StrictMode = REACT_STRICT_MODE_TYPE; |
| 2962 |
var Suspense = REACT_SUSPENSE_TYPE; |
| 2963 |
var hasWarnedAboutDeprecatedIsAsyncMode = false; |
| 2964 |
function isAsyncMode(object) { |
| 2965 |
if (!hasWarnedAboutDeprecatedIsAsyncMode) { |
| 2966 |
hasWarnedAboutDeprecatedIsAsyncMode = true; |
| 2967 |
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API."); |
| 2968 |
} |
| 2969 |
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; |
| 2970 |
} |
| 2971 |
function isConcurrentMode(object) { |
| 2972 |
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; |
| 2973 |
} |
| 2974 |
function isContextConsumer(object) { |
| 2975 |
return typeOf(object) === REACT_CONTEXT_TYPE; |
| 2976 |
} |
| 2977 |
function isContextProvider(object) { |
| 2978 |
return typeOf(object) === REACT_PROVIDER_TYPE; |
| 2979 |
} |
| 2980 |
function isElement(object) { |
| 2981 |
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; |
| 2982 |
} |
| 2983 |
function isForwardRef(object) { |
| 2984 |
return typeOf(object) === REACT_FORWARD_REF_TYPE; |
| 2985 |
} |
| 2986 |
function isFragment(object) { |
| 2987 |
return typeOf(object) === REACT_FRAGMENT_TYPE; |
| 2988 |
} |
| 2989 |
function isLazy(object) { |
| 2990 |
return typeOf(object) === REACT_LAZY_TYPE; |
| 2991 |
} |
| 2992 |
function isMemo(object) { |
| 2993 |
return typeOf(object) === REACT_MEMO_TYPE; |
| 2994 |
} |
| 2995 |
function isPortal(object) { |
| 2996 |
return typeOf(object) === REACT_PORTAL_TYPE; |
| 2997 |
} |
| 2998 |
function isProfiler(object) { |
| 2999 |
return typeOf(object) === REACT_PROFILER_TYPE; |
| 3000 |
} |
| 3001 |
function isStrictMode(object) { |
| 3002 |
return typeOf(object) === REACT_STRICT_MODE_TYPE; |
| 3003 |
} |
| 3004 |
function isSuspense(object) { |
| 3005 |
return typeOf(object) === REACT_SUSPENSE_TYPE; |
| 3006 |
} |
| 3007 |
exports.AsyncMode = AsyncMode; |
| 3008 |
exports.ConcurrentMode = ConcurrentMode; |
| 3009 |
exports.ContextConsumer = ContextConsumer; |
| 3010 |
exports.ContextProvider = ContextProvider; |
| 3011 |
exports.Element = Element; |
| 3012 |
exports.ForwardRef = ForwardRef; |
| 3013 |
exports.Fragment = Fragment; |
| 3014 |
exports.Lazy = Lazy; |
| 3015 |
exports.Memo = Memo; |
| 3016 |
exports.Portal = Portal; |
| 3017 |
exports.Profiler = Profiler; |
| 3018 |
exports.StrictMode = StrictMode; |
| 3019 |
exports.Suspense = Suspense; |
| 3020 |
exports.isAsyncMode = isAsyncMode; |
| 3021 |
exports.isConcurrentMode = isConcurrentMode; |
| 3022 |
exports.isContextConsumer = isContextConsumer; |
| 3023 |
exports.isContextProvider = isContextProvider; |
| 3024 |
exports.isElement = isElement; |
| 3025 |
exports.isForwardRef = isForwardRef; |
| 3026 |
exports.isFragment = isFragment; |
| 3027 |
exports.isLazy = isLazy; |
| 3028 |
exports.isMemo = isMemo; |
| 3029 |
exports.isPortal = isPortal; |
| 3030 |
exports.isProfiler = isProfiler; |
| 3031 |
exports.isStrictMode = isStrictMode; |
| 3032 |
exports.isSuspense = isSuspense; |
| 3033 |
exports.isValidElementType = isValidElementType; |
| 3034 |
exports.typeOf = typeOf; |
| 3035 |
})(); |
| 3036 |
})); |
| 3037 |
|
| 3038 |
//#endregion |
| 3039 |
//#region node_modules/prop-types/node_modules/react-is/index.js |
| 3040 |
var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 3041 |
module.exports = require_react_is_development(); |
| 3042 |
})); |
| 3043 |
|
| 3044 |
//#endregion |
| 3045 |
//#region node_modules/object-assign/index.js |
| 3046 |
/* |
| 3047 |
object-assign |
| 3048 |
(c) Sindre Sorhus |
| 3049 |
@license MIT |
| 3050 |
*/ |
| 3051 |
var require_object_assign = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 3052 |
var getOwnPropertySymbols = Object.getOwnPropertySymbols; |
| 3053 |
var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 3054 |
var propIsEnumerable = Object.prototype.propertyIsEnumerable; |
| 3055 |
function toObject(val) { |
| 3056 |
if (val === null || val === void 0) throw new TypeError("Object.assign cannot be called with null or undefined"); |
| 3057 |
return Object(val); |
| 3058 |
} |
| 3059 |
function shouldUseNative() { |
| 3060 |
try { |
| 3061 |
if (!Object.assign) return false; |
| 3062 |
var test1 = /* @__PURE__ */ new String("abc"); |
| 3063 |
test1[5] = "de"; |
| 3064 |
if (Object.getOwnPropertyNames(test1)[0] === "5") return false; |
| 3065 |
var test2 = {}; |
| 3066 |
for (var i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i; |
| 3067 |
if (Object.getOwnPropertyNames(test2).map(function(n) { |
| 3068 |
return test2[n]; |
| 3069 |
}).join("") !== "0123456789") return false; |
| 3070 |
var test3 = {}; |
| 3071 |
"abcdefghijklmnopqrst".split("").forEach(function(letter) { |
| 3072 |
test3[letter] = letter; |
| 3073 |
}); |
| 3074 |
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") return false; |
| 3075 |
return true; |
| 3076 |
} catch (err) { |
| 3077 |
return false; |
| 3078 |
} |
| 3079 |
} |
| 3080 |
module.exports = shouldUseNative() ? Object.assign : function(target, source) { |
| 3081 |
var from; |
| 3082 |
var to = toObject(target); |
| 3083 |
var symbols; |
| 3084 |
for (var s = 1; s < arguments.length; s++) { |
| 3085 |
from = Object(arguments[s]); |
| 3086 |
for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key]; |
| 3087 |
if (getOwnPropertySymbols) { |
| 3088 |
symbols = getOwnPropertySymbols(from); |
| 3089 |
for (var i = 0; i < symbols.length; i++) if (propIsEnumerable.call(from, symbols[i])) to[symbols[i]] = from[symbols[i]]; |
| 3090 |
} |
| 3091 |
} |
| 3092 |
return to; |
| 3093 |
}; |
| 3094 |
})); |
| 3095 |
|
| 3096 |
//#endregion |
| 3097 |
//#region node_modules/prop-types/lib/ReactPropTypesSecret.js |
| 3098 |
/** |
| 3099 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 3100 |
* |
| 3101 |
* This source code is licensed under the MIT license found in the |
| 3102 |
* LICENSE file in the root directory of this source tree. |
| 3103 |
*/ |
| 3104 |
var require_ReactPropTypesSecret = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 3105 |
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; |
| 3106 |
module.exports = ReactPropTypesSecret; |
| 3107 |
})); |
| 3108 |
|
| 3109 |
//#endregion |
| 3110 |
//#region node_modules/prop-types/lib/has.js |
| 3111 |
var require_has = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 3112 |
module.exports = Function.call.bind(Object.prototype.hasOwnProperty); |
| 3113 |
})); |
| 3114 |
|
| 3115 |
//#endregion |
| 3116 |
//#region node_modules/prop-types/checkPropTypes.js |
| 3117 |
/** |
| 3118 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 3119 |
* |
| 3120 |
* This source code is licensed under the MIT license found in the |
| 3121 |
* LICENSE file in the root directory of this source tree. |
| 3122 |
*/ |
| 3123 |
var require_checkPropTypes = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 3124 |
var printWarning = function() {}; |
| 3125 |
var ReactPropTypesSecret = require_ReactPropTypesSecret(); |
| 3126 |
var loggedTypeFailures = {}; |
| 3127 |
var has = require_has(); |
| 3128 |
printWarning = function(text) { |
| 3129 |
var message = "Warning: " + text; |
| 3130 |
if (typeof console !== "undefined") console.error(message); |
| 3131 |
try { |
| 3132 |
throw new Error(message); |
| 3133 |
} catch (x) {} |
| 3134 |
}; |
| 3135 |
/** |
| 3136 |
* Assert that the values match with the type specs. |
| 3137 |
* Error messages are memorized and will only be shown once. |
| 3138 |
* |
| 3139 |
* @param {object} typeSpecs Map of name to a ReactPropType |
| 3140 |
* @param {object} values Runtime values that need to be type-checked |
| 3141 |
* @param {string} location e.g. "prop", "context", "child context" |
| 3142 |
* @param {string} componentName Name of the component for error messages. |
| 3143 |
* @param {?Function} getStack Returns the component stack. |
| 3144 |
* @private |
| 3145 |
*/ |
| 3146 |
function checkPropTypes(typeSpecs, values, location, componentName, getStack) { |
| 3147 |
for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) { |
| 3148 |
var error; |
| 3149 |
try { |
| 3150 |
if (typeof typeSpecs[typeSpecName] !== "function") { |
| 3151 |
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); |
| 3152 |
err.name = "Invariant Violation"; |
| 3153 |
throw err; |
| 3154 |
} |
| 3155 |
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); |
| 3156 |
} catch (ex) { |
| 3157 |
error = ex; |
| 3158 |
} |
| 3159 |
if (error && !(error instanceof Error)) printWarning((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."); |
| 3160 |
if (error instanceof Error && !(error.message in loggedTypeFailures)) { |
| 3161 |
loggedTypeFailures[error.message] = true; |
| 3162 |
var stack = getStack ? getStack() : ""; |
| 3163 |
printWarning("Failed " + location + " type: " + error.message + (stack != null ? stack : "")); |
| 3164 |
} |
| 3165 |
} |
| 3166 |
} |
| 3167 |
/** |
| 3168 |
* Resets warning cache when testing. |
| 3169 |
* |
| 3170 |
* @private |
| 3171 |
*/ |
| 3172 |
checkPropTypes.resetWarningCache = function() { |
| 3173 |
loggedTypeFailures = {}; |
| 3174 |
}; |
| 3175 |
module.exports = checkPropTypes; |
| 3176 |
})); |
| 3177 |
|
| 3178 |
//#endregion |
| 3179 |
//#region node_modules/prop-types/factoryWithTypeCheckers.js |
| 3180 |
/** |
| 3181 |
* Copyright (c) 2013-present, Facebook, Inc. |
| 3182 |
* |
| 3183 |
* This source code is licensed under the MIT license found in the |
| 3184 |
* LICENSE file in the root directory of this source tree. |
| 3185 |
*/ |
| 3186 |
var require_factoryWithTypeCheckers = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 3187 |
var ReactIs = require_react_is(); |
| 3188 |
var assign = require_object_assign(); |
| 3189 |
var ReactPropTypesSecret = require_ReactPropTypesSecret(); |
| 3190 |
var has = require_has(); |
| 3191 |
var checkPropTypes = require_checkPropTypes(); |
| 3192 |
var printWarning = function() {}; |
| 3193 |
printWarning = function(text) { |
| 3194 |
var message = "Warning: " + text; |
| 3195 |
if (typeof console !== "undefined") console.error(message); |
| 3196 |
try { |
| 3197 |
throw new Error(message); |
| 3198 |
} catch (x) {} |
| 3199 |
}; |
| 3200 |
function emptyFunctionThatReturnsNull() { |
| 3201 |
return null; |
| 3202 |
} |
| 3203 |
module.exports = function(isValidElement, throwOnDirectAccess) { |
| 3204 |
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; |
| 3205 |
var FAUX_ITERATOR_SYMBOL = "@@iterator"; |
| 3206 |
/** |
| 3207 |
* Returns the iterator method function contained on the iterable object. |
| 3208 |
* |
| 3209 |
* Be sure to invoke the function with the iterable as context: |
| 3210 |
* |
| 3211 |
* var iteratorFn = getIteratorFn(myIterable); |
| 3212 |
* if (iteratorFn) { |
| 3213 |
* var iterator = iteratorFn.call(myIterable); |
| 3214 |
* ... |
| 3215 |
* } |
| 3216 |
* |
| 3217 |
* @param {?object} maybeIterable |
| 3218 |
* @return {?function} |
| 3219 |
*/ |
| 3220 |
function getIteratorFn(maybeIterable) { |
| 3221 |
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); |
| 3222 |
if (typeof iteratorFn === "function") return iteratorFn; |
| 3223 |
} |
| 3224 |
/** |
| 3225 |
* Collection of methods that allow declaration and validation of props that are |
| 3226 |
* supplied to React components. Example usage: |
| 3227 |
* |
| 3228 |
* var Props = require('ReactPropTypes'); |
| 3229 |
* var MyArticle = React.createClass({ |
| 3230 |
* propTypes: { |
| 3231 |
* // An optional string prop named "description". |
| 3232 |
* description: Props.string, |
| 3233 |
* |
| 3234 |
* // A required enum prop named "category". |
| 3235 |
* category: Props.oneOf(['News','Photos']).isRequired, |
| 3236 |
* |
| 3237 |
* // A prop named "dialog" that requires an instance of Dialog. |
| 3238 |
* dialog: Props.instanceOf(Dialog).isRequired |
| 3239 |
* }, |
| 3240 |
* render: function() { ... } |
| 3241 |
* }); |
| 3242 |
* |
| 3243 |
* A more formal specification of how these methods are used: |
| 3244 |
* |
| 3245 |
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) |
| 3246 |
* decl := ReactPropTypes.{type}(.isRequired)? |
| 3247 |
* |
| 3248 |
* Each and every declaration produces a function with the same signature. This |
| 3249 |
* allows the creation of custom validation functions. For example: |
| 3250 |
* |
| 3251 |
* var MyLink = React.createClass({ |
| 3252 |
* propTypes: { |
| 3253 |
* // An optional string or URI prop named "href". |
| 3254 |
* href: function(props, propName, componentName) { |
| 3255 |
* var propValue = props[propName]; |
| 3256 |
* if (propValue != null && typeof propValue !== 'string' && |
| 3257 |
* !(propValue instanceof URI)) { |
| 3258 |
* return new Error( |
| 3259 |
* 'Expected a string or an URI for ' + propName + ' in ' + |
| 3260 |
* componentName |
| 3261 |
* ); |
| 3262 |
* } |
| 3263 |
* } |
| 3264 |
* }, |
| 3265 |
* render: function() {...} |
| 3266 |
* }); |
| 3267 |
* |
| 3268 |
* @internal |
| 3269 |
*/ |
| 3270 |
var ANONYMOUS = "<<anonymous>>"; |
| 3271 |
var ReactPropTypes = { |
| 3272 |
array: createPrimitiveTypeChecker("array"), |
| 3273 |
bigint: createPrimitiveTypeChecker("bigint"), |
| 3274 |
bool: createPrimitiveTypeChecker("boolean"), |
| 3275 |
func: createPrimitiveTypeChecker("function"), |
| 3276 |
number: createPrimitiveTypeChecker("number"), |
| 3277 |
object: createPrimitiveTypeChecker("object"), |
| 3278 |
string: createPrimitiveTypeChecker("string"), |
| 3279 |
symbol: createPrimitiveTypeChecker("symbol"), |
| 3280 |
any: createAnyTypeChecker(), |
| 3281 |
arrayOf: createArrayOfTypeChecker, |
| 3282 |
element: createElementTypeChecker(), |
| 3283 |
elementType: createElementTypeTypeChecker(), |
| 3284 |
instanceOf: createInstanceTypeChecker, |
| 3285 |
node: createNodeChecker(), |
| 3286 |
objectOf: createObjectOfTypeChecker, |
| 3287 |
oneOf: createEnumTypeChecker, |
| 3288 |
oneOfType: createUnionTypeChecker, |
| 3289 |
shape: createShapeTypeChecker, |
| 3290 |
exact: createStrictShapeTypeChecker |
| 3291 |
}; |
| 3292 |
/** |
| 3293 |
* inlined Object.is polyfill to avoid requiring consumers ship their own |
| 3294 |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is |
| 3295 |
*/ |
| 3296 |
function is(x, y) { |
| 3297 |
if (x === y) return x !== 0 || 1 / x === 1 / y; |
| 3298 |
else return x !== x && y !== y; |
| 3299 |
} |
| 3300 |
/** |
| 3301 |
* We use an Error-like object for backward compatibility as people may call |
| 3302 |
* PropTypes directly and inspect their output. However, we don't use real |
| 3303 |
* Errors anymore. We don't inspect their stack anyway, and creating them |
| 3304 |
* is prohibitively expensive if they are created too often, such as what |
| 3305 |
* happens in oneOfType() for any type before the one that matched. |
| 3306 |
*/ |
| 3307 |
function PropTypeError(message, data) { |
| 3308 |
this.message = message; |
| 3309 |
this.data = data && typeof data === "object" ? data : {}; |
| 3310 |
this.stack = ""; |
| 3311 |
} |
| 3312 |
PropTypeError.prototype = Error.prototype; |
| 3313 |
function createChainableTypeChecker(validate) { |
| 3314 |
var manualPropTypeCallCache = {}; |
| 3315 |
var manualPropTypeWarningCount = 0; |
| 3316 |
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { |
| 3317 |
componentName = componentName || ANONYMOUS; |
| 3318 |
propFullName = propFullName || propName; |
| 3319 |
if (secret !== ReactPropTypesSecret) { |
| 3320 |
if (throwOnDirectAccess) { |
| 3321 |
var err = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"); |
| 3322 |
err.name = "Invariant Violation"; |
| 3323 |
throw err; |
| 3324 |
} else if (typeof console !== "undefined") { |
| 3325 |
var cacheKey = componentName + ":" + propName; |
| 3326 |
if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) { |
| 3327 |
printWarning("You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."); |
| 3328 |
manualPropTypeCallCache[cacheKey] = true; |
| 3329 |
manualPropTypeWarningCount++; |
| 3330 |
} |
| 3331 |
} |
| 3332 |
} |
| 3333 |
if (props[propName] == null) { |
| 3334 |
if (isRequired) { |
| 3335 |
if (props[propName] === null) return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`.")); |
| 3336 |
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`.")); |
| 3337 |
} |
| 3338 |
return null; |
| 3339 |
} else return validate(props, propName, componentName, location, propFullName); |
| 3340 |
} |
| 3341 |
var chainedCheckType = checkType.bind(null, false); |
| 3342 |
chainedCheckType.isRequired = checkType.bind(null, true); |
| 3343 |
return chainedCheckType; |
| 3344 |
} |
| 3345 |
function createPrimitiveTypeChecker(expectedType) { |
| 3346 |
function validate(props, propName, componentName, location, propFullName, secret) { |
| 3347 |
var propValue = props[propName]; |
| 3348 |
if (getPropType(propValue) !== expectedType) { |
| 3349 |
var preciseType = getPreciseType(propValue); |
| 3350 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."), { expectedType }); |
| 3351 |
} |
| 3352 |
return null; |
| 3353 |
} |
| 3354 |
return createChainableTypeChecker(validate); |
| 3355 |
} |
| 3356 |
function createAnyTypeChecker() { |
| 3357 |
return createChainableTypeChecker(emptyFunctionThatReturnsNull); |
| 3358 |
} |
| 3359 |
function createArrayOfTypeChecker(typeChecker) { |
| 3360 |
function validate(props, propName, componentName, location, propFullName) { |
| 3361 |
if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf."); |
| 3362 |
var propValue = props[propName]; |
| 3363 |
if (!Array.isArray(propValue)) { |
| 3364 |
var propType = getPropType(propValue); |
| 3365 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array.")); |
| 3366 |
} |
| 3367 |
for (var i = 0; i < propValue.length; i++) { |
| 3368 |
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret); |
| 3369 |
if (error instanceof Error) return error; |
| 3370 |
} |
| 3371 |
return null; |
| 3372 |
} |
| 3373 |
return createChainableTypeChecker(validate); |
| 3374 |
} |
| 3375 |
function createElementTypeChecker() { |
| 3376 |
function validate(props, propName, componentName, location, propFullName) { |
| 3377 |
var propValue = props[propName]; |
| 3378 |
if (!isValidElement(propValue)) { |
| 3379 |
var propType = getPropType(propValue); |
| 3380 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement.")); |
| 3381 |
} |
| 3382 |
return null; |
| 3383 |
} |
| 3384 |
return createChainableTypeChecker(validate); |
| 3385 |
} |
| 3386 |
function createElementTypeTypeChecker() { |
| 3387 |
function validate(props, propName, componentName, location, propFullName) { |
| 3388 |
var propValue = props[propName]; |
| 3389 |
if (!ReactIs.isValidElementType(propValue)) { |
| 3390 |
var propType = getPropType(propValue); |
| 3391 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type.")); |
| 3392 |
} |
| 3393 |
return null; |
| 3394 |
} |
| 3395 |
return createChainableTypeChecker(validate); |
| 3396 |
} |
| 3397 |
function createInstanceTypeChecker(expectedClass) { |
| 3398 |
function validate(props, propName, componentName, location, propFullName) { |
| 3399 |
if (!(props[propName] instanceof expectedClass)) { |
| 3400 |
var expectedClassName = expectedClass.name || ANONYMOUS; |
| 3401 |
var actualClassName = getClassName(props[propName]); |
| 3402 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`.")); |
| 3403 |
} |
| 3404 |
return null; |
| 3405 |
} |
| 3406 |
return createChainableTypeChecker(validate); |
| 3407 |
} |
| 3408 |
function createEnumTypeChecker(expectedValues) { |
| 3409 |
if (!Array.isArray(expectedValues)) { |
| 3410 |
if (arguments.length > 1) printWarning("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."); |
| 3411 |
else printWarning("Invalid argument supplied to oneOf, expected an array."); |
| 3412 |
return emptyFunctionThatReturnsNull; |
| 3413 |
} |
| 3414 |
function validate(props, propName, componentName, location, propFullName) { |
| 3415 |
var propValue = props[propName]; |
| 3416 |
for (var i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null; |
| 3417 |
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { |
| 3418 |
if (getPreciseType(value) === "symbol") return String(value); |
| 3419 |
return value; |
| 3420 |
}); |
| 3421 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + ".")); |
| 3422 |
} |
| 3423 |
return createChainableTypeChecker(validate); |
| 3424 |
} |
| 3425 |
function createObjectOfTypeChecker(typeChecker) { |
| 3426 |
function validate(props, propName, componentName, location, propFullName) { |
| 3427 |
if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf."); |
| 3428 |
var propValue = props[propName]; |
| 3429 |
var propType = getPropType(propValue); |
| 3430 |
if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object.")); |
| 3431 |
for (var key in propValue) if (has(propValue, key)) { |
| 3432 |
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); |
| 3433 |
if (error instanceof Error) return error; |
| 3434 |
} |
| 3435 |
return null; |
| 3436 |
} |
| 3437 |
return createChainableTypeChecker(validate); |
| 3438 |
} |
| 3439 |
function createUnionTypeChecker(arrayOfTypeCheckers) { |
| 3440 |
if (!Array.isArray(arrayOfTypeCheckers)) { |
| 3441 |
printWarning("Invalid argument supplied to oneOfType, expected an instance of array."); |
| 3442 |
return emptyFunctionThatReturnsNull; |
| 3443 |
} |
| 3444 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 3445 |
var checker = arrayOfTypeCheckers[i]; |
| 3446 |
if (typeof checker !== "function") { |
| 3447 |
printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."); |
| 3448 |
return emptyFunctionThatReturnsNull; |
| 3449 |
} |
| 3450 |
} |
| 3451 |
function validate(props, propName, componentName, location, propFullName) { |
| 3452 |
var expectedTypes = []; |
| 3453 |
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { |
| 3454 |
var checker = arrayOfTypeCheckers[i]; |
| 3455 |
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); |
| 3456 |
if (checkerResult == null) return null; |
| 3457 |
if (checkerResult.data && has(checkerResult.data, "expectedType")) expectedTypes.push(checkerResult.data.expectedType); |
| 3458 |
} |
| 3459 |
var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : ""; |
| 3460 |
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + ".")); |
| 3461 |
} |
| 3462 |
return createChainableTypeChecker(validate); |
| 3463 |
} |
| 3464 |
function createNodeChecker() { |
| 3465 |
function validate(props, propName, componentName, location, propFullName) { |
| 3466 |
if (!isNode(props[propName])) return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode.")); |
| 3467 |
return null; |
| 3468 |
} |
| 3469 |
return createChainableTypeChecker(validate); |
| 3470 |
} |
| 3471 |
function invalidValidatorError(componentName, location, propFullName, key, type) { |
| 3472 |
return new PropTypeError((componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."); |
| 3473 |
} |
| 3474 |
function createShapeTypeChecker(shapeTypes) { |
| 3475 |
function validate(props, propName, componentName, location, propFullName) { |
| 3476 |
var propValue = props[propName]; |
| 3477 |
var propType = getPropType(propValue); |
| 3478 |
if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); |
| 3479 |
for (var key in shapeTypes) { |
| 3480 |
var checker = shapeTypes[key]; |
| 3481 |
if (typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 3482 |
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); |
| 3483 |
if (error) return error; |
| 3484 |
} |
| 3485 |
return null; |
| 3486 |
} |
| 3487 |
return createChainableTypeChecker(validate); |
| 3488 |
} |
| 3489 |
function createStrictShapeTypeChecker(shapeTypes) { |
| 3490 |
function validate(props, propName, componentName, location, propFullName) { |
| 3491 |
var propValue = props[propName]; |
| 3492 |
var propType = getPropType(propValue); |
| 3493 |
if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); |
| 3494 |
for (var key in assign({}, props[propName], shapeTypes)) { |
| 3495 |
var checker = shapeTypes[key]; |
| 3496 |
if (has(shapeTypes, key) && typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); |
| 3497 |
if (!checker) return new PropTypeError("Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")); |
| 3498 |
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); |
| 3499 |
if (error) return error; |
| 3500 |
} |
| 3501 |
return null; |
| 3502 |
} |
| 3503 |
return createChainableTypeChecker(validate); |
| 3504 |
} |
| 3505 |
function isNode(propValue) { |
| 3506 |
switch (typeof propValue) { |
| 3507 |
case "number": |
| 3508 |
case "string": |
| 3509 |
case "undefined": return true; |
| 3510 |
case "boolean": return !propValue; |
| 3511 |
case "object": |
| 3512 |
if (Array.isArray(propValue)) return propValue.every(isNode); |
| 3513 |
if (propValue === null || isValidElement(propValue)) return true; |
| 3514 |
var iteratorFn = getIteratorFn(propValue); |
| 3515 |
if (iteratorFn) { |
| 3516 |
var iterator = iteratorFn.call(propValue); |
| 3517 |
var step; |
| 3518 |
if (iteratorFn !== propValue.entries) { |
| 3519 |
while (!(step = iterator.next()).done) if (!isNode(step.value)) return false; |
| 3520 |
} else while (!(step = iterator.next()).done) { |
| 3521 |
var entry = step.value; |
| 3522 |
if (entry) { |
| 3523 |
if (!isNode(entry[1])) return false; |
| 3524 |
} |
| 3525 |
} |
| 3526 |
} else return false; |
| 3527 |
return true; |
| 3528 |
default: return false; |
| 3529 |
} |
| 3530 |
} |
| 3531 |
function isSymbol(propType, propValue) { |
| 3532 |
if (propType === "symbol") return true; |
| 3533 |
if (!propValue) return false; |
| 3534 |
if (propValue["@@toStringTag"] === "Symbol") return true; |
| 3535 |
if (typeof Symbol === "function" && propValue instanceof Symbol) return true; |
| 3536 |
return false; |
| 3537 |
} |
| 3538 |
function getPropType(propValue) { |
| 3539 |
var propType = typeof propValue; |
| 3540 |
if (Array.isArray(propValue)) return "array"; |
| 3541 |
if (propValue instanceof RegExp) return "object"; |
| 3542 |
if (isSymbol(propType, propValue)) return "symbol"; |
| 3543 |
return propType; |
| 3544 |
} |
| 3545 |
function getPreciseType(propValue) { |
| 3546 |
if (typeof propValue === "undefined" || propValue === null) return "" + propValue; |
| 3547 |
var propType = getPropType(propValue); |
| 3548 |
if (propType === "object") { |
| 3549 |
if (propValue instanceof Date) return "date"; |
| 3550 |
else if (propValue instanceof RegExp) return "regexp"; |
| 3551 |
} |
| 3552 |
return propType; |
| 3553 |
} |
| 3554 |
function getPostfixForTypeWarning(value) { |
| 3555 |
var type = getPreciseType(value); |
| 3556 |
switch (type) { |
| 3557 |
case "array": |
| 3558 |
case "object": return "an " + type; |
| 3559 |
case "boolean": |
| 3560 |
case "date": |
| 3561 |
case "regexp": return "a " + type; |
| 3562 |
default: return type; |
| 3563 |
} |
| 3564 |
} |
| 3565 |
function getClassName(propValue) { |
| 3566 |
if (!propValue.constructor || !propValue.constructor.name) return ANONYMOUS; |
| 3567 |
return propValue.constructor.name; |
| 3568 |
} |
| 3569 |
ReactPropTypes.checkPropTypes = checkPropTypes; |
| 3570 |
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; |
| 3571 |
ReactPropTypes.PropTypes = ReactPropTypes; |
| 3572 |
return ReactPropTypes; |
| 3573 |
}; |
| 3574 |
})); |
| 3575 |
|
| 3576 |
//#endregion |
| 3577 |
//#region node_modules/prop-types/index.js |
| 3578 |
var require_prop_types = /* @__PURE__ */ __commonJSMin(((exports, module) => { |
| 3579 |
var ReactIs = require_react_is(); |
| 3580 |
var throwOnDirectAccess = true; |
| 3581 |
module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess); |
| 3582 |
})); |
| 3583 |
|
| 3584 |
//#endregion |
| 3585 |
//#region modules/styleguide/assets/js/frontend/components/global/div-base.js |
| 3586 |
var _templateObject$11, DivBase; |
| 3587 |
var init_div_base = __esmMin((() => { |
| 3588 |
init_taggedTemplateLiteral(); |
| 3589 |
init_styled_components_browser_esm(); |
| 3590 |
; |
| 3591 |
DivBase = dt.div(_templateObject$11 || (_templateObject$11 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n position: relative;\n"]))); |
| 3592 |
})); |
| 3593 |
|
| 3594 |
//#endregion |
| 3595 |
//#region modules/styleguide/assets/js/frontend/components/global/inner-wrapper.js |
| 3596 |
var _templateObject$10, innerWrapper; |
| 3597 |
var init_inner_wrapper = __esmMin((() => { |
| 3598 |
init_taggedTemplateLiteral(); |
| 3599 |
init_styled_components_browser_esm(); |
| 3600 |
init_div_base(); |
| 3601 |
; |
| 3602 |
innerWrapper = dt(DivBase)(_templateObject$10 || (_templateObject$10 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n width: 100%;\n max-width: 1140px;\n margin: auto;\n flex-wrap: wrap;\n flex-direction: ", ";\n\n @media (max-width: 1140px) {\n padding: 0 15px;\n }\n\n @media (max-width: 767px) {\n padding: 0 13px;\n }\n"])), function(props) { |
| 3603 |
var _props$flexDirection; |
| 3604 |
return (_props$flexDirection = props.flexDirection) !== null && _props$flexDirection !== void 0 ? _props$flexDirection : "row"; |
| 3605 |
}); |
| 3606 |
})); |
| 3607 |
|
| 3608 |
//#endregion |
| 3609 |
//#region modules/styleguide/assets/js/frontend/components/header.js |
| 3610 |
function Header() { |
| 3611 |
return /*#__PURE__*/ react.default.createElement(Wrapper$3, null, /*#__PURE__*/ react.default.createElement(innerWrapper, null, /*#__PURE__*/ react.default.createElement(Title$1, null, (0, _wordpress_i18n.__)("Show global settings", "elementor")), /*#__PURE__*/ react.default.createElement(ButtonsWrapper, null, /*#__PURE__*/ react.default.createElement(AreaButton, { area: "colors" }, (0, _wordpress_i18n.__)("Colors", "elementor")), /*#__PURE__*/ react.default.createElement(AreaButton, { area: "fonts" }, (0, _wordpress_i18n.__)("Fonts", "elementor"))))); |
| 3612 |
} |
| 3613 |
var import_prop_types$6, _templateObject$9, _templateObject2$4, _templateObject3$2, _templateObject4, Button, AreaButton, Wrapper$3, ButtonsWrapper, Title$1; |
| 3614 |
var init_header = __esmMin((() => { |
| 3615 |
import_prop_types$6 = /* @__PURE__ */ __toESM(require_prop_types()); |
| 3616 |
init_taggedTemplateLiteral(); |
| 3617 |
init_styled_components_browser_esm(); |
| 3618 |
init_active_context(); |
| 3619 |
init_div_base(); |
| 3620 |
init_inner_wrapper(); |
| 3621 |
; |
| 3622 |
; |
| 3623 |
; |
| 3624 |
; |
| 3625 |
Button = dt.button.attrs(function(props) { |
| 3626 |
return { "data-e-active": props.isActive ? true : null }; |
| 3627 |
})(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteral(["\n font-size: 16px;\n height: 100%;\n font-weight: 500;\n font-style: normal;\n text-decoration: none;\n line-height: 1.5em;\n letter-spacing: 0;\n color: var(--e-a-color-txt);\n border: none;\n background: none;\n text-transform: capitalize;\n font-family: Roboto, sans-serif;\n padding: 0;\n\n &:hover, &[data-e-active='true'], &:focus {\n outline: none;\n background: none;\n color: var(--e-a-color-txt-accent);\n }\n"]))); |
| 3628 |
AreaButton = function AreaButton(props) { |
| 3629 |
var _useActiveContext = useActiveContext(); |
| 3630 |
var activeArea = _useActiveContext.activeArea; |
| 3631 |
var activateArea = _useActiveContext.activateArea; |
| 3632 |
var area = props.area; |
| 3633 |
var children = props.children; |
| 3634 |
return /*#__PURE__*/ react.default.createElement(Button, { |
| 3635 |
variant: "transparent", |
| 3636 |
size: "s", |
| 3637 |
onClick: function onClick() { |
| 3638 |
activateArea(area); |
| 3639 |
}, |
| 3640 |
isActive: area === activeArea |
| 3641 |
}, children); |
| 3642 |
}; |
| 3643 |
Wrapper$3 = dt(DivBase)(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 48px;\n display: flex;\n background: var(--e-a-bg-default);\n border-bottom: 1px solid var(--e-a-border-color-bold);\n z-index: 1;\n"]))); |
| 3644 |
ButtonsWrapper = dt(DivBase)(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n flex-grow: 1;\n gap: 20px;\n"]))); |
| 3645 |
Title$1 = dt.h2(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: var(--e-a-color-txt-accent);\n font-family: Roboto, sans-serif;\n font-size: 16px;\n font-weight: 600;\n text-transform: capitalize;\n font-style: normal;\n text-decoration: none;\n line-height: 1.2em;\n letter-spacing: 0;\n word-spacing: 0;\n margin: 0;\n"]))); |
| 3646 |
AreaButton.propTypes = { |
| 3647 |
area: import_prop_types$6.default.string.isRequired, |
| 3648 |
children: import_prop_types$6.default.node.isRequired |
| 3649 |
}; |
| 3650 |
})); |
| 3651 |
|
| 3652 |
//#endregion |
| 3653 |
//#region modules/styleguide/assets/js/frontend/components/global/loader.js |
| 3654 |
function Loader() { |
| 3655 |
return /*#__PURE__*/ react.default.createElement("div", { className: "e-styleguide-loader" }, /*#__PURE__*/ react.default.createElement("i", { className: "eicon-loading eicon-animation-spin" })); |
| 3656 |
} |
| 3657 |
var init_loader = __esmMin((() => {})); |
| 3658 |
|
| 3659 |
//#endregion |
| 3660 |
//#region modules/styleguide/assets/js/frontend/components/areas/area-title.js |
| 3661 |
var _templateObject$8, AreaTitle; |
| 3662 |
var init_area_title = __esmMin((() => { |
| 3663 |
init_taggedTemplateLiteral(); |
| 3664 |
init_styled_components_browser_esm(); |
| 3665 |
; |
| 3666 |
AreaTitle = dt.h2(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n color: var(--e-a-color-txt);\n font-family: Roboto, sans-serif;\n font-size: 30px;\n font-weight: 400;\n text-transform: capitalize;\n font-style: normal;\n text-decoration: none;\n letter-spacing: 0;\n word-spacing: 0;\n text-align: center;\n padding: 0;\n margin: 0 0 48px 0;\n"]))); |
| 3667 |
})); |
| 3668 |
|
| 3669 |
//#endregion |
| 3670 |
//#region modules/styleguide/assets/js/frontend/components/section-title.js |
| 3671 |
var _templateObject$7, SectionTitle; |
| 3672 |
var init_section_title = __esmMin((() => { |
| 3673 |
init_taggedTemplateLiteral(); |
| 3674 |
init_styled_components_browser_esm(); |
| 3675 |
; |
| 3676 |
SectionTitle = dt.h3(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteral(["\n padding: 16px 12px;\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: var(--e-a-border-color-bold);\n color: var(--e-a-color-txt);\n font-family: Roboto, sans-serif;\n font-size: 16px;\n font-weight: 500;\n text-transform: capitalize;\n font-style: normal;\n text-decoration: none;\n line-height: 1.5em;\n letter-spacing: 0;\n word-spacing: 0;\n margin: 0 auto 25px;\n width: 100%;\n max-width: 1140px;\n"]))); |
| 3677 |
})); |
| 3678 |
|
| 3679 |
//#endregion |
| 3680 |
//#region modules/styleguide/assets/js/frontend/components/section.js |
| 3681 |
function Section(props) { |
| 3682 |
var title = props.title; |
| 3683 |
var items = props.items; |
| 3684 |
var columns = props.columns; |
| 3685 |
var Item = props.component; |
| 3686 |
var type = props.type; |
| 3687 |
var _props$flex = props.flex; |
| 3688 |
var flex = _props$flex === void 0 ? "row" : _props$flex; |
| 3689 |
return /*#__PURE__*/ react.default.createElement(Wrapper$2, null, /*#__PURE__*/ react.default.createElement(SectionTitle, null, title), /*#__PURE__*/ react.default.createElement(innerWrapper, null, /*#__PURE__*/ react.default.createElement(Content$3, { flex }, items.map(function(item) { |
| 3690 |
return /*#__PURE__*/ react.default.createElement(Item, { |
| 3691 |
key: item._id, |
| 3692 |
item, |
| 3693 |
type: type ? type : null, |
| 3694 |
columns |
| 3695 |
}); |
| 3696 |
})))); |
| 3697 |
} |
| 3698 |
var import_prop_types$5, _templateObject$6, _templateObject2$3, _templateObject3$1, Wrapper$2, Content$3; |
| 3699 |
var init_section = __esmMin((() => { |
| 3700 |
import_prop_types$5 = /* @__PURE__ */ __toESM(require_prop_types()); |
| 3701 |
init_taggedTemplateLiteral(); |
| 3702 |
init_styled_components_browser_esm(); |
| 3703 |
init_section_title(); |
| 3704 |
init_div_base(); |
| 3705 |
init_inner_wrapper(); |
| 3706 |
; |
| 3707 |
; |
| 3708 |
; |
| 3709 |
Wrapper$2 = dt(DivBase)(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n margin-top: 55px;\n"]))); |
| 3710 |
Content$3 = dt(DivBase)(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n\n ", ";\n"])), function(_ref) { |
| 3711 |
var flex = _ref.flex; |
| 3712 |
return flex && lt(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral([ |
| 3713 |
"\n flex-direction: ", |
| 3714 |
";\n flex-wrap: ", |
| 3715 |
";\n " |
| 3716 |
])), "column" === flex ? "column" : "row", "column" === flex ? "nowrap" : "wrap"); |
| 3717 |
}); |
| 3718 |
Section.propTypes = { |
| 3719 |
title: import_prop_types$5.default.string.isRequired, |
| 3720 |
items: import_prop_types$5.default.array.isRequired, |
| 3721 |
columns: import_prop_types$5.default.shape({ |
| 3722 |
desktop: import_prop_types$5.default.number, |
| 3723 |
mobile: import_prop_types$5.default.number |
| 3724 |
}), |
| 3725 |
component: import_prop_types$5.default.func.isRequired, |
| 3726 |
type: import_prop_types$5.default.string, |
| 3727 |
flex: import_prop_types$5.default.oneOf(["row", "column"]) |
| 3728 |
}; |
| 3729 |
})); |
| 3730 |
|
| 3731 |
//#endregion |
| 3732 |
//#region modules/styleguide/assets/js/frontend/components/areas/area.js |
| 3733 |
var import_prop_types$4, _templateObject$5, Wrapper$1, Area; |
| 3734 |
var init_area = __esmMin((() => { |
| 3735 |
import_prop_types$4 = /* @__PURE__ */ __toESM(require_prop_types()); |
| 3736 |
init_taggedTemplateLiteral(); |
| 3737 |
init_styled_components_browser_esm(); |
| 3738 |
init_settings(); |
| 3739 |
init_loader(); |
| 3740 |
init_div_base(); |
| 3741 |
init_area_title(); |
| 3742 |
init_section(); |
| 3743 |
; |
| 3744 |
Wrapper$1 = dt(DivBase)(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n width: 100%;\n padding-top: 96px;\n min-height: 100px;\n\n @media (max-width: 1024px) {\n padding-top: 50px;\n }\n"]))); |
| 3745 |
Area = react.default.forwardRef(function(props, ref) { |
| 3746 |
var config = props.config; |
| 3747 |
var _useSettings = useSettings(); |
| 3748 |
var settings = _useSettings.settings; |
| 3749 |
var isReady = _useSettings.isReady; |
| 3750 |
return /*#__PURE__*/ react.default.createElement(Wrapper$1, { ref }, /*#__PURE__*/ react.default.createElement(AreaTitle, { name: config.type }, config.title), !isReady ? /*#__PURE__*/ react.default.createElement(Loader, null) : /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, config.sections.map(function(section) { |
| 3751 |
var items = settings.get(config.type).get(section.type); |
| 3752 |
return items.length ? /*#__PURE__*/ react.default.createElement(Section, { |
| 3753 |
key: section.type, |
| 3754 |
title: section.title, |
| 3755 |
items, |
| 3756 |
columns: section.columns, |
| 3757 |
component: config.component, |
| 3758 |
type: section.type |
| 3759 |
}) : null; |
| 3760 |
}))); |
| 3761 |
}); |
| 3762 |
Area.propTypes = { config: import_prop_types$4.default.shape({ |
| 3763 |
type: import_prop_types$4.default.string.isRequired, |
| 3764 |
title: import_prop_types$4.default.string.isRequired, |
| 3765 |
sections: import_prop_types$4.default.arrayOf(import_prop_types$4.default.shape({ |
| 3766 |
type: import_prop_types$4.default.string.isRequired, |
| 3767 |
title: import_prop_types$4.default.string.isRequired, |
| 3768 |
columns: import_prop_types$4.default.object |
| 3769 |
})).isRequired, |
| 3770 |
component: import_prop_types$4.default.func.isRequired |
| 3771 |
}).isRequired }; |
| 3772 |
})); |
| 3773 |
|
| 3774 |
//#endregion |
| 3775 |
//#region modules/styleguide/assets/js/frontend/components/global/element-title.js |
| 3776 |
var _templateObject$4, ElementTitle; |
| 3777 |
var init_element_title = __esmMin((() => { |
| 3778 |
init_taggedTemplateLiteral(); |
| 3779 |
init_styled_components_browser_esm(); |
| 3780 |
; |
| 3781 |
ElementTitle = dt.p(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n color: var(--e-a-color-txt);\n font-family: Roboto, sans-serif;\n font-size: 12px;\n font-weight: 500;\n text-transform: capitalize;\n font-style: normal;\n text-decoration: none;\n line-height: 1.1em;\n letter-spacing: 0;\n word-spacing: 0;\n padding: 0;\n margin: 0;\n"]))); |
| 3782 |
})); |
| 3783 |
|
| 3784 |
//#endregion |
| 3785 |
//#region modules/styleguide/assets/js/frontend/components/global/element-wrapper.js |
| 3786 |
var import_prop_types$3, _templateObject$3, _templateObject2$2, _templateObject3, Wrapper, ElementWrapper; |
| 3787 |
var init_element_wrapper = __esmMin((() => { |
| 3788 |
import_prop_types$3 = /* @__PURE__ */ __toESM(require_prop_types()); |
| 3789 |
init_extends(); |
| 3790 |
init_taggedTemplateLiteral(); |
| 3791 |
init_styled_components_browser_esm(); |
| 3792 |
init_div_base(); |
| 3793 |
; |
| 3794 |
; |
| 3795 |
; |
| 3796 |
Wrapper = dt(DivBase)(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral([ |
| 3797 |
"\n display: flex;\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n border: 1px solid transparent;\n border-radius: 3px;\n padding: 12px;\n cursor: pointer;\n ", |
| 3798 |
"\n\n &:hover:not(.active) {\n background-color: var(--e-a-bg-hover);\n border-color: var(--e-a-border-color-bold);\n }\n\n &.active {\n background-color: var(--e-a-bg-active);\n border-color: var(--e-a-border-color-accent);\n }\n\n @media (max-width: 767px) {\n ", |
| 3799 |
"\n }\n" |
| 3800 |
])), function(_ref) { |
| 3801 |
var _columns$desktop; |
| 3802 |
var columnWidth = 100 / ((_columns$desktop = _ref.columns.desktop) !== null && _columns$desktop !== void 0 ? _columns$desktop : 1); |
| 3803 |
return lt(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n flex: 0 0 ", "%;\n "])), columnWidth); |
| 3804 |
}, function(_ref2) { |
| 3805 |
var _columns$mobile; |
| 3806 |
var columnWidth = 100 / ((_columns$mobile = _ref2.columns.mobile) !== null && _columns$mobile !== void 0 ? _columns$mobile : 1); |
| 3807 |
return lt(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 0 0 ", "%;\n "])), columnWidth); |
| 3808 |
}); |
| 3809 |
ElementWrapper = react.default.forwardRef(function(props, ref) { |
| 3810 |
var isActive = props.isActive; |
| 3811 |
var children = props.children; |
| 3812 |
return /*#__PURE__*/ react.default.createElement(Wrapper, _extends({}, props, { |
| 3813 |
ref, |
| 3814 |
className: isActive ? "active" : "" |
| 3815 |
}), children); |
| 3816 |
}); |
| 3817 |
ElementWrapper.propTypes = { |
| 3818 |
isActive: import_prop_types$3.default.bool, |
| 3819 |
children: import_prop_types$3.default.oneOfType([import_prop_types$3.default.node, import_prop_types$3.default.arrayOf(import_prop_types$3.default.node)]) |
| 3820 |
}; |
| 3821 |
})); |
| 3822 |
|
| 3823 |
//#endregion |
| 3824 |
//#region modules/styleguide/assets/js/frontend/components/item/color.js |
| 3825 |
function Color(props) { |
| 3826 |
var _useActiveContext = useActiveContext(); |
| 3827 |
var activeElement = _useActiveContext.activeElement; |
| 3828 |
var activateElement = _useActiveContext.activateElement; |
| 3829 |
var getElementControl = _useActiveContext.getElementControl; |
| 3830 |
var item = props.item; |
| 3831 |
var type = props.type; |
| 3832 |
var source = "color"; |
| 3833 |
var _id = item._id; |
| 3834 |
var title = item.title; |
| 3835 |
var hex = item.color; |
| 3836 |
var elementControl = getElementControl(type, source, _id); |
| 3837 |
var ref = (0, react.useRef)(null); |
| 3838 |
(0, react.useEffect)(function() { |
| 3839 |
if (elementControl === activeElement) ref.current.scrollIntoView({ |
| 3840 |
behavior: "smooth", |
| 3841 |
block: "center", |
| 3842 |
inline: "center" |
| 3843 |
}); |
| 3844 |
}, [activeElement]); |
| 3845 |
return /*#__PURE__*/ react.default.createElement(ElementWrapper, { |
| 3846 |
columns: props.columns, |
| 3847 |
ref, |
| 3848 |
isActive: elementControl === activeElement, |
| 3849 |
onClick: function onClick() { |
| 3850 |
activateElement(type, source, _id); |
| 3851 |
} |
| 3852 |
}, /*#__PURE__*/ react.default.createElement(ElementTitle, null, title), /*#__PURE__*/ react.default.createElement(Content$2, { hex }, /*#__PURE__*/ react.default.createElement(HexString, null, hex))); |
| 3853 |
} |
| 3854 |
var import_prop_types$2, _templateObject$2, _templateObject2$1, Content$2, HexString; |
| 3855 |
var init_color = __esmMin((() => { |
| 3856 |
import_prop_types$2 = /* @__PURE__ */ __toESM(require_prop_types()); |
| 3857 |
init_taggedTemplateLiteral(); |
| 3858 |
init_styled_components_browser_esm(); |
| 3859 |
init_div_base(); |
| 3860 |
init_element_title(); |
| 3861 |
init_element_wrapper(); |
| 3862 |
init_active_context(); |
| 3863 |
; |
| 3864 |
; |
| 3865 |
Content$2 = dt(DivBase)(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n height: 100px;\n background-color: ", ";\n border: 1px solid var(--e-a-border-color-focus);\n border-radius: 3px;\n align-items: end;\n"])), function(props) { |
| 3866 |
return props.hex; |
| 3867 |
}); |
| 3868 |
HexString = dt.p(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n color: var(--e-a-color-txt-invert);\n font-family: Roboto, sans-serif;\n height: 12px;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n font-style: normal;\n text-decoration: none;\n line-height: 1.1em;\n letter-spacing: 0;\n word-spacing: 0;\n margin: 12px;\n"]))); |
| 3869 |
Color.propTypes = { |
| 3870 |
item: import_prop_types$2.default.shape({ |
| 3871 |
_id: import_prop_types$2.default.string.isRequired, |
| 3872 |
title: import_prop_types$2.default.string.isRequired, |
| 3873 |
color: import_prop_types$2.default.string |
| 3874 |
}).isRequired, |
| 3875 |
type: import_prop_types$2.default.string.isRequired, |
| 3876 |
columns: import_prop_types$2.default.shape({ |
| 3877 |
desktop: import_prop_types$2.default.number, |
| 3878 |
mobile: import_prop_types$2.default.number |
| 3879 |
}) |
| 3880 |
}; |
| 3881 |
})); |
| 3882 |
|
| 3883 |
//#endregion |
| 3884 |
//#region modules/styleguide/assets/js/frontend/components/areas/colors-area.js |
| 3885 |
function ColorsArea() { |
| 3886 |
var colorsAreaRef = useActiveContext().colorsAreaRef; |
| 3887 |
var areaConfig = { |
| 3888 |
title: (0, _wordpress_i18n.__)("Global Colors", "elementor"), |
| 3889 |
type: "colors", |
| 3890 |
component: Color, |
| 3891 |
sections: [{ |
| 3892 |
type: "system_colors", |
| 3893 |
title: (0, _wordpress_i18n.__)("System Colors", "elementor"), |
| 3894 |
columns: { |
| 3895 |
desktop: 4, |
| 3896 |
mobile: 2 |
| 3897 |
} |
| 3898 |
}, { |
| 3899 |
type: "custom_colors", |
| 3900 |
title: (0, _wordpress_i18n.__)("Custom Colors", "elementor"), |
| 3901 |
columns: { |
| 3902 |
desktop: 6, |
| 3903 |
mobile: 2 |
| 3904 |
} |
| 3905 |
}] |
| 3906 |
}; |
| 3907 |
return /*#__PURE__*/ react.default.createElement(Area, { |
| 3908 |
ref: colorsAreaRef, |
| 3909 |
config: areaConfig |
| 3910 |
}); |
| 3911 |
} |
| 3912 |
var init_colors_area = __esmMin((() => { |
| 3913 |
init_active_context(); |
| 3914 |
init_area(); |
| 3915 |
init_color(); |
| 3916 |
})); |
| 3917 |
|
| 3918 |
//#endregion |
| 3919 |
//#region modules/styleguide/assets/js/frontend/components/item/font.js |
| 3920 |
function Font(props) { |
| 3921 |
var _useActiveContext = useActiveContext(); |
| 3922 |
var activeElement = _useActiveContext.activeElement; |
| 3923 |
var activateElement = _useActiveContext.activateElement; |
| 3924 |
var getElementControl = _useActiveContext.getElementControl; |
| 3925 |
var item = props.item; |
| 3926 |
var type = props.type; |
| 3927 |
var source = "typography"; |
| 3928 |
var _id = item._id; |
| 3929 |
var title = item.title; |
| 3930 |
var elementControl = getElementControl(type, source, _id); |
| 3931 |
var ref = (0, react.useRef)(null); |
| 3932 |
var _useSettings = useSettings(); |
| 3933 |
var settings = _useSettings.settings; |
| 3934 |
var isReady = _useSettings.isReady; |
| 3935 |
var generateStyle = (0, react.useMemo)(function() { |
| 3936 |
if (!isReady) return ""; |
| 3937 |
return parseFontToStyle(item, settings.get("fonts").get("fallback_font")); |
| 3938 |
}, [item, settings]); |
| 3939 |
var onClick = function onClick() { |
| 3940 |
activateElement(type, source, _id); |
| 3941 |
}; |
| 3942 |
(0, react.useEffect)(function() { |
| 3943 |
if (elementControl === activeElement) ref.current.scrollIntoView({ |
| 3944 |
behavior: "smooth", |
| 3945 |
block: "center", |
| 3946 |
inline: "center" |
| 3947 |
}); |
| 3948 |
}, [activeElement]); |
| 3949 |
return /*#__PURE__*/ react.default.createElement(ElementWrapper, { |
| 3950 |
columns: props.columns, |
| 3951 |
ref, |
| 3952 |
isActive: elementControl === activeElement, |
| 3953 |
onClick |
| 3954 |
}, /*#__PURE__*/ react.default.createElement(Title, null, title), /*#__PURE__*/ react.default.createElement(Content$1, { style: generateStyle }, (0, _wordpress_i18n.__)("The five boxing wizards jump quickly.", "elementor"))); |
| 3955 |
} |
| 3956 |
var import_prop_types$1, _templateObject$1, _templateObject2, Title, Content$1, parseFontToStyle; |
| 3957 |
var init_font = __esmMin((() => { |
| 3958 |
import_prop_types$1 = /* @__PURE__ */ __toESM(require_prop_types()); |
| 3959 |
init_taggedTemplateLiteral(); |
| 3960 |
init_styled_components_browser_esm(); |
| 3961 |
init_active_context(); |
| 3962 |
init_settings(); |
| 3963 |
init_element_wrapper(); |
| 3964 |
init_element_title(); |
| 3965 |
; |
| 3966 |
; |
| 3967 |
Title = dt(ElementTitle)(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n font-size: 18px;\n"]))); |
| 3968 |
Content$1 = dt.p.withConfig({ shouldForwardProp: function shouldForwardProp(prop) { |
| 3969 |
return "style" !== prop; |
| 3970 |
} })(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n"])), function(_ref) { |
| 3971 |
var style = _ref.style; |
| 3972 |
var styleObjectToString = function styleObjectToString(obj) { |
| 3973 |
return Object.keys(obj).reduce(function(acc, key) { |
| 3974 |
return acc + "".concat(key, ": ").concat(obj[key], ";"); |
| 3975 |
}, ""); |
| 3976 |
}; |
| 3977 |
return "\n ".concat(styleObjectToString(style.style), "\n\n @media (max-width: 1024px) {\n ").concat(styleObjectToString(style.tablet), "\n }\n\n @media (max-width: 767px) {\n ").concat(styleObjectToString(style.mobile), "\n }\n "); |
| 3978 |
}); |
| 3979 |
parseFontToStyle = function parseFontToStyle(font, fallbackFamily) { |
| 3980 |
var defaultKeyParser = function defaultKeyParser(key) { |
| 3981 |
return key.replace("typography_", "").replace("_", "-"); |
| 3982 |
}; |
| 3983 |
var fallbackLowered = fallbackFamily.toLowerCase(); |
| 3984 |
var familyParser = function familyParser(value) { |
| 3985 |
return value ? value + ", ".concat(fallbackLowered) : fallbackLowered; |
| 3986 |
}; |
| 3987 |
var sizeParser = function sizeParser(value) { |
| 3988 |
if (!value || !value.size) return ""; |
| 3989 |
return "".concat(value.size).concat(value.unit); |
| 3990 |
}; |
| 3991 |
var defaultParser = function defaultParser(value) { |
| 3992 |
return value; |
| 3993 |
}; |
| 3994 |
var allowedProperties = { |
| 3995 |
typography_font_family: { |
| 3996 |
valueParser: familyParser, |
| 3997 |
keyParser: defaultKeyParser |
| 3998 |
}, |
| 3999 |
typography_font_size: { |
| 4000 |
valueParser: sizeParser, |
| 4001 |
keyParser: defaultKeyParser |
| 4002 |
}, |
| 4003 |
typography_letter_spacing: { |
| 4004 |
valueParser: sizeParser, |
| 4005 |
keyParser: defaultKeyParser |
| 4006 |
}, |
| 4007 |
typography_line_height: { |
| 4008 |
valueParser: sizeParser, |
| 4009 |
keyParser: defaultKeyParser |
| 4010 |
}, |
| 4011 |
typography_word_spacing: { |
| 4012 |
valueParser: sizeParser, |
| 4013 |
keyParser: defaultKeyParser |
| 4014 |
}, |
| 4015 |
typography_font_style: { |
| 4016 |
valueParser: defaultParser, |
| 4017 |
keyParser: defaultKeyParser |
| 4018 |
}, |
| 4019 |
typography_font_weight: { |
| 4020 |
valueParser: defaultParser, |
| 4021 |
keyParser: defaultKeyParser |
| 4022 |
}, |
| 4023 |
typography_text_transform: { |
| 4024 |
valueParser: defaultParser, |
| 4025 |
keyParser: defaultKeyParser |
| 4026 |
}, |
| 4027 |
typography_text_decoration: { |
| 4028 |
valueParser: defaultParser, |
| 4029 |
keyParser: defaultKeyParser |
| 4030 |
} |
| 4031 |
}; |
| 4032 |
var responsiveProperties = [ |
| 4033 |
"typography_font_size", |
| 4034 |
"typography_letter_spacing", |
| 4035 |
"typography_line_height", |
| 4036 |
"typography_word_spacing" |
| 4037 |
]; |
| 4038 |
var reducer = function reducer(acc, property, screen) { |
| 4039 |
var parsers = allowedProperties[property]; |
| 4040 |
var key = parsers.keyParser(property); |
| 4041 |
var keyInFontObject = property + (screen ? "_" + screen : ""); |
| 4042 |
var value = parsers.valueParser(font[keyInFontObject]); |
| 4043 |
if (value) acc[key] = value; |
| 4044 |
return acc; |
| 4045 |
}; |
| 4046 |
return { |
| 4047 |
style: Object.keys(allowedProperties).reduce(function(acc, property) { |
| 4048 |
return reducer(acc, property, ""); |
| 4049 |
}, {}), |
| 4050 |
tablet: responsiveProperties.reduce(function(acc, property) { |
| 4051 |
return reducer(acc, property, "tablet"); |
| 4052 |
}, {}), |
| 4053 |
mobile: responsiveProperties.reduce(function(acc, property) { |
| 4054 |
return reducer(acc, property, "mobile"); |
| 4055 |
}, {}) |
| 4056 |
}; |
| 4057 |
}; |
| 4058 |
Font.propTypes = { |
| 4059 |
item: import_prop_types$1.default.shape({ |
| 4060 |
_id: import_prop_types$1.default.string.isRequired, |
| 4061 |
title: import_prop_types$1.default.string.isRequired, |
| 4062 |
color: import_prop_types$1.default.string |
| 4063 |
}).isRequired, |
| 4064 |
type: import_prop_types$1.default.string.isRequired, |
| 4065 |
columns: import_prop_types$1.default.shape({ |
| 4066 |
desktop: import_prop_types$1.default.number, |
| 4067 |
mobile: import_prop_types$1.default.number |
| 4068 |
}) |
| 4069 |
}; |
| 4070 |
})); |
| 4071 |
|
| 4072 |
//#endregion |
| 4073 |
//#region modules/styleguide/assets/js/frontend/components/areas/fonts-area.js |
| 4074 |
function FontsArea() { |
| 4075 |
var fontsAreaRef = useActiveContext().fontsAreaRef; |
| 4076 |
var areaConfig = { |
| 4077 |
title: (0, _wordpress_i18n.__)("Global Fonts", "elementor"), |
| 4078 |
type: "fonts", |
| 4079 |
component: Font, |
| 4080 |
sections: [{ |
| 4081 |
type: "system_typography", |
| 4082 |
title: (0, _wordpress_i18n.__)("System Fonts", "elementor"), |
| 4083 |
flex: "column", |
| 4084 |
columns: { |
| 4085 |
desktop: 1, |
| 4086 |
mobile: 1 |
| 4087 |
} |
| 4088 |
}, { |
| 4089 |
type: "custom_typography", |
| 4090 |
title: (0, _wordpress_i18n.__)("Custom Fonts", "elementor"), |
| 4091 |
flex: "column", |
| 4092 |
columns: { |
| 4093 |
desktop: 1, |
| 4094 |
mobile: 1 |
| 4095 |
} |
| 4096 |
}] |
| 4097 |
}; |
| 4098 |
return /*#__PURE__*/ react.default.createElement(Area, { |
| 4099 |
ref: fontsAreaRef, |
| 4100 |
config: areaConfig |
| 4101 |
}); |
| 4102 |
} |
| 4103 |
var init_fonts_area = __esmMin((() => { |
| 4104 |
init_active_context(); |
| 4105 |
init_area(); |
| 4106 |
init_font(); |
| 4107 |
})); |
| 4108 |
|
| 4109 |
//#endregion |
| 4110 |
//#region modules/styleguide/assets/js/frontend/components/app-wrapper.js |
| 4111 |
function AppWrapper(props) { |
| 4112 |
var _useSettings = useSettings(); |
| 4113 |
var settings = _useSettings.settings; |
| 4114 |
if (!_useSettings.isReady) return /*#__PURE__*/ react.default.createElement(Loader, null); |
| 4115 |
var Wrapper = settings.get("config").get("is_debug") ? react.default.StrictMode : react.default.Fragment; |
| 4116 |
return /*#__PURE__*/ react.default.createElement(Wrapper, null, props.children); |
| 4117 |
} |
| 4118 |
var import_prop_types; |
| 4119 |
var init_app_wrapper = __esmMin((() => { |
| 4120 |
import_prop_types = /* @__PURE__ */ __toESM(require_prop_types()); |
| 4121 |
init_settings(); |
| 4122 |
init_loader(); |
| 4123 |
AppWrapper.propTypes = { children: import_prop_types.default.oneOfType([import_prop_types.default.node, import_prop_types.default.arrayOf(import_prop_types.default.node)]).isRequired }; |
| 4124 |
})); |
| 4125 |
|
| 4126 |
//#endregion |
| 4127 |
//#region modules/styleguide/assets/js/frontend/app.js |
| 4128 |
var app_exports = /* @__PURE__ */ __exportAll({ default: () => App }); |
| 4129 |
function App() { |
| 4130 |
return /*#__PURE__*/ react.default.createElement(SettingsProvider, null, /*#__PURE__*/ react.default.createElement(AppWrapper, null, /*#__PURE__*/ react.default.createElement(ActiveProvider, null, /*#__PURE__*/ react.default.createElement(Header, null), /*#__PURE__*/ react.default.createElement(Content, null, /*#__PURE__*/ react.default.createElement(ColorsArea, null), /*#__PURE__*/ react.default.createElement(FontsArea, null))))); |
| 4131 |
} |
| 4132 |
var _templateObject, Content; |
| 4133 |
var init_app = __esmMin((() => { |
| 4134 |
init_taggedTemplateLiteral(); |
| 4135 |
init_styled_components_browser_esm(); |
| 4136 |
init_settings(); |
| 4137 |
init_active_context(); |
| 4138 |
init_header(); |
| 4139 |
init_colors_area(); |
| 4140 |
init_fonts_area(); |
| 4141 |
init_app_wrapper(); |
| 4142 |
; |
| 4143 |
Content = dt.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 48px 0;\n"]))); |
| 4144 |
})); |
| 4145 |
|
| 4146 |
//#endregion |
| 4147 |
//#region modules/styleguide/assets/js/styleguide-app-initiator.js |
| 4148 |
(function() { |
| 4149 |
var unmountCallback; |
| 4150 |
var styleguideBodyClass = "e-styleguide-shown"; |
| 4151 |
/** |
| 4152 |
* Add the app into the page. |
| 4153 |
*/ |
| 4154 |
function mount() { |
| 4155 |
return _mount.apply(this, arguments); |
| 4156 |
} |
| 4157 |
/** |
| 4158 |
* Remove the app from the page. |
| 4159 |
*/ |
| 4160 |
function _mount() { |
| 4161 |
_mount = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { |
| 4162 |
var _yield$import; |
| 4163 |
var App; |
| 4164 |
var _ReactUtils$render; |
| 4165 |
var unmountUtil; |
| 4166 |
return import_regenerator.default.wrap(function(_context) { |
| 4167 |
while (1) switch (_context.prev = _context.next) { |
| 4168 |
case 0: |
| 4169 |
_context.next = 1; |
| 4170 |
return __vitePreload(() => Promise.resolve().then(() => (init_app(), app_exports)), void 0); |
| 4171 |
case 1: |
| 4172 |
_yield$import = _context.sent; |
| 4173 |
App = _yield$import.default; |
| 4174 |
document.body.classList.add(styleguideBodyClass); |
| 4175 |
_ReactUtils$render = react_default.render(/*#__PURE__*/ react.default.createElement(App, null), getStyleguideWidget()), unmountUtil = _ReactUtils$render.unmount; |
| 4176 |
unmountCallback = unmountUtil; |
| 4177 |
case 2: |
| 4178 |
case "end": return _context.stop(); |
| 4179 |
} |
| 4180 |
}, _callee); |
| 4181 |
})); |
| 4182 |
return _mount.apply(this, arguments); |
| 4183 |
} |
| 4184 |
function unmount() { |
| 4185 |
unmountCallback(); |
| 4186 |
document.body.classList.remove(styleguideBodyClass); |
| 4187 |
} |
| 4188 |
/** |
| 4189 |
* Get the Styleguide widget that serves as the App container. |
| 4190 |
* Returns null if the widget does not exist. |
| 4191 |
* |
| 4192 |
* @return {Object|null} |
| 4193 |
*/ |
| 4194 |
function getStyleguideWidget() { |
| 4195 |
return document.querySelector(".dialog-styleguide-message"); |
| 4196 |
} |
| 4197 |
/** |
| 4198 |
* Listen to an event from the Styleguide e-component to mount or unmount the app. |
| 4199 |
*/ |
| 4200 |
window.addEventListener("message", function(event) { |
| 4201 |
var _event$data; |
| 4202 |
if (!((_event$data = event.data) !== null && _event$data !== void 0 && (_event$data = _event$data.name) !== null && _event$data !== void 0 && _event$data.startsWith("elementor/styleguide/preview")) || !getStyleguideWidget()) return; |
| 4203 |
switch (event.data.name) { |
| 4204 |
case "elementor/styleguide/preview/show": |
| 4205 |
mount(); |
| 4206 |
break; |
| 4207 |
case "elementor/styleguide/preview/hide": |
| 4208 |
unmount(); |
| 4209 |
break; |
| 4210 |
} |
| 4211 |
}); |
| 4212 |
})(); |
| 4213 |
|
| 4214 |
//#endregion |
| 4215 |
})(React, ReactDOM, wp.i18n); |
| 4216 |
//# sourceMappingURL=styleguide-app-initiator.js.map |