web-push-notifications 3.69.0 → 3.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/core/Pushwoosh.d.ts +10 -1
- package/core/Pushwoosh.types.d.ts +5 -0
- package/npm.js +1 -1
- package/npm.js.map +1 -1
- package/package.json +1 -1
- package/pushwoosh-web-notifications.d.ts +1 -0
- package/pushwoosh-widget-inbox.d.ts +1 -0
- package/pushwoosh-widget-subscribe-popup.d.ts +1 -0
- package/pushwoosh-widget-subscription-button.d.ts +1 -0
- package/pushwoosh-widget-subscription-prompt.d.ts +1 -0
- package/pushwoosh-widget-web-popups.d.ts +1 -0
- package/service-worker.js +1 -1
- package/widget-subscribe-popup.js +1 -1
- package/widget-subscribe-popup.js.map +1 -1
- package/widget-subscription-button.js +1 -1
- package/widget-subscription-button.js.map +1 -1
- package/widget-subscription-prompt.js +1 -1
- package/widget-subscription-prompt.js.map +1 -1
- package/widget-web-popups.js +1 -1
- package/widget-web-popups.js.map +1 -1
- package/widgets/WebPopups/types.d.ts +5 -1
package/widget-web-popups.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-web-popups.js","mappings":"CAAA,SAAAA,EAAAC,GACA,oBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,SACA,sBAAAG,QAAAA,OAAAC,IACAD,OAAA,GAAAH,OACA,CACA,IAAAK,EAAAL,IACA,QAAAM,KAAAD,GAAA,iBAAAJ,QAAAA,QAAAF,GAAAO,GAAAD,EAAAC,EACA,CACC,CATD,CASCC,KAAA,uBCRD,MAAAC,EAAA,CCAAA,EAAA,CAAAP,EAAAQ,KACA,QAAAC,KAAAD,EACAD,EAAAG,EAAAF,EAAAC,KAAAF,EAAAG,EAAAV,EAAAS,IACAE,OAAAC,eAAAZ,EAAAS,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCF,EAAA,CAAAQ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AQpmC,KAAKqmC,qBAAqBhsB,GAI5D,CAEQ,uCAAAsrB,CAAwCnF,GAC9C,MAAQ8F,eAAgBC,EAAeC,oBAAqBC,EAAmBC,eAAgBC,GAAkBnG,EAC3GoG,EAAOjJ,OAAOsF,SAASC,SAG7B,OAAIuD,GAAqBA,EAAkB7jC,OAAS,EAC3C6jC,EAAkBztB,KAAM6tB,GAAS7mC,KAAK8mC,cAAcF,EAAMC,IAG/DN,GAAiBA,EAAc3jC,OAAS,EACnC2jC,EAAcziC,SAAS8iC,KAG5BD,GAAiBA,EAAc/jC,OAAS,KAClC+jC,EAAc3tB,KAAM6tB,GAAS7mC,KAAK8mC,cAAcF,EAAMC,GAIlE,CAEQ,aAAAC,CAAcF,EAAcC,GAClC,OAAQA,EAAKE,UACX,IAAK,SACH,OAAOH,IAASC,EAAKD,KACvB,IAAK,cACH,OAAOA,EAAK7xB,WAAW8xB,EAAKD,MAC9B,QAEE,OAAO,EAEb,CAEQ,sCAAAnB,CAAuCjF,GAC7C,MAAQwG,cAAeC,GAAiBzG,EAExC,MAAqB,QAAjByG,GACMjnC,KAAKq/B,mBAGM,cAAjB4H,GACKjnC,KAAKq/B,kBAIhB,CAEQ,iBAAM6F,CAAY1E,GACxBxgC,KAAKuiB,GAAGG,IAAIihB,qBAAqBnD,EAASnmB,KAAM,GAAGkoB,MAAOryB,IACxDgS,GAAOhS,MAAMA,EAAO,GAAGkN,kDAAqEojB,EAASnmB,WAEvG,MAAM4rB,UAAEA,EAAS5rB,KAAEA,GAASmmB,EAEV,SAAdyF,EAKc,qBAAdA,GACFE,eAAee,QAAQlnC,KAAKqmC,qBAAqBhsB,GAAO,WALlDra,KAAKuiB,GAAGsG,KAAKse,iBAAiB9sB,EAOxC,CAEQ,oBAAAgsB,CAAqBhsB,GAC3B,MAAO,GAAG8C,YAAqC9C,GACjD","sources":["webpack://web-push-notifications/webpack/universalModuleDefinition","webpack://web-push-notifications/webpack/bootstrap","webpack://web-push-notifications/webpack/runtime/define property getters","webpack://web-push-notifications/webpack/runtime/hasOwnProperty shorthand","webpack://web-push-notifications/webpack/runtime/make namespace object","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/constants.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/glyphs.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/layout.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/palette.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/timer.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/helpers.js","webpack://web-push-notifications/./src/widgets/WebPopups/constants.ts","webpack://web-push-notifications/./src/modules/storage/migrations/constants.ts","webpack://web-push-notifications/./src/modules/storage/migrations/helpers.ts","webpack://web-push-notifications/./src/modules/storage/migrations/initial.ts","webpack://web-push-notifications/./src/modules/storage/migrations/Migrations.ts","webpack://web-push-notifications/./src/modules/storage/migrations/MigrationExecutor.ts","webpack://web-push-notifications/./src/core/storage.ts","webpack://web-push-notifications/./src/core/logger.ts","webpack://web-push-notifications/./src/widgets/WebPopups/deviceSubmitApi.ts","webpack://web-push-notifications/./node_modules/preact/dist/preact.module.js","webpack://web-push-notifications/./node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js","webpack://web-push-notifications/./node_modules/preact/hooks/dist/hooks.module.js","webpack://web-push-notifications/./node_modules/preact/compat/dist/compat.module.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/WebPopupReader.js","webpack://web-push-notifications/./src/widgets/WebPopups/subscriptionFormApi.ts","webpack://web-push-notifications/./src/widgets/WebPopups/WebPopupsWidget.ts","webpack://web-push-notifications/./src/widgets/WebPopups/renderer.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, () => {\nreturn ","// The require scope\nconst __webpack_require__ = {};\n\n","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Current stored-format version (WebPopupJson.version). Version 2 = the\n * layout-tree format (nested containers + Content/Image leaves, named content\n * zones). Version 1 (flat layout + single slot list) is retired without a\n * migration path — v1 popups are treated as broken, same as the pre-engine\n * ai-builder format.\n */\nexport const WEB_POPUP_VERSION = 2;\n// Bomb protection for the embedded layout tree — the json travels through a\n// public API, so the parser refuses to walk pathological trees.\nexport const WEB_POPUP_LAYOUT_MAX_DEPTH = 10;\nexport const WEB_POPUP_LAYOUT_MAX_NODES = 100;\n/** Protocols allowed in button hrefs (plus relative `#`/`/`/`?` prefixes). */\nexport const SAFE_URL_PROTOCOL = /^(https?:|mailto:|tel:)/i;\nexport const WEB_POPUP_FONT_STACK = 'Inter, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif';\n// Palette defaults (mirror the editor's popup theme) — what a popup gets for\n// any WebPopupColors entry its json doesn't set.\nexport const WEB_POPUP_TEXT_COLOR = '#101828';\nexport const WEB_POPUP_TEXT_SECONDARY_COLOR = '#667085';\nexport const WEB_POPUP_ACCENT_COLOR = '#2970FF';\nexport const WEB_POPUP_BACKGROUND_COLOR = '#FFFFFF';\n/** Label over an accent fill in the light scheme; dark picks it by accent luminance. */\nexport const WEB_POPUP_ON_ACCENT_COLOR = '#FFFFFF';\nexport const WEB_POPUP_DEFAULT_COLORS = {\n background: WEB_POPUP_BACKGROUND_COLOR,\n accent: WEB_POPUP_ACCENT_COLOR,\n text: WEB_POPUP_TEXT_COLOR,\n textSecondary: WEB_POPUP_TEXT_SECONDARY_COLOR,\n textInverse: '#FFFFFF',\n};\n/** Fallback width used when a fixed-width context needs a number anyway. */\nexport const WEB_POPUP_DEFAULT_WIDTH = 360;\n// Per-variant text styles — the same numbers the editor's canvas derives from\n// its theme presets. No colors here: those come from the popup palette via\n// webPopupTextColor below.\nexport const WEB_POPUP_TEXT_VARIANT_STYLES = {\n h1: { fontSize: 24, fontWeight: 600, lineHeight: 1.25 },\n h2: { fontSize: 18, fontWeight: 600, lineHeight: 1.3 },\n h3: { fontSize: 16, fontWeight: 600, lineHeight: 1.35 },\n body: { fontSize: 14, fontWeight: 'normal', lineHeight: 1.5 },\n caption: { fontSize: 12, fontWeight: 'normal', lineHeight: 1.4 },\n eyebrow: {\n fontSize: 11, fontWeight: 600, letterSpacing: '0.08em', lineHeight: 1.4,\n },\n icon: { fontSize: 24, lineHeight: 1.2 },\n};\n// Inverse-tone translucency per text style: headings full-strength, the\n// secondary variants toned down — same rhythm the palette's default white\n// set always had.\nconst INVERSE_TEXT_ALPHAS = {\n h1: 1,\n h2: 1,\n h3: 1,\n icon: 1,\n eyebrow: 0.8,\n body: 0.9,\n caption: 0.75,\n};\n// colors.textInverse at the given opacity. Only #rgb/#rrggbb can be blended;\n// any other author-supplied css color renders full-strength rather than\n// being guessed at.\nfunction inverseColorAt(color, alpha) {\n if (alpha >= 1)\n return color;\n const hex = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.exec(color)?.[1];\n if (!hex)\n return color;\n const full = hex.length === 3 ? hex.split('').map((c) => c + c).join('') : hex;\n const [r, g, b] = [0, 2, 4].map((i) => parseInt(full.slice(i, i + 2), 16));\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n}\n/**\n * A text slot's color: the palette's main/secondary role by variant; in an\n * 'inverse' zone (over a background image) — colors.textInverse, with the\n * secondary variants toned translucent. Undefined for a non-inverse 'icon'\n * (an emoji line inherits — its glyphs aren't recolorable anyway).\n */\nexport function webPopupTextColor(variant, colors, inverse) {\n if (inverse)\n return inverseColorAt(colors.textInverse, INVERSE_TEXT_ALPHAS[variant] ?? 1);\n if (variant === 'icon')\n return undefined;\n return variant === 'caption' || variant === 'eyebrow' ? colors.textSecondary : colors.text;\n}\n/** The dark fill under a container's background image while it loads. */\nexport const WEB_POPUP_BG_SECTION_FALLBACK = '#1D2939';\nconst HEADING_VARIANTS = ['h1', 'h2', 'h3', 'icon'];\nexport function webPopupSlotRole(slot) {\n // An icon reads as the line above a title, so it hugs what follows; a\n // countdown wants a block's air, which the 'action' fallback gives it.\n if (slot.type === 'glyph')\n return 'heading';\n if (slot.type !== 'text')\n return 'action';\n return HEADING_VARIANTS.includes(slot.variant) ? 'heading' : 'text';\n}\nexport function webPopupSlotGap(prev, next) {\n if (next === 'action')\n return prev === 'action' ? 6 : 16;\n if (next === 'text' && prev === 'heading')\n return 4;\n return 8;\n}\n// Paddings INSIDE a form slot (field rows, submit pill); the rhythm above\n// owns the space BETWEEN slots.\nexport const WEB_POPUP_TEXT_SLOT_PADDING = '4px 0';\nexport const WEB_POPUP_BUTTON_SLOT_PADDING = '8px 0 4px';\n/**\n * The button pill both button slots and a form slot's submit button render\n * with — buttons pair the accent with white (primary = accent fill + white\n * label, secondary = white fill + accent outline). Shared with the editor's\n * canvas (parity contract).\n */\nexport function webPopupButtonPillStyle(variant, colors) {\n return {\n display: 'block',\n boxSizing: 'border-box',\n width: '100%',\n padding: '10px 25px',\n borderRadius: 6,\n fontSize: 14,\n fontWeight: 600,\n fontFamily: 'inherit',\n lineHeight: 1.5,\n textAlign: 'center',\n textDecoration: 'none',\n cursor: 'pointer',\n ...(variant === 'secondary'\n ? { backgroundColor: colors.surface, color: colors.accent, border: `1px solid ${colors.accent}` }\n : { backgroundColor: colors.accent, color: colors.onAccent, border: 'none' }),\n };\n}\n// Form-slot input chrome, shared with the editor's canvas (parity contract):\n// a `surface` card whatever the zone tone, only the border varies.\nexport const WEB_POPUP_FORM_INPUT_BORDER = '#D0D5DD';\nexport const WEB_POPUP_FORM_ERROR_COLOR = '#D92D20';\n/** The error red lifted for a dark background — the same Untitled UI ramp, three steps up. */\nexport const WEB_POPUP_FORM_ERROR_COLOR_DARK = '#FDA29B';\nexport function webPopupFormInputStyle(colors, borderColor = colors.border) {\n return {\n display: 'block',\n boxSizing: 'border-box',\n width: '100%',\n padding: '10px 12px',\n borderRadius: 6,\n fontSize: 14,\n fontFamily: 'inherit',\n lineHeight: 1.5,\n backgroundColor: colors.surface,\n color: colors.surfaceText,\n border: `1px solid ${borderColor}`,\n outline: 'none',\n };\n}\n// What a normalized form slot falls back to when the json omits the copy —\n// also the editor's defaults for a freshly added slot.\nexport const WEB_POPUP_FORM_DEFAULTS = {\n submitLabel: 'Subscribe',\n successMessage: 'Thanks for subscribing!',\n confirmEmailMessage: 'Please check your inbox and confirm your email.',\n};\n// What a normalized choice slot falls back to when the json omits the copy.\nexport const WEB_POPUP_CHOICE_DEFAULTS = {\n submitLabel: 'Save',\n successMessage: 'Thanks! Your choice is saved.',\n};\n// Same, for a rating slot.\nexport const WEB_POPUP_RATING_DEFAULTS = {\n submitLabel: 'Send',\n successMessage: 'Thanks for the feedback!',\n};\n// The scores a scale offers, in display order; thumbs are 0/1 so `score` stays\n// \"higher is better\" everywhere. Shared with the editor canvas (parity).\nexport function webPopupRatingScores(scale) {\n if (scale === 'nps')\n return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n if (scale === 'stars')\n return [1, 2, 3, 4, 5];\n return [0, 1];\n}\n/** Options a `choice` slot may carry; exported so the editor can't offer one normalization drops. */\nexport const WEB_POPUP_MAX_CHOICE_OPTIONS = 12;\n/** What a slot says when the host callback rejected: nothing actionable, so it's retryable. */\nexport const WEB_POPUP_RETRY_ERROR = 'Something went wrong. Please try again.';\nexport const WEB_POPUP_KEYFRAMES = `\n@keyframes pw-vpopup-fade { from { opacity: 0; } }\n@keyframes pw-vpopup-slide { from { opacity: 0; translate: 0 28px; } }\n@keyframes pw-vpopup-overlay { from { opacity: 0; } }\n@keyframes pw-vpopup-page { from { opacity: 0; } }\n`;\n// Page-switch transition: the incoming page's content fades in while explicit\n// px sizes glide instead of jumping (auto sizes still snap — 'auto' can't be\n// transitioned). One duration for both so they read as a single move.\nexport const WEB_POPUP_PAGE_TRANSITION_MS = 300;\n","// Hand-authored 24×24 stroke geometry, inline (no icon package in a script that\n// loads on the customer's site). EXHAUSTIVE: a name without geometry won't compile.\nexport const WEB_POPUP_GLYPH_PATHS = {\n bell: 'M6 10a6 6 0 0 1 12 0c0 4 1.5 5.5 2 6H4c.5-.5 2-2 2-6M10 20a2 2 0 0 0 4 0',\n gift: 'M3 11h18v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zM2.5 7h19v4h-19zM12 7v14'\n + 'M12 7c-1 0-3-.2-3.5-1a2 2 0 0 1 3.5-1 2 2 0 0 1 3.5 1c-.5.8-2.5 1-3.5 1z',\n cart: 'M2 4h2.2l2.4 11.2A2 2 0 0 0 8.6 17H19M6 7h15l-2.2 7.5H8'\n + 'M10.5 20a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M19.5 20a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0',\n chart: 'M3 21h18M7 21V11M12 21V6M17 21v-8',\n lock: 'M5 11h14v10H5zM8 11V8a4 4 0 0 1 8 0v3',\n calendar: 'M4 6h16v15H4zM4 10h16M9 3v4M15 3v4',\n check: 'M4 13l5 5L20 6',\n star: 'M12 3l2.9 5.9 6.5.9-4.7 4.6 1.1 6.5-5.8-3.1-5.8 3.1 1.1-6.5L2.6 9.8l6.5-.9z',\n clock: 'M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0M12 7v5l4 2',\n tag: 'M20.6 13.4l-7.2 7.2a2 2 0 0 1-2.8 0l-7-7A2 2 0 0 1 3 12.2V5a2 2 0 0 1 2-2h7.2a2 2 0 0 1 1.4.6'\n + 'l7 7a2 2 0 0 1 0 2.8zM9 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0',\n mail: 'M3 6h18v12H3zM3 7l9 6 9-6',\n phone: 'M7 2h10a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1M10 19h4',\n download: 'M12 3v12M7 11l5 5 5-5M4 20h16',\n play: 'M8 5l12 7-12 7z',\n shield: 'M12 3l8 3v6c0 5-3.4 8.6-8 10-4.6-1.4-8-5-8-10V6z',\n sparkle: 'M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z'\n + 'M18 15l.9 2.1 2.1.9-2.1.9-.9 2.1-.9-2.1L15 18l2.1-.9z',\n percent: 'M19 5L5 19M8.5 8.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0M20.5 15.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0',\n truck: 'M2 7h12v10H2zM14 10h4l3 3v4h-7'\n + 'M8.5 19a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M20 19a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0',\n ticket: 'M4 7h16v4a2 2 0 0 0 0 4v3H4v-3a2 2 0 0 0 0-4zM14 7v12',\n user: 'M20 21a8 8 0 0 0-16 0M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0',\n};\n/** The icon names a `glyph` slot may carry — derived, never a second list. */\nexport const WEB_POPUP_GLYPH_NAMES = Object.keys(WEB_POPUP_GLYPH_PATHS);\n/** The sizes a glyph slot may take, px; the first is the normalization default. */\nexport const WEB_POPUP_GLYPH_SIZES = [24, 32, 48];\n/** The thumb a 'thumbs' rating draws; not author-selectable, so not in the whitelist. */\nexport const WEB_POPUP_THUMB_UP_PATH = 'M8 21V10l3.5-7A2 2 0 0 1 14 5v5h4.5a2 2 0 0 1 2 2.4'\n + 'l-1.3 6A2 2 0 0 1 17.2 21zM8 10H3.5v11H8';\n","import { WEB_POPUP_LAYOUT_MAX_DEPTH, WEB_POPUP_LAYOUT_MAX_NODES } from './constants';\n// Validation + css conversion for the embedded layout tree. The json is\n// API-writable and its styles land inline on customers' pages, so every prop\n// is normalized against a whitelist on parse: numbers are clamped, strings\n// must match a strict css-length/track pattern, enums fall back to defaults,\n// unknown props are dropped. Unknown node TYPES degrade instead of breaking:\n// a node with children renders as a Vertical stack (a container from a NEWER\n// editor keeps its content visible on an older engine build), a childless\n// unknown node is dropped.\nconst CONTAINER_TYPES = ['Vertical', 'Horizontal', 'Columns', 'Rows'];\nconst ORDERS = ['normal', 'reverse'];\nconst ALIGN_ITEMS = ['start', 'center', 'end', 'stretch'];\nconst JUSTIFY_CONTENT = ['start', 'center', 'end', 'space-between'];\nconst TEXT_ALIGNS = ['left', 'center', 'right'];\nconst TONES = ['default', 'inverse'];\nconst MAX_LENGTH_PX = 2000;\n// String lengths carry a unit — clamp each to its own sane ceiling, like the\n// numeric branch: a wire value (\"9999rem\" scales off the HOST page's root\n// font size) must not be able to blow the popup past the viewport.\nconst LENGTH_UNIT_MAX = { px: MAX_LENGTH_PX, '%': 100, em: 125, rem: 125 };\nconst LENGTH_PATTERN = /^(\\d{1,4}(?:\\.\\d+)?)(px|%|em|rem)$/;\nconst TRACK_UNIT_MAX = { px: MAX_LENGTH_PX, '%': 100, fr: 100 };\nconst TRACK_PATTERN = /^(\\d{1,4}(?:\\.\\d+)?)(px|%|fr)$/;\nconst TRACK_KEYWORDS = ['auto', 'min-content', 'max-content'];\nconst MAX_TRACKS = 12;\nfunction oneOf(value, allowed) {\n return allowed.includes(value) ? value : undefined;\n}\nfunction cssLength(value) {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return Math.min(Math.max(value, 0), MAX_LENGTH_PX);\n }\n if (typeof value !== 'string')\n return undefined;\n const match = LENGTH_PATTERN.exec(value.trim());\n if (!match)\n return undefined;\n const [, amount, unit] = match;\n return `${Math.min(parseFloat(amount), LENGTH_UNIT_MAX[unit])}${unit}`;\n}\nconst BOX_SIDES = ['top', 'right', 'bottom', 'left'];\nfunction boxPadding(value) {\n const whole = cssLength(value);\n if (whole !== undefined)\n return whole;\n if (typeof value !== 'object' || value === null)\n return undefined;\n const sides = {};\n for (const side of BOX_SIDES) {\n const sideValue = cssLength(value[side]);\n if (sideValue !== undefined)\n sides[side] = sideValue;\n }\n return Object.keys(sides).length > 0 ? sides : undefined;\n}\nfunction trackSize(token) {\n if (TRACK_KEYWORDS.includes(token))\n return token;\n const match = TRACK_PATTERN.exec(token);\n if (!match)\n return undefined;\n const [, amount, unit] = match;\n return `${Math.min(parseFloat(amount), TRACK_UNIT_MAX[unit])}${unit}`;\n}\nfunction trackSizes(value) {\n if (typeof value === 'number') {\n return Number.isInteger(value) && value >= 1 && value <= MAX_TRACKS ? value : undefined;\n }\n if (typeof value !== 'string')\n return undefined;\n const tokens = value.trim().split(/\\s+/);\n if (tokens.length < 1 || tokens.length > MAX_TRACKS)\n return undefined;\n const clamped = tokens.map(trackSize);\n return clamped.every((token) => token !== undefined) ? clamped.join(' ') : undefined;\n}\nfunction nonEmptyString(value) {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\nfunction containerProps(raw) {\n const props = {};\n const gap = cssLength(raw.gap);\n if (gap !== undefined)\n props.gap = gap;\n const padding = boxPadding(raw.padding);\n if (padding !== undefined)\n props.padding = padding;\n const alignItems = oneOf(raw.alignItems, ALIGN_ITEMS);\n if (alignItems)\n props.alignItems = alignItems;\n const justifyContent = oneOf(raw.justifyContent, JUSTIFY_CONTENT);\n if (justifyContent)\n props.justifyContent = justifyContent;\n const alignContent = oneOf(raw.alignContent, JUSTIFY_CONTENT);\n if (alignContent)\n props.alignContent = alignContent;\n const backgroundImage = nonEmptyString(raw.backgroundImage);\n if (backgroundImage)\n props.backgroundImage = backgroundImage;\n const sizes = trackSizes(raw.sizes);\n if (sizes !== undefined)\n props.sizes = sizes;\n return props;\n}\nfunction normalizeNode(raw, depth, budget) {\n if (depth > WEB_POPUP_LAYOUT_MAX_DEPTH || budget.nodes <= 0)\n return null;\n if (typeof raw !== 'object' || raw === null)\n return null;\n budget.nodes -= 1;\n const node = raw;\n const props = (typeof node.props === 'object' && node.props !== null ? node.props : {});\n if (node.type === 'Content') {\n const content = nonEmptyString(props.content);\n if (!content)\n return null;\n const out = { type: 'Content', props: { content } };\n const align = oneOf(props.align, TEXT_ALIGNS);\n if (align)\n out.props.align = align;\n const tone = oneOf(props.tone, TONES);\n if (tone && tone !== 'default')\n out.props.tone = tone;\n return out;\n }\n if (node.type === 'Image') {\n const image = nonEmptyString(props.image);\n if (!image)\n return null;\n const out = { type: 'Image', props: { image } };\n return out;\n }\n if (!Array.isArray(node.children))\n return null;\n const type = oneOf(node.type, CONTAINER_TYPES) ?? 'Vertical';\n const children = [];\n for (const child of node.children) {\n const normalized = normalizeNode(child, depth + 1, budget);\n if (normalized)\n children.push(normalized);\n }\n const out = containerProps(props);\n // `order: 'reverse'` is applied right here and consumed: the normalized\n // tree carries the children already reordered (and the sizes template\n // reversed with them, so each child keeps its track) — the renderers and\n // the editor canvas never see the prop. Caveat for hand-authored json: the\n // \"keeps its track\" guarantee assumes one sizes token per child; with a\n // mismatched count the reversed template pairs children with different\n // tracks (grid itself would misalign such a template the same way).\n if (oneOf(props.order, ORDERS) === 'reverse') {\n children.reverse();\n if (typeof out.sizes === 'string')\n out.sizes = out.sizes.split(' ').reverse().join(' ');\n }\n return { type, props: out, children };\n}\n/**\n * Validate an embedded layout tree from the stored json. Returns the\n * normalized tree, or null when the value isn't a renderable tree at all —\n * the page is then dropped by resolveWebPopupPages.\n */\nexport function normalizeWebPopupLayout(raw) {\n return normalizeNode(raw, 0, { nodes: WEB_POPUP_LAYOUT_MAX_NODES });\n}\n// --- value substitution ($refs) ---------------------------------------------\n/** A page value key, as referenced from the tree by a `$key` token. */\nexport const WEB_POPUP_VALUE_KEY_PATTERN = /^[a-zA-Z][a-zA-Z0-9-]*$/;\nconst VALUE_REF_PATTERN = /^\\$([a-zA-Z][a-zA-Z0-9-]*)$/;\n// Every whitespace-separated token of the form $key is replaced; separators\n// survive, so both a whole-string prop ('$stackGap') and a token inside a\n// sizes template ('1fr $imageWidth') substitute with the same rule. An\n// unknown key stays as-is and fails the prop whitelist downstream — the prop\n// is dropped, same as any invalid literal.\nfunction substituteString(value, values) {\n if (!value.includes('$'))\n return value;\n return value\n .split(/(\\s+)/)\n .map((token) => {\n const key = VALUE_REF_PATTERN.exec(token)?.[1];\n // Own properties only: '$constructor' must stay an unknown ref, not\n // resolve to an Object.prototype member.\n return key !== undefined && Object.prototype.hasOwnProperty.call(values, key) ? values[key] : token;\n })\n .join('');\n}\n/**\n * Substitute a page's named values into its RAW layout tree — `$key` tokens\n * in string props become the values, verbatim. Runs BEFORE\n * normalizeWebPopupLayout (see resolveWebPopupPages), so a substituted value\n * passes exactly the whitelists/clamps a literal one would; substitution is\n * single-pass and normalizeWebPopupValues rejects values containing '$', so\n * refs can't chain. Binding keys (`content`, `image`, `backgroundImage`) are\n * never substituted — they already name params by design.\n */\nexport function substituteWebPopupLayoutValues(layout, values) {\n if (typeof layout !== 'object' || layout === null || Object.keys(values).length === 0)\n return layout;\n return substituteNode(layout, values, 0);\n}\nconst BINDING_PROPS = new Set(['content', 'image', 'backgroundImage']);\nfunction substituteNode(raw, values, depth) {\n if (depth > WEB_POPUP_LAYOUT_MAX_DEPTH || typeof raw !== 'object' || raw === null)\n return raw;\n const node = raw;\n const out = { ...node };\n if (typeof node.props === 'object' && node.props !== null) {\n const props = { ...node.props };\n for (const [key, value] of Object.entries(props)) {\n if (BINDING_PROPS.has(key))\n continue;\n if (typeof value === 'string') {\n props[key] = substituteString(value, values);\n }\n else if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n // Per-side paddings: one level of string sides.\n const sides = { ...value };\n for (const [side, sideValue] of Object.entries(sides)) {\n if (typeof sideValue === 'string')\n sides[side] = substituteString(sideValue, values);\n }\n props[key] = sides;\n }\n }\n out.props = props;\n }\n if (Array.isArray(node.children)) {\n out.children = node.children.map((child) => substituteNode(child, values, depth + 1));\n }\n return out;\n}\n// --- css conversion (shared by the reader and the editor's canvas) ---------\nexport function webPopupCssLength(value) {\n return typeof value === 'number' ? `${value}px` : value;\n}\nexport function webPopupPaddingValue(padding) {\n if (typeof padding === 'number' || typeof padding === 'string')\n return webPopupCssLength(padding);\n const side = (value) => (value === undefined ? '0' : webPopupCssLength(value));\n return `${side(padding.top)} ${side(padding.right)} ${side(padding.bottom)} ${side(padding.left)}`;\n}\n/** grid-template value for Columns/Rows: absent sizes = one 1fr per child. */\nexport function webPopupTracksValue(sizes, childCount) {\n if (typeof sizes === 'string')\n return sizes;\n const count = typeof sizes === 'number' ? sizes : Math.max(childCount, 1);\n return `repeat(${count}, 1fr)`;\n}\n// The scrim as a standalone gradient, for the layers that can't stack it in\n// the same background property (a background VIDEO paints its own element).\nexport function webPopupScrimGradient(dim = 0) {\n if (!(dim > 0))\n return null;\n const scrim = `rgba(16, 24, 40, ${Math.min(dim, 1)})`;\n return `linear-gradient(${scrim}, ${scrim})`;\n}\n/**\n * The cover-background css of a container that draws an image behind its\n * content. `dim` (0–1) is the image's scrim — a dark translucent layer\n * painted as a gradient stacked over the url() in the same property, so it\n * needs no extra element and rides along wherever the background is drawn.\n */\nexport function webPopupBackgroundImageStyle(src, dim = 0) {\n // JSON.stringify quotes + escapes the url, so an src can't break out of\n // the css function.\n const image = `url(${JSON.stringify(src)})`;\n const scrim = webPopupScrimGradient(dim);\n return {\n backgroundImage: scrim ? `${scrim}, ${image}` : image,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n };\n}\n/**\n * The inline style of a container node — grid, mirroring kit-helpers'\n * Vertical/Horizontal/Columns/Rows semantics. The background image is passed\n * resolved (looked up in the page's images by the caller) so this stays a\n * pure props → css mapping.\n */\nexport function webPopupContainerStyle(node, backgroundSrc, backgroundDim = 0) {\n const props = node.props ?? {};\n const style = { display: 'grid', minWidth: 0 };\n if (node.type === 'Horizontal')\n style.gridAutoFlow = 'column';\n if (node.type === 'Columns')\n style.gridTemplateColumns = webPopupTracksValue(props.sizes, node.children.length);\n if (node.type === 'Rows')\n style.gridTemplateRows = webPopupTracksValue(props.sizes, node.children.length);\n if (props.gap !== undefined)\n style.gap = webPopupCssLength(props.gap);\n if (props.padding !== undefined)\n style.padding = webPopupPaddingValue(props.padding);\n if (props.alignItems)\n style.alignItems = props.alignItems;\n if (props.justifyContent)\n style.justifyContent = props.justifyContent;\n if (props.alignContent)\n style.alignContent = props.alignContent;\n if (backgroundSrc)\n Object.assign(style, webPopupBackgroundImageStyle(backgroundSrc, backgroundDim));\n return style;\n}\n","// Scheme resolution for the popup palette: the authored light/dark roles plus\n// the derived ones (input surface, borders, the label over an accent fill).\nimport { WEB_POPUP_DEFAULT_COLORS, WEB_POPUP_FORM_ERROR_COLOR, WEB_POPUP_FORM_ERROR_COLOR_DARK, WEB_POPUP_FORM_INPUT_BORDER, WEB_POPUP_ON_ACCENT_COLOR, WEB_POPUP_TEXT_COLOR, WEB_POPUP_TEXT_SECONDARY_COLOR, } from './constants';\nconst HEX_RE = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;\nfunction parseHex(color) {\n const hex = HEX_RE.exec(color.trim())?.[1];\n if (!hex)\n return null;\n const full = hex.length === 3 ? hex.split('').map((c) => c + c).join('') : hex;\n return [0, 2, 4].map((i) => parseInt(full.slice(i, i + 2), 16));\n}\nfunction toHex([r, g, b]) {\n return `#${[r, g, b].map((v) => Math.max(0, Math.min(255, Math.round(v))).toString(16).padStart(2, '0')).join('')}`;\n}\nfunction rgbToHsl([r, g, b]) {\n const [rn, gn, bn] = [r / 255, g / 255, b / 255];\n const max = Math.max(rn, gn, bn);\n const min = Math.min(rn, gn, bn);\n const l = (max + min) / 2;\n if (max === min)\n return [0, 0, l];\n const d = max - min;\n const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n let h;\n if (max === rn)\n h = (gn - bn) / d + (gn < bn ? 6 : 0);\n else if (max === gn)\n h = (bn - rn) / d + 2;\n else\n h = (rn - gn) / d + 4;\n return [h / 6, s, l];\n}\nfunction hueToChannel(p, q, t) {\n let tn = t;\n if (tn < 0)\n tn += 1;\n if (tn > 1)\n tn -= 1;\n if (tn < 1 / 6)\n return p + (q - p) * 6 * tn;\n if (tn < 1 / 2)\n return q;\n if (tn < 2 / 3)\n return p + (q - p) * (2 / 3 - tn) * 6;\n return p;\n}\nfunction hslToRgb([h, s, l]) {\n if (s === 0) {\n const v = l * 255;\n return [v, v, v];\n }\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n return [\n hueToChannel(p, q, h + 1 / 3) * 255,\n hueToChannel(p, q, h) * 255,\n hueToChannel(p, q, h - 1 / 3) * 255,\n ];\n}\n// Mirror the light half onto [0.07, 0.5]: #FFFFFF lands on the dark canvas\n// tone and near-whites stay apart instead of collapsing into one floor.\nfunction foldLightness(l) {\n return l > 0.5 ? 0.07 + (1 - l) * ((0.5 - 0.07) / 0.5) : l;\n}\n// Mirror the dark half onto [0.5, 0.93]: #000000 lands short of glaring white.\nfunction liftLightness(l) {\n return l < 0.5 ? 0.93 - l * ((0.93 - 0.5) / 0.5) : l;\n}\n/** Hue and saturation survive; only lightness moves. Non-hex colors pass through. */\nexport function webPopupShiftColor(color, direction) {\n const rgb = parseHex(color);\n if (!rgb)\n return color;\n const [h, s, l] = rgbToHsl(rgb);\n return toHex(hslToRgb([h, s, direction === 'fold' ? foldLightness(l) : liftLightness(l)]));\n}\n/** `ratio` of `over` blended into `base`; either color non-hex = `base` unchanged. */\nexport function webPopupMixColor(base, over, ratio) {\n const a = parseHex(base);\n const b = parseHex(over);\n if (!a || !b)\n return base;\n return toHex(a.map((v, i) => v + (b[i] - v) * ratio));\n}\n/** `color` at `alpha` as rgba(); a non-hex color renders full-strength instead of being guessed at. */\nexport function webPopupColorAlpha(color, alpha) {\n const rgb = parseHex(color);\n if (!rgb || alpha >= 1)\n return color;\n const [r, g, b] = rgb;\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n}\nfunction isLightColor(color) {\n const rgb = parseHex(color);\n if (!rgb)\n return false;\n // Perceived luminance, not HSL lightness: #FFFF00 and #0000FF share l = 0.5.\n const [r, g, b] = rgb;\n return (0.299 * r + 0.587 * g + 0.114 * b) / 255 > 0.6;\n}\n// The dark counterpart of a light palette: text lifts, surfaces fold, the\n// accent and the over-image inverse color stay as authored.\nexport function autoDarkWebPopupColors(light) {\n return {\n background: webPopupShiftColor(light.background, 'fold'),\n accent: light.accent,\n text: webPopupShiftColor(light.text, 'lift'),\n textSecondary: webPopupShiftColor(light.textSecondary, 'lift'),\n textInverse: light.textInverse,\n };\n}\n// Light keeps the values the popup shipped with before dark mode existed\n// (white cards, grey border, white label) — enabling dark must not restyle it.\nfunction derivedColors(colors, scheme) {\n if (scheme === 'light') {\n return {\n surface: WEB_POPUP_DEFAULT_COLORS.background,\n surfaceText: WEB_POPUP_TEXT_COLOR,\n border: WEB_POPUP_FORM_INPUT_BORDER,\n onAccent: WEB_POPUP_ON_ACCENT_COLOR,\n error: WEB_POPUP_FORM_ERROR_COLOR,\n chromeIcon: WEB_POPUP_TEXT_SECONDARY_COLOR,\n };\n }\n return {\n surface: webPopupMixColor(colors.background, colors.text, 0.08),\n surfaceText: colors.text,\n border: webPopupMixColor(colors.background, colors.text, 0.24),\n onAccent: isLightColor(colors.accent) ? WEB_POPUP_TEXT_COLOR : WEB_POPUP_ON_ACCENT_COLOR,\n error: WEB_POPUP_FORM_ERROR_COLOR_DARK,\n chromeIcon: colors.textSecondary,\n };\n}\n/** The dark palette a popup renders with: authored roles over the autogenerated ones. */\nexport function webPopupDarkColors(light, dark) {\n return { ...autoDarkWebPopupColors(light), ...(dark?.colors ?? {}) };\n}\n/** True when the popup opts into dark mode at all — the host's cue to watch the media query. */\nexport function webPopupDarkEnabled(chrome) {\n return chrome.dark?.enabled === true;\n}\n// Every color a renderer needs, for the scheme actually drawn. Asking for\n// 'dark' on a popup without dark mode returns the light palette.\nexport function resolveWebPopupColors(chrome, scheme = 'light') {\n const effective = scheme === 'dark' && webPopupDarkEnabled(chrome) ? 'dark' : 'light';\n const colors = effective === 'dark' ? webPopupDarkColors(chrome.colors, chrome.dark) : chrome.colors;\n return { ...colors, scheme: effective, ...derivedColors(colors, effective) };\n}\n","// Countdown math: `endTime` is a LOCAL WALL CLOCK in `timezone` (empty = UTC),\n// never an instant. Pure, `now` passed in — the renderer ticks, this computes.\nconst WALL_CLOCK = /^(\\d{4})-(\\d{2})-(\\d{2})[T ](\\d{2}):(\\d{2})(?::(\\d{2}))?$/;\n// One formatter per zone: the reader asks for the remainder once a second per\n// timer slot, and constructing an Intl.DateTimeFormat is the expensive part.\nconst zoneFormatters = new Map();\nfunction zoneFormatter(timeZone) {\n const cached = zoneFormatters.get(timeZone);\n if (cached)\n return cached;\n try {\n const formatter = new Intl.DateTimeFormat('en-US', {\n timeZone,\n hour12: false,\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n });\n zoneFormatters.set(timeZone, formatter);\n return formatter;\n }\n catch {\n // An unknown/unsupported IANA name — the engine can't place a wall clock in it.\n return null;\n }\n}\n/** Can this engine compute offsets in the zone? Empty = the contract's UTC, so supported. */\nexport function webPopupTimeZoneSupported(timezone) {\n return !timezone || zoneFormatter(timezone) !== null;\n}\n// The zone's offset from UTC at an instant, in ms: render local parts, read\n// them back as if they were UTC, take the difference.\nfunction zoneOffsetMs(instantMs, formatter) {\n const parts = formatter.formatToParts(new Date(instantMs));\n const read = (type) => (Number(parts.find((part) => part.type === type)?.value ?? '0'));\n // hour12: false still renders midnight as '24' in some engines.\n const asUtc = Date.UTC(read('year'), read('month') - 1, read('day'), read('hour') % 24, read('minute'), read('second'));\n return asUtc - instantMs;\n}\nconst DAY_MS = 86400000;\n// Every offset that can apply to a wall clock this close to a DST switch: the\n// day before, the naive instant, the day after.\nfunction candidateOffsets(wallAsUtc, formatter) {\n const offsets = [];\n for (const probe of [wallAsUtc - DAY_MS, wallAsUtc, wallAsUtc + DAY_MS]) {\n const offset = zoneOffsetMs(probe, formatter);\n if (!offsets.includes(offset))\n offsets.push(offset);\n }\n return offsets;\n}\n// The reader asks for the remainder once a second per slot, and the deadline\n// never moves; a handful of entries, cleared wholesale if a document is absurd.\nconst deadlines = new Map();\n/** The instant (epoch ms) a wall clock names in a zone, or null when this engine can't place it. */\nexport function webPopupWallClockMs(endTime, timezone) {\n const cacheKey = `${endTime}|${timezone}`;\n const cached = deadlines.get(cacheKey);\n if (cached !== undefined)\n return cached;\n const resolved = resolveWallClockMs(endTime, timezone);\n if (deadlines.size > 100)\n deadlines.clear();\n deadlines.set(cacheKey, resolved);\n return resolved;\n}\nfunction resolveWallClockMs(endTime, timezone) {\n const match = WALL_CLOCK.exec((endTime || '').trim());\n if (!match)\n return null;\n const [, year, month, day, hour, minute, rawSecond] = match.map(Number);\n // The seconds group is optional — an absent one reads as NaN, not 0.\n const second = Number.isNaN(rawSecond) ? 0 : rawSecond;\n if (month < 1 || month > 12 || day < 1 || day > 31)\n return null;\n if (hour > 23 || minute > 59 || second > 59)\n return null;\n const wallAsUtc = Date.UTC(year, month - 1, day, hour, minute, second);\n // Date.UTC rolls impossible days over (Feb 30 → Mar 2); reject instead.\n const rolled = new Date(wallAsUtc);\n if (rolled.getUTCMonth() !== month - 1 || rolled.getUTCDate() !== day)\n return null;\n if (!timezone)\n return wallAsUtc;\n const formatter = zoneFormatter(timezone);\n if (!formatter)\n return null;\n // One rule for every zone, whatever the sign of its offset: an offset counts\n // when the instant it produces reads back as the wall clock asked for.\n const offsets = candidateOffsets(wallAsUtc, formatter);\n const instants = offsets\n .filter((offset) => zoneOffsetMs(wallAsUtc - offset, formatter) === offset)\n .map((offset) => wallAsUtc - offset);\n // An ambiguous wall clock (fall back) takes the FIRST of its two instants.\n if (instants.length > 0)\n return Math.min(...instants);\n // None reads back: the wall clock is inside a spring-forward gap. The pre-gap\n // offset is the smaller one, so this rolls forward to just past the gap.\n return wallAsUtc - Math.min(...offsets);\n}\n/** What's left at `nowMs`, by unit; a passed OR uncomputable deadline reads as all zeros. */\nexport function webPopupTimerRemaining(endTime, timezone, nowMs) {\n const deadline = webPopupWallClockMs(endTime, timezone);\n const total = deadline === null ? 0 : Math.max(0, deadline - nowMs);\n const seconds = Math.floor(total / 1000);\n return {\n total,\n days: Math.floor(seconds / 86400),\n hours: Math.floor(seconds / 3600) % 24,\n minutes: Math.floor(seconds / 60) % 60,\n seconds: seconds % 60,\n };\n}\n// Unit labels by ISO 639-1 code, the editor's 14 languages; anything else = English.\n// NOTE: not written by native speakers — worth a review before customers see them.\nconst TIMER_LABELS = {\n en: { days: 'Days', hours: 'Hours', minutes: 'Minutes', seconds: 'Seconds' },\n ru: { days: 'Дни', hours: 'Часы', minutes: 'Минуты', seconds: 'Секунды' },\n de: { days: 'Tage', hours: 'Stunden', minutes: 'Minuten', seconds: 'Sekunden' },\n es: { days: 'Días', hours: 'Horas', minutes: 'Minutos', seconds: 'Segundos' },\n fr: { days: 'Jours', hours: 'Heures', minutes: 'Minutes', seconds: 'Secondes' },\n pt: { days: 'Dias', hours: 'Horas', minutes: 'Minutos', seconds: 'Segundos' },\n ja: { days: '日', hours: '時間', minutes: '分', seconds: '秒' },\n ko: { days: '일', hours: '시간', minutes: '분', seconds: '초' },\n zh: { days: '天', hours: '小时', minutes: '分', seconds: '秒' },\n hi: { days: 'दिन', hours: 'घंटे', minutes: 'मिनट', seconds: 'सेकंड' },\n bn: { days: 'দিন', hours: 'ঘণ্টা', minutes: 'মিনিট', seconds: 'সেকেন্ড' },\n ar: { days: 'أيام', hours: 'ساعات', minutes: 'دقائق', seconds: 'ثوان' },\n he: { days: 'ימים', hours: 'שעות', minutes: 'דקות', seconds: 'שניות' },\n th: { days: 'วัน', hours: 'ชั่วโมง', minutes: 'นาที', seconds: 'วินาที' },\n};\n/** The unit labels for a language code; empty/unknown = English. */\nexport function webPopupTimerLabels(language) {\n return TIMER_LABELS[language] ?? TIMER_LABELS.en;\n}\n","import { SAFE_URL_PROTOCOL, WEB_POPUP_CHOICE_DEFAULTS, WEB_POPUP_DEFAULT_COLORS, WEB_POPUP_FORM_DEFAULTS, WEB_POPUP_MAX_CHOICE_OPTIONS, WEB_POPUP_RATING_DEFAULTS, WEB_POPUP_VERSION, } from './constants';\nimport { WEB_POPUP_GLYPH_NAMES, WEB_POPUP_GLYPH_SIZES } from './glyphs';\nimport { normalizeWebPopupLayout, substituteWebPopupLayoutValues, WEB_POPUP_VALUE_KEY_PATTERN, } from './layout';\nimport { autoDarkWebPopupColors } from './palette';\nimport { webPopupTimeZoneSupported, webPopupWallClockMs } from './timer';\n// Sanitize a user-entered button URL before it lands in an href: https/http/\n// mailto/tel and page-relative links only.\nexport function safeUrl(url) {\n const trimmed = (url || '').trim();\n if (!trimmed)\n return undefined;\n if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed.startsWith('?'))\n return trimmed;\n if (SAFE_URL_PROTOCOL.test(trimmed))\n return trimmed;\n return undefined;\n}\n/**\n * The target/rel pair a popup link renders with: only an exact '_self' opts\n * out of the default new tab (and of its noreferrer, which same-tab\n * navigation doesn't need). One rule for both link kinds — the reader's\n * button anchors and the sanitizer's inline text links.\n */\nexport function webPopupLinkTargetAttrs(target) {\n return target === '_self' ? { target: '_self' } : { target: '_blank', rel: 'noreferrer' };\n}\nconst SANITIZE_ALLOWED_TAGS = new Set(['STRONG', 'B', 'EM', 'I', 'U', 'BR', 'A']);\nfunction copySanitized(from, to, doc) {\n for (const child of Array.from(from.childNodes)) {\n if (child.nodeType === 3 /* text */) {\n to.appendChild(doc.createTextNode(child.textContent ?? ''));\n continue;\n }\n if (child.nodeType !== 1 /* element */)\n continue;\n const el = child;\n // Unknown tags are unwrapped — their children survive as plain content.\n if (!SANITIZE_ALLOWED_TAGS.has(el.tagName)) {\n copySanitized(el, to, doc);\n continue;\n }\n const clean = doc.createElement(el.tagName.toLowerCase());\n if (el.tagName === 'A') {\n const href = safeUrl(el.getAttribute('href') ?? undefined);\n if (href)\n clean.setAttribute('href', href);\n const { target, rel } = webPopupLinkTargetAttrs(el.getAttribute('target'));\n clean.setAttribute('target', target);\n if (rel)\n clean.setAttribute('rel', rel);\n }\n to.appendChild(clean);\n copySanitized(el, clean, doc);\n }\n}\n/**\n * Sanitize a text slot's html before it's injected into the page. The editor\n * only ever writes inline formatting, but the json travels through a public\n * API and renders on customers' sites — so on render only the inline tags\n * survive (anything else is unwrapped to its text), every attribute is\n * dropped, and links keep only a safeUrl-approved href plus their tab choice\n * (target=\"_self\" stays; everything else opens in a new tab).\n */\nexport function sanitizeWebPopupHtml(html) {\n // No '<' → no elements can form; entities in plain text are already-valid\n // html and pass through untouched.\n if (!html.includes('<'))\n return html;\n const parsed = new DOMParser().parseFromString(html, 'text/html');\n const out = parsed.createElement('div');\n copySanitized(parsed.body, out, parsed);\n return out.innerHTML;\n}\nfunction colorString(value) {\n return typeof value === 'string' && value ? value : undefined;\n}\n/**\n * The popup palette from API-writable params: `colors` entries when present,\n * the legacy top-level background/accent underneath, palette defaults for the\n * rest — always a complete WebPopupColors.\n */\nexport function normalizeWebPopupColors(params) {\n const colors = typeof params.colors === 'object' && params.colors !== null\n ? params.colors\n : {};\n return {\n background: colorString(colors.background)\n ?? colorString(params.background) ?? WEB_POPUP_DEFAULT_COLORS.background,\n accent: colorString(colors.accent) ?? colorString(params.accent) ?? WEB_POPUP_DEFAULT_COLORS.accent,\n text: colorString(colors.text) ?? WEB_POPUP_DEFAULT_COLORS.text,\n textSecondary: colorString(colors.textSecondary) ?? WEB_POPUP_DEFAULT_COLORS.textSecondary,\n textInverse: colorString(colors.textInverse) ?? WEB_POPUP_DEFAULT_COLORS.textInverse,\n };\n}\n// Authored dark entries over the ones autogenerated from the light palette.\n// Absent `dark` = no dark mode; an authored palette switched off is not that.\nexport function normalizeWebPopupDark(params, light) {\n const raw = params.dark;\n if (typeof raw !== 'object' || raw === null)\n return undefined;\n const dark = raw;\n const authored = typeof dark.colors === 'object' && dark.colors !== null\n ? dark.colors\n : {};\n const auto = autoDarkWebPopupColors(light);\n return {\n enabled: dark.enabled === true,\n colors: {\n background: colorString(authored.background) ?? auto.background,\n accent: colorString(authored.accent) ?? auto.accent,\n text: colorString(authored.text) ?? auto.text,\n textSecondary: colorString(authored.textSecondary) ?? auto.textSecondary,\n textInverse: colorString(authored.textInverse) ?? auto.textInverse,\n },\n };\n}\n// Parse stored PopupFormContent.json into the popup model. Returns null for\n// anything that isn't a version-2 popup with at least one page — including\n// the retired version-1 flat-layout format and pre-engine content with no\n// `version` field at all, which callers should treat as broken. The palette\n// comes out complete: colors entries → legacy top-level background/accent →\n// defaults.\nexport function parseWebPopupJson(json) {\n let raw;\n try {\n raw = JSON.parse(json);\n }\n catch {\n return null;\n }\n if (typeof raw !== 'object' || raw === null)\n return null;\n const candidate = raw;\n if (candidate.version !== WEB_POPUP_VERSION)\n return null;\n const params = candidate.params;\n if (typeof params !== 'object' || params === null)\n return null;\n if (!Array.isArray(params.pages) || params.pages.length === 0)\n return null;\n const colors = normalizeWebPopupColors(params);\n const dark = normalizeWebPopupDark(params, colors);\n return {\n version: WEB_POPUP_VERSION,\n params: { ...params, colors, ...(dark ? { dark } : {}) },\n };\n}\n/** The editor's save path: model → PopupFormContent.json string. */\nexport function stringifyWebPopup(params) {\n const compat = {\n ...params,\n background: params.colors.background,\n accent: params.colors.accent,\n };\n const payload = { version: WEB_POPUP_VERSION, params: compat };\n return JSON.stringify(payload);\n}\nconst IMAGE_FITS = ['cover', 'contain'];\nconst MAX_IMAGE_BLUR = 100;\n// Bomb protection for the page content, mirroring the layout tree's\n// depth/node caps: the tree allows up to ~100 Content nodes and several may\n// reference the same zone, so unbounded zones/slots would amplify into\n// thousands of sanitize+render passes on the customer's page.\nconst MAX_IMAGES = 20;\nconst MAX_ZONES = 20;\nconst MAX_ZONE_SLOTS = 50;\n// A media param's video, or undefined when it has none / an unusable url —\n// then the param stays a plain image and the poster is all that renders.\nfunction normalizeVideo(raw) {\n if (typeof raw !== 'object' || raw === null)\n return undefined;\n const video = raw;\n const src = safeUrl(typeof video.src === 'string' ? video.src : undefined);\n if (!src)\n return undefined;\n return {\n src,\n ...(video.controls === true ? { controls: true } : {}),\n ...(video.loop === false ? { loop: false } : {}),\n };\n}\n// The images come from API-writable json — keep only well-formed entries,\n// with the presentation props (fit/blur) validated like the layout tree's.\nfunction normalizeImages(raw) {\n if (!Array.isArray(raw))\n return [];\n const out = [];\n for (const img of raw) {\n if (out.length >= MAX_IMAGES)\n break;\n if (typeof img !== 'object' || img === null)\n continue;\n if (typeof img.key !== 'string' || !img.key)\n continue;\n if (typeof img.src !== 'string')\n continue;\n const video = normalizeVideo(img.video);\n out.push({\n key: img.key,\n label: typeof img.label === 'string' ? img.label : '',\n src: img.src,\n ...(video ? { video } : {}),\n ...(typeof img.mediaId === 'string' && img.mediaId ? { mediaId: img.mediaId } : {}),\n ...(IMAGE_FITS.includes(img.fit) ? { fit: img.fit } : {}),\n ...(typeof img.blur === 'number' && Number.isFinite(img.blur) && img.blur > 0\n ? { blur: Math.min(img.blur, MAX_IMAGE_BLUR) }\n : {}),\n ...(typeof img.dim === 'number' && Number.isFinite(img.dim) && img.dim > 0\n ? { dim: Math.min(img.dim, 1) }\n : {}),\n });\n }\n return out;\n}\nconst MAX_VALUES = 20;\nconst MAX_VALUE_LENGTH = 64;\nconst MAX_SELECT_OPTIONS = 20;\nconst LENGTH_CONTROL_UNITS = ['px', '%', 'em', 'rem', 'fr'];\nfunction finiteNumber(value) {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n// Per-unit { min?, max? } overrides for a length control, keyed by a\n// whitelisted unit. Non-object input, unknown unit keys and non-finite bounds\n// are dropped; an all-empty map returns undefined so the field is omitted.\nfunction normalizeControlRanges(raw) {\n if (typeof raw !== 'object' || raw === null)\n return undefined;\n const out = {};\n for (const unit of LENGTH_CONTROL_UNITS) {\n const entry = raw[unit];\n if (typeof entry !== 'object' || entry === null)\n continue;\n const min = finiteNumber(entry.min);\n const max = finiteNumber(entry.max);\n if (min === undefined && max === undefined)\n continue;\n out[unit] = { ...(min !== undefined ? { min } : {}), ...(max !== undefined ? { max } : {}) };\n }\n return Object.keys(out).length > 0 ? out : undefined;\n}\n// The control is editor metadata from API-writable json: enum-whitelisted\n// kind, clamped numbers, capped options. Anything malformed drops to\n// undefined — the editor falls back to a plain text input.\nfunction normalizeValueControl(raw) {\n if (typeof raw !== 'object' || raw === null)\n return undefined;\n const control = raw;\n if (control.kind === 'text')\n return { kind: 'text' };\n if (control.kind === 'length' || control.kind === 'percent') {\n const min = finiteNumber(control.min);\n const max = finiteNumber(control.max);\n const units = control.kind === 'length' && Array.isArray(control.units)\n ? control.units.filter((u) => (LENGTH_CONTROL_UNITS.includes(u)))\n : [];\n // Per-unit min/max overrides: whitelisted unit keys, finite bounds. Any\n // malformed entry is skipped; an empty result drops the whole field.\n const ranges = control.kind === 'length'\n ? normalizeControlRanges(control.ranges)\n : undefined;\n return {\n kind: control.kind,\n ...(min !== undefined ? { min } : {}),\n ...(max !== undefined ? { max } : {}),\n ...(units.length > 0 ? { units } : {}),\n ...(ranges ? { ranges } : {}),\n };\n }\n if (control.kind === 'select' && Array.isArray(control.options)) {\n const options = [];\n for (const option of control.options) {\n if (options.length >= MAX_SELECT_OPTIONS)\n break;\n if (typeof option !== 'object' || option === null)\n continue;\n if (typeof option.value !== 'string' || option.value.length > MAX_VALUE_LENGTH)\n continue;\n options.push({ value: option.value, label: typeof option.label === 'string' ? option.label : option.value });\n }\n if (options.length > 0)\n return { kind: 'select', options };\n }\n return undefined;\n}\n/**\n * The page's named layout values from API-writable json: capped count,\n * whitelisted keys, short '$'-free value strings (substitution is single-pass\n * and this keeps refs from even *looking* chainable), validated controls.\n */\nexport function normalizeWebPopupValues(raw) {\n if (!Array.isArray(raw))\n return [];\n const out = [];\n for (const value of raw) {\n if (out.length >= MAX_VALUES)\n break;\n if (typeof value !== 'object' || value === null)\n continue;\n if (typeof value.key !== 'string' || !WEB_POPUP_VALUE_KEY_PATTERN.test(value.key))\n continue;\n if (typeof value.value !== 'string' || value.value.length > MAX_VALUE_LENGTH || value.value.includes('$'))\n continue;\n if (out.some((v) => v.key === value.key))\n continue;\n const control = normalizeValueControl(value.control);\n out.push({\n key: value.key,\n label: typeof value.label === 'string' ? value.label : '',\n value: value.value,\n ...(control ? { control } : {}),\n });\n }\n return out;\n}\n/** The values as a substitution map (see substituteWebPopupLayoutValues). */\nexport function webPopupValuesMap(values) {\n return Object.fromEntries(values.map((v) => [v.key, v.value]));\n}\nconst FORM_FIELD_KINDS = ['email', 'firstName', 'lastName', 'phone', 'custom'];\nconst BUTTON_VARIANTS = ['primary', 'secondary'];\nconst MAX_FORM_FIELDS = 10;\n// A form slot's fields from API-writable json: capped, whitelisted kinds,\n// deduped keys. The submit contract needs an email — when none survives, one\n// is injected up front (the slot stays renderable/editable rather than being\n// dropped: the editor canvas resolves through this same pipeline). Email\n// fields are always required — the payload can't form without a value.\nfunction normalizeFormFields(raw) {\n const out = [];\n if (Array.isArray(raw)) {\n for (const field of raw) {\n if (out.length >= MAX_FORM_FIELDS)\n break;\n if (typeof field !== 'object' || field === null)\n continue;\n if (typeof field.key !== 'string' || !field.key)\n continue;\n if (!FORM_FIELD_KINDS.includes(field.kind))\n continue;\n if (out.some((f) => f.key === field.key))\n continue;\n out.push({\n key: field.key,\n kind: field.kind,\n label: typeof field.label === 'string' ? field.label : '',\n placeholder: typeof field.placeholder === 'string' ? field.placeholder : '',\n required: field.kind === 'email' || field.required === true,\n ...(field.kind === 'custom' && typeof field.tag === 'string' && field.tag ? { tag: field.tag } : {}),\n });\n }\n }\n if (!out.some((f) => f.kind === 'email')) {\n let key = 'field-email';\n while (out.some((f) => f.key === key))\n key = `${key}-1`;\n out.unshift({ key, kind: 'email', label: 'Email', placeholder: '', required: true });\n }\n return out.slice(0, MAX_FORM_FIELDS);\n}\nconst CHOICE_CONTROLS = ['checkbox', 'chips'];\nconst RATING_SCALES = ['nps', 'stars', 'thumbs'];\nconst RATING_SUBMIT_MODES = ['instant', 'button'];\nconst TIMER_EXPIRE_ACTIONS = ['keep', 'hide-popup', 'page'];\nconst LANGUAGE_CODE = /^[a-z]{2}$/i;\nconst HEX_COLOR = /^#[0-9a-fA-F]{6}$/;\n// Authored strings from API-writable json land in the popup's own markup on a\n// customer's page — capped so a 100kB \"label\" can't be one.\nconst MAX_SLOT_STRING = 120;\nconst MAX_SLOT_MESSAGE = 500;\nfunction slotString(value, max = MAX_SLOT_STRING) {\n return typeof value === 'string' ? value.trim().slice(0, max) : '';\n}\n// A capped string with a fallback for when the json omits it (or sends blanks).\nfunction slotStringOr(value, fallback, max = MAX_SLOT_STRING) {\n return slotString(value, max) || fallback;\n}\n/** An ISO 639-1 code, lowercased; anything else = '' (the renderer's 'en'). */\nfunction normalizeLanguage(value) {\n const code = slotString(value, 8);\n return LANGUAGE_CODE.test(code) ? code.toLowerCase() : '';\n}\n// Capped, non-empty values, deduped, label falling back to the value. An\n// option-less slot survives, like an unbound form: the editor must still edit it.\nfunction normalizeChoiceOptions(raw) {\n if (!Array.isArray(raw))\n return [];\n const out = [];\n for (const option of raw) {\n if (out.length >= WEB_POPUP_MAX_CHOICE_OPTIONS)\n break;\n if (typeof option !== 'object' || option === null)\n continue;\n const value = slotString(option.value);\n if (!value)\n continue;\n if (out.some((existing) => existing.value === value))\n continue;\n const tagValue = slotString(option.tagValue);\n out.push({\n value,\n label: slotStringOr(option.label, value),\n ...(tagValue ? { tagValue } : {}),\n });\n }\n return out;\n}\n// The selection bounds against the surviving option count: 0 = unbounded, and\n// a max under the min would leave the slot unsubmittable — the min wins.\nfunction normalizeChoiceBounds(slot, options) {\n const bound = (value) => {\n const n = finiteNumber(value);\n return n === undefined || n <= 0 ? 0 : Math.min(Math.floor(n), options);\n };\n const min = bound(slot.min);\n const max = bound(slot.max);\n return { min, max: max > 0 ? Math.max(min, max) : 0 };\n}\n// Per-type slot validation. Text and button entries pass through UNTOUCHED\n// when well-formed (stored popups predate this check — don't rewrite them);\n// a form slot is rebuilt field by field; an unknown slot type is dropped so\n// slot types added after this engine build degrade to absence, not a crash.\nfunction normalizeSlots(raw) {\n const out = [];\n for (const slot of raw) {\n if (out.length >= MAX_ZONE_SLOTS)\n break;\n if (typeof slot !== 'object' || slot === null)\n continue;\n if (typeof slot.key !== 'string' || !slot.key)\n continue;\n if (slot.type === 'text') {\n if (typeof slot.html === 'string')\n out.push(slot);\n continue;\n }\n if (slot.type === 'button') {\n // An action-less button would crash the renderer on the action switch.\n if (typeof slot.action === 'object' && slot.action !== null && typeof slot.action.type === 'string') {\n out.push(slot);\n }\n continue;\n }\n if (slot.type === 'timer') {\n // An unsupported zone name degrades to the contract's UTC rather than\n // dropping the countdown.\n const zone = slotString(slot.timezone, 64);\n const timezone = webPopupTimeZoneSupported(zone) ? zone : '';\n const endTime = slotString(slot.endTime, 32);\n // No computable deadline = nothing to count down to.\n if (webPopupWallClockMs(endTime, timezone) === null)\n continue;\n const expirePage = slotString(slot.expirePage);\n const onExpire = TIMER_EXPIRE_ACTIONS.includes(slot.onExpire)\n ? slot.onExpire\n : 'keep';\n // 'page' without a target page is 'keep' — the renderer never has to\n // guess where a pageless jump should land.\n const expires = onExpire === 'page' && !expirePage ? 'keep' : onExpire;\n out.push({\n type: 'timer',\n key: slot.key,\n endTime,\n timezone,\n language: normalizeLanguage(slot.language),\n showLabels: slot.showLabels !== false,\n onExpire: expires,\n ...(expires === 'page' ? { expirePage } : {}),\n });\n continue;\n }\n if (slot.type === 'choice') {\n const options = normalizeChoiceOptions(slot.options);\n const { min, max } = normalizeChoiceBounds(slot, options.length);\n out.push({\n type: 'choice',\n key: slot.key,\n control: CHOICE_CONTROLS.includes(slot.control)\n ? slot.control\n : 'checkbox',\n tagName: slotString(slot.tagName),\n options,\n min,\n max,\n submitLabel: slotStringOr(slot.submitLabel, WEB_POPUP_CHOICE_DEFAULTS.submitLabel),\n submitVariant: BUTTON_VARIANTS.includes(slot.submitVariant)\n ? slot.submitVariant\n : 'primary',\n successMessage: slotStringOr(slot.successMessage, WEB_POPUP_CHOICE_DEFAULTS.successMessage, MAX_SLOT_MESSAGE),\n });\n continue;\n }\n if (slot.type === 'rating') {\n const labels = typeof slot.labels === 'object' && slot.labels !== null\n ? slot.labels\n : {};\n out.push({\n type: 'rating',\n key: slot.key,\n // A malformed scale renders as stars: five buttons read the same in\n // every language, which an 0..10 row does not.\n scale: RATING_SCALES.includes(slot.scale) ? slot.scale : 'stars',\n labels: { low: slotString(labels.low), high: slotString(labels.high) },\n submitMode: RATING_SUBMIT_MODES.includes(slot.submitMode)\n ? slot.submitMode\n : 'instant',\n submitLabel: slotStringOr(slot.submitLabel, WEB_POPUP_RATING_DEFAULTS.submitLabel),\n eventName: slotString(slot.eventName),\n successMessage: slotStringOr(slot.successMessage, WEB_POPUP_RATING_DEFAULTS.successMessage, MAX_SLOT_MESSAGE),\n });\n continue;\n }\n if (slot.type === 'glyph') {\n // An unknown icon name has no geometry to draw — dropped, exactly like\n // an unknown slot type.\n if (!WEB_POPUP_GLYPH_NAMES.includes(slot.name))\n continue;\n out.push({\n type: 'glyph',\n key: slot.key,\n name: slot.name,\n size: WEB_POPUP_GLYPH_SIZES.includes(slot.size)\n ? slot.size\n : WEB_POPUP_GLYPH_SIZES[0],\n color: typeof slot.color === 'string' && HEX_COLOR.test(slot.color) ? slot.color : '',\n });\n continue;\n }\n if (slot.type === 'email-subscription-form') {\n out.push({\n type: 'email-subscription-form',\n key: slot.key,\n formCode: typeof slot.formCode === 'string' ? slot.formCode : '',\n fields: normalizeFormFields(slot.fields),\n submitLabel: typeof slot.submitLabel === 'string' && slot.submitLabel\n ? slot.submitLabel\n : WEB_POPUP_FORM_DEFAULTS.submitLabel,\n submitVariant: BUTTON_VARIANTS.includes(slot.submitVariant)\n ? slot.submitVariant\n : 'primary',\n ...(typeof slot.privacy === 'object' && slot.privacy !== null\n && typeof slot.privacy.checkboxLabel === 'string'\n ? {\n privacy: {\n checkboxLabel: slot.privacy.checkboxLabel,\n url: typeof slot.privacy.url === 'string' ? slot.privacy.url : '',\n linkLabel: typeof slot.privacy.linkLabel === 'string' ? slot.privacy.linkLabel : '',\n },\n }\n : {}),\n successMessage: typeof slot.successMessage === 'string' && slot.successMessage\n ? slot.successMessage\n : WEB_POPUP_FORM_DEFAULTS.successMessage,\n confirmEmailMessage: typeof slot.confirmEmailMessage === 'string' && slot.confirmEmailMessage\n ? slot.confirmEmailMessage\n : WEB_POPUP_FORM_DEFAULTS.confirmEmailMessage,\n });\n }\n // Unknown slot type → dropped.\n }\n return out;\n}\n// The zones come from API-writable json — keep only well-formed entries\n// (capped, see above) so the renderer can trust the shape.\nfunction normalizeContents(raw) {\n if (!Array.isArray(raw))\n return [];\n const out = [];\n for (const zone of raw) {\n if (out.length >= MAX_ZONES)\n break;\n if (typeof zone !== 'object' || zone === null)\n continue;\n if (typeof zone.key !== 'string' || !zone.key)\n continue;\n if (!Array.isArray(zone.slots))\n continue;\n out.push({\n key: zone.key,\n label: typeof zone.label === 'string' ? zone.label : '',\n slots: normalizeSlots(zone.slots),\n });\n }\n return out;\n}\n/**\n * Every subscription form code the popup's form slots reference (unique,\n * empty codes skipped) — what a host records view stats for. Reads the RAW\n * params (tolerant of malformed slots), so it works on parsed-but-unresolved\n * json.\n */\nexport function collectWebPopupFormCodes(params) {\n const out = new Set();\n for (const page of params.pages) {\n if (!Array.isArray(page?.contents))\n continue;\n for (const zone of page.contents) {\n if (!Array.isArray(zone?.slots))\n continue;\n for (const slot of zone.slots) {\n if (typeof slot !== 'object' || slot === null)\n continue;\n if (slot.type !== 'email-subscription-form')\n continue;\n if (typeof slot.formCode === 'string' && slot.formCode)\n out.add(slot.formCode);\n }\n }\n }\n return [...out];\n}\n// Has a 'hide-popup' countdown run out? The HOST asks before showing, at SHOW\n// time; any page counts, and a malformed timer reads as 'not expired'.\nexport function webPopupExpired(params, nowMs) {\n for (const page of params.pages) {\n if (!Array.isArray(page?.contents))\n continue;\n for (const zone of page.contents) {\n if (!Array.isArray(zone?.slots))\n continue;\n for (const slot of zone.slots) {\n if (typeof slot !== 'object' || slot === null)\n continue;\n if (slot.type !== 'timer' || slot.onExpire !== 'hide-popup')\n continue;\n if (typeof slot.endTime !== 'string')\n continue;\n const timezone = typeof slot.timezone === 'string' ? slot.timezone : '';\n const deadline = webPopupWallClockMs(slot.endTime, timezone);\n if (deadline !== null && deadline <= nowMs)\n return true;\n }\n }\n }\n return false;\n}\n/**\n * The popup box-size ceiling px, mirroring the layout tree's px clamp: the\n * json is API-writable and the size lands as inline style on the customer's\n * page. The editor clamps its Width/Height inputs to it too.\n */\nexport const WEB_POPUP_MAX_SIZE_PX = 2000;\nfunction validSize(value) {\n return typeof value === 'number' && Number.isFinite(value) && value > 0\n ? Math.min(value, WEB_POPUP_MAX_SIZE_PX)\n : undefined;\n}\nexport function resolveWebPopupPageSize(own, shared, axis) {\n if (own === null)\n return undefined;\n let resolved;\n if (own === 'stretch')\n resolved = 'stretch';\n else\n resolved = validSize(own) ?? (shared === 'stretch' ? 'stretch' : validSize(shared));\n return axis === 'width' && resolved === 'stretch' ? undefined : resolved;\n}\n/**\n * The renderable pages: each page carries its own embedded layout tree — no\n * kind catalog at runtime. The page's named values are substituted into the\n * tree first ($key tokens), then the result is validated/normalized\n * (whitelisted props, unknown container types degrade to a Vertical stack) —\n * so substituted values pass the same clamps as literals; pages whose layout\n * isn't a tree at all are dropped. An empty result means the popup can't be\n * rendered. width/height come out FINAL (page override ?? chrome, validated)\n * — the renderer never falls back itself.\n */\nexport function resolveWebPopupPages(params) {\n const out = [];\n for (const page of params.pages) {\n const values = normalizeWebPopupValues(page.values);\n const layout = normalizeWebPopupLayout(substituteWebPopupLayoutValues(page.layout, webPopupValuesMap(values)));\n if (!layout)\n continue;\n const width = resolveWebPopupPageSize(page.width, params.width, 'width');\n const height = resolveWebPopupPageSize(page.height, params.height, 'height');\n out.push({\n key: page.key,\n layout,\n images: normalizeImages(page.images),\n contents: normalizeContents(page.contents),\n ...(width !== undefined ? { width } : {}),\n ...(height !== undefined ? { height } : {}),\n });\n }\n return out;\n}\n/** The page shown first: startPage when it exists, else the first page. */\nexport function startPageOf(params, pages) {\n return pages.find((p) => p.key === params.startPage) ?? pages[0];\n}\nexport function placementMaxSize(placement) {\n return `calc(100% - ${placement.offset * 2}px)`;\n}\n","export const WEB_POPUPS_WIDGET_NAMESPACE = 'pushwoosh-web-popups';\n\n// Prefix for every log line emitted by the web popups widget so its output is\n// easy to spot and filter in the console.\nexport const WEB_POPUPS_LOG_PREFIX = '[WebPopups]';\n\nexport const POPUP_HOST_Z_INDEX = 2147483647;\n\n// Breathing room between one popup closing and the next one opening. Not\n// cosmetic: without it the click that dismissed the first popup lands on the\n// incoming popup's overlay (which closes on click) or on one of its buttons.\nexport const QUEUE_GAP_MS = 400;\n\n// The subscription-form service's public HTTP gateway. Serves\n// email-subscription-form slot submits and view stats for popup-embedded forms.\nexport const SUBSCRIPTION_FORMS_API_URL = 'https://subscription-form.svc-nue.pushwoosh.com/api/v1';\n","import { type TInboxMessagesStoreName, type TKeyValueStoreName, type TMainLogStoreName, type TMessageLogStoreName } from '../Storage.types';\n\nexport const STORE_NAME_KEY_VALUE: TKeyValueStoreName = 'keyValue';\nexport const STORE_NAME_MESSAGE_LOG: TMessageLogStoreName = 'messages';\nexport const STORE_NAME_MAIN_LOG: TMainLogStoreName = 'log';\nexport const STORE_NAME_INBOX_MESSAGES: TInboxMessagesStoreName = 'inboxMessages';\n\nexport const KEY_PATH_BASE_INCREMENT = 'id';\n","import { type TMigrationType, type TSdkStoreName } from '../Storage.types';\n\n/**\n * Check existed store, before create\n * @param name\n * @param storeCreator\n */\nexport function storeCreatorDecorator(name: TSdkStoreName, storeCreator: TMigrationType): TMigrationType {\n return function (database: IDBDatabase) {\n if (database.objectStoreNames.contains(name)) {\n return;\n }\n\n storeCreator(database);\n };\n}\n","import {\n STORE_NAME_INBOX_MESSAGES,\n STORE_NAME_KEY_VALUE,\n STORE_NAME_MAIN_LOG,\n STORE_NAME_MESSAGE_LOG,\n KEY_PATH_BASE_INCREMENT,\n} from './constants';\nimport { storeCreatorDecorator } from './helpers';\nimport {\n type TInboxMessagesIDBKeyPath,\n type TInboxMessagesIDBRemovalTimeIndex,\n type TInboxMessagesIDBStatusIndex,\n} from '../../../models/InboxMessages.types';\n\n/**\n * Create keyValue store migration\n * @param database\n */\nfunction createKeyValueStore(database: IDBDatabase) {\n database.createObjectStore(STORE_NAME_KEY_VALUE, { keyPath: 'key' });\n}\n\n/**\n * Create log store migration\n * @param database\n */\nfunction createLogStore(database: IDBDatabase) {\n const logStore = database.createObjectStore(\n STORE_NAME_MAIN_LOG,\n { keyPath: KEY_PATH_BASE_INCREMENT, autoIncrement: true },\n );\n logStore.createIndex('environment', 'environment', { unique: false });\n logStore.createIndex('date', 'date', { unique: false });\n logStore.createIndex('type', 'type', { unique: false });\n}\n\n/**\n * Create message log store migration\n * @param database\n */\nfunction createMessageLogStore(database: IDBDatabase) {\n const messagesStore = database.createObjectStore(\n STORE_NAME_MESSAGE_LOG,\n { keyPath: KEY_PATH_BASE_INCREMENT, autoIncrement: true },\n );\n messagesStore.createIndex('date', 'date', { unique: false });\n}\n\n/**\n * Create inbox messages store migration\n * @param database\n */\nfunction createInboxMessagesStore(database: IDBDatabase) {\n const keyPath: TInboxMessagesIDBKeyPath = 'inbox_id';\n const statusIndex: TInboxMessagesIDBStatusIndex = 'status';\n const removalTimeIndex: TInboxMessagesIDBRemovalTimeIndex = 'rt';\n\n const store = database.createObjectStore(STORE_NAME_INBOX_MESSAGES,\n { keyPath, autoIncrement: false },\n );\n store.createIndex(statusIndex, statusIndex, { unique: false, multiEntry: true });\n store.createIndex(removalTimeIndex, removalTimeIndex, { unique: false, multiEntry: true });\n}\n\nexport default [\n storeCreatorDecorator(STORE_NAME_KEY_VALUE, createKeyValueStore),\n storeCreatorDecorator(STORE_NAME_MAIN_LOG, createLogStore),\n storeCreatorDecorator(STORE_NAME_MESSAGE_LOG, createMessageLogStore),\n storeCreatorDecorator(STORE_NAME_INBOX_MESSAGES, createInboxMessagesStore),\n];\n","import { default as migrationsInitial } from './initial';\nimport { type TMigrationType } from '../Storage.types';\n\nexport default class Migrations {\n get all(): Array<TMigrationType> {\n return migrationsInitial;\n }\n}\n","import Migrations from './Migrations';\nimport { type TMigrationType } from '../Storage.types';\n\nexport default class MigrationExecutor {\n db: IDBDatabase;\n migrationsBuilder: Migrations;\n\n constructor(\n db: IDBDatabase,\n migrationsBuilder: Migrations = new Migrations(),\n ) {\n this.db = db;\n this.migrationsBuilder = migrationsBuilder;\n }\n\n applyMigrations() {\n this.applyMigrationsPack(this.migrationsBuilder.all);\n }\n\n applyMigrationsPack(migrationsPack: Array<TMigrationType>) {\n migrationsPack.forEach((migration) => {\n migration(this.db);\n });\n }\n}\n","import {\n STORE_NAME_KEY_VALUE,\n STORE_NAME_MAIN_LOG,\n STORE_NAME_MESSAGE_LOG,\n} from '../modules/storage/migrations/constants';\nimport MigrationExecutor from '../modules/storage/migrations/MigrationExecutor';\nimport { type IIDBOpenEventTargetWithResult } from '../modules/storage/Storage.types';\nimport version from '../modules/storage/version';\n\ndeclare const self: ServiceWorkerGlobalScope;\n\nfunction onversionchange(database: IDBDatabase, event: Event) {\n console.info('onversionchange', event);\n database.close();\n}\n\nlet databasePromise: Promise<IDBDatabase>;\nexport function getInstance(): Promise<IDBDatabase> {\n if (!databasePromise) {\n databasePromise = new Promise<IDBDatabase>((resolve, reject) => {\n const request: IDBOpenDBRequest = indexedDB.open('PUSHWOOSH_SDK_STORE', version);\n request.onsuccess = (event) => {\n const database: IDBDatabase = (event.target as IIDBOpenEventTargetWithResult).result;\n database.onversionchange = onversionchange.bind(null, database, reject);\n resolve(database);\n };\n\n request.onerror = () => reject(request.error);\n\n request.onupgradeneeded = (event) => {\n const database: IDBDatabase = (event.target as IIDBOpenEventTargetWithResult).result;\n database.onversionchange = onversionchange.bind(null, database, reject);\n\n const migrationExecutor = new MigrationExecutor(database);\n migrationExecutor.applyMigrations();\n };\n });\n }\n return databasePromise;\n}\n\nfunction getInstanceWithPromise(executor: any): any {\n return getInstance().then((database) => (\n new Promise((resolve, reject) => executor(database, resolve, reject))\n ));\n}\n\nfunction createKeyValue(name: string) {\n return {\n get<K extends string, D>(key: K, defaultValue?: D) {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const request = database.transaction(name).objectStore(name).get(key);\n\n /** @TODO\n * we cant invoke \"resolve\" or \"reject\" in onsuccess or onerror because\n * it leads to bugs in Safari when we try to get permissions for notifications\n *\n * Checking status of request in setTimeout fixes this bug\n */\n let isComplete = false;\n let isError = false;\n let timeout: any;\n\n const check = () => {\n clearTimeout(timeout);\n if (isComplete) {\n resolve(request.result?.value || defaultValue);\n } else if (isError) {\n reject(request.error);\n } else {\n timeout = setTimeout(check, 0);\n }\n };\n\n request.onsuccess = () => isComplete = true;\n request.onerror = () => isError = true;\n check();\n });\n },\n\n getAll() {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const result: { [key: string]: any } = {};\n const cursor = database.transaction(name).objectStore(name).openCursor();\n let isComplete = false;\n let isError = false;\n let timeout: any;\n\n /** @TODO\n * we cant invoke \"resolve\" or \"reject\" in onsuccess or onerror because\n * it leads to bugs in Safari when we try to get permissions for notifications\n *\n * Checking status of request in setTimeout fixes this bug\n */\n const check = () => {\n clearTimeout(timeout);\n if (isComplete) {\n resolve(result);\n } else if (isError) {\n reject(cursor.error);\n } else {\n timeout = setTimeout(check, 0);\n }\n };\n\n cursor.onsuccess = (event) => {\n const cursorResult = (event.target as any).result;\n if (cursorResult) {\n result[cursorResult.key] = cursorResult.value.value;\n cursorResult.continue();\n } else {\n isComplete = true;\n }\n };\n cursor.onerror = () => isError = true;\n check();\n });\n },\n\n async extend(key: string, value: any) {\n const oldValues = await this.get(key);\n const { ...newValues } = value;\n await this.set(key, { ...oldValues, ...newValues });\n },\n\n set<K, D>(key: K, value: D) {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const request = database.transaction([name], 'readwrite').objectStore(name).put({ key, value });\n let isComplete = false;\n let isError = false;\n let timeout: any;\n\n /** @TODO\n * we cant invoke \"resolve\" or \"reject\" in onsuccess or onerror because\n * it leads to bugs in Safari when we try to get permissions for notifications\n *\n * Checking status of request in setTimeout fixes this bug\n */\n const check = () => {\n clearTimeout(timeout);\n if (isComplete) {\n resolve(key);\n } else if (isError) {\n reject(request.error);\n } else {\n timeout = setTimeout(check, 0);\n }\n };\n\n request.onsuccess = () => isComplete = true;\n request.onerror = () => isError = true;\n check();\n });\n },\n };\n}\n\nexport abstract class LogBase {\n protected abstract name: string;\n protected abstract maxItems: number;\n _add(obj: any) {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const request = database.transaction([this.name], 'readwrite').objectStore(this.name).add(obj);\n request.onsuccess = () => {\n resolve(obj);\n };\n request.onerror = () => {\n reject(request.error);\n };\n }).then((obj: any) => {\n return this.getAll().then((items: { id: number }[]) => {\n if (Array.isArray(items)) {\n const ids = items.map((i) => i.id).sort((a, b) => {\n if (a == b) return 0;\n return a < b ? 1 : -1;\n });\n if (ids.length > this.maxItems) {\n return Promise.all(ids.slice(this.maxItems).map((id) => this.delete(id))).then(() => obj);\n }\n }\n return obj;\n });\n });\n }\n\n delete(key: any) {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const request = database.transaction([this.name], 'readwrite').objectStore(this.name).delete(key);\n request.onsuccess = () => {\n resolve(request.result);\n };\n request.onerror = () => {\n reject(request.error);\n };\n });\n }\n\n getAll() {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const result: any[] = [];\n const cursor = database.transaction(this.name).objectStore(this.name).openCursor();\n cursor.onsuccess = (ev) => {\n const cursorResult = (ev.target as any).result;\n if (cursorResult) {\n if (cursorResult.value) {\n result.push(cursorResult.value);\n }\n cursorResult.continue();\n } else {\n resolve(result);\n }\n };\n cursor.onerror = () => {\n reject(cursor.error);\n };\n });\n }\n}\n\nexport class LogLog extends LogBase {\n protected name = STORE_NAME_MAIN_LOG;\n protected maxItems = 100;\n protected environment = (typeof self !== 'undefined' && self.registration) ? 'worker' : 'browser';\n add(type: string, message: any, additional?: any) {\n const obj: any = {\n type,\n environment: this.environment,\n message: `${message}`,\n date: new Date(),\n };\n if (message instanceof Error) {\n obj.stack = message.stack;\n }\n if (additional) {\n obj.additional = additional;\n }\n return this._add(obj);\n }\n}\n\nexport class LogMessage extends LogBase {\n protected name = STORE_NAME_MESSAGE_LOG;\n protected maxItems = 25;\n add(log: any) {\n return this._add({\n ...log,\n date: new Date(),\n });\n }\n}\n\nexport const keyValue = createKeyValue(STORE_NAME_KEY_VALUE);\nexport const log = new LogLog();\nexport const message = new LogMessage();\n","import { log as logStorage } from './storage';\n\nconst levels: { [key: string]: number } = {\n error: 1,\n info: 2,\n debug: 3,\n};\n\nlet limitLevel = 3;\n\ntype TWriteType = 'error' | 'apirequest' | 'info';\n\ninterface ILogger {\n setLevel(level: string): void;\n error(...args: any[]): void;\n info(...args: any[]): void;\n debug(...args: any[]): void;\n write(type: TWriteType, message: any, additional?: any): Promise<void>;\n isManualLevel(): boolean;\n [key: string]: any;\n}\n\nconst Logger: ILogger = {\n setLevel(level) {\n if (!levels[level]) {\n level = 'error';\n }\n limitLevel = levels[level];\n },\n write(type: TWriteType, message: any, additional?: any) {\n if (type === 'error') {\n this.error(message);\n } else {\n this.info(message);\n }\n return logStorage.add(type, message, additional);\n },\n} as ILogger;\n\nObject.keys(levels).forEach((levelName: string) => {\n const levelNumber = levels[levelName];\n Logger[levelName] = (...args: any[]) => {\n if (levelNumber <= limitLevel) {\n console.groupCollapsed(levelName);\n console.info('', ...args);\n console.trace('trace');\n console.groupEnd();\n }\n };\n});\n\nexport function logAndThrowError(error: string) {\n const logText = new Error(error);\n Logger.write('error', logText, 'logAndThrowError');\n throw logText;\n}\n\nexport function logAndRejectError(error: string, reject: (e: any) => void) {\n const logText = new Error(error);\n Logger.write('error', logText, 'logAndRejectError');\n reject(logText);\n}\n\nexport { Logger };\n","import {\n type WebPopupChoiceSubmitHandler, type WebPopupRatingSubmitHandler,\n} from 'smart-blocks-utils';\n\nimport { Logger } from '../../core/logger';\nimport { type Pushwoosh } from '../../core/Pushwoosh';\n\n// The host side of the two submitting phase-2 slots: a choice becomes device\n// TAGS, a rating an EVENT. Both reject on failure, like the subscription form.\n\n// A choice slot's picks appended to a LIST tag — additive by design: the slot\n// resets its selection on every show, so it cannot express an un-pick.\nexport function createChoiceSubmitHandler(pw: Pushwoosh): WebPopupChoiceSubmitHandler {\n return async ({ slotKey, tagName, values }) => {\n try {\n // String operation + `value` is setTags' shape; the numeric TagValue in\n // Api.types.ts belongs to multiRegisterDevice and no-ops here.\n await pw.api.setTags({ [tagName]: { operation: 'append', value: values } }); // also writes EMAIL tags when the visitor has one\n } catch (error) {\n Logger.error(error, `Failed to write web popup choice \"${slotKey}\" to tag \"${tagName}\"`);\n throw error;\n }\n };\n}\n\n// The score as an event, scale alongside (4 of 5 stars is not 4 of 10 NPS). An\n// in-app configured for this event can open over the popup; that's normal.\nexport function createRatingSubmitHandler(pw: Pushwoosh): WebPopupRatingSubmitHandler {\n return async ({ slotKey, eventName, score, scale }) => {\n try {\n await pw.api.postEvent(eventName, { score, scale, slotKey });\n } catch (error) {\n Logger.error(error, `Failed to post web popup rating \"${slotKey}\" as event \"${eventName}\"`);\n throw error;\n }\n };\n}\n","var n,l,u,t,i,r,o,e,f,c,a,s,h,p,v,y,d={},w=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(n,l){for(var u in l)n[u]=l[u];return n}function b(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function k(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return x(l,e,i,r,null)}function x(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function M(){return{current:null}}function S(n){return n.children}function C(n,l){this.props=n,this.context=l}function $(n,l){if(null==l)return n.__?$(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?$(n):null}function I(n){if(n.__P&&n.__d){var u=n.__v,t=u.__e,i=[],r=[],o=m({},u);o.__v=u.__v+1,l.vnode&&l.vnode(o),q(n.__P,o,u,n.__n,n.__P.namespaceURI,32&u.__u?[t]:null,i,null==t?$(u):t,!!(32&u.__u),r),o.__v=u.__v,o.__.__k[o.__i]=o,D(i,o,r),u.__e=u.__=null,o.__e!=t&&P(o)}}function P(n){if(null!=(n=n.__)&&null!=n.__c)return n.__e=n.__c.base=null,n.__k.some(function(l){if(null!=l&&null!=l.__e)return n.__e=n.__c.base=l.__e}),P(n)}function A(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!H.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)(H)}function H(){try{for(var n,l=1;i.length;)i.length>l&&i.sort(e),n=i.shift(),l=i.length,I(n)}finally{i.length=H.__r=0}}function L(n,l,u,t,i,r,o,e,f,c,a){var s,h,p,v,y,_,g=t&&t.__k||w,m=l.length;for(f=T(u,l,g,f,m),s=0;s<m;s++)null!=(p=u.__k[s])&&(h=-1!=p.__i&&g[p.__i]||d,p.__i=s,_=q(n,p,h,i,r,o,e,f,c,a),v=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&J(h.ref,null,p),a.push(p.ref,p.__c||v,p)),null==y&&null!=v&&(y=v),4&p.__u?(f=j(p,f,n),h.__e&&(h.__e=null)):\"function\"==typeof p.type&&void 0!==_?f=_:v&&(f=v.nextSibling),p.__u&=-7);return u.__e=y,f}function T(n,l,u,t,i){var r,o,e,f,c,a=u.length,s=a,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&\"boolean\"!=typeof o&&\"function\"!=typeof o?(\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||o.constructor==String?o=n.__k[r]=x(null,o,null,null,null):g(o)?o=n.__k[r]=x(S,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=n.__k[r]=x(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):n.__k[r]=o,f=r+h,o.__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=O(o,u,f,s))&&(s--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>a?h--:i<a&&h++),\"function\"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(s)for(r=0;r<a;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=$(e)),K(e,e));return t}function j(n,l,u){var t,i;if(\"function\"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=j(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!l.parentNode&&(l=$(n)),l=u.insertBefore(n.__e,l||null));do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function F(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(g(n)?n.some(function(n){F(n,l)}):l.push(n)),l}function O(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],a=null!=c&&0==(2&c.__u);if(null===c&&null==e||a&&e==c.key&&f==c.type)return u;if(t>(a?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function z(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||_.test(l)?u:u+\"px\"}function N(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||z(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||z(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(s,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u[a]=t[a]:(u[a]=h,n.addEventListener(l,r?v:p,r)):n.removeEventListener(l,r?v:p,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function V(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u[c])u[c]=h++;else if(u[c]<t[a])return;return t(l.event?l.event(u):u)}}}function q(n,u,t,i,r,o,e,f,c,a){var s,h,p,v,y,d,_,k,x,M,I,P,A,H,T,j,F=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(s=l.__b)&&s(u);n:if(\"function\"==typeof F){h=e.length;try{if(x=u.props,M=F.prototype&&F.prototype.render,I=(s=F.contextType)&&i[s.__c],P=s?I?I.props.value:s.__:i,t.__c?k=(p=u.__c=t.__c).__=p.__E:(M?u.__c=p=new F(x,P):(u.__c=p=new C(x,P),p.constructor=F,p.render=Q),I&&I.sub(p),p.state||(p.state={}),p.__n=i,v=p.__d=!0,p.__h=[],p._sb=[]),M&&null==p.__s&&(p.__s=p.state),M&&null!=F.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=m({},p.__s)),m(p.__s,F.getDerivedStateFromProps(x,p.__s))),y=p.props,d=p.state,p.__v=u,v)M&&null==F.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),M&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(M&&null==F.getDerivedStateFromProps&&x!==y&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(x,P),u.__v==t.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(x,p.__s,P)){u.__v!=t.__v&&(p.props=x,p.state=p.__s,p.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),w.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&e.push(p),f=$(t);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(x,p.__s,P),M&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(y,d,_)})}if(p.context=P,p.props=x,p.__P=n,p.__e=!1,A=l.__r,H=0,M)p.state=p.__s,p.__d=!1,A&&A(u),s=p.render(p.props,p.state,p.context),w.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,A&&A(u),s=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++H<25);p.state=p.__s,null!=p.getChildContext&&(i=m(m({},i),p.getChildContext())),M&&!v&&null!=p.getSnapshotBeforeUpdate&&(_=p.getSnapshotBeforeUpdate(y,d)),T=null!=s&&s.type===S&&null==s.key?E(s.props.children):s,f=L(n,g(T)?T:[T],u,t,i,r,o,e,f,c,a),p.base=u.__e,u.__u&=-161,p.__h.length&&e.push(p),k&&(p.__E=p.__=null)}catch(n){if(e.length=h,u.__v=null,c||null!=o){if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;null!=o&&(o[o.indexOf(f)]=null),u.__e=f}else if(null!=o)for(j=o.length;j--;)b(o[j])}else u.__e=t.__e;null==u.__k&&(u.__k=t.__k||[]),n.then||B(u),l.__e(n,u,t)}}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=G(t.__e,u,t,i,r,o,e,c,a);return(s=l.diffed)&&s(u),128&u.__u?void 0:f}function B(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(B))}function D(n,u,t){for(var i=0;i<t.length;i++)J(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function E(n){return\"object\"!=typeof n||null==n||n.__b>0?n:g(n)?n.map(E):void 0!==n.constructor?null:m({},n)}function G(u,t,i,r,o,e,f,c,a){var s,h,p,v,y,w,_,m=i.props||d,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(s=0;s<e.length;s++)if((y=e[s])&&\"setAttribute\"in y==!!x&&(x?y.localName==x:3==y.nodeType)){u=y,e[s]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)m===k||c&&u.data==k||(u.data=k);else{if(e=\"textarea\"==x&&null!=k.defaultValue?null:e&&n.call(u.childNodes),!c&&null!=e)for(m={},s=0;s<u.attributes.length;s++)m[(y=u.attributes[s]).name]=y.value;for(s in m)y=m[s],\"dangerouslySetInnerHTML\"==s?p=y:\"children\"==s||s in k||\"value\"==s&&\"defaultValue\"in k||\"checked\"==s&&\"defaultChecked\"in k||N(u,s,null,y,o);for(s in k)y=k[s],\"children\"==s?v=y:\"dangerouslySetInnerHTML\"==s?h=y:\"value\"==s?w=y:\"checked\"==s?_=y:c&&\"function\"!=typeof y||m[s]===y||N(u,s,y,m[s],o);if(h)c||p&&(h.__html==p.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(p&&(u.innerHTML=\"\"),L(\"template\"==t.type?u.content:u,g(v)?v:[v],t,i,r,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":o,e,f,e?e[0]:i.__k&&$(i,0),c,a),null!=e)for(s=e.length;s--;)b(e[s]);c&&\"textarea\"!=x||(s=\"value\",\"progress\"==x&&null==w?u.removeAttribute(\"value\"):null!=w&&(w!==u[s]||\"progress\"==x&&!w||\"option\"==x&&w!=m[s])&&N(u,s,w,m[s],o),s=\"checked\",null!=_&&_!=u[s]&&N(u,s,_,m[s],o))}return u}function J(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function K(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||J(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=i.__n=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&K(i[r],u,t||\"function\"!=typeof n.type);t||b(n.__e),n.__c=n.__=n.__e=void 0}function Q(n,l,u){return this.constructor(n,u)}function R(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],q(t,u=(!r&&i||t).__k=k(S,null,[u]),o||d,d,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),D(e,u,f),u.props.children=null}function U(n,l){R(n,l,U)}function W(l,u,t){var i,r,o,e,f=m({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),x(l.type,f,i||l.key,r||l.ref,null)}function X(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,A(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+y++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=w.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},C.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),\"function\"==typeof n&&(n=n(m({},u),this.props)),n&&m(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),A(this))},C.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),A(this))},C.prototype.render=S,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},H.__r=0,f=Math.random().toString(8),c=\"__d\"+f,a=\"__a\"+f,s=/(PointerCapture)$|Capture$/i,h=0,p=V(!1),v=V(!0),y=0;export{C as Component,S as Fragment,W as cloneElement,X as createContext,k as createElement,M as createRef,k as h,U as hydrate,t as isValidElement,l as options,R as render,F as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as r,Fragment as e}from\"preact\";export{Fragment}from\"preact\";var t=/[\"&<]/;function n(r){if(0===r.length||!1===t.test(r))return r;for(var e=0,n=0,o=\"\",f=\"\";n<r.length;n++){switch(r.charCodeAt(n)){case 34:f=\""\";break;case 38:f=\"&\";break;case 60:f=\"<\";break;default:continue}n!==e&&(o+=r.slice(e,n)),o+=f,e=n+1}return n!==e&&(o+=r.slice(e,n)),o}var o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=0,i=Array.isArray;function u(e,t,n,o,i,u){t||(t={});var a,c,p=t;if(\"ref\"in p)for(c in p={},t)\"ref\"==c?a=t[c]:p[c]=t[c];var l={type:e,props:p,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u};if(\"function\"==typeof e&&(a=e.defaultProps))for(c in a)void 0===p[c]&&(p[c]=a[c]);return r.vnode&&r.vnode(l),l}function a(r){var t=u(e,{tpl:r,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var c={},p=/[A-Z]/g;function l(e,t){if(r.attr){var f=r.attr(e,t);if(\"string\"==typeof f)return f}if(t=function(r){return null!==r&&\"object\"==typeof r&&\"function\"==typeof r.valueOf?r.valueOf():r}(t),\"ref\"===e||\"key\"===e)return\"\";if(\"style\"===e&&\"object\"==typeof t){var i=\"\";for(var u in t){var a=t[u];if(null!=a&&\"\"!==a){var l=\"-\"==u[0]?u:c[u]||(c[u]=u.replace(p,\"-$&\").toLowerCase()),s=\";\";\"number\"!=typeof a||l.startsWith(\"--\")||o.test(l)||(s=\"px;\"),i=i+l+\":\"+a+s}}return e+'=\"'+n(i)+'\"'}return null==t||!1===t||\"function\"==typeof t||\"object\"==typeof t?\"\":!0===t?e:e+'=\"'+n(\"\"+t)+'\"'}function s(r){if(null==r||\"boolean\"==typeof r||\"function\"==typeof r)return null;if(\"object\"==typeof r){if(void 0===r.constructor)return r;if(i(r)){for(var e=0;e<r.length;e++)r[e]=s(r[e]);return r}}return n(\"\"+r)}export{u as jsx,l as jsxAttr,u as jsxDEV,s as jsxEscape,a as jsxTemplate,u as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=n,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,p=c.__;function s(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return o=1,y(D,n)}function y(n,u,i){var o=s(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=!1,i=o.__c.props!==n;if(o.__c.__H.__.some(function(n){if(n.__N){u=!0;var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c){var f=c.call(this,n,t,r);return u?f||i:f}return!u||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function h(n,u){var i=s(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=s(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){if(\"function\"==typeof n){var r=n(t());return function(){n(null),r&&\"function\"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=s(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=s(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n)}function b(n){var u=s(t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=s(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();){var t=n.__H;if(n.__P&&t)try{t.__h.some(z),t.__h.some(B),t.__h=[]}catch(r){t.__h=[],c.__e(r,n.__v)}}}c.__b=function(n){r=null,e&&e(n)},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),p&&p(n,t)},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(i.__h.some(z),i.__h.some(B),i.__h=[],t=0)),u=r},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),u=r=null},c.__c=function(n,t){t.some(function(n){try{n.__h.some(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],c.__e(r,n.__v)}}),l&&l(n,t)},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.some(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&c.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,35);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{q as useCallback,x as useContext,P as useDebugValue,h as useEffect,b as useErrorBoundary,g as useId,F as useImperativeHandle,_ as useLayoutEffect,T as useMemo,y as useReducer,A as useRef,d as useState};\n//# sourceMappingURL=hooks.module.js.map\n","import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as l,createRef as f,cloneElement as a}from\"preact\";export{Component,Fragment,Fragment as StrictMode,createContext,createElement,createRef}from\"preact\";import{useState as c,useLayoutEffect as s,useEffect as h,useCallback as v,useContext as d,useDebugValue as m,useId as p,useImperativeHandle as y,useMemo as _,useReducer as b,useRef as S}from\"preact/hooks\";export*from\"preact/hooks\";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){var e=t(),r=c({t:{__:e,u:t}}),u=r[0].t,o=r[1];return s(function(){u.__=e,u.u=t,R(u)&&o({t:u})},[n,e,t]),h(function(){return R(u)&&o({t:u}),n(function(){R(u)&&o({t:u})})},[n]),e}function R(n){try{return!((t=n.__)===(e=n.u())&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}var t,e}function x(n){n()}function w(n){return n}function k(){return[!1,x]}var I=s;function M(n,t){this.props=n,this.context=t}function N(n,e){function r(n){var t=this.props.ref;return t!=n.ref&&t&&(\"function\"==typeof t?t(null):t.current=null),e?!e(this.props,n)||t!=n.ref:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",u.__f=u.prototype.isReactComponent=!0,u.type=n,u}(M.prototype=new n).isPureReactComponent=!0,M.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var T=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),T&&T(n)};var A=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function D(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=A,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var F=function(n,t){return null==n?null:r(r(n).map(t))},L={map:F,forEach:F,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:r},O=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k||[]),u.__c(n,t);O(n,t,e,r)};var U=e.unmount;function V(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return V(n,t,e)})),n}function W(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return W(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function P(){this.__u=0,this.o=null,this.__b=null}function j(n){var t=n.__&&n.__.__c;return t&&t.__a&&t.__a(n)}function z(n){var e,r,u,o=null;function i(i){if(e||(e=n()).then(function(n){n&&(o=n.default||n),u=!0},function(n){r=n,u=!0}),r)throw r;if(!u)throw e;return o?t(o,i):null}return i.displayName=\"Lazy\",i.__f=!0,i}function B(){this.i=null,this.l=null}e.unmount=function(n){var t=n.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),U&&U(n)},(P.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=j(r.__v),o=!1,i=function(){o||r.__z||(o=!0,e.__R=null,u?u(f):f())};e.__R=i;var l=e.__P;e.__P=null;var f=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=W(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=l,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),o=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var H=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function Z(n){return this.getChildContext=function(){return n.context},n.children}function Y(n){var e=this,r=n.h;if(e.componentWillUnmount=function(){o(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),!e.v){for(var u=e.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:u.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(n,t){this.childNodes.push(n),e.h.insertBefore(n,t)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}}o(t(Z,{context:e.context},n.__v),e.v)}function $(n,e){var r=t(Y,{__v:n,h:e});return r.containerInfo=e,r}(B.prototype=new n).__a=function(n){var t=this,e=j(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),H(t,n,r)):u()};e?e(o):o()}},B.prototype.render=function(n){this.i=null,this.l=new Map;var t=r(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return n.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){H(n,e,t)})};var q=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,G=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q=\"undefined\"!=typeof document,X=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function nn(n,t,e){return null==t.__k&&(t.textContent=\"\"),o(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function tn(n,t,e){return i(n,t),\"function\"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent=!0,[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this[\"UNSAFE_\"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var en=e.event;e.event=function(n){return en&&(n=en(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var rn,un={configurable:!0,get:function(){return this.class}},on=e.vnode;e.vnode=function(n){\"string\"==typeof n.type&&function(n){var t=n.props,e=n.type,u={},o=-1==e.indexOf(\"-\");for(var i in t){var l=t[i];if(!(\"value\"===i&&\"defaultValue\"in t&&null==l||Q&&\"children\"===i&&\"noscript\"===e||\"class\"===i||\"className\"===i)){var f=i.toLowerCase();\"defaultValue\"===i&&\"value\"in t&&null==t.value?i=\"value\":\"download\"===i&&!0===l?l=\"\":\"translate\"===f&&\"no\"===l?l=!1:\"o\"===f[0]&&\"n\"===f[1]?\"ondoubleclick\"===f?i=\"ondblclick\":\"onchange\"!==f||\"input\"!==e&&\"textarea\"!==e||X(t.type)?\"onfocus\"===f?i=\"onfocusin\":\"onblur\"===f?i=\"onfocusout\":J.test(i)&&(i=f):f=i=\"oninput\":o&&G.test(i)?i=i.replace(K,\"-$&\").toLowerCase():null===l&&(l=void 0),\"oninput\"===f&&u[i=f]&&(i=\"oninputCapture\"),u[i]=l}}\"select\"==e&&(u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value}))),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,\"className\",un)):t.className&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=q,on&&on(n)};var ln=e.__r;e.__r=function(n){ln&&ln(n),rn=n.__c};var fn=e.diffed;e.diffed=function(n){fn&&fn(n);var t=n.props,e=n.__e;null!=e&&\"textarea\"===n.type&&\"value\"in t&&t.value!==e.value&&(e.value=null==t.value?\"\":t.value),rn=null};var an={ReactCurrentDispatcher:{current:{readContext:function(n){return rn.__n[n.__c].props.value},useCallback:v,useContext:d,useDebugValue:m,useDeferredValue:w,useEffect:h,useId:p,useImperativeHandle:y,useInsertionEffect:I,useLayoutEffect:s,useMemo:_,useReducer:b,useRef:S,useState:c,useSyncExternalStore:C,useTransition:k}}},cn=\"18.3.1\";function sn(n){return t.bind(null,n)}function hn(n){return!!n&&n.$$typeof===q}function vn(n){return hn(n)&&n.type===u}function dn(n){return!!n&&\"string\"==typeof n.displayName&&0==n.displayName.indexOf(\"Memo(\")}function mn(n){return hn(n)?a.apply(null,arguments):n}function pn(n){return!!n.__k&&(o(null,n),!0)}function yn(n){return n&&(n.base||1===n.nodeType&&n)||null}var _n=function(n,t){return n(t)},bn=function(n,t){var r,u=e.debounceRendering;e.debounceRendering=function(n){r=n};try{var o=n(t);return r&&r(),o}finally{e.debounceRendering=u}},Sn=hn,gn={useState:c,useId:p,useReducer:b,useEffect:h,useLayoutEffect:s,useInsertionEffect:I,useTransition:k,useDeferredValue:w,useSyncExternalStore:C,startTransition:x,useRef:S,useImperativeHandle:y,useMemo:_,useCallback:v,useContext:d,useDebugValue:m,version:\"18.3.1\",Children:L,render:nn,hydrate:tn,unmountComponentAtNode:pn,createPortal:$,createElement:t,createContext:l,createFactory:sn,cloneElement:mn,createRef:f,Fragment:u,isValidElement:hn,isElement:Sn,isFragment:vn,isMemo:dn,findDOMNode:yn,Component:n,PureComponent:M,memo:N,forwardRef:D,flushSync:bn,unstable_batchedUpdates:_n,StrictMode:u,Suspense:P,SuspenseList:B,lazy:z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:an};export{L as Children,M as PureComponent,P as Suspense,B as SuspenseList,an as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mn as cloneElement,sn as createFactory,$ as createPortal,gn as default,yn as findDOMNode,bn as flushSync,D as forwardRef,tn as hydrate,Sn as isElement,vn as isFragment,dn as isMemo,hn as isValidElement,z as lazy,N as memo,nn as render,x as startTransition,pn as unmountComponentAtNode,_n as unstable_batchedUpdates,w as useDeferredValue,I as useInsertionEffect,C as useSyncExternalStore,k as useTransition,cn as version};\n//# sourceMappingURL=compat.module.js.map\n","import React, { useEffect, useState } from 'react';\nimport { webPopupButtonPillStyle, webPopupFormInputStyle, webPopupRatingScores, webPopupTextColor, webPopupSlotGap, webPopupSlotRole, WEB_POPUP_BG_SECTION_FALLBACK, WEB_POPUP_BUTTON_SLOT_PADDING, WEB_POPUP_FONT_STACK, WEB_POPUP_KEYFRAMES, WEB_POPUP_PAGE_TRANSITION_MS, WEB_POPUP_RETRY_ERROR, WEB_POPUP_TEXT_SLOT_PADDING, WEB_POPUP_TEXT_VARIANT_STYLES, } from './constants';\nimport { WEB_POPUP_GLYPH_PATHS, WEB_POPUP_THUMB_UP_PATH } from './glyphs';\nimport { placementMaxSize, resolveWebPopupPages, safeUrl, sanitizeWebPopupHtml, startPageOf, webPopupLinkTargetAttrs, } from './helpers';\nimport { webPopupBackgroundImageStyle, webPopupContainerStyle, webPopupScrimGradient } from './layout';\nimport { resolveWebPopupColors, webPopupColorAlpha, webPopupDarkEnabled } from './palette';\nimport { webPopupTimerLabels, webPopupTimerRemaining } from './timer';\n// Renders a popup from its model by interpreting each page's embedded layout\n// tree — the same node vocabulary the editor's canvas builds from: container\n// nodes become inline-styled grid divs, `Content` leaves render a named\n// zone's slot stack, `Image` leaves an image param. 'live' mode adds the\n// viewport chrome (overlay, placement, animation, close), 'preview' renders\n// just the popup box inline. Only one page renders at a time; buttons with a\n// `page` action switch pages. All styling is inline (shadow-DOM friendly, no\n// CSS files).\nconst ANIMATION_STYLE = {\n none: undefined,\n fade: 'pw-vpopup-fade 0.35s ease-out backwards',\n slide: 'pw-vpopup-slide 0.35s ease-out backwards',\n};\nfunction TextSlotView({ slot, align, inverse, colors }) {\n const style = {\n ...WEB_POPUP_TEXT_VARIANT_STYLES[slot.variant],\n textAlign: slot.align ?? align,\n };\n const color = webPopupTextColor(slot.variant, colors, inverse);\n if (color)\n style.color = color;\n // The html comes from the editor's rich-text slots, but the json is\n // API-writable — sanitize on render (inline tags only, safe link hrefs).\n return React.createElement(\"div\", { style: style, dangerouslySetInnerHTML: { __html: sanitizeWebPopupHtml(slot.html) } });\n}\nfunction ButtonSlotView({ slot, colors, onRequestClose, onPageChange }) {\n const pill = webPopupButtonPillStyle(slot.variant, colors);\n const wrapper = {};\n if (slot.action.type === 'close') {\n return (React.createElement(\"div\", { style: wrapper },\n React.createElement(\"button\", { type: \"button\", style: pill, onClick: onRequestClose }, slot.label)));\n }\n if (slot.action.type === 'page') {\n const target = slot.action.page;\n return (React.createElement(\"div\", { style: wrapper },\n React.createElement(\"button\", { type: \"button\", style: pill, onClick: () => onPageChange(target) }, slot.label)));\n }\n const href = safeUrl(slot.action.url);\n // No (safe) URL yet: an inert pill — not an '#' anchor opening a blank tab.\n if (!href) {\n return (React.createElement(\"div\", { style: wrapper },\n React.createElement(\"button\", { type: \"button\", style: pill }, slot.label)));\n }\n return (React.createElement(\"div\", { style: wrapper },\n React.createElement(\"a\", { href: href, ...webPopupLinkTargetAttrs(slot.action.target), style: pill }, slot.label)));\n}\n// The copy a submitted slot leaves behind, in the zone's own body style.\nfunction SlotMessageView({ message, align, inverse, colors }) {\n const color = webPopupTextColor('body', colors, inverse);\n return (React.createElement(\"div\", { style: {\n ...WEB_POPUP_TEXT_VARIANT_STYLES.body,\n padding: WEB_POPUP_TEXT_SLOT_PADDING,\n textAlign: align,\n ...(color ? { color } : {}),\n } }, message));\n}\nconst FORM_EMAIL_PATTERN = /^\\S+@\\S+\\.\\S+$/;\nconst FORM_INPUT_TYPES = { email: 'email', phone: 'tel' };\nconst FORM_AUTOCOMPLETE = {\n email: 'email',\n firstName: 'given-name',\n lastName: 'family-name',\n phone: 'tel',\n};\n// The privacy-check error renders under the checkbox row; a field key can\n// never collide with it (normalized keys are non-empty slot-local ids).\nconst PRIVACY_ERROR_KEY = '__privacy';\n/**\n * An email-subscription form slot: the fields, the consent row and the\n * submit pill, all popup-styled. Local state machine: idle → submitting →\n * success/confirm (the form swaps to the slot's message) or error (the form\n * stays, a generic retryable note appears). Without an onSubmitForm handler\n * or a bound formCode the form is inert — inputs type, submit does nothing —\n * which is exactly what previews and the editor canvas want.\n */\nfunction FormSlotView({ slot, align, inverse, colors, onSubmitForm }) {\n const [values, setValues] = useState({});\n const [policyAccepted, setPolicyAccepted] = useState(false);\n const [focusedKey, setFocusedKey] = useState(null);\n const [errors, setErrors] = useState({});\n const [phase, setPhase] = useState('idle');\n const captionColor = webPopupTextColor('caption', colors, inverse);\n const captionStyle = {\n ...WEB_POPUP_TEXT_VARIANT_STYLES.caption,\n ...(captionColor ? { color: captionColor } : {}),\n };\n const errorStyle = {\n fontSize: 12,\n lineHeight: 1.4,\n color: colors.error,\n paddingTop: 2,\n };\n if (phase === 'success' || phase === 'confirm') {\n return (React.createElement(SlotMessageView, { message: phase === 'confirm' ? slot.confirmEmailMessage : slot.successMessage, align: align, inverse: inverse, colors: colors }));\n }\n const setFieldValue = (key, value) => {\n setValues((prev) => ({ ...prev, [key]: value }));\n setErrors((prev) => (prev[key] ? Object.fromEntries(Object.entries(prev).filter(([k]) => k !== key)) : prev));\n };\n const submit = () => {\n if (!onSubmitForm || !slot.formCode || phase === 'submitting')\n return;\n const found = {};\n for (const field of slot.fields) {\n const value = (values[field.key] ?? '').trim();\n if (field.required && !value)\n found[field.key] = 'Required';\n else if (field.kind === 'email' && value && !FORM_EMAIL_PATTERN.test(value)) {\n found[field.key] = 'Enter a valid email';\n }\n }\n if (slot.privacy && !policyAccepted)\n found[PRIVACY_ERROR_KEY] = 'Please accept the privacy policy';\n setErrors(found);\n if (Object.keys(found).length > 0)\n return;\n const payload = {\n email: '',\n policyAccepted: slot.privacy ? policyAccepted : true,\n };\n const customFields = {};\n for (const field of slot.fields) {\n const value = (values[field.key] ?? '').trim();\n if (!value)\n continue;\n if (field.kind === 'email')\n payload.email = payload.email || value;\n else if (field.kind === 'firstName')\n payload.firstName = value;\n else if (field.kind === 'lastName')\n payload.lastName = value;\n else if (field.kind === 'phone')\n payload.phone = value;\n else\n customFields[field.tag || field.key] = value;\n }\n if (Object.keys(customFields).length > 0)\n payload.customFields = customFields;\n setPhase('submitting');\n // Promise.resolve wrapper: a host callback that throws SYNCHRONOUSLY\n // (before returning its promise) must land in the error phase too — a\n // bare .then(ok, fail) would let the throw escape and strand the form\n // in 'submitting' with no way back.\n Promise.resolve()\n .then(() => onSubmitForm(slot.formCode, payload))\n .then((result) => setPhase(result === 'confirm-email' ? 'confirm' : 'success'), () => setPhase('error'));\n };\n const submitting = phase === 'submitting';\n const privacyHref = slot.privacy ? safeUrl(slot.privacy.url) : undefined;\n const pill = {\n ...webPopupButtonPillStyle(slot.submitVariant, colors),\n ...(submitting ? { opacity: 0.6, cursor: 'default' } : {}),\n };\n return (React.createElement(\"form\", { noValidate: true, style: { margin: 0, textAlign: 'left' }, onSubmit: (event) => {\n event.preventDefault();\n submit();\n } },\n slot.fields.map((field) => {\n const error = errors[field.key];\n let borderColor;\n if (error)\n borderColor = colors.error;\n else if (focusedKey === field.key)\n borderColor = colors.accent;\n return (React.createElement(\"div\", { key: field.key, style: { padding: WEB_POPUP_TEXT_SLOT_PADDING } },\n field.label && React.createElement(\"div\", { style: { ...captionStyle, paddingBottom: 4 } }, field.label),\n React.createElement(\"input\", { type: FORM_INPUT_TYPES[field.kind] ?? 'text', autoComplete: FORM_AUTOCOMPLETE[field.kind], placeholder: field.placeholder || undefined, value: values[field.key] ?? '', disabled: submitting, style: webPopupFormInputStyle(colors, borderColor), onFocus: () => setFocusedKey(field.key), onBlur: () => setFocusedKey((key) => (key === field.key ? null : key)), onChange: (event) => setFieldValue(field.key, event.currentTarget.value) }),\n error && React.createElement(\"div\", { style: errorStyle }, error)));\n }),\n slot.privacy && (React.createElement(\"div\", { style: { padding: WEB_POPUP_TEXT_SLOT_PADDING } },\n React.createElement(\"label\", { style: { ...captionStyle, display: 'flex', alignItems: 'flex-start', gap: 8, cursor: 'pointer' } },\n React.createElement(\"input\", { type: \"checkbox\", checked: policyAccepted, disabled: submitting, style: { margin: '2px 0 0', flexShrink: 0 }, onChange: (event) => {\n setPolicyAccepted(event.currentTarget.checked);\n setErrors((prev) => (prev[PRIVACY_ERROR_KEY]\n ? Object.fromEntries(Object.entries(prev).filter(([k]) => k !== PRIVACY_ERROR_KEY))\n : prev));\n } }),\n React.createElement(\"span\", null,\n slot.privacy.checkboxLabel,\n privacyHref && (React.createElement(React.Fragment, null,\n ' ',\n React.createElement(\"a\", { href: privacyHref, ...webPopupLinkTargetAttrs(undefined), style: { color: colors.accent } }, slot.privacy.linkLabel || slot.privacy.url))))),\n errors[PRIVACY_ERROR_KEY] && React.createElement(\"div\", { style: errorStyle }, errors[PRIVACY_ERROR_KEY]))),\n React.createElement(\"div\", { style: { padding: WEB_POPUP_BUTTON_SLOT_PADDING } },\n React.createElement(\"button\", { type: \"submit\", disabled: submitting, style: pill }, slot.submitLabel)),\n phase === 'error' && (React.createElement(\"div\", { style: { ...errorStyle, textAlign: align } }, WEB_POPUP_RETRY_ERROR))));\n}\n// The phase-2 slots. The two that submit follow the form slot's rules exactly:\n// inert without a callback, idle → submitting → success/error, then its copy.\n// One cell of the countdown: the digits over their unit label.\nfunction TimerCell({ value, label, digitStyle, labelStyle }) {\n return (React.createElement(\"div\", { style: { minWidth: 44 } },\n React.createElement(\"div\", { style: digitStyle }, String(value).padStart(2, '0')),\n label ? React.createElement(\"div\", { style: labelStyle }, label) : null));\n}\nfunction TimerSlotView({ slot, align, inverse, colors, mode, onRequestClose, onPageChange }) {\n const [nowMs, setNowMs] = useState(() => Date.now());\n const remaining = webPopupTimerRemaining(slot.endTime, slot.timezone, nowMs);\n const expired = remaining.total === 0;\n // 'preview' draws a still frame: a gallery is many popups at once, and every\n // one of them would tick. A finished countdown stops on its own.\n useEffect(() => {\n if (mode !== 'live' || expired)\n return undefined;\n const id = setInterval(() => setNowMs(Date.now()), 1000);\n return () => clearInterval(id);\n }, [mode, expired, slot.endTime, slot.timezone]);\n // Past the deadline, the slot does what it was told. 'hide-popup' gets here\n // only for a popup left open ACROSS its deadline (the host gates the rest).\n useEffect(() => {\n if (mode !== 'live' || !expired)\n return;\n if (slot.onExpire === 'hide-popup')\n onRequestClose?.();\n else if (slot.onExpire === 'page' && slot.expirePage)\n onPageChange(slot.expirePage);\n }, [mode, expired, slot.onExpire, slot.expirePage, onRequestClose, onPageChange]);\n const digitColor = webPopupTextColor('h2', colors, inverse);\n const labelColor = webPopupTextColor('caption', colors, inverse);\n const digitStyle = {\n fontSize: 28,\n fontWeight: 700,\n lineHeight: 1.2,\n // Tabular figures: without them every second reflows the row.\n fontVariantNumeric: 'tabular-nums',\n ...(digitColor ? { color: digitColor } : {}),\n };\n const labelStyle = {\n ...WEB_POPUP_TEXT_VARIANT_STYLES.caption,\n ...(labelColor ? { color: labelColor } : {}),\n };\n const labels = webPopupTimerLabels(slot.language);\n const cells = [\n { value: remaining.days, label: labels.days },\n { value: remaining.hours, label: labels.hours },\n { value: remaining.minutes, label: labels.minutes },\n { value: remaining.seconds, label: labels.seconds },\n ];\n return (React.createElement(\"div\", { style: { padding: WEB_POPUP_TEXT_SLOT_PADDING, textAlign: align } },\n React.createElement(\"div\", { style: { display: 'inline-flex', gap: 12, textAlign: 'center' } }, cells.map((cell) => (React.createElement(TimerCell, { key: cell.label || cell.value, value: cell.value, label: slot.showLabels ? cell.label : '', digitStyle: digitStyle, labelStyle: labelStyle }))))));\n}\nfunction ChoiceSlotView({ slot, align, inverse, colors, onSubmitChoice }) {\n const [picked, setPicked] = useState([]);\n const [phase, setPhase] = useState('idle');\n const [notice, setNotice] = useState('');\n if (phase === 'success') {\n return (React.createElement(SlotMessageView, { message: slot.successMessage, align: align, inverse: inverse, colors: colors }));\n }\n const toggle = (value) => {\n setNotice('');\n setPicked((prev) => {\n if (prev.includes(value))\n return prev.filter((entry) => entry !== value);\n // At the ceiling the extra tap is refused with a reason rather than\n // silently dropping the oldest pick.\n if (slot.max > 0 && prev.length >= slot.max) {\n setNotice(`Pick up to ${slot.max}`);\n return prev;\n }\n return [...prev, value];\n });\n };\n const submit = () => {\n if (!onSubmitChoice || !slot.tagName || phase === 'submitting')\n return;\n // An empty submit would CLEAR the tag — never what a \"save\" button means.\n const floor = Math.max(slot.min, 1);\n if (picked.length < floor) {\n setNotice(floor === 1 ? 'Pick at least one' : `Pick at least ${floor}`);\n return;\n }\n const values = slot.options\n .filter((option) => picked.includes(option.value))\n .map((option) => option.tagValue || option.value);\n setNotice('');\n setPhase('submitting');\n // Promise.resolve wrapper: a host callback that throws SYNCHRONOUSLY must\n // land in the error phase too, not escape and strand the slot.\n Promise.resolve()\n .then(() => onSubmitChoice({ slotKey: slot.key, tagName: slot.tagName, values }))\n .then(() => setPhase('success'), () => setPhase('error'));\n };\n const submitting = phase === 'submitting';\n const textColor = webPopupTextColor('body', colors, inverse);\n const optionStyle = {\n ...WEB_POPUP_TEXT_VARIANT_STYLES.body,\n ...(textColor ? { color: textColor } : {}),\n };\n const chip = (selected) => ({\n padding: '6px 14px',\n borderRadius: 999,\n border: `1px solid ${colors.accent}`,\n backgroundColor: selected ? colors.accent : 'transparent',\n color: selected ? colors.onAccent : colors.accent,\n fontFamily: 'inherit',\n fontSize: 14,\n lineHeight: 1.4,\n cursor: 'pointer',\n });\n return (React.createElement(\"div\", { style: { padding: WEB_POPUP_TEXT_SLOT_PADDING } },\n slot.control === 'chips'\n ? (React.createElement(\"div\", { style: { display: 'flex', flexWrap: 'wrap', gap: 8, justifyContent: align === 'center' ? 'center' : 'flex-start' } }, slot.options.map((option) => (React.createElement(\"button\", { key: option.value, type: \"button\", \"aria-pressed\": picked.includes(option.value), style: chip(picked.includes(option.value)), onClick: () => toggle(option.value) }, option.label)))))\n : (React.createElement(\"div\", { style: { display: 'grid', gap: 6 } }, slot.options.map((option) => (React.createElement(\"label\", { key: option.value, style: { ...optionStyle, display: 'flex', alignItems: 'center', gap: 8, cursor: 'pointer' } },\n React.createElement(\"input\", { type: \"checkbox\", checked: picked.includes(option.value), onChange: () => toggle(option.value), style: { accentColor: colors.accent, width: 16, height: 16, margin: 0 } }),\n option.label))))),\n notice ? React.createElement(\"div\", { style: { ...WEB_POPUP_TEXT_VARIANT_STYLES.caption, color: colors.error, paddingTop: 4 } }, notice) : null,\n phase === 'error' ? (React.createElement(\"div\", { style: { ...WEB_POPUP_TEXT_VARIANT_STYLES.caption, color: colors.error, paddingTop: 4 } }, WEB_POPUP_RETRY_ERROR)) : null,\n React.createElement(\"div\", { style: { padding: WEB_POPUP_BUTTON_SLOT_PADDING } },\n React.createElement(\"button\", { type: \"button\", style: {\n ...webPopupButtonPillStyle(slot.submitVariant, colors),\n ...(submitting ? { opacity: 0.7 } : {}),\n }, onClick: submit }, slot.submitLabel))));\n}\n// One rating button: a number for nps, a star for stars, a thumb for thumbs.\nfunction RatingButton({ score, scale, selected, colors, onPick }) {\n const base = {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n padding: 0,\n border: `1px solid ${colors.accent}`,\n backgroundColor: selected ? colors.accent : 'transparent',\n color: selected ? colors.onAccent : colors.accent,\n fontFamily: 'inherit',\n fontSize: 14,\n lineHeight: 1,\n cursor: 'pointer',\n };\n if (scale === 'nps') {\n return (React.createElement(\"button\", { type: \"button\", \"aria-label\": `Rate ${score}`, \"aria-pressed\": selected, style: { ...base, width: 30, height: 32, borderRadius: 6 }, onClick: onPick }, score));\n }\n const thumbs = scale === 'thumbs';\n // Icon-only buttons need a name of their own; the nps row says it in text.\n let label = `Rate ${score}`;\n if (thumbs)\n label = score === 1 ? 'Thumbs up' : 'Thumbs down';\n return (React.createElement(\"button\", { type: \"button\", \"aria-label\": label, \"aria-pressed\": selected, style: { ...base, width: thumbs ? 44 : 34, height: thumbs ? 40 : 34, borderRadius: thumbs ? 8 : 6 }, onClick: onPick },\n React.createElement(\"svg\", { width: thumbs ? 22 : 20, height: thumbs ? 22 : 20, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 2, strokeLinecap: \"round\", strokeLinejoin: \"round\", \"aria-hidden\": \"true\" },\n React.createElement(\"path\", { d: thumbs ? WEB_POPUP_THUMB_UP_PATH : WEB_POPUP_GLYPH_PATHS.star, ...(thumbs && score === 0 ? { transform: 'rotate(180 12 12)' } : {}) }))));\n}\nfunction RatingSlotView({ slot, align, inverse, colors, onSubmitRating }) {\n const [score, setScore] = useState(null);\n const [phase, setPhase] = useState('idle');\n if (phase === 'success') {\n return (React.createElement(SlotMessageView, { message: slot.successMessage, align: align, inverse: inverse, colors: colors }));\n }\n const send = (value) => {\n if (!onSubmitRating || !slot.eventName || phase === 'submitting')\n return;\n setPhase('submitting');\n // See ChoiceSlotView: a synchronous throw must land in 'error' too.\n Promise.resolve()\n .then(() => onSubmitRating({\n slotKey: slot.key,\n eventName: slot.eventName,\n score: value,\n scale: slot.scale,\n }))\n .then(() => setPhase('success'), () => setPhase('error'));\n };\n const pick = (value) => {\n // Same guard as `send`: otherwise a tap during an in-flight submit moves the\n // highlight while the host keeps the score that was actually sent.\n if (phase === 'submitting')\n return;\n setScore(value);\n if (slot.submitMode === 'instant')\n send(value);\n };\n const scores = webPopupRatingScores(slot.scale);\n const labelColor = webPopupTextColor('caption', colors, inverse);\n const edgeLabelStyle = {\n ...WEB_POPUP_TEXT_VARIANT_STYLES.caption,\n ...(labelColor ? { color: labelColor } : {}),\n };\n // A star scale fills every button up to the pick — the row IS the score.\n const isSelected = (value) => (slot.scale === 'stars' ? score !== null && value <= score : score === value);\n return (React.createElement(\"div\", { style: { padding: WEB_POPUP_TEXT_SLOT_PADDING } },\n React.createElement(\"div\", { style: {\n display: 'flex',\n flexWrap: 'wrap',\n gap: 6,\n justifyContent: align === 'center' ? 'center' : 'flex-start',\n } }, scores.map((value) => (React.createElement(RatingButton, { key: value, score: value, scale: slot.scale, selected: isSelected(value), colors: colors, onPick: () => pick(value) })))),\n (slot.labels.low || slot.labels.high) ? (React.createElement(\"div\", { style: { display: 'flex', justifyContent: 'space-between', gap: 8, paddingTop: 4 } },\n React.createElement(\"span\", { style: edgeLabelStyle }, slot.labels.low),\n React.createElement(\"span\", { style: edgeLabelStyle }, slot.labels.high))) : null,\n phase === 'error' ? (React.createElement(\"div\", { style: { ...WEB_POPUP_TEXT_VARIANT_STYLES.caption, color: colors.error, paddingTop: 4 } }, WEB_POPUP_RETRY_ERROR)) : null,\n slot.submitMode === 'button' ? (React.createElement(\"div\", { style: { padding: WEB_POPUP_BUTTON_SLOT_PADDING } },\n React.createElement(\"button\", { type: \"button\", style: {\n ...webPopupButtonPillStyle('primary', colors),\n ...(phase === 'submitting' ? { opacity: 0.7 } : {}),\n }, onClick: () => (score === null ? undefined : send(score)) }, slot.submitLabel))) : null));\n}\nfunction GlyphSlotView({ slot, align, inverse, colors }) {\n // No authored color: the accent, or the inverse copy color over a dark image\n // (where the accent can be the one thing that doesn't read).\n const color = slot.color || (inverse ? colors.textInverse : colors.accent);\n return (React.createElement(\"div\", { style: { padding: WEB_POPUP_TEXT_SLOT_PADDING, textAlign: align, lineHeight: 0 } },\n React.createElement(\"svg\", { width: slot.size, height: slot.size, viewBox: \"0 0 24 24\", fill: \"none\", stroke: color, strokeWidth: 2, strokeLinecap: \"round\", strokeLinejoin: \"round\", \"aria-hidden\": \"true\", style: { display: 'inline-block' } },\n React.createElement(\"path\", { d: WEB_POPUP_GLYPH_PATHS[slot.name] }))));\n}\n// A switch, not a chain of `&&`: the compiler is what notices a slot type with\n// no view. Exported so the editor canvas draws these slots with it, not a copy.\nexport function WebPopupSlotView({ slot, align, inverse, colors, mode = 'live', onRequestClose, onPageChange, onSubmitForm, onSubmitChoice, onSubmitRating, }) {\n // A page jump nobody handles is a no-op, not a crash — the editor canvas\n // and the previews mount this without any navigation of their own.\n const pageChange = onPageChange ?? (() => { });\n switch (slot.type) {\n case 'text':\n return (React.createElement(TextSlotView, { slot: slot, align: align, inverse: inverse, colors: colors }));\n case 'button':\n return (React.createElement(ButtonSlotView, { slot: slot, colors: colors, onRequestClose: onRequestClose, onPageChange: pageChange }));\n case 'email-subscription-form':\n return (React.createElement(FormSlotView, { slot: slot, align: align, inverse: inverse, colors: colors, onSubmitForm: onSubmitForm }));\n case 'timer':\n return (React.createElement(TimerSlotView, { slot: slot, align: align, inverse: inverse, colors: colors, mode: mode, onRequestClose: onRequestClose, onPageChange: pageChange }));\n case 'choice':\n return (React.createElement(ChoiceSlotView, { slot: slot, align: align, inverse: inverse, colors: colors, onSubmitChoice: onSubmitChoice }));\n case 'rating':\n return (React.createElement(RatingSlotView, { slot: slot, align: align, inverse: inverse, colors: colors, onSubmitRating: onSubmitRating }));\n case 'glyph':\n return (React.createElement(GlyphSlotView, { slot: slot, align: align, inverse: inverse, colors: colors }));\n }\n}\n// A Content leaf: the named zone's slots (texts, buttons and forms in order)\n// as a grid stack. An unknown zone key renders as an empty spot, not a crash.\nfunction ContentNodeView({ node, page, colors, mode, leaf, onRequestClose, onPageChange, onSubmitForm, onSubmitChoice, onSubmitRating, }) {\n const zone = page.contents.find((z) => z.key === node.props.content);\n if (!zone)\n return null;\n if (leaf?.renderZone) {\n return React.createElement(\"div\", { style: { minWidth: 0 } }, leaf.renderZone(zone, node));\n }\n const align = node.props.align ?? 'left';\n const inverse = node.props.tone === 'inverse';\n return (React.createElement(\"div\", { style: { minWidth: 0 } }, zone.slots.map((slot, index) => {\n const previous = zone.slots[index - 1];\n const marginTop = previous\n ? webPopupSlotGap(webPopupSlotRole(previous), webPopupSlotRole(slot))\n : 0;\n return (React.createElement(\"div\", { key: slot.key, style: marginTop ? { marginTop } : undefined },\n React.createElement(WebPopupSlotView, { slot: slot, align: align, inverse: inverse, colors: colors, mode: mode, onRequestClose: onRequestClose, onPageChange: onPageChange, onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating })));\n })));\n}\n// The playable url of a media param, or undefined when it has no video.\nfunction mediaVideoSrc(image) {\n return image?.video ? safeUrl(image.video.src) : undefined;\n}\n// A media param's video: autoplay only muted, playsInline to keep iOS out of\n// fullscreen, and in 'preview' it holds on the poster instead of streaming.\nfunction MediaVideo({ image, src, style, mode }) {\n return (React.createElement(\"video\", { src: src, poster: image.src || undefined, style: style, autoPlay: mode === 'live', muted: true, playsInline: true, preload: \"metadata\", loop: image.video?.loop !== false, controls: image.video?.controls === true }));\n}\nfunction ImageNodeView({ node, page, leaf, mode }) {\n const image = page.images.find((i) => i.key === node.props.image);\n if (!image)\n return null;\n // The override sees srcless params too — an editor wants a placeholder\n // where the runtime shows nothing.\n if (leaf?.renderImage)\n return React.createElement(React.Fragment, null, leaf.renderImage(image, node));\n const video = mediaVideoSrc(image);\n if (!image.src && !video)\n return null;\n const style = { display: 'block', width: '100%', minWidth: 0 };\n if (image.fit) {\n style.height = '100%';\n style.objectFit = image.fit;\n }\n else {\n style.height = 'auto';\n }\n if (image.blur)\n style.filter = `blur(${image.blur}px)`;\n if (video) {\n return (React.createElement(MediaVideo, { image: image, src: video, style: style, mode: mode }));\n }\n return React.createElement(\"img\", { src: image.src, alt: \"\", style: style });\n}\n// Both layered backgrounds (blur, video) share this shell: the color/poster\n// paints on an outer grid box, the content rides an inner layer covering it.\nfunction LayeredBackgroundBox({ style, outer, inner, layer, children }) {\n const { backgroundColor, ...rest } = style;\n return (React.createElement(\"div\", { style: { display: 'grid', minWidth: 0, backgroundColor, ...outer } },\n layer,\n React.createElement(\"div\", { style: { ...rest, ...inner } }, children)));\n}\n// The tree interpreter: containers → grid divs, leaves → zone/image views.\nfunction LayoutNodeView({ node, page, colors, mode, leaf, onRequestClose, onPageChange, onSubmitForm, onSubmitChoice, onSubmitRating, }) {\n if (node.type === 'Content') {\n return (React.createElement(ContentNodeView, { node: node, page: page, colors: colors, mode: mode, leaf: leaf, onRequestClose: onRequestClose, onPageChange: onPageChange, onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating }));\n }\n if (node.type === 'Image') {\n return (React.createElement(ImageNodeView, { node: node, page: page, leaf: leaf, mode: mode }));\n }\n const bgKey = node.props?.backgroundImage;\n const background = bgKey ? page.images.find((i) => i.key === bgKey) : undefined;\n const blur = background?.blur ?? 0;\n const dim = background?.dim ?? 0;\n const bgVideo = mediaVideoSrc(background);\n const style = webPopupContainerStyle(node, blur > 0 || bgVideo ? undefined : background?.src || undefined, dim);\n if (bgKey)\n style.backgroundColor = WEB_POPUP_BG_SECTION_FALLBACK;\n const children = node.children.map((child, index) => (React.createElement(LayoutNodeView\n // Layout nodes are static per page render — positional keys are fine.\n , { \n // Layout nodes are static per page render — positional keys are fine.\n key: index, node: child, page: page, colors: colors, mode: mode, leaf: leaf, onRequestClose: onRequestClose, onPageChange: onPageChange, onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating })));\n if (bgVideo && background) {\n // A background video can't ride the css background property, so it paints\n // as its own layer; the scrim moves onto the content layer above it.\n const scrim = webPopupScrimGradient(dim);\n return (React.createElement(LayeredBackgroundBox, { style: style, outer: {\n position: 'relative',\n overflow: 'hidden',\n ...(background.src ? webPopupBackgroundImageStyle(background.src) : {}),\n }, inner: { position: 'relative', ...(scrim ? { backgroundImage: scrim } : {}) }, layer: (React.createElement(MediaVideo, { image: background, src: bgVideo, mode: mode, style: {\n position: 'absolute',\n inset: 0,\n width: '100%',\n height: '100%',\n objectFit: 'cover',\n ...(blur > 0 ? { filter: `blur(${blur}px)` } : {}),\n } })) }, children));\n }\n if (blur > 0) {\n // backdrop-filter blurs what's painted BEHIND its element, never the\n // element's own background — so the image paints on an outer box and the\n // laid-out content rides an inner blurring layer covering it edge to\n // edge (grid/padding move onto that layer). The outer box is a grid so\n // a stretched height (a 'stretch' page's root) passes through to the\n // layer actually carrying alignContent.\n return (React.createElement(LayeredBackgroundBox, { style: style, outer: background?.src ? webPopupBackgroundImageStyle(background.src, dim) : undefined, inner: { backdropFilter: `blur(${blur}px)`, WebkitBackdropFilter: `blur(${blur}px)` } }, children));\n }\n return React.createElement(\"div\", { style: style }, children);\n}\n// The popup box: the shared chrome (background, radius, shadow) around one\n// resolved page's layout tree. Exported for the editor — its canvas is this\n// very interpreter with `leafRenderers` swapping the Content/Image leaves\n// for editable views (the container interpretation stays this component's,\n// which is what keeps the canvas true to the runtime); the viewport chrome\n// (placement, overlay, enter animation) is the caller's business there.\n// After a page switch (`animatePage`) the incoming content fades in — keyed\n// by page so the animation restarts per switch — and an explicit px height\n// glides via the transition (auto heights just snap).\nexport function WebPopupBox({ page, params, mode = 'live', colorScheme = 'light', leafRenderers, animatePage = false, onRequestClose, onPageChange, onSubmitForm, onSubmitChoice, onSubmitRating, }) {\n const colors = resolveWebPopupColors(params, colorScheme);\n const style = {\n position: 'relative',\n boxSizing: 'border-box',\n overflow: 'hidden',\n backgroundColor: colors.background,\n colorScheme: colors.scheme,\n fontFamily: WEB_POPUP_FONT_STACK,\n color: colors.text,\n borderRadius: params.borderRadius > 0 ? params.borderRadius : undefined,\n boxShadow: params.boxShadow && params.boxShadow !== 'none' ? params.boxShadow : undefined,\n transition: `height ${WEB_POPUP_PAGE_TRANSITION_MS}ms ease`,\n };\n if (page.height) {\n // 'stretch' fills whatever box the caller gives (the fixed container pins\n // both vertical edges in live mode); a px height is the box's own.\n style.height = page.height === 'stretch' ? '100%' : page.height;\n style.overflowY = 'auto';\n }\n // A stretch page's tree gets the full box height to lay out in: the\n // min-height'd single-track grid stretches the root container, so its\n // alignContent can place the content vertically (a px height keeps the\n // pre-stretch behavior — content flows from the top).\n const pageStyle = {\n ...(animatePage ? { animation: `pw-vpopup-page ${WEB_POPUP_PAGE_TRANSITION_MS}ms ease-out backwards` } : {}),\n ...(page.height === 'stretch' ? { display: 'grid', minHeight: '100%' } : {}),\n };\n return (React.createElement(\"div\", { style: style },\n React.createElement(\"div\", { key: page.key, style: pageStyle },\n React.createElement(LayoutNodeView, { node: page.layout, page: page, colors: colors, mode: mode, leaf: leafRenderers, onRequestClose: onRequestClose, onPageChange: onPageChange ?? (() => { }), onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating }))));\n}\nfunction CloseButton({ colors, onRequestClose }) {\n return (React.createElement(\"button\", { type: \"button\", \"aria-label\": \"Close\", onClick: onRequestClose, style: {\n position: 'absolute',\n top: 10,\n right: 10,\n width: 24,\n height: 24,\n padding: 0,\n border: 'none',\n borderRadius: '50%',\n background: webPopupColorAlpha(colors.surface, 0.92),\n boxShadow: '0 1px 3px rgba(16, 24, 40, 0.25)',\n color: colors.chromeIcon,\n fontSize: 13,\n lineHeight: 1,\n cursor: 'pointer',\n } }, \"\\u2715\"));\n}\n// Fixed viewport placement from the placement param: anchored edges get the\n// offset, unanchored axes center via translate. No width = stretch between\n// the side gutters; height 'stretch' = pinned to both vertical edges the same\n// way. The size is the ACTIVE page's (resolved page ?? chrome), so the box\n// re-anchors itself when a page switch changes it.\nfunction fixedContainerStyle(params, width, height) {\n const { placement } = params;\n const style = {\n position: 'fixed',\n boxSizing: 'border-box',\n maxWidth: placementMaxSize(placement),\n maxHeight: placementMaxSize(placement),\n // The widget host is pointer-transparent (a corner banner must not block\n // the page); the popup itself takes clicks back.\n pointerEvents: 'auto',\n };\n if (width) {\n style.width = width;\n const h = placement.h;\n if (h === 'left')\n style.left = placement.offset;\n else if (h === 'right')\n style.right = placement.offset;\n else\n style.left = '50%';\n }\n else {\n // Stretch: pin both side edges regardless of the horizontal anchor.\n style.left = placement.offset;\n style.right = placement.offset;\n }\n if (height === 'stretch') {\n // Stretch: pin both vertical edges; the v anchor has nothing to place.\n style.top = placement.offset;\n style.bottom = placement.offset;\n }\n else if (placement.v === 'top')\n style.top = placement.offset;\n else if (placement.v === 'bottom')\n style.bottom = placement.offset;\n else\n style.top = '50%';\n const tx = width && placement.h === 'center' ? '-50%' : '0';\n const ty = placement.v === 'middle' && height !== 'stretch' ? '-50%' : '0';\n if (tx !== '0' || ty !== '0')\n style.transform = `translate(${tx}, ${ty})`;\n const anim = ANIMATION_STYLE[params.animation];\n if (anim)\n style.animation = anim;\n // A page switch that changes the (explicit) width glides instead of\n // jumping; the anchored edges keep the box pinned while it resizes.\n style.transition = `width ${WEB_POPUP_PAGE_TRANSITION_MS}ms ease`;\n return style;\n}\nconst DARK_MEDIA_QUERY = '(prefers-color-scheme: dark)';\nfunction prefersDark() {\n return typeof window !== 'undefined' && typeof window.matchMedia === 'function'\n && window.matchMedia(DARK_MEDIA_QUERY).matches;\n}\n// 'auto' follows the visitor's OS setting and keeps following it: a popup can\n// be on screen when the theme flips, and a stale palette is the visible half.\nfunction useColorScheme(pref, watch) {\n const [dark, setDark] = useState(() => pref === 'auto' && watch && prefersDark());\n useEffect(() => {\n if (pref !== 'auto' || !watch || typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return undefined;\n }\n const media = window.matchMedia(DARK_MEDIA_QUERY);\n const onChange = (event) => setDark(event.matches);\n setDark(media.matches);\n media.addEventListener('change', onChange);\n return () => media.removeEventListener('change', onChange);\n }, [pref, watch]);\n if (pref !== 'auto')\n return pref;\n return dark ? 'dark' : 'light';\n}\nexport function WebPopupReader({ params, mode = 'live', colorScheme = 'auto', onRequestClose, onSubmitForm, onSubmitChoice, onSubmitRating, leafRenderers, }) {\n // null = never navigated: show the start page. Guarded against keys that\n // don't exist (anymore) — an edited/older document falls back gracefully.\n const [pageKey, setPageKey] = useState(null);\n // Only the active page's images are in the DOM — the rest would start\n // downloading on the page switch, leaving the previous picture on screen\n // until the new one arrives. Warm the browser cache for every page up front.\n useEffect(() => {\n resolveWebPopupPages(params).forEach((p) => p.images.forEach(({ src }) => {\n if (src)\n new Image().src = src;\n }));\n }, [params]);\n const scheme = useColorScheme(colorScheme, webPopupDarkEnabled(params));\n const pages = resolveWebPopupPages(params);\n if (pages.length === 0)\n return null;\n const page = pages.find((p) => p.key === pageKey) ?? startPageOf(params, pages);\n // null = the initial page: entry is the chrome's business (the enter\n // animation in live mode); the page fade only plays on actual switches.\n const animatePage = pageKey !== null;\n if (mode === 'preview') {\n return (React.createElement(\"div\", { style: {\n position: 'relative',\n width: page.width ?? '100%',\n transition: `width ${WEB_POPUP_PAGE_TRANSITION_MS}ms ease`,\n } },\n React.createElement(\"style\", null, WEB_POPUP_KEYFRAMES),\n React.createElement(WebPopupBox, { page: page, params: params, mode: mode, colorScheme: scheme, leafRenderers: leafRenderers, animatePage: animatePage, onRequestClose: onRequestClose, onPageChange: setPageKey, onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating })));\n }\n const overlay = params.overlay;\n return (React.createElement(React.Fragment, null,\n React.createElement(\"style\", null, WEB_POPUP_KEYFRAMES),\n overlay && (\n // Modal semantics: the dim is clickable and dismisses the popup.\n React.createElement(\"div\", { style: {\n position: 'fixed',\n inset: 0,\n backgroundColor: overlay.color,\n opacity: overlay.opacity,\n animation: 'pw-vpopup-overlay 0.2s ease-out backwards',\n pointerEvents: 'auto',\n }, onClick: onRequestClose })),\n React.createElement(\"div\", { style: fixedContainerStyle(params, page.width, page.height) },\n React.createElement(WebPopupBox, { page: page, params: params, mode: mode, colorScheme: scheme, leafRenderers: leafRenderers, animatePage: animatePage, onRequestClose: onRequestClose, onPageChange: setPageKey, onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating }),\n React.createElement(CloseButton, { colors: resolveWebPopupColors(params, scheme), onRequestClose: onRequestClose }))));\n}\n","import { type WebPopupFormSubmitHandler, type WebPopupFormSubmitResult } from 'smart-blocks-utils';\n\nimport { SUBSCRIPTION_FORMS_API_URL } from './constants';\nimport { Logger } from '../../core/logger';\n\n// The subscription-form service client for popup-embedded forms\n// (email-subscription-form slots). Same endpoints and payloads the hosted\n// <pushwoosh-subscribe-widget> uses — the popup reader only renders the\n// fields; subscribing an email goes through the service so form stats,\n// double opt-in and tag mapping keep working.\n\nconst SUBMIT_RESULTS: Record<string, WebPopupFormSubmitResult> = {\n SUBMIT_FORM_RESULT_SUBSCRIBED: 'subscribed',\n SUBMIT_FORM_RESULT_CONFIRM_EMAIL: 'confirm-email',\n SUBMIT_FORM_RESULT_ALREADY_SUBSCRIBED: 'already-subscribed',\n};\n\nconst formUrl = (formCode: string, action: string): string => (\n `${SUBSCRIPTION_FORMS_API_URL}/forms/code/${encodeURIComponent(formCode)}${action}`\n);\n\n/**\n * The reader's `onSubmitForm` handler: POST the slot's payload to the bound\n * form's submit endpoint. Throws on transport errors and unrecognized\n * results — the form slot shows its generic retryable error then; the\n * reader doesn't log, so the failure is recorded here before rethrowing.\n */\nexport const submitSubscriptionForm: WebPopupFormSubmitHandler = async (formCode, payload) => {\n try {\n const response = await fetch(formUrl(formCode, '/submit'), {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n // userId mirrors the hosted widget's convention: same as the email.\n body: JSON.stringify({ ...payload, userId: payload.email }),\n });\n if (!response.ok) {\n throw new Error(`Subscription form submit failed: HTTP ${response.status}`);\n }\n const data = await response.json() as { result?: string };\n const result = SUBMIT_RESULTS[data.result ?? ''];\n if (!result) {\n throw new Error(`Subscription form submit failed: unexpected result \"${data.result}\"`);\n }\n return result;\n } catch (error) {\n Logger.error(error, `Failed to submit subscription form \"${formCode}\"`);\n throw error;\n }\n};\n\n/**\n * Fire-and-forget view stat for a popup-embedded form — the denominator of\n * the form's conversion rate. Never blocks or breaks the popup itself.\n */\nexport const recordSubscriptionFormView = (formCode: string, hwid: string): void => {\n fetch(formUrl(formCode, '/view'), {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ code: formCode, userId: hwid, hwid }),\n }).catch((error) => {\n Logger.error(error, `Failed to record subscription form view for \"${formCode}\"`);\n });\n};\n","import {\n collectWebPopupFormCodes, webPopupExpired, type WebPopupColorSchemePref, type WebPopupParams,\n} from 'smart-blocks-utils';\n\nimport {\n POPUP_HOST_Z_INDEX, QUEUE_GAP_MS, WEB_POPUPS_LOG_PREFIX, WEB_POPUPS_WIDGET_NAMESPACE,\n} from './constants';\nimport { createChoiceSubmitHandler, createRatingSubmitHandler } from './deviceSubmitApi';\nimport {\n parseWebPopupContent, renderWebPopup, unmountWebPopup, type WebPopupSubmitHandlers,\n} from './renderer';\nimport { recordSubscriptionFormView } from './subscriptionFormApi';\nimport {\n type IWebPopupsPublicApi, type PageRule, type VisibleWebPopup, type WebPopup,\n type WebPopupEntry, type WebPopupHideReason, type WebPopupShowTrigger, type WebPopupsPublicState,\n} from './types';\nimport { Logger } from '../../core/logger';\nimport { type Pushwoosh } from '../../core/Pushwoosh';\n\nexport class WebPopupsWidget implements IWebPopupsPublicApi {\n private readonly pw: Pushwoosh;\n\n private isRecurringVisitor = false;\n\n /** Every popup the server returned, keyed by code. Never pruned. */\n private readonly entries = new Map<string, WebPopupEntry>();\n\n /** Codes whose delay has elapsed, waiting for the display slot. */\n private readonly queue: Array<string> = [];\n\n /** The single popup on screen, if any. */\n private visible: VisibleWebPopup | null = null;\n\n private drainTimeoutId: number | null = null;\n\n private autoShowEnabled = true;\n\n private colorScheme: WebPopupColorSchemePref = 'auto';\n\n private isNavigationSubscribed = false;\n\n private openPopupsCount = 0;\n\n private bodyOverflowBeforeLock: string | null = null;\n\n /** Built once from `pw`: the device-API side of the choice/rating slots. */\n private readonly submitHandlers: WebPopupSubmitHandlers;\n\n // Declared before readyPromise on purpose: the Promise executor runs\n // synchronously inside that field initialiser.\n private readyResolve!: () => void;\n\n private readonly readyPromise = new Promise<void>((resolve) => {\n this.readyResolve = resolve;\n });\n\n constructor(pw: Pushwoosh) {\n this.pw = pw;\n this.submitHandlers = {\n onSubmitChoice: createChoiceSubmitHandler(pw),\n onSubmitRating: createRatingSubmitHandler(pw),\n };\n\n // Registered before run() so a site can call show() from its very first\n // Pushwoosh.push() callback; every public method awaits readyPromise.\n pw.moduleRegistry.webPopups = this;\n }\n\n public async run(): Promise<void> {\n const { pw } = this;\n\n try {\n this.autoShowEnabled = pw.initParams.webPopups?.autoShow !== false;\n this.colorScheme = pw.initParams.webPopups?.colorScheme ?? 'auto';\n\n await pw.api.ensureDeviceRegistered();\n\n this.isRecurringVisitor = await pw.data.getIsRecurringVisitor();\n\n const webPopups = await pw.api.getPopupForms();\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Received ${webPopups.length} popup(s) from server:`, webPopups.map((webPopup) => webPopup.code));\n\n webPopups.forEach((popup, order) => {\n this.entries.set(popup.code, {\n popup,\n order,\n state: 'idle',\n content: null,\n loading: null,\n passedStrongConditions: false,\n timeoutId: null,\n visitRecorded: false,\n });\n });\n\n // Strong conditions gate AUTOMATIC display only — they are recorded, not\n // used as a load gate. Content is prefetched for every popup targeted at\n // this visitor, including trigger_type=API ones, so show() is instant;\n // popups that failed a strong condition are fetched lazily by show().\n await Promise.allSettled(Array.from(this.entries.values()).map(async (entry) => {\n entry.passedStrongConditions = await this.checkStrongCondition(entry.popup);\n if (entry.passedStrongConditions) {\n await this.ensureContent(entry);\n }\n }));\n\n const loaded = this.loadedCodes();\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} ${loaded.length} popup(s) passed strong conditions and loaded:`, loaded);\n\n this.subscribeToNavigation();\n this.renderForCurrentPage();\n\n await pw.data.setIsRecurringVisitor(true);\n } finally {\n // show() must never hang, even if run() blew up half way.\n this.readyResolve();\n pw.dispatchEvent('web-popups-ready', {});\n }\n }\n\n /* ------------------------------------------------------------------ *\n * Public API — Pushwoosh.moduleRegistry.webPopups\n * ------------------------------------------------------------------ */\n\n /**\n * Show a popup immediately, ignoring EVERY display condition: delay, page\n * rules, device_type, visitors_type, frequency capping and trigger_type.\n * An already visible popup is closed to make room.\n *\n * Stats and frequency bookkeeping are recorded exactly as for an automatic\n * display. Never rejects: resolves false and logs the reason on failure.\n */\n public async show(code: string): Promise<boolean> {\n await this.readyPromise;\n\n const entry = this.entries.get(code);\n if (!entry) {\n Logger.error(new Error('Unknown web popup code'), `${WEB_POPUPS_LOG_PREFIX} show(\"${code}\"): no such popup`);\n return false;\n }\n\n if (this.visible?.code === code) {\n return true;\n }\n\n // Awaited BEFORE preempting so close() and present() run in the same task:\n // otherwise the browser paints the moment between two modal popups with the\n // body scroll lock released.\n const content = await this.ensureContent(entry);\n if (!content) {\n Logger.error(new Error('Web popup content unavailable'), `${WEB_POPUPS_LOG_PREFIX} show(\"${code}\"): content unavailable`);\n return false;\n }\n\n // The automatic pipeline may have shown this very popup while we awaited;\n // re-presenting it would double-count the impression.\n if (this.visible?.code === code) {\n return true;\n }\n\n // show() deliberately ignores the page rules — but not an expired\n // countdown: the offer is over however the popup was triggered.\n if (!this.checkNotExpired(entry)) {\n return false;\n }\n\n if (this.visible) {\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} show(\"${code}\") preempting \"${this.visible.code}\"`);\n // The preempted popup is finished with, not requeued: it already recorded\n // its impression and did its frequency bookkeeping.\n this.visible.close('preempted');\n }\n\n // Drop this popup's own armed timer / queue slot so the automatic pipeline\n // does not show it a second time.\n this.detachFromAutoPipeline(entry);\n\n this.present(entry, 'api');\n return true;\n }\n\n /**\n * Hide the visible popup, optionally only if it is the given one.\n * Returns false when nothing was hidden.\n */\n public hide(code?: string): boolean {\n if (!this.visible) {\n return false;\n }\n\n if (code !== undefined && this.visible.code !== code) {\n return false;\n }\n\n this.visible.close('api');\n return true;\n }\n\n /**\n * Hide the visible popup and dismiss everything still pending for this page\n * load. show() keeps working afterwards.\n */\n public hideAll(): boolean {\n const hadVisible = this.hide();\n\n this.entries.forEach((entry) => {\n if (entry.state !== 'waiting' && entry.state !== 'queued') {\n return;\n }\n\n this.detachFromAutoPipeline(entry);\n entry.state = 'done';\n });\n\n // After hide(), whose close() arms a drain for the next queued popup.\n this.cancelScheduledDrain();\n\n return hadVisible;\n }\n\n public isVisible(code?: string): boolean {\n if (!this.visible) {\n return false;\n }\n\n return code === undefined || this.visible.code === code;\n }\n\n public getVisibleCode(): string | null {\n return this.visible?.code ?? null;\n }\n\n public getAvailableCodes(): Array<string> {\n return Array.from(this.entries.keys());\n }\n\n public getState(): WebPopupsPublicState {\n const waiting: Array<string> = [];\n this.entries.forEach((entry, code) => {\n if (entry.state === 'waiting') {\n waiting.push(code);\n }\n });\n\n return {\n visible: this.getVisibleCode(),\n queued: [...this.queue],\n waiting,\n available: this.getAvailableCodes(),\n };\n }\n\n /* ------------------------------------------------------------------ *\n * Content loading\n * ------------------------------------------------------------------ */\n\n /**\n * Resolve the entry's renderable content, fetching it at most once. A failed\n * fetch clears the memo so a later show() can retry.\n */\n private ensureContent(entry: WebPopupEntry): Promise<WebPopupParams | null> {\n if (entry.content) {\n return Promise.resolve(entry.content);\n }\n\n if (entry.loading) {\n return entry.loading;\n }\n\n entry.loading = this.loadContent(entry.popup)\n .then((content) => {\n entry.content = content;\n return content;\n })\n .catch((error) => {\n Logger.error(error, `${WEB_POPUPS_LOG_PREFIX} Failed to load web popup \"${entry.popup.code}\"`);\n return null;\n })\n .finally(() => {\n if (!entry.content) {\n entry.loading = null;\n }\n });\n\n return entry.loading;\n }\n\n private async loadContent(webPopup: WebPopup): Promise<WebPopupParams | null> {\n const content = await this.pw.api.getPopupFormContent(webPopup.popup_form_content_code);\n const parsed = parseWebPopupContent(content.json);\n if (!parsed) {\n // Legacy / unknown format — this popup is broken and never shows.\n Logger.error(\n new Error('Unsupported popup content format'),\n `${WEB_POPUPS_LOG_PREFIX} Web popup \"${webPopup.code}\" content is not a supported {version, params} popup; skipping`,\n );\n return null;\n }\n\n return parsed;\n }\n\n private loadedCodes(): Array<string> {\n const codes: Array<string> = [];\n this.entries.forEach((entry, code) => {\n if (entry.content) {\n codes.push(code);\n }\n });\n return codes;\n }\n\n /* ------------------------------------------------------------------ *\n * Automatic display pipeline\n * ------------------------------------------------------------------ */\n\n private renderForCurrentPage(): void {\n this.releaseUnmatchedPending();\n\n const armed: Array<string> = [];\n this.entries.forEach((entry, code) => {\n if (this.canAutoDisplay(entry)) {\n this.armDelay(entry);\n armed.push(code);\n }\n });\n\n Logger.debug(\n `${WEB_POPUPS_LOG_PREFIX} ${armed.length} popup(s) selected for display on \"${window.location.pathname}\":`,\n armed,\n );\n\n // Insurance: a no-op when something is visible or nothing is queued.\n this.drain();\n }\n\n private canAutoDisplay(entry: WebPopupEntry): boolean {\n return this.autoShowEnabled\n && entry.state === 'idle'\n && entry.passedStrongConditions\n && this.isAutoTrigger(entry.popup)\n && entry.content !== null\n && this.checkSoftCondition(entry.popup)\n && this.checkNotExpired(entry);\n }\n\n private isAutoTrigger(webPopup: WebPopup): boolean {\n const trigger = webPopup.trigger_type;\n\n // Absent (older backend) or explicitly PAGE_LOAD means automatic display.\n // Any other value — including one this SDK version does not know — counts\n // as API-only, so a future trigger kind never shows itself by accident.\n return !trigger || trigger === 'PAGE_LOAD';\n }\n\n private armDelay(entry: WebPopupEntry): void {\n const { popup } = entry;\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Popup \"${popup.code}\" armed for display in ${popup.delay}s`);\n\n entry.state = 'waiting';\n this.recordVisit(entry);\n\n entry.timeoutId = window.setTimeout(() => {\n entry.timeoutId = null;\n entry.state = 'queued';\n this.insertIntoQueue(entry);\n\n Logger.debug(\n `${WEB_POPUPS_LOG_PREFIX} Popup \"${popup.code}\" delay elapsed; queued at position ${this.queue.indexOf(popup.code) + 1} of ${this.queue.length}`,\n );\n\n this.drain();\n }, popup.delay * 1000);\n }\n\n /**\n * VISIT is reported once per page load, when the popup is armed for the\n * current page — the same moment as before the queue existed.\n */\n private recordVisit(entry: WebPopupEntry): void {\n if (entry.visitRecorded) {\n return;\n }\n\n entry.visitRecorded = true;\n this.pw.api.recordPopupFormEvent(entry.popup.code, 1).catch((error) => {\n Logger.error(error, `${WEB_POPUPS_LOG_PREFIX} Failed to record web popup visit event for \"${entry.popup.code}\"`);\n });\n }\n\n /** Ordering: shorter delay first, then the order the server returned them. */\n private insertIntoQueue(entry: WebPopupEntry): void {\n const isAfter = (code: string): boolean => {\n const other = this.entries.get(code);\n if (!other) {\n return false;\n }\n\n if (other.popup.delay !== entry.popup.delay) {\n return other.popup.delay > entry.popup.delay;\n }\n\n return other.order > entry.order;\n };\n\n const index = this.queue.findIndex(isAfter);\n if (index === -1) {\n this.queue.push(entry.popup.code);\n return;\n }\n\n this.queue.splice(index, 0, entry.popup.code);\n }\n\n /**\n * Release popups whose page rules stopped matching, both the ones still\n * waiting out their delay and the ones already queued. They return to `idle`\n * and are re-armed with a full delay if the visitor comes back.\n */\n private releaseUnmatchedPending(): void {\n this.entries.forEach((entry) => {\n if (entry.state !== 'waiting' && entry.state !== 'queued') {\n return;\n }\n\n if (this.checkSoftCondition(entry.popup) && this.checkNotExpired(entry)) {\n return;\n }\n\n this.detachFromAutoPipeline(entry);\n entry.state = 'idle';\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Released popup \"${entry.popup.code}\": page no longer matches, or its countdown passed`);\n });\n }\n\n /** Clear an entry's armed timer and queue slot, leaving its state to the caller. */\n private detachFromAutoPipeline(entry: WebPopupEntry): void {\n if (entry.timeoutId !== null) {\n window.clearTimeout(entry.timeoutId);\n entry.timeoutId = null;\n }\n\n const index = this.queue.indexOf(entry.popup.code);\n if (index !== -1) {\n this.queue.splice(index, 1);\n }\n }\n\n /** Show the head of the queue if the display slot is free. */\n private drain(): void {\n if (this.visible || this.drainTimeoutId !== null) {\n return;\n }\n\n const code = this.queue.shift();\n if (code === undefined) {\n return;\n }\n\n const entry = this.entries.get(code);\n if (!entry || entry.state !== 'queued') {\n this.drain();\n return;\n }\n\n // The page may have changed — and the deadline may have passed — between\n // enqueue and the slot freeing up.\n if (!this.checkSoftCondition(entry.popup) || !this.checkNotExpired(entry)) {\n entry.state = 'idle';\n this.drain();\n return;\n }\n\n if (!entry.content) {\n entry.state = 'done';\n this.drain();\n return;\n }\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Display slot free; showing \"${code}\"`);\n this.present(entry, 'auto');\n }\n\n private scheduleDrain(): void {\n if (this.drainTimeoutId !== null) {\n return;\n }\n\n this.drainTimeoutId = window.setTimeout(() => {\n this.drainTimeoutId = null;\n this.drain();\n }, QUEUE_GAP_MS);\n }\n\n private cancelScheduledDrain(): void {\n if (this.drainTimeoutId === null) {\n return;\n }\n\n window.clearTimeout(this.drainTimeoutId);\n this.drainTimeoutId = null;\n }\n\n /* ------------------------------------------------------------------ *\n * Rendering\n * ------------------------------------------------------------------ */\n\n private present(entry: WebPopupEntry, trigger: WebPopupShowTrigger): void {\n // A drain armed by the popup we are replacing must not fire behind us.\n this.cancelScheduledDrain();\n\n const { popup, content } = entry;\n if (!content) {\n entry.state = 'done';\n return;\n }\n\n // The host is pointer-transparent: the reader's overlay / popup box\n // re-enable pointer events themselves, so a corner banner without a\n // dim never blocks the page underneath.\n const host = document.createElement('div');\n host.id = `${WEB_POPUPS_WIDGET_NAMESPACE}-${popup.code}`;\n host.style.position = 'fixed';\n host.style.inset = '0';\n host.style.zIndex = String(POPUP_HOST_Z_INDEX);\n host.style.pointerEvents = 'none';\n document.body.appendChild(host);\n\n const shadow = host.attachShadow({ mode: 'open' });\n const container = document.createElement('div');\n shadow.appendChild(container);\n\n // Only a dimmed (modal) popup locks the page scroll; banners and bars\n // leave the page usable.\n const modal = !!content.overlay;\n if (modal) {\n this.lockBodyScroll();\n }\n\n let closed = false;\n const close = (reason: WebPopupHideReason): void => {\n // Idempotent: the reader's overlay click and hide() can race.\n if (closed) {\n return;\n }\n closed = true;\n\n if (modal) {\n this.unlockBodyScroll();\n }\n\n unmountWebPopup(container);\n host.remove();\n\n if (this.visible?.code === popup.code) {\n this.visible = null;\n }\n entry.state = 'done';\n\n this.pw.dispatchEvent('hide-web-popup', { code: popup.code, reason });\n this.scheduleDrain();\n };\n\n this.visible = {\n code: popup.code, host, modal, close,\n };\n entry.state = 'visible';\n\n // The reader draws the whole chrome (overlay that closes on click,\n // placement, animation, the close button and close-action buttons).\n renderWebPopup(container, content, () => close('user'), this.submitHandlers, this.colorScheme);\n\n // Embedded email-subscription forms count a view per showing — the\n // denominator of the form's conversion stats.\n const formCodes = collectWebPopupFormCodes(content);\n if (formCodes.length > 0) {\n this.pw.data.getHwid()\n .then((hwid) => formCodes.forEach((formCode) => recordSubscriptionFormView(formCode, hwid)))\n .catch((error) => {\n Logger.error(error, `${WEB_POPUPS_LOG_PREFIX} Failed to record subscription form views for web popup \"${popup.code}\"`);\n });\n }\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Popup \"${popup.code}\" shown (trigger: ${trigger})`);\n\n // A no-op on the automatic path, where the visit was recorded at arm time.\n this.recordVisit(entry);\n this.markAsShown(popup).catch((error) => {\n Logger.error(error, `${WEB_POPUPS_LOG_PREFIX} Failed to mark web popup \"${popup.code}\" as shown`);\n });\n this.pw.dispatchEvent('show-web-popup', { code: popup.code, trigger });\n }\n\n /* ------------------------------------------------------------------ *\n * Scroll lock\n * ------------------------------------------------------------------ */\n\n private lockBodyScroll(): void {\n if (this.openPopupsCount === 0) {\n this.bodyOverflowBeforeLock = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n this.openPopupsCount += 1;\n }\n\n private unlockBodyScroll(): void {\n this.openPopupsCount = Math.max(0, this.openPopupsCount - 1);\n if (this.openPopupsCount === 0 && this.bodyOverflowBeforeLock !== null) {\n document.body.style.overflow = this.bodyOverflowBeforeLock;\n this.bodyOverflowBeforeLock = null;\n }\n }\n\n /* ------------------------------------------------------------------ *\n * Conditions\n * ------------------------------------------------------------------ */\n\n private subscribeToNavigation(): void {\n if (this.isNavigationSubscribed) {\n return;\n }\n\n this.isNavigationSubscribed = true;\n\n const onNavigate = (): void => this.renderForCurrentPage();\n\n const nav = (window as Window & { navigation?: EventTarget }).navigation;\n if (nav && typeof nav.addEventListener === 'function') {\n nav.addEventListener('currententrychange', onNavigate);\n return;\n }\n\n window.addEventListener('popstate', onNavigate);\n window.addEventListener('hashchange', onNavigate);\n\n // Programmatic pushState/replaceState fires no event; poll location instead\n // of monkey-patching history so SPA routers stay untouched.\n let lastHref = window.location.href;\n window.setInterval(() => {\n if (window.location.href !== lastHref) {\n lastHref = window.location.href;\n onNavigate();\n }\n }, 500);\n }\n\n private async checkStrongCondition(webPopup: WebPopup): Promise<boolean> {\n const conditions: Array<boolean> = await Promise.all([\n this.checkCanBeShownByDeviceTypeCondition(webPopup),\n this.checkCanBeShownByFrequencyCondition(webPopup),\n this.checkCanBeShownByVisitorsTypeCondition(webPopup),\n ]);\n\n return conditions.every((condition) => condition);\n }\n\n private checkSoftCondition(webPopup: WebPopup): boolean {\n return this.checkCanBeShownByMatchingPagesCondition(webPopup);\n }\n\n // A popup with a run-out 'hide-popup' countdown must not be shown at all —\n // asked HERE, at SHOW time, because a render already costs the impression.\n private checkNotExpired(entry: WebPopupEntry): boolean {\n if (!entry.content) {\n return true;\n }\n\n if (!webPopupExpired(entry.content, Date.now())) {\n return true;\n }\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Popup \"${entry.popup.code}\" not shown: its countdown has passed`);\n return false;\n }\n\n private checkCanBeShownByDeviceTypeCondition(webPopup: WebPopup): boolean {\n const { device_type: deviceType } = webPopup;\n\n const formFactor = this.pw.platformChecker.formFactor;\n if (deviceType === 'ALL') {\n return true;\n }\n\n return deviceType === formFactor;\n }\n\n private async checkCanBeShownByFrequencyCondition(webPopup: WebPopup): Promise<boolean> {\n const { frequency, code } = webPopup;\n\n if (frequency === 'ONCE') {\n const shown = await this.pw.data.getShownWebPopups();\n return !shown.includes(code);\n }\n\n if (frequency === 'ONCE_PER_SESSION') {\n return sessionStorage.getItem(this.getSessionStorageKey(code)) === null;\n }\n\n return true;\n }\n\n private checkCanBeShownByMatchingPagesCondition(webPopup: WebPopup): boolean {\n const { matching_pages: matchingPages, matching_page_rules: matchingPageRules, excluded_pages: excludedPages } = webPopup;\n const path = window.location.pathname;\n\n // \"Specified pages\": operator-aware rules preferred, legacy exact list as fallback.\n if (matchingPageRules && matchingPageRules.length > 0) {\n return matchingPageRules.some((rule) => this.matchPageRule(path, rule));\n }\n\n if (matchingPages && matchingPages.length > 0) {\n return matchingPages.includes(path);\n }\n\n if (excludedPages && excludedPages.length > 0) {\n return !excludedPages.some((rule) => this.matchPageRule(path, rule));\n }\n\n return true;\n }\n\n private matchPageRule(path: string, rule: PageRule): boolean {\n switch (rule.operator) {\n case 'EQUALS':\n return path === rule.path;\n case 'STARTS_WITH':\n return path.startsWith(rule.path);\n default:\n // Unknown operator: skip the rule (fail-open) rather than hide/crash.\n return false;\n }\n }\n\n private checkCanBeShownByVisitorsTypeCondition(webPopup: WebPopup): boolean {\n const { visitors_type: visitorsType } = webPopup;\n\n if (visitorsType === 'NEW') {\n return !this.isRecurringVisitor;\n }\n\n if (visitorsType === 'RECURRING') {\n return this.isRecurringVisitor;\n }\n\n return true;\n }\n\n private async markAsShown(webPopup: WebPopup): Promise<void> {\n this.pw.api.recordPopupFormEvent(webPopup.code, 2).catch((error) => {\n Logger.error(error, `${WEB_POPUPS_LOG_PREFIX} Failed to record web popup shown event for \"${webPopup.code}\"`);\n });\n const { frequency, code } = webPopup;\n\n if (frequency === 'ONCE') {\n await this.pw.data.addShownWebPopup(code);\n return;\n }\n\n if (frequency === 'ONCE_PER_SESSION') {\n sessionStorage.setItem(this.getSessionStorageKey(code), '1');\n }\n }\n\n private getSessionStorageKey(code: string): string {\n return `${WEB_POPUPS_WIDGET_NAMESPACE}.shown.${code}`;\n }\n}\n","import { render } from 'preact';\nimport {\n parseWebPopupJson, resolveWebPopupPages, WebPopupReader,\n type WebPopupChoiceSubmitHandler, type WebPopupColorSchemePref, type WebPopupParams,\n type WebPopupRatingSubmitHandler,\n} from 'smart-blocks-utils';\n\nimport { submitSubscriptionForm } from './subscriptionFormApi';\n\n/** The device-API handlers, passed in rather than imported: this module renders, it doesn't know the core. */\nexport type WebPopupSubmitHandlers = {\n onSubmitChoice: WebPopupChoiceSubmitHandler;\n onSubmitRating: WebPopupRatingSubmitHandler;\n};\n\n/**\n * Parse stored popup json into the renderable model. Returns null for\n * anything that is not a supported {version: 1, params} popup with at least\n * one resolvable page — including legacy pre-engine content (no `version`\n * field), which is deliberately unrenderable.\n */\nexport const parseWebPopupContent = (json: string): WebPopupParams | null => {\n const parsed = parseWebPopupJson(json);\n if (!parsed) {\n return null;\n }\n\n if (resolveWebPopupPages(parsed.params).length === 0) {\n return null;\n }\n\n return parsed.params;\n};\n\n// Mount the popup into the shadow root; the reader draws the whole chrome and\n// owns page switching. Forms submit to their service, choice/rating via `handlers`.\nexport const renderWebPopup = (\n container: HTMLElement,\n params: WebPopupParams,\n onRequestClose: () => void,\n handlers: WebPopupSubmitHandlers,\n colorScheme: WebPopupColorSchemePref = 'auto',\n): void => {\n render(\n <WebPopupReader\n params={params}\n mode=\"live\"\n colorScheme={colorScheme}\n onRequestClose={onRequestClose}\n onSubmitForm={submitSubscriptionForm}\n onSubmitChoice={handlers.onSubmitChoice}\n onSubmitRating={handlers.onSubmitRating}\n />,\n container,\n );\n};\n\n/**\n * Unmount a popup rendered by `renderWebPopup`. Dropping the host element alone\n * leaves the tree mounted on a detached node, so component cleanup never runs —\n * harmless for a popup shown once, not harmless now that popups cycle.\n */\nexport const unmountWebPopup = (container: HTMLElement): void => {\n render(null, container);\n};\n"],"names":["root","factory","exports","module","define","amd","a","i","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","SAFE_URL_PROTOCOL","WEB_POPUP_TEXT_COLOR","WEB_POPUP_TEXT_SECONDARY_COLOR","WEB_POPUP_ON_ACCENT_COLOR","WEB_POPUP_DEFAULT_COLORS","WEB_POPUP_TEXT_VARIANT_STYLES","h1","fontSize","fontWeight","lineHeight","h2","h3","body","caption","eyebrow","letterSpacing","icon","INVERSE_TEXT_ALPHAS","webPopupTextColor","variant","colors","inverse","color","alpha","hex","exec","full","length","split","map","c","join","r","g","b","parseInt","slice","inverseColorAt","textInverse","textSecondary","text","HEADING_VARIANTS","webPopupSlotRole","slot","type","includes","WEB_POPUP_BUTTON_SLOT_PADDING","webPopupButtonPillStyle","display","boxSizing","width","padding","borderRadius","fontFamily","textAlign","textDecoration","cursor","backgroundColor","surface","accent","border","onAccent","webPopupFormInputStyle","borderColor","surfaceText","outline","WEB_POPUP_FORM_DEFAULTS","WEB_POPUP_CHOICE_DEFAULTS","WEB_POPUP_RATING_DEFAULTS","WEB_POPUP_RETRY_ERROR","WEB_POPUP_KEYFRAMES","WEB_POPUP_GLYPH_PATHS","bell","gift","cart","chart","lock","calendar","check","star","clock","tag","mail","phone","download","play","shield","sparkle","percent","truck","ticket","user","WEB_POPUP_GLYPH_NAMES","keys","WEB_POPUP_GLYPH_SIZES","CONTAINER_TYPES","ORDERS","ALIGN_ITEMS","JUSTIFY_CONTENT","TEXT_ALIGNS","TONES","MAX_LENGTH_PX","LENGTH_UNIT_MAX","px","em","rem","LENGTH_PATTERN","TRACK_UNIT_MAX","fr","TRACK_PATTERN","TRACK_KEYWORDS","oneOf","allowed","undefined","cssLength","Number","isFinite","Math","min","max","match","trim","amount","unit","parseFloat","BOX_SIDES","trackSize","token","nonEmptyString","containerProps","raw","props","gap","whole","sides","side","sideValue","boxPadding","alignItems","justifyContent","alignContent","backgroundImage","sizes","isInteger","tokens","clamped","every","trackSizes","normalizeNode","depth","budget","nodes","node","content","out","align","tone","image","Array","isArray","children","child","normalized","push","order","reverse","normalizeWebPopupLayout","WEB_POPUP_VALUE_KEY_PATTERN","VALUE_REF_PATTERN","substituteString","values","substituteWebPopupLayoutValues","layout","substituteNode","BINDING_PROPS","Set","entries","has","webPopupCssLength","webPopupTracksValue","childCount","webPopupScrimGradient","dim","scrim","webPopupBackgroundImageStyle","src","JSON","stringify","backgroundSize","backgroundPosition","webPopupContainerStyle","backgroundSrc","backgroundDim","style","minWidth","gridAutoFlow","gridTemplateColumns","gridTemplateRows","top","right","bottom","left","webPopupPaddingValue","assign","HEX_RE","parseHex","toHex","v","round","toString","padStart","hueToChannel","p","q","t","tn","foldLightness","l","liftLightness","webPopupShiftColor","direction","rgb","h","s","rn","gn","bn","d","rgbToHsl","hslToRgb","webPopupMixColor","base","over","ratio","webPopupColorAlpha","isLightColor","autoDarkWebPopupColors","light","background","derivedColors","scheme","error","chromeIcon","webPopupDarkEnabled","chrome","dark","enabled","resolveWebPopupColors","effective","WALL_CLOCK","zoneFormatters","Map","zoneFormatter","timeZone","cached","formatter","Intl","DateTimeFormat","hour12","year","month","day","hour","minute","second","set","webPopupTimeZoneSupported","timezone","zoneOffsetMs","instantMs","parts","formatToParts","Date","read","find","part","UTC","DAY_MS","deadlines","webPopupWallClockMs","endTime","cacheKey","resolved","rawSecond","isNaN","wallAsUtc","rolled","getUTCMonth","getUTCDate","offsets","probe","offset","candidateOffsets","instants","filter","resolveWallClockMs","size","clear","TIMER_LABELS","en","days","hours","minutes","seconds","ru","de","es","pt","ja","ko","zh","hi","ar","he","th","safeUrl","url","trimmed","startsWith","test","webPopupLinkTargetAttrs","target","rel","SANITIZE_ALLOWED_TAGS","copySanitized","from","to","doc","childNodes","nodeType","appendChild","createTextNode","textContent","el","tagName","clean","createElement","toLowerCase","href","getAttribute","setAttribute","sanitizeWebPopupHtml","html","parsed","DOMParser","parseFromString","innerHTML","colorString","parseWebPopupJson","json","parse","candidate","version","params","pages","normalizeWebPopupColors","authored","auto","normalizeWebPopupDark","IMAGE_FITS","normalizeVideo","video","controls","loop","normalizeImages","img","label","mediaId","fit","blur","LENGTH_CONTROL_UNITS","finiteNumber","normalizeValueControl","control","kind","units","u","ranges","entry","normalizeControlRanges","options","option","normalizeWebPopupValues","some","webPopupValuesMap","fromEntries","FORM_FIELD_KINDS","BUTTON_VARIANTS","normalizeFormFields","field","f","placeholder","required","unshift","CHOICE_CONTROLS","RATING_SCALES","RATING_SUBMIT_MODES","TIMER_EXPIRE_ACTIONS","LANGUAGE_CODE","HEX_COLOR","slotString","slotStringOr","fallback","normalizeLanguage","code","normalizeChoiceOptions","existing","tagValue","normalizeChoiceBounds","bound","n","floor","normalizeSlots","zone","expirePage","onExpire","expires","language","showLabels","submitLabel","submitVariant","successMessage","labels","scale","low","high","submitMode","eventName","formCode","fields","privacy","checkboxLabel","linkLabel","confirmEmailMessage","name","action","normalizeContents","slots","validSize","resolveWebPopupPageSize","own","shared","axis","resolveWebPopupPages","page","height","images","contents","placementMaxSize","placement","WEB_POPUPS_WIDGET_NAMESPACE","WEB_POPUPS_LOG_PREFIX","STORE_NAME_KEY_VALUE","STORE_NAME_MESSAGE_LOG","STORE_NAME_INBOX_MESSAGES","storeCreatorDecorator","storeCreator","database","objectStoreNames","contains","initial","createObjectStore","keyPath","logStore","autoIncrement","createIndex","unique","statusIndex","store","multiEntry","Migrations","all","MigrationExecutor","constructor","db","migrationsBuilder","applyMigrations","applyMigrationsPack","migrationsPack","forEach","migration","onversionchange","event","console","info","close","databasePromise","getInstanceWithPromise","executor","Promise","resolve","reject","request","indexedDB","open","onsuccess","result","bind","onerror","onupgradeneeded","then","LogBase","_add","transaction","objectStore","add","getAll","items","ids","id","sort","maxItems","delete","openCursor","ev","cursorResult","continue","log","environment","self","registration","message","additional","date","Error","stack","levels","debug","limitLevel","Logger","setLevel","level","write","createChoiceSubmitHandler","pw","async","slotKey","api","setTags","operation","createRatingSubmitHandler","score","postEvent","levelName","levelNumber","args","groupCollapsed","trace","groupEnd","preact_module_l","e","y","w","_","m","parentNode","removeChild","k","arguments","defaultProps","x","ref","__k","__","__b","__e","__c","__v","__i","__u","vnode","S","C","context","$","I","__P","__d","__n","namespaceURI","D","P","A","H","__r","debounceRendering","shift","L","T","J","j","nextSibling","String","O","K","insertBefore","F","z","setProperty","N","cssText","replace","addEventListener","removeEventListener","removeAttribute","V","M","render","contextType","__E","Q","sub","state","__h","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","apply","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","E","indexOf","B","G","diffed","localName","document","createElementNS","is","__m","data","defaultValue","attributes","__html","current","unmount","componentWillUnmount","R","documentElement","firstChild","U","W","getDerivedStateFromError","setState","componentDidCatch","forceUpdate","setTimeout","random","jsxRuntime_module_f","jsxRuntime_module_u","__source","__self","hooks_module_t","hooks_module_r","hooks_module_u","hooks_module_i","hooks_module_o","hooks_module_f","hooks_module_c","hooks_module_e","hooks_module_a","hooks_module_v","hooks_module_l","hooks_module_m","hooks_module_p","hooks_module_s","__H","hooks_module_d","hooks_module_y","hooks_module_D","__N","__f","hooks_module_h","hooks_module_C","hooks_module_","hooks_module_A","hooks_module_T","hooks_module_F","concat","hooks_module_q","hooks_module_x","hooks_module_P","useDebugValue","hooks_module_g","hooks_module_j","hooks_module_z","hooks_module_B","requestAnimationFrame","hooks_module_w","hooks_module_k","clearTimeout","cancelAnimationFrame","compat_module_g","compat_module_E","compat_module_C","compat_module_R","compat_module_x","compat_module_w","compat_module_k","compat_module_I","compat_module_M","isPureReactComponent","compat_module_T","compat_module_A","for","compat_module_F","compat_module_L","count","only","toArray","compat_module_O","compat_module_U","compat_module_V","compat_module_W","compat_module_P","compat_module_j","__a","compat_module_B","__z","__R","__O","pop","compat_module_H","revealOrder","Z","Y","splice","compat_module_q","compat_module_G","compat_module_J","compat_module_K","compat_module_Q","compat_module_X","isReactComponent","configurable","writable","persist","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","nativeEvent","un","class","on","multiple","selected","className","$$typeof","ln","fn","an","ReactCurrentDispatcher","readContext","useCallback","useContext","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useSyncExternalStore","useTransition","hn","startTransition","Children","hydrate","unmountComponentAtNode","createPortal","containerInfo","createContext","Provider","__l","Consumer","createFactory","cloneElement","createRef","Fragment","isValidElement","isElement","isFragment","isMemo","displayName","findDOMNode","Component","PureComponent","memo","forwardRef","flushSync","unstable_batchedUpdates","StrictMode","Suspense","SuspenseList","lazy","default","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ANIMATION_STYLE","none","fade","slide","TextSlotView","dangerouslySetInnerHTML","ButtonSlotView","onRequestClose","onPageChange","pill","wrapper","onClick","SlotMessageView","FORM_EMAIL_PATTERN","FORM_INPUT_TYPES","email","FORM_AUTOCOMPLETE","firstName","lastName","PRIVACY_ERROR_KEY","FormSlotView","onSubmitForm","setValues","policyAccepted","setPolicyAccepted","focusedKey","setFocusedKey","errors","setErrors","phase","setPhase","captionColor","captionStyle","errorStyle","paddingTop","submitting","privacyHref","opacity","noValidate","margin","onSubmit","preventDefault","found","payload","customFields","submit","paddingBottom","autoComplete","disabled","onFocus","onBlur","onChange","setFieldValue","currentTarget","prev","checked","flexShrink","TimerCell","digitStyle","labelStyle","TimerSlotView","mode","nowMs","setNowMs","now","remaining","deadline","total","webPopupTimerRemaining","expired","setInterval","clearInterval","digitColor","labelColor","fontVariantNumeric","cells","cell","ChoiceSlotView","onSubmitChoice","picked","setPicked","notice","setNotice","toggle","textColor","optionStyle","flexWrap","accentColor","RatingButton","onPick","thumbs","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","transform","RatingSlotView","onSubmitRating","setScore","send","scores","edgeLabelStyle","isSelected","pick","GlyphSlotView","WebPopupSlotView","pageChange","ContentNodeView","leaf","renderZone","index","previous","marginTop","next","mediaVideoSrc","MediaVideo","poster","autoPlay","muted","playsInline","preload","ImageNodeView","renderImage","objectFit","alt","LayeredBackgroundBox","outer","inner","layer","rest","LayoutNodeView","bgKey","bgVideo","position","overflow","inset","backdropFilter","WebkitBackdropFilter","WebPopupBox","colorScheme","leafRenderers","animatePage","boxShadow","transition","overflowY","pageStyle","animation","minHeight","CloseButton","fixedContainerStyle","maxWidth","maxHeight","pointerEvents","tx","ty","anim","DARK_MEDIA_QUERY","useColorScheme","pref","watch","setDark","window","matchMedia","matches","media","WebPopupReader","pageKey","setPageKey","Image","startPage","startPageOf","overlay","SUBMIT_RESULTS","SUBMIT_FORM_RESULT_SUBSCRIBED","SUBMIT_FORM_RESULT_CONFIRM_EMAIL","SUBMIT_FORM_RESULT_ALREADY_SUBSCRIBED","formUrl","encodeURIComponent","submitSubscriptionForm","response","fetch","method","headers","userId","ok","status","WebPopupsWidget","isRecurringVisitor","queue","visible","drainTimeoutId","autoShowEnabled","isNavigationSubscribed","openPopupsCount","bodyOverflowBeforeLock","readyPromise","readyResolve","submitHandlers","moduleRegistry","webPopups","run","initParams","autoShow","ensureDeviceRegistered","getIsRecurringVisitor","getPopupForms","webPopup","popup","loading","passedStrongConditions","timeoutId","visitRecorded","allSettled","checkStrongCondition","ensureContent","loaded","loadedCodes","subscribeToNavigation","renderForCurrentPage","setIsRecurringVisitor","dispatchEvent","show","checkNotExpired","detachFromAutoPipeline","present","hide","hideAll","hadVisible","cancelScheduledDrain","isVisible","getVisibleCode","getAvailableCodes","getState","waiting","queued","available","loadContent","catch","finally","parseWebPopupContent","getPopupFormContent","popup_form_content_code","codes","releaseUnmatchedPending","armed","canAutoDisplay","armDelay","location","pathname","drain","isAutoTrigger","checkSoftCondition","trigger","trigger_type","delay","recordVisit","insertIntoQueue","recordPopupFormEvent","findIndex","other","scheduleDrain","host","zIndex","shadow","attachShadow","container","modal","lockBodyScroll","closed","reason","unlockBodyScroll","unmountWebPopup","remove","handlers","renderWebPopup","formCodes","collectWebPopupFormCodes","getHwid","hwid","recordSubscriptionFormView","markAsShown","onNavigate","nav","navigation","lastHref","checkCanBeShownByDeviceTypeCondition","checkCanBeShownByFrequencyCondition","checkCanBeShownByVisitorsTypeCondition","condition","checkCanBeShownByMatchingPagesCondition","webPopupExpired","device_type","deviceType","formFactor","platformChecker","frequency","getShownWebPopups","sessionStorage","getItem","getSessionStorageKey","matching_pages","matchingPages","matching_page_rules","matchingPageRules","excluded_pages","excludedPages","path","rule","matchPageRule","operator","visitors_type","visitorsType","setItem","addShownWebPopup"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"widget-web-popups.js","mappings":"CAAA,SAAAA,EAAAC,GACA,oBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,SACA,sBAAAG,QAAAA,OAAAC,IACAD,OAAA,GAAAH,OACA,CACA,IAAAK,EAAAL,IACA,QAAAM,KAAAD,GAAA,iBAAAJ,QAAAA,QAAAF,GAAAO,GAAAD,EAAAC,EACA,CACC,CATD,CASCC,KAAA,uBCRD,MAAAC,EAAA,CCAAA,EAAA,CAAAP,EAAAQ,KACA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ByG,GACM3nC,KAAK6/B,mBAGM,cAAjB8H,GACK3nC,KAAK6/B,kBAIhB,CAEQ,iBAAM+F,CAAY1E,GACxBlhC,KAAKgjB,GAAGG,IAAIkhB,qBAAqBnD,EAASpmB,KAAM,GAAGmoB,MAAO/yB,IACxDyS,GAAOzS,MAAMA,EAAO,GAAG2N,kDAAqEqjB,EAASpmB,WAEvG,MAAM6rB,UAAEA,EAAS7rB,KAAEA,GAASomB,EAEV,SAAdyF,EAKc,qBAAdA,GACFE,eAAee,QAAQ5nC,KAAK+mC,qBAAqBjsB,GAAO,WALlD9a,KAAKgjB,GAAGsG,KAAKue,iBAAiB/sB,EAOxC,CAEQ,oBAAAisB,CAAqBjsB,GAC3B,MAAO,GAAG8C,YAAqC9C,GACjD","sources":["webpack://web-push-notifications/webpack/universalModuleDefinition","webpack://web-push-notifications/webpack/bootstrap","webpack://web-push-notifications/webpack/runtime/define property getters","webpack://web-push-notifications/webpack/runtime/hasOwnProperty shorthand","webpack://web-push-notifications/webpack/runtime/make namespace object","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/constants.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/glyphs.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/layout.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/palette.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/timer.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/helpers.js","webpack://web-push-notifications/./src/widgets/WebPopups/constants.ts","webpack://web-push-notifications/./src/modules/storage/migrations/constants.ts","webpack://web-push-notifications/./src/modules/storage/migrations/helpers.ts","webpack://web-push-notifications/./src/modules/storage/migrations/initial.ts","webpack://web-push-notifications/./src/modules/storage/migrations/Migrations.ts","webpack://web-push-notifications/./src/modules/storage/migrations/MigrationExecutor.ts","webpack://web-push-notifications/./src/core/storage.ts","webpack://web-push-notifications/./src/core/logger.ts","webpack://web-push-notifications/./src/widgets/WebPopups/deviceSubmitApi.ts","webpack://web-push-notifications/./node_modules/preact/dist/preact.module.js","webpack://web-push-notifications/./node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js","webpack://web-push-notifications/./node_modules/preact/hooks/dist/hooks.module.js","webpack://web-push-notifications/./node_modules/preact/compat/dist/compat.module.js","webpack://web-push-notifications/./node_modules/smart-blocks-utils/dist/views/WebPopup/WebPopupReader.js","webpack://web-push-notifications/./src/widgets/WebPopups/subscriptionFormApi.ts","webpack://web-push-notifications/./src/widgets/WebPopups/WebPopupsWidget.ts","webpack://web-push-notifications/./src/widgets/WebPopups/renderer.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, () => {\nreturn ","// The require scope\nconst __webpack_require__ = {};\n\n","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Current stored-format version (WebPopupJson.version). Version 2 = the\n * layout-tree format (nested containers + Content/Image leaves, named content\n * zones). Version 1 (flat layout + single slot list) is retired without a\n * migration path — v1 popups are treated as broken, same as the pre-engine\n * ai-builder format.\n */\nexport const WEB_POPUP_VERSION = 2;\n// Bomb protection for the embedded layout tree — the json travels through a\n// public API, so the parser refuses to walk pathological trees.\nexport const WEB_POPUP_LAYOUT_MAX_DEPTH = 10;\nexport const WEB_POPUP_LAYOUT_MAX_NODES = 100;\n/** Protocols allowed in button hrefs (plus relative `#`/`/`/`?` prefixes). */\nexport const SAFE_URL_PROTOCOL = /^(https?:|mailto:|tel:)/i;\nexport const WEB_POPUP_FONT_STACK = 'Inter, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif';\n// Palette defaults (mirror the editor's popup theme) — what a popup gets for\n// any WebPopupColors entry its json doesn't set.\nexport const WEB_POPUP_TEXT_COLOR = '#101828';\nexport const WEB_POPUP_TEXT_SECONDARY_COLOR = '#667085';\nexport const WEB_POPUP_ACCENT_COLOR = '#2970FF';\nexport const WEB_POPUP_BACKGROUND_COLOR = '#FFFFFF';\n/** Label over an accent fill in the light scheme; dark picks it by accent luminance. */\nexport const WEB_POPUP_ON_ACCENT_COLOR = '#FFFFFF';\nexport const WEB_POPUP_DEFAULT_COLORS = {\n background: WEB_POPUP_BACKGROUND_COLOR,\n accent: WEB_POPUP_ACCENT_COLOR,\n text: WEB_POPUP_TEXT_COLOR,\n textSecondary: WEB_POPUP_TEXT_SECONDARY_COLOR,\n textInverse: '#FFFFFF',\n};\n/** Fallback width used when a fixed-width context needs a number anyway. */\nexport const WEB_POPUP_DEFAULT_WIDTH = 360;\n// Per-variant text styles — the same numbers the editor's canvas derives from\n// its theme presets. No colors here: those come from the popup palette via\n// webPopupTextColor below.\nexport const WEB_POPUP_TEXT_VARIANT_STYLES = {\n h1: { fontSize: 24, fontWeight: 600, lineHeight: 1.25 },\n h2: { fontSize: 18, fontWeight: 600, lineHeight: 1.3 },\n h3: { fontSize: 16, fontWeight: 600, lineHeight: 1.35 },\n body: { fontSize: 14, fontWeight: 'normal', lineHeight: 1.5 },\n caption: { fontSize: 12, fontWeight: 'normal', lineHeight: 1.4 },\n eyebrow: {\n fontSize: 11, fontWeight: 600, letterSpacing: '0.08em', lineHeight: 1.4,\n },\n icon: { fontSize: 24, lineHeight: 1.2 },\n};\n// Inverse-tone translucency per text style: headings full-strength, the\n// secondary variants toned down — same rhythm the palette's default white\n// set always had.\nconst INVERSE_TEXT_ALPHAS = {\n h1: 1,\n h2: 1,\n h3: 1,\n icon: 1,\n eyebrow: 0.8,\n body: 0.9,\n caption: 0.75,\n};\n// colors.textInverse at the given opacity. Only #rgb/#rrggbb can be blended;\n// any other author-supplied css color renders full-strength rather than\n// being guessed at.\nfunction inverseColorAt(color, alpha) {\n if (alpha >= 1)\n return color;\n const hex = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.exec(color)?.[1];\n if (!hex)\n return color;\n const full = hex.length === 3 ? hex.split('').map((c) => c + c).join('') : hex;\n const [r, g, b] = [0, 2, 4].map((i) => parseInt(full.slice(i, i + 2), 16));\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n}\n/**\n * A text slot's color: the palette's main/secondary role by variant; in an\n * 'inverse' zone (over a background image) — colors.textInverse, with the\n * secondary variants toned translucent. Undefined for a non-inverse 'icon'\n * (an emoji line inherits — its glyphs aren't recolorable anyway).\n */\nexport function webPopupTextColor(variant, colors, inverse) {\n if (inverse)\n return inverseColorAt(colors.textInverse, INVERSE_TEXT_ALPHAS[variant] ?? 1);\n if (variant === 'icon')\n return undefined;\n return variant === 'caption' || variant === 'eyebrow' ? colors.textSecondary : colors.text;\n}\n/** The dark fill under a container's background image while it loads. */\nexport const WEB_POPUP_BG_SECTION_FALLBACK = '#1D2939';\nconst HEADING_VARIANTS = ['h1', 'h2', 'h3', 'icon'];\nexport function webPopupSlotRole(slot) {\n // An icon reads as the line above a title, so it hugs what follows; a\n // countdown wants a block's air, which the 'action' fallback gives it.\n if (slot.type === 'glyph')\n return 'heading';\n if (slot.type !== 'text')\n return 'action';\n return HEADING_VARIANTS.includes(slot.variant) ? 'heading' : 'text';\n}\nexport function webPopupSlotGap(prev, next) {\n if (next === 'action')\n return prev === 'action' ? 6 : 16;\n if (next === 'text' && prev === 'heading')\n return 4;\n return 8;\n}\n// Paddings INSIDE a form slot (field rows, submit pill); the rhythm above\n// owns the space BETWEEN slots.\nexport const WEB_POPUP_TEXT_SLOT_PADDING = '4px 0';\nexport const WEB_POPUP_BUTTON_SLOT_PADDING = '8px 0 4px';\n/**\n * The button pill both button slots and a form slot's submit button render\n * with — buttons pair the accent with white (primary = accent fill + white\n * label, secondary = white fill + accent outline). Shared with the editor's\n * canvas (parity contract).\n */\nexport function webPopupButtonPillStyle(variant, colors) {\n return {\n display: 'block',\n boxSizing: 'border-box',\n width: '100%',\n padding: '10px 25px',\n borderRadius: 6,\n fontSize: 14,\n fontWeight: 600,\n fontFamily: 'inherit',\n lineHeight: 1.5,\n textAlign: 'center',\n textDecoration: 'none',\n cursor: 'pointer',\n ...(variant === 'secondary'\n ? { backgroundColor: colors.surface, color: colors.accent, border: `1px solid ${colors.accent}` }\n : { backgroundColor: colors.accent, color: colors.onAccent, border: 'none' }),\n };\n}\n// Form-slot input chrome, shared with the editor's canvas (parity contract):\n// a `surface` card whatever the zone tone, only the border varies.\nexport const WEB_POPUP_FORM_INPUT_BORDER = '#D0D5DD';\nexport const WEB_POPUP_FORM_ERROR_COLOR = '#D92D20';\n/** The error red lifted for a dark background — the same Untitled UI ramp, three steps up. */\nexport const WEB_POPUP_FORM_ERROR_COLOR_DARK = '#FDA29B';\nexport function webPopupFormInputStyle(colors, borderColor = colors.border) {\n return {\n display: 'block',\n boxSizing: 'border-box',\n width: '100%',\n padding: '10px 12px',\n borderRadius: 6,\n fontSize: 14,\n fontFamily: 'inherit',\n lineHeight: 1.5,\n backgroundColor: colors.surface,\n color: colors.surfaceText,\n border: `1px solid ${borderColor}`,\n outline: 'none',\n };\n}\n// What a normalized form slot falls back to when the json omits the copy —\n// also the editor's defaults for a freshly added slot.\nexport const WEB_POPUP_FORM_DEFAULTS = {\n submitLabel: 'Subscribe',\n successMessage: 'Thanks for subscribing!',\n confirmEmailMessage: 'Please check your inbox and confirm your email.',\n};\n// What a normalized choice slot falls back to when the json omits the copy.\nexport const WEB_POPUP_CHOICE_DEFAULTS = {\n submitLabel: 'Save',\n successMessage: 'Thanks! Your choice is saved.',\n};\n// Same, for a rating slot.\nexport const WEB_POPUP_RATING_DEFAULTS = {\n submitLabel: 'Send',\n successMessage: 'Thanks for the feedback!',\n};\n// The scores a scale offers, in display order; thumbs are 0/1 so `score` stays\n// \"higher is better\" everywhere. Shared with the editor canvas (parity).\nexport function webPopupRatingScores(scale) {\n if (scale === 'nps')\n return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n if (scale === 'stars')\n return [1, 2, 3, 4, 5];\n return [0, 1];\n}\n/** Options a `choice` slot may carry; exported so the editor can't offer one normalization drops. */\nexport const WEB_POPUP_MAX_CHOICE_OPTIONS = 12;\n/** What a slot says when the host callback rejected: nothing actionable, so it's retryable. */\nexport const WEB_POPUP_RETRY_ERROR = 'Something went wrong. Please try again.';\nexport const WEB_POPUP_KEYFRAMES = `\n@keyframes pw-vpopup-fade { from { opacity: 0; } }\n@keyframes pw-vpopup-slide { from { opacity: 0; translate: 0 28px; } }\n@keyframes pw-vpopup-overlay { from { opacity: 0; } }\n@keyframes pw-vpopup-page { from { opacity: 0; } }\n`;\n// Page-switch transition: the incoming page's content fades in while explicit\n// px sizes glide instead of jumping (auto sizes still snap — 'auto' can't be\n// transitioned). One duration for both so they read as a single move.\nexport const WEB_POPUP_PAGE_TRANSITION_MS = 300;\n","// Hand-authored 24×24 stroke geometry, inline (no icon package in a script that\n// loads on the customer's site). EXHAUSTIVE: a name without geometry won't compile.\nexport const WEB_POPUP_GLYPH_PATHS = {\n bell: 'M6 10a6 6 0 0 1 12 0c0 4 1.5 5.5 2 6H4c.5-.5 2-2 2-6M10 20a2 2 0 0 0 4 0',\n gift: 'M3 11h18v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zM2.5 7h19v4h-19zM12 7v14'\n + 'M12 7c-1 0-3-.2-3.5-1a2 2 0 0 1 3.5-1 2 2 0 0 1 3.5 1c-.5.8-2.5 1-3.5 1z',\n cart: 'M2 4h2.2l2.4 11.2A2 2 0 0 0 8.6 17H19M6 7h15l-2.2 7.5H8'\n + 'M10.5 20a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M19.5 20a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0',\n chart: 'M3 21h18M7 21V11M12 21V6M17 21v-8',\n lock: 'M5 11h14v10H5zM8 11V8a4 4 0 0 1 8 0v3',\n calendar: 'M4 6h16v15H4zM4 10h16M9 3v4M15 3v4',\n check: 'M4 13l5 5L20 6',\n star: 'M12 3l2.9 5.9 6.5.9-4.7 4.6 1.1 6.5-5.8-3.1-5.8 3.1 1.1-6.5L2.6 9.8l6.5-.9z',\n clock: 'M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0M12 7v5l4 2',\n tag: 'M20.6 13.4l-7.2 7.2a2 2 0 0 1-2.8 0l-7-7A2 2 0 0 1 3 12.2V5a2 2 0 0 1 2-2h7.2a2 2 0 0 1 1.4.6'\n + 'l7 7a2 2 0 0 1 0 2.8zM9 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0',\n mail: 'M3 6h18v12H3zM3 7l9 6 9-6',\n phone: 'M7 2h10a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1M10 19h4',\n download: 'M12 3v12M7 11l5 5 5-5M4 20h16',\n play: 'M8 5l12 7-12 7z',\n shield: 'M12 3l8 3v6c0 5-3.4 8.6-8 10-4.6-1.4-8-5-8-10V6z',\n sparkle: 'M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z'\n + 'M18 15l.9 2.1 2.1.9-2.1.9-.9 2.1-.9-2.1L15 18l2.1-.9z',\n percent: 'M19 5L5 19M8.5 8.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0M20.5 15.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0',\n truck: 'M2 7h12v10H2zM14 10h4l3 3v4h-7'\n + 'M8.5 19a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M20 19a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0',\n ticket: 'M4 7h16v4a2 2 0 0 0 0 4v3H4v-3a2 2 0 0 0 0-4zM14 7v12',\n user: 'M20 21a8 8 0 0 0-16 0M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0',\n};\n/** The icon names a `glyph` slot may carry — derived, never a second list. */\nexport const WEB_POPUP_GLYPH_NAMES = Object.keys(WEB_POPUP_GLYPH_PATHS);\n/** The sizes a glyph slot may take, px; the first is the normalization default. */\nexport const WEB_POPUP_GLYPH_SIZES = [24, 32, 48];\n/** The thumb a 'thumbs' rating draws; not author-selectable, so not in the whitelist. */\nexport const WEB_POPUP_THUMB_UP_PATH = 'M8 21V10l3.5-7A2 2 0 0 1 14 5v5h4.5a2 2 0 0 1 2 2.4'\n + 'l-1.3 6A2 2 0 0 1 17.2 21zM8 10H3.5v11H8';\n","import { WEB_POPUP_LAYOUT_MAX_DEPTH, WEB_POPUP_LAYOUT_MAX_NODES } from './constants';\n// Validation + css conversion for the embedded layout tree. The json is\n// API-writable and its styles land inline on customers' pages, so every prop\n// is normalized against a whitelist on parse: numbers are clamped, strings\n// must match a strict css-length/track pattern, enums fall back to defaults,\n// unknown props are dropped. Unknown node TYPES degrade instead of breaking:\n// a node with children renders as a Vertical stack (a container from a NEWER\n// editor keeps its content visible on an older engine build), a childless\n// unknown node is dropped.\nconst CONTAINER_TYPES = ['Vertical', 'Horizontal', 'Columns', 'Rows'];\nconst ORDERS = ['normal', 'reverse'];\nconst ALIGN_ITEMS = ['start', 'center', 'end', 'stretch'];\nconst JUSTIFY_CONTENT = ['start', 'center', 'end', 'space-between'];\nconst TEXT_ALIGNS = ['left', 'center', 'right'];\nconst TONES = ['default', 'inverse'];\nconst MAX_LENGTH_PX = 2000;\n// String lengths carry a unit — clamp each to its own sane ceiling, like the\n// numeric branch: a wire value (\"9999rem\" scales off the HOST page's root\n// font size) must not be able to blow the popup past the viewport.\nconst LENGTH_UNIT_MAX = { px: MAX_LENGTH_PX, '%': 100, em: 125, rem: 125 };\nconst LENGTH_PATTERN = /^(\\d{1,4}(?:\\.\\d+)?)(px|%|em|rem)$/;\nconst TRACK_UNIT_MAX = { px: MAX_LENGTH_PX, '%': 100, fr: 100 };\nconst TRACK_PATTERN = /^(\\d{1,4}(?:\\.\\d+)?)(px|%|fr)$/;\nconst TRACK_KEYWORDS = ['auto', 'min-content', 'max-content'];\nconst MAX_TRACKS = 12;\nfunction oneOf(value, allowed) {\n return allowed.includes(value) ? value : undefined;\n}\nfunction cssLength(value) {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return Math.min(Math.max(value, 0), MAX_LENGTH_PX);\n }\n if (typeof value !== 'string')\n return undefined;\n const match = LENGTH_PATTERN.exec(value.trim());\n if (!match)\n return undefined;\n const [, amount, unit] = match;\n return `${Math.min(parseFloat(amount), LENGTH_UNIT_MAX[unit])}${unit}`;\n}\nconst BOX_SIDES = ['top', 'right', 'bottom', 'left'];\nfunction boxPadding(value) {\n const whole = cssLength(value);\n if (whole !== undefined)\n return whole;\n if (typeof value !== 'object' || value === null)\n return undefined;\n const sides = {};\n for (const side of BOX_SIDES) {\n const sideValue = cssLength(value[side]);\n if (sideValue !== undefined)\n sides[side] = sideValue;\n }\n return Object.keys(sides).length > 0 ? sides : undefined;\n}\nfunction trackSize(token) {\n if (TRACK_KEYWORDS.includes(token))\n return token;\n const match = TRACK_PATTERN.exec(token);\n if (!match)\n return undefined;\n const [, amount, unit] = match;\n return `${Math.min(parseFloat(amount), TRACK_UNIT_MAX[unit])}${unit}`;\n}\nfunction trackSizes(value) {\n if (typeof value === 'number') {\n return Number.isInteger(value) && value >= 1 && value <= MAX_TRACKS ? value : undefined;\n }\n if (typeof value !== 'string')\n return undefined;\n const tokens = value.trim().split(/\\s+/);\n if (tokens.length < 1 || tokens.length > MAX_TRACKS)\n return undefined;\n const clamped = tokens.map(trackSize);\n return clamped.every((token) => token !== undefined) ? clamped.join(' ') : undefined;\n}\nfunction nonEmptyString(value) {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\nfunction containerProps(raw) {\n const props = {};\n const gap = cssLength(raw.gap);\n if (gap !== undefined)\n props.gap = gap;\n const padding = boxPadding(raw.padding);\n if (padding !== undefined)\n props.padding = padding;\n const alignItems = oneOf(raw.alignItems, ALIGN_ITEMS);\n if (alignItems)\n props.alignItems = alignItems;\n const justifyContent = oneOf(raw.justifyContent, JUSTIFY_CONTENT);\n if (justifyContent)\n props.justifyContent = justifyContent;\n const alignContent = oneOf(raw.alignContent, JUSTIFY_CONTENT);\n if (alignContent)\n props.alignContent = alignContent;\n const backgroundImage = nonEmptyString(raw.backgroundImage);\n if (backgroundImage)\n props.backgroundImage = backgroundImage;\n const sizes = trackSizes(raw.sizes);\n if (sizes !== undefined)\n props.sizes = sizes;\n return props;\n}\nfunction normalizeNode(raw, depth, budget) {\n if (depth > WEB_POPUP_LAYOUT_MAX_DEPTH || budget.nodes <= 0)\n return null;\n if (typeof raw !== 'object' || raw === null)\n return null;\n budget.nodes -= 1;\n const node = raw;\n const props = (typeof node.props === 'object' && node.props !== null ? node.props : {});\n if (node.type === 'Content') {\n const content = nonEmptyString(props.content);\n if (!content)\n return null;\n const out = { type: 'Content', props: { content } };\n const align = oneOf(props.align, TEXT_ALIGNS);\n if (align)\n out.props.align = align;\n const tone = oneOf(props.tone, TONES);\n if (tone && tone !== 'default')\n out.props.tone = tone;\n return out;\n }\n if (node.type === 'Image') {\n const image = nonEmptyString(props.image);\n if (!image)\n return null;\n const out = { type: 'Image', props: { image } };\n return out;\n }\n if (!Array.isArray(node.children))\n return null;\n const type = oneOf(node.type, CONTAINER_TYPES) ?? 'Vertical';\n const children = [];\n for (const child of node.children) {\n const normalized = normalizeNode(child, depth + 1, budget);\n if (normalized)\n children.push(normalized);\n }\n const out = containerProps(props);\n // `order: 'reverse'` is applied right here and consumed: the normalized\n // tree carries the children already reordered (and the sizes template\n // reversed with them, so each child keeps its track) — the renderers and\n // the editor canvas never see the prop. Caveat for hand-authored json: the\n // \"keeps its track\" guarantee assumes one sizes token per child; with a\n // mismatched count the reversed template pairs children with different\n // tracks (grid itself would misalign such a template the same way).\n if (oneOf(props.order, ORDERS) === 'reverse') {\n children.reverse();\n if (typeof out.sizes === 'string')\n out.sizes = out.sizes.split(' ').reverse().join(' ');\n }\n return { type, props: out, children };\n}\n/**\n * Validate an embedded layout tree from the stored json. Returns the\n * normalized tree, or null when the value isn't a renderable tree at all —\n * the page is then dropped by resolveWebPopupPages.\n */\nexport function normalizeWebPopupLayout(raw) {\n return normalizeNode(raw, 0, { nodes: WEB_POPUP_LAYOUT_MAX_NODES });\n}\n// --- value substitution ($refs) ---------------------------------------------\n/** A page value key, as referenced from the tree by a `$key` token. */\nexport const WEB_POPUP_VALUE_KEY_PATTERN = /^[a-zA-Z][a-zA-Z0-9-]*$/;\nconst VALUE_REF_PATTERN = /^\\$([a-zA-Z][a-zA-Z0-9-]*)$/;\n// Every whitespace-separated token of the form $key is replaced; separators\n// survive, so both a whole-string prop ('$stackGap') and a token inside a\n// sizes template ('1fr $imageWidth') substitute with the same rule. An\n// unknown key stays as-is and fails the prop whitelist downstream — the prop\n// is dropped, same as any invalid literal.\nfunction substituteString(value, values) {\n if (!value.includes('$'))\n return value;\n return value\n .split(/(\\s+)/)\n .map((token) => {\n const key = VALUE_REF_PATTERN.exec(token)?.[1];\n // Own properties only: '$constructor' must stay an unknown ref, not\n // resolve to an Object.prototype member.\n return key !== undefined && Object.prototype.hasOwnProperty.call(values, key) ? values[key] : token;\n })\n .join('');\n}\n/**\n * Substitute a page's named values into its RAW layout tree — `$key` tokens\n * in string props become the values, verbatim. Runs BEFORE\n * normalizeWebPopupLayout (see resolveWebPopupPages), so a substituted value\n * passes exactly the whitelists/clamps a literal one would; substitution is\n * single-pass and normalizeWebPopupValues rejects values containing '$', so\n * refs can't chain. Binding keys (`content`, `image`, `backgroundImage`) are\n * never substituted — they already name params by design.\n */\nexport function substituteWebPopupLayoutValues(layout, values) {\n if (typeof layout !== 'object' || layout === null || Object.keys(values).length === 0)\n return layout;\n return substituteNode(layout, values, 0);\n}\nconst BINDING_PROPS = new Set(['content', 'image', 'backgroundImage']);\nfunction substituteNode(raw, values, depth) {\n if (depth > WEB_POPUP_LAYOUT_MAX_DEPTH || typeof raw !== 'object' || raw === null)\n return raw;\n const node = raw;\n const out = { ...node };\n if (typeof node.props === 'object' && node.props !== null) {\n const props = { ...node.props };\n for (const [key, value] of Object.entries(props)) {\n if (BINDING_PROPS.has(key))\n continue;\n if (typeof value === 'string') {\n props[key] = substituteString(value, values);\n }\n else if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n // Per-side paddings: one level of string sides.\n const sides = { ...value };\n for (const [side, sideValue] of Object.entries(sides)) {\n if (typeof sideValue === 'string')\n sides[side] = substituteString(sideValue, values);\n }\n props[key] = sides;\n }\n }\n out.props = props;\n }\n if (Array.isArray(node.children)) {\n out.children = node.children.map((child) => substituteNode(child, values, depth + 1));\n }\n return out;\n}\n// --- css conversion (shared by the reader and the editor's canvas) ---------\nexport function webPopupCssLength(value) {\n return typeof value === 'number' ? `${value}px` : value;\n}\nexport function webPopupPaddingValue(padding) {\n if (typeof padding === 'number' || typeof padding === 'string')\n return webPopupCssLength(padding);\n const side = (value) => (value === undefined ? '0' : webPopupCssLength(value));\n return `${side(padding.top)} ${side(padding.right)} ${side(padding.bottom)} ${side(padding.left)}`;\n}\n/** grid-template value for Columns/Rows: absent sizes = one 1fr per child. */\nexport function webPopupTracksValue(sizes, childCount) {\n if (typeof sizes === 'string')\n return sizes;\n const count = typeof sizes === 'number' ? sizes : Math.max(childCount, 1);\n return `repeat(${count}, 1fr)`;\n}\n// The scrim as a standalone gradient, for the layers that can't stack it in\n// the same background property (a background VIDEO paints its own element).\nexport function webPopupScrimGradient(dim = 0) {\n if (!(dim > 0))\n return null;\n const scrim = `rgba(16, 24, 40, ${Math.min(dim, 1)})`;\n return `linear-gradient(${scrim}, ${scrim})`;\n}\n/**\n * The cover-background css of a container that draws an image behind its\n * content. `dim` (0–1) is the image's scrim — a dark translucent layer\n * painted as a gradient stacked over the url() in the same property, so it\n * needs no extra element and rides along wherever the background is drawn.\n */\nexport function webPopupBackgroundImageStyle(src, dim = 0) {\n // JSON.stringify quotes + escapes the url, so an src can't break out of\n // the css function.\n const image = `url(${JSON.stringify(src)})`;\n const scrim = webPopupScrimGradient(dim);\n return {\n backgroundImage: scrim ? `${scrim}, ${image}` : image,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n };\n}\n/**\n * The inline style of a container node — grid, mirroring kit-helpers'\n * Vertical/Horizontal/Columns/Rows semantics. The background image is passed\n * resolved (looked up in the page's images by the caller) so this stays a\n * pure props → css mapping.\n */\nexport function webPopupContainerStyle(node, backgroundSrc, backgroundDim = 0) {\n const props = node.props ?? {};\n const style = { display: 'grid', minWidth: 0 };\n if (node.type === 'Horizontal')\n style.gridAutoFlow = 'column';\n if (node.type === 'Columns')\n style.gridTemplateColumns = webPopupTracksValue(props.sizes, node.children.length);\n if (node.type === 'Rows')\n style.gridTemplateRows = webPopupTracksValue(props.sizes, node.children.length);\n if (props.gap !== undefined)\n style.gap = webPopupCssLength(props.gap);\n if (props.padding !== undefined)\n style.padding = webPopupPaddingValue(props.padding);\n if (props.alignItems)\n style.alignItems = props.alignItems;\n if (props.justifyContent)\n style.justifyContent = props.justifyContent;\n if (props.alignContent)\n style.alignContent = props.alignContent;\n if (backgroundSrc)\n Object.assign(style, webPopupBackgroundImageStyle(backgroundSrc, backgroundDim));\n return style;\n}\n","// Scheme resolution for the popup palette: the authored light/dark roles plus\n// the derived ones (input surface, borders, the label over an accent fill).\nimport { WEB_POPUP_DEFAULT_COLORS, WEB_POPUP_FORM_ERROR_COLOR, WEB_POPUP_FORM_ERROR_COLOR_DARK, WEB_POPUP_FORM_INPUT_BORDER, WEB_POPUP_ON_ACCENT_COLOR, WEB_POPUP_TEXT_COLOR, WEB_POPUP_TEXT_SECONDARY_COLOR, } from './constants';\nconst HEX_RE = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;\nfunction parseHex(color) {\n const hex = HEX_RE.exec(color.trim())?.[1];\n if (!hex)\n return null;\n const full = hex.length === 3 ? hex.split('').map((c) => c + c).join('') : hex;\n return [0, 2, 4].map((i) => parseInt(full.slice(i, i + 2), 16));\n}\nfunction toHex([r, g, b]) {\n return `#${[r, g, b].map((v) => Math.max(0, Math.min(255, Math.round(v))).toString(16).padStart(2, '0')).join('')}`;\n}\nfunction rgbToHsl([r, g, b]) {\n const [rn, gn, bn] = [r / 255, g / 255, b / 255];\n const max = Math.max(rn, gn, bn);\n const min = Math.min(rn, gn, bn);\n const l = (max + min) / 2;\n if (max === min)\n return [0, 0, l];\n const d = max - min;\n const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n let h;\n if (max === rn)\n h = (gn - bn) / d + (gn < bn ? 6 : 0);\n else if (max === gn)\n h = (bn - rn) / d + 2;\n else\n h = (rn - gn) / d + 4;\n return [h / 6, s, l];\n}\nfunction hueToChannel(p, q, t) {\n let tn = t;\n if (tn < 0)\n tn += 1;\n if (tn > 1)\n tn -= 1;\n if (tn < 1 / 6)\n return p + (q - p) * 6 * tn;\n if (tn < 1 / 2)\n return q;\n if (tn < 2 / 3)\n return p + (q - p) * (2 / 3 - tn) * 6;\n return p;\n}\nfunction hslToRgb([h, s, l]) {\n if (s === 0) {\n const v = l * 255;\n return [v, v, v];\n }\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n return [\n hueToChannel(p, q, h + 1 / 3) * 255,\n hueToChannel(p, q, h) * 255,\n hueToChannel(p, q, h - 1 / 3) * 255,\n ];\n}\n// Mirror the light half onto [0.07, 0.5]: #FFFFFF lands on the dark canvas\n// tone and near-whites stay apart instead of collapsing into one floor.\nfunction foldLightness(l) {\n return l > 0.5 ? 0.07 + (1 - l) * ((0.5 - 0.07) / 0.5) : l;\n}\n// Mirror the dark half onto [0.5, 0.93]: #000000 lands short of glaring white.\nfunction liftLightness(l) {\n return l < 0.5 ? 0.93 - l * ((0.93 - 0.5) / 0.5) : l;\n}\n/** Hue and saturation survive; only lightness moves. Non-hex colors pass through. */\nexport function webPopupShiftColor(color, direction) {\n const rgb = parseHex(color);\n if (!rgb)\n return color;\n const [h, s, l] = rgbToHsl(rgb);\n return toHex(hslToRgb([h, s, direction === 'fold' ? foldLightness(l) : liftLightness(l)]));\n}\n/** `ratio` of `over` blended into `base`; either color non-hex = `base` unchanged. */\nexport function webPopupMixColor(base, over, ratio) {\n const a = parseHex(base);\n const b = parseHex(over);\n if (!a || !b)\n return base;\n return toHex(a.map((v, i) => v + (b[i] - v) * ratio));\n}\n/** `color` at `alpha` as rgba(); a non-hex color renders full-strength instead of being guessed at. */\nexport function webPopupColorAlpha(color, alpha) {\n const rgb = parseHex(color);\n if (!rgb || alpha >= 1)\n return color;\n const [r, g, b] = rgb;\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n}\nfunction isLightColor(color) {\n const rgb = parseHex(color);\n if (!rgb)\n return false;\n // Perceived luminance, not HSL lightness: #FFFF00 and #0000FF share l = 0.5.\n const [r, g, b] = rgb;\n return (0.299 * r + 0.587 * g + 0.114 * b) / 255 > 0.6;\n}\n// The dark counterpart of a light palette: text lifts, surfaces fold, the\n// accent and the over-image inverse color stay as authored.\nexport function autoDarkWebPopupColors(light) {\n return {\n background: webPopupShiftColor(light.background, 'fold'),\n accent: light.accent,\n text: webPopupShiftColor(light.text, 'lift'),\n textSecondary: webPopupShiftColor(light.textSecondary, 'lift'),\n textInverse: light.textInverse,\n };\n}\n// Light keeps the values the popup shipped with before dark mode existed\n// (white cards, grey border, white label) — enabling dark must not restyle it.\nfunction derivedColors(colors, scheme) {\n if (scheme === 'light') {\n return {\n surface: WEB_POPUP_DEFAULT_COLORS.background,\n surfaceText: WEB_POPUP_TEXT_COLOR,\n border: WEB_POPUP_FORM_INPUT_BORDER,\n onAccent: WEB_POPUP_ON_ACCENT_COLOR,\n error: WEB_POPUP_FORM_ERROR_COLOR,\n chromeIcon: WEB_POPUP_TEXT_SECONDARY_COLOR,\n };\n }\n return {\n surface: webPopupMixColor(colors.background, colors.text, 0.08),\n surfaceText: colors.text,\n border: webPopupMixColor(colors.background, colors.text, 0.24),\n onAccent: isLightColor(colors.accent) ? WEB_POPUP_TEXT_COLOR : WEB_POPUP_ON_ACCENT_COLOR,\n error: WEB_POPUP_FORM_ERROR_COLOR_DARK,\n chromeIcon: colors.textSecondary,\n };\n}\n/** The dark palette a popup renders with: authored roles over the autogenerated ones. */\nexport function webPopupDarkColors(light, dark) {\n return { ...autoDarkWebPopupColors(light), ...(dark?.colors ?? {}) };\n}\n/** True when the popup opts into dark mode at all — the host's cue to watch the media query. */\nexport function webPopupDarkEnabled(chrome) {\n return chrome.dark?.enabled === true;\n}\n/** The scheme a popup actually draws with: 'dark' only when it opts in. */\nexport function webPopupEffectiveScheme(chrome, scheme = 'light') {\n return scheme === 'dark' && webPopupDarkEnabled(chrome) ? 'dark' : 'light';\n}\n// Every color a renderer needs, for the scheme actually drawn. Asking for\n// 'dark' on a popup without dark mode returns the light palette.\nexport function resolveWebPopupColors(chrome, scheme = 'light') {\n const effective = webPopupEffectiveScheme(chrome, scheme);\n const colors = effective === 'dark' ? webPopupDarkColors(chrome.colors, chrome.dark) : chrome.colors;\n return { ...colors, scheme: effective, ...derivedColors(colors, effective) };\n}\n/** The url drawn for `scheme`; a dark source only exists when authored. */\nexport function webPopupImageSrc(image, scheme = 'light') {\n return scheme === 'dark' && image.srcDark ? image.srcDark : image.src;\n}\n/** The page dim and box shadow for the scheme actually drawn; the light ones\n * stand in wherever the dark palette authored no override. */\nexport function resolveWebPopupBoxChrome(chrome, scheme = 'light') {\n if (webPopupEffectiveScheme(chrome, scheme) === 'light') {\n return { overlay: chrome.overlay, boxShadow: chrome.boxShadow };\n }\n return {\n overlay: chrome.dark?.overlay ?? chrome.overlay,\n boxShadow: chrome.dark?.boxShadow ?? chrome.boxShadow,\n };\n}\n","// Countdown math: `endTime` is a LOCAL WALL CLOCK in `timezone` (empty = UTC),\n// never an instant. Pure, `now` passed in — the renderer ticks, this computes.\nconst WALL_CLOCK = /^(\\d{4})-(\\d{2})-(\\d{2})[T ](\\d{2}):(\\d{2})(?::(\\d{2}))?$/;\n// One formatter per zone: the reader asks for the remainder once a second per\n// timer slot, and constructing an Intl.DateTimeFormat is the expensive part.\nconst zoneFormatters = new Map();\nfunction zoneFormatter(timeZone) {\n const cached = zoneFormatters.get(timeZone);\n if (cached)\n return cached;\n try {\n const formatter = new Intl.DateTimeFormat('en-US', {\n timeZone,\n hour12: false,\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n });\n zoneFormatters.set(timeZone, formatter);\n return formatter;\n }\n catch {\n // An unknown/unsupported IANA name — the engine can't place a wall clock in it.\n return null;\n }\n}\n/** Can this engine compute offsets in the zone? Empty = the contract's UTC, so supported. */\nexport function webPopupTimeZoneSupported(timezone) {\n return !timezone || zoneFormatter(timezone) !== null;\n}\n// The zone's offset from UTC at an instant, in ms: render local parts, read\n// them back as if they were UTC, take the difference.\nfunction zoneOffsetMs(instantMs, formatter) {\n const parts = formatter.formatToParts(new Date(instantMs));\n const read = (type) => (Number(parts.find((part) => part.type === type)?.value ?? '0'));\n // hour12: false still renders midnight as '24' in some engines.\n const asUtc = Date.UTC(read('year'), read('month') - 1, read('day'), read('hour') % 24, read('minute'), read('second'));\n return asUtc - instantMs;\n}\nconst DAY_MS = 86400000;\n// Every offset that can apply to a wall clock this close to a DST switch: the\n// day before, the naive instant, the day after.\nfunction candidateOffsets(wallAsUtc, formatter) {\n const offsets = [];\n for (const probe of [wallAsUtc - DAY_MS, wallAsUtc, wallAsUtc + DAY_MS]) {\n const offset = zoneOffsetMs(probe, formatter);\n if (!offsets.includes(offset))\n offsets.push(offset);\n }\n return offsets;\n}\n// The reader asks for the remainder once a second per slot, and the deadline\n// never moves; a handful of entries, cleared wholesale if a document is absurd.\nconst deadlines = new Map();\n/** The instant (epoch ms) a wall clock names in a zone, or null when this engine can't place it. */\nexport function webPopupWallClockMs(endTime, timezone) {\n const cacheKey = `${endTime}|${timezone}`;\n const cached = deadlines.get(cacheKey);\n if (cached !== undefined)\n return cached;\n const resolved = resolveWallClockMs(endTime, timezone);\n if (deadlines.size > 100)\n deadlines.clear();\n deadlines.set(cacheKey, resolved);\n return resolved;\n}\nfunction resolveWallClockMs(endTime, timezone) {\n const match = WALL_CLOCK.exec((endTime || '').trim());\n if (!match)\n return null;\n const [, year, month, day, hour, minute, rawSecond] = match.map(Number);\n // The seconds group is optional — an absent one reads as NaN, not 0.\n const second = Number.isNaN(rawSecond) ? 0 : rawSecond;\n if (month < 1 || month > 12 || day < 1 || day > 31)\n return null;\n if (hour > 23 || minute > 59 || second > 59)\n return null;\n const wallAsUtc = Date.UTC(year, month - 1, day, hour, minute, second);\n // Date.UTC rolls impossible days over (Feb 30 → Mar 2); reject instead.\n const rolled = new Date(wallAsUtc);\n if (rolled.getUTCMonth() !== month - 1 || rolled.getUTCDate() !== day)\n return null;\n if (!timezone)\n return wallAsUtc;\n const formatter = zoneFormatter(timezone);\n if (!formatter)\n return null;\n // One rule for every zone, whatever the sign of its offset: an offset counts\n // when the instant it produces reads back as the wall clock asked for.\n const offsets = candidateOffsets(wallAsUtc, formatter);\n const instants = offsets\n .filter((offset) => zoneOffsetMs(wallAsUtc - offset, formatter) === offset)\n .map((offset) => wallAsUtc - offset);\n // An ambiguous wall clock (fall back) takes the FIRST of its two instants.\n if (instants.length > 0)\n return Math.min(...instants);\n // None reads back: the wall clock is inside a spring-forward gap. The pre-gap\n // offset is the smaller one, so this rolls forward to just past the gap.\n return wallAsUtc - Math.min(...offsets);\n}\n/** What's left at `nowMs`, by unit; a passed OR uncomputable deadline reads as all zeros. */\nexport function webPopupTimerRemaining(endTime, timezone, nowMs) {\n const deadline = webPopupWallClockMs(endTime, timezone);\n const total = deadline === null ? 0 : Math.max(0, deadline - nowMs);\n const seconds = Math.floor(total / 1000);\n return {\n total,\n days: Math.floor(seconds / 86400),\n hours: Math.floor(seconds / 3600) % 24,\n minutes: Math.floor(seconds / 60) % 60,\n seconds: seconds % 60,\n };\n}\n// Unit labels by ISO 639-1 code, the editor's 14 languages; anything else = English.\n// NOTE: not written by native speakers — worth a review before customers see them.\nconst TIMER_LABELS = {\n en: { days: 'Days', hours: 'Hours', minutes: 'Minutes', seconds: 'Seconds' },\n ru: { days: 'Дни', hours: 'Часы', minutes: 'Минуты', seconds: 'Секунды' },\n de: { days: 'Tage', hours: 'Stunden', minutes: 'Minuten', seconds: 'Sekunden' },\n es: { days: 'Días', hours: 'Horas', minutes: 'Minutos', seconds: 'Segundos' },\n fr: { days: 'Jours', hours: 'Heures', minutes: 'Minutes', seconds: 'Secondes' },\n pt: { days: 'Dias', hours: 'Horas', minutes: 'Minutos', seconds: 'Segundos' },\n ja: { days: '日', hours: '時間', minutes: '分', seconds: '秒' },\n ko: { days: '일', hours: '시간', minutes: '분', seconds: '초' },\n zh: { days: '天', hours: '小时', minutes: '分', seconds: '秒' },\n hi: { days: 'दिन', hours: 'घंटे', minutes: 'मिनट', seconds: 'सेकंड' },\n bn: { days: 'দিন', hours: 'ঘণ্টা', minutes: 'মিনিট', seconds: 'সেকেন্ড' },\n ar: { days: 'أيام', hours: 'ساعات', minutes: 'دقائق', seconds: 'ثوان' },\n he: { days: 'ימים', hours: 'שעות', minutes: 'דקות', seconds: 'שניות' },\n th: { days: 'วัน', hours: 'ชั่วโมง', minutes: 'นาที', seconds: 'วินาที' },\n};\n/** The unit labels for a language code; empty/unknown = English. */\nexport function webPopupTimerLabels(language) {\n return TIMER_LABELS[language] ?? TIMER_LABELS.en;\n}\n","import { SAFE_URL_PROTOCOL, WEB_POPUP_CHOICE_DEFAULTS, WEB_POPUP_DEFAULT_COLORS, WEB_POPUP_FORM_DEFAULTS, WEB_POPUP_MAX_CHOICE_OPTIONS, WEB_POPUP_RATING_DEFAULTS, WEB_POPUP_VERSION, } from './constants';\nimport { WEB_POPUP_GLYPH_NAMES, WEB_POPUP_GLYPH_SIZES } from './glyphs';\nimport { normalizeWebPopupLayout, substituteWebPopupLayoutValues, WEB_POPUP_VALUE_KEY_PATTERN, } from './layout';\nimport { autoDarkWebPopupColors } from './palette';\nimport { webPopupTimeZoneSupported, webPopupWallClockMs } from './timer';\n// Sanitize a user-entered button URL before it lands in an href: https/http/\n// mailto/tel and page-relative links only.\nexport function safeUrl(url) {\n const trimmed = (url || '').trim();\n if (!trimmed)\n return undefined;\n if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed.startsWith('?'))\n return trimmed;\n if (SAFE_URL_PROTOCOL.test(trimmed))\n return trimmed;\n return undefined;\n}\n/**\n * The target/rel pair a popup link renders with: only an exact '_self' opts\n * out of the default new tab (and of its noreferrer, which same-tab\n * navigation doesn't need). One rule for both link kinds — the reader's\n * button anchors and the sanitizer's inline text links.\n */\nexport function webPopupLinkTargetAttrs(target) {\n return target === '_self' ? { target: '_self' } : { target: '_blank', rel: 'noreferrer' };\n}\nconst SANITIZE_ALLOWED_TAGS = new Set(['STRONG', 'B', 'EM', 'I', 'U', 'BR', 'A']);\nfunction copySanitized(from, to, doc) {\n for (const child of Array.from(from.childNodes)) {\n if (child.nodeType === 3 /* text */) {\n to.appendChild(doc.createTextNode(child.textContent ?? ''));\n continue;\n }\n if (child.nodeType !== 1 /* element */)\n continue;\n const el = child;\n // Unknown tags are unwrapped — their children survive as plain content.\n if (!SANITIZE_ALLOWED_TAGS.has(el.tagName)) {\n copySanitized(el, to, doc);\n continue;\n }\n const clean = doc.createElement(el.tagName.toLowerCase());\n if (el.tagName === 'A') {\n const href = safeUrl(el.getAttribute('href') ?? undefined);\n if (href)\n clean.setAttribute('href', href);\n const { target, rel } = webPopupLinkTargetAttrs(el.getAttribute('target'));\n clean.setAttribute('target', target);\n if (rel)\n clean.setAttribute('rel', rel);\n }\n to.appendChild(clean);\n copySanitized(el, clean, doc);\n }\n}\n/**\n * Sanitize a text slot's html before it's injected into the page. The editor\n * only ever writes inline formatting, but the json travels through a public\n * API and renders on customers' sites — so on render only the inline tags\n * survive (anything else is unwrapped to its text), every attribute is\n * dropped, and links keep only a safeUrl-approved href plus their tab choice\n * (target=\"_self\" stays; everything else opens in a new tab).\n */\nexport function sanitizeWebPopupHtml(html) {\n // No '<' → no elements can form; entities in plain text are already-valid\n // html and pass through untouched.\n if (!html.includes('<'))\n return html;\n const parsed = new DOMParser().parseFromString(html, 'text/html');\n const out = parsed.createElement('div');\n copySanitized(parsed.body, out, parsed);\n return out.innerHTML;\n}\nfunction colorString(value) {\n return typeof value === 'string' && value ? value : undefined;\n}\n/**\n * The popup palette from API-writable params: `colors` entries when present,\n * the legacy top-level background/accent underneath, palette defaults for the\n * rest — always a complete WebPopupColors.\n */\nexport function normalizeWebPopupColors(params) {\n const colors = typeof params.colors === 'object' && params.colors !== null\n ? params.colors\n : {};\n return {\n background: colorString(colors.background)\n ?? colorString(params.background) ?? WEB_POPUP_DEFAULT_COLORS.background,\n accent: colorString(colors.accent) ?? colorString(params.accent) ?? WEB_POPUP_DEFAULT_COLORS.accent,\n text: colorString(colors.text) ?? WEB_POPUP_DEFAULT_COLORS.text,\n textSecondary: colorString(colors.textSecondary) ?? WEB_POPUP_DEFAULT_COLORS.textSecondary,\n textInverse: colorString(colors.textInverse) ?? WEB_POPUP_DEFAULT_COLORS.textInverse,\n };\n}\n// A page dim from API-writable json: both fields or nothing, opacity clamped.\nfunction normalizeOverlay(raw) {\n if (typeof raw !== 'object' || raw === null)\n return undefined;\n const overlay = raw;\n const color = colorString(overlay.color);\n if (!color)\n return undefined;\n const opacity = typeof overlay.opacity === 'number' && Number.isFinite(overlay.opacity)\n ? Math.max(0, Math.min(1, overlay.opacity))\n : 1;\n return { color, opacity };\n}\n// Authored dark entries over the ones autogenerated from the light palette.\n// Absent `dark` = no dark mode; an authored palette switched off is not that.\nexport function normalizeWebPopupDark(params, light) {\n const raw = params.dark;\n if (typeof raw !== 'object' || raw === null)\n return undefined;\n const dark = raw;\n const authored = typeof dark.colors === 'object' && dark.colors !== null\n ? dark.colors\n : {};\n const auto = autoDarkWebPopupColors(light);\n const overlay = normalizeOverlay(dark.overlay);\n return {\n enabled: dark.enabled === true,\n colors: {\n background: colorString(authored.background) ?? auto.background,\n accent: colorString(authored.accent) ?? auto.accent,\n text: colorString(authored.text) ?? auto.text,\n textSecondary: colorString(authored.textSecondary) ?? auto.textSecondary,\n textInverse: colorString(authored.textInverse) ?? auto.textInverse,\n },\n ...(overlay ? { overlay } : {}),\n ...(colorString(dark.boxShadow) ? { boxShadow: dark.boxShadow } : {}),\n };\n}\n// Parse stored PopupFormContent.json into the popup model. Returns null for\n// anything that isn't a version-2 popup with at least one page — including\n// the retired version-1 flat-layout format and pre-engine content with no\n// `version` field at all, which callers should treat as broken. The palette\n// comes out complete: colors entries → legacy top-level background/accent →\n// defaults.\nexport function parseWebPopupJson(json) {\n let raw;\n try {\n raw = JSON.parse(json);\n }\n catch {\n return null;\n }\n if (typeof raw !== 'object' || raw === null)\n return null;\n const candidate = raw;\n if (candidate.version !== WEB_POPUP_VERSION)\n return null;\n const params = candidate.params;\n if (typeof params !== 'object' || params === null)\n return null;\n if (!Array.isArray(params.pages) || params.pages.length === 0)\n return null;\n const colors = normalizeWebPopupColors(params);\n const dark = normalizeWebPopupDark(params, colors);\n return {\n version: WEB_POPUP_VERSION,\n params: { ...params, colors, ...(dark ? { dark } : {}) },\n };\n}\n/** The editor's save path: model → PopupFormContent.json string. */\nexport function stringifyWebPopup(params) {\n const compat = {\n ...params,\n background: params.colors.background,\n accent: params.colors.accent,\n };\n const payload = { version: WEB_POPUP_VERSION, params: compat };\n return JSON.stringify(payload);\n}\nconst IMAGE_FITS = ['cover', 'contain'];\nconst MAX_IMAGE_BLUR = 100;\n// Bomb protection for the page content, mirroring the layout tree's\n// depth/node caps: the tree allows up to ~100 Content nodes and several may\n// reference the same zone, so unbounded zones/slots would amplify into\n// thousands of sanitize+render passes on the customer's page.\nconst MAX_IMAGES = 20;\nconst MAX_ZONES = 20;\nconst MAX_ZONE_SLOTS = 50;\n// A media param's video, or undefined when it has none / an unusable url —\n// then the param stays a plain image and the poster is all that renders.\nfunction normalizeVideo(raw) {\n if (typeof raw !== 'object' || raw === null)\n return undefined;\n const video = raw;\n const src = safeUrl(typeof video.src === 'string' ? video.src : undefined);\n if (!src)\n return undefined;\n return {\n src,\n ...(video.controls === true ? { controls: true } : {}),\n ...(video.loop === false ? { loop: false } : {}),\n };\n}\n// The images come from API-writable json — keep only well-formed entries,\n// with the presentation props (fit/blur) validated like the layout tree's.\nfunction normalizeImages(raw) {\n if (!Array.isArray(raw))\n return [];\n const out = [];\n for (const img of raw) {\n if (out.length >= MAX_IMAGES)\n break;\n if (typeof img !== 'object' || img === null)\n continue;\n if (typeof img.key !== 'string' || !img.key)\n continue;\n if (typeof img.src !== 'string')\n continue;\n const video = normalizeVideo(img.video);\n out.push({\n key: img.key,\n label: typeof img.label === 'string' ? img.label : '',\n src: img.src,\n ...(typeof img.srcDark === 'string' && img.srcDark ? { srcDark: img.srcDark } : {}),\n ...(video ? { video } : {}),\n ...(typeof img.mediaId === 'string' && img.mediaId ? { mediaId: img.mediaId } : {}),\n ...(typeof img.mediaIdDark === 'string' && img.mediaIdDark ? { mediaIdDark: img.mediaIdDark } : {}),\n ...(IMAGE_FITS.includes(img.fit) ? { fit: img.fit } : {}),\n ...(typeof img.blur === 'number' && Number.isFinite(img.blur) && img.blur > 0\n ? { blur: Math.min(img.blur, MAX_IMAGE_BLUR) }\n : {}),\n ...(typeof img.dim === 'number' && Number.isFinite(img.dim) && img.dim > 0\n ? { dim: Math.min(img.dim, 1) }\n : {}),\n });\n }\n return out;\n}\nconst MAX_VALUES = 20;\nconst MAX_VALUE_LENGTH = 64;\nconst MAX_SELECT_OPTIONS = 20;\nconst LENGTH_CONTROL_UNITS = ['px', '%', 'em', 'rem', 'fr'];\nfunction finiteNumber(value) {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n// Per-unit { min?, max? } overrides for a length control, keyed by a\n// whitelisted unit. Non-object input, unknown unit keys and non-finite bounds\n// are dropped; an all-empty map returns undefined so the field is omitted.\nfunction normalizeControlRanges(raw) {\n if (typeof raw !== 'object' || raw === null)\n return undefined;\n const out = {};\n for (const unit of LENGTH_CONTROL_UNITS) {\n const entry = raw[unit];\n if (typeof entry !== 'object' || entry === null)\n continue;\n const min = finiteNumber(entry.min);\n const max = finiteNumber(entry.max);\n if (min === undefined && max === undefined)\n continue;\n out[unit] = { ...(min !== undefined ? { min } : {}), ...(max !== undefined ? { max } : {}) };\n }\n return Object.keys(out).length > 0 ? out : undefined;\n}\n// The control is editor metadata from API-writable json: enum-whitelisted\n// kind, clamped numbers, capped options. Anything malformed drops to\n// undefined — the editor falls back to a plain text input.\nfunction normalizeValueControl(raw) {\n if (typeof raw !== 'object' || raw === null)\n return undefined;\n const control = raw;\n if (control.kind === 'text')\n return { kind: 'text' };\n if (control.kind === 'length' || control.kind === 'percent') {\n const min = finiteNumber(control.min);\n const max = finiteNumber(control.max);\n const units = control.kind === 'length' && Array.isArray(control.units)\n ? control.units.filter((u) => (LENGTH_CONTROL_UNITS.includes(u)))\n : [];\n // Per-unit min/max overrides: whitelisted unit keys, finite bounds. Any\n // malformed entry is skipped; an empty result drops the whole field.\n const ranges = control.kind === 'length'\n ? normalizeControlRanges(control.ranges)\n : undefined;\n return {\n kind: control.kind,\n ...(min !== undefined ? { min } : {}),\n ...(max !== undefined ? { max } : {}),\n ...(units.length > 0 ? { units } : {}),\n ...(ranges ? { ranges } : {}),\n };\n }\n if (control.kind === 'select' && Array.isArray(control.options)) {\n const options = [];\n for (const option of control.options) {\n if (options.length >= MAX_SELECT_OPTIONS)\n break;\n if (typeof option !== 'object' || option === null)\n continue;\n if (typeof option.value !== 'string' || option.value.length > MAX_VALUE_LENGTH)\n continue;\n options.push({ value: option.value, label: typeof option.label === 'string' ? option.label : option.value });\n }\n if (options.length > 0)\n return { kind: 'select', options };\n }\n return undefined;\n}\n/**\n * The page's named layout values from API-writable json: capped count,\n * whitelisted keys, short '$'-free value strings (substitution is single-pass\n * and this keeps refs from even *looking* chainable), validated controls.\n */\nexport function normalizeWebPopupValues(raw) {\n if (!Array.isArray(raw))\n return [];\n const out = [];\n for (const value of raw) {\n if (out.length >= MAX_VALUES)\n break;\n if (typeof value !== 'object' || value === null)\n continue;\n if (typeof value.key !== 'string' || !WEB_POPUP_VALUE_KEY_PATTERN.test(value.key))\n continue;\n if (typeof value.value !== 'string' || value.value.length > MAX_VALUE_LENGTH || value.value.includes('$'))\n continue;\n if (out.some((v) => v.key === value.key))\n continue;\n const control = normalizeValueControl(value.control);\n out.push({\n key: value.key,\n label: typeof value.label === 'string' ? value.label : '',\n value: value.value,\n ...(control ? { control } : {}),\n });\n }\n return out;\n}\n/** The values as a substitution map (see substituteWebPopupLayoutValues). */\nexport function webPopupValuesMap(values) {\n return Object.fromEntries(values.map((v) => [v.key, v.value]));\n}\nconst FORM_FIELD_KINDS = ['email', 'firstName', 'lastName', 'phone', 'custom'];\nconst BUTTON_VARIANTS = ['primary', 'secondary'];\nconst MAX_FORM_FIELDS = 10;\n// A form slot's fields from API-writable json: capped, whitelisted kinds,\n// deduped keys. The submit contract needs an email — when none survives, one\n// is injected up front (the slot stays renderable/editable rather than being\n// dropped: the editor canvas resolves through this same pipeline). Email\n// fields are always required — the payload can't form without a value.\nfunction normalizeFormFields(raw) {\n const out = [];\n if (Array.isArray(raw)) {\n for (const field of raw) {\n if (out.length >= MAX_FORM_FIELDS)\n break;\n if (typeof field !== 'object' || field === null)\n continue;\n if (typeof field.key !== 'string' || !field.key)\n continue;\n if (!FORM_FIELD_KINDS.includes(field.kind))\n continue;\n if (out.some((f) => f.key === field.key))\n continue;\n out.push({\n key: field.key,\n kind: field.kind,\n label: typeof field.label === 'string' ? field.label : '',\n placeholder: typeof field.placeholder === 'string' ? field.placeholder : '',\n required: field.kind === 'email' || field.required === true,\n ...(field.kind === 'custom' && typeof field.tag === 'string' && field.tag ? { tag: field.tag } : {}),\n });\n }\n }\n if (!out.some((f) => f.kind === 'email')) {\n let key = 'field-email';\n while (out.some((f) => f.key === key))\n key = `${key}-1`;\n out.unshift({ key, kind: 'email', label: 'Email', placeholder: '', required: true });\n }\n return out.slice(0, MAX_FORM_FIELDS);\n}\nconst CHOICE_CONTROLS = ['checkbox', 'chips'];\nconst RATING_SCALES = ['nps', 'stars', 'thumbs'];\nconst RATING_SUBMIT_MODES = ['instant', 'button'];\nconst TIMER_EXPIRE_ACTIONS = ['keep', 'hide-popup', 'page'];\nconst LANGUAGE_CODE = /^[a-z]{2}$/i;\nconst HEX_COLOR = /^#[0-9a-fA-F]{6}$/;\n// Authored strings from API-writable json land in the popup's own markup on a\n// customer's page — capped so a 100kB \"label\" can't be one.\nconst MAX_SLOT_STRING = 120;\nconst MAX_SLOT_MESSAGE = 500;\nfunction slotString(value, max = MAX_SLOT_STRING) {\n return typeof value === 'string' ? value.trim().slice(0, max) : '';\n}\n// A capped string with a fallback for when the json omits it (or sends blanks).\nfunction slotStringOr(value, fallback, max = MAX_SLOT_STRING) {\n return slotString(value, max) || fallback;\n}\n/** An ISO 639-1 code, lowercased; anything else = '' (the renderer's 'en'). */\nfunction normalizeLanguage(value) {\n const code = slotString(value, 8);\n return LANGUAGE_CODE.test(code) ? code.toLowerCase() : '';\n}\n// Capped, non-empty values, deduped, label falling back to the value. An\n// option-less slot survives, like an unbound form: the editor must still edit it.\nfunction normalizeChoiceOptions(raw) {\n if (!Array.isArray(raw))\n return [];\n const out = [];\n for (const option of raw) {\n if (out.length >= WEB_POPUP_MAX_CHOICE_OPTIONS)\n break;\n if (typeof option !== 'object' || option === null)\n continue;\n const value = slotString(option.value);\n if (!value)\n continue;\n if (out.some((existing) => existing.value === value))\n continue;\n const tagValue = slotString(option.tagValue);\n out.push({\n value,\n label: slotStringOr(option.label, value),\n ...(tagValue ? { tagValue } : {}),\n });\n }\n return out;\n}\n// The selection bounds against the surviving option count: 0 = unbounded, and\n// a max under the min would leave the slot unsubmittable — the min wins.\nfunction normalizeChoiceBounds(slot, options) {\n const bound = (value) => {\n const n = finiteNumber(value);\n return n === undefined || n <= 0 ? 0 : Math.min(Math.floor(n), options);\n };\n const min = bound(slot.min);\n const max = bound(slot.max);\n return { min, max: max > 0 ? Math.max(min, max) : 0 };\n}\n// Per-type slot validation. Text and button entries pass through UNTOUCHED\n// when well-formed (stored popups predate this check — don't rewrite them);\n// a form slot is rebuilt field by field; an unknown slot type is dropped so\n// slot types added after this engine build degrade to absence, not a crash.\nfunction normalizeSlots(raw) {\n const out = [];\n for (const slot of raw) {\n if (out.length >= MAX_ZONE_SLOTS)\n break;\n if (typeof slot !== 'object' || slot === null)\n continue;\n if (typeof slot.key !== 'string' || !slot.key)\n continue;\n if (slot.type === 'text') {\n if (typeof slot.html === 'string')\n out.push(slot);\n continue;\n }\n if (slot.type === 'button') {\n // An action-less button would crash the renderer on the action switch.\n if (typeof slot.action === 'object' && slot.action !== null && typeof slot.action.type === 'string') {\n out.push(slot);\n }\n continue;\n }\n if (slot.type === 'timer') {\n // An unsupported zone name degrades to the contract's UTC rather than\n // dropping the countdown.\n const zone = slotString(slot.timezone, 64);\n const timezone = webPopupTimeZoneSupported(zone) ? zone : '';\n const endTime = slotString(slot.endTime, 32);\n // No computable deadline = nothing to count down to.\n if (webPopupWallClockMs(endTime, timezone) === null)\n continue;\n const expirePage = slotString(slot.expirePage);\n const onExpire = TIMER_EXPIRE_ACTIONS.includes(slot.onExpire)\n ? slot.onExpire\n : 'keep';\n // 'page' without a target page is 'keep' — the renderer never has to\n // guess where a pageless jump should land.\n const expires = onExpire === 'page' && !expirePage ? 'keep' : onExpire;\n out.push({\n type: 'timer',\n key: slot.key,\n endTime,\n timezone,\n language: normalizeLanguage(slot.language),\n showLabels: slot.showLabels !== false,\n onExpire: expires,\n ...(expires === 'page' ? { expirePage } : {}),\n });\n continue;\n }\n if (slot.type === 'choice') {\n const options = normalizeChoiceOptions(slot.options);\n const { min, max } = normalizeChoiceBounds(slot, options.length);\n out.push({\n type: 'choice',\n key: slot.key,\n control: CHOICE_CONTROLS.includes(slot.control)\n ? slot.control\n : 'checkbox',\n tagName: slotString(slot.tagName),\n options,\n min,\n max,\n submitLabel: slotStringOr(slot.submitLabel, WEB_POPUP_CHOICE_DEFAULTS.submitLabel),\n submitVariant: BUTTON_VARIANTS.includes(slot.submitVariant)\n ? slot.submitVariant\n : 'primary',\n successMessage: slotStringOr(slot.successMessage, WEB_POPUP_CHOICE_DEFAULTS.successMessage, MAX_SLOT_MESSAGE),\n });\n continue;\n }\n if (slot.type === 'rating') {\n const labels = typeof slot.labels === 'object' && slot.labels !== null\n ? slot.labels\n : {};\n out.push({\n type: 'rating',\n key: slot.key,\n // A malformed scale renders as stars: five buttons read the same in\n // every language, which an 0..10 row does not.\n scale: RATING_SCALES.includes(slot.scale) ? slot.scale : 'stars',\n labels: { low: slotString(labels.low), high: slotString(labels.high) },\n submitMode: RATING_SUBMIT_MODES.includes(slot.submitMode)\n ? slot.submitMode\n : 'instant',\n submitLabel: slotStringOr(slot.submitLabel, WEB_POPUP_RATING_DEFAULTS.submitLabel),\n eventName: slotString(slot.eventName),\n successMessage: slotStringOr(slot.successMessage, WEB_POPUP_RATING_DEFAULTS.successMessage, MAX_SLOT_MESSAGE),\n });\n continue;\n }\n if (slot.type === 'glyph') {\n // An unknown icon name has no geometry to draw — dropped, exactly like\n // an unknown slot type.\n if (!WEB_POPUP_GLYPH_NAMES.includes(slot.name))\n continue;\n out.push({\n type: 'glyph',\n key: slot.key,\n name: slot.name,\n size: WEB_POPUP_GLYPH_SIZES.includes(slot.size)\n ? slot.size\n : WEB_POPUP_GLYPH_SIZES[0],\n color: typeof slot.color === 'string' && HEX_COLOR.test(slot.color) ? slot.color : '',\n });\n continue;\n }\n if (slot.type === 'email-subscription-form') {\n out.push({\n type: 'email-subscription-form',\n key: slot.key,\n formCode: typeof slot.formCode === 'string' ? slot.formCode : '',\n fields: normalizeFormFields(slot.fields),\n submitLabel: typeof slot.submitLabel === 'string' && slot.submitLabel\n ? slot.submitLabel\n : WEB_POPUP_FORM_DEFAULTS.submitLabel,\n submitVariant: BUTTON_VARIANTS.includes(slot.submitVariant)\n ? slot.submitVariant\n : 'primary',\n ...(typeof slot.privacy === 'object' && slot.privacy !== null\n && typeof slot.privacy.checkboxLabel === 'string'\n ? {\n privacy: {\n checkboxLabel: slot.privacy.checkboxLabel,\n url: typeof slot.privacy.url === 'string' ? slot.privacy.url : '',\n linkLabel: typeof slot.privacy.linkLabel === 'string' ? slot.privacy.linkLabel : '',\n },\n }\n : {}),\n successMessage: typeof slot.successMessage === 'string' && slot.successMessage\n ? slot.successMessage\n : WEB_POPUP_FORM_DEFAULTS.successMessage,\n confirmEmailMessage: typeof slot.confirmEmailMessage === 'string' && slot.confirmEmailMessage\n ? slot.confirmEmailMessage\n : WEB_POPUP_FORM_DEFAULTS.confirmEmailMessage,\n });\n }\n // Unknown slot type → dropped.\n }\n return out;\n}\n// The zones come from API-writable json — keep only well-formed entries\n// (capped, see above) so the renderer can trust the shape.\nfunction normalizeContents(raw) {\n if (!Array.isArray(raw))\n return [];\n const out = [];\n for (const zone of raw) {\n if (out.length >= MAX_ZONES)\n break;\n if (typeof zone !== 'object' || zone === null)\n continue;\n if (typeof zone.key !== 'string' || !zone.key)\n continue;\n if (!Array.isArray(zone.slots))\n continue;\n out.push({\n key: zone.key,\n label: typeof zone.label === 'string' ? zone.label : '',\n slots: normalizeSlots(zone.slots),\n });\n }\n return out;\n}\n/**\n * Every subscription form code the popup's form slots reference (unique,\n * empty codes skipped) — what a host records view stats for. Reads the RAW\n * params (tolerant of malformed slots), so it works on parsed-but-unresolved\n * json.\n */\nexport function collectWebPopupFormCodes(params) {\n const out = new Set();\n for (const page of params.pages) {\n if (!Array.isArray(page?.contents))\n continue;\n for (const zone of page.contents) {\n if (!Array.isArray(zone?.slots))\n continue;\n for (const slot of zone.slots) {\n if (typeof slot !== 'object' || slot === null)\n continue;\n if (slot.type !== 'email-subscription-form')\n continue;\n if (typeof slot.formCode === 'string' && slot.formCode)\n out.add(slot.formCode);\n }\n }\n }\n return [...out];\n}\n// Has a 'hide-popup' countdown run out? The HOST asks before showing, at SHOW\n// time; any page counts, and a malformed timer reads as 'not expired'.\nexport function webPopupExpired(params, nowMs) {\n for (const page of params.pages) {\n if (!Array.isArray(page?.contents))\n continue;\n for (const zone of page.contents) {\n if (!Array.isArray(zone?.slots))\n continue;\n for (const slot of zone.slots) {\n if (typeof slot !== 'object' || slot === null)\n continue;\n if (slot.type !== 'timer' || slot.onExpire !== 'hide-popup')\n continue;\n if (typeof slot.endTime !== 'string')\n continue;\n const timezone = typeof slot.timezone === 'string' ? slot.timezone : '';\n const deadline = webPopupWallClockMs(slot.endTime, timezone);\n if (deadline !== null && deadline <= nowMs)\n return true;\n }\n }\n }\n return false;\n}\n/**\n * The popup box-size ceiling px, mirroring the layout tree's px clamp: the\n * json is API-writable and the size lands as inline style on the customer's\n * page. The editor clamps its Width/Height inputs to it too.\n */\nexport const WEB_POPUP_MAX_SIZE_PX = 2000;\nfunction validSize(value) {\n return typeof value === 'number' && Number.isFinite(value) && value > 0\n ? Math.min(value, WEB_POPUP_MAX_SIZE_PX)\n : undefined;\n}\nexport function resolveWebPopupPageSize(own, shared, axis) {\n if (own === null)\n return undefined;\n let resolved;\n if (own === 'stretch')\n resolved = 'stretch';\n else\n resolved = validSize(own) ?? (shared === 'stretch' ? 'stretch' : validSize(shared));\n return axis === 'width' && resolved === 'stretch' ? undefined : resolved;\n}\n/**\n * The renderable pages: each page carries its own embedded layout tree — no\n * kind catalog at runtime. The page's named values are substituted into the\n * tree first ($key tokens), then the result is validated/normalized\n * (whitelisted props, unknown container types degrade to a Vertical stack) —\n * so substituted values pass the same clamps as literals; pages whose layout\n * isn't a tree at all are dropped. An empty result means the popup can't be\n * rendered. width/height come out FINAL (page override ?? chrome, validated)\n * — the renderer never falls back itself.\n */\nexport function resolveWebPopupPages(params) {\n const out = [];\n for (const page of params.pages) {\n const values = normalizeWebPopupValues(page.values);\n const layout = normalizeWebPopupLayout(substituteWebPopupLayoutValues(page.layout, webPopupValuesMap(values)));\n if (!layout)\n continue;\n const width = resolveWebPopupPageSize(page.width, params.width, 'width');\n const height = resolveWebPopupPageSize(page.height, params.height, 'height');\n out.push({\n key: page.key,\n layout,\n images: normalizeImages(page.images),\n contents: normalizeContents(page.contents),\n ...(width !== undefined ? { width } : {}),\n ...(height !== undefined ? { height } : {}),\n });\n }\n return out;\n}\n/** The page shown first: startPage when it exists, else the first page. */\nexport function startPageOf(params, pages) {\n return pages.find((p) => p.key === params.startPage) ?? pages[0];\n}\nexport function placementMaxSize(placement) {\n return `calc(100% - ${placement.offset * 2}px)`;\n}\n","export const WEB_POPUPS_WIDGET_NAMESPACE = 'pushwoosh-web-popups';\n\n// Prefix for every log line emitted by the web popups widget so its output is\n// easy to spot and filter in the console.\nexport const WEB_POPUPS_LOG_PREFIX = '[WebPopups]';\n\nexport const POPUP_HOST_Z_INDEX = 2147483647;\n\n// Breathing room between one popup closing and the next one opening. Not\n// cosmetic: without it the click that dismissed the first popup lands on the\n// incoming popup's overlay (which closes on click) or on one of its buttons.\nexport const QUEUE_GAP_MS = 400;\n\n// The subscription-form service's public HTTP gateway. Serves\n// email-subscription-form slot submits and view stats for popup-embedded forms.\nexport const SUBSCRIPTION_FORMS_API_URL = 'https://subscription-form.svc-nue.pushwoosh.com/api/v1';\n","import { type TInboxMessagesStoreName, type TKeyValueStoreName, type TMainLogStoreName, type TMessageLogStoreName } from '../Storage.types';\n\nexport const STORE_NAME_KEY_VALUE: TKeyValueStoreName = 'keyValue';\nexport const STORE_NAME_MESSAGE_LOG: TMessageLogStoreName = 'messages';\nexport const STORE_NAME_MAIN_LOG: TMainLogStoreName = 'log';\nexport const STORE_NAME_INBOX_MESSAGES: TInboxMessagesStoreName = 'inboxMessages';\n\nexport const KEY_PATH_BASE_INCREMENT = 'id';\n","import { type TMigrationType, type TSdkStoreName } from '../Storage.types';\n\n/**\n * Check existed store, before create\n * @param name\n * @param storeCreator\n */\nexport function storeCreatorDecorator(name: TSdkStoreName, storeCreator: TMigrationType): TMigrationType {\n return function (database: IDBDatabase) {\n if (database.objectStoreNames.contains(name)) {\n return;\n }\n\n storeCreator(database);\n };\n}\n","import {\n STORE_NAME_INBOX_MESSAGES,\n STORE_NAME_KEY_VALUE,\n STORE_NAME_MAIN_LOG,\n STORE_NAME_MESSAGE_LOG,\n KEY_PATH_BASE_INCREMENT,\n} from './constants';\nimport { storeCreatorDecorator } from './helpers';\nimport {\n type TInboxMessagesIDBKeyPath,\n type TInboxMessagesIDBRemovalTimeIndex,\n type TInboxMessagesIDBStatusIndex,\n} from '../../../models/InboxMessages.types';\n\n/**\n * Create keyValue store migration\n * @param database\n */\nfunction createKeyValueStore(database: IDBDatabase) {\n database.createObjectStore(STORE_NAME_KEY_VALUE, { keyPath: 'key' });\n}\n\n/**\n * Create log store migration\n * @param database\n */\nfunction createLogStore(database: IDBDatabase) {\n const logStore = database.createObjectStore(\n STORE_NAME_MAIN_LOG,\n { keyPath: KEY_PATH_BASE_INCREMENT, autoIncrement: true },\n );\n logStore.createIndex('environment', 'environment', { unique: false });\n logStore.createIndex('date', 'date', { unique: false });\n logStore.createIndex('type', 'type', { unique: false });\n}\n\n/**\n * Create message log store migration\n * @param database\n */\nfunction createMessageLogStore(database: IDBDatabase) {\n const messagesStore = database.createObjectStore(\n STORE_NAME_MESSAGE_LOG,\n { keyPath: KEY_PATH_BASE_INCREMENT, autoIncrement: true },\n );\n messagesStore.createIndex('date', 'date', { unique: false });\n}\n\n/**\n * Create inbox messages store migration\n * @param database\n */\nfunction createInboxMessagesStore(database: IDBDatabase) {\n const keyPath: TInboxMessagesIDBKeyPath = 'inbox_id';\n const statusIndex: TInboxMessagesIDBStatusIndex = 'status';\n const removalTimeIndex: TInboxMessagesIDBRemovalTimeIndex = 'rt';\n\n const store = database.createObjectStore(STORE_NAME_INBOX_MESSAGES,\n { keyPath, autoIncrement: false },\n );\n store.createIndex(statusIndex, statusIndex, { unique: false, multiEntry: true });\n store.createIndex(removalTimeIndex, removalTimeIndex, { unique: false, multiEntry: true });\n}\n\nexport default [\n storeCreatorDecorator(STORE_NAME_KEY_VALUE, createKeyValueStore),\n storeCreatorDecorator(STORE_NAME_MAIN_LOG, createLogStore),\n storeCreatorDecorator(STORE_NAME_MESSAGE_LOG, createMessageLogStore),\n storeCreatorDecorator(STORE_NAME_INBOX_MESSAGES, createInboxMessagesStore),\n];\n","import { default as migrationsInitial } from './initial';\nimport { type TMigrationType } from '../Storage.types';\n\nexport default class Migrations {\n get all(): Array<TMigrationType> {\n return migrationsInitial;\n }\n}\n","import Migrations from './Migrations';\nimport { type TMigrationType } from '../Storage.types';\n\nexport default class MigrationExecutor {\n db: IDBDatabase;\n migrationsBuilder: Migrations;\n\n constructor(\n db: IDBDatabase,\n migrationsBuilder: Migrations = new Migrations(),\n ) {\n this.db = db;\n this.migrationsBuilder = migrationsBuilder;\n }\n\n applyMigrations() {\n this.applyMigrationsPack(this.migrationsBuilder.all);\n }\n\n applyMigrationsPack(migrationsPack: Array<TMigrationType>) {\n migrationsPack.forEach((migration) => {\n migration(this.db);\n });\n }\n}\n","import {\n STORE_NAME_KEY_VALUE,\n STORE_NAME_MAIN_LOG,\n STORE_NAME_MESSAGE_LOG,\n} from '../modules/storage/migrations/constants';\nimport MigrationExecutor from '../modules/storage/migrations/MigrationExecutor';\nimport { type IIDBOpenEventTargetWithResult } from '../modules/storage/Storage.types';\nimport version from '../modules/storage/version';\n\ndeclare const self: ServiceWorkerGlobalScope;\n\nfunction onversionchange(database: IDBDatabase, event: Event) {\n console.info('onversionchange', event);\n database.close();\n}\n\nlet databasePromise: Promise<IDBDatabase>;\nexport function getInstance(): Promise<IDBDatabase> {\n if (!databasePromise) {\n databasePromise = new Promise<IDBDatabase>((resolve, reject) => {\n const request: IDBOpenDBRequest = indexedDB.open('PUSHWOOSH_SDK_STORE', version);\n request.onsuccess = (event) => {\n const database: IDBDatabase = (event.target as IIDBOpenEventTargetWithResult).result;\n database.onversionchange = onversionchange.bind(null, database, reject);\n resolve(database);\n };\n\n request.onerror = () => reject(request.error);\n\n request.onupgradeneeded = (event) => {\n const database: IDBDatabase = (event.target as IIDBOpenEventTargetWithResult).result;\n database.onversionchange = onversionchange.bind(null, database, reject);\n\n const migrationExecutor = new MigrationExecutor(database);\n migrationExecutor.applyMigrations();\n };\n });\n }\n return databasePromise;\n}\n\nfunction getInstanceWithPromise(executor: any): any {\n return getInstance().then((database) => (\n new Promise((resolve, reject) => executor(database, resolve, reject))\n ));\n}\n\nfunction createKeyValue(name: string) {\n return {\n get<K extends string, D>(key: K, defaultValue?: D) {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const request = database.transaction(name).objectStore(name).get(key);\n\n /** @TODO\n * we cant invoke \"resolve\" or \"reject\" in onsuccess or onerror because\n * it leads to bugs in Safari when we try to get permissions for notifications\n *\n * Checking status of request in setTimeout fixes this bug\n */\n let isComplete = false;\n let isError = false;\n let timeout: any;\n\n const check = () => {\n clearTimeout(timeout);\n if (isComplete) {\n resolve(request.result?.value || defaultValue);\n } else if (isError) {\n reject(request.error);\n } else {\n timeout = setTimeout(check, 0);\n }\n };\n\n request.onsuccess = () => isComplete = true;\n request.onerror = () => isError = true;\n check();\n });\n },\n\n getAll() {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const result: { [key: string]: any } = {};\n const cursor = database.transaction(name).objectStore(name).openCursor();\n let isComplete = false;\n let isError = false;\n let timeout: any;\n\n /** @TODO\n * we cant invoke \"resolve\" or \"reject\" in onsuccess or onerror because\n * it leads to bugs in Safari when we try to get permissions for notifications\n *\n * Checking status of request in setTimeout fixes this bug\n */\n const check = () => {\n clearTimeout(timeout);\n if (isComplete) {\n resolve(result);\n } else if (isError) {\n reject(cursor.error);\n } else {\n timeout = setTimeout(check, 0);\n }\n };\n\n cursor.onsuccess = (event) => {\n const cursorResult = (event.target as any).result;\n if (cursorResult) {\n result[cursorResult.key] = cursorResult.value.value;\n cursorResult.continue();\n } else {\n isComplete = true;\n }\n };\n cursor.onerror = () => isError = true;\n check();\n });\n },\n\n async extend(key: string, value: any) {\n const oldValues = await this.get(key);\n const { ...newValues } = value;\n await this.set(key, { ...oldValues, ...newValues });\n },\n\n set<K, D>(key: K, value: D) {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const request = database.transaction([name], 'readwrite').objectStore(name).put({ key, value });\n let isComplete = false;\n let isError = false;\n let timeout: any;\n\n /** @TODO\n * we cant invoke \"resolve\" or \"reject\" in onsuccess or onerror because\n * it leads to bugs in Safari when we try to get permissions for notifications\n *\n * Checking status of request in setTimeout fixes this bug\n */\n const check = () => {\n clearTimeout(timeout);\n if (isComplete) {\n resolve(key);\n } else if (isError) {\n reject(request.error);\n } else {\n timeout = setTimeout(check, 0);\n }\n };\n\n request.onsuccess = () => isComplete = true;\n request.onerror = () => isError = true;\n check();\n });\n },\n };\n}\n\nexport abstract class LogBase {\n protected abstract name: string;\n protected abstract maxItems: number;\n _add(obj: any) {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const request = database.transaction([this.name], 'readwrite').objectStore(this.name).add(obj);\n request.onsuccess = () => {\n resolve(obj);\n };\n request.onerror = () => {\n reject(request.error);\n };\n }).then((obj: any) => {\n return this.getAll().then((items: { id: number }[]) => {\n if (Array.isArray(items)) {\n const ids = items.map((i) => i.id).sort((a, b) => {\n if (a == b) return 0;\n return a < b ? 1 : -1;\n });\n if (ids.length > this.maxItems) {\n return Promise.all(ids.slice(this.maxItems).map((id) => this.delete(id))).then(() => obj);\n }\n }\n return obj;\n });\n });\n }\n\n delete(key: any) {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const request = database.transaction([this.name], 'readwrite').objectStore(this.name).delete(key);\n request.onsuccess = () => {\n resolve(request.result);\n };\n request.onerror = () => {\n reject(request.error);\n };\n });\n }\n\n getAll() {\n return getInstanceWithPromise((database: IDBDatabase, resolve: any, reject: any) => {\n const result: any[] = [];\n const cursor = database.transaction(this.name).objectStore(this.name).openCursor();\n cursor.onsuccess = (ev) => {\n const cursorResult = (ev.target as any).result;\n if (cursorResult) {\n if (cursorResult.value) {\n result.push(cursorResult.value);\n }\n cursorResult.continue();\n } else {\n resolve(result);\n }\n };\n cursor.onerror = () => {\n reject(cursor.error);\n };\n });\n }\n}\n\nexport class LogLog extends LogBase {\n protected name = STORE_NAME_MAIN_LOG;\n protected maxItems = 100;\n protected environment = (typeof self !== 'undefined' && self.registration) ? 'worker' : 'browser';\n add(type: string, message: any, additional?: any) {\n const obj: any = {\n type,\n environment: this.environment,\n message: `${message}`,\n date: new Date(),\n };\n if (message instanceof Error) {\n obj.stack = message.stack;\n }\n if (additional) {\n obj.additional = additional;\n }\n return this._add(obj);\n }\n}\n\nexport class LogMessage extends LogBase {\n protected name = STORE_NAME_MESSAGE_LOG;\n protected maxItems = 25;\n add(log: any) {\n return this._add({\n ...log,\n date: new Date(),\n });\n }\n}\n\nexport const keyValue = createKeyValue(STORE_NAME_KEY_VALUE);\nexport const log = new LogLog();\nexport const message = new LogMessage();\n","import { log as logStorage } from './storage';\n\nconst levels: { [key: string]: number } = {\n error: 1,\n info: 2,\n debug: 3,\n};\n\nlet limitLevel = 3;\n\ntype TWriteType = 'error' | 'apirequest' | 'info';\n\ninterface ILogger {\n setLevel(level: string): void;\n error(...args: any[]): void;\n info(...args: any[]): void;\n debug(...args: any[]): void;\n write(type: TWriteType, message: any, additional?: any): Promise<void>;\n isManualLevel(): boolean;\n [key: string]: any;\n}\n\nconst Logger: ILogger = {\n setLevel(level) {\n if (!levels[level]) {\n level = 'error';\n }\n limitLevel = levels[level];\n },\n write(type: TWriteType, message: any, additional?: any) {\n if (type === 'error') {\n this.error(message);\n } else {\n this.info(message);\n }\n return logStorage.add(type, message, additional);\n },\n} as ILogger;\n\nObject.keys(levels).forEach((levelName: string) => {\n const levelNumber = levels[levelName];\n Logger[levelName] = (...args: any[]) => {\n if (levelNumber <= limitLevel) {\n console.groupCollapsed(levelName);\n console.info('', ...args);\n console.trace('trace');\n console.groupEnd();\n }\n };\n});\n\nexport function logAndThrowError(error: string) {\n const logText = new Error(error);\n Logger.write('error', logText, 'logAndThrowError');\n throw logText;\n}\n\nexport function logAndRejectError(error: string, reject: (e: any) => void) {\n const logText = new Error(error);\n Logger.write('error', logText, 'logAndRejectError');\n reject(logText);\n}\n\nexport { Logger };\n","import {\n type WebPopupChoiceSubmitHandler, type WebPopupRatingSubmitHandler,\n} from 'smart-blocks-utils';\n\nimport { Logger } from '../../core/logger';\nimport { type Pushwoosh } from '../../core/Pushwoosh';\n\n// The host side of the two submitting phase-2 slots: a choice becomes device\n// TAGS, a rating an EVENT. Both reject on failure, like the subscription form.\n\n// A choice slot's picks appended to a LIST tag — additive by design: the slot\n// resets its selection on every show, so it cannot express an un-pick.\nexport function createChoiceSubmitHandler(pw: Pushwoosh): WebPopupChoiceSubmitHandler {\n return async ({ slotKey, tagName, values }) => {\n try {\n // String operation + `value` is setTags' shape; the numeric TagValue in\n // Api.types.ts belongs to multiRegisterDevice and no-ops here.\n await pw.api.setTags({ [tagName]: { operation: 'append', value: values } }); // also writes EMAIL tags when the visitor has one\n } catch (error) {\n Logger.error(error, `Failed to write web popup choice \"${slotKey}\" to tag \"${tagName}\"`);\n throw error;\n }\n };\n}\n\n// The score as an event, scale alongside (4 of 5 stars is not 4 of 10 NPS). An\n// in-app configured for this event can open over the popup; that's normal.\nexport function createRatingSubmitHandler(pw: Pushwoosh): WebPopupRatingSubmitHandler {\n return async ({ slotKey, eventName, score, scale }) => {\n try {\n await pw.api.postEvent(eventName, { score, scale, slotKey });\n } catch (error) {\n Logger.error(error, `Failed to post web popup rating \"${slotKey}\" as event \"${eventName}\"`);\n throw error;\n }\n };\n}\n","var n,l,u,t,i,r,o,e,f,c,a,s,h,p,v,y,d={},w=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(n,l){for(var u in l)n[u]=l[u];return n}function b(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function k(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return x(l,e,i,r,null)}function x(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function M(){return{current:null}}function S(n){return n.children}function C(n,l){this.props=n,this.context=l}function $(n,l){if(null==l)return n.__?$(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?$(n):null}function I(n){if(n.__P&&n.__d){var u=n.__v,t=u.__e,i=[],r=[],o=m({},u);o.__v=u.__v+1,l.vnode&&l.vnode(o),q(n.__P,o,u,n.__n,n.__P.namespaceURI,32&u.__u?[t]:null,i,null==t?$(u):t,!!(32&u.__u),r),o.__v=u.__v,o.__.__k[o.__i]=o,D(i,o,r),u.__e=u.__=null,o.__e!=t&&P(o)}}function P(n){if(null!=(n=n.__)&&null!=n.__c)return n.__e=n.__c.base=null,n.__k.some(function(l){if(null!=l&&null!=l.__e)return n.__e=n.__c.base=l.__e}),P(n)}function A(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!H.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)(H)}function H(){try{for(var n,l=1;i.length;)i.length>l&&i.sort(e),n=i.shift(),l=i.length,I(n)}finally{i.length=H.__r=0}}function L(n,l,u,t,i,r,o,e,f,c,a){var s,h,p,v,y,_,g=t&&t.__k||w,m=l.length;for(f=T(u,l,g,f,m),s=0;s<m;s++)null!=(p=u.__k[s])&&(h=-1!=p.__i&&g[p.__i]||d,p.__i=s,_=q(n,p,h,i,r,o,e,f,c,a),v=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&J(h.ref,null,p),a.push(p.ref,p.__c||v,p)),null==y&&null!=v&&(y=v),4&p.__u?(f=j(p,f,n),h.__e&&(h.__e=null)):\"function\"==typeof p.type&&void 0!==_?f=_:v&&(f=v.nextSibling),p.__u&=-7);return u.__e=y,f}function T(n,l,u,t,i){var r,o,e,f,c,a=u.length,s=a,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&\"boolean\"!=typeof o&&\"function\"!=typeof o?(\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||o.constructor==String?o=n.__k[r]=x(null,o,null,null,null):g(o)?o=n.__k[r]=x(S,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=n.__k[r]=x(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):n.__k[r]=o,f=r+h,o.__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=O(o,u,f,s))&&(s--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>a?h--:i<a&&h++),\"function\"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(s)for(r=0;r<a;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=$(e)),K(e,e));return t}function j(n,l,u){var t,i;if(\"function\"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=j(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!l.parentNode&&(l=$(n)),l=u.insertBefore(n.__e,l||null));do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function F(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(g(n)?n.some(function(n){F(n,l)}):l.push(n)),l}function O(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],a=null!=c&&0==(2&c.__u);if(null===c&&null==e||a&&e==c.key&&f==c.type)return u;if(t>(a?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function z(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||_.test(l)?u:u+\"px\"}function N(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||z(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||z(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(s,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u[a]=t[a]:(u[a]=h,n.addEventListener(l,r?v:p,r)):n.removeEventListener(l,r?v:p,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function V(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u[c])u[c]=h++;else if(u[c]<t[a])return;return t(l.event?l.event(u):u)}}}function q(n,u,t,i,r,o,e,f,c,a){var s,h,p,v,y,d,_,k,x,M,I,P,A,H,T,j,F=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(s=l.__b)&&s(u);n:if(\"function\"==typeof F){h=e.length;try{if(x=u.props,M=F.prototype&&F.prototype.render,I=(s=F.contextType)&&i[s.__c],P=s?I?I.props.value:s.__:i,t.__c?k=(p=u.__c=t.__c).__=p.__E:(M?u.__c=p=new F(x,P):(u.__c=p=new C(x,P),p.constructor=F,p.render=Q),I&&I.sub(p),p.state||(p.state={}),p.__n=i,v=p.__d=!0,p.__h=[],p._sb=[]),M&&null==p.__s&&(p.__s=p.state),M&&null!=F.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=m({},p.__s)),m(p.__s,F.getDerivedStateFromProps(x,p.__s))),y=p.props,d=p.state,p.__v=u,v)M&&null==F.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),M&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(M&&null==F.getDerivedStateFromProps&&x!==y&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(x,P),u.__v==t.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(x,p.__s,P)){u.__v!=t.__v&&(p.props=x,p.state=p.__s,p.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),w.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&e.push(p),f=$(t);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(x,p.__s,P),M&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(y,d,_)})}if(p.context=P,p.props=x,p.__P=n,p.__e=!1,A=l.__r,H=0,M)p.state=p.__s,p.__d=!1,A&&A(u),s=p.render(p.props,p.state,p.context),w.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,A&&A(u),s=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++H<25);p.state=p.__s,null!=p.getChildContext&&(i=m(m({},i),p.getChildContext())),M&&!v&&null!=p.getSnapshotBeforeUpdate&&(_=p.getSnapshotBeforeUpdate(y,d)),T=null!=s&&s.type===S&&null==s.key?E(s.props.children):s,f=L(n,g(T)?T:[T],u,t,i,r,o,e,f,c,a),p.base=u.__e,u.__u&=-161,p.__h.length&&e.push(p),k&&(p.__E=p.__=null)}catch(n){if(e.length=h,u.__v=null,c||null!=o){if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;null!=o&&(o[o.indexOf(f)]=null),u.__e=f}else if(null!=o)for(j=o.length;j--;)b(o[j])}else u.__e=t.__e;null==u.__k&&(u.__k=t.__k||[]),n.then||B(u),l.__e(n,u,t)}}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=G(t.__e,u,t,i,r,o,e,c,a);return(s=l.diffed)&&s(u),128&u.__u?void 0:f}function B(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(B))}function D(n,u,t){for(var i=0;i<t.length;i++)J(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function E(n){return\"object\"!=typeof n||null==n||n.__b>0?n:g(n)?n.map(E):void 0!==n.constructor?null:m({},n)}function G(u,t,i,r,o,e,f,c,a){var s,h,p,v,y,w,_,m=i.props||d,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(s=0;s<e.length;s++)if((y=e[s])&&\"setAttribute\"in y==!!x&&(x?y.localName==x:3==y.nodeType)){u=y,e[s]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)m===k||c&&u.data==k||(u.data=k);else{if(e=\"textarea\"==x&&null!=k.defaultValue?null:e&&n.call(u.childNodes),!c&&null!=e)for(m={},s=0;s<u.attributes.length;s++)m[(y=u.attributes[s]).name]=y.value;for(s in m)y=m[s],\"dangerouslySetInnerHTML\"==s?p=y:\"children\"==s||s in k||\"value\"==s&&\"defaultValue\"in k||\"checked\"==s&&\"defaultChecked\"in k||N(u,s,null,y,o);for(s in k)y=k[s],\"children\"==s?v=y:\"dangerouslySetInnerHTML\"==s?h=y:\"value\"==s?w=y:\"checked\"==s?_=y:c&&\"function\"!=typeof y||m[s]===y||N(u,s,y,m[s],o);if(h)c||p&&(h.__html==p.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(p&&(u.innerHTML=\"\"),L(\"template\"==t.type?u.content:u,g(v)?v:[v],t,i,r,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":o,e,f,e?e[0]:i.__k&&$(i,0),c,a),null!=e)for(s=e.length;s--;)b(e[s]);c&&\"textarea\"!=x||(s=\"value\",\"progress\"==x&&null==w?u.removeAttribute(\"value\"):null!=w&&(w!==u[s]||\"progress\"==x&&!w||\"option\"==x&&w!=m[s])&&N(u,s,w,m[s],o),s=\"checked\",null!=_&&_!=u[s]&&N(u,s,_,m[s],o))}return u}function J(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function K(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||J(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=i.__n=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&K(i[r],u,t||\"function\"!=typeof n.type);t||b(n.__e),n.__c=n.__=n.__e=void 0}function Q(n,l,u){return this.constructor(n,u)}function R(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],q(t,u=(!r&&i||t).__k=k(S,null,[u]),o||d,d,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),D(e,u,f),u.props.children=null}function U(n,l){R(n,l,U)}function W(l,u,t){var i,r,o,e,f=m({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),x(l.type,f,i||l.key,r||l.ref,null)}function X(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,A(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+y++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=w.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},C.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),\"function\"==typeof n&&(n=n(m({},u),this.props)),n&&m(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),A(this))},C.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),A(this))},C.prototype.render=S,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},H.__r=0,f=Math.random().toString(8),c=\"__d\"+f,a=\"__a\"+f,s=/(PointerCapture)$|Capture$/i,h=0,p=V(!1),v=V(!0),y=0;export{C as Component,S as Fragment,W as cloneElement,X as createContext,k as createElement,M as createRef,k as h,U as hydrate,t as isValidElement,l as options,R as render,F as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as r,Fragment as e}from\"preact\";export{Fragment}from\"preact\";var t=/[\"&<]/;function n(r){if(0===r.length||!1===t.test(r))return r;for(var e=0,n=0,o=\"\",f=\"\";n<r.length;n++){switch(r.charCodeAt(n)){case 34:f=\""\";break;case 38:f=\"&\";break;case 60:f=\"<\";break;default:continue}n!==e&&(o+=r.slice(e,n)),o+=f,e=n+1}return n!==e&&(o+=r.slice(e,n)),o}var o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=0,i=Array.isArray;function u(e,t,n,o,i,u){t||(t={});var a,c,p=t;if(\"ref\"in p)for(c in p={},t)\"ref\"==c?a=t[c]:p[c]=t[c];var l={type:e,props:p,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u};if(\"function\"==typeof e&&(a=e.defaultProps))for(c in a)void 0===p[c]&&(p[c]=a[c]);return r.vnode&&r.vnode(l),l}function a(r){var t=u(e,{tpl:r,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var c={},p=/[A-Z]/g;function l(e,t){if(r.attr){var f=r.attr(e,t);if(\"string\"==typeof f)return f}if(t=function(r){return null!==r&&\"object\"==typeof r&&\"function\"==typeof r.valueOf?r.valueOf():r}(t),\"ref\"===e||\"key\"===e)return\"\";if(\"style\"===e&&\"object\"==typeof t){var i=\"\";for(var u in t){var a=t[u];if(null!=a&&\"\"!==a){var l=\"-\"==u[0]?u:c[u]||(c[u]=u.replace(p,\"-$&\").toLowerCase()),s=\";\";\"number\"!=typeof a||l.startsWith(\"--\")||o.test(l)||(s=\"px;\"),i=i+l+\":\"+a+s}}return e+'=\"'+n(i)+'\"'}return null==t||!1===t||\"function\"==typeof t||\"object\"==typeof t?\"\":!0===t?e:e+'=\"'+n(\"\"+t)+'\"'}function s(r){if(null==r||\"boolean\"==typeof r||\"function\"==typeof r)return null;if(\"object\"==typeof r){if(void 0===r.constructor)return r;if(i(r)){for(var e=0;e<r.length;e++)r[e]=s(r[e]);return r}}return n(\"\"+r)}export{u as jsx,l as jsxAttr,u as jsxDEV,s as jsxEscape,a as jsxTemplate,u as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=n,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,p=c.__;function s(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return o=1,y(D,n)}function y(n,u,i){var o=s(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=!1,i=o.__c.props!==n;if(o.__c.__H.__.some(function(n){if(n.__N){u=!0;var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c){var f=c.call(this,n,t,r);return u?f||i:f}return!u||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function h(n,u){var i=s(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=s(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){if(\"function\"==typeof n){var r=n(t());return function(){n(null),r&&\"function\"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=s(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=s(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n)}function b(n){var u=s(t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=s(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();){var t=n.__H;if(n.__P&&t)try{t.__h.some(z),t.__h.some(B),t.__h=[]}catch(r){t.__h=[],c.__e(r,n.__v)}}}c.__b=function(n){r=null,e&&e(n)},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),p&&p(n,t)},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(i.__h.some(z),i.__h.some(B),i.__h=[],t=0)),u=r},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),u=r=null},c.__c=function(n,t){t.some(function(n){try{n.__h.some(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],c.__e(r,n.__v)}}),l&&l(n,t)},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.some(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&c.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,35);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{q as useCallback,x as useContext,P as useDebugValue,h as useEffect,b as useErrorBoundary,g as useId,F as useImperativeHandle,_ as useLayoutEffect,T as useMemo,y as useReducer,A as useRef,d as useState};\n//# sourceMappingURL=hooks.module.js.map\n","import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as l,createRef as f,cloneElement as a}from\"preact\";export{Component,Fragment,Fragment as StrictMode,createContext,createElement,createRef}from\"preact\";import{useState as c,useLayoutEffect as s,useEffect as h,useCallback as v,useContext as d,useDebugValue as m,useId as p,useImperativeHandle as y,useMemo as _,useReducer as b,useRef as S}from\"preact/hooks\";export*from\"preact/hooks\";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){var e=t(),r=c({t:{__:e,u:t}}),u=r[0].t,o=r[1];return s(function(){u.__=e,u.u=t,R(u)&&o({t:u})},[n,e,t]),h(function(){return R(u)&&o({t:u}),n(function(){R(u)&&o({t:u})})},[n]),e}function R(n){try{return!((t=n.__)===(e=n.u())&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}var t,e}function x(n){n()}function w(n){return n}function k(){return[!1,x]}var I=s;function M(n,t){this.props=n,this.context=t}function N(n,e){function r(n){var t=this.props.ref;return t!=n.ref&&t&&(\"function\"==typeof t?t(null):t.current=null),e?!e(this.props,n)||t!=n.ref:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",u.__f=u.prototype.isReactComponent=!0,u.type=n,u}(M.prototype=new n).isPureReactComponent=!0,M.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var T=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),T&&T(n)};var A=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function D(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=A,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var F=function(n,t){return null==n?null:r(r(n).map(t))},L={map:F,forEach:F,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:r},O=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k||[]),u.__c(n,t);O(n,t,e,r)};var U=e.unmount;function V(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return V(n,t,e)})),n}function W(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return W(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function P(){this.__u=0,this.o=null,this.__b=null}function j(n){var t=n.__&&n.__.__c;return t&&t.__a&&t.__a(n)}function z(n){var e,r,u,o=null;function i(i){if(e||(e=n()).then(function(n){n&&(o=n.default||n),u=!0},function(n){r=n,u=!0}),r)throw r;if(!u)throw e;return o?t(o,i):null}return i.displayName=\"Lazy\",i.__f=!0,i}function B(){this.i=null,this.l=null}e.unmount=function(n){var t=n.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),U&&U(n)},(P.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=j(r.__v),o=!1,i=function(){o||r.__z||(o=!0,e.__R=null,u?u(f):f())};e.__R=i;var l=e.__P;e.__P=null;var f=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=W(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=l,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),o=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var H=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function Z(n){return this.getChildContext=function(){return n.context},n.children}function Y(n){var e=this,r=n.h;if(e.componentWillUnmount=function(){o(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),!e.v){for(var u=e.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:u.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(n,t){this.childNodes.push(n),e.h.insertBefore(n,t)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}}o(t(Z,{context:e.context},n.__v),e.v)}function $(n,e){var r=t(Y,{__v:n,h:e});return r.containerInfo=e,r}(B.prototype=new n).__a=function(n){var t=this,e=j(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),H(t,n,r)):u()};e?e(o):o()}},B.prototype.render=function(n){this.i=null,this.l=new Map;var t=r(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return n.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){H(n,e,t)})};var q=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,G=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q=\"undefined\"!=typeof document,X=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function nn(n,t,e){return null==t.__k&&(t.textContent=\"\"),o(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function tn(n,t,e){return i(n,t),\"function\"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent=!0,[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this[\"UNSAFE_\"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var en=e.event;e.event=function(n){return en&&(n=en(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var rn,un={configurable:!0,get:function(){return this.class}},on=e.vnode;e.vnode=function(n){\"string\"==typeof n.type&&function(n){var t=n.props,e=n.type,u={},o=-1==e.indexOf(\"-\");for(var i in t){var l=t[i];if(!(\"value\"===i&&\"defaultValue\"in t&&null==l||Q&&\"children\"===i&&\"noscript\"===e||\"class\"===i||\"className\"===i)){var f=i.toLowerCase();\"defaultValue\"===i&&\"value\"in t&&null==t.value?i=\"value\":\"download\"===i&&!0===l?l=\"\":\"translate\"===f&&\"no\"===l?l=!1:\"o\"===f[0]&&\"n\"===f[1]?\"ondoubleclick\"===f?i=\"ondblclick\":\"onchange\"!==f||\"input\"!==e&&\"textarea\"!==e||X(t.type)?\"onfocus\"===f?i=\"onfocusin\":\"onblur\"===f?i=\"onfocusout\":J.test(i)&&(i=f):f=i=\"oninput\":o&&G.test(i)?i=i.replace(K,\"-$&\").toLowerCase():null===l&&(l=void 0),\"oninput\"===f&&u[i=f]&&(i=\"oninputCapture\"),u[i]=l}}\"select\"==e&&(u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value}))),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,\"className\",un)):t.className&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=q,on&&on(n)};var ln=e.__r;e.__r=function(n){ln&&ln(n),rn=n.__c};var fn=e.diffed;e.diffed=function(n){fn&&fn(n);var t=n.props,e=n.__e;null!=e&&\"textarea\"===n.type&&\"value\"in t&&t.value!==e.value&&(e.value=null==t.value?\"\":t.value),rn=null};var an={ReactCurrentDispatcher:{current:{readContext:function(n){return rn.__n[n.__c].props.value},useCallback:v,useContext:d,useDebugValue:m,useDeferredValue:w,useEffect:h,useId:p,useImperativeHandle:y,useInsertionEffect:I,useLayoutEffect:s,useMemo:_,useReducer:b,useRef:S,useState:c,useSyncExternalStore:C,useTransition:k}}},cn=\"18.3.1\";function sn(n){return t.bind(null,n)}function hn(n){return!!n&&n.$$typeof===q}function vn(n){return hn(n)&&n.type===u}function dn(n){return!!n&&\"string\"==typeof n.displayName&&0==n.displayName.indexOf(\"Memo(\")}function mn(n){return hn(n)?a.apply(null,arguments):n}function pn(n){return!!n.__k&&(o(null,n),!0)}function yn(n){return n&&(n.base||1===n.nodeType&&n)||null}var _n=function(n,t){return n(t)},bn=function(n,t){var r,u=e.debounceRendering;e.debounceRendering=function(n){r=n};try{var o=n(t);return r&&r(),o}finally{e.debounceRendering=u}},Sn=hn,gn={useState:c,useId:p,useReducer:b,useEffect:h,useLayoutEffect:s,useInsertionEffect:I,useTransition:k,useDeferredValue:w,useSyncExternalStore:C,startTransition:x,useRef:S,useImperativeHandle:y,useMemo:_,useCallback:v,useContext:d,useDebugValue:m,version:\"18.3.1\",Children:L,render:nn,hydrate:tn,unmountComponentAtNode:pn,createPortal:$,createElement:t,createContext:l,createFactory:sn,cloneElement:mn,createRef:f,Fragment:u,isValidElement:hn,isElement:Sn,isFragment:vn,isMemo:dn,findDOMNode:yn,Component:n,PureComponent:M,memo:N,forwardRef:D,flushSync:bn,unstable_batchedUpdates:_n,StrictMode:u,Suspense:P,SuspenseList:B,lazy:z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:an};export{L as Children,M as PureComponent,P as Suspense,B as SuspenseList,an as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mn as cloneElement,sn as createFactory,$ as createPortal,gn as default,yn as findDOMNode,bn as flushSync,D as forwardRef,tn as hydrate,Sn as isElement,vn as isFragment,dn as isMemo,hn as isValidElement,z as lazy,N as memo,nn as render,x as startTransition,pn as unmountComponentAtNode,_n as unstable_batchedUpdates,w as useDeferredValue,I as useInsertionEffect,C as useSyncExternalStore,k as useTransition,cn as version};\n//# sourceMappingURL=compat.module.js.map\n","import React, { useEffect, useState } from 'react';\nimport { webPopupButtonPillStyle, webPopupFormInputStyle, webPopupRatingScores, webPopupTextColor, webPopupSlotGap, webPopupSlotRole, WEB_POPUP_BG_SECTION_FALLBACK, WEB_POPUP_BUTTON_SLOT_PADDING, WEB_POPUP_FONT_STACK, WEB_POPUP_KEYFRAMES, WEB_POPUP_PAGE_TRANSITION_MS, WEB_POPUP_RETRY_ERROR, WEB_POPUP_TEXT_SLOT_PADDING, WEB_POPUP_TEXT_VARIANT_STYLES, } from './constants';\nimport { WEB_POPUP_GLYPH_PATHS, WEB_POPUP_THUMB_UP_PATH } from './glyphs';\nimport { placementMaxSize, resolveWebPopupPages, safeUrl, sanitizeWebPopupHtml, startPageOf, webPopupLinkTargetAttrs, } from './helpers';\nimport { webPopupBackgroundImageStyle, webPopupContainerStyle, webPopupScrimGradient } from './layout';\nimport { resolveWebPopupBoxChrome, resolveWebPopupColors, webPopupColorAlpha, webPopupDarkEnabled, webPopupImageSrc, } from './palette';\nimport { webPopupTimerLabels, webPopupTimerRemaining } from './timer';\n// Renders a popup from its model by interpreting each page's embedded layout\n// tree — the same node vocabulary the editor's canvas builds from: container\n// nodes become inline-styled grid divs, `Content` leaves render a named\n// zone's slot stack, `Image` leaves an image param. 'live' mode adds the\n// viewport chrome (overlay, placement, animation, close), 'preview' renders\n// just the popup box inline. Only one page renders at a time; buttons with a\n// `page` action switch pages. All styling is inline (shadow-DOM friendly, no\n// CSS files).\nconst ANIMATION_STYLE = {\n none: undefined,\n fade: 'pw-vpopup-fade 0.35s ease-out backwards',\n slide: 'pw-vpopup-slide 0.35s ease-out backwards',\n};\nfunction TextSlotView({ slot, align, inverse, colors }) {\n const style = {\n ...WEB_POPUP_TEXT_VARIANT_STYLES[slot.variant],\n textAlign: slot.align ?? align,\n };\n const color = webPopupTextColor(slot.variant, colors, inverse);\n if (color)\n style.color = color;\n // The html comes from the editor's rich-text slots, but the json is\n // API-writable — sanitize on render (inline tags only, safe link hrefs).\n return React.createElement(\"div\", { style: style, dangerouslySetInnerHTML: { __html: sanitizeWebPopupHtml(slot.html) } });\n}\nfunction ButtonSlotView({ slot, colors, onRequestClose, onPageChange }) {\n const pill = webPopupButtonPillStyle(slot.variant, colors);\n const wrapper = {};\n if (slot.action.type === 'close') {\n return (React.createElement(\"div\", { style: wrapper },\n React.createElement(\"button\", { type: \"button\", style: pill, onClick: onRequestClose }, slot.label)));\n }\n if (slot.action.type === 'page') {\n const target = slot.action.page;\n return (React.createElement(\"div\", { style: wrapper },\n React.createElement(\"button\", { type: \"button\", style: pill, onClick: () => onPageChange(target) }, slot.label)));\n }\n const href = safeUrl(slot.action.url);\n // No (safe) URL yet: an inert pill — not an '#' anchor opening a blank tab.\n if (!href) {\n return (React.createElement(\"div\", { style: wrapper },\n React.createElement(\"button\", { type: \"button\", style: pill }, slot.label)));\n }\n return (React.createElement(\"div\", { style: wrapper },\n React.createElement(\"a\", { href: href, ...webPopupLinkTargetAttrs(slot.action.target), style: pill }, slot.label)));\n}\n// The copy a submitted slot leaves behind, in the zone's own body style.\nfunction SlotMessageView({ message, align, inverse, colors }) {\n const color = webPopupTextColor('body', colors, inverse);\n return (React.createElement(\"div\", { style: {\n ...WEB_POPUP_TEXT_VARIANT_STYLES.body,\n padding: WEB_POPUP_TEXT_SLOT_PADDING,\n textAlign: align,\n ...(color ? { color } : {}),\n } }, message));\n}\nconst FORM_EMAIL_PATTERN = /^\\S+@\\S+\\.\\S+$/;\nconst FORM_INPUT_TYPES = { email: 'email', phone: 'tel' };\nconst FORM_AUTOCOMPLETE = {\n email: 'email',\n firstName: 'given-name',\n lastName: 'family-name',\n phone: 'tel',\n};\n// The privacy-check error renders under the checkbox row; a field key can\n// never collide with it (normalized keys are non-empty slot-local ids).\nconst PRIVACY_ERROR_KEY = '__privacy';\n/**\n * An email-subscription form slot: the fields, the consent row and the\n * submit pill, all popup-styled. Local state machine: idle → submitting →\n * success/confirm (the form swaps to the slot's message) or error (the form\n * stays, a generic retryable note appears). Without an onSubmitForm handler\n * or a bound formCode the form is inert — inputs type, submit does nothing —\n * which is exactly what previews and the editor canvas want.\n */\nfunction FormSlotView({ slot, align, inverse, colors, onSubmitForm }) {\n const [values, setValues] = useState({});\n const [policyAccepted, setPolicyAccepted] = useState(false);\n const [focusedKey, setFocusedKey] = useState(null);\n const [errors, setErrors] = useState({});\n const [phase, setPhase] = useState('idle');\n const captionColor = webPopupTextColor('caption', colors, inverse);\n const captionStyle = {\n ...WEB_POPUP_TEXT_VARIANT_STYLES.caption,\n ...(captionColor ? { color: captionColor } : {}),\n };\n const errorStyle = {\n fontSize: 12,\n lineHeight: 1.4,\n color: colors.error,\n paddingTop: 2,\n };\n if (phase === 'success' || phase === 'confirm') {\n return (React.createElement(SlotMessageView, { message: phase === 'confirm' ? slot.confirmEmailMessage : slot.successMessage, align: align, inverse: inverse, colors: colors }));\n }\n const setFieldValue = (key, value) => {\n setValues((prev) => ({ ...prev, [key]: value }));\n setErrors((prev) => (prev[key] ? Object.fromEntries(Object.entries(prev).filter(([k]) => k !== key)) : prev));\n };\n const submit = () => {\n if (!onSubmitForm || !slot.formCode || phase === 'submitting')\n return;\n const found = {};\n for (const field of slot.fields) {\n const value = (values[field.key] ?? '').trim();\n if (field.required && !value)\n found[field.key] = 'Required';\n else if (field.kind === 'email' && value && !FORM_EMAIL_PATTERN.test(value)) {\n found[field.key] = 'Enter a valid email';\n }\n }\n if (slot.privacy && !policyAccepted)\n found[PRIVACY_ERROR_KEY] = 'Please accept the privacy policy';\n setErrors(found);\n if (Object.keys(found).length > 0)\n return;\n const payload = {\n email: '',\n policyAccepted: slot.privacy ? policyAccepted : true,\n };\n const customFields = {};\n for (const field of slot.fields) {\n const value = (values[field.key] ?? '').trim();\n if (!value)\n continue;\n if (field.kind === 'email')\n payload.email = payload.email || value;\n else if (field.kind === 'firstName')\n payload.firstName = value;\n else if (field.kind === 'lastName')\n payload.lastName = value;\n else if (field.kind === 'phone')\n payload.phone = value;\n else\n customFields[field.tag || field.key] = value;\n }\n if (Object.keys(customFields).length > 0)\n payload.customFields = customFields;\n setPhase('submitting');\n // Promise.resolve wrapper: a host callback that throws SYNCHRONOUSLY\n // (before returning its promise) must land in the error phase too — a\n // bare .then(ok, fail) would let the throw escape and strand the form\n // in 'submitting' with no way back.\n Promise.resolve()\n .then(() => onSubmitForm(slot.formCode, payload))\n .then((result) => setPhase(result === 'confirm-email' ? 'confirm' : 'success'), () => setPhase('error'));\n };\n const submitting = phase === 'submitting';\n const privacyHref = slot.privacy ? safeUrl(slot.privacy.url) : undefined;\n const pill = {\n ...webPopupButtonPillStyle(slot.submitVariant, colors),\n ...(submitting ? { opacity: 0.6, cursor: 'default' } : {}),\n };\n return (React.createElement(\"form\", { noValidate: true, style: { margin: 0, textAlign: 'left' }, onSubmit: (event) => {\n event.preventDefault();\n submit();\n } },\n slot.fields.map((field) => {\n const error = errors[field.key];\n let borderColor;\n if (error)\n borderColor = colors.error;\n else if (focusedKey === field.key)\n borderColor = colors.accent;\n return (React.createElement(\"div\", { key: field.key, style: { padding: WEB_POPUP_TEXT_SLOT_PADDING } },\n field.label && React.createElement(\"div\", { style: { ...captionStyle, paddingBottom: 4 } }, field.label),\n React.createElement(\"input\", { type: FORM_INPUT_TYPES[field.kind] ?? 'text', autoComplete: FORM_AUTOCOMPLETE[field.kind], placeholder: field.placeholder || undefined, value: values[field.key] ?? '', disabled: submitting, style: webPopupFormInputStyle(colors, borderColor), onFocus: () => setFocusedKey(field.key), onBlur: () => setFocusedKey((key) => (key === field.key ? null : key)), onChange: (event) => setFieldValue(field.key, event.currentTarget.value) }),\n error && React.createElement(\"div\", { style: errorStyle }, error)));\n }),\n slot.privacy && (React.createElement(\"div\", { style: { padding: WEB_POPUP_TEXT_SLOT_PADDING } },\n React.createElement(\"label\", { style: { ...captionStyle, display: 'flex', alignItems: 'flex-start', gap: 8, cursor: 'pointer' } },\n React.createElement(\"input\", { type: \"checkbox\", checked: policyAccepted, disabled: submitting, style: { margin: '2px 0 0', flexShrink: 0 }, onChange: (event) => {\n setPolicyAccepted(event.currentTarget.checked);\n setErrors((prev) => (prev[PRIVACY_ERROR_KEY]\n ? Object.fromEntries(Object.entries(prev).filter(([k]) => k !== PRIVACY_ERROR_KEY))\n : prev));\n } }),\n React.createElement(\"span\", null,\n slot.privacy.checkboxLabel,\n privacyHref && (React.createElement(React.Fragment, null,\n ' ',\n React.createElement(\"a\", { href: privacyHref, ...webPopupLinkTargetAttrs(undefined), style: { color: colors.accent } }, slot.privacy.linkLabel || slot.privacy.url))))),\n errors[PRIVACY_ERROR_KEY] && React.createElement(\"div\", { style: errorStyle }, errors[PRIVACY_ERROR_KEY]))),\n React.createElement(\"div\", { style: { padding: WEB_POPUP_BUTTON_SLOT_PADDING } },\n React.createElement(\"button\", { type: \"submit\", disabled: submitting, style: pill }, slot.submitLabel)),\n phase === 'error' && (React.createElement(\"div\", { style: { ...errorStyle, textAlign: align } }, WEB_POPUP_RETRY_ERROR))));\n}\n// The phase-2 slots. The two that submit follow the form slot's rules exactly:\n// inert without a callback, idle → submitting → success/error, then its copy.\n// One cell of the countdown: the digits over their unit label.\nfunction TimerCell({ value, label, digitStyle, labelStyle }) {\n return (React.createElement(\"div\", { style: { minWidth: 44 } },\n React.createElement(\"div\", { style: digitStyle }, String(value).padStart(2, '0')),\n label ? React.createElement(\"div\", { style: labelStyle }, label) : null));\n}\nfunction TimerSlotView({ slot, align, inverse, colors, mode, onRequestClose, onPageChange }) {\n const [nowMs, setNowMs] = useState(() => Date.now());\n const remaining = webPopupTimerRemaining(slot.endTime, slot.timezone, nowMs);\n const expired = remaining.total === 0;\n // 'preview' draws a still frame: a gallery is many popups at once, and every\n // one of them would tick. A finished countdown stops on its own.\n useEffect(() => {\n if (mode !== 'live' || expired)\n return undefined;\n const id = setInterval(() => setNowMs(Date.now()), 1000);\n return () => clearInterval(id);\n }, [mode, expired, slot.endTime, slot.timezone]);\n // Past the deadline, the slot does what it was told. 'hide-popup' gets here\n // only for a popup left open ACROSS its deadline (the host gates the rest).\n useEffect(() => {\n if (mode !== 'live' || !expired)\n return;\n if (slot.onExpire === 'hide-popup')\n onRequestClose?.();\n else if (slot.onExpire === 'page' && slot.expirePage)\n onPageChange(slot.expirePage);\n }, [mode, expired, slot.onExpire, slot.expirePage, onRequestClose, onPageChange]);\n const digitColor = webPopupTextColor('h2', colors, inverse);\n const labelColor = webPopupTextColor('caption', colors, inverse);\n const digitStyle = {\n fontSize: 28,\n fontWeight: 700,\n lineHeight: 1.2,\n // Tabular figures: without them every second reflows the row.\n fontVariantNumeric: 'tabular-nums',\n ...(digitColor ? { color: digitColor } : {}),\n };\n const labelStyle = {\n ...WEB_POPUP_TEXT_VARIANT_STYLES.caption,\n ...(labelColor ? { color: labelColor } : {}),\n };\n const labels = webPopupTimerLabels(slot.language);\n const cells = [\n { value: remaining.days, label: labels.days },\n { value: remaining.hours, label: labels.hours },\n { value: remaining.minutes, label: labels.minutes },\n { value: remaining.seconds, label: labels.seconds },\n ];\n return (React.createElement(\"div\", { style: { padding: WEB_POPUP_TEXT_SLOT_PADDING, textAlign: align } },\n React.createElement(\"div\", { style: { display: 'inline-flex', gap: 12, textAlign: 'center' } }, cells.map((cell) => (React.createElement(TimerCell, { key: cell.label || cell.value, value: cell.value, label: slot.showLabels ? cell.label : '', digitStyle: digitStyle, labelStyle: labelStyle }))))));\n}\nfunction ChoiceSlotView({ slot, align, inverse, colors, onSubmitChoice }) {\n const [picked, setPicked] = useState([]);\n const [phase, setPhase] = useState('idle');\n const [notice, setNotice] = useState('');\n if (phase === 'success') {\n return (React.createElement(SlotMessageView, { message: slot.successMessage, align: align, inverse: inverse, colors: colors }));\n }\n const toggle = (value) => {\n setNotice('');\n setPicked((prev) => {\n if (prev.includes(value))\n return prev.filter((entry) => entry !== value);\n // At the ceiling the extra tap is refused with a reason rather than\n // silently dropping the oldest pick.\n if (slot.max > 0 && prev.length >= slot.max) {\n setNotice(`Pick up to ${slot.max}`);\n return prev;\n }\n return [...prev, value];\n });\n };\n const submit = () => {\n if (!onSubmitChoice || !slot.tagName || phase === 'submitting')\n return;\n // An empty submit would CLEAR the tag — never what a \"save\" button means.\n const floor = Math.max(slot.min, 1);\n if (picked.length < floor) {\n setNotice(floor === 1 ? 'Pick at least one' : `Pick at least ${floor}`);\n return;\n }\n const values = slot.options\n .filter((option) => picked.includes(option.value))\n .map((option) => option.tagValue || option.value);\n setNotice('');\n setPhase('submitting');\n // Promise.resolve wrapper: a host callback that throws SYNCHRONOUSLY must\n // land in the error phase too, not escape and strand the slot.\n Promise.resolve()\n .then(() => onSubmitChoice({ slotKey: slot.key, tagName: slot.tagName, values }))\n .then(() => setPhase('success'), () => setPhase('error'));\n };\n const submitting = phase === 'submitting';\n const textColor = webPopupTextColor('body', colors, inverse);\n const optionStyle = {\n ...WEB_POPUP_TEXT_VARIANT_STYLES.body,\n ...(textColor ? { color: textColor } : {}),\n };\n const chip = (selected) => ({\n padding: '6px 14px',\n borderRadius: 999,\n border: `1px solid ${colors.accent}`,\n backgroundColor: selected ? colors.accent : 'transparent',\n color: selected ? colors.onAccent : colors.accent,\n fontFamily: 'inherit',\n fontSize: 14,\n lineHeight: 1.4,\n cursor: 'pointer',\n });\n return (React.createElement(\"div\", { style: { padding: WEB_POPUP_TEXT_SLOT_PADDING } },\n slot.control === 'chips'\n ? (React.createElement(\"div\", { style: { display: 'flex', flexWrap: 'wrap', gap: 8, justifyContent: align === 'center' ? 'center' : 'flex-start' } }, slot.options.map((option) => (React.createElement(\"button\", { key: option.value, type: \"button\", \"aria-pressed\": picked.includes(option.value), style: chip(picked.includes(option.value)), onClick: () => toggle(option.value) }, option.label)))))\n : (React.createElement(\"div\", { style: { display: 'grid', gap: 6 } }, slot.options.map((option) => (React.createElement(\"label\", { key: option.value, style: { ...optionStyle, display: 'flex', alignItems: 'center', gap: 8, cursor: 'pointer' } },\n React.createElement(\"input\", { type: \"checkbox\", checked: picked.includes(option.value), onChange: () => toggle(option.value), style: { accentColor: colors.accent, width: 16, height: 16, margin: 0 } }),\n option.label))))),\n notice ? React.createElement(\"div\", { style: { ...WEB_POPUP_TEXT_VARIANT_STYLES.caption, color: colors.error, paddingTop: 4 } }, notice) : null,\n phase === 'error' ? (React.createElement(\"div\", { style: { ...WEB_POPUP_TEXT_VARIANT_STYLES.caption, color: colors.error, paddingTop: 4 } }, WEB_POPUP_RETRY_ERROR)) : null,\n React.createElement(\"div\", { style: { padding: WEB_POPUP_BUTTON_SLOT_PADDING } },\n React.createElement(\"button\", { type: \"button\", style: {\n ...webPopupButtonPillStyle(slot.submitVariant, colors),\n ...(submitting ? { opacity: 0.7 } : {}),\n }, onClick: submit }, slot.submitLabel))));\n}\n// One rating button: a number for nps, a star for stars, a thumb for thumbs.\nfunction RatingButton({ score, scale, selected, colors, onPick }) {\n const base = {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n padding: 0,\n border: `1px solid ${colors.accent}`,\n backgroundColor: selected ? colors.accent : 'transparent',\n color: selected ? colors.onAccent : colors.accent,\n fontFamily: 'inherit',\n fontSize: 14,\n lineHeight: 1,\n cursor: 'pointer',\n };\n if (scale === 'nps') {\n return (React.createElement(\"button\", { type: \"button\", \"aria-label\": `Rate ${score}`, \"aria-pressed\": selected, style: { ...base, width: 30, height: 32, borderRadius: 6 }, onClick: onPick }, score));\n }\n const thumbs = scale === 'thumbs';\n // Icon-only buttons need a name of their own; the nps row says it in text.\n let label = `Rate ${score}`;\n if (thumbs)\n label = score === 1 ? 'Thumbs up' : 'Thumbs down';\n return (React.createElement(\"button\", { type: \"button\", \"aria-label\": label, \"aria-pressed\": selected, style: { ...base, width: thumbs ? 44 : 34, height: thumbs ? 40 : 34, borderRadius: thumbs ? 8 : 6 }, onClick: onPick },\n React.createElement(\"svg\", { width: thumbs ? 22 : 20, height: thumbs ? 22 : 20, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", strokeWidth: 2, strokeLinecap: \"round\", strokeLinejoin: \"round\", \"aria-hidden\": \"true\" },\n React.createElement(\"path\", { d: thumbs ? WEB_POPUP_THUMB_UP_PATH : WEB_POPUP_GLYPH_PATHS.star, ...(thumbs && score === 0 ? { transform: 'rotate(180 12 12)' } : {}) }))));\n}\nfunction RatingSlotView({ slot, align, inverse, colors, onSubmitRating }) {\n const [score, setScore] = useState(null);\n const [phase, setPhase] = useState('idle');\n if (phase === 'success') {\n return (React.createElement(SlotMessageView, { message: slot.successMessage, align: align, inverse: inverse, colors: colors }));\n }\n const send = (value) => {\n if (!onSubmitRating || !slot.eventName || phase === 'submitting')\n return;\n setPhase('submitting');\n // See ChoiceSlotView: a synchronous throw must land in 'error' too.\n Promise.resolve()\n .then(() => onSubmitRating({\n slotKey: slot.key,\n eventName: slot.eventName,\n score: value,\n scale: slot.scale,\n }))\n .then(() => setPhase('success'), () => setPhase('error'));\n };\n const pick = (value) => {\n // Same guard as `send`: otherwise a tap during an in-flight submit moves the\n // highlight while the host keeps the score that was actually sent.\n if (phase === 'submitting')\n return;\n setScore(value);\n if (slot.submitMode === 'instant')\n send(value);\n };\n const scores = webPopupRatingScores(slot.scale);\n const labelColor = webPopupTextColor('caption', colors, inverse);\n const edgeLabelStyle = {\n ...WEB_POPUP_TEXT_VARIANT_STYLES.caption,\n ...(labelColor ? { color: labelColor } : {}),\n };\n // A star scale fills every button up to the pick — the row IS the score.\n const isSelected = (value) => (slot.scale === 'stars' ? score !== null && value <= score : score === value);\n return (React.createElement(\"div\", { style: { padding: WEB_POPUP_TEXT_SLOT_PADDING } },\n React.createElement(\"div\", { style: {\n display: 'flex',\n flexWrap: 'wrap',\n gap: 6,\n justifyContent: align === 'center' ? 'center' : 'flex-start',\n } }, scores.map((value) => (React.createElement(RatingButton, { key: value, score: value, scale: slot.scale, selected: isSelected(value), colors: colors, onPick: () => pick(value) })))),\n (slot.labels.low || slot.labels.high) ? (React.createElement(\"div\", { style: { display: 'flex', justifyContent: 'space-between', gap: 8, paddingTop: 4 } },\n React.createElement(\"span\", { style: edgeLabelStyle }, slot.labels.low),\n React.createElement(\"span\", { style: edgeLabelStyle }, slot.labels.high))) : null,\n phase === 'error' ? (React.createElement(\"div\", { style: { ...WEB_POPUP_TEXT_VARIANT_STYLES.caption, color: colors.error, paddingTop: 4 } }, WEB_POPUP_RETRY_ERROR)) : null,\n slot.submitMode === 'button' ? (React.createElement(\"div\", { style: { padding: WEB_POPUP_BUTTON_SLOT_PADDING } },\n React.createElement(\"button\", { type: \"button\", style: {\n ...webPopupButtonPillStyle('primary', colors),\n ...(phase === 'submitting' ? { opacity: 0.7 } : {}),\n }, onClick: () => (score === null ? undefined : send(score)) }, slot.submitLabel))) : null));\n}\nfunction GlyphSlotView({ slot, align, inverse, colors }) {\n // No authored color: the accent, or the inverse copy color over a dark image\n // (where the accent can be the one thing that doesn't read).\n const color = slot.color || (inverse ? colors.textInverse : colors.accent);\n return (React.createElement(\"div\", { style: { padding: WEB_POPUP_TEXT_SLOT_PADDING, textAlign: align, lineHeight: 0 } },\n React.createElement(\"svg\", { width: slot.size, height: slot.size, viewBox: \"0 0 24 24\", fill: \"none\", stroke: color, strokeWidth: 2, strokeLinecap: \"round\", strokeLinejoin: \"round\", \"aria-hidden\": \"true\", style: { display: 'inline-block' } },\n React.createElement(\"path\", { d: WEB_POPUP_GLYPH_PATHS[slot.name] }))));\n}\n// A switch, not a chain of `&&`: the compiler is what notices a slot type with\n// no view. Exported so the editor canvas draws these slots with it, not a copy.\nexport function WebPopupSlotView({ slot, align, inverse, colors, mode = 'live', onRequestClose, onPageChange, onSubmitForm, onSubmitChoice, onSubmitRating, }) {\n // A page jump nobody handles is a no-op, not a crash — the editor canvas\n // and the previews mount this without any navigation of their own.\n const pageChange = onPageChange ?? (() => { });\n switch (slot.type) {\n case 'text':\n return (React.createElement(TextSlotView, { slot: slot, align: align, inverse: inverse, colors: colors }));\n case 'button':\n return (React.createElement(ButtonSlotView, { slot: slot, colors: colors, onRequestClose: onRequestClose, onPageChange: pageChange }));\n case 'email-subscription-form':\n return (React.createElement(FormSlotView, { slot: slot, align: align, inverse: inverse, colors: colors, onSubmitForm: onSubmitForm }));\n case 'timer':\n return (React.createElement(TimerSlotView, { slot: slot, align: align, inverse: inverse, colors: colors, mode: mode, onRequestClose: onRequestClose, onPageChange: pageChange }));\n case 'choice':\n return (React.createElement(ChoiceSlotView, { slot: slot, align: align, inverse: inverse, colors: colors, onSubmitChoice: onSubmitChoice }));\n case 'rating':\n return (React.createElement(RatingSlotView, { slot: slot, align: align, inverse: inverse, colors: colors, onSubmitRating: onSubmitRating }));\n case 'glyph':\n return (React.createElement(GlyphSlotView, { slot: slot, align: align, inverse: inverse, colors: colors }));\n }\n}\n// A Content leaf: the named zone's slots (texts, buttons and forms in order)\n// as a grid stack. An unknown zone key renders as an empty spot, not a crash.\nfunction ContentNodeView({ node, page, colors, mode, leaf, onRequestClose, onPageChange, onSubmitForm, onSubmitChoice, onSubmitRating, }) {\n const zone = page.contents.find((z) => z.key === node.props.content);\n if (!zone)\n return null;\n if (leaf?.renderZone) {\n return React.createElement(\"div\", { style: { minWidth: 0 } }, leaf.renderZone(zone, node));\n }\n const align = node.props.align ?? 'left';\n const inverse = node.props.tone === 'inverse';\n return (React.createElement(\"div\", { style: { minWidth: 0 } }, zone.slots.map((slot, index) => {\n const previous = zone.slots[index - 1];\n const marginTop = previous\n ? webPopupSlotGap(webPopupSlotRole(previous), webPopupSlotRole(slot))\n : 0;\n return (React.createElement(\"div\", { key: slot.key, style: marginTop ? { marginTop } : undefined },\n React.createElement(WebPopupSlotView, { slot: slot, align: align, inverse: inverse, colors: colors, mode: mode, onRequestClose: onRequestClose, onPageChange: onPageChange, onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating })));\n })));\n}\n// The playable url of a media param, or undefined when it has no video.\nfunction mediaVideoSrc(image) {\n return image?.video ? safeUrl(image.video.src) : undefined;\n}\n// A media param's video: autoplay only muted, playsInline to keep iOS out of\n// fullscreen, and in 'preview' it holds on the poster instead of streaming.\nfunction MediaVideo({ image, poster, src, style, mode }) {\n return (React.createElement(\"video\", { src: src, poster: poster || undefined, style: style, autoPlay: mode === 'live', muted: true, playsInline: true, preload: \"metadata\", loop: image.video?.loop !== false, controls: image.video?.controls === true }));\n}\nfunction ImageNodeView({ node, page, leaf, mode, scheme }) {\n const image = page.images.find((i) => i.key === node.props.image);\n if (!image)\n return null;\n // The override sees srcless params too — an editor wants a placeholder\n // where the runtime shows nothing.\n if (leaf?.renderImage)\n return React.createElement(React.Fragment, null, leaf.renderImage(image, node));\n const video = mediaVideoSrc(image);\n const src = webPopupImageSrc(image, scheme);\n if (!src && !video)\n return null;\n const style = { display: 'block', width: '100%', minWidth: 0 };\n if (image.fit) {\n style.height = '100%';\n style.objectFit = image.fit;\n }\n else {\n style.height = 'auto';\n }\n if (image.blur)\n style.filter = `blur(${image.blur}px)`;\n if (video) {\n return (React.createElement(MediaVideo, { image: image, poster: src, src: video, style: style, mode: mode }));\n }\n return React.createElement(\"img\", { src: src, alt: \"\", style: style });\n}\n// Both layered backgrounds (blur, video) share this shell: the color/poster\n// paints on an outer grid box, the content rides an inner layer covering it.\nfunction LayeredBackgroundBox({ style, outer, inner, layer, children }) {\n const { backgroundColor, ...rest } = style;\n return (React.createElement(\"div\", { style: { display: 'grid', minWidth: 0, backgroundColor, ...outer } },\n layer,\n React.createElement(\"div\", { style: { ...rest, ...inner } }, children)));\n}\n// The tree interpreter: containers → grid divs, leaves → zone/image views.\nfunction LayoutNodeView({ node, page, colors, mode, scheme, leaf, onRequestClose, onPageChange, onSubmitForm, onSubmitChoice, onSubmitRating, }) {\n if (node.type === 'Content') {\n return (React.createElement(ContentNodeView, { node: node, page: page, colors: colors, mode: mode, scheme: scheme, leaf: leaf, onRequestClose: onRequestClose, onPageChange: onPageChange, onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating }));\n }\n if (node.type === 'Image') {\n return (React.createElement(ImageNodeView, { node: node, page: page, leaf: leaf, mode: mode, scheme: scheme }));\n }\n const bgKey = node.props?.backgroundImage;\n const background = bgKey ? page.images.find((i) => i.key === bgKey) : undefined;\n const blur = background?.blur ?? 0;\n const dim = background?.dim ?? 0;\n const bgVideo = mediaVideoSrc(background);\n const bgSrc = background ? webPopupImageSrc(background, scheme) : undefined;\n const style = webPopupContainerStyle(node, blur > 0 || bgVideo ? undefined : bgSrc || undefined, dim);\n if (bgKey)\n style.backgroundColor = WEB_POPUP_BG_SECTION_FALLBACK;\n const children = node.children.map((child, index) => (React.createElement(LayoutNodeView\n // Layout nodes are static per page render — positional keys are fine.\n , { \n // Layout nodes are static per page render — positional keys are fine.\n key: index, node: child, page: page, colors: colors, mode: mode, scheme: scheme, leaf: leaf, onRequestClose: onRequestClose, onPageChange: onPageChange, onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating })));\n if (bgVideo && background) {\n // A background video can't ride the css background property, so it paints\n // as its own layer; the scrim moves onto the content layer above it.\n const scrim = webPopupScrimGradient(dim);\n return (React.createElement(LayeredBackgroundBox, { style: style, outer: {\n position: 'relative',\n overflow: 'hidden',\n ...(bgSrc ? webPopupBackgroundImageStyle(bgSrc) : {}),\n }, inner: { position: 'relative', ...(scrim ? { backgroundImage: scrim } : {}) }, layer: (React.createElement(MediaVideo, { image: background, poster: bgSrc ?? '', src: bgVideo, mode: mode, style: {\n position: 'absolute',\n inset: 0,\n width: '100%',\n height: '100%',\n objectFit: 'cover',\n ...(blur > 0 ? { filter: `blur(${blur}px)` } : {}),\n } })) }, children));\n }\n if (blur > 0) {\n // backdrop-filter blurs what's painted BEHIND its element, never the\n // element's own background — so the image paints on an outer box and the\n // laid-out content rides an inner blurring layer covering it edge to\n // edge (grid/padding move onto that layer). The outer box is a grid so\n // a stretched height (a 'stretch' page's root) passes through to the\n // layer actually carrying alignContent.\n return (React.createElement(LayeredBackgroundBox, { style: style, outer: bgSrc ? webPopupBackgroundImageStyle(bgSrc, dim) : undefined, inner: { backdropFilter: `blur(${blur}px)`, WebkitBackdropFilter: `blur(${blur}px)` } }, children));\n }\n return React.createElement(\"div\", { style: style }, children);\n}\n// The popup box: the shared chrome (background, radius, shadow) around one\n// resolved page's layout tree. Exported for the editor — its canvas is this\n// very interpreter with `leafRenderers` swapping the Content/Image leaves\n// for editable views (the container interpretation stays this component's,\n// which is what keeps the canvas true to the runtime); the viewport chrome\n// (placement, overlay, enter animation) is the caller's business there.\n// After a page switch (`animatePage`) the incoming content fades in — keyed\n// by page so the animation restarts per switch — and an explicit px height\n// glides via the transition (auto heights just snap).\nexport function WebPopupBox({ page, params, mode = 'live', colorScheme = 'light', leafRenderers, animatePage = false, onRequestClose, onPageChange, onSubmitForm, onSubmitChoice, onSubmitRating, }) {\n const colors = resolveWebPopupColors(params, colorScheme);\n const box = resolveWebPopupBoxChrome(params, colorScheme);\n const style = {\n position: 'relative',\n boxSizing: 'border-box',\n overflow: 'hidden',\n backgroundColor: colors.background,\n colorScheme: colors.scheme,\n fontFamily: WEB_POPUP_FONT_STACK,\n color: colors.text,\n borderRadius: params.borderRadius > 0 ? params.borderRadius : undefined,\n boxShadow: box.boxShadow && box.boxShadow !== 'none' ? box.boxShadow : undefined,\n transition: `height ${WEB_POPUP_PAGE_TRANSITION_MS}ms ease`,\n };\n if (page.height) {\n // 'stretch' fills whatever box the caller gives (the fixed container pins\n // both vertical edges in live mode); a px height is the box's own.\n style.height = page.height === 'stretch' ? '100%' : page.height;\n style.overflowY = 'auto';\n }\n // A stretch page's tree gets the full box height to lay out in: the\n // min-height'd single-track grid stretches the root container, so its\n // alignContent can place the content vertically (a px height keeps the\n // pre-stretch behavior — content flows from the top).\n const pageStyle = {\n ...(animatePage ? { animation: `pw-vpopup-page ${WEB_POPUP_PAGE_TRANSITION_MS}ms ease-out backwards` } : {}),\n ...(page.height === 'stretch' ? { display: 'grid', minHeight: '100%' } : {}),\n };\n return (React.createElement(\"div\", { style: style },\n React.createElement(\"div\", { key: page.key, style: pageStyle },\n React.createElement(LayoutNodeView, { node: page.layout, page: page, colors: colors, mode: mode, scheme: colors.scheme, leaf: leafRenderers, onRequestClose: onRequestClose, onPageChange: onPageChange ?? (() => { }), onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating }))));\n}\nfunction CloseButton({ colors, onRequestClose }) {\n return (React.createElement(\"button\", { type: \"button\", \"aria-label\": \"Close\", onClick: onRequestClose, style: {\n position: 'absolute',\n top: 10,\n right: 10,\n width: 24,\n height: 24,\n padding: 0,\n border: 'none',\n borderRadius: '50%',\n background: webPopupColorAlpha(colors.surface, 0.92),\n boxShadow: '0 1px 3px rgba(16, 24, 40, 0.25)',\n color: colors.chromeIcon,\n fontSize: 13,\n lineHeight: 1,\n cursor: 'pointer',\n } }, \"\\u2715\"));\n}\n// Fixed viewport placement from the placement param: anchored edges get the\n// offset, unanchored axes center via translate. No width = stretch between\n// the side gutters; height 'stretch' = pinned to both vertical edges the same\n// way. The size is the ACTIVE page's (resolved page ?? chrome), so the box\n// re-anchors itself when a page switch changes it.\nfunction fixedContainerStyle(params, width, height) {\n const { placement } = params;\n const style = {\n position: 'fixed',\n boxSizing: 'border-box',\n maxWidth: placementMaxSize(placement),\n maxHeight: placementMaxSize(placement),\n // The widget host is pointer-transparent (a corner banner must not block\n // the page); the popup itself takes clicks back.\n pointerEvents: 'auto',\n };\n if (width) {\n style.width = width;\n const h = placement.h;\n if (h === 'left')\n style.left = placement.offset;\n else if (h === 'right')\n style.right = placement.offset;\n else\n style.left = '50%';\n }\n else {\n // Stretch: pin both side edges regardless of the horizontal anchor.\n style.left = placement.offset;\n style.right = placement.offset;\n }\n if (height === 'stretch') {\n // Stretch: pin both vertical edges; the v anchor has nothing to place.\n style.top = placement.offset;\n style.bottom = placement.offset;\n }\n else if (placement.v === 'top')\n style.top = placement.offset;\n else if (placement.v === 'bottom')\n style.bottom = placement.offset;\n else\n style.top = '50%';\n const tx = width && placement.h === 'center' ? '-50%' : '0';\n const ty = placement.v === 'middle' && height !== 'stretch' ? '-50%' : '0';\n if (tx !== '0' || ty !== '0')\n style.transform = `translate(${tx}, ${ty})`;\n const anim = ANIMATION_STYLE[params.animation];\n if (anim)\n style.animation = anim;\n // A page switch that changes the (explicit) width glides instead of\n // jumping; the anchored edges keep the box pinned while it resizes.\n style.transition = `width ${WEB_POPUP_PAGE_TRANSITION_MS}ms ease`;\n return style;\n}\nconst DARK_MEDIA_QUERY = '(prefers-color-scheme: dark)';\nfunction prefersDark() {\n return typeof window !== 'undefined' && typeof window.matchMedia === 'function'\n && window.matchMedia(DARK_MEDIA_QUERY).matches;\n}\n// 'auto' follows the visitor's OS setting and keeps following it: a popup can\n// be on screen when the theme flips, and a stale palette is the visible half.\nfunction useColorScheme(pref, watch) {\n const [dark, setDark] = useState(() => pref === 'auto' && watch && prefersDark());\n useEffect(() => {\n if (pref !== 'auto' || !watch || typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return undefined;\n }\n const media = window.matchMedia(DARK_MEDIA_QUERY);\n const onChange = (event) => setDark(event.matches);\n setDark(media.matches);\n media.addEventListener('change', onChange);\n return () => media.removeEventListener('change', onChange);\n }, [pref, watch]);\n if (pref !== 'auto')\n return pref;\n return dark ? 'dark' : 'light';\n}\nexport function WebPopupReader({ params, mode = 'live', colorScheme = 'auto', onRequestClose, onSubmitForm, onSubmitChoice, onSubmitRating, leafRenderers, }) {\n // null = never navigated: show the start page. Guarded against keys that\n // don't exist (anymore) — an edited/older document falls back gracefully.\n const [pageKey, setPageKey] = useState(null);\n // Only the active page's images are in the DOM — the rest would start\n // downloading on the page switch, leaving the previous picture on screen\n // until the new one arrives. Warm the browser cache for every page up front.\n useEffect(() => {\n resolveWebPopupPages(params).forEach((p) => p.images.forEach(({ src, srcDark }) => {\n [src, srcDark].forEach((url) => {\n if (url)\n new Image().src = url;\n });\n }));\n }, [params]);\n const scheme = useColorScheme(colorScheme, webPopupDarkEnabled(params));\n const pages = resolveWebPopupPages(params);\n if (pages.length === 0)\n return null;\n const page = pages.find((p) => p.key === pageKey) ?? startPageOf(params, pages);\n // null = the initial page: entry is the chrome's business (the enter\n // animation in live mode); the page fade only plays on actual switches.\n const animatePage = pageKey !== null;\n if (mode === 'preview') {\n return (React.createElement(\"div\", { style: {\n position: 'relative',\n width: page.width ?? '100%',\n transition: `width ${WEB_POPUP_PAGE_TRANSITION_MS}ms ease`,\n } },\n React.createElement(\"style\", null, WEB_POPUP_KEYFRAMES),\n React.createElement(WebPopupBox, { page: page, params: params, mode: mode, colorScheme: scheme, leafRenderers: leafRenderers, animatePage: animatePage, onRequestClose: onRequestClose, onPageChange: setPageKey, onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating })));\n }\n const { overlay } = resolveWebPopupBoxChrome(params, scheme);\n return (React.createElement(React.Fragment, null,\n React.createElement(\"style\", null, WEB_POPUP_KEYFRAMES),\n overlay && (\n // Modal semantics: the dim is clickable and dismisses the popup.\n React.createElement(\"div\", { style: {\n position: 'fixed',\n inset: 0,\n backgroundColor: overlay.color,\n opacity: overlay.opacity,\n animation: 'pw-vpopup-overlay 0.2s ease-out backwards',\n pointerEvents: 'auto',\n }, onClick: onRequestClose })),\n React.createElement(\"div\", { style: fixedContainerStyle(params, page.width, page.height) },\n React.createElement(WebPopupBox, { page: page, params: params, mode: mode, colorScheme: scheme, leafRenderers: leafRenderers, animatePage: animatePage, onRequestClose: onRequestClose, onPageChange: setPageKey, onSubmitForm: onSubmitForm, onSubmitChoice: onSubmitChoice, onSubmitRating: onSubmitRating }),\n React.createElement(CloseButton, { colors: resolveWebPopupColors(params, scheme), onRequestClose: onRequestClose }))));\n}\n","import { type WebPopupFormSubmitHandler, type WebPopupFormSubmitResult } from 'smart-blocks-utils';\n\nimport { SUBSCRIPTION_FORMS_API_URL } from './constants';\nimport { Logger } from '../../core/logger';\n\n// The subscription-form service client for popup-embedded forms\n// (email-subscription-form slots). Same endpoints and payloads the hosted\n// <pushwoosh-subscribe-widget> uses — the popup reader only renders the\n// fields; subscribing an email goes through the service so form stats,\n// double opt-in and tag mapping keep working.\n\nconst SUBMIT_RESULTS: Record<string, WebPopupFormSubmitResult> = {\n SUBMIT_FORM_RESULT_SUBSCRIBED: 'subscribed',\n SUBMIT_FORM_RESULT_CONFIRM_EMAIL: 'confirm-email',\n SUBMIT_FORM_RESULT_ALREADY_SUBSCRIBED: 'already-subscribed',\n};\n\nconst formUrl = (formCode: string, action: string): string => (\n `${SUBSCRIPTION_FORMS_API_URL}/forms/code/${encodeURIComponent(formCode)}${action}`\n);\n\n/**\n * The reader's `onSubmitForm` handler: POST the slot's payload to the bound\n * form's submit endpoint. Throws on transport errors and unrecognized\n * results — the form slot shows its generic retryable error then; the\n * reader doesn't log, so the failure is recorded here before rethrowing.\n */\nexport const submitSubscriptionForm: WebPopupFormSubmitHandler = async (formCode, payload) => {\n try {\n const response = await fetch(formUrl(formCode, '/submit'), {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n // userId mirrors the hosted widget's convention: same as the email.\n body: JSON.stringify({ ...payload, userId: payload.email }),\n });\n if (!response.ok) {\n throw new Error(`Subscription form submit failed: HTTP ${response.status}`);\n }\n const data = await response.json() as { result?: string };\n const result = SUBMIT_RESULTS[data.result ?? ''];\n if (!result) {\n throw new Error(`Subscription form submit failed: unexpected result \"${data.result}\"`);\n }\n return result;\n } catch (error) {\n Logger.error(error, `Failed to submit subscription form \"${formCode}\"`);\n throw error;\n }\n};\n\n/**\n * Fire-and-forget view stat for a popup-embedded form — the denominator of\n * the form's conversion rate. Never blocks or breaks the popup itself.\n */\nexport const recordSubscriptionFormView = (formCode: string, hwid: string): void => {\n fetch(formUrl(formCode, '/view'), {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ code: formCode, userId: hwid, hwid }),\n }).catch((error) => {\n Logger.error(error, `Failed to record subscription form view for \"${formCode}\"`);\n });\n};\n","import {\n collectWebPopupFormCodes, webPopupExpired, type WebPopupColorSchemePref, type WebPopupParams,\n} from 'smart-blocks-utils';\n\nimport {\n POPUP_HOST_Z_INDEX, QUEUE_GAP_MS, WEB_POPUPS_LOG_PREFIX, WEB_POPUPS_WIDGET_NAMESPACE,\n} from './constants';\nimport { createChoiceSubmitHandler, createRatingSubmitHandler } from './deviceSubmitApi';\nimport {\n parseWebPopupContent, renderWebPopup, unmountWebPopup, type WebPopupSubmitHandlers,\n} from './renderer';\nimport { recordSubscriptionFormView } from './subscriptionFormApi';\nimport {\n type IWebPopupsPublicApi, type PageRule, type VisibleWebPopup, type WebPopup,\n type WebPopupEntry, type WebPopupHideReason, type WebPopupShowTrigger, type WebPopupsPublicState,\n} from './types';\nimport { Logger } from '../../core/logger';\nimport { type Pushwoosh } from '../../core/Pushwoosh';\n\nexport class WebPopupsWidget implements IWebPopupsPublicApi {\n private readonly pw: Pushwoosh;\n\n private isRecurringVisitor = false;\n\n /** Every popup the server returned, keyed by code. Never pruned. */\n private readonly entries = new Map<string, WebPopupEntry>();\n\n /** Codes whose delay has elapsed, waiting for the display slot. */\n private readonly queue: Array<string> = [];\n\n /** The single popup on screen, if any. */\n private visible: VisibleWebPopup | null = null;\n\n private drainTimeoutId: number | null = null;\n\n private autoShowEnabled = true;\n\n private colorScheme: WebPopupColorSchemePref = 'auto';\n\n private isNavigationSubscribed = false;\n\n private openPopupsCount = 0;\n\n private bodyOverflowBeforeLock: string | null = null;\n\n /** Built once from `pw`: the device-API side of the choice/rating slots. */\n private readonly submitHandlers: WebPopupSubmitHandlers;\n\n // Declared before readyPromise on purpose: the Promise executor runs\n // synchronously inside that field initialiser.\n private readyResolve!: () => void;\n\n private readonly readyPromise = new Promise<void>((resolve) => {\n this.readyResolve = resolve;\n });\n\n constructor(pw: Pushwoosh) {\n this.pw = pw;\n this.submitHandlers = {\n onSubmitChoice: createChoiceSubmitHandler(pw),\n onSubmitRating: createRatingSubmitHandler(pw),\n };\n\n // Registered before run() so a site can call show() from its very first\n // Pushwoosh.push() callback; every public method awaits readyPromise.\n pw.moduleRegistry.webPopups = this;\n }\n\n public async run(): Promise<void> {\n const { pw } = this;\n\n try {\n this.autoShowEnabled = pw.initParams.webPopups?.autoShow !== false;\n this.colorScheme = pw.initParams.webPopups?.colorScheme ?? 'auto';\n\n // Nothing to show, so nothing to register a device for. Absent feature\n // (older backend) keeps the previous behaviour; `finally` still runs.\n const features = await pw.data.getFeatures();\n\n if (features?.['popup_forms']?.['enabled'] === false) {\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} application has no active popup forms, skipping`);\n\n return;\n }\n\n await pw.api.ensureDeviceRegistered();\n\n this.isRecurringVisitor = await pw.data.getIsRecurringVisitor();\n\n const webPopups = await pw.api.getPopupForms();\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Received ${webPopups.length} popup(s) from server:`, webPopups.map((webPopup) => webPopup.code));\n\n webPopups.forEach((popup, order) => {\n this.entries.set(popup.code, {\n popup,\n order,\n state: 'idle',\n content: null,\n loading: null,\n passedStrongConditions: false,\n timeoutId: null,\n visitRecorded: false,\n });\n });\n\n // Strong conditions gate AUTOMATIC display only — they are recorded, not\n // used as a load gate. Content is prefetched for every popup targeted at\n // this visitor, including trigger_type=API ones, so show() is instant;\n // popups that failed a strong condition are fetched lazily by show().\n await Promise.allSettled(Array.from(this.entries.values()).map(async (entry) => {\n entry.passedStrongConditions = await this.checkStrongCondition(entry.popup);\n if (entry.passedStrongConditions) {\n await this.ensureContent(entry);\n }\n }));\n\n const loaded = this.loadedCodes();\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} ${loaded.length} popup(s) passed strong conditions and loaded:`, loaded);\n\n this.subscribeToNavigation();\n this.renderForCurrentPage();\n\n await pw.data.setIsRecurringVisitor(true);\n } finally {\n // show() must never hang, even if run() blew up half way.\n this.readyResolve();\n pw.dispatchEvent('web-popups-ready', {});\n }\n }\n\n /* ------------------------------------------------------------------ *\n * Public API — Pushwoosh.moduleRegistry.webPopups\n * ------------------------------------------------------------------ */\n\n /**\n * Show a popup immediately, ignoring EVERY display condition: delay, page\n * rules, device_type, visitors_type, frequency capping and trigger_type.\n * An already visible popup is closed to make room.\n *\n * Stats and frequency bookkeeping are recorded exactly as for an automatic\n * display. Never rejects: resolves false and logs the reason on failure.\n */\n public async show(code: string): Promise<boolean> {\n await this.readyPromise;\n\n const entry = this.entries.get(code);\n if (!entry) {\n Logger.error(new Error('Unknown web popup code'), `${WEB_POPUPS_LOG_PREFIX} show(\"${code}\"): no such popup`);\n return false;\n }\n\n if (this.visible?.code === code) {\n return true;\n }\n\n // Awaited BEFORE preempting so close() and present() run in the same task:\n // otherwise the browser paints the moment between two modal popups with the\n // body scroll lock released.\n const content = await this.ensureContent(entry);\n if (!content) {\n Logger.error(new Error('Web popup content unavailable'), `${WEB_POPUPS_LOG_PREFIX} show(\"${code}\"): content unavailable`);\n return false;\n }\n\n // The automatic pipeline may have shown this very popup while we awaited;\n // re-presenting it would double-count the impression.\n if (this.visible?.code === code) {\n return true;\n }\n\n // show() deliberately ignores the page rules — but not an expired\n // countdown: the offer is over however the popup was triggered.\n if (!this.checkNotExpired(entry)) {\n return false;\n }\n\n if (this.visible) {\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} show(\"${code}\") preempting \"${this.visible.code}\"`);\n // The preempted popup is finished with, not requeued: it already recorded\n // its impression and did its frequency bookkeeping.\n this.visible.close('preempted');\n }\n\n // Drop this popup's own armed timer / queue slot so the automatic pipeline\n // does not show it a second time.\n this.detachFromAutoPipeline(entry);\n\n this.present(entry, 'api');\n return true;\n }\n\n /**\n * Hide the visible popup, optionally only if it is the given one.\n * Returns false when nothing was hidden.\n */\n public hide(code?: string): boolean {\n if (!this.visible) {\n return false;\n }\n\n if (code !== undefined && this.visible.code !== code) {\n return false;\n }\n\n this.visible.close('api');\n return true;\n }\n\n /**\n * Hide the visible popup and dismiss everything still pending for this page\n * load. show() keeps working afterwards.\n */\n public hideAll(): boolean {\n const hadVisible = this.hide();\n\n this.entries.forEach((entry) => {\n if (entry.state !== 'waiting' && entry.state !== 'queued') {\n return;\n }\n\n this.detachFromAutoPipeline(entry);\n entry.state = 'done';\n });\n\n // After hide(), whose close() arms a drain for the next queued popup.\n this.cancelScheduledDrain();\n\n return hadVisible;\n }\n\n public isVisible(code?: string): boolean {\n if (!this.visible) {\n return false;\n }\n\n return code === undefined || this.visible.code === code;\n }\n\n public getVisibleCode(): string | null {\n return this.visible?.code ?? null;\n }\n\n public getAvailableCodes(): Array<string> {\n return Array.from(this.entries.keys());\n }\n\n public getState(): WebPopupsPublicState {\n const waiting: Array<string> = [];\n this.entries.forEach((entry, code) => {\n if (entry.state === 'waiting') {\n waiting.push(code);\n }\n });\n\n return {\n visible: this.getVisibleCode(),\n queued: [...this.queue],\n waiting,\n available: this.getAvailableCodes(),\n };\n }\n\n /* ------------------------------------------------------------------ *\n * Content loading\n * ------------------------------------------------------------------ */\n\n /**\n * Resolve the entry's renderable content, fetching it at most once. A failed\n * fetch clears the memo so a later show() can retry.\n */\n private ensureContent(entry: WebPopupEntry): Promise<WebPopupParams | null> {\n if (entry.content) {\n return Promise.resolve(entry.content);\n }\n\n if (entry.loading) {\n return entry.loading;\n }\n\n entry.loading = this.loadContent(entry.popup)\n .then((content) => {\n entry.content = content;\n return content;\n })\n .catch((error) => {\n Logger.error(error, `${WEB_POPUPS_LOG_PREFIX} Failed to load web popup \"${entry.popup.code}\"`);\n return null;\n })\n .finally(() => {\n if (!entry.content) {\n entry.loading = null;\n }\n });\n\n return entry.loading;\n }\n\n private async loadContent(webPopup: WebPopup): Promise<WebPopupParams | null> {\n const content = await this.pw.api.getPopupFormContent(webPopup.popup_form_content_code);\n const parsed = parseWebPopupContent(content.json);\n if (!parsed) {\n // Legacy / unknown format — this popup is broken and never shows.\n Logger.error(\n new Error('Unsupported popup content format'),\n `${WEB_POPUPS_LOG_PREFIX} Web popup \"${webPopup.code}\" content is not a supported {version, params} popup; skipping`,\n );\n return null;\n }\n\n return parsed;\n }\n\n private loadedCodes(): Array<string> {\n const codes: Array<string> = [];\n this.entries.forEach((entry, code) => {\n if (entry.content) {\n codes.push(code);\n }\n });\n return codes;\n }\n\n /* ------------------------------------------------------------------ *\n * Automatic display pipeline\n * ------------------------------------------------------------------ */\n\n private renderForCurrentPage(): void {\n this.releaseUnmatchedPending();\n\n const armed: Array<string> = [];\n this.entries.forEach((entry, code) => {\n if (this.canAutoDisplay(entry)) {\n this.armDelay(entry);\n armed.push(code);\n }\n });\n\n Logger.debug(\n `${WEB_POPUPS_LOG_PREFIX} ${armed.length} popup(s) selected for display on \"${window.location.pathname}\":`,\n armed,\n );\n\n // Insurance: a no-op when something is visible or nothing is queued.\n this.drain();\n }\n\n private canAutoDisplay(entry: WebPopupEntry): boolean {\n return this.autoShowEnabled\n && entry.state === 'idle'\n && entry.passedStrongConditions\n && this.isAutoTrigger(entry.popup)\n && entry.content !== null\n && this.checkSoftCondition(entry.popup)\n && this.checkNotExpired(entry);\n }\n\n private isAutoTrigger(webPopup: WebPopup): boolean {\n const trigger = webPopup.trigger_type;\n\n // Absent (older backend) or explicitly PAGE_LOAD means automatic display.\n // Any other value — including one this SDK version does not know — counts\n // as API-only, so a future trigger kind never shows itself by accident.\n return !trigger || trigger === 'PAGE_LOAD';\n }\n\n private armDelay(entry: WebPopupEntry): void {\n const { popup } = entry;\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Popup \"${popup.code}\" armed for display in ${popup.delay}s`);\n\n entry.state = 'waiting';\n this.recordVisit(entry);\n\n entry.timeoutId = window.setTimeout(() => {\n entry.timeoutId = null;\n entry.state = 'queued';\n this.insertIntoQueue(entry);\n\n Logger.debug(\n `${WEB_POPUPS_LOG_PREFIX} Popup \"${popup.code}\" delay elapsed; queued at position ${this.queue.indexOf(popup.code) + 1} of ${this.queue.length}`,\n );\n\n this.drain();\n }, popup.delay * 1000);\n }\n\n /**\n * VISIT is reported once per page load, when the popup is armed for the\n * current page — the same moment as before the queue existed.\n */\n private recordVisit(entry: WebPopupEntry): void {\n if (entry.visitRecorded) {\n return;\n }\n\n entry.visitRecorded = true;\n this.pw.api.recordPopupFormEvent(entry.popup.code, 1).catch((error) => {\n Logger.error(error, `${WEB_POPUPS_LOG_PREFIX} Failed to record web popup visit event for \"${entry.popup.code}\"`);\n });\n }\n\n /** Ordering: shorter delay first, then the order the server returned them. */\n private insertIntoQueue(entry: WebPopupEntry): void {\n const isAfter = (code: string): boolean => {\n const other = this.entries.get(code);\n if (!other) {\n return false;\n }\n\n if (other.popup.delay !== entry.popup.delay) {\n return other.popup.delay > entry.popup.delay;\n }\n\n return other.order > entry.order;\n };\n\n const index = this.queue.findIndex(isAfter);\n if (index === -1) {\n this.queue.push(entry.popup.code);\n return;\n }\n\n this.queue.splice(index, 0, entry.popup.code);\n }\n\n /**\n * Release popups whose page rules stopped matching, both the ones still\n * waiting out their delay and the ones already queued. They return to `idle`\n * and are re-armed with a full delay if the visitor comes back.\n */\n private releaseUnmatchedPending(): void {\n this.entries.forEach((entry) => {\n if (entry.state !== 'waiting' && entry.state !== 'queued') {\n return;\n }\n\n if (this.checkSoftCondition(entry.popup) && this.checkNotExpired(entry)) {\n return;\n }\n\n this.detachFromAutoPipeline(entry);\n entry.state = 'idle';\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Released popup \"${entry.popup.code}\": page no longer matches, or its countdown passed`);\n });\n }\n\n /** Clear an entry's armed timer and queue slot, leaving its state to the caller. */\n private detachFromAutoPipeline(entry: WebPopupEntry): void {\n if (entry.timeoutId !== null) {\n window.clearTimeout(entry.timeoutId);\n entry.timeoutId = null;\n }\n\n const index = this.queue.indexOf(entry.popup.code);\n if (index !== -1) {\n this.queue.splice(index, 1);\n }\n }\n\n /** Show the head of the queue if the display slot is free. */\n private drain(): void {\n if (this.visible || this.drainTimeoutId !== null) {\n return;\n }\n\n const code = this.queue.shift();\n if (code === undefined) {\n return;\n }\n\n const entry = this.entries.get(code);\n if (!entry || entry.state !== 'queued') {\n this.drain();\n return;\n }\n\n // The page may have changed — and the deadline may have passed — between\n // enqueue and the slot freeing up.\n if (!this.checkSoftCondition(entry.popup) || !this.checkNotExpired(entry)) {\n entry.state = 'idle';\n this.drain();\n return;\n }\n\n if (!entry.content) {\n entry.state = 'done';\n this.drain();\n return;\n }\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Display slot free; showing \"${code}\"`);\n this.present(entry, 'auto');\n }\n\n private scheduleDrain(): void {\n if (this.drainTimeoutId !== null) {\n return;\n }\n\n this.drainTimeoutId = window.setTimeout(() => {\n this.drainTimeoutId = null;\n this.drain();\n }, QUEUE_GAP_MS);\n }\n\n private cancelScheduledDrain(): void {\n if (this.drainTimeoutId === null) {\n return;\n }\n\n window.clearTimeout(this.drainTimeoutId);\n this.drainTimeoutId = null;\n }\n\n /* ------------------------------------------------------------------ *\n * Rendering\n * ------------------------------------------------------------------ */\n\n private present(entry: WebPopupEntry, trigger: WebPopupShowTrigger): void {\n // A drain armed by the popup we are replacing must not fire behind us.\n this.cancelScheduledDrain();\n\n const { popup, content } = entry;\n if (!content) {\n entry.state = 'done';\n return;\n }\n\n // The host is pointer-transparent: the reader's overlay / popup box\n // re-enable pointer events themselves, so a corner banner without a\n // dim never blocks the page underneath.\n const host = document.createElement('div');\n host.id = `${WEB_POPUPS_WIDGET_NAMESPACE}-${popup.code}`;\n host.style.position = 'fixed';\n host.style.inset = '0';\n host.style.zIndex = String(POPUP_HOST_Z_INDEX);\n host.style.pointerEvents = 'none';\n document.body.appendChild(host);\n\n const shadow = host.attachShadow({ mode: 'open' });\n const container = document.createElement('div');\n shadow.appendChild(container);\n\n // Only a dimmed (modal) popup locks the page scroll; banners and bars\n // leave the page usable.\n const modal = !!content.overlay;\n if (modal) {\n this.lockBodyScroll();\n }\n\n let closed = false;\n const close = (reason: WebPopupHideReason): void => {\n // Idempotent: the reader's overlay click and hide() can race.\n if (closed) {\n return;\n }\n closed = true;\n\n if (modal) {\n this.unlockBodyScroll();\n }\n\n unmountWebPopup(container);\n host.remove();\n\n if (this.visible?.code === popup.code) {\n this.visible = null;\n }\n entry.state = 'done';\n\n this.pw.dispatchEvent('hide-web-popup', { code: popup.code, reason });\n this.scheduleDrain();\n };\n\n this.visible = {\n code: popup.code, host, modal, close,\n };\n entry.state = 'visible';\n\n // The reader draws the whole chrome (overlay that closes on click,\n // placement, animation, the close button and close-action buttons).\n renderWebPopup(container, content, () => close('user'), this.submitHandlers, this.colorScheme);\n\n // Embedded email-subscription forms count a view per showing — the\n // denominator of the form's conversion stats.\n const formCodes = collectWebPopupFormCodes(content);\n if (formCodes.length > 0) {\n this.pw.data.getHwid()\n .then((hwid) => formCodes.forEach((formCode) => recordSubscriptionFormView(formCode, hwid)))\n .catch((error) => {\n Logger.error(error, `${WEB_POPUPS_LOG_PREFIX} Failed to record subscription form views for web popup \"${popup.code}\"`);\n });\n }\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Popup \"${popup.code}\" shown (trigger: ${trigger})`);\n\n // A no-op on the automatic path, where the visit was recorded at arm time.\n this.recordVisit(entry);\n this.markAsShown(popup).catch((error) => {\n Logger.error(error, `${WEB_POPUPS_LOG_PREFIX} Failed to mark web popup \"${popup.code}\" as shown`);\n });\n this.pw.dispatchEvent('show-web-popup', { code: popup.code, trigger });\n }\n\n /* ------------------------------------------------------------------ *\n * Scroll lock\n * ------------------------------------------------------------------ */\n\n private lockBodyScroll(): void {\n if (this.openPopupsCount === 0) {\n this.bodyOverflowBeforeLock = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n this.openPopupsCount += 1;\n }\n\n private unlockBodyScroll(): void {\n this.openPopupsCount = Math.max(0, this.openPopupsCount - 1);\n if (this.openPopupsCount === 0 && this.bodyOverflowBeforeLock !== null) {\n document.body.style.overflow = this.bodyOverflowBeforeLock;\n this.bodyOverflowBeforeLock = null;\n }\n }\n\n /* ------------------------------------------------------------------ *\n * Conditions\n * ------------------------------------------------------------------ */\n\n private subscribeToNavigation(): void {\n if (this.isNavigationSubscribed) {\n return;\n }\n\n this.isNavigationSubscribed = true;\n\n const onNavigate = (): void => this.renderForCurrentPage();\n\n const nav = (window as Window & { navigation?: EventTarget }).navigation;\n if (nav && typeof nav.addEventListener === 'function') {\n nav.addEventListener('currententrychange', onNavigate);\n return;\n }\n\n window.addEventListener('popstate', onNavigate);\n window.addEventListener('hashchange', onNavigate);\n\n // Programmatic pushState/replaceState fires no event; poll location instead\n // of monkey-patching history so SPA routers stay untouched.\n let lastHref = window.location.href;\n window.setInterval(() => {\n if (window.location.href !== lastHref) {\n lastHref = window.location.href;\n onNavigate();\n }\n }, 500);\n }\n\n private async checkStrongCondition(webPopup: WebPopup): Promise<boolean> {\n const conditions: Array<boolean> = await Promise.all([\n this.checkCanBeShownByDeviceTypeCondition(webPopup),\n this.checkCanBeShownByFrequencyCondition(webPopup),\n this.checkCanBeShownByVisitorsTypeCondition(webPopup),\n ]);\n\n return conditions.every((condition) => condition);\n }\n\n private checkSoftCondition(webPopup: WebPopup): boolean {\n return this.checkCanBeShownByMatchingPagesCondition(webPopup);\n }\n\n // A popup with a run-out 'hide-popup' countdown must not be shown at all —\n // asked HERE, at SHOW time, because a render already costs the impression.\n private checkNotExpired(entry: WebPopupEntry): boolean {\n if (!entry.content) {\n return true;\n }\n\n if (!webPopupExpired(entry.content, Date.now())) {\n return true;\n }\n\n Logger.debug(`${WEB_POPUPS_LOG_PREFIX} Popup \"${entry.popup.code}\" not shown: its countdown has passed`);\n return false;\n }\n\n private checkCanBeShownByDeviceTypeCondition(webPopup: WebPopup): boolean {\n const { device_type: deviceType } = webPopup;\n\n const formFactor = this.pw.platformChecker.formFactor;\n if (deviceType === 'ALL') {\n return true;\n }\n\n return deviceType === formFactor;\n }\n\n private async checkCanBeShownByFrequencyCondition(webPopup: WebPopup): Promise<boolean> {\n const { frequency, code } = webPopup;\n\n if (frequency === 'ONCE') {\n const shown = await this.pw.data.getShownWebPopups();\n return !shown.includes(code);\n }\n\n if (frequency === 'ONCE_PER_SESSION') {\n return sessionStorage.getItem(this.getSessionStorageKey(code)) === null;\n }\n\n return true;\n }\n\n private checkCanBeShownByMatchingPagesCondition(webPopup: WebPopup): boolean {\n const { matching_pages: matchingPages, matching_page_rules: matchingPageRules, excluded_pages: excludedPages } = webPopup;\n const path = window.location.pathname;\n\n // \"Specified pages\": operator-aware rules preferred, legacy exact list as fallback.\n if (matchingPageRules && matchingPageRules.length > 0) {\n return matchingPageRules.some((rule) => this.matchPageRule(path, rule));\n }\n\n if (matchingPages && matchingPages.length > 0) {\n return matchingPages.includes(path);\n }\n\n if (excludedPages && excludedPages.length > 0) {\n return !excludedPages.some((rule) => this.matchPageRule(path, rule));\n }\n\n return true;\n }\n\n private matchPageRule(path: string, rule: PageRule): boolean {\n switch (rule.operator) {\n case 'EQUALS':\n return path === rule.path;\n case 'STARTS_WITH':\n return path.startsWith(rule.path);\n default:\n // Unknown operator: skip the rule (fail-open) rather than hide/crash.\n return false;\n }\n }\n\n private checkCanBeShownByVisitorsTypeCondition(webPopup: WebPopup): boolean {\n const { visitors_type: visitorsType } = webPopup;\n\n if (visitorsType === 'NEW') {\n return !this.isRecurringVisitor;\n }\n\n if (visitorsType === 'RECURRING') {\n return this.isRecurringVisitor;\n }\n\n return true;\n }\n\n private async markAsShown(webPopup: WebPopup): Promise<void> {\n this.pw.api.recordPopupFormEvent(webPopup.code, 2).catch((error) => {\n Logger.error(error, `${WEB_POPUPS_LOG_PREFIX} Failed to record web popup shown event for \"${webPopup.code}\"`);\n });\n const { frequency, code } = webPopup;\n\n if (frequency === 'ONCE') {\n await this.pw.data.addShownWebPopup(code);\n return;\n }\n\n if (frequency === 'ONCE_PER_SESSION') {\n sessionStorage.setItem(this.getSessionStorageKey(code), '1');\n }\n }\n\n private getSessionStorageKey(code: string): string {\n return `${WEB_POPUPS_WIDGET_NAMESPACE}.shown.${code}`;\n }\n}\n","import { render } from 'preact';\nimport {\n parseWebPopupJson, resolveWebPopupPages, WebPopupReader,\n type WebPopupChoiceSubmitHandler, type WebPopupColorSchemePref, type WebPopupParams,\n type WebPopupRatingSubmitHandler,\n} from 'smart-blocks-utils';\n\nimport { submitSubscriptionForm } from './subscriptionFormApi';\n\n/** The device-API handlers, passed in rather than imported: this module renders, it doesn't know the core. */\nexport type WebPopupSubmitHandlers = {\n onSubmitChoice: WebPopupChoiceSubmitHandler;\n onSubmitRating: WebPopupRatingSubmitHandler;\n};\n\n/**\n * Parse stored popup json into the renderable model. Returns null for\n * anything that is not a supported {version: 1, params} popup with at least\n * one resolvable page — including legacy pre-engine content (no `version`\n * field), which is deliberately unrenderable.\n */\nexport const parseWebPopupContent = (json: string): WebPopupParams | null => {\n const parsed = parseWebPopupJson(json);\n if (!parsed) {\n return null;\n }\n\n if (resolveWebPopupPages(parsed.params).length === 0) {\n return null;\n }\n\n return parsed.params;\n};\n\n// Mount the popup into the shadow root; the reader draws the whole chrome and\n// owns page switching. Forms submit to their service, choice/rating via `handlers`.\nexport const renderWebPopup = (\n container: HTMLElement,\n params: WebPopupParams,\n onRequestClose: () => void,\n handlers: WebPopupSubmitHandlers,\n colorScheme: WebPopupColorSchemePref = 'auto',\n): void => {\n render(\n <WebPopupReader\n params={params}\n mode=\"live\"\n colorScheme={colorScheme}\n onRequestClose={onRequestClose}\n onSubmitForm={submitSubscriptionForm}\n onSubmitChoice={handlers.onSubmitChoice}\n onSubmitRating={handlers.onSubmitRating}\n />,\n container,\n );\n};\n\n/**\n * Unmount a popup rendered by `renderWebPopup`. Dropping the host element alone\n * leaves the tree mounted on a detached node, so component cleanup never runs —\n * harmless for a popup shown once, not harmless now that popups cycle.\n */\nexport const unmountWebPopup = (container: HTMLElement): void => {\n render(null, container);\n};\n"],"names":["root","factory","exports","module","define","amd","a","i","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","SAFE_URL_PROTOCOL","WEB_POPUP_TEXT_COLOR","WEB_POPUP_TEXT_SECONDARY_COLOR","WEB_POPUP_ON_ACCENT_COLOR","WEB_POPUP_DEFAULT_COLORS","WEB_POPUP_TEXT_VARIANT_STYLES","h1","fontSize","fontWeight","lineHeight","h2","h3","body","caption","eyebrow","letterSpacing","icon","INVERSE_TEXT_ALPHAS","webPopupTextColor","variant","colors","inverse","color","alpha","hex","exec","full","length","split","map","c","join","r","g","b","parseInt","slice","inverseColorAt","textInverse","textSecondary","text","HEADING_VARIANTS","webPopupSlotRole","slot","type","includes","WEB_POPUP_BUTTON_SLOT_PADDING","webPopupButtonPillStyle","display","boxSizing","width","padding","borderRadius","fontFamily","textAlign","textDecoration","cursor","backgroundColor","surface","accent","border","onAccent","webPopupFormInputStyle","borderColor","surfaceText","outline","WEB_POPUP_FORM_DEFAULTS","WEB_POPUP_CHOICE_DEFAULTS","WEB_POPUP_RATING_DEFAULTS","WEB_POPUP_RETRY_ERROR","WEB_POPUP_KEYFRAMES","WEB_POPUP_GLYPH_PATHS","bell","gift","cart","chart","lock","calendar","check","star","clock","tag","mail","phone","download","play","shield","sparkle","percent","truck","ticket","user","WEB_POPUP_GLYPH_NAMES","keys","WEB_POPUP_GLYPH_SIZES","CONTAINER_TYPES","ORDERS","ALIGN_ITEMS","JUSTIFY_CONTENT","TEXT_ALIGNS","TONES","MAX_LENGTH_PX","LENGTH_UNIT_MAX","px","em","rem","LENGTH_PATTERN","TRACK_UNIT_MAX","fr","TRACK_PATTERN","TRACK_KEYWORDS","oneOf","allowed","undefined","cssLength","Number","isFinite","Math","min","max","match","trim","amount","unit","parseFloat","BOX_SIDES","trackSize","token","nonEmptyString","containerProps","raw","props","gap","whole","sides","side","sideValue","boxPadding","alignItems","justifyContent","alignContent","backgroundImage","sizes","isInteger","tokens","clamped","every","trackSizes","normalizeNode","depth","budget","nodes","node","content","out","align","tone","image","Array","isArray","children","child","normalized","push","order","reverse","normalizeWebPopupLayout","WEB_POPUP_VALUE_KEY_PATTERN","VALUE_REF_PATTERN","substituteString","values","substituteWebPopupLayoutValues","layout","substituteNode","BINDING_PROPS","Set","entries","has","webPopupCssLength","webPopupTracksValue","childCount","webPopupScrimGradient","dim","scrim","webPopupBackgroundImageStyle","src","JSON","stringify","backgroundSize","backgroundPosition","webPopupContainerStyle","backgroundSrc","backgroundDim","style","minWidth","gridAutoFlow","gridTemplateColumns","gridTemplateRows","top","right","bottom","left","webPopupPaddingValue","assign","HEX_RE","parseHex","toHex","v","round","toString","padStart","hueToChannel","p","q","t","tn","foldLightness","l","liftLightness","webPopupShiftColor","direction","rgb","h","s","rn","gn","bn","d","rgbToHsl","hslToRgb","webPopupMixColor","base","over","ratio","webPopupColorAlpha","isLightColor","autoDarkWebPopupColors","light","background","derivedColors","scheme","error","chromeIcon","webPopupDarkEnabled","chrome","dark","enabled","webPopupEffectiveScheme","resolveWebPopupColors","effective","webPopupImageSrc","srcDark","resolveWebPopupBoxChrome","overlay","boxShadow","WALL_CLOCK","zoneFormatters","Map","zoneFormatter","timeZone","cached","formatter","Intl","DateTimeFormat","hour12","year","month","day","hour","minute","second","set","webPopupTimeZoneSupported","timezone","zoneOffsetMs","instantMs","parts","formatToParts","Date","read","find","part","UTC","DAY_MS","deadlines","webPopupWallClockMs","endTime","cacheKey","resolved","rawSecond","isNaN","wallAsUtc","rolled","getUTCMonth","getUTCDate","offsets","probe","offset","candidateOffsets","instants","filter","resolveWallClockMs","size","clear","TIMER_LABELS","en","days","hours","minutes","seconds","ru","de","es","pt","ja","ko","zh","hi","ar","he","th","safeUrl","url","trimmed","startsWith","test","webPopupLinkTargetAttrs","target","rel","SANITIZE_ALLOWED_TAGS","copySanitized","from","to","doc","childNodes","nodeType","appendChild","createTextNode","textContent","el","tagName","clean","createElement","toLowerCase","href","getAttribute","setAttribute","sanitizeWebPopupHtml","html","parsed","DOMParser","parseFromString","innerHTML","colorString","normalizeWebPopupDark","params","authored","auto","opacity","normalizeOverlay","parseWebPopupJson","json","parse","candidate","version","pages","normalizeWebPopupColors","IMAGE_FITS","normalizeVideo","video","controls","loop","normalizeImages","img","label","mediaId","mediaIdDark","fit","blur","LENGTH_CONTROL_UNITS","finiteNumber","normalizeValueControl","control","kind","units","u","ranges","entry","normalizeControlRanges","options","option","normalizeWebPopupValues","some","webPopupValuesMap","fromEntries","FORM_FIELD_KINDS","BUTTON_VARIANTS","normalizeFormFields","field","f","placeholder","required","unshift","CHOICE_CONTROLS","RATING_SCALES","RATING_SUBMIT_MODES","TIMER_EXPIRE_ACTIONS","LANGUAGE_CODE","HEX_COLOR","slotString","slotStringOr","fallback","normalizeLanguage","code","normalizeChoiceOptions","existing","tagValue","normalizeChoiceBounds","bound","n","floor","normalizeSlots","zone","expirePage","onExpire","expires","language","showLabels","submitLabel","submitVariant","successMessage","labels","scale","low","high","submitMode","eventName","formCode","fields","privacy","checkboxLabel","linkLabel","confirmEmailMessage","name","action","normalizeContents","slots","validSize","resolveWebPopupPageSize","own","shared","axis","resolveWebPopupPages","page","height","images","contents","placementMaxSize","placement","WEB_POPUPS_WIDGET_NAMESPACE","WEB_POPUPS_LOG_PREFIX","STORE_NAME_KEY_VALUE","STORE_NAME_MESSAGE_LOG","STORE_NAME_INBOX_MESSAGES","storeCreatorDecorator","storeCreator","database","objectStoreNames","contains","initial","createObjectStore","keyPath","logStore","autoIncrement","createIndex","unique","statusIndex","store","multiEntry","Migrations","all","MigrationExecutor","constructor","db","migrationsBuilder","applyMigrations","applyMigrationsPack","migrationsPack","forEach","migration","onversionchange","event","console","info","close","databasePromise","getInstanceWithPromise","executor","Promise","resolve","reject","request","indexedDB","open","onsuccess","result","bind","onerror","onupgradeneeded","then","LogBase","_add","transaction","objectStore","add","getAll","items","ids","id","sort","maxItems","delete","openCursor","ev","cursorResult","continue","log","environment","self","registration","message","additional","date","Error","stack","levels","debug","limitLevel","Logger","setLevel","level","write","createChoiceSubmitHandler","pw","async","slotKey","api","setTags","operation","createRatingSubmitHandler","score","postEvent","levelName","levelNumber","args","groupCollapsed","trace","groupEnd","preact_module_l","e","y","w","_","m","parentNode","removeChild","k","arguments","defaultProps","x","ref","__k","__","__b","__e","__c","__v","__i","__u","vnode","S","C","context","$","I","__P","__d","__n","namespaceURI","D","P","A","H","__r","debounceRendering","shift","L","T","J","j","nextSibling","String","O","K","insertBefore","F","z","setProperty","N","cssText","replace","addEventListener","removeEventListener","removeAttribute","V","M","render","contextType","__E","Q","sub","state","__h","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","apply","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","E","indexOf","B","G","diffed","localName","document","createElementNS","is","__m","data","defaultValue","attributes","__html","current","unmount","componentWillUnmount","R","documentElement","firstChild","U","W","getDerivedStateFromError","setState","componentDidCatch","forceUpdate","setTimeout","random","jsxRuntime_module_f","jsxRuntime_module_u","__source","__self","hooks_module_t","hooks_module_r","hooks_module_u","hooks_module_i","hooks_module_o","hooks_module_f","hooks_module_c","hooks_module_e","hooks_module_a","hooks_module_v","hooks_module_l","hooks_module_m","hooks_module_p","hooks_module_s","__H","hooks_module_d","hooks_module_y","hooks_module_D","__N","__f","hooks_module_h","hooks_module_C","hooks_module_","hooks_module_A","hooks_module_T","hooks_module_F","concat","hooks_module_q","hooks_module_x","hooks_module_P","useDebugValue","hooks_module_g","hooks_module_j","hooks_module_z","hooks_module_B","requestAnimationFrame","hooks_module_w","hooks_module_k","clearTimeout","cancelAnimationFrame","compat_module_g","compat_module_E","compat_module_C","compat_module_R","compat_module_x","compat_module_w","compat_module_k","compat_module_I","compat_module_M","isPureReactComponent","compat_module_T","compat_module_A","for","compat_module_F","compat_module_L","count","only","toArray","compat_module_O","compat_module_U","compat_module_V","compat_module_W","compat_module_P","compat_module_j","__a","compat_module_B","__z","__R","__O","pop","compat_module_H","revealOrder","Z","Y","splice","compat_module_q","compat_module_G","compat_module_J","compat_module_K","compat_module_Q","compat_module_X","isReactComponent","configurable","writable","persist","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","nativeEvent","un","class","on","multiple","selected","className","$$typeof","ln","fn","an","ReactCurrentDispatcher","readContext","useCallback","useContext","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useSyncExternalStore","useTransition","hn","startTransition","Children","hydrate","unmountComponentAtNode","createPortal","containerInfo","createContext","Provider","__l","Consumer","createFactory","cloneElement","createRef","Fragment","isValidElement","isElement","isFragment","isMemo","displayName","findDOMNode","Component","PureComponent","memo","forwardRef","flushSync","unstable_batchedUpdates","StrictMode","Suspense","SuspenseList","lazy","default","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ANIMATION_STYLE","none","fade","slide","TextSlotView","dangerouslySetInnerHTML","ButtonSlotView","onRequestClose","onPageChange","pill","wrapper","onClick","SlotMessageView","FORM_EMAIL_PATTERN","FORM_INPUT_TYPES","email","FORM_AUTOCOMPLETE","firstName","lastName","PRIVACY_ERROR_KEY","FormSlotView","onSubmitForm","setValues","policyAccepted","setPolicyAccepted","focusedKey","setFocusedKey","errors","setErrors","phase","setPhase","captionColor","captionStyle","errorStyle","paddingTop","submitting","privacyHref","noValidate","margin","onSubmit","preventDefault","found","payload","customFields","submit","paddingBottom","autoComplete","disabled","onFocus","onBlur","onChange","setFieldValue","currentTarget","prev","checked","flexShrink","TimerCell","digitStyle","labelStyle","TimerSlotView","mode","nowMs","setNowMs","now","remaining","deadline","total","webPopupTimerRemaining","expired","setInterval","clearInterval","digitColor","labelColor","fontVariantNumeric","cells","cell","ChoiceSlotView","onSubmitChoice","picked","setPicked","notice","setNotice","toggle","textColor","optionStyle","flexWrap","accentColor","RatingButton","onPick","thumbs","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","transform","RatingSlotView","onSubmitRating","setScore","send","scores","edgeLabelStyle","isSelected","pick","GlyphSlotView","WebPopupSlotView","pageChange","ContentNodeView","leaf","renderZone","index","previous","marginTop","next","mediaVideoSrc","MediaVideo","poster","autoPlay","muted","playsInline","preload","ImageNodeView","renderImage","objectFit","alt","LayeredBackgroundBox","outer","inner","layer","rest","LayoutNodeView","bgKey","bgVideo","bgSrc","position","overflow","inset","backdropFilter","WebkitBackdropFilter","WebPopupBox","colorScheme","leafRenderers","animatePage","box","transition","overflowY","pageStyle","animation","minHeight","CloseButton","fixedContainerStyle","maxWidth","maxHeight","pointerEvents","tx","ty","anim","DARK_MEDIA_QUERY","useColorScheme","pref","watch","setDark","window","matchMedia","matches","media","WebPopupReader","pageKey","setPageKey","Image","startPage","startPageOf","SUBMIT_RESULTS","SUBMIT_FORM_RESULT_SUBSCRIBED","SUBMIT_FORM_RESULT_CONFIRM_EMAIL","SUBMIT_FORM_RESULT_ALREADY_SUBSCRIBED","formUrl","encodeURIComponent","submitSubscriptionForm","response","fetch","method","headers","userId","ok","status","WebPopupsWidget","isRecurringVisitor","queue","visible","drainTimeoutId","autoShowEnabled","isNavigationSubscribed","openPopupsCount","bodyOverflowBeforeLock","readyPromise","readyResolve","submitHandlers","moduleRegistry","webPopups","run","initParams","autoShow","features","getFeatures","ensureDeviceRegistered","getIsRecurringVisitor","getPopupForms","webPopup","popup","loading","passedStrongConditions","timeoutId","visitRecorded","allSettled","checkStrongCondition","ensureContent","loaded","loadedCodes","subscribeToNavigation","renderForCurrentPage","setIsRecurringVisitor","dispatchEvent","show","checkNotExpired","detachFromAutoPipeline","present","hide","hideAll","hadVisible","cancelScheduledDrain","isVisible","getVisibleCode","getAvailableCodes","getState","waiting","queued","available","loadContent","catch","finally","parseWebPopupContent","getPopupFormContent","popup_form_content_code","codes","releaseUnmatchedPending","armed","canAutoDisplay","armDelay","location","pathname","drain","isAutoTrigger","checkSoftCondition","trigger","trigger_type","delay","recordVisit","insertIntoQueue","recordPopupFormEvent","findIndex","other","scheduleDrain","host","zIndex","shadow","attachShadow","container","modal","lockBodyScroll","closed","reason","unlockBodyScroll","unmountWebPopup","remove","handlers","renderWebPopup","formCodes","collectWebPopupFormCodes","getHwid","hwid","recordSubscriptionFormView","markAsShown","onNavigate","nav","navigation","lastHref","checkCanBeShownByDeviceTypeCondition","checkCanBeShownByFrequencyCondition","checkCanBeShownByVisitorsTypeCondition","condition","checkCanBeShownByMatchingPagesCondition","webPopupExpired","device_type","deviceType","formFactor","platformChecker","frequency","getShownWebPopups","sessionStorage","getItem","getSessionStorageKey","matching_pages","matchingPages","matching_page_rules","matchingPageRules","excluded_pages","excludedPages","path","rule","matchPageRule","operator","visitors_type","visitorsType","setItem","addShownWebPopup"],"sourceRoot":""}
|