@incodetech/welcome 1.85.0-20251106212758.0 → 1.85.0-20251106221029.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/dist/onBoarding.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`.IncodeCaptureSelfieContainer .OT_publisher{display:block}@font-face{font-family:swiper-icons;src:url(data:application/font-woff;charset=utf-8;base64,\\ d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA);font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper,swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide,swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader,.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,swiper-container:not(.swiper-watch-progress) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translateZ(0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translate3d(0,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translate(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,:host(.swiper-horizontal.swiper-rtl) .swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}:root{--react-pdf-annotation-layer: 1;--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");--input-focus-border-color: Highlight;--input-focus-outline: 1px solid Canvas;--input-unfocused-border-color: transparent;--input-disabled-border-color: transparent;--input-hover-border-color: black;--link-outline: none}@media screen and (forced-colors: active){:root{--input-focus-border-color: CanvasText;--input-unfocused-border-color: ActiveText;--input-disabled-border-color: GrayText;--input-hover-border-color: Highlight;--link-outline: 1.5px solid LinkText}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid selectedItem}.annotationLayer .linkAnnotation:hover{-webkit-backdrop-filter:invert(100%);backdrop-filter:invert(100%)}}.annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0;z-index:3}.annotationLayer[data-main-rotation="90"] .norotate{transform:rotate(270deg) translate(-100%)}.annotationLayer[data-main-rotation="180"] .norotate{transform:rotate(180deg) translate(-100%,-100%)}.annotationLayer[data-main-rotation="270"] .norotate{transform:rotate(90deg) translateY(-100%)}.annotationLayer canvas{position:absolute;width:100%;height:100%}.annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;margin:0;transform-origin:0 0}.annotationLayer .linkAnnotation{outline:var(--link-outline)}.textLayer.selecting~.annotationLayer section{pointer-events:none}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}.annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%;top:0;left:0}.annotationLayer .textWidgetAnnotation :is(input,textarea),.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .textWidgetAnnotation :is(input,textarea)[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled]{background:none;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover{border:2px solid var(--input-hover-border-color)}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover{border-radius:2px}.annotationLayer .textWidgetAnnotation :is(input,textarea):focus,.annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{background-image:none;background-color:transparent}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{height:100%;width:100%}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{position:absolute}.annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}.annotationLayer .popup{position:absolute;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}.annotationLayer .popupContent{border-top:1px solid rgba(51,51,51,1);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}.annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}.annotationLayer .highlightAnnotation,.annotationLayer .underlineAnnotation,.annotationLayer .squigglyAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .lineAnnotation svg line,.annotationLayer .squareAnnotation svg rect,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .caretAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .stampAnnotation,.annotationLayer .fileAttachmentAnnotation{cursor:pointer}.annotationLayer section svg{position:absolute;width:100%;height:100%;top:0;left:0}.annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;user-select:none;pointer-events:none}.annotationLayer .annotationTextContent span{width:100%;display:inline-block}:root{--react-pdf-text-layer: 1;--highlight-bg-color: rgba(180, 0, 170, 1);--highlight-selected-bg-color: rgba(0, 100, 0, 1)}@media screen and (forced-colors: active){:root{--highlight-bg-color: Highlight;--highlight-selected-bg-color: ButtonText}}[data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{transform:rotate(270deg) translate(-100%)}.textLayer{position:absolute;text-align:initial;top:0;right:0;bottom:0;left:0;overflow:hidden;line-height:1;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;z-index:2}.textLayer :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;margin:0;transform-origin:0 0}.textLayer span.markedContent{top:0;height:0}.textLayer .highlight{margin:-1px;padding:1px;background-color:var(--highlight-bg-color);border-radius:4px}.textLayer .highlight.appended{position:initial}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:var(--highlight-selected-bg-color)}.textLayer br::selection{background:transparent}.textLayer .endOfContent{display:block;position:absolute;top:100%;right:0;bottom:0;left:0;z-index:-1;cursor:default;-webkit-user-select:none;user-select:none}.textLayer.selecting .endOfContent{top:0}.hiddenCanvasElement{position:absolute;top:0;left:0;width:0;height:0;display:none}.list{counter-reset:countLi}.list .step{display:flex;align-items:center;font-size:14px;margin-top:12px}.list .step:first-of-type{margin-top:.25rem}.list .step-information{margin-right:8px;line-height:normal}.list img{width:35px;height:35px;margin-right:.5rem}.list .instruction-set h2{margin-top:24px!important;font-size:1rem;line-height:1.5rem;margin:0;color:#636670}.IncodeDefaultComponentContainer:has(.scroll-wrapper){position:relative;height:100%;overflow-y:auto}.finish{display:flex;height:100%;width:100%;align-items:center;justify-content:center;padding:20px;flex-direction:column}.finish-title{font-size:2rem;margin:20px 0;font-weight:700;color:#20263d;text-align:left;width:100%}.finish-subtitle{font-size:1rem;margin:20px 0;font-weight:700;color:#20263d;text-align:left;width:100%}@media only screen and (min-width: 992px){.finish-subtitle,.finish-title{text-align:center}}.IncodeDefaultComponentContainer:has(.IncodeDefaultComponentContainer.disable-full-screen){position:relative;height:100%;overflow-y:auto}html,body{height:100%}`)),document.head.appendChild(t)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
-
(function(rr,$n){typeof exports=="object"&&typeof module<"u"?$n(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],$n):(rr=typeof globalThis<"u"?globalThis:rr||self,$n(rr.OnBoarding={},rr.React,rr.ReactDOM))})(this,function(exports,React,ReactDOM){"use strict";var ix=Object.defineProperty;var W5=rr=>{throw TypeError(rr)};var sx=(rr,$n,Sr)=>$n in rr?ix(rr,$n,{enumerable:!0,configurable:!0,writable:!0,value:Sr}):rr[$n]=Sr;var Bn=(rr,$n,Sr)=>sx(rr,typeof $n!="symbol"?$n+"":$n,Sr),L9=(rr,$n,Sr)=>$n.has(rr)||W5("Cannot "+Sr);var Ht=(rr,$n,Sr)=>(L9(rr,$n,"read from private field"),Sr?Sr.call(rr):$n.get(rr)),y0=(rr,$n,Sr)=>$n.has(rr)?W5("Cannot add the same private member more than once"):$n instanceof WeakSet?$n.add(rr):$n.set(rr,Sr),C0=(rr,$n,Sr,Ua)=>(L9(rr,$n,"write to private field"),Ua?Ua.call(rr,Sr):$n.set(rr,Sr),Sr),k0=(rr,$n,Sr)=>(L9(rr,$n,"access private method"),Sr);var Qa=(rr,$n,Sr,Ua)=>({set _(Ds){C0(rr,$n,Ds,Sr)},get _(){return Ht(rr,$n,Ua)}});var $n,Sr,Ua,Ds,h2,Ku,Da,Ps,Zd,M9,ec,yo,g2,Mi,A2,tc,nc,$u,K5,Pa,$5,q5,Jd,Y5,_9,rc,x2,E2,vo,Z5,J5,e4,qu,P1,ac,Ia,L1,e3,da,bo,ic,pa,Yu,t4,M1,ni,na,Aa,_1,Ms,j1,_i,Io,F1,C2,ss,ji,k2,sc,oc,Q1,lc,os,So,V1,wo,ls,Ju,Ro,uc,To,y2,dc,pc,fa,yr,_s,v2,fc,hc,Bo,cs,js,mc,gi,Cn,t3,j9,n4,r4,n3,a4,i4,s4,F9,o4,Q9,V9,l4,Va,p2,c4,u4,U9,d4,Pu,H9,ha,us,Fi,H1,ds,ri,G1,ps,Ha,Fs,b2,fs,Oo,Qi,Lu,r3,I2,Vi,Vr,z1,S2,xa,w2,No,gc,R2,Do,Ac,T2,Qs,hs,W1,X1,Ai,xc,ed,ar,G9,Ec,z9,W9,p4,f4,X9,K9,$9,h4,q9,m4,g4,A4,Y9,Mu,B2,O2,ma,td,x4,Cc,K1,kc,N2,D2,ms,Vs,Sa,nd,P2,bn,Na,Xl,Kl,a3,$l,E4,Z9,ql,_u,ju,J9,Fu,Po,ep,tp,yc,vc,$1,xi,C4,k4,y4,i3,L2,bc,Ic,Sc,wc,q1,Lo,vr,Y1,Z1,Rc,np,Mp,Mo,Ga,Tc,Bc,M2,Us,Oc,Nc,_2,J1,el,_o,tl,Dc,nl,j2,Pc,Lc,Xr,F2,Q2,Mc,jo,rl,Hs,b4,I4,rp,ai,s3,ap,S4,w4,ad,Fo,Gs,Ei,Yl,o3,zs,od,ld,V2,U2,al,l3,il,c3,Ws,gs,sl,ol,As,H2,Qu,Ui,_c,sp,Qo,Vo,G2,W2,ll,cl,jc,lp,ii,B1,R4,T4,ul,cd,ud,dl,X2,Kr,Xs,pl,Fc,Qc,fl,Ks,Hi,$s,Vc,qs,Uc,K2,$2,wr,u3,cp,B4,O4,N4,D4,d3,p3,up,Hc,Gc,zc,Wc,Xc,Kc,$c,dp,qc,q2,Y2,Yc,Z2,P4,pp,_p,Gi,si,Zc,J2,oi,ea,L4,M4,_4,f3,Ys,h3,m3,j4,hp,F4,li,zi,hl,ml,xs,lr,e1,t1,Jc,eu,gl,Al,Uo,tu,dd,pd,ra,Vu,Q4,U4,H4,G4,z4,W4,xl,n1,Js,nu,ci,ru,Yr,za,Uu,Hu,X4,au,Ho,Wi,Ma,K4,g3,$4,q4,mp,iu,El,Xi,r1,Cl,aa,su,kl,ou,lu,Go,Ki,yl,cu,Rr,gp,Ap,xp,O1,Y4,f2,vl,uu,eo,a1,bl,Ci,du,pu,i1,$i,wa,Xa,Il,to,ia,Sl,ki,fu,Yn,Ep,A3,Z4,J4,eh,Cp,N1,yi,Zl,th,x3,Gu,nh,rh,ah,ih,sh,s1,o1,Es,no,vi,l1,c1,u1,ro,wl,d1,p1,zo,xn,oh,lh,ch,uh,kp,dh,yp,ph,fh,hh,mh,gh,D1,vp,bp,Ip,E3,C3,Jl,Sp,k3,ao,Ah,wp,xh,Eh,Rp,y3,zu,Hr,Ea,Wo,io,Xo,Rl,Cs,so,ks,ui,Tl,pr,Wu,Xu,b3,Tp,Ch,I3,Bp,S3,kh,yh,f1,Bl,ys,Ko,oo,di,$o,Ol,Nl,Ra,lo,_n,qo,Ca,bh,Op,Np,Dp,w3,vs,mu,ta,co,gu,Pp,h1,Lp,Ih;function _interopNamespaceDefault(Le){const Be=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(Le){for(const Ye in Le)if(Ye!=="default"){const tt=Object.getOwnPropertyDescriptor(Le,Ye);Object.defineProperty(Be,Ye,tt.get?tt:{enumerable:!0,get:()=>Le[Ye]})}}return Be.default=Le,Object.freeze(Be)}function _mergeNamespaces(Le,Be){for(var Ye=0;Ye<Be.length;Ye++){const tt=Be[Ye];if(typeof tt!="string"&&!Array.isArray(tt)){for(const nt in tt)if(nt!=="default"&&!(nt in Le)){const ft=Object.getOwnPropertyDescriptor(tt,nt);ft&&Object.defineProperty(Le,nt,ft.get?ft:{enumerable:!0,get:()=>tt[nt]})}}}return Object.freeze(Object.defineProperty(Le,Symbol.toStringTag,{value:"Module"}))}const React__namespace=_interopNamespaceDefault(React),ReactDOM__namespace=_interopNamespaceDefault(ReactDOM);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(Le){return Le&&Le.__esModule&&Object.prototype.hasOwnProperty.call(Le,"default")?Le.default:Le}function getAugmentedNamespace(Le){if(Le.__esModule)return Le;var Be=Le.default;if(typeof Be=="function"){var Ye=function tt(){return this instanceof tt?Reflect.construct(Be,arguments,this.constructor):Be.apply(this,arguments)};Ye.prototype=Be.prototype}else Ye={};return Object.defineProperty(Ye,"__esModule",{value:!0}),Object.keys(Le).forEach(function(tt){var nt=Object.getOwnPropertyDescriptor(Le,tt);Object.defineProperty(Ye,tt,nt.get?nt:{enumerable:!0,get:function(){return Le[tt]}})}),Ye}var dayjs_min={exports:{}};(function(Le,Be){(function(Ye,tt){Le.exports=tt()})(commonjsGlobal,function(){var Ye=1e3,tt=6e4,nt=36e5,ft="millisecond",ht="second",gt="minute",At="hour",xt="day",Et="week",kt="month",Ct="quarter",yt="year",vt="date",bt="Invalid Date",It=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,wt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Rt={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Mt){var Xt=["th","st","nd","rd"],Qt=Mt%100;return"["+Mt+(Xt[(Qt-20)%10]||Xt[Qt]||Xt[0])+"]"}},Tt=function(Mt,Xt,Qt){var jt=String(Mt);return!jt||jt.length>=Xt?Mt:""+Array(Xt+1-jt.length).join(Qt)+Mt},Bt={s:Tt,z:function(Mt){var Xt=-Mt.utcOffset(),Qt=Math.abs(Xt),jt=Math.floor(Qt/60),Gt=Qt%60;return(Xt<=0?"+":"-")+Tt(jt,2,"0")+":"+Tt(Gt,2,"0")},m:function Mt(Xt,Qt){if(Xt.date()<Qt.date())return-Mt(Qt,Xt);var jt=12*(Qt.year()-Xt.year())+(Qt.month()-Xt.month()),Gt=Xt.clone().add(jt,kt),qt=Qt-Gt<0,zt=Xt.clone().add(jt+(qt?-1:1),kt);return+(-(jt+(Qt-Gt)/(qt?Gt-zt:zt-Gt))||0)},a:function(Mt){return Mt<0?Math.ceil(Mt)||0:Math.floor(Mt)},p:function(Mt){return{M:kt,y:yt,w:Et,d:xt,D:vt,h:At,m:gt,s:ht,ms:ft,Q:Ct}[Mt]||String(Mt||"").toLowerCase().replace(/s$/,"")},u:function(Mt){return Mt===void 0}},Dt="en",Pt={};Pt[Dt]=Rt;var Nt="$isDayjsObject",Lt=function(Mt){return Mt instanceof Ut||!(!Mt||!Mt[Nt])},Wt=function Mt(Xt,Qt,jt){var Gt;if(!Xt)return Dt;if(typeof Xt=="string"){var qt=Xt.toLowerCase();Pt[qt]&&(Gt=qt),Qt&&(Pt[qt]=Qt,Gt=qt);var zt=Xt.split("-");if(!Gt&&zt.length>1)return Mt(zt[0])}else{var e0=Xt.name;Pt[e0]=Xt,Gt=e0}return!jt&&Gt&&(Dt=Gt),Gt||!jt&&Dt},Kt=function(Mt,Xt){if(Lt(Mt))return Mt.clone();var Qt=typeof Xt=="object"?Xt:{};return Qt.date=Mt,Qt.args=arguments,new Ut(Qt)},$t=Bt;$t.l=Wt,$t.i=Lt,$t.w=function(Mt,Xt){return Kt(Mt,{locale:Xt.$L,utc:Xt.$u,x:Xt.$x,$offset:Xt.$offset})};var Ut=function(){function Mt(Qt){this.$L=Wt(Qt.locale,null,!0),this.parse(Qt),this.$x=this.$x||Qt.x||{},this[Nt]=!0}var Xt=Mt.prototype;return Xt.parse=function(Qt){this.$d=function(jt){var Gt=jt.date,qt=jt.utc;if(Gt===null)return new Date(NaN);if($t.u(Gt))return new Date;if(Gt instanceof Date)return new Date(Gt);if(typeof Gt=="string"&&!/Z$/i.test(Gt)){var zt=Gt.match(It);if(zt){var e0=zt[2]-1||0,o0=(zt[7]||"0").substring(0,3);return qt?new Date(Date.UTC(zt[1],e0,zt[3]||1,zt[4]||0,zt[5]||0,zt[6]||0,o0)):new Date(zt[1],e0,zt[3]||1,zt[4]||0,zt[5]||0,zt[6]||0,o0)}}return new Date(Gt)}(Qt),this.init()},Xt.init=function(){var Qt=this.$d;this.$y=Qt.getFullYear(),this.$M=Qt.getMonth(),this.$D=Qt.getDate(),this.$W=Qt.getDay(),this.$H=Qt.getHours(),this.$m=Qt.getMinutes(),this.$s=Qt.getSeconds(),this.$ms=Qt.getMilliseconds()},Xt.$utils=function(){return $t},Xt.isValid=function(){return this.$d.toString()!==bt},Xt.isSame=function(Qt,jt){var Gt=Kt(Qt);return this.startOf(jt)<=Gt&&Gt<=this.endOf(jt)},Xt.isAfter=function(Qt,jt){return Kt(Qt)<this.startOf(jt)},Xt.isBefore=function(Qt,jt){return this.endOf(jt)<Kt(Qt)},Xt.$g=function(Qt,jt,Gt){return $t.u(Qt)?this[jt]:this.set(Gt,Qt)},Xt.unix=function(){return Math.floor(this.valueOf()/1e3)},Xt.valueOf=function(){return this.$d.getTime()},Xt.startOf=function(Qt,jt){var Gt=this,qt=!!$t.u(jt)||jt,zt=$t.p(Qt),e0=function(i0,r0){var Yt=$t.w(Gt.$u?Date.UTC(Gt.$y,r0,i0):new Date(Gt.$y,r0,i0),Gt);return qt?Yt:Yt.endOf(xt)},o0=function(i0,r0){return $t.w(Gt.toDate()[i0].apply(Gt.toDate("s"),(qt?[0,0,0,0]:[23,59,59,999]).slice(r0)),Gt)},t0=this.$W,c0=this.$M,p0=this.$D,n0="set"+(this.$u?"UTC":"");switch(zt){case yt:return qt?e0(1,0):e0(31,11);case kt:return qt?e0(1,c0):e0(0,c0+1);case Et:var g0=this.$locale().weekStart||0,E0=(t0<g0?t0+7:t0)-g0;return e0(qt?p0-E0:p0+(6-E0),c0);case xt:case vt:return o0(n0+"Hours",0);case At:return o0(n0+"Minutes",1);case gt:return o0(n0+"Seconds",2);case ht:return o0(n0+"Milliseconds",3);default:return this.clone()}},Xt.endOf=function(Qt){return this.startOf(Qt,!1)},Xt.$set=function(Qt,jt){var Gt,qt=$t.p(Qt),zt="set"+(this.$u?"UTC":""),e0=(Gt={},Gt[xt]=zt+"Date",Gt[vt]=zt+"Date",Gt[kt]=zt+"Month",Gt[yt]=zt+"FullYear",Gt[At]=zt+"Hours",Gt[gt]=zt+"Minutes",Gt[ht]=zt+"Seconds",Gt[ft]=zt+"Milliseconds",Gt)[qt],o0=qt===xt?this.$D+(jt-this.$W):jt;if(qt===kt||qt===yt){var t0=this.clone().set(vt,1);t0.$d[e0](o0),t0.init(),this.$d=t0.set(vt,Math.min(this.$D,t0.daysInMonth())).$d}else e0&&this.$d[e0](o0);return this.init(),this},Xt.set=function(Qt,jt){return this.clone().$set(Qt,jt)},Xt.get=function(Qt){return this[$t.p(Qt)]()},Xt.add=function(Qt,jt){var Gt,qt=this;Qt=Number(Qt);var zt=$t.p(jt),e0=function(c0){var p0=Kt(qt);return $t.w(p0.date(p0.date()+Math.round(c0*Qt)),qt)};if(zt===kt)return this.set(kt,this.$M+Qt);if(zt===yt)return this.set(yt,this.$y+Qt);if(zt===xt)return e0(1);if(zt===Et)return e0(7);var o0=(Gt={},Gt[gt]=tt,Gt[At]=nt,Gt[ht]=Ye,Gt)[zt]||1,t0=this.$d.getTime()+Qt*o0;return $t.w(t0,this)},Xt.subtract=function(Qt,jt){return this.add(-1*Qt,jt)},Xt.format=function(Qt){var jt=this,Gt=this.$locale();if(!this.isValid())return Gt.invalidDate||bt;var qt=Qt||"YYYY-MM-DDTHH:mm:ssZ",zt=$t.z(this),e0=this.$H,o0=this.$m,t0=this.$M,c0=Gt.weekdays,p0=Gt.months,n0=Gt.meridiem,g0=function(r0,Yt,_t,Jt){return r0&&(r0[Yt]||r0(jt,qt))||_t[Yt].slice(0,Jt)},E0=function(r0){return $t.s(e0%12||12,r0,"0")},i0=n0||function(r0,Yt,_t){var Jt=r0<12?"AM":"PM";return _t?Jt.toLowerCase():Jt};return qt.replace(wt,function(r0,Yt){return Yt||function(_t){switch(_t){case"YY":return String(jt.$y).slice(-2);case"YYYY":return $t.s(jt.$y,4,"0");case"M":return t0+1;case"MM":return $t.s(t0+1,2,"0");case"MMM":return g0(Gt.monthsShort,t0,p0,3);case"MMMM":return g0(p0,t0);case"D":return jt.$D;case"DD":return $t.s(jt.$D,2,"0");case"d":return String(jt.$W);case"dd":return g0(Gt.weekdaysMin,jt.$W,c0,2);case"ddd":return g0(Gt.weekdaysShort,jt.$W,c0,3);case"dddd":return c0[jt.$W];case"H":return String(e0);case"HH":return $t.s(e0,2,"0");case"h":return E0(1);case"hh":return E0(2);case"a":return i0(e0,o0,!0);case"A":return i0(e0,o0,!1);case"m":return String(o0);case"mm":return $t.s(o0,2,"0");case"s":return String(jt.$s);case"ss":return $t.s(jt.$s,2,"0");case"SSS":return $t.s(jt.$ms,3,"0");case"Z":return zt}return null}(r0)||zt.replace(":","")})},Xt.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Xt.diff=function(Qt,jt,Gt){var qt,zt=this,e0=$t.p(jt),o0=Kt(Qt),t0=(o0.utcOffset()-this.utcOffset())*tt,c0=this-o0,p0=function(){return $t.m(zt,o0)};switch(e0){case yt:qt=p0()/12;break;case kt:qt=p0();break;case Ct:qt=p0()/3;break;case Et:qt=(c0-t0)/6048e5;break;case xt:qt=(c0-t0)/864e5;break;case At:qt=c0/nt;break;case gt:qt=c0/tt;break;case ht:qt=c0/Ye;break;default:qt=c0}return Gt?qt:$t.a(qt)},Xt.daysInMonth=function(){return this.endOf(kt).$D},Xt.$locale=function(){return Pt[this.$L]},Xt.locale=function(Qt,jt){if(!Qt)return this.$L;var Gt=this.clone(),qt=Wt(Qt,jt,!0);return qt&&(Gt.$L=qt),Gt},Xt.clone=function(){return $t.w(this.$d,this)},Xt.toDate=function(){return new Date(this.valueOf())},Xt.toJSON=function(){return this.isValid()?this.toISOString():null},Xt.toISOString=function(){return this.$d.toISOString()},Xt.toString=function(){return this.$d.toUTCString()},Mt}(),Vt=Ut.prototype;return Kt.prototype=Vt,[["$ms",ft],["$s",ht],["$m",gt],["$H",At],["$W",xt],["$M",kt],["$y",yt],["$D",vt]].forEach(function(Mt){Vt[Mt[1]]=function(Xt){return this.$g(Xt,Mt[0],Mt[1])}}),Kt.extend=function(Mt,Xt){return Mt.$i||(Mt(Xt,Ut,Kt),Mt.$i=!0),Kt},Kt.locale=Wt,Kt.isDayjs=Lt,Kt.unix=function(Mt){return Kt(1e3*Mt)},Kt.en=Pt[Dt],Kt.Ls=Pt,Kt.p={},Kt})})(dayjs_min);var dayjs_minExports=dayjs_min.exports;const dayjs=getDefaultExportFromCjs(dayjs_minExports);var utc$1={exports:{}};(function(Le,Be){(function(Ye,tt){Le.exports=tt()})(commonjsGlobal,function(){var Ye="minute",tt=/[+-]\d\d(?::?\d\d)?/g,nt=/([+-]|\d\d)/g;return function(ft,ht,gt){var At=ht.prototype;gt.utc=function(bt){var It={date:bt,utc:!0,args:arguments};return new ht(It)},At.utc=function(bt){var It=gt(this.toDate(),{locale:this.$L,utc:!0});return bt?It.add(this.utcOffset(),Ye):It},At.local=function(){return gt(this.toDate(),{locale:this.$L,utc:!1})};var xt=At.parse;At.parse=function(bt){bt.utc&&(this.$u=!0),this.$utils().u(bt.$offset)||(this.$offset=bt.$offset),xt.call(this,bt)};var Et=At.init;At.init=function(){if(this.$u){var bt=this.$d;this.$y=bt.getUTCFullYear(),this.$M=bt.getUTCMonth(),this.$D=bt.getUTCDate(),this.$W=bt.getUTCDay(),this.$H=bt.getUTCHours(),this.$m=bt.getUTCMinutes(),this.$s=bt.getUTCSeconds(),this.$ms=bt.getUTCMilliseconds()}else Et.call(this)};var kt=At.utcOffset;At.utcOffset=function(bt,It){var wt=this.$utils().u;if(wt(bt))return this.$u?0:wt(this.$offset)?kt.call(this):this.$offset;if(typeof bt=="string"&&(bt=function(Dt){Dt===void 0&&(Dt="");var Pt=Dt.match(tt);if(!Pt)return null;var Nt=(""+Pt[0]).match(nt)||["-",0,0],Lt=Nt[0],Wt=60*+Nt[1]+ +Nt[2];return Wt===0?0:Lt==="+"?Wt:-Wt}(bt),bt===null))return this;var Rt=Math.abs(bt)<=16?60*bt:bt;if(Rt===0)return this.utc(It);var Tt=this.clone();if(It)return Tt.$offset=Rt,Tt.$u=!1,Tt;var Bt=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(Tt=this.local().add(Rt+Bt,Ye)).$offset=Rt,Tt.$x.$localOffset=Bt,Tt};var Ct=At.format;At.format=function(bt){var It=bt||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return Ct.call(this,It)},At.valueOf=function(){var bt=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*bt},At.isUTC=function(){return!!this.$u},At.toISOString=function(){return this.toDate().toISOString()},At.toString=function(){return this.toDate().toUTCString()};var yt=At.toDate;At.toDate=function(bt){return bt==="s"&&this.$offset?gt(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():yt.call(this)};var vt=At.diff;At.diff=function(bt,It,wt){if(bt&&this.$u===bt.$u)return vt.call(this,bt,It,wt);var Rt=this.local(),Tt=gt(bt).local();return vt.call(Rt,Tt,It,wt)}}})})(utc$1);var utcExports=utc$1.exports;const utc=getDefaultExportFromCjs(utcExports);var uaParser={exports:{}};(function(Le,Be){(function(Ye,tt){var nt="1.0.41",ft="",ht="?",gt="function",At="undefined",xt="object",Et="string",kt="major",Ct="model",yt="name",vt="type",bt="vendor",It="version",wt="architecture",Rt="console",Tt="mobile",Bt="tablet",Dt="smarttv",Pt="wearable",Nt="embedded",Lt=500,Wt="Amazon",Kt="Apple",$t="ASUS",Ut="BlackBerry",Vt="Browser",Mt="Chrome",Xt="Edge",Qt="Firefox",jt="Google",Gt="Honor",qt="Huawei",zt="Lenovo",e0="LG",o0="Microsoft",t0="Motorola",c0="Nvidia",p0="OnePlus",n0="Opera",g0="OPPO",E0="Samsung",i0="Sharp",r0="Sony",Yt="Xiaomi",_t="Zebra",Jt="Facebook",a0="Chromium OS",s0="Mac OS",f0=" Browser",u0=function(Z0,w0){var S0={};for(var R0 in Z0)w0[R0]&&w0[R0].length%2===0?S0[R0]=w0[R0].concat(Z0[R0]):S0[R0]=Z0[R0];return S0},A0=function(Z0){for(var w0={},S0=0;S0<Z0.length;S0++)w0[Z0[S0].toUpperCase()]=Z0[S0];return w0},d0=function(Z0,w0){return typeof Z0===Et?M0(w0).indexOf(M0(Z0))!==-1:!1},M0=function(Z0){return Z0.toLowerCase()},_0=function(Z0){return typeof Z0===Et?Z0.replace(/[^\d\.]/g,ft).split(".")[0]:tt},q0=function(Z0,w0){if(typeof Z0===Et)return Z0=Z0.replace(/^\s\s*/,ft),typeof w0===At?Z0:Z0.substring(0,Lt)},$0=function(Z0,w0){for(var S0=0,R0,tn,G0,X0,J0,fn;S0<w0.length&&!J0;){var H0=w0[S0],hn=w0[S0+1];for(R0=tn=0;R0<H0.length&&!J0&&H0[R0];)if(J0=H0[R0++].exec(Z0),J0)for(G0=0;G0<hn.length;G0++)fn=J0[++tn],X0=hn[G0],typeof X0===xt&&X0.length>0?X0.length===2?typeof X0[1]==gt?this[X0[0]]=X0[1].call(this,fn):this[X0[0]]=X0[1]:X0.length===3?typeof X0[1]===gt&&!(X0[1].exec&&X0[1].test)?this[X0[0]]=fn?X0[1].call(this,fn,X0[2]):tt:this[X0[0]]=fn?fn.replace(X0[1],X0[2]):tt:X0.length===4&&(this[X0[0]]=fn?X0[3].call(this,fn.replace(X0[1],X0[2])):tt):this[X0]=fn||tt;S0+=2}},Y0=function(Z0,w0){for(var S0 in w0)if(typeof w0[S0]===xt&&w0[S0].length>0){for(var R0=0;R0<w0[S0].length;R0++)if(d0(w0[S0][R0],Z0))return S0===ht?tt:S0}else if(d0(w0[S0],Z0))return S0===ht?tt:S0;return w0.hasOwnProperty("*")?w0["*"]:Z0},N0={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},I0={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},P0={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[It,[yt,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[It,[yt,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[yt,It],[/opios[\/ ]+([\w\.]+)/i],[It,[yt,n0+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[It,[yt,n0+" GX"]],[/\bopr\/([\w\.]+)/i],[It,[yt,n0]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[It,[yt,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[It,[yt,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[yt,It],[/quark(?:pc)?\/([-\w\.]+)/i],[It,[yt,"Quark"]],[/\bddg\/([\w\.]+)/i],[It,[yt,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[It,[yt,"UC"+Vt]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[It,[yt,"WeChat"]],[/konqueror\/([\w\.]+)/i],[It,[yt,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[It,[yt,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[It,[yt,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[It,[yt,"Smart Lenovo "+Vt]],[/(avast|avg)\/([\w\.]+)/i],[[yt,/(.+)/,"$1 Secure "+Vt],It],[/\bfocus\/([\w\.]+)/i],[It,[yt,Qt+" Focus"]],[/\bopt\/([\w\.]+)/i],[It,[yt,n0+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[It,[yt,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[It,[yt,"Dolphin"]],[/coast\/([\w\.]+)/i],[It,[yt,n0+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[It,[yt,"MIUI"+f0]],[/fxios\/([\w\.-]+)/i],[It,[yt,Qt]],[/\bqihoobrowser\/?([\w\.]*)/i],[It,[yt,"360"]],[/\b(qq)\/([\w\.]+)/i],[[yt,/(.+)/,"$1Browser"],It],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[yt,/(.+)/,"$1"+f0],It],[/samsungbrowser\/([\w\.]+)/i],[It,[yt,E0+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[It,[yt,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[yt,"Sogou Mobile"],It],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[yt,It],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[yt],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[It,yt],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[yt,Jt],It],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[yt,It],[/\bgsa\/([\w\.]+) .*safari\//i],[It,[yt,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[It,[yt,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[It,[yt,Mt+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[yt,Mt+" WebView"],It],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[It,[yt,"Android "+Vt]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[yt,It],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[It,[yt,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[It,yt],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[yt,[It,Y0,N0]],[/(webkit|khtml)\/([\w\.]+)/i],[yt,It],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[yt,"Netscape"],It],[/(wolvic|librewolf)\/([\w\.]+)/i],[yt,It],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[It,[yt,Qt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[yt,[It,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[yt,[It,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[wt,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[wt,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[wt,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[wt,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[wt,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[wt,/ower/,ft,M0]],[/ sun4\w[;\)]/i],[[wt,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[wt,M0]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[Ct,[bt,E0],[vt,Bt]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[Ct,[bt,E0],[vt,Tt]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[Ct,[bt,Kt],[vt,Tt]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[Ct,[bt,Kt],[vt,Bt]],[/(macintosh);/i],[Ct,[bt,Kt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[Ct,[bt,i0],[vt,Tt]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[Ct,[bt,Gt],[vt,Bt]],[/honor([-\w ]+)[;\)]/i],[Ct,[bt,Gt],[vt,Tt]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[Ct,[bt,qt],[vt,Bt]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[Ct,[bt,qt],[vt,Tt]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[Ct,/_/g," "],[bt,Yt],[vt,Bt]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[Ct,/_/g," "],[bt,Yt],[vt,Tt]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[Ct,[bt,g0],[vt,Tt]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[Ct,[bt,Y0,{OnePlus:["304","403","203"],"*":g0}],[vt,Bt]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[Ct,[bt,"Vivo"],[vt,Tt]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[Ct,[bt,"Realme"],[vt,Tt]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[Ct,[bt,t0],[vt,Tt]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[Ct,[bt,t0],[vt,Bt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[Ct,[bt,e0],[vt,Bt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[Ct,[bt,e0],[vt,Tt]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[Ct,[bt,zt],[vt,Bt]],[/(nokia) (t[12][01])/i],[bt,Ct,[vt,Bt]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[Ct,/_/g," "],[vt,Tt],[bt,"Nokia"]],[/(pixel (c|tablet))\b/i],[Ct,[bt,jt],[vt,Bt]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[Ct,[bt,jt],[vt,Tt]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[Ct,[bt,r0],[vt,Tt]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[Ct,"Xperia Tablet"],[bt,r0],[vt,Bt]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[Ct,[bt,p0],[vt,Tt]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[Ct,[bt,Wt],[vt,Bt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[Ct,/(.+)/g,"Fire Phone $1"],[bt,Wt],[vt,Tt]],[/(playbook);[-\w\),; ]+(rim)/i],[Ct,bt,[vt,Bt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[Ct,[bt,Ut],[vt,Tt]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[Ct,[bt,$t],[vt,Bt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[Ct,[bt,$t],[vt,Tt]],[/(nexus 9)/i],[Ct,[bt,"HTC"],[vt,Bt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[bt,[Ct,/_/g," "],[vt,Tt]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[Ct,[bt,"TCL"],[vt,Bt]],[/(itel) ((\w+))/i],[[bt,M0],Ct,[vt,Y0,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[Ct,[bt,"Acer"],[vt,Bt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[Ct,[bt,"Meizu"],[vt,Tt]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[Ct,[bt,"Ulefone"],[vt,Tt]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[Ct,[bt,"Energizer"],[vt,Tt]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[Ct,[bt,"Cat"],[vt,Tt]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[Ct,[bt,"Smartfren"],[vt,Tt]],[/droid.+; (a(?:015|06[35]|142p?))/i],[Ct,[bt,"Nothing"],[vt,Tt]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[Ct,[bt,"Archos"],[vt,Bt]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[Ct,[bt,"Archos"],[vt,Tt]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[bt,Ct,[vt,Bt]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[bt,Ct,[vt,Tt]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[bt,Ct,[vt,Bt]],[/(surface duo)/i],[Ct,[bt,o0],[vt,Bt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[Ct,[bt,"Fairphone"],[vt,Tt]],[/(u304aa)/i],[Ct,[bt,"AT&T"],[vt,Tt]],[/\bsie-(\w*)/i],[Ct,[bt,"Siemens"],[vt,Tt]],[/\b(rct\w+) b/i],[Ct,[bt,"RCA"],[vt,Bt]],[/\b(venue[\d ]{2,7}) b/i],[Ct,[bt,"Dell"],[vt,Bt]],[/\b(q(?:mv|ta)\w+) b/i],[Ct,[bt,"Verizon"],[vt,Bt]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[Ct,[bt,"Barnes & Noble"],[vt,Bt]],[/\b(tm\d{3}\w+) b/i],[Ct,[bt,"NuVision"],[vt,Bt]],[/\b(k88) b/i],[Ct,[bt,"ZTE"],[vt,Bt]],[/\b(nx\d{3}j) b/i],[Ct,[bt,"ZTE"],[vt,Tt]],[/\b(gen\d{3}) b.+49h/i],[Ct,[bt,"Swiss"],[vt,Tt]],[/\b(zur\d{3}) b/i],[Ct,[bt,"Swiss"],[vt,Bt]],[/\b((zeki)?tb.*\b) b/i],[Ct,[bt,"Zeki"],[vt,Bt]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[bt,"Dragon Touch"],Ct,[vt,Bt]],[/\b(ns-?\w{0,9}) b/i],[Ct,[bt,"Insignia"],[vt,Bt]],[/\b((nxa|next)-?\w{0,9}) b/i],[Ct,[bt,"NextBook"],[vt,Bt]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[bt,"Voice"],Ct,[vt,Tt]],[/\b(lvtel\-)?(v1[12]) b/i],[[bt,"LvTel"],Ct,[vt,Tt]],[/\b(ph-1) /i],[Ct,[bt,"Essential"],[vt,Tt]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[Ct,[bt,"Envizen"],[vt,Bt]],[/\b(trio[-\w\. ]+) b/i],[Ct,[bt,"MachSpeed"],[vt,Bt]],[/\btu_(1491) b/i],[Ct,[bt,"Rotor"],[vt,Bt]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[Ct,[bt,c0],[vt,Bt]],[/(sprint) (\w+)/i],[bt,Ct,[vt,Tt]],[/(kin\.[onetw]{3})/i],[[Ct,/\./g," "],[bt,o0],[vt,Tt]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[Ct,[bt,_t],[vt,Bt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[Ct,[bt,_t],[vt,Tt]],[/smart-tv.+(samsung)/i],[bt,[vt,Dt]],[/hbbtv.+maple;(\d+)/i],[[Ct,/^/,"SmartTV"],[bt,E0],[vt,Dt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[bt,e0],[vt,Dt]],[/(apple) ?tv/i],[bt,[Ct,Kt+" TV"],[vt,Dt]],[/crkey/i],[[Ct,Mt+"cast"],[bt,jt],[vt,Dt]],[/droid.+aft(\w+)( bui|\))/i],[Ct,[bt,Wt],[vt,Dt]],[/(shield \w+ tv)/i],[Ct,[bt,c0],[vt,Dt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[Ct,[bt,i0],[vt,Dt]],[/(bravia[\w ]+)( bui|\))/i],[Ct,[bt,r0],[vt,Dt]],[/(mi(tv|box)-?\w+) bui/i],[Ct,[bt,Yt],[vt,Dt]],[/Hbbtv.*(technisat) (.*);/i],[bt,Ct,[vt,Dt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[bt,q0],[Ct,q0],[vt,Dt]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[Ct,[vt,Dt]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[vt,Dt]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[bt,Ct,[vt,Rt]],[/droid.+; (shield)( bui|\))/i],[Ct,[bt,c0],[vt,Rt]],[/(playstation \w+)/i],[Ct,[bt,r0],[vt,Rt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[Ct,[bt,o0],[vt,Rt]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[Ct,[bt,E0],[vt,Pt]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[bt,Ct,[vt,Pt]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[Ct,[bt,g0],[vt,Pt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[Ct,[bt,Kt],[vt,Pt]],[/(opwwe\d{3})/i],[Ct,[bt,p0],[vt,Pt]],[/(moto 360)/i],[Ct,[bt,t0],[vt,Pt]],[/(smartwatch 3)/i],[Ct,[bt,r0],[vt,Pt]],[/(g watch r)/i],[Ct,[bt,e0],[vt,Pt]],[/droid.+; (wt63?0{2,3})\)/i],[Ct,[bt,_t],[vt,Pt]],[/droid.+; (glass) \d/i],[Ct,[bt,jt],[vt,Pt]],[/(pico) (4|neo3(?: link|pro)?)/i],[bt,Ct,[vt,Pt]],[/; (quest( \d| pro)?)/i],[Ct,[bt,Jt],[vt,Pt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[bt,[vt,Nt]],[/(aeobc)\b/i],[Ct,[bt,Wt],[vt,Nt]],[/(homepod).+mac os/i],[Ct,[bt,Kt],[vt,Nt]],[/windows iot/i],[[vt,Nt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[Ct,[vt,Tt]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[Ct,[vt,Bt]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[vt,Bt]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[vt,Tt]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[Ct,[bt,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[It,[yt,Xt+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[yt,It],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[It,[yt,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[yt,It],[/ladybird\//i],[[yt,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[It,yt]],os:[[/microsoft (windows) (vista|xp)/i],[yt,It],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[yt,[It,Y0,I0]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[It,Y0,I0],[yt,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[It,/_/g,"."],[yt,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[yt,s0],[It,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[It,yt],[/(ubuntu) ([\w\.]+) like android/i],[[yt,/(.+)/,"$1 Touch"],It],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[yt,It],[/\(bb(10);/i],[It,[yt,Ut]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[It,[yt,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[It,[yt,Qt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[It,[yt,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[It,[yt,"watchOS"]],[/crkey\/([\d\.]+)/i],[It,[yt,Mt+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[yt,a0],It],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[yt,It],[/(sunos) ?([\w\.\d]*)/i],[[yt,"Solaris"],It],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[yt,It]]},O0=function(Z0,w0){if(typeof Z0===xt&&(w0=Z0,Z0=tt),!(this instanceof O0))return new O0(Z0,w0).getResult();var S0=typeof Ye!==At&&Ye.navigator?Ye.navigator:tt,R0=Z0||(S0&&S0.userAgent?S0.userAgent:ft),tn=S0&&S0.userAgentData?S0.userAgentData:tt,G0=w0?u0(P0,w0):P0,X0=S0&&S0.userAgent==R0;return this.getBrowser=function(){var J0={};return J0[yt]=tt,J0[It]=tt,$0.call(J0,R0,G0.browser),J0[kt]=_0(J0[It]),X0&&S0&&S0.brave&&typeof S0.brave.isBrave==gt&&(J0[yt]="Brave"),J0},this.getCPU=function(){var J0={};return J0[wt]=tt,$0.call(J0,R0,G0.cpu),J0},this.getDevice=function(){var J0={};return J0[bt]=tt,J0[Ct]=tt,J0[vt]=tt,$0.call(J0,R0,G0.device),X0&&!J0[vt]&&tn&&tn.mobile&&(J0[vt]=Tt),X0&&J0[Ct]=="Macintosh"&&S0&&typeof S0.standalone!==At&&S0.maxTouchPoints&&S0.maxTouchPoints>2&&(J0[Ct]="iPad",J0[vt]=Bt),J0},this.getEngine=function(){var J0={};return J0[yt]=tt,J0[It]=tt,$0.call(J0,R0,G0.engine),J0},this.getOS=function(){var J0={};return J0[yt]=tt,J0[It]=tt,$0.call(J0,R0,G0.os),X0&&!J0[yt]&&tn&&tn.platform&&tn.platform!="Unknown"&&(J0[yt]=tn.platform.replace(/chrome os/i,a0).replace(/macos/i,s0)),J0},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return R0},this.setUA=function(J0){return R0=typeof J0===Et&&J0.length>Lt?q0(J0,Lt):J0,this},this.setUA(R0),this};O0.VERSION=nt,O0.BROWSER=A0([yt,It,kt]),O0.CPU=A0([wt]),O0.DEVICE=A0([Ct,bt,vt,Rt,Tt,Dt,Bt,Pt,Nt]),O0.ENGINE=O0.OS=A0([yt,It]),Le.exports&&(Be=Le.exports=O0),Be.UAParser=O0;var F0=typeof Ye!==At&&(Ye.jQuery||Ye.Zepto);if(F0&&!F0.ua){var K0=new O0;F0.ua=K0.getResult(),F0.ua.get=function(){return K0.getUA()},F0.ua.set=function(Z0){K0.setUA(Z0);var w0=K0.getResult();for(var S0 in w0)F0.ua[S0]=w0[S0]}}})(typeof window=="object"?window:commonjsGlobal)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;const UAParser=getDefaultExportFromCjs(uaParserExports);let uxType=null;const setUxType=Le=>{if(Le==="desktop"||Le==="mobile"||Le===null)uxType=Le;else throw new Error("Invalid value for uxType. Accepted values are 'desktop', 'mobile', or null.")},isIOS16=()=>{const Be=new UAParser().getResult();return Be.os.name==="iOS"&&Be.os.version.startsWith("16.")},getUxType=()=>uxType,parser$1=new UAParser,uaResult=parser$1.getResult(),isTouchDevice=()=>navigator.maxTouchPoints>0||"ontouchstart"in document.documentElement,isTabletWithoutAndroid=()=>!uaResult.device.type&&uaResult.os.name==="Linux"&&uaResult.browser.name==="Chrome"&&isTouchDevice(),mobile={isWebview:()=>["Chrome WebView","WebKit"].includes(uaResult.browser.name),Android:()=>uaResult.os.name==="Android",iOS:()=>{var Le,Be;return["iOS","iPadOS"].includes(uaResult.os.name||"")||uaResult.os.name!=="Mac OS"&&((Be=(Le=uaResult.device)==null?void 0:Le.vendor)==null?void 0:Be.toLowerCase())==="apple"},isIpad:()=>uaResult.device.model==="iPad",isFBInAppBrowser:()=>/\[FB/.test(uaResult.ua),isInstagramAppBrowser:()=>/Instagram/.test(uaResult.ua),any:()=>uxType?uxType==="mobile":!!(uaResult.device.type==="mobile"||uaResult.device.type==="tablet"||isTabletWithoutAndroid()),isChrome:()=>{const{browser:Le}=uaResult;return["Chrome"].includes(Le.name||"")},isDesktop:()=>uxType?uxType==="desktop":!mobile.any(),isAppleDevice:()=>["iOS","Mac OS","iPadOS"].includes(uaResult.os.name||""),isBrowserSupported:()=>{if(mobile.isWebview())return!0;const{browser:Le,os:Be}=uaResult;return Le.name==="Firefox"||Le.name==="Brave"||Le.name==="MiuiBrowser"?!1:Be.name==="iOS"||Be.name==="iPadOS"?["Mobile Safari","Chrome"].includes(Le.name||""):Be.name==="Mac OS"?["Safari","Chrome"].includes(Le.name||""):Le.name==="Chrome"}},browserName=uaResult.browser.name,desktop={isEdge:()=>browserName==="Edge",isChrome:()=>["Chrome","Chrome WebView","Chrome Headless"].includes(browserName),isFirefox:()=>["Firefox","Firefox Focus","Firefox Reality"].includes(browserName),isOpera:()=>["Opera","Opera Mini","Opera Touch"].includes(browserName),isSafari:()=>["Safari","Mobile Safari"].includes(browserName),isBrave:()=>browserName==="Brave",isXiaomiBrowser:()=>browserName==="MiuiBrowser"},getHasLiedBrowser=()=>{const Le=navigator.userAgent.toLowerCase(),Be=navigator.productSub;let Ye;if(Le.indexOf("edge/")>=0||Le.indexOf("iemobile/")>=0)return!1;if(Le.indexOf("opera mini")>=0)return!1;if(Le.indexOf("firefox/")>=0?Ye="Firefox":Le.indexOf("opera/")>=0||Le.indexOf(" opr/")>=0?Ye="Opera":Le.indexOf("chrome/")>=0?Ye="Chrome":Le.indexOf("safari/")>=0?Le.indexOf("android 1.")>=0||Le.indexOf("android 2.")>=0||Le.indexOf("android 3.")>=0||Le.indexOf("android 4.")>=0?Ye="AOSP":Ye="Safari":Le.indexOf("trident/")>=0?Ye="Internet Explorer":Ye="Other",(Ye==="Chrome"||Ye==="Safari"||Ye==="Opera")&&Be!=="20030107")return!0;const tt=eval.toString().length;if(tt===37&&Ye!=="Safari"&&Ye!=="Firefox"&&Ye!=="Other")return!0;if(tt===39&&Ye!=="Internet Explorer"&&Ye!=="Other")return!0;if(tt===33&&Ye!=="Chrome"&&Ye!=="AOSP"&&Ye!=="Opera"&&Ye!=="Other")return!0;let nt;try{throw"a"}catch(ft){try{ft.toSource(),nt=!0}catch{nt=!1}}return nt&&Ye!=="Firefox"&&Ye!=="Other"},getUAParserResults=()=>uaResult,isBrowserSimulation=()=>getUAParserResults().browser.name?isTouchDevice()&&navigator.maxTouchPoints!==1?!1:isTouchDevice()&&(getHasLiedBrowser()||window.navigator.userAgent.indexOf("Mobile")!==-1)||mobile.iOS()&&typeof window.ontouchstart>"u":!0,isMobile$1=mobile.any()&&!isBrowserSimulation(),isWebRtcSupported=()=>!!(window.navigator.mediaDevices&&window.navigator.mediaDevices.getUserMedia),isSurfaceTablet=()=>{const Le=navigator.userAgent.indexOf("Windows")>-1,Be=navigator.maxTouchPoints,Ye="ontouchstart"in window||Be>0||(matchMedia==null?void 0:matchMedia("(any-pointer: coarse)").matches);return Le&&Ye},deviceClass={MOBILE:"MOBILE",DESKTOP:"DESKTOP"},getDeviceClass=()=>isMobile$1?deviceClass.MOBILE:deviceClass.DESKTOP;function detectMobileOS(){return mobile.iOS()?"ios":mobile.Android()?"android":"other"}dayjs.extend(utc);function isChrome(){const Le=window.hasOwnProperty("chrome"),Be=window.navigator,Ye=Be.vendor,tt=!!(window.hasOwnProperty("opera")||window.hasOwnProperty("opr")||navigator.userAgent.includes("Opera")||navigator.userAgent.includes("OPR")),nt=Be.userAgent.indexOf("Edge")>-1;return Be.userAgent.match("CriOS")?!0:Le!==null&&typeof Le<"u"&&Ye==="Google Inc."&&tt===!1&&nt===!1}function isSafari(){return window.navigator.vendor&&window.navigator.vendor.indexOf("Apple")>-1&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("CriOS")===-1&&window.navigator.userAgent.indexOf("FxiOS")===-1&&window.navigator.userAgent.indexOf("OPT")===-1&&window.navigator.userAgent.indexOf("OPR")===-1}const sleep=Le=>new Promise(Be=>setTimeout(Be,Le)),throttle$2=(Le,Be)=>{let Ye;return(...tt)=>{Ye||(Le.apply(void 0,tt),Ye=!0,setTimeout(()=>Ye=!1,Be))}},getLogObject=(Le,Be)=>({type:Le,payload:Be}),toImage$1=Le=>Le?`data:image/png;base64,${Le}`:"",getValidUrl=(Le="")=>{let Be=window.decodeURIComponent(Le);return Be=Be.trim().replace(/\s/g,""),/^(:\/\/)/.test(Be)?`http${Be}`:/^(f|ht)tps?:\/\//i.test(Be)?Be:`http://${Be}`},resizeImg=(Le,Be)=>{const Ye=document.createElement("canvas");Ye.width=Le.width<=Be?Le.width:Be,Ye.height=Le.width<=Be?Le.height:Le.height/(Le.width/Be);const tt=Ye.getContext("2d");return tt==null||tt.drawImage(Le,0,0,Ye.width,Ye.height),Ye.toDataURL()},rotateImg=Le=>{const Be=document.createElement("canvas");Be.width=Le.width,Be.height=Le.height;const Ye=Be.getContext("2d");Ye==null||Ye.drawImage(Le,0,0);const tt=Be.width;return Be.width=Be.height,Be.height=tt,Ye==null||Ye.clearRect(0,0,Be.width,Be.height),Ye==null||Ye.save(),Ye==null||Ye.translate(Be.width/2,Be.height/2),Ye==null||Ye.rotate(-90*Math.PI/180),Ye==null||Ye.drawImage(Le,-Le.width/2,-Le.height/2),Ye==null||Ye.restore(),Be},rotateCanvasVertically=Le=>{const Be=Le.getContext("2d");Be.scale(1,-1),Be.translate(0,-Le.height)},getBase64=Le=>new Promise((Be,Ye)=>{const tt=new FileReader;tt.onload=nt=>{var ht;const ft=(ht=nt==null?void 0:nt.target)==null?void 0:ht.result;Be(ft)},tt.readAsDataURL(Le),tt.onerror=nt=>Ye(nt)}),getScaledBase64=(Le,Be=1280,Ye=!1)=>new Promise((tt,nt)=>{const ft=new Image;ft.onload=()=>{const ht=Ye&&ft.width>ft.height?rotateImg(ft):ft,gt=resizeImg(ht,Be);URL.revokeObjectURL(ft.src),tt(gt)},ft.onerror=ht=>nt(ht),ft.src=URL.createObjectURL(Le)}),getScaledImageFromFile=async(Le,Be=1280,Ye=!1)=>({imageBase64:Le.type==="application/pdf"?await getBase64(Le):await getScaledBase64(Le,Be,Ye),fullImage:Le});function emptyFunc(...Le){}const reload=()=>{window.location.reload()},states$2=[{min:35e3,max:36999,code:"AL",long:"Alabama"},{min:99500,max:99999,code:"AK",long:"Alaska"},{min:85e3,max:86999,code:"AZ",long:"Arizona"},{min:71600,max:72999,code:"AR",long:"Arkansas"},{min:9e4,max:96699,code:"CA",long:"California"},{min:8e4,max:81999,code:"CO",long:"Colorado"},{min:6e3,max:6999,code:"CT",long:"Connecticut"},{min:19700,max:19999,code:"DE",long:"Delaware"},{min:32e3,max:34999,code:"FL",long:"Florida"},{min:3e4,max:31999,code:"GA",long:"Georgia"},{min:96700,max:96999,code:"HI",long:"Hawaii"},{min:83200,max:83999,code:"ID",long:"Idaho"},{min:6e4,max:62999,code:"IL",long:"Illinois"},{min:46e3,max:47999,code:"IN",long:"Indiana"},{min:5e4,max:52999,code:"IA",long:"Iowa"},{min:66e3,max:67999,code:"KS",long:"Kansas"},{min:4e4,max:42999,code:"KY",long:"Kentucky"},{min:7e4,max:71599,code:"LA",long:"Louisiana"},{min:3900,max:4999,code:"ME",long:"Maine"},{min:20600,max:21999,code:"MD",long:"Maryland"},{min:1e3,max:2799,code:"MA",long:"Massachusetts"},{min:48e3,max:49999,code:"MI",long:"Michigan"},{min:55e3,max:56999,code:"MN",long:"Minnesota"},{min:38600,max:39999,code:"MS",long:"Mississippi"},{min:63e3,max:65999,code:"MO",long:"Missouri"},{min:59e3,max:59999,code:"MT",long:"Montana"},{min:27e3,max:28999,code:"NC",long:"North Carolina"},{min:58e3,max:58999,code:"ND",long:"North Dakota"},{min:68e3,max:69999,code:"NE",long:"Nebraska"},{min:88900,max:89999,code:"NV",long:"Nevada"},{min:3e3,max:3899,code:"NH",long:"New Hampshire"},{min:7e3,max:8999,code:"NJ",long:"New Jersey"},{min:87e3,max:88499,code:"NM",long:"New Mexico"},{min:1e4,max:14999,code:"NY",long:"New York"},{min:43e3,max:45999,code:"OH",long:"Ohio"},{min:73e3,max:74999,code:"OK",long:"Oklahoma"},{min:97e3,max:97999,code:"OR",long:"Oregon"},{min:15e3,max:19699,code:"PA",long:"Pennsylvania"},{min:300,max:999,code:"PR",long:"Puerto Rico"},{min:2800,max:2999,code:"RI",long:"Rhode Island"},{min:29e3,max:29999,code:"SC",long:"South Carolina"},{min:57e3,max:57999,code:"SD",long:"South Dakota"},{min:37e3,max:38599,code:"TN",long:"Tennessee"},{min:75e3,max:79999,code:"TX",long:"Texas"},{min:88500,max:88599,code:"TX",long:"Texas"},{min:84e3,max:84999,code:"UT",long:"Utah"},{min:5e3,max:5999,code:"VT",long:"Vermont"},{min:22e3,max:24699,code:"VA",long:"Virgina"},{min:2e4,max:20599,code:"DC",long:"Washington DC"},{min:98e3,max:99499,code:"WA",long:"Washington"},{min:24700,max:26999,code:"WV",long:"West Virginia"},{min:53e3,max:54999,code:"WI",long:"Wisconsin"},{min:82e3,max:83199,code:"WY",long:"Wyoming"}],getUSState=Le=>{const Be=Number.parseInt(Le,10),Ye=states$2.filter(tt=>tt.min<=Be&&tt.max>=Be);return Ye.length===0||Ye.length>1?"":Ye[0].code},INCODE_DOMAINS={SAAS:"saas-api.incodesmile.com",STAGE:"incode-stageus-api.stage.incodetest.com",DEMO:"demo-api.incodesmile.com",STAGEK8S:"user-service-k8s.stage.incodetest.com",DEMOK8S:"user-service-k8s.demok8s.incodesmile.com"},allowedDomains=Object.values(INCODE_DOMAINS),isValidUrl=Le=>{try{return new URL(Le),!0}catch{return!1}},allowedDomain=Le=>{const Be=new URL(Le).hostname;return{isAllowed:allowedDomains.includes(Be),domain:Be}},isSaasEnv=Le=>{if(!isValidUrl(Le))return!1;const{isAllowed:Be,domain:Ye}=allowedDomain(Le);return isValidUrl(Le)&&Be&&Ye===INCODE_DOMAINS.SAAS},isStageEnv=Le=>{if(!isValidUrl(Le))return!1;const{isAllowed:Be,domain:Ye}=allowedDomain(Le);return isValidUrl(Le)&&Be&&Ye===INCODE_DOMAINS.STAGE},isDemoEnv=Le=>{if(!isValidUrl(Le))return!1;const{isAllowed:Be,domain:Ye}=allowedDomain(Le);return isValidUrl(Le)&&Be&&Ye===INCODE_DOMAINS.DEMO},isStageK8sEnv=Le=>{if(!isValidUrl(Le))return!1;const{isAllowed:Be,domain:Ye}=allowedDomain(Le);return isValidUrl(Le)&&Be&&Ye===INCODE_DOMAINS.STAGEK8S},formatDate=(Le,Be=!1)=>{if(!Le)return"";const Ye=Number(Le);return dayjs(Ye).isValid()?Be?dayjs.utc(Ye).format("YYYY-MM-DD"):dayjs.utc(Ye).format("MMM D YYYY"):""},camelToStartCase=Le=>{const Be=Le.replace(/([A-Z])/g," $1");return Be.charAt(0).toUpperCase()+Be.slice(1)},formatInputDate=Le=>{let Be=new Date(Le),Ye=""+(Be.getMonth()+1),tt=""+Be.getDate(),nt=Be.getFullYear();return Ye.length<2&&(Ye="0"+Ye),tt.length<2&&(tt="0"+tt),[nt,Ye,tt].join("-")},getKioskMaskPosition=()=>{var Et;const Le=(Et=document.querySelector("video"))==null?void 0:Et.getBoundingClientRect(),Be=Le.width,Ye=Le.height,tt=5.4/8.6,nt=.96,ht=+Be*.6,gt=+Ye*nt,At=gt*tt,xt=At>ht?ht:At;return{width:xt,height:gt,left:(+Be-xt)/2,top:(Ye-gt)/2}},getMaskPosition=(Le=!1)=>{const Be=window.innerWidth,Ye=window.innerHeight,tt=8.6/5.4,nt=localStorage.getItem("isIPhone14OrHigher")==="true"?Le?.8:.6:.86,ht=Ye*.9,gt=Be*nt,At=gt*tt,xt=At>ht?ht:At;return{width:gt,height:xt,left:(Be-gt)/2,top:(Ye-xt)/2}},capitalize$2=Le=>Le.charAt(0).toUpperCase()+Le.slice(1),getLanguageCodeWithCountry=Le=>Le!=null&&Le.startsWith("en")?"en-US":Le!=null&&Le.startsWith("es")?"es-ES":"en-US",b64toBlob=(Le,Be="",Ye=512)=>{const tt=atob(Le),nt=[];for(let ht=0;ht<tt.length;ht+=Ye){const gt=tt.slice(ht,ht+Ye),At=new Array(gt.length);for(let Et=0;Et<gt.length;Et++)At[Et]=gt.charCodeAt(Et);const xt=new Uint8Array(At);nt.push(xt)}return new Blob(nt,{type:Be})},isValidHttpUrl=Le=>{let Be;try{Be=new URL(Le)}catch{return!1}return Be.protocol==="http:"||Be.protocol==="https:"},triggerRedirect=Le=>{const Be=getValidUrl(Le);isValidHttpUrl(Be)?window.location.replace(Be):window.location.replace(Le)},getScreenRecordingEventCode=Le=>({frontId:"frontIdScanScreenRecordVideoUploaded",backId:"backIdScanScreenRecordVideoUploaded",selfie:"selfieScanScreenRecordVideoUploaded"})[Le]||"",detectBrowser=()=>isSafari()?"Safari":isChrome()?"Chrome":isOpera()?"Opera":isFirefox$1()?"Firefox":desktop.isBrave()?"Brave":desktop.isXiaomiBrowser()?"Xiaomi":"unknown",isOpera=()=>!!(window.hasOwnProperty("opera")||window.hasOwnProperty("opr")||navigator.userAgent.includes("Opera")||navigator.userAgent.includes("OPR")||navigator.userAgent.includes("OPT")),isFirefox$1=()=>navigator.userAgent.indexOf("Firefox")>-1||navigator.userAgent.indexOf("FxiOS")>-1;async function pollUntil(Le,Be,Ye){const tt=async()=>{try{const nt=await Le();return Be(nt)?nt:(await sleep(Ye),tt())}catch(nt){throw nt}};return tt()}const validateCPF=Le=>{if(!Le||(Le=Le.replace(/[^\d]+/g,""),Le.length!==11||Le.match(/(\d)\1{10}/)))return!1;let Be=0,Ye;for(let tt=1;tt<=9;tt++)Be=Be+Number.parseInt(Le.substring(tt-1,tt))*(11-tt);if(Ye=Be*10%11,(Ye===10||Ye===11)&&(Ye=0),Ye!==Number.parseInt(Le.substring(9,10)))return!1;Be=0;for(let tt=1;tt<=10;tt++)Be=Be+Number.parseInt(Le.substring(tt-1,tt))*(12-tt);return Ye=Be*10%11,(Ye===10||Ye===11)&&(Ye=0),Ye===Number.parseInt(Le.substring(10,11))},getVideoSelfieModules=(Le,{checkIdScan:Be,checkDocumentScan:Ye,checkVoiceConsent:tt,questionsCount:nt,showPassport:ft})=>[...Be??Le.checkIdScan?["front"]:[],...!Le.onlyFront&&!ft&&(Be??Le.checkIdScan)?["back"]:[],...Ye??Le.checkDocumentScan?["poa"]:[],"selfie",...(nt??Le.questionsCount)>0&&(tt??Le.checkVoiceConsent)?["questions"]:[],...tt??Le.checkVoiceConsent?["speech"]:[]],countryCodeToInfo={ABW:{name:"Aruba",flag:"🇦🇼"},AFG:{name:"Afghanistan",flag:"🇦🇫"},AGO:{name:"Angola",flag:"🇦🇴"},AIA:{name:"Anguilla",flag:"🇦🇮"},ALA:{name:"Åland Islands",flag:"🇦🇽"},ALB:{name:"Albania",flag:"🇦🇱"},AND:{name:"Andorra",flag:"🇦🇩"},ARE:{name:"United Arab Emirates",flag:"🇦🇪"},ARG:{name:"Argentina",flag:"🇦🇷"},ARM:{name:"Armenia",flag:"🇦🇲"},ASM:{name:"American Samoa",flag:"🇦🇸"},ATA:{name:"Antarctica",flag:"🇦🇶"},ATF:{name:"French Southern Territories",flag:"🇹🇫"},ATG:{name:"Antigua and Barbuda",flag:"🇦🇬"},AUS:{name:"Australia",flag:"🇦🇺"},AUT:{name:"Austria",flag:"🇦🇹"},AZE:{name:"Azerbaijan",flag:"🇦🇿"},BDI:{name:"Burundi",flag:"🇧🇮"},BEL:{name:"Belgium",flag:"🇧🇪"},BEN:{name:"Benin",flag:"🇧🇯"},BES:{name:"Bonaire, Sint Eustatius and Saba",flag:"🇧🇶"},BFA:{name:"Burkina Faso",flag:"🇧🇫"},BGD:{name:"Bangladesh",flag:"🇧🇩"},BGR:{name:"Bulgaria",flag:"🇧🇬"},BHR:{name:"Bahrain",flag:"🇧🇭"},BHS:{name:"Bahamas",flag:"🇧🇸"},BIH:{name:"Bosnia and Herzegovina",flag:"🇧🇦"},BLM:{name:"Saint Barthélemy",flag:"🇧🇱"},BLR:{name:"Belarus",flag:"🇧🇾"},BLZ:{name:"Belize",flag:"🇧🇿"},BMU:{name:"Bermuda",flag:"🇧🇲"},BOL:{name:"Bolivia, Plurinational State of",flag:"🇧🇴"},BRA:{name:"Brasil",flag:"🇧🇷"},BRB:{name:"Barbados",flag:"🇧🇧"},BRN:{name:"Brunei Darussalam",flag:"🇧🇳"},BTN:{name:"Bhutan",flag:"🇧🇹"},BVT:{name:"Bouvet Island",flag:"🇧🇻"},BWA:{name:"Botswana",flag:"🇧🇼"},CAF:{name:"Central African Republic",flag:"🇨🇫"},CAN:{name:"Canada",flag:"🇨🇦"},CCK:{name:"Cocos (Keeling) Islands",flag:"🇨🇨"},CHE:{name:"Switzerland",flag:"🇨🇭"},CHL:{name:"Chile",flag:"🇨🇱"},CHN:{name:"China",flag:"🇨🇳"},CIV:{name:"Côte d'Ivoire",flag:"🇨🇮"},CMR:{name:"Cameroon",flag:"🇨🇲"},COD:{name:"Congo, Democratic Republic of the",flag:"🇨🇩"},COG:{name:"Congo",flag:"🇨🇬"},COK:{name:"Cook Islands",flag:"🇨🇰"},COL:{name:"Colombia",flag:"🇨🇴"},COM:{name:"Comoros",flag:"🇰🇲"},CPV:{name:"Cabo Verde",flag:"🇨🇻"},CRI:{name:"Costa Rica",flag:"🇨🇷"},CUB:{name:"Cuba",flag:"🇨🇺"},CUW:{name:"Curaçao",flag:"🇨🇼"},CXR:{name:"Christmas Island",flag:"🇨🇽"},CYM:{name:"Cayman Islands",flag:"🇰🇾"},CYP:{name:"Cyprus",flag:"🇨🇾"},CZE:{name:"Czechia",flag:"🇨🇿"},DEU:{name:"Germany",flag:"🇩🇪"},DJI:{name:"Djibouti",flag:"🇩🇯"},DMA:{name:"Dominica",flag:"🇩🇲"},DNK:{name:"Denmark",flag:"🇩🇰"},DOM:{name:"Dominican Republic",flag:"🇩🇴"},DZA:{name:"Algeria",flag:"🇩🇿"},ECU:{name:"Ecuador",flag:"🇪🇨"},EGY:{name:"Egypt",flag:"🇪🇬"},ERI:{name:"Eritrea",flag:"🇪🇷"},ESH:{name:"Western Sahara",flag:"🇪🇭"},ESP:{name:"Spain",flag:"🇪🇸"},EST:{name:"Estonia",flag:"🇪🇪"},ETH:{name:"Ethiopia",flag:"🇪🇹"},FIN:{name:"Finland",flag:"🇫🇮"},FJI:{name:"Fiji",flag:"🇫🇯"},FLK:{name:"Falkland Islands (Malvinas)",flag:"🇫🇰"},FRA:{name:"France",flag:"🇫🇷"},FRO:{name:"Faroe Islands",flag:"🇫🇴"},FSM:{name:"Micronesia, Federated States of",flag:"🇫🇲"},GAB:{name:"Gabon",flag:"🇬🇦"},GBR:{name:"United Kingdom",flag:"🇬🇧"},GEO:{name:"Georgia",flag:"🇬🇪"},GGY:{name:"Guernsey",flag:"🇬🇬"},GHA:{name:"Ghana",flag:"🇬🇭"},GIB:{name:"Gibraltar",flag:"🇬🇮"},GIN:{name:"Guinea",flag:"🇬🇳"},GLP:{name:"Guadeloupe",flag:"🇬🇵"},GMB:{name:"Gambia",flag:"🇬🇲"},GNB:{name:"Guinea-Bissau",flag:"🇬🇼"},GNQ:{name:"Equatorial Guinea",flag:"🇬🇶"},GRC:{name:"Greece",flag:"🇬🇷"},GRD:{name:"Grenada",flag:"🇬🇩"},GRL:{name:"Greenland",flag:"🇬🇱"},GTM:{name:"Guatemala",flag:"🇬🇹"},GUF:{name:"French Guiana",flag:"🇬🇫"},GUM:{name:"Guam",flag:"🇬🇺"},GUY:{name:"Guyana",flag:"🇬🇾"},HKG:{name:"Hong Kong",flag:"🇭🇰"},HMD:{name:"Heard Island and McDonald Islands",flag:"🇭🇲"},HND:{name:"Honduras",flag:"🇭🇳"},HRV:{name:"Croatia",flag:"🇭🇷"},HTI:{name:"Haiti",flag:"🇭🇹"},HUN:{name:"Hungary",flag:"🇭🇺"},IDN:{name:"Indonesia",flag:"🇮🇩"},IMN:{name:"Isle of Man",flag:"🇮🇲"},IND:{name:"India",flag:"🇮🇳"},IOT:{name:"British Indian Ocean Territory",flag:"🇮🇴"},IRL:{name:"Ireland",flag:"🇮🇪"},IRN:{name:"Iran",flag:"🇮🇷"},IRQ:{name:"Iraq",flag:"🇮🇶"},ISL:{name:"Iceland",flag:"🇮🇸"},ISR:{name:"Israel",flag:"🇮🇱"},ITA:{name:"Italy",flag:"🇮🇹"},JAM:{name:"Jamaica",flag:"🇯🇲"},JEY:{name:"Jersey",flag:"🇯🇪"},JOR:{name:"Jordan",flag:"🇯🇴"},JPN:{name:"Japan",flag:"🇯🇵"},KAZ:{name:"Kazakhstan",flag:"🇰🇿"},KEN:{name:"Kenya",flag:"🇰🇪"},KGZ:{name:"Kyrgyzstan",flag:"🇰🇬"},KHM:{name:"Cambodia",flag:"🇰🇭"},KIR:{name:"Kiribati",flag:"🇰🇮"},KNA:{name:"Saint Kitts and Nevis",flag:"🇰🇳"},KOR:{name:"Korea, Republic of",flag:"🇰🇷"},KWT:{name:"Kuwait",flag:"🇰🇼"},LAO:{name:"Lao People's Democratic Republic",flag:"🇱🇦"},LBN:{name:"Lebanon",flag:"🇱🇧"},LBR:{name:"Liberia",flag:"🇱🇷"},LBY:{name:"Libya",flag:"🇱🇾"},LCA:{name:"Saint Lucia",flag:"🇱🇨"},LIE:{name:"Liechtenstein",flag:"🇱🇮"},LKA:{name:"Sri Lanka",flag:"🇱🇰"},LSO:{name:"Lesotho",flag:"🇱🇸"},LTU:{name:"Lithuania",flag:"🇱🇹"},LUX:{name:"Luxembourg",flag:"🇱🇺"},LVA:{name:"Latvia",flag:"🇱🇻"},MAC:{name:"Macao",flag:"🇲🇴"},MAF:{name:"Saint Martin (French part)",flag:"🇲🇫"},MAR:{name:"Morocco",flag:"🇲🇦"},MCO:{name:"Monaco",flag:"🇲🇨"},MDA:{name:"Moldova",flag:"🇲🇩"},MDG:{name:"Madagascar",flag:"🇲🇬"},MDV:{name:"Maldives",flag:"🇲🇻"},MEX:{name:"Mexico",flag:"🇲🇽"},MHL:{name:"Marshall Islands",flag:"🇲🇭"},MKD:{name:"North Macedonia",flag:"🇲🇰"},MLI:{name:"Mali",flag:"🇲🇱"},MLT:{name:"Malta",flag:"🇲🇹"},MMR:{name:"Myanmar",flag:"🇲🇲"},MNE:{name:"Montenegro",flag:"🇲🇪"},MNG:{name:"Mongolia",flag:"🇲🇳"},MNP:{name:"Northern Mariana Islands",flag:"🇲🇵"},MOZ:{name:"Mozambique",flag:"🇲🇿"},MRT:{name:"Mauritania",flag:"🇲🇷"},MSR:{name:"Montserrat",flag:"🇲🇸"},MTQ:{name:"Martinique",flag:"🇲🇶"},MUS:{name:"Mauritius",flag:"🇲🇺"},MWI:{name:"Malawi",flag:"🇲🇼"},MYS:{name:"Malaysia",flag:"🇲🇾"},MYT:{name:"Mayotte",flag:"🇾🇹"},NAM:{name:"Namibia",flag:"🇳🇦"},NCL:{name:"New Caledonia",flag:"🇳🇨"},NER:{name:"Niger",flag:"🇳🇪"},NFK:{name:"Norfolk Island",flag:"🇳🇫"},NGA:{name:"Nigeria",flag:"🇳🇬"},NIC:{name:"Nicaragua",flag:"🇳🇮"},NIU:{name:"Niue",flag:"🇳🇺"},NLD:{name:"Netherlands",flag:"🇳🇱"},NOR:{name:"Norway",flag:"🇳🇴"},NPL:{name:"Nepal",flag:"🇳🇵"},NRU:{name:"Nauru",flag:"🇳🇷"},NZL:{name:"New Zealand",flag:"🇳🇿"},OMN:{name:"Oman",flag:"🇴🇲"},PAK:{name:"Pakistan",flag:"🇵🇰"},PAN:{name:"Panama",flag:"🇵🇦"},PCN:{name:"Pitcairn",flag:"🇵🇳"},PER:{name:"Peru",flag:"🇵🇪"},PHL:{name:"Philippines",flag:"🇵🇭"},PLW:{name:"Palau",flag:"🇵🇼"},PNG:{name:"Papua New Guinea",flag:"🇵🇬"},POL:{name:"Poland",flag:"🇵🇱"},PRI:{name:"Puerto Rico",flag:"🇵🇷"},PRK:{name:"Korea (Democratic People's Republic of)",flag:"🇰🇵"},PRT:{name:"Portugal",flag:"🇵🇹"},PRY:{name:"Paraguay",flag:"🇵🇾"},PSE:{name:"Palestine, State of",flag:"🇵🇸"},PYF:{name:"French Polynesia",flag:"🇵🇫"},QAT:{name:"Qatar",flag:"🇶🇦"},REU:{name:"Réunion",flag:"🇷🇪"},ROU:{name:"Romania",flag:"🇷🇴"},RUS:{name:"Russian Federation",flag:"🇷🇺"},RWA:{name:"Rwanda",flag:"🇷🇼"},SAU:{name:"Saudi Arabia",flag:"🇸🇦"},SDN:{name:"Sudan",flag:"🇸🇩"},SEN:{name:"Senegal",flag:"🇸🇳"},SGP:{name:"Singapore",flag:"🇸🇬"},SGS:{name:"South Georgia and the South Sandwich Islands",flag:"🇬🇸"},SHN:{name:"Saint Helena, Ascension and Tristan da Cunha",flag:"🇸🇭"},SJM:{name:"Svalbard and Jan Mayen",flag:"🇸🇯"},SLB:{name:"Solomon Islands",flag:"🇸🇧"},SLE:{name:"Sierra Leone",flag:"🇸🇱"},SLV:{name:"El Salvador",flag:"🇸🇻"},SMR:{name:"San Marino",flag:"🇸🇲"},SOM:{name:"Somalia",flag:"🇸🇴"},SPM:{name:"Saint Pierre and Miquelon",flag:"🇵🇲"},SRB:{name:"Serbia",flag:"🇷🇸"},SSD:{name:"South Sudan",flag:"🇸🇸"},STP:{name:"Sao Tome and Principe",flag:"🇸🇹"},SUR:{name:"Suriname",flag:"🇸🇷"},SVK:{name:"Slovakia",flag:"🇸🇰"},SVN:{name:"Slovenia",flag:"🇸🇮"},SWE:{name:"Sweden",flag:"🇸🇪"},SWZ:{name:"Eswatini",flag:"🇸🇿"},SXM:{name:"Sint Maarten (Dutch part)",flag:"🇸🇽"},SYC:{name:"Seychelles",flag:"🇸🇨"},SYR:{name:"Syrian Arab Republic",flag:"🇸🇾"},TCA:{name:"Turks and Caicos Islands",flag:"🇹🇨"},TCD:{name:"Chad",flag:"🇹🇩"},TGO:{name:"Togo",flag:"🇹🇬"},THA:{name:"Thailand",flag:"🇹🇭"},TJK:{name:"Tajikistan",flag:"🇹🇯"},TKL:{name:"Tokelau",flag:"🇹🇰"},TKM:{name:"Turkmenistan",flag:"🇹🇲"},TLS:{name:"Timor-Leste",flag:"🇹🇱"},TON:{name:"Tonga",flag:"🇹🇴"},TTO:{name:"Trinidad and Tobago",flag:"🇹🇹"},TUN:{name:"Tunisia",flag:"🇹🇳"},TUR:{name:"Türkiye",flag:"🇹🇷"},TUV:{name:"Tuvalu",flag:"🇹🇻"},TWN:{name:"Taiwan",flag:"🇹🇼"},TZA:{name:"Tanzania",flag:"🇹🇿"},UGA:{name:"Uganda",flag:"🇺🇬"},UKR:{name:"Ukraine",flag:"🇺🇦"},UMI:{name:"United States Minor Outlying Islands",flag:"🇺🇲"},URY:{name:"Uruguay",flag:"🇺🇾"},USA:{name:"United States of America",flag:"🇺🇸"},UZB:{name:"Uzbekistan",flag:"🇺🇿"},VAT:{name:"Holy See",flag:"🇻🇦"},VCT:{name:"Saint Vincent and the Grenadines",flag:"🇻🇨"},VEN:{name:"Venezuela",flag:"🇻🇪"},VGB:{name:"Virgin Islands (British)",flag:"🇻🇬"},VIR:{name:"Virgin Islands (U.S.)",flag:"🇻🇮"},VNM:{name:"Vietnam",flag:"🇻🇳"},VUT:{name:"Vanuatu",flag:"🇻🇺"},WLF:{name:"Wallis and Futuna",flag:"🇼🇫"},WSM:{name:"Samoa",flag:"🇼🇸"},YEM:{name:"Yemen",flag:"🇾🇪"},ZAF:{name:"South Africa",flag:"🇿🇦"},ZMB:{name:"Zambia",flag:"🇿🇲"},ZWE:{name:"Zimbabwe",flag:"🇿🇼"}},getFormattedCountryName=Le=>{const Be=countryCodeToInfo[Le];return Be?`${Be.flag} ${Be.name}`:void 0},blobToBase64=Le=>new Promise((Be,Ye)=>{const tt=new FileReader;tt.onloadend=()=>{const nt=tt.result;Be(nt.split(",")[1])},tt.onerror=Ye,tt.readAsDataURL(Le)}),useEventListener=(Le,Be,Ye=window)=>{const tt=React.useRef(()=>{});React.useEffect(()=>{tt.current=Be},[Be]),React.useEffect(()=>{if(!(Ye&&Ye.addEventListener))return;const ft=ht=>{var gt;return(gt=tt==null?void 0:tt.current)==null?void 0:gt.call(tt,ht)};return Ye.addEventListener(Le,ft),()=>{Ye.removeEventListener(Le,ft)}},[Le,Ye])},globalState={},createGlobalState=(Le,Be,Ye)=>(globalState[Le]||(globalState[Le]={callbacks:[],value:Ye}),globalState[Le].callbacks.push(Be),{deregister(){const tt=globalState[Le].callbacks,nt=tt.indexOf(Be);nt>-1&&tt.splice(nt,1)},emit(tt){globalState[Le].value!==tt&&(globalState[Le].value=tt,globalState[Le].callbacks.forEach(nt=>{Be!==nt&&nt(tt)}))}}),usePersistedState=(Le,Be,{get:Ye,set:tt})=>{const nt=React.useRef(null),[ft,ht]=React.useState(()=>Ye(Be,Le));return useEventListener("storage",({key:gt,newValue:At})=>{if(gt===Be){const xt=JSON.parse(At);ft!==xt&&ht(xt)}}),React.useEffect(()=>(nt.current=createGlobalState(Be,ht,Le),()=>{var gt,At;(At=(gt=nt==null?void 0:nt.current)==null?void 0:gt.deregister)==null||At.call(gt)}),[]),React.useEffect(()=>{var gt,At;tt(Be,ft),(At=(gt=nt==null?void 0:nt.current)==null?void 0:gt.emit)==null||At.call(gt,ft)},[Be,tt,ft]),[ft,ht]},createStorage=Le=>({get(Be,Ye){const tt=Le.getItem(Be);return tt===null?typeof Ye=="function"?Ye():Ye:JSON.parse(tt)},set(Be,Ye){Le.setItem(Be,JSON.stringify(Ye))}}),createPersistedState=(Le,Be)=>{if(!Be&&typeof window<"u")try{Be=localStorage}catch{Be=null}if(Be){const Ye=createStorage(Be);return tt=>usePersistedState(tt,Le,Ye)}return React.useState},useSessionState=createPersistedState("sessionData");function usePermissions(){const[Le,Be]=React.useState(!1),[Ye,tt]=React.useState(!1);return React.useEffect(()=>{var nt;if(!navigator.permissions){tt(!0);return}(nt=navigator.permissions)==null||nt.query({name:"camera"}).then(ft=>{ft.state==="granted"&&(Be(!0),tt(!1)),ft.state==="prompt"&&tt(!0)}).catch(()=>{Be(!1),tt(!1)})},[]),[Le,Be,Ye]}function useInterval(Le,Be){const Ye=React.useRef(Le),tt=React.useRef(null);return Ye.current=Le,React.useEffect(()=>{function nt(){Ye.current()}if(Be!==null)return tt.current=setInterval(nt,Be),()=>clearInterval(tt.current)},[Be]),tt.current}const resize=async()=>{await sleep(100);const Le=window.innerWidth*.01,Be=window.innerHeight*.01;document.documentElement.style.setProperty("--vw",`${Le}px`),document.documentElement.style.setProperty("--vh",`${Be}px`)},useResize=Le=>{const{isRotated:Be}=useOrientation();useEventListener("resize",()=>{resize()},window),React.useLayoutEffect(()=>{mobile.any()&&Be&&!Le||resize()},[Be,Le])},isPortrait=()=>{var Le;return((Le=screen.orientation)==null?void 0:Le.type.includes("portrait"))||Math.abs(window.orientation)===0};function useOrientation(){const Le=getUxType(),Be=Le==="mobile"?!1:!isPortrait(),[Ye,tt]=React.useState(Be),nt=mobile.isDesktop();return React.useEffect(()=>{if(Le==="mobile")return;function ft(){tt(!isPortrait()),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),window.focus()}return screen.orientation?screen.orientation.addEventListener("change",ft):window.addEventListener("orientationchange",ft),()=>{screen.orientation?screen.orientation.removeEventListener("change",ft):window.removeEventListener("orientationchange",ft)}},[Le]),useEventListener("resize",()=>{isMobile$1&&tt(!isPortrait())},window),{isRotated:nt?!1:Ye}}const handleUnmountRoot=(Le,Be,Ye)=>(...tt)=>{setTimeout(()=>{if("createRoot"in ReactDOM__namespace)Be.unmount();else if(typeof ReactDOM__namespace.unmountComponentAtNode=="function")ReactDOM__namespace.unmountComponentAtNode(Ye);else throw new Error("Unsupported React version");Le(...tt)},0)},createRoot$1=Le=>{if("createRoot"in ReactDOM__namespace)return ReactDOM__namespace.createRoot(Le);if(typeof ReactDOM__namespace.render=="function")return ReactDOM__namespace.render;throw new Error("Unsupported React version")},customRender=(Le,Be,Ye)=>{if("createRoot"in ReactDOM__namespace)Ye.render(Le);else if(typeof Ye=="function")Ye(Le,Be);else throw new Error("Unsupported React version")};function useQuery(){return React.useMemo(()=>new URLSearchParams(window.location.search),[])}function useSteps(Le=0){const[Be,Ye]=React.useState(Le),tt=React.useCallback(()=>{Ye(nt=>nt+1)},[]);return{currentStep:Be,setStep:Ye,nextStep:tt}}function useOffline(Le=emptyFunc){useEventListener("offline",()=>{navigator.onLine||Le()})}function useToggle(Le=!1){const[Be,Ye]=React.useState(Le);return{state:Be,actions:{on:()=>{Ye(!0)},off:()=>{Ye(!1)},toggle:()=>{Ye(nt=>!nt)},reset:()=>{Ye(Le)}}}}function useClickOutside(Le,Be){const Ye=React.useRef();React.useEffect(()=>{Ye.current=Be;const tt=nt=>{var ft;!(Le!=null&&Le.current)||(ft=Le==null?void 0:Le.current)!=null&&ft.contains(nt.target)||Be()};return document.addEventListener("mousedown",tt,!0),document.addEventListener("touchstart",tt,!0),()=>{document.removeEventListener("mousedown",tt),document.removeEventListener("touchstart",tt)}},[Be,Le])}function useScript(Le,Be){React.useEffect(()=>{const Ye=document.createElement("script");return Ye.src=Le,Ye.type="text/javascript",Ye.async=!0,Ye.onload=Be,document.body.appendChild(Ye),()=>{document.body.removeChild(Ye)}},[Le])}const useUpdateQueryParamsAndReload=()=>{const Le=window.location;return Ye=>{const tt=new URLSearchParams(Le.search);Object.keys(Ye).forEach(ft=>{const ht=Ye[ft];ht==null?tt.delete(ft):tt.set(ft,ht)});const nt=`${Le.pathname}?${tt.toString()}`;window.location.href=nt}},useDocumentTitle=Le=>{React.useEffect(()=>{document.title=Le},[Le])},useAutoFocus=(Le,Be=!1)=>{React.useEffect(()=>(Le.current&&(Le.current.focus(),Le.current.blur()),()=>{Be&&Le.current&&Le.current.blur()}),[Le,Be])};function useDeviceId(){const[Le,Be]=React.useState();return[Le,tt=>{Be(tt)}]}function useDebouncedValue(Le,Be=250){const[Ye,tt]=React.useState(Le);return React.useEffect(()=>{const nt=setTimeout(()=>{tt(Le)},Be);return()=>{clearTimeout(nt)}},[Le,Be]),Ye}function useViewportSize(){const[Le,Be]=React.useState({width:window.innerWidth,height:window.innerHeight});return React.useEffect(()=>{let Ye=null,tt=null;const nt=()=>{tt&&window.clearTimeout(tt),tt=window.setTimeout(()=>{Be({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})},100)};return"ResizeObserver"in window?(Ye=new ResizeObserver(nt),Ye.observe(document.documentElement)):window.addEventListener("resize",nt),nt(),()=>{Ye?Ye.disconnect():window.removeEventListener("resize",nt),tt&&window.clearTimeout(tt)}},[]),Le}const backCameraKeywords=["rear","back","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक"],cameraObjects=new Map;let getCamerasPromise;function isBackCameraLabel(Le){const Be=Le.toLowerCase();return backCameraKeywords.some(Ye=>Be.includes(Ye))}function createCamera(Le,Be,Ye){var Et,kt;if(cameraObjects.has(Le.deviceId))return cameraObjects.get(Le.deviceId);const tt=Le.label,nt=Le.getCapabilities(),ft=(Et=nt==null?void 0:nt.width)==null?void 0:Et.max,ht=(kt=nt==null?void 0:nt.height)==null?void 0:kt.max,gt=nt==null?void 0:nt.aspectRatio;let At;Ye.every(Ct=>Ct.label==="")?At=Ye.length===1||Be+1<=Ye.length/2?"front":"back":At=isBackCameraLabel(tt)?"back":"front";const xt={deviceId:Le.deviceId,label:tt,cameraType:At,width:ft,height:ht,aspectRatio:gt};return cameraObjects.set(Le.deviceId,xt),xt}function extractCamerasFromDevices(Le){const Be=Le.filter(Ye=>Ye.kind==="videoinput").map(createCamera);if(Be.length>1&&!Be.some(Ye=>Ye.cameraType==="back")){let Ye=Be.length-1;const tt=Be.map(nt=>{const ft=nt.label.match(/\b([0-9]+)MP?\b/i);return ft!=null?parseInt(ft[1],10):NaN});tt.some(nt=>isNaN(nt))||(Ye=tt.lastIndexOf(Math.max(...tt))),Be[Ye].cameraType="back"}return Be}function adjustCamerasFromCameraStream(Le,Be){const Ye=Le.getSettings(),tt=Be.find(nt=>nt.deviceId===Ye.deviceId||nt.label!==""&&nt.label===Le.label);if(tt!==void 0){if((Ye!=null&&Ye.facingMode==="environment"||isBackCameraLabel(Le.label))&&Be.length>1)return Be.forEach(ft=>{ft.deviceId===tt.deviceId?ft.cameraType="back":isBackCameraLabel(ft.label)||(ft.cameraType="front")}),Be.filter(ft=>ft.cameraType==="back").sort((ft,ht)=>ft.label.localeCompare(ht.label))[0];if(Be.length===1)return tt}}function getCameras(){return getCamerasPromise!=null||(getCamerasPromise=new Promise(async Le=>{const Be=await navigator.mediaDevices.enumerateDevices(),Ye=extractCamerasFromDevices(Be);return Le(Ye)})),getCamerasPromise}function getUserMediaVideoParams(Le){const Be={resizeMode:"none",facingMode:"environment"};switch(Le){case 0:return{...Be,height:{ideal:720},aspectRatio:{ideal:19.5/9}};case 1:return{...Be,width:{min:3200,ideal:3840,max:4096},height:{min:1800,ideal:2160,max:2400}};case 2:return{...Be,width:{min:1400,ideal:1920,max:2160},height:{min:900,ideal:1080,max:1440}};case 3:return{...Be,width:{min:640,ideal:640,max:800},height:{min:480,ideal:480,max:600}};case 4:return{...Be,width:{min:640,ideal:800,max:960},height:{min:480,ideal:480,max:480}};default:return{}}}const selfieConstraints={video:{facingMode:"user",height:{ideal:480},width:{ideal:640}}},killStream=(Le,Be=!1)=>{if(Be){Le.getVideoTracks().forEach(Ye=>Ye.stop());return}Le.getTracks().forEach(Ye=>Ye.stop())},selfieChecks=({confidence:Le,isBright:Be,hasLenses:Ye,hasFaceMask:tt,hasClosedEyes:nt,hasHeadCover:ft},{hatCheckEnabled:ht=!1,lensesCheckEnabled:gt=!1,maskCheckEnabled:At=!1,eyesClosedCheckEnabled:xt=!1})=>{const Et=Le===0,kt=Be,Ct=gt?!Ye:!0,yt=At?!tt:!0,vt=xt?!nt:!0,bt=ht?!ft:!0;return{livenessPassed:Et,brightnessPassed:kt,lensesPassed:Ct,maskPassed:yt,closedEyesPassed:vt,headCoverPassed:bt,hasErrors:!Et||!kt||!Ct||!yt||!vt||!bt}},logSelfieChecks=(Le,Be,Ye,tt,nt,ft,ht)=>{const gt=[{passed:Be.headCoverPassed,log:"headCoverDected",notification:"notifications.removeHeadwear",description:getSelfieTranslation("removeHeadwear",ht),message:"Hat detected"},{passed:Be.lensesPassed,log:"lensesDetected",notification:"notifications.lenses",description:getSelfieTranslation("lenses",ht),message:"Lenses detected"},{passed:Be.brightnessPassed,log:"badBrightness",notification:"notifications.brightness",description:"notifications.brightnessDescription",message:"Bad brightness"},{passed:Be.maskPassed,log:"badMask",notification:"notifications.mask",description:getSelfieTranslation("mask",ht),message:"Mask detected"},{passed:Be.livenessPassed,log:"spoofAttempt",notification:"notifications.spoof",description:"notifications.spoofDescription",message:"Spoof attempt detected"},{passed:Be.closedEyesPassed,log:"closedEyes",notification:"notifications.closedEyes",description:getSelfieTranslation("closedEyes",ht),message:"Closed eyes detected"}];for(const{passed:At,log:xt,message:Et,notification:kt,description:Ct}of gt)if(!At){Ye(getLogObject(xt,{response:Le,message:Et})),tt(nt(kt)),ft==null||ft(nt(Ct));break}},getIdealContraintsDefault=(Le=720)=>({audio:!1,video:{resizeMode:"none",facingMode:"environment",height:{ideal:Le},aspectRatio:{ideal:19.5/9}}}),getStream=async(Le,Be=0)=>{if(Le==="user")return navigator.mediaDevices.getUserMedia(selfieConstraints);if(mobile.iOS()){const tt=await navigator.mediaDevices.getUserMedia(getIOSConstraints());return await tt.getVideoTracks()[0].applyConstraints({advanced:[{focusDistance:1}]}),tt}try{const tt=await getCameras(),nt=await navigator.mediaDevices.getUserMedia({video:getUserMediaVideoParams(Be)}),ft=nt.getVideoTracks()[0],ht=adjustCamerasFromCameraStream(ft,tt);killStream(nt);let gt=1280,At=720;if(Be>1){const{width:kt,height:Ct}=getUserMediaVideoParams(Be);gt=kt.ideal,At=Ct.ideal}const xt={video:{deviceId:{exact:ht.deviceId},width:{ideal:gt},height:{ideal:At}}};return await navigator.mediaDevices.getUserMedia(xt)}catch(tt){if(Be===5)throw tt;return getStream(Le,Be+1)}},getIOSConstraints=()=>getIdealContraintsDefault(localStorage.getItem("isHighPerformance")==="true"?1080:720);async function chooseNonUltraFrontCameraMultilingual(){const Le=["front","frontal","vorderseite","avant","前面","正面","앞"],Be=["ultra","ウルトラ","울트라"];try{const tt=(await navigator.mediaDevices.enumerateDevices()).find(nt=>{const ft=nt.label.toLowerCase();return nt.kind==="videoinput"&&Le.some(ht=>ft.includes(ht.toLowerCase()))&&!Be.some(ht=>ft.includes(ht.toLowerCase()))});return tt?tt.deviceId:null}catch{return null}}async function getNonUltraWideFrontCameraStream(){const Le=await navigator.mediaDevices.getUserMedia({video:{facingMode:"user"},audio:!1});killStream(Le);const Be=await chooseNonUltraFrontCameraMultilingual();return navigator.mediaDevices.getUserMedia({video:{deviceId:Be}})}const zoomCamera=async(Le,Be)=>{if(!Le)return!1;const Ye=Le.getSettings(),tt=Le.getCapabilities();return"zoom"in Ye||tt.zoom?(await Le.applyConstraints({advanced:[{zoom:tt.zoom.min&&Be<tt.zoom.min||tt.zoom.max&&Be>tt.zoom.max||Be}]}),!0):!1};async function base64ToImageData(Le){const Ye=await(await fetch(`data:image/jpeg;base64,${Le}`)).blob(),tt=new Image,nt=new Promise((gt,At)=>{tt.onload=gt,tt.onerror=At});tt.src=URL.createObjectURL(Ye),await nt;const ft=document.createElement("canvas");ft.width=tt.width,ft.height=tt.height;const ht=ft.getContext("2d");return ht.drawImage(tt,0,0),ht.getImageData(0,0,tt.width,tt.height)}function getChosenCameraInfo(Le,Be=null,Ye=null){const tt=Le.getCapabilities(),nt=Le.getSettings(),{focusMode:ft=!1}=navigator.mediaDevices.getSupportedConstraints();return{label:Le.label,deviceId:nt.deviceId,fallbackOption:Be,videoSource:Ye,resolution:`${nt.width}x${nt.height}`,autofocus:ft,facingMode:nt.facingMode,currentFrameRate:nt.frameRate,zoom:tt.zoom?{current:nt.zoom,min:tt.zoom.min,max:tt.zoom.max,step:tt.zoom.step}:void 0,focusDistance:tt.focusDistance?{current:nt.focusDistance,min:tt.focusDistance.min,max:tt.focusDistance.max,step:tt.focusDistance.step}:void 0}}async function getDeviceCapabilities(){const Le={};try{(await navigator.mediaDevices.enumerateDevices()).filter(tt=>tt.kind==="videoinput").forEach((tt,nt)=>{const ft=tt.getCapabilities();Le[`camera${nt+1}`]={label:tt.label,width:{min:ft.width.min,max:ft.width.max},height:{min:ft.height.min,max:ft.height.max},frameRate:{min:ft.frameRate.min,max:ft.frameRate.max},facingMode:ft.facingMode,focusMode:ft.focusMode||void 0,focusDistance:ft.focusDistance?{min:ft.focusDistance.min,max:ft.focusDistance.max}:void 0}})}catch(Be){console.log("Unable to get device capabilities: ",Be)}return Le}const translations={removeLenses:{default:"notifications.removeLenses",assisted:"notifications.removeLensesAssisted"},openEyes:{default:"notifications.openEyes",assisted:"notifications.openEyesAssisted"},removeMask:{default:"notifications.removeMask",assisted:"notifications.removeMaskAssisted"},ageAssurance:{default:"notifications.selfie.ageAssurance",assisted:"notifications.selfie.ageAssuranceAssisted"},removeHeadwear:{default:"notifications.removeHeadwearDescription",assisted:"notifications.removeHeadwearDescriptionAssisted"},lenses:{default:"notifications.lensesDescription",assisted:"notifications.lensesDescriptionAssisted"},mask:{assisted:"notifications.maskDescriptionAssisted",default:"notifications.maskDescription"},closedEyes:{assisted:"notifications.closedEyesDescriptionAssisted",default:"notifications.closedEyesDescription"}},getSelfieTranslation=(Le,Be)=>{const Ye=translations[Le];return Be?Ye.assisted:Ye.default},getSupportedMediaRecorderMimeType=()=>{const Le=mobile.iOS()?["video/mp4","video/webm","video/webm;codecs=vp9","video/webm;codecs=vp8"]:["video/webm","video/webm;codecs=vp9","video/webm;codecs=vp8","video/mp4"];for(const Be of Le)if(MediaRecorder.isTypeSupported(Be))return Be;return""},getMediaStreamTrackSettings=Le=>{const Be=Le.getSettings(),{width:Ye,height:tt,...nt}=Be;return mobile.isIpad()||!Ye||!tt?Be:mobile.any()&&tt<Ye?{...nt,width:tt,height:Ye}:Be};class Semaphore{constructor(Be=1){this.maxConcurrent=Be,this.current=0,this.queue=[]}async acquire(){return this.current<this.maxConcurrent?(this.current++,Promise.resolve()):new Promise(Be=>{this.queue.push(Be)})}release(){if(this.current=Math.max(0,this.current-1),this.queue.length>0&&this.current<this.maxConcurrent){this.current++;const Be=this.queue.shift();Be&&Be()}}}class Mutex{constructor(){this.semaphore=new Semaphore(1)}async lock(){return this.semaphore.acquire()}unlock(){this.semaphore.release()}async withLock(Be,...Ye){await this.lock();try{return await Be(...Ye)}finally{this.unlock()}}}var __assign$3=function(){return __assign$3=Object.assign||function(Be){for(var Ye,tt=1,nt=arguments.length;tt<nt;tt++){Ye=arguments[tt];for(var ft in Ye)Object.prototype.hasOwnProperty.call(Ye,ft)&&(Be[ft]=Ye[ft])}return Be},__assign$3.apply(this,arguments)};function __spreadArray$2(Le,Be,Ye){if(Ye||arguments.length===2)for(var tt=0,nt=Be.length,ft;tt<nt;tt++)(ft||!(tt in Be))&&(ft||(ft=Array.prototype.slice.call(Be,0,tt)),ft[tt]=Be[tt]);return Le.concat(ft||Array.prototype.slice.call(Be))}typeof SuppressedError=="function"&&SuppressedError;function memoize$1(Le){var Be=Object.create(null);return function(Ye){return Be[Ye]===void 0&&(Be[Ye]=Le(Ye)),Be[Ye]}}var reactPropsRegex$1=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid$1=memoize$1(function(Le){return reactPropsRegex$1.test(Le)||Le.charCodeAt(0)===111&&Le.charCodeAt(1)===110&&Le.charCodeAt(2)<91}),MS$1="-ms-",MOZ$1="-moz-",WEBKIT$1="-webkit-",COMMENT$1="comm",RULESET$1="rule",DECLARATION$1="decl",IMPORT$1="@import",KEYFRAMES$1="@keyframes",LAYER$1="@layer",abs$1=Math.abs,from$1=String.fromCharCode,assign$1=Object.assign;function hash$1(Le,Be){return charat$1(Le,0)^45?(((Be<<2^charat$1(Le,0))<<2^charat$1(Le,1))<<2^charat$1(Le,2))<<2^charat$1(Le,3):0}function trim$3(Le){return Le.trim()}function match$1(Le,Be){return(Le=Be.exec(Le))?Le[0]:Le}function replace$1(Le,Be,Ye){return Le.replace(Be,Ye)}function indexof$1(Le,Be,Ye){return Le.indexOf(Be,Ye)}function charat$1(Le,Be){return Le.charCodeAt(Be)|0}function substr$1(Le,Be,Ye){return Le.slice(Be,Ye)}function strlen$1(Le){return Le.length}function sizeof$1(Le){return Le.length}function append$1(Le,Be){return Be.push(Le),Le}function combine$1(Le,Be){return Le.map(Be).join("")}function filter$1(Le,Be){return Le.filter(function(Ye){return!match$1(Ye,Be)})}var line$1=1,column$1=1,length$1=0,position$4=0,character$1=0,characters$1="";function node$2(Le,Be,Ye,tt,nt,ft,ht,gt){return{value:Le,root:Be,parent:Ye,type:tt,props:nt,children:ft,line:line$1,column:column$1,length:ht,return:"",siblings:gt}}function copy$2(Le,Be){return assign$1(node$2("",null,null,"",null,null,0,Le.siblings),Le,{length:-Le.length},Be)}function lift(Le){for(;Le.root;)Le=copy$2(Le.root,{children:[Le]});append$1(Le,Le.siblings)}function char$1(){return character$1}function prev$1(){return character$1=position$4>0?charat$1(characters$1,--position$4):0,column$1--,character$1===10&&(column$1=1,line$1--),character$1}function next$2(){return character$1=position$4<length$1?charat$1(characters$1,position$4++):0,column$1++,character$1===10&&(column$1=1,line$1++),character$1}function peek$1(){return charat$1(characters$1,position$4)}function caret$1(){return position$4}function slice$3(Le,Be){return substr$1(characters$1,Le,Be)}function token$1(Le){switch(Le){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc$1(Le){return line$1=column$1=1,length$1=strlen$1(characters$1=Le),position$4=0,[]}function dealloc$1(Le){return characters$1="",Le}function delimit$1(Le){return trim$3(slice$3(position$4-1,delimiter$1(Le===91?Le+2:Le===40?Le+1:Le)))}function whitespace$2(Le){for(;(character$1=peek$1())&&character$1<33;)next$2();return token$1(Le)>2||token$1(character$1)>3?"":" "}function escaping$1(Le,Be){for(;--Be&&next$2()&&!(character$1<48||character$1>102||character$1>57&&character$1<65||character$1>70&&character$1<97););return slice$3(Le,caret$1()+(Be<6&&peek$1()==32&&next$2()==32))}function delimiter$1(Le){for(;next$2();)switch(character$1){case Le:return position$4;case 34:case 39:Le!==34&&Le!==39&&delimiter$1(character$1);break;case 40:Le===41&&delimiter$1(Le);break;case 92:next$2();break}return position$4}function commenter$1(Le,Be){for(;next$2()&&Le+character$1!==57;)if(Le+character$1===84&&peek$1()===47)break;return"/*"+slice$3(Be,position$4-1)+"*"+from$1(Le===47?Le:next$2())}function identifier$1(Le){for(;!token$1(peek$1());)next$2();return slice$3(Le,position$4)}function compile$1(Le){return dealloc$1(parse$9("",null,null,null,[""],Le=alloc$1(Le),0,[0],Le))}function parse$9(Le,Be,Ye,tt,nt,ft,ht,gt,At){for(var xt=0,Et=0,kt=ht,Ct=0,yt=0,vt=0,bt=1,It=1,wt=1,Rt=0,Tt="",Bt=nt,Dt=ft,Pt=tt,Nt=Tt;It;)switch(vt=Rt,Rt=next$2()){case 40:if(vt!=108&&charat$1(Nt,kt-1)==58){indexof$1(Nt+=replace$1(delimit$1(Rt),"&","&\f"),"&\f",abs$1(xt?gt[xt-1]:0))!=-1&&(wt=-1);break}case 34:case 39:case 91:Nt+=delimit$1(Rt);break;case 9:case 10:case 13:case 32:Nt+=whitespace$2(vt);break;case 92:Nt+=escaping$1(caret$1()-1,7);continue;case 47:switch(peek$1()){case 42:case 47:append$1(comment$3(commenter$1(next$2(),caret$1()),Be,Ye,At),At);break;default:Nt+="/"}break;case 123*bt:gt[xt++]=strlen$1(Nt)*wt;case 125*bt:case 59:case 0:switch(Rt){case 0:case 125:It=0;case 59+Et:wt==-1&&(Nt=replace$1(Nt,/\f/g,"")),yt>0&&strlen$1(Nt)-kt&&append$1(yt>32?declaration$1(Nt+";",tt,Ye,kt-1,At):declaration$1(replace$1(Nt," ","")+";",tt,Ye,kt-2,At),At);break;case 59:Nt+=";";default:if(append$1(Pt=ruleset$1(Nt,Be,Ye,xt,Et,nt,gt,Tt,Bt=[],Dt=[],kt,ft),ft),Rt===123)if(Et===0)parse$9(Nt,Be,Pt,Pt,Bt,ft,kt,gt,Dt);else switch(Ct===99&&charat$1(Nt,3)===110?100:Ct){case 100:case 108:case 109:case 115:parse$9(Le,Pt,Pt,tt&&append$1(ruleset$1(Le,Pt,Pt,0,0,nt,gt,Tt,nt,Bt=[],kt,Dt),Dt),nt,Dt,kt,gt,tt?Bt:Dt);break;default:parse$9(Nt,Pt,Pt,Pt,[""],Dt,0,gt,Dt)}}xt=Et=yt=0,bt=wt=1,Tt=Nt="",kt=ht;break;case 58:kt=1+strlen$1(Nt),yt=vt;default:if(bt<1){if(Rt==123)--bt;else if(Rt==125&&bt++==0&&prev$1()==125)continue}switch(Nt+=from$1(Rt),Rt*bt){case 38:wt=Et>0?1:(Nt+="\f",-1);break;case 44:gt[xt++]=(strlen$1(Nt)-1)*wt,wt=1;break;case 64:peek$1()===45&&(Nt+=delimit$1(next$2())),Ct=peek$1(),Et=kt=strlen$1(Tt=Nt+=identifier$1(caret$1())),Rt++;break;case 45:vt===45&&strlen$1(Nt)==2&&(bt=0)}}return ft}function ruleset$1(Le,Be,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt){for(var Ct=nt-1,yt=nt===0?ft:[""],vt=sizeof$1(yt),bt=0,It=0,wt=0;bt<tt;++bt)for(var Rt=0,Tt=substr$1(Le,Ct+1,Ct=abs$1(It=ht[bt])),Bt=Le;Rt<vt;++Rt)(Bt=trim$3(It>0?yt[Rt]+" "+Tt:replace$1(Tt,/&\f/g,yt[Rt])))&&(At[wt++]=Bt);return node$2(Le,Be,Ye,nt===0?RULESET$1:gt,At,xt,Et,kt)}function comment$3(Le,Be,Ye,tt){return node$2(Le,Be,Ye,COMMENT$1,from$1(char$1()),substr$1(Le,2,-2),0,tt)}function declaration$1(Le,Be,Ye,tt,nt){return node$2(Le,Be,Ye,DECLARATION$1,substr$1(Le,0,tt),substr$1(Le,tt+1,-1),tt,nt)}function prefix$2(Le,Be,Ye){switch(hash$1(Le,Be)){case 5103:return WEBKIT$1+"print-"+Le+Le;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT$1+Le+Le;case 4789:return MOZ$1+Le+Le;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT$1+Le+MOZ$1+Le+MS$1+Le+Le;case 5936:switch(charat$1(Le,Be+11)){case 114:return WEBKIT$1+Le+MS$1+replace$1(Le,/[svh]\w+-[tblr]{2}/,"tb")+Le;case 108:return WEBKIT$1+Le+MS$1+replace$1(Le,/[svh]\w+-[tblr]{2}/,"tb-rl")+Le;case 45:return WEBKIT$1+Le+MS$1+replace$1(Le,/[svh]\w+-[tblr]{2}/,"lr")+Le}case 6828:case 4268:case 2903:return WEBKIT$1+Le+MS$1+Le+Le;case 6165:return WEBKIT$1+Le+MS$1+"flex-"+Le+Le;case 5187:return WEBKIT$1+Le+replace$1(Le,/(\w+).+(:[^]+)/,WEBKIT$1+"box-$1$2"+MS$1+"flex-$1$2")+Le;case 5443:return WEBKIT$1+Le+MS$1+"flex-item-"+replace$1(Le,/flex-|-self/g,"")+(match$1(Le,/flex-|baseline/)?"":MS$1+"grid-row-"+replace$1(Le,/flex-|-self/g,""))+Le;case 4675:return WEBKIT$1+Le+MS$1+"flex-line-pack"+replace$1(Le,/align-content|flex-|-self/g,"")+Le;case 5548:return WEBKIT$1+Le+MS$1+replace$1(Le,"shrink","negative")+Le;case 5292:return WEBKIT$1+Le+MS$1+replace$1(Le,"basis","preferred-size")+Le;case 6060:return WEBKIT$1+"box-"+replace$1(Le,"-grow","")+WEBKIT$1+Le+MS$1+replace$1(Le,"grow","positive")+Le;case 4554:return WEBKIT$1+replace$1(Le,/([^-])(transform)/g,"$1"+WEBKIT$1+"$2")+Le;case 6187:return replace$1(replace$1(replace$1(Le,/(zoom-|grab)/,WEBKIT$1+"$1"),/(image-set)/,WEBKIT$1+"$1"),Le,"")+Le;case 5495:case 3959:return replace$1(Le,/(image-set\([^]*)/,WEBKIT$1+"$1$`$1");case 4968:return replace$1(replace$1(Le,/(.+:)(flex-)?(.*)/,WEBKIT$1+"box-pack:$3"+MS$1+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT$1+Le+Le;case 4200:if(!match$1(Le,/flex-|baseline/))return MS$1+"grid-column-align"+substr$1(Le,Be)+Le;break;case 2592:case 3360:return MS$1+replace$1(Le,"template-","")+Le;case 4384:case 3616:return Ye&&Ye.some(function(tt,nt){return Be=nt,match$1(tt.props,/grid-\w+-end/)})?~indexof$1(Le+(Ye=Ye[Be].value),"span",0)?Le:MS$1+replace$1(Le,"-start","")+Le+MS$1+"grid-row-span:"+(~indexof$1(Ye,"span",0)?match$1(Ye,/\d+/):+match$1(Ye,/\d+/)-+match$1(Le,/\d+/))+";":MS$1+replace$1(Le,"-start","")+Le;case 4896:case 4128:return Ye&&Ye.some(function(tt){return match$1(tt.props,/grid-\w+-start/)})?Le:MS$1+replace$1(replace$1(Le,"-end","-span"),"span ","")+Le;case 4095:case 3583:case 4068:case 2532:return replace$1(Le,/(.+)-inline(.+)/,WEBKIT$1+"$1$2")+Le;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen$1(Le)-1-Be>6)switch(charat$1(Le,Be+1)){case 109:if(charat$1(Le,Be+4)!==45)break;case 102:return replace$1(Le,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT$1+"$2-$3$1"+MOZ$1+(charat$1(Le,Be+3)==108?"$3":"$2-$3"))+Le;case 115:return~indexof$1(Le,"stretch",0)?prefix$2(replace$1(Le,"stretch","fill-available"),Be,Ye)+Le:Le}break;case 5152:case 5920:return replace$1(Le,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(tt,nt,ft,ht,gt,At,xt){return MS$1+nt+":"+ft+xt+(ht?MS$1+nt+"-span:"+(gt?At:+At-+ft)+xt:"")+Le});case 4949:if(charat$1(Le,Be+6)===121)return replace$1(Le,":",":"+WEBKIT$1)+Le;break;case 6444:switch(charat$1(Le,charat$1(Le,14)===45?18:11)){case 120:return replace$1(Le,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+WEBKIT$1+(charat$1(Le,14)===45?"inline-":"")+"box$3$1"+WEBKIT$1+"$2$3$1"+MS$1+"$2box$3")+Le;case 100:return replace$1(Le,":",":"+MS$1)+Le}break;case 5719:case 2647:case 2135:case 3927:case 2391:return replace$1(Le,"scroll-","scroll-snap-")+Le}return Le}function serialize$2(Le,Be){for(var Ye="",tt=0;tt<Le.length;tt++)Ye+=Be(Le[tt],tt,Le,Be)||"";return Ye}function stringify$5(Le,Be,Ye,tt){switch(Le.type){case LAYER$1:if(Le.children.length)break;case IMPORT$1:case DECLARATION$1:return Le.return=Le.return||Le.value;case COMMENT$1:return"";case KEYFRAMES$1:return Le.return=Le.value+"{"+serialize$2(Le.children,tt)+"}";case RULESET$1:if(!strlen$1(Le.value=Le.props.join(",")))return""}return strlen$1(Ye=serialize$2(Le.children,tt))?Le.return=Le.value+"{"+Ye+"}":""}function middleware$1(Le){var Be=sizeof$1(Le);return function(Ye,tt,nt,ft){for(var ht="",gt=0;gt<Be;gt++)ht+=Le[gt](Ye,tt,nt,ft)||"";return ht}}function rulesheet$1(Le){return function(Be){Be.root||(Be=Be.return)&&Le(Be)}}function prefixer$1(Le,Be,Ye,tt){if(Le.length>-1&&!Le.return)switch(Le.type){case DECLARATION$1:Le.return=prefix$2(Le.value,Le.length,Ye);return;case KEYFRAMES$1:return serialize$2([copy$2(Le,{value:replace$1(Le.value,"@","@"+WEBKIT$1)})],tt);case RULESET$1:if(Le.length)return combine$1(Ye=Le.props,function(nt){switch(match$1(nt,tt=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":lift(copy$2(Le,{props:[replace$1(nt,/:(read-\w+)/,":"+MOZ$1+"$1")]})),lift(copy$2(Le,{props:[nt]})),assign$1(Le,{props:filter$1(Ye,tt)});break;case"::placeholder":lift(copy$2(Le,{props:[replace$1(nt,/:(plac\w+)/,":"+WEBKIT$1+"input-$1")]})),lift(copy$2(Le,{props:[replace$1(nt,/:(plac\w+)/,":"+MOZ$1+"$1")]})),lift(copy$2(Le,{props:[replace$1(nt,/:(plac\w+)/,MS$1+"input-$1")]})),lift(copy$2(Le,{props:[nt]})),assign$1(Le,{props:filter$1(Ye,tt)});break}return""})}}var unitlessKeys$1={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},f$3=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",m$3="active",y$1="data-styled-version",v$e="6.1.19",g$2=`/*!sc*/
|
|
2
|
+
(function(rr,$n){typeof exports=="object"&&typeof module<"u"?$n(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],$n):(rr=typeof globalThis<"u"?globalThis:rr||self,$n(rr.OnBoarding={},rr.React,rr.ReactDOM))})(this,function(exports,React,ReactDOM){"use strict";var ix=Object.defineProperty;var W5=rr=>{throw TypeError(rr)};var sx=(rr,$n,Sr)=>$n in rr?ix(rr,$n,{enumerable:!0,configurable:!0,writable:!0,value:Sr}):rr[$n]=Sr;var Bn=(rr,$n,Sr)=>sx(rr,typeof $n!="symbol"?$n+"":$n,Sr),L9=(rr,$n,Sr)=>$n.has(rr)||W5("Cannot "+Sr);var Ht=(rr,$n,Sr)=>(L9(rr,$n,"read from private field"),Sr?Sr.call(rr):$n.get(rr)),y0=(rr,$n,Sr)=>$n.has(rr)?W5("Cannot add the same private member more than once"):$n instanceof WeakSet?$n.add(rr):$n.set(rr,Sr),C0=(rr,$n,Sr,Ua)=>(L9(rr,$n,"write to private field"),Ua?Ua.call(rr,Sr):$n.set(rr,Sr),Sr),k0=(rr,$n,Sr)=>(L9(rr,$n,"access private method"),Sr);var Qa=(rr,$n,Sr,Ua)=>({set _(Ds){C0(rr,$n,Ds,Sr)},get _(){return Ht(rr,$n,Ua)}});var $n,Sr,Ua,Ds,h2,Ku,Da,Ps,Zd,M9,ec,yo,g2,Mi,A2,tc,nc,$u,K5,Pa,$5,q5,Jd,Y5,_9,rc,x2,E2,vo,Z5,J5,e4,qu,P1,ac,Ia,L1,e3,da,bo,ic,pa,Yu,t4,M1,ni,na,Aa,_1,Ms,j1,_i,Io,F1,C2,ss,ji,k2,sc,oc,Q1,lc,os,So,V1,wo,ls,Ju,Ro,uc,To,y2,dc,pc,fa,yr,_s,v2,fc,hc,Bo,cs,js,mc,gi,Cn,t3,j9,n4,r4,n3,a4,i4,s4,F9,o4,Q9,V9,l4,Va,p2,c4,u4,U9,d4,Pu,H9,ha,us,Fi,H1,ds,ri,G1,ps,Ha,Fs,b2,fs,Oo,Qi,Lu,r3,I2,Vi,Vr,z1,S2,xa,w2,No,gc,R2,Do,Ac,T2,Qs,hs,W1,X1,Ai,xc,ed,ar,G9,Ec,z9,W9,p4,f4,X9,K9,$9,h4,q9,m4,g4,A4,Y9,Mu,B2,O2,ma,td,x4,Cc,K1,kc,N2,D2,ms,Vs,Sa,nd,P2,bn,Na,Xl,Kl,a3,$l,E4,Z9,ql,_u,ju,J9,Fu,Po,ep,tp,yc,vc,$1,xi,C4,k4,y4,i3,L2,bc,Ic,Sc,wc,q1,Lo,vr,Y1,Z1,Rc,np,Mp,Mo,Ga,Tc,Bc,M2,Us,Oc,Nc,_2,J1,el,_o,tl,Dc,nl,j2,Pc,Lc,Xr,F2,Q2,Mc,jo,rl,Hs,b4,I4,rp,ai,s3,ap,S4,w4,ad,Fo,Gs,Ei,Yl,o3,zs,od,ld,V2,U2,al,l3,il,c3,Ws,gs,sl,ol,As,H2,Qu,Ui,_c,sp,Qo,Vo,G2,W2,ll,cl,jc,lp,ii,B1,R4,T4,ul,cd,ud,dl,X2,Kr,Xs,pl,Fc,Qc,fl,Ks,Hi,$s,Vc,qs,Uc,K2,$2,wr,u3,cp,B4,O4,N4,D4,d3,p3,up,Hc,Gc,zc,Wc,Xc,Kc,$c,dp,qc,q2,Y2,Yc,Z2,P4,pp,_p,Gi,si,Zc,J2,oi,ea,L4,M4,_4,f3,Ys,h3,m3,j4,hp,F4,li,zi,hl,ml,xs,lr,e1,t1,Jc,eu,gl,Al,Uo,tu,dd,pd,ra,Vu,Q4,U4,H4,G4,z4,W4,xl,n1,Js,nu,ci,ru,Yr,za,Uu,Hu,X4,au,Ho,Wi,Ma,K4,g3,$4,q4,mp,iu,El,Xi,r1,Cl,aa,su,kl,ou,lu,Go,Ki,yl,cu,Rr,gp,Ap,xp,O1,Y4,f2,vl,uu,eo,a1,bl,Ci,du,pu,i1,$i,wa,Xa,Il,to,ia,Sl,ki,fu,Yn,Ep,A3,Z4,J4,eh,Cp,N1,yi,Zl,th,x3,Gu,nh,rh,ah,ih,sh,s1,o1,Es,no,vi,l1,c1,u1,ro,wl,d1,p1,zo,xn,oh,lh,ch,uh,kp,dh,yp,ph,fh,hh,mh,gh,D1,vp,bp,Ip,E3,C3,Jl,Sp,k3,ao,Ah,wp,xh,Eh,Rp,y3,zu,Hr,Ea,Wo,io,Xo,Rl,Cs,so,ks,ui,Tl,pr,Wu,Xu,b3,Tp,Ch,I3,Bp,S3,kh,yh,f1,Bl,ys,Ko,oo,di,$o,Ol,Nl,Ra,lo,_n,qo,Ca,bh,Op,Np,Dp,w3,vs,mu,ta,co,gu,Pp,h1,Lp,Ih;function _interopNamespaceDefault(Le){const Be=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(Le){for(const Ye in Le)if(Ye!=="default"){const tt=Object.getOwnPropertyDescriptor(Le,Ye);Object.defineProperty(Be,Ye,tt.get?tt:{enumerable:!0,get:()=>Le[Ye]})}}return Be.default=Le,Object.freeze(Be)}function _mergeNamespaces(Le,Be){for(var Ye=0;Ye<Be.length;Ye++){const tt=Be[Ye];if(typeof tt!="string"&&!Array.isArray(tt)){for(const nt in tt)if(nt!=="default"&&!(nt in Le)){const ft=Object.getOwnPropertyDescriptor(tt,nt);ft&&Object.defineProperty(Le,nt,ft.get?ft:{enumerable:!0,get:()=>tt[nt]})}}}return Object.freeze(Object.defineProperty(Le,Symbol.toStringTag,{value:"Module"}))}const React__namespace=_interopNamespaceDefault(React),ReactDOM__namespace=_interopNamespaceDefault(ReactDOM);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(Le){return Le&&Le.__esModule&&Object.prototype.hasOwnProperty.call(Le,"default")?Le.default:Le}function getAugmentedNamespace(Le){if(Le.__esModule)return Le;var Be=Le.default;if(typeof Be=="function"){var Ye=function tt(){return this instanceof tt?Reflect.construct(Be,arguments,this.constructor):Be.apply(this,arguments)};Ye.prototype=Be.prototype}else Ye={};return Object.defineProperty(Ye,"__esModule",{value:!0}),Object.keys(Le).forEach(function(tt){var nt=Object.getOwnPropertyDescriptor(Le,tt);Object.defineProperty(Ye,tt,nt.get?nt:{enumerable:!0,get:function(){return Le[tt]}})}),Ye}var dayjs_min={exports:{}};(function(Le,Be){(function(Ye,tt){Le.exports=tt()})(commonjsGlobal,function(){var Ye=1e3,tt=6e4,nt=36e5,ft="millisecond",ht="second",gt="minute",At="hour",xt="day",Et="week",kt="month",Ct="quarter",yt="year",vt="date",bt="Invalid Date",It=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,wt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Rt={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Mt){var Xt=["th","st","nd","rd"],Qt=Mt%100;return"["+Mt+(Xt[(Qt-20)%10]||Xt[Qt]||Xt[0])+"]"}},Tt=function(Mt,Xt,Qt){var jt=String(Mt);return!jt||jt.length>=Xt?Mt:""+Array(Xt+1-jt.length).join(Qt)+Mt},Bt={s:Tt,z:function(Mt){var Xt=-Mt.utcOffset(),Qt=Math.abs(Xt),jt=Math.floor(Qt/60),Gt=Qt%60;return(Xt<=0?"+":"-")+Tt(jt,2,"0")+":"+Tt(Gt,2,"0")},m:function Mt(Xt,Qt){if(Xt.date()<Qt.date())return-Mt(Qt,Xt);var jt=12*(Qt.year()-Xt.year())+(Qt.month()-Xt.month()),Gt=Xt.clone().add(jt,kt),qt=Qt-Gt<0,zt=Xt.clone().add(jt+(qt?-1:1),kt);return+(-(jt+(Qt-Gt)/(qt?Gt-zt:zt-Gt))||0)},a:function(Mt){return Mt<0?Math.ceil(Mt)||0:Math.floor(Mt)},p:function(Mt){return{M:kt,y:yt,w:Et,d:xt,D:vt,h:At,m:gt,s:ht,ms:ft,Q:Ct}[Mt]||String(Mt||"").toLowerCase().replace(/s$/,"")},u:function(Mt){return Mt===void 0}},Dt="en",Pt={};Pt[Dt]=Rt;var Nt="$isDayjsObject",Lt=function(Mt){return Mt instanceof Ut||!(!Mt||!Mt[Nt])},Wt=function Mt(Xt,Qt,jt){var Gt;if(!Xt)return Dt;if(typeof Xt=="string"){var qt=Xt.toLowerCase();Pt[qt]&&(Gt=qt),Qt&&(Pt[qt]=Qt,Gt=qt);var zt=Xt.split("-");if(!Gt&&zt.length>1)return Mt(zt[0])}else{var e0=Xt.name;Pt[e0]=Xt,Gt=e0}return!jt&&Gt&&(Dt=Gt),Gt||!jt&&Dt},Kt=function(Mt,Xt){if(Lt(Mt))return Mt.clone();var Qt=typeof Xt=="object"?Xt:{};return Qt.date=Mt,Qt.args=arguments,new Ut(Qt)},$t=Bt;$t.l=Wt,$t.i=Lt,$t.w=function(Mt,Xt){return Kt(Mt,{locale:Xt.$L,utc:Xt.$u,x:Xt.$x,$offset:Xt.$offset})};var Ut=function(){function Mt(Qt){this.$L=Wt(Qt.locale,null,!0),this.parse(Qt),this.$x=this.$x||Qt.x||{},this[Nt]=!0}var Xt=Mt.prototype;return Xt.parse=function(Qt){this.$d=function(jt){var Gt=jt.date,qt=jt.utc;if(Gt===null)return new Date(NaN);if($t.u(Gt))return new Date;if(Gt instanceof Date)return new Date(Gt);if(typeof Gt=="string"&&!/Z$/i.test(Gt)){var zt=Gt.match(It);if(zt){var e0=zt[2]-1||0,o0=(zt[7]||"0").substring(0,3);return qt?new Date(Date.UTC(zt[1],e0,zt[3]||1,zt[4]||0,zt[5]||0,zt[6]||0,o0)):new Date(zt[1],e0,zt[3]||1,zt[4]||0,zt[5]||0,zt[6]||0,o0)}}return new Date(Gt)}(Qt),this.init()},Xt.init=function(){var Qt=this.$d;this.$y=Qt.getFullYear(),this.$M=Qt.getMonth(),this.$D=Qt.getDate(),this.$W=Qt.getDay(),this.$H=Qt.getHours(),this.$m=Qt.getMinutes(),this.$s=Qt.getSeconds(),this.$ms=Qt.getMilliseconds()},Xt.$utils=function(){return $t},Xt.isValid=function(){return this.$d.toString()!==bt},Xt.isSame=function(Qt,jt){var Gt=Kt(Qt);return this.startOf(jt)<=Gt&&Gt<=this.endOf(jt)},Xt.isAfter=function(Qt,jt){return Kt(Qt)<this.startOf(jt)},Xt.isBefore=function(Qt,jt){return this.endOf(jt)<Kt(Qt)},Xt.$g=function(Qt,jt,Gt){return $t.u(Qt)?this[jt]:this.set(Gt,Qt)},Xt.unix=function(){return Math.floor(this.valueOf()/1e3)},Xt.valueOf=function(){return this.$d.getTime()},Xt.startOf=function(Qt,jt){var Gt=this,qt=!!$t.u(jt)||jt,zt=$t.p(Qt),e0=function(i0,r0){var Yt=$t.w(Gt.$u?Date.UTC(Gt.$y,r0,i0):new Date(Gt.$y,r0,i0),Gt);return qt?Yt:Yt.endOf(xt)},o0=function(i0,r0){return $t.w(Gt.toDate()[i0].apply(Gt.toDate("s"),(qt?[0,0,0,0]:[23,59,59,999]).slice(r0)),Gt)},t0=this.$W,c0=this.$M,p0=this.$D,n0="set"+(this.$u?"UTC":"");switch(zt){case yt:return qt?e0(1,0):e0(31,11);case kt:return qt?e0(1,c0):e0(0,c0+1);case Et:var g0=this.$locale().weekStart||0,E0=(t0<g0?t0+7:t0)-g0;return e0(qt?p0-E0:p0+(6-E0),c0);case xt:case vt:return o0(n0+"Hours",0);case At:return o0(n0+"Minutes",1);case gt:return o0(n0+"Seconds",2);case ht:return o0(n0+"Milliseconds",3);default:return this.clone()}},Xt.endOf=function(Qt){return this.startOf(Qt,!1)},Xt.$set=function(Qt,jt){var Gt,qt=$t.p(Qt),zt="set"+(this.$u?"UTC":""),e0=(Gt={},Gt[xt]=zt+"Date",Gt[vt]=zt+"Date",Gt[kt]=zt+"Month",Gt[yt]=zt+"FullYear",Gt[At]=zt+"Hours",Gt[gt]=zt+"Minutes",Gt[ht]=zt+"Seconds",Gt[ft]=zt+"Milliseconds",Gt)[qt],o0=qt===xt?this.$D+(jt-this.$W):jt;if(qt===kt||qt===yt){var t0=this.clone().set(vt,1);t0.$d[e0](o0),t0.init(),this.$d=t0.set(vt,Math.min(this.$D,t0.daysInMonth())).$d}else e0&&this.$d[e0](o0);return this.init(),this},Xt.set=function(Qt,jt){return this.clone().$set(Qt,jt)},Xt.get=function(Qt){return this[$t.p(Qt)]()},Xt.add=function(Qt,jt){var Gt,qt=this;Qt=Number(Qt);var zt=$t.p(jt),e0=function(c0){var p0=Kt(qt);return $t.w(p0.date(p0.date()+Math.round(c0*Qt)),qt)};if(zt===kt)return this.set(kt,this.$M+Qt);if(zt===yt)return this.set(yt,this.$y+Qt);if(zt===xt)return e0(1);if(zt===Et)return e0(7);var o0=(Gt={},Gt[gt]=tt,Gt[At]=nt,Gt[ht]=Ye,Gt)[zt]||1,t0=this.$d.getTime()+Qt*o0;return $t.w(t0,this)},Xt.subtract=function(Qt,jt){return this.add(-1*Qt,jt)},Xt.format=function(Qt){var jt=this,Gt=this.$locale();if(!this.isValid())return Gt.invalidDate||bt;var qt=Qt||"YYYY-MM-DDTHH:mm:ssZ",zt=$t.z(this),e0=this.$H,o0=this.$m,t0=this.$M,c0=Gt.weekdays,p0=Gt.months,n0=Gt.meridiem,g0=function(r0,Yt,_t,Jt){return r0&&(r0[Yt]||r0(jt,qt))||_t[Yt].slice(0,Jt)},E0=function(r0){return $t.s(e0%12||12,r0,"0")},i0=n0||function(r0,Yt,_t){var Jt=r0<12?"AM":"PM";return _t?Jt.toLowerCase():Jt};return qt.replace(wt,function(r0,Yt){return Yt||function(_t){switch(_t){case"YY":return String(jt.$y).slice(-2);case"YYYY":return $t.s(jt.$y,4,"0");case"M":return t0+1;case"MM":return $t.s(t0+1,2,"0");case"MMM":return g0(Gt.monthsShort,t0,p0,3);case"MMMM":return g0(p0,t0);case"D":return jt.$D;case"DD":return $t.s(jt.$D,2,"0");case"d":return String(jt.$W);case"dd":return g0(Gt.weekdaysMin,jt.$W,c0,2);case"ddd":return g0(Gt.weekdaysShort,jt.$W,c0,3);case"dddd":return c0[jt.$W];case"H":return String(e0);case"HH":return $t.s(e0,2,"0");case"h":return E0(1);case"hh":return E0(2);case"a":return i0(e0,o0,!0);case"A":return i0(e0,o0,!1);case"m":return String(o0);case"mm":return $t.s(o0,2,"0");case"s":return String(jt.$s);case"ss":return $t.s(jt.$s,2,"0");case"SSS":return $t.s(jt.$ms,3,"0");case"Z":return zt}return null}(r0)||zt.replace(":","")})},Xt.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Xt.diff=function(Qt,jt,Gt){var qt,zt=this,e0=$t.p(jt),o0=Kt(Qt),t0=(o0.utcOffset()-this.utcOffset())*tt,c0=this-o0,p0=function(){return $t.m(zt,o0)};switch(e0){case yt:qt=p0()/12;break;case kt:qt=p0();break;case Ct:qt=p0()/3;break;case Et:qt=(c0-t0)/6048e5;break;case xt:qt=(c0-t0)/864e5;break;case At:qt=c0/nt;break;case gt:qt=c0/tt;break;case ht:qt=c0/Ye;break;default:qt=c0}return Gt?qt:$t.a(qt)},Xt.daysInMonth=function(){return this.endOf(kt).$D},Xt.$locale=function(){return Pt[this.$L]},Xt.locale=function(Qt,jt){if(!Qt)return this.$L;var Gt=this.clone(),qt=Wt(Qt,jt,!0);return qt&&(Gt.$L=qt),Gt},Xt.clone=function(){return $t.w(this.$d,this)},Xt.toDate=function(){return new Date(this.valueOf())},Xt.toJSON=function(){return this.isValid()?this.toISOString():null},Xt.toISOString=function(){return this.$d.toISOString()},Xt.toString=function(){return this.$d.toUTCString()},Mt}(),Vt=Ut.prototype;return Kt.prototype=Vt,[["$ms",ft],["$s",ht],["$m",gt],["$H",At],["$W",xt],["$M",kt],["$y",yt],["$D",vt]].forEach(function(Mt){Vt[Mt[1]]=function(Xt){return this.$g(Xt,Mt[0],Mt[1])}}),Kt.extend=function(Mt,Xt){return Mt.$i||(Mt(Xt,Ut,Kt),Mt.$i=!0),Kt},Kt.locale=Wt,Kt.isDayjs=Lt,Kt.unix=function(Mt){return Kt(1e3*Mt)},Kt.en=Pt[Dt],Kt.Ls=Pt,Kt.p={},Kt})})(dayjs_min);var dayjs_minExports=dayjs_min.exports;const dayjs=getDefaultExportFromCjs(dayjs_minExports);var utc$1={exports:{}};(function(Le,Be){(function(Ye,tt){Le.exports=tt()})(commonjsGlobal,function(){var Ye="minute",tt=/[+-]\d\d(?::?\d\d)?/g,nt=/([+-]|\d\d)/g;return function(ft,ht,gt){var At=ht.prototype;gt.utc=function(bt){var It={date:bt,utc:!0,args:arguments};return new ht(It)},At.utc=function(bt){var It=gt(this.toDate(),{locale:this.$L,utc:!0});return bt?It.add(this.utcOffset(),Ye):It},At.local=function(){return gt(this.toDate(),{locale:this.$L,utc:!1})};var xt=At.parse;At.parse=function(bt){bt.utc&&(this.$u=!0),this.$utils().u(bt.$offset)||(this.$offset=bt.$offset),xt.call(this,bt)};var Et=At.init;At.init=function(){if(this.$u){var bt=this.$d;this.$y=bt.getUTCFullYear(),this.$M=bt.getUTCMonth(),this.$D=bt.getUTCDate(),this.$W=bt.getUTCDay(),this.$H=bt.getUTCHours(),this.$m=bt.getUTCMinutes(),this.$s=bt.getUTCSeconds(),this.$ms=bt.getUTCMilliseconds()}else Et.call(this)};var kt=At.utcOffset;At.utcOffset=function(bt,It){var wt=this.$utils().u;if(wt(bt))return this.$u?0:wt(this.$offset)?kt.call(this):this.$offset;if(typeof bt=="string"&&(bt=function(Dt){Dt===void 0&&(Dt="");var Pt=Dt.match(tt);if(!Pt)return null;var Nt=(""+Pt[0]).match(nt)||["-",0,0],Lt=Nt[0],Wt=60*+Nt[1]+ +Nt[2];return Wt===0?0:Lt==="+"?Wt:-Wt}(bt),bt===null))return this;var Rt=Math.abs(bt)<=16?60*bt:bt;if(Rt===0)return this.utc(It);var Tt=this.clone();if(It)return Tt.$offset=Rt,Tt.$u=!1,Tt;var Bt=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(Tt=this.local().add(Rt+Bt,Ye)).$offset=Rt,Tt.$x.$localOffset=Bt,Tt};var Ct=At.format;At.format=function(bt){var It=bt||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return Ct.call(this,It)},At.valueOf=function(){var bt=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*bt},At.isUTC=function(){return!!this.$u},At.toISOString=function(){return this.toDate().toISOString()},At.toString=function(){return this.toDate().toUTCString()};var yt=At.toDate;At.toDate=function(bt){return bt==="s"&&this.$offset?gt(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():yt.call(this)};var vt=At.diff;At.diff=function(bt,It,wt){if(bt&&this.$u===bt.$u)return vt.call(this,bt,It,wt);var Rt=this.local(),Tt=gt(bt).local();return vt.call(Rt,Tt,It,wt)}}})})(utc$1);var utcExports=utc$1.exports;const utc=getDefaultExportFromCjs(utcExports);var uaParser={exports:{}};(function(Le,Be){(function(Ye,tt){var nt="1.0.41",ft="",ht="?",gt="function",At="undefined",xt="object",Et="string",kt="major",Ct="model",yt="name",vt="type",bt="vendor",It="version",wt="architecture",Rt="console",Tt="mobile",Bt="tablet",Dt="smarttv",Pt="wearable",Nt="embedded",Lt=500,Wt="Amazon",Kt="Apple",$t="ASUS",Ut="BlackBerry",Vt="Browser",Mt="Chrome",Xt="Edge",Qt="Firefox",jt="Google",Gt="Honor",qt="Huawei",zt="Lenovo",e0="LG",o0="Microsoft",t0="Motorola",c0="Nvidia",p0="OnePlus",n0="Opera",g0="OPPO",E0="Samsung",i0="Sharp",r0="Sony",Yt="Xiaomi",_t="Zebra",Jt="Facebook",a0="Chromium OS",s0="Mac OS",f0=" Browser",u0=function(Z0,w0){var S0={};for(var R0 in Z0)w0[R0]&&w0[R0].length%2===0?S0[R0]=w0[R0].concat(Z0[R0]):S0[R0]=Z0[R0];return S0},A0=function(Z0){for(var w0={},S0=0;S0<Z0.length;S0++)w0[Z0[S0].toUpperCase()]=Z0[S0];return w0},d0=function(Z0,w0){return typeof Z0===Et?M0(w0).indexOf(M0(Z0))!==-1:!1},M0=function(Z0){return Z0.toLowerCase()},_0=function(Z0){return typeof Z0===Et?Z0.replace(/[^\d\.]/g,ft).split(".")[0]:tt},q0=function(Z0,w0){if(typeof Z0===Et)return Z0=Z0.replace(/^\s\s*/,ft),typeof w0===At?Z0:Z0.substring(0,Lt)},$0=function(Z0,w0){for(var S0=0,R0,tn,G0,X0,J0,fn;S0<w0.length&&!J0;){var H0=w0[S0],hn=w0[S0+1];for(R0=tn=0;R0<H0.length&&!J0&&H0[R0];)if(J0=H0[R0++].exec(Z0),J0)for(G0=0;G0<hn.length;G0++)fn=J0[++tn],X0=hn[G0],typeof X0===xt&&X0.length>0?X0.length===2?typeof X0[1]==gt?this[X0[0]]=X0[1].call(this,fn):this[X0[0]]=X0[1]:X0.length===3?typeof X0[1]===gt&&!(X0[1].exec&&X0[1].test)?this[X0[0]]=fn?X0[1].call(this,fn,X0[2]):tt:this[X0[0]]=fn?fn.replace(X0[1],X0[2]):tt:X0.length===4&&(this[X0[0]]=fn?X0[3].call(this,fn.replace(X0[1],X0[2])):tt):this[X0]=fn||tt;S0+=2}},Y0=function(Z0,w0){for(var S0 in w0)if(typeof w0[S0]===xt&&w0[S0].length>0){for(var R0=0;R0<w0[S0].length;R0++)if(d0(w0[S0][R0],Z0))return S0===ht?tt:S0}else if(d0(w0[S0],Z0))return S0===ht?tt:S0;return w0.hasOwnProperty("*")?w0["*"]:Z0},N0={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},I0={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},P0={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[It,[yt,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[It,[yt,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[yt,It],[/opios[\/ ]+([\w\.]+)/i],[It,[yt,n0+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[It,[yt,n0+" GX"]],[/\bopr\/([\w\.]+)/i],[It,[yt,n0]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[It,[yt,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[It,[yt,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[yt,It],[/quark(?:pc)?\/([-\w\.]+)/i],[It,[yt,"Quark"]],[/\bddg\/([\w\.]+)/i],[It,[yt,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[It,[yt,"UC"+Vt]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[It,[yt,"WeChat"]],[/konqueror\/([\w\.]+)/i],[It,[yt,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[It,[yt,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[It,[yt,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[It,[yt,"Smart Lenovo "+Vt]],[/(avast|avg)\/([\w\.]+)/i],[[yt,/(.+)/,"$1 Secure "+Vt],It],[/\bfocus\/([\w\.]+)/i],[It,[yt,Qt+" Focus"]],[/\bopt\/([\w\.]+)/i],[It,[yt,n0+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[It,[yt,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[It,[yt,"Dolphin"]],[/coast\/([\w\.]+)/i],[It,[yt,n0+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[It,[yt,"MIUI"+f0]],[/fxios\/([\w\.-]+)/i],[It,[yt,Qt]],[/\bqihoobrowser\/?([\w\.]*)/i],[It,[yt,"360"]],[/\b(qq)\/([\w\.]+)/i],[[yt,/(.+)/,"$1Browser"],It],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[yt,/(.+)/,"$1"+f0],It],[/samsungbrowser\/([\w\.]+)/i],[It,[yt,E0+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[It,[yt,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[yt,"Sogou Mobile"],It],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[yt,It],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[yt],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[It,yt],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[yt,Jt],It],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[yt,It],[/\bgsa\/([\w\.]+) .*safari\//i],[It,[yt,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[It,[yt,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[It,[yt,Mt+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[yt,Mt+" WebView"],It],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[It,[yt,"Android "+Vt]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[yt,It],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[It,[yt,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[It,yt],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[yt,[It,Y0,N0]],[/(webkit|khtml)\/([\w\.]+)/i],[yt,It],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[yt,"Netscape"],It],[/(wolvic|librewolf)\/([\w\.]+)/i],[yt,It],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[It,[yt,Qt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[yt,[It,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[yt,[It,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[wt,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[wt,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[wt,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[wt,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[wt,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[wt,/ower/,ft,M0]],[/ sun4\w[;\)]/i],[[wt,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[wt,M0]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[Ct,[bt,E0],[vt,Bt]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[Ct,[bt,E0],[vt,Tt]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[Ct,[bt,Kt],[vt,Tt]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[Ct,[bt,Kt],[vt,Bt]],[/(macintosh);/i],[Ct,[bt,Kt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[Ct,[bt,i0],[vt,Tt]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[Ct,[bt,Gt],[vt,Bt]],[/honor([-\w ]+)[;\)]/i],[Ct,[bt,Gt],[vt,Tt]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[Ct,[bt,qt],[vt,Bt]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[Ct,[bt,qt],[vt,Tt]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[Ct,/_/g," "],[bt,Yt],[vt,Bt]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[Ct,/_/g," "],[bt,Yt],[vt,Tt]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[Ct,[bt,g0],[vt,Tt]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[Ct,[bt,Y0,{OnePlus:["304","403","203"],"*":g0}],[vt,Bt]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[Ct,[bt,"Vivo"],[vt,Tt]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[Ct,[bt,"Realme"],[vt,Tt]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[Ct,[bt,t0],[vt,Tt]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[Ct,[bt,t0],[vt,Bt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[Ct,[bt,e0],[vt,Bt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[Ct,[bt,e0],[vt,Tt]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[Ct,[bt,zt],[vt,Bt]],[/(nokia) (t[12][01])/i],[bt,Ct,[vt,Bt]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[Ct,/_/g," "],[vt,Tt],[bt,"Nokia"]],[/(pixel (c|tablet))\b/i],[Ct,[bt,jt],[vt,Bt]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[Ct,[bt,jt],[vt,Tt]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[Ct,[bt,r0],[vt,Tt]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[Ct,"Xperia Tablet"],[bt,r0],[vt,Bt]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[Ct,[bt,p0],[vt,Tt]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[Ct,[bt,Wt],[vt,Bt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[Ct,/(.+)/g,"Fire Phone $1"],[bt,Wt],[vt,Tt]],[/(playbook);[-\w\),; ]+(rim)/i],[Ct,bt,[vt,Bt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[Ct,[bt,Ut],[vt,Tt]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[Ct,[bt,$t],[vt,Bt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[Ct,[bt,$t],[vt,Tt]],[/(nexus 9)/i],[Ct,[bt,"HTC"],[vt,Bt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[bt,[Ct,/_/g," "],[vt,Tt]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[Ct,[bt,"TCL"],[vt,Bt]],[/(itel) ((\w+))/i],[[bt,M0],Ct,[vt,Y0,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[Ct,[bt,"Acer"],[vt,Bt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[Ct,[bt,"Meizu"],[vt,Tt]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[Ct,[bt,"Ulefone"],[vt,Tt]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[Ct,[bt,"Energizer"],[vt,Tt]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[Ct,[bt,"Cat"],[vt,Tt]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[Ct,[bt,"Smartfren"],[vt,Tt]],[/droid.+; (a(?:015|06[35]|142p?))/i],[Ct,[bt,"Nothing"],[vt,Tt]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[Ct,[bt,"Archos"],[vt,Bt]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[Ct,[bt,"Archos"],[vt,Tt]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[bt,Ct,[vt,Bt]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[bt,Ct,[vt,Tt]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[bt,Ct,[vt,Bt]],[/(surface duo)/i],[Ct,[bt,o0],[vt,Bt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[Ct,[bt,"Fairphone"],[vt,Tt]],[/(u304aa)/i],[Ct,[bt,"AT&T"],[vt,Tt]],[/\bsie-(\w*)/i],[Ct,[bt,"Siemens"],[vt,Tt]],[/\b(rct\w+) b/i],[Ct,[bt,"RCA"],[vt,Bt]],[/\b(venue[\d ]{2,7}) b/i],[Ct,[bt,"Dell"],[vt,Bt]],[/\b(q(?:mv|ta)\w+) b/i],[Ct,[bt,"Verizon"],[vt,Bt]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[Ct,[bt,"Barnes & Noble"],[vt,Bt]],[/\b(tm\d{3}\w+) b/i],[Ct,[bt,"NuVision"],[vt,Bt]],[/\b(k88) b/i],[Ct,[bt,"ZTE"],[vt,Bt]],[/\b(nx\d{3}j) b/i],[Ct,[bt,"ZTE"],[vt,Tt]],[/\b(gen\d{3}) b.+49h/i],[Ct,[bt,"Swiss"],[vt,Tt]],[/\b(zur\d{3}) b/i],[Ct,[bt,"Swiss"],[vt,Bt]],[/\b((zeki)?tb.*\b) b/i],[Ct,[bt,"Zeki"],[vt,Bt]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[bt,"Dragon Touch"],Ct,[vt,Bt]],[/\b(ns-?\w{0,9}) b/i],[Ct,[bt,"Insignia"],[vt,Bt]],[/\b((nxa|next)-?\w{0,9}) b/i],[Ct,[bt,"NextBook"],[vt,Bt]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[bt,"Voice"],Ct,[vt,Tt]],[/\b(lvtel\-)?(v1[12]) b/i],[[bt,"LvTel"],Ct,[vt,Tt]],[/\b(ph-1) /i],[Ct,[bt,"Essential"],[vt,Tt]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[Ct,[bt,"Envizen"],[vt,Bt]],[/\b(trio[-\w\. ]+) b/i],[Ct,[bt,"MachSpeed"],[vt,Bt]],[/\btu_(1491) b/i],[Ct,[bt,"Rotor"],[vt,Bt]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[Ct,[bt,c0],[vt,Bt]],[/(sprint) (\w+)/i],[bt,Ct,[vt,Tt]],[/(kin\.[onetw]{3})/i],[[Ct,/\./g," "],[bt,o0],[vt,Tt]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[Ct,[bt,_t],[vt,Bt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[Ct,[bt,_t],[vt,Tt]],[/smart-tv.+(samsung)/i],[bt,[vt,Dt]],[/hbbtv.+maple;(\d+)/i],[[Ct,/^/,"SmartTV"],[bt,E0],[vt,Dt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[bt,e0],[vt,Dt]],[/(apple) ?tv/i],[bt,[Ct,Kt+" TV"],[vt,Dt]],[/crkey/i],[[Ct,Mt+"cast"],[bt,jt],[vt,Dt]],[/droid.+aft(\w+)( bui|\))/i],[Ct,[bt,Wt],[vt,Dt]],[/(shield \w+ tv)/i],[Ct,[bt,c0],[vt,Dt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[Ct,[bt,i0],[vt,Dt]],[/(bravia[\w ]+)( bui|\))/i],[Ct,[bt,r0],[vt,Dt]],[/(mi(tv|box)-?\w+) bui/i],[Ct,[bt,Yt],[vt,Dt]],[/Hbbtv.*(technisat) (.*);/i],[bt,Ct,[vt,Dt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[bt,q0],[Ct,q0],[vt,Dt]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[Ct,[vt,Dt]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[vt,Dt]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[bt,Ct,[vt,Rt]],[/droid.+; (shield)( bui|\))/i],[Ct,[bt,c0],[vt,Rt]],[/(playstation \w+)/i],[Ct,[bt,r0],[vt,Rt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[Ct,[bt,o0],[vt,Rt]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[Ct,[bt,E0],[vt,Pt]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[bt,Ct,[vt,Pt]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[Ct,[bt,g0],[vt,Pt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[Ct,[bt,Kt],[vt,Pt]],[/(opwwe\d{3})/i],[Ct,[bt,p0],[vt,Pt]],[/(moto 360)/i],[Ct,[bt,t0],[vt,Pt]],[/(smartwatch 3)/i],[Ct,[bt,r0],[vt,Pt]],[/(g watch r)/i],[Ct,[bt,e0],[vt,Pt]],[/droid.+; (wt63?0{2,3})\)/i],[Ct,[bt,_t],[vt,Pt]],[/droid.+; (glass) \d/i],[Ct,[bt,jt],[vt,Pt]],[/(pico) (4|neo3(?: link|pro)?)/i],[bt,Ct,[vt,Pt]],[/; (quest( \d| pro)?)/i],[Ct,[bt,Jt],[vt,Pt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[bt,[vt,Nt]],[/(aeobc)\b/i],[Ct,[bt,Wt],[vt,Nt]],[/(homepod).+mac os/i],[Ct,[bt,Kt],[vt,Nt]],[/windows iot/i],[[vt,Nt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[Ct,[vt,Tt]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[Ct,[vt,Bt]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[vt,Bt]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[vt,Tt]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[Ct,[bt,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[It,[yt,Xt+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[yt,It],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[It,[yt,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[yt,It],[/ladybird\//i],[[yt,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[It,yt]],os:[[/microsoft (windows) (vista|xp)/i],[yt,It],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[yt,[It,Y0,I0]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[It,Y0,I0],[yt,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[It,/_/g,"."],[yt,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[yt,s0],[It,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[It,yt],[/(ubuntu) ([\w\.]+) like android/i],[[yt,/(.+)/,"$1 Touch"],It],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[yt,It],[/\(bb(10);/i],[It,[yt,Ut]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[It,[yt,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[It,[yt,Qt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[It,[yt,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[It,[yt,"watchOS"]],[/crkey\/([\d\.]+)/i],[It,[yt,Mt+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[yt,a0],It],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[yt,It],[/(sunos) ?([\w\.\d]*)/i],[[yt,"Solaris"],It],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[yt,It]]},O0=function(Z0,w0){if(typeof Z0===xt&&(w0=Z0,Z0=tt),!(this instanceof O0))return new O0(Z0,w0).getResult();var S0=typeof Ye!==At&&Ye.navigator?Ye.navigator:tt,R0=Z0||(S0&&S0.userAgent?S0.userAgent:ft),tn=S0&&S0.userAgentData?S0.userAgentData:tt,G0=w0?u0(P0,w0):P0,X0=S0&&S0.userAgent==R0;return this.getBrowser=function(){var J0={};return J0[yt]=tt,J0[It]=tt,$0.call(J0,R0,G0.browser),J0[kt]=_0(J0[It]),X0&&S0&&S0.brave&&typeof S0.brave.isBrave==gt&&(J0[yt]="Brave"),J0},this.getCPU=function(){var J0={};return J0[wt]=tt,$0.call(J0,R0,G0.cpu),J0},this.getDevice=function(){var J0={};return J0[bt]=tt,J0[Ct]=tt,J0[vt]=tt,$0.call(J0,R0,G0.device),X0&&!J0[vt]&&tn&&tn.mobile&&(J0[vt]=Tt),X0&&J0[Ct]=="Macintosh"&&S0&&typeof S0.standalone!==At&&S0.maxTouchPoints&&S0.maxTouchPoints>2&&(J0[Ct]="iPad",J0[vt]=Bt),J0},this.getEngine=function(){var J0={};return J0[yt]=tt,J0[It]=tt,$0.call(J0,R0,G0.engine),J0},this.getOS=function(){var J0={};return J0[yt]=tt,J0[It]=tt,$0.call(J0,R0,G0.os),X0&&!J0[yt]&&tn&&tn.platform&&tn.platform!="Unknown"&&(J0[yt]=tn.platform.replace(/chrome os/i,a0).replace(/macos/i,s0)),J0},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return R0},this.setUA=function(J0){return R0=typeof J0===Et&&J0.length>Lt?q0(J0,Lt):J0,this},this.setUA(R0),this};O0.VERSION=nt,O0.BROWSER=A0([yt,It,kt]),O0.CPU=A0([wt]),O0.DEVICE=A0([Ct,bt,vt,Rt,Tt,Dt,Bt,Pt,Nt]),O0.ENGINE=O0.OS=A0([yt,It]),Le.exports&&(Be=Le.exports=O0),Be.UAParser=O0;var F0=typeof Ye!==At&&(Ye.jQuery||Ye.Zepto);if(F0&&!F0.ua){var K0=new O0;F0.ua=K0.getResult(),F0.ua.get=function(){return K0.getUA()},F0.ua.set=function(Z0){K0.setUA(Z0);var w0=K0.getResult();for(var S0 in w0)F0.ua[S0]=w0[S0]}}})(typeof window=="object"?window:commonjsGlobal)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;const UAParser=getDefaultExportFromCjs(uaParserExports);let uxType=null;const setUxType=Le=>{if(Le==="desktop"||Le==="mobile"||Le===null)uxType=Le;else throw new Error("Invalid value for uxType. Accepted values are 'desktop', 'mobile', or null.")},isIOS16=()=>{const Be=new UAParser().getResult();return Be.os.name==="iOS"&&Be.os.version.startsWith("16.")},getUxType=()=>uxType,parser$1=new UAParser,uaResult=parser$1.getResult(),isTouchDevice=()=>navigator.maxTouchPoints>0||"ontouchstart"in document.documentElement,isTabletWithoutAndroid=()=>!uaResult.device.type&&uaResult.os.name==="Linux"&&uaResult.browser.name==="Chrome"&&isTouchDevice(),mobile={isWebview:()=>["Chrome WebView","WebKit"].includes(uaResult.browser.name),Android:()=>uaResult.os.name==="Android",iOS:()=>{var Le,Be;return["iOS","iPadOS"].includes(uaResult.os.name||"")||uaResult.os.name!=="Mac OS"&&((Be=(Le=uaResult.device)==null?void 0:Le.vendor)==null?void 0:Be.toLowerCase())==="apple"},isIpad:()=>uaResult.device.model==="iPad",isFBInAppBrowser:()=>/\[FB/.test(uaResult.ua),isInstagramAppBrowser:()=>/Instagram/.test(uaResult.ua),any:()=>uxType?uxType==="mobile":!!(uaResult.device.type==="mobile"||uaResult.device.type==="tablet"||isTabletWithoutAndroid()),isChrome:()=>{const{browser:Le}=uaResult;return["Chrome"].includes(Le.name||"")},isDesktop:()=>uxType?uxType==="desktop":!mobile.any(),isAppleDevice:()=>["iOS","Mac OS","iPadOS"].includes(uaResult.os.name||""),isBrowserSupported:()=>{if(mobile.isWebview())return!0;const{browser:Le,os:Be}=uaResult;return Le.name==="Firefox"||Le.name==="Brave"||Le.name==="MiuiBrowser"?!1:Be.name==="iOS"||Be.name==="iPadOS"?["Mobile Safari","Chrome"].includes(Le.name||""):Be.name==="Mac OS"?["Safari","Chrome"].includes(Le.name||""):Le.name==="Chrome"}},browserName=uaResult.browser.name,desktop={isEdge:()=>browserName==="Edge",isChrome:()=>["Chrome","Chrome WebView","Chrome Headless"].includes(browserName),isFirefox:()=>["Firefox","Firefox Focus","Firefox Reality"].includes(browserName),isOpera:()=>["Opera","Opera Mini","Opera Touch"].includes(browserName),isSafari:()=>["Safari","Mobile Safari"].includes(browserName),isBrave:()=>browserName==="Brave",isXiaomiBrowser:()=>browserName==="MiuiBrowser"},getHasLiedBrowser=()=>{const Le=navigator.userAgent.toLowerCase(),Be=navigator.productSub;let Ye;if(Le.indexOf("edge/")>=0||Le.indexOf("iemobile/")>=0)return!1;if(Le.indexOf("opera mini")>=0)return!1;if(Le.indexOf("firefox/")>=0?Ye="Firefox":Le.indexOf("opera/")>=0||Le.indexOf(" opr/")>=0?Ye="Opera":Le.indexOf("chrome/")>=0?Ye="Chrome":Le.indexOf("safari/")>=0?Le.indexOf("android 1.")>=0||Le.indexOf("android 2.")>=0||Le.indexOf("android 3.")>=0||Le.indexOf("android 4.")>=0?Ye="AOSP":Ye="Safari":Le.indexOf("trident/")>=0?Ye="Internet Explorer":Ye="Other",(Ye==="Chrome"||Ye==="Safari"||Ye==="Opera")&&Be!=="20030107")return!0;const tt=eval.toString().length;if(tt===37&&Ye!=="Safari"&&Ye!=="Firefox"&&Ye!=="Other")return!0;if(tt===39&&Ye!=="Internet Explorer"&&Ye!=="Other")return!0;if(tt===33&&Ye!=="Chrome"&&Ye!=="AOSP"&&Ye!=="Opera"&&Ye!=="Other")return!0;let nt;try{throw"a"}catch(ft){try{ft.toSource(),nt=!0}catch{nt=!1}}return nt&&Ye!=="Firefox"&&Ye!=="Other"},getUAParserResults=()=>uaResult,isBrowserSimulation=()=>getUAParserResults().browser.name?isTouchDevice()&&navigator.maxTouchPoints!==1?!1:isTouchDevice()&&(getHasLiedBrowser()||window.navigator.userAgent.indexOf("Mobile")!==-1)||mobile.iOS()&&typeof window.ontouchstart>"u":!0,isMobile$1=mobile.any()&&!isBrowserSimulation(),isWebRtcSupported=()=>!!(window.navigator.mediaDevices&&window.navigator.mediaDevices.getUserMedia),isSurfaceTablet=()=>{const Le=navigator.userAgent.indexOf("Windows")>-1,Be=navigator.maxTouchPoints,Ye="ontouchstart"in window||Be>0||(matchMedia==null?void 0:matchMedia("(any-pointer: coarse)").matches);return Le&&Ye},deviceClass={MOBILE:"MOBILE",DESKTOP:"DESKTOP"},getDeviceClass=()=>isMobile$1?deviceClass.MOBILE:deviceClass.DESKTOP;function detectMobileOS(){return mobile.iOS()?"ios":mobile.Android()?"android":"other"}dayjs.extend(utc);function isChrome(){const Le=window.hasOwnProperty("chrome"),Be=window.navigator,Ye=Be.vendor,tt=!!(window.hasOwnProperty("opera")||window.hasOwnProperty("opr")||navigator.userAgent.includes("Opera")||navigator.userAgent.includes("OPR")),nt=Be.userAgent.indexOf("Edge")>-1;return Be.userAgent.match("CriOS")?!0:Le!==null&&typeof Le<"u"&&Ye==="Google Inc."&&tt===!1&&nt===!1}function isSafari(){return window.navigator.vendor&&window.navigator.vendor.indexOf("Apple")>-1&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("CriOS")===-1&&window.navigator.userAgent.indexOf("FxiOS")===-1&&window.navigator.userAgent.indexOf("OPT")===-1&&window.navigator.userAgent.indexOf("OPR")===-1}const sleep=Le=>new Promise(Be=>setTimeout(Be,Le)),throttle$2=(Le,Be)=>{let Ye;return(...tt)=>{Ye||(Le.apply(void 0,tt),Ye=!0,setTimeout(()=>Ye=!1,Be))}},getLogObject=(Le,Be)=>({type:Le,payload:Be}),toImage$1=Le=>Le?`data:image/png;base64,${Le}`:"",getValidUrl=(Le="")=>{let Be=window.decodeURIComponent(Le);return Be=Be.trim().replace(/\s/g,""),/^(:\/\/)/.test(Be)?`http${Be}`:/^(f|ht)tps?:\/\//i.test(Be)?Be:`http://${Be}`},resizeImg=(Le,Be)=>{const Ye=document.createElement("canvas");Ye.width=Le.width<=Be?Le.width:Be,Ye.height=Le.width<=Be?Le.height:Le.height/(Le.width/Be);const tt=Ye.getContext("2d");return tt==null||tt.drawImage(Le,0,0,Ye.width,Ye.height),Ye.toDataURL()},rotateImg=Le=>{const Be=document.createElement("canvas");Be.width=Le.width,Be.height=Le.height;const Ye=Be.getContext("2d");Ye==null||Ye.drawImage(Le,0,0);const tt=Be.width;return Be.width=Be.height,Be.height=tt,Ye==null||Ye.clearRect(0,0,Be.width,Be.height),Ye==null||Ye.save(),Ye==null||Ye.translate(Be.width/2,Be.height/2),Ye==null||Ye.rotate(-90*Math.PI/180),Ye==null||Ye.drawImage(Le,-Le.width/2,-Le.height/2),Ye==null||Ye.restore(),Be},rotateCanvasVertically=Le=>{const Be=Le.getContext("2d");Be.scale(1,-1),Be.translate(0,-Le.height)},getBase64=Le=>new Promise((Be,Ye)=>{const tt=new FileReader;tt.onload=nt=>{var ht;const ft=(ht=nt==null?void 0:nt.target)==null?void 0:ht.result;Be(ft)},tt.readAsDataURL(Le),tt.onerror=nt=>Ye(nt)}),getScaledBase64=(Le,Be=1280,Ye=!1)=>new Promise((tt,nt)=>{const ft=new Image;ft.onload=()=>{const ht=Ye&&ft.width>ft.height?rotateImg(ft):ft,gt=resizeImg(ht,Be);URL.revokeObjectURL(ft.src),tt(gt)},ft.onerror=ht=>nt(ht),ft.src=URL.createObjectURL(Le)}),getScaledImageFromFile=async(Le,Be=1280,Ye=!1)=>({imageBase64:Le.type==="application/pdf"?await getBase64(Le):await getScaledBase64(Le,Be,Ye),fullImage:Le});function emptyFunc(...Le){}const reload=()=>{window.location.reload()},states$2=[{min:35e3,max:36999,code:"AL",long:"Alabama"},{min:99500,max:99999,code:"AK",long:"Alaska"},{min:85e3,max:86999,code:"AZ",long:"Arizona"},{min:71600,max:72999,code:"AR",long:"Arkansas"},{min:9e4,max:96699,code:"CA",long:"California"},{min:8e4,max:81999,code:"CO",long:"Colorado"},{min:6e3,max:6999,code:"CT",long:"Connecticut"},{min:19700,max:19999,code:"DE",long:"Delaware"},{min:32e3,max:34999,code:"FL",long:"Florida"},{min:3e4,max:31999,code:"GA",long:"Georgia"},{min:96700,max:96999,code:"HI",long:"Hawaii"},{min:83200,max:83999,code:"ID",long:"Idaho"},{min:6e4,max:62999,code:"IL",long:"Illinois"},{min:46e3,max:47999,code:"IN",long:"Indiana"},{min:5e4,max:52999,code:"IA",long:"Iowa"},{min:66e3,max:67999,code:"KS",long:"Kansas"},{min:4e4,max:42999,code:"KY",long:"Kentucky"},{min:7e4,max:71599,code:"LA",long:"Louisiana"},{min:3900,max:4999,code:"ME",long:"Maine"},{min:20600,max:21999,code:"MD",long:"Maryland"},{min:1e3,max:2799,code:"MA",long:"Massachusetts"},{min:48e3,max:49999,code:"MI",long:"Michigan"},{min:55e3,max:56999,code:"MN",long:"Minnesota"},{min:38600,max:39999,code:"MS",long:"Mississippi"},{min:63e3,max:65999,code:"MO",long:"Missouri"},{min:59e3,max:59999,code:"MT",long:"Montana"},{min:27e3,max:28999,code:"NC",long:"North Carolina"},{min:58e3,max:58999,code:"ND",long:"North Dakota"},{min:68e3,max:69999,code:"NE",long:"Nebraska"},{min:88900,max:89999,code:"NV",long:"Nevada"},{min:3e3,max:3899,code:"NH",long:"New Hampshire"},{min:7e3,max:8999,code:"NJ",long:"New Jersey"},{min:87e3,max:88499,code:"NM",long:"New Mexico"},{min:1e4,max:14999,code:"NY",long:"New York"},{min:43e3,max:45999,code:"OH",long:"Ohio"},{min:73e3,max:74999,code:"OK",long:"Oklahoma"},{min:97e3,max:97999,code:"OR",long:"Oregon"},{min:15e3,max:19699,code:"PA",long:"Pennsylvania"},{min:300,max:999,code:"PR",long:"Puerto Rico"},{min:2800,max:2999,code:"RI",long:"Rhode Island"},{min:29e3,max:29999,code:"SC",long:"South Carolina"},{min:57e3,max:57999,code:"SD",long:"South Dakota"},{min:37e3,max:38599,code:"TN",long:"Tennessee"},{min:75e3,max:79999,code:"TX",long:"Texas"},{min:88500,max:88599,code:"TX",long:"Texas"},{min:84e3,max:84999,code:"UT",long:"Utah"},{min:5e3,max:5999,code:"VT",long:"Vermont"},{min:22e3,max:24699,code:"VA",long:"Virgina"},{min:2e4,max:20599,code:"DC",long:"Washington DC"},{min:98e3,max:99499,code:"WA",long:"Washington"},{min:24700,max:26999,code:"WV",long:"West Virginia"},{min:53e3,max:54999,code:"WI",long:"Wisconsin"},{min:82e3,max:83199,code:"WY",long:"Wyoming"}],getUSState=Le=>{const Be=Number.parseInt(Le,10),Ye=states$2.filter(tt=>tt.min<=Be&&tt.max>=Be);return Ye.length===0||Ye.length>1?"":Ye[0].code},INCODE_DOMAINS={SAAS:"saas-api.incodesmile.com",STAGE:"incode-stageus-api.stage.incodetest.com",DEMO:"demo-api.incodesmile.com",STAGEK8S:"user-service-k8s.stage.incodetest.com",DEMOK8S:"user-service-k8s.demok8s.incodesmile.com"},allowedDomains=Object.values(INCODE_DOMAINS),isValidUrl=Le=>{try{return new URL(Le),!0}catch{return!1}},allowedDomain=Le=>{const Be=new URL(Le).hostname;return{isAllowed:allowedDomains.includes(Be),domain:Be}},isSaasEnv=Le=>{if(!isValidUrl(Le))return!1;const{isAllowed:Be,domain:Ye}=allowedDomain(Le);return isValidUrl(Le)&&Be&&Ye===INCODE_DOMAINS.SAAS},isStageEnv=Le=>{if(!isValidUrl(Le))return!1;const{isAllowed:Be,domain:Ye}=allowedDomain(Le);return isValidUrl(Le)&&Be&&Ye===INCODE_DOMAINS.STAGE},isDemoEnv=Le=>{if(!isValidUrl(Le))return!1;const{isAllowed:Be,domain:Ye}=allowedDomain(Le);return isValidUrl(Le)&&Be&&Ye===INCODE_DOMAINS.DEMO},isStageK8sEnv=Le=>{if(!isValidUrl(Le))return!1;const{isAllowed:Be,domain:Ye}=allowedDomain(Le);return isValidUrl(Le)&&Be&&Ye===INCODE_DOMAINS.STAGEK8S},formatDate=(Le,Be=!1)=>{if(!Le)return"";const Ye=Number(Le);return dayjs(Ye).isValid()?Be?dayjs.utc(Ye).format("YYYY-MM-DD"):dayjs.utc(Ye).format("MMM D YYYY"):""},camelToStartCase=Le=>{const Be=Le.replace(/([A-Z])/g," $1");return Be.charAt(0).toUpperCase()+Be.slice(1)},formatInputDate=Le=>{let Be=new Date(Le),Ye=""+(Be.getMonth()+1),tt=""+Be.getDate(),nt=Be.getFullYear();return Ye.length<2&&(Ye="0"+Ye),tt.length<2&&(tt="0"+tt),[nt,Ye,tt].join("-")},getKioskMaskPosition=()=>{var Et;const Le=(Et=document.querySelector("video"))==null?void 0:Et.getBoundingClientRect(),Be=Le.width,Ye=Le.height,tt=5.4/8.6,nt=.96,ht=+Be*.6,gt=+Ye*nt,At=gt*tt,xt=At>ht?ht:At;return{width:xt,height:gt,left:(+Be-xt)/2,top:(Ye-gt)/2}},getMaskPosition=(Le=!1)=>{const Be=window.innerWidth,Ye=window.innerHeight,tt=8.6/5.4,nt=localStorage.getItem("isIPhone14OrHigher")==="true"?Le?.8:.6:.86,ht=Ye*.9,gt=Be*nt,At=gt*tt,xt=At>ht?ht:At;return{width:gt,height:xt,left:(Be-gt)/2,top:(Ye-xt)/2}},capitalize$2=Le=>Le.charAt(0).toUpperCase()+Le.slice(1),getLanguageCodeWithCountry=Le=>Le!=null&&Le.startsWith("en")?"en-US":Le!=null&&Le.startsWith("es")?"es-ES":"en-US",b64toBlob=(Le,Be="",Ye=512)=>{const tt=atob(Le),nt=[];for(let ht=0;ht<tt.length;ht+=Ye){const gt=tt.slice(ht,ht+Ye),At=new Array(gt.length);for(let Et=0;Et<gt.length;Et++)At[Et]=gt.charCodeAt(Et);const xt=new Uint8Array(At);nt.push(xt)}return new Blob(nt,{type:Be})},isValidHttpUrl=Le=>{let Be;try{Be=new URL(Le)}catch{return!1}return Be.protocol==="http:"||Be.protocol==="https:"},triggerRedirect=Le=>{const Be=getValidUrl(Le);isValidHttpUrl(Be)?window.location.replace(Be):window.location.replace(Le)},getScreenRecordingEventCode=Le=>({frontId:"frontIdScanScreenRecordVideoUploaded",backId:"backIdScanScreenRecordVideoUploaded",selfie:"selfieScanScreenRecordVideoUploaded"})[Le]||"",detectBrowser=()=>isSafari()?"Safari":isChrome()?"Chrome":isOpera()?"Opera":isFirefox$1()?"Firefox":desktop.isBrave()?"Brave":desktop.isXiaomiBrowser()?"Xiaomi":"unknown",isOpera=()=>!!(window.hasOwnProperty("opera")||window.hasOwnProperty("opr")||navigator.userAgent.includes("Opera")||navigator.userAgent.includes("OPR")||navigator.userAgent.includes("OPT")),isFirefox$1=()=>navigator.userAgent.indexOf("Firefox")>-1||navigator.userAgent.indexOf("FxiOS")>-1;async function pollUntil(Le,Be,Ye){const tt=async()=>{try{const nt=await Le();return Be(nt)?nt:(await sleep(Ye),tt())}catch(nt){throw nt}};return tt()}const validateCPF=Le=>{if(!Le||(Le=Le.replace(/[^\d]+/g,""),Le.length!==11||Le.match(/(\d)\1{10}/)))return!1;let Be=0,Ye;for(let tt=1;tt<=9;tt++)Be=Be+Number.parseInt(Le.substring(tt-1,tt))*(11-tt);if(Ye=Be*10%11,(Ye===10||Ye===11)&&(Ye=0),Ye!==Number.parseInt(Le.substring(9,10)))return!1;Be=0;for(let tt=1;tt<=10;tt++)Be=Be+Number.parseInt(Le.substring(tt-1,tt))*(12-tt);return Ye=Be*10%11,(Ye===10||Ye===11)&&(Ye=0),Ye===Number.parseInt(Le.substring(10,11))},getVideoSelfieModules=(Le,{checkIdScan:Be,checkDocumentScan:Ye,checkVoiceConsent:tt,questionsCount:nt,showPassport:ft})=>[...Be??Le.checkIdScan?["front"]:[],...!Le.onlyFront&&!ft&&(Be??Le.checkIdScan)?["back"]:[],...Ye??Le.checkDocumentScan?["poa"]:[],"selfie",...(nt??Le.questionsCount)>0&&(tt??Le.checkVoiceConsent)?["questions"]:[],...tt??Le.checkVoiceConsent?["speech"]:[]],countryCodeToInfo={ABW:{name:"Aruba",flag:"🇦🇼"},AFG:{name:"Afghanistan",flag:"🇦🇫"},AGO:{name:"Angola",flag:"🇦🇴"},AIA:{name:"Anguilla",flag:"🇦🇮"},ALA:{name:"Åland Islands",flag:"🇦🇽"},ALB:{name:"Albania",flag:"🇦🇱"},AND:{name:"Andorra",flag:"🇦🇩"},ARE:{name:"United Arab Emirates",flag:"🇦🇪"},ARG:{name:"Argentina",flag:"🇦🇷"},ARM:{name:"Armenia",flag:"🇦🇲"},ASM:{name:"American Samoa",flag:"🇦🇸"},ATA:{name:"Antarctica",flag:"🇦🇶"},ATF:{name:"French Southern Territories",flag:"🇹🇫"},ATG:{name:"Antigua and Barbuda",flag:"🇦🇬"},AUS:{name:"Australia",flag:"🇦🇺"},AUT:{name:"Austria",flag:"🇦🇹"},AZE:{name:"Azerbaijan",flag:"🇦🇿"},BDI:{name:"Burundi",flag:"🇧🇮"},BEL:{name:"Belgium",flag:"🇧🇪"},BEN:{name:"Benin",flag:"🇧🇯"},BES:{name:"Bonaire, Sint Eustatius and Saba",flag:"🇧🇶"},BFA:{name:"Burkina Faso",flag:"🇧🇫"},BGD:{name:"Bangladesh",flag:"🇧🇩"},BGR:{name:"Bulgaria",flag:"🇧🇬"},BHR:{name:"Bahrain",flag:"🇧🇭"},BHS:{name:"Bahamas",flag:"🇧🇸"},BIH:{name:"Bosnia and Herzegovina",flag:"🇧🇦"},BLM:{name:"Saint Barthélemy",flag:"🇧🇱"},BLR:{name:"Belarus",flag:"🇧🇾"},BLZ:{name:"Belize",flag:"🇧🇿"},BMU:{name:"Bermuda",flag:"🇧🇲"},BOL:{name:"Bolivia, Plurinational State of",flag:"🇧🇴"},BRA:{name:"Brasil",flag:"🇧🇷"},BRB:{name:"Barbados",flag:"🇧🇧"},BRN:{name:"Brunei Darussalam",flag:"🇧🇳"},BTN:{name:"Bhutan",flag:"🇧🇹"},BVT:{name:"Bouvet Island",flag:"🇧🇻"},BWA:{name:"Botswana",flag:"🇧🇼"},CAF:{name:"Central African Republic",flag:"🇨🇫"},CAN:{name:"Canada",flag:"🇨🇦"},CCK:{name:"Cocos (Keeling) Islands",flag:"🇨🇨"},CHE:{name:"Switzerland",flag:"🇨🇭"},CHL:{name:"Chile",flag:"🇨🇱"},CHN:{name:"China",flag:"🇨🇳"},CIV:{name:"Côte d'Ivoire",flag:"🇨🇮"},CMR:{name:"Cameroon",flag:"🇨🇲"},COD:{name:"Congo, Democratic Republic of the",flag:"🇨🇩"},COG:{name:"Congo",flag:"🇨🇬"},COK:{name:"Cook Islands",flag:"🇨🇰"},COL:{name:"Colombia",flag:"🇨🇴"},COM:{name:"Comoros",flag:"🇰🇲"},CPV:{name:"Cabo Verde",flag:"🇨🇻"},CRI:{name:"Costa Rica",flag:"🇨🇷"},CUB:{name:"Cuba",flag:"🇨🇺"},CUW:{name:"Curaçao",flag:"🇨🇼"},CXR:{name:"Christmas Island",flag:"🇨🇽"},CYM:{name:"Cayman Islands",flag:"🇰🇾"},CYP:{name:"Cyprus",flag:"🇨🇾"},CZE:{name:"Czechia",flag:"🇨🇿"},DEU:{name:"Germany",flag:"🇩🇪"},DJI:{name:"Djibouti",flag:"🇩🇯"},DMA:{name:"Dominica",flag:"🇩🇲"},DNK:{name:"Denmark",flag:"🇩🇰"},DOM:{name:"Dominican Republic",flag:"🇩🇴"},DZA:{name:"Algeria",flag:"🇩🇿"},ECU:{name:"Ecuador",flag:"🇪🇨"},EGY:{name:"Egypt",flag:"🇪🇬"},ERI:{name:"Eritrea",flag:"🇪🇷"},ESH:{name:"Western Sahara",flag:"🇪🇭"},ESP:{name:"Spain",flag:"🇪🇸"},EST:{name:"Estonia",flag:"🇪🇪"},ETH:{name:"Ethiopia",flag:"🇪🇹"},FIN:{name:"Finland",flag:"🇫🇮"},FJI:{name:"Fiji",flag:"🇫🇯"},FLK:{name:"Falkland Islands (Malvinas)",flag:"🇫🇰"},FRA:{name:"France",flag:"🇫🇷"},FRO:{name:"Faroe Islands",flag:"🇫🇴"},FSM:{name:"Micronesia, Federated States of",flag:"🇫🇲"},GAB:{name:"Gabon",flag:"🇬🇦"},GBR:{name:"United Kingdom",flag:"🇬🇧"},GEO:{name:"Georgia",flag:"🇬🇪"},GGY:{name:"Guernsey",flag:"🇬🇬"},GHA:{name:"Ghana",flag:"🇬🇭"},GIB:{name:"Gibraltar",flag:"🇬🇮"},GIN:{name:"Guinea",flag:"🇬🇳"},GLP:{name:"Guadeloupe",flag:"🇬🇵"},GMB:{name:"Gambia",flag:"🇬🇲"},GNB:{name:"Guinea-Bissau",flag:"🇬🇼"},GNQ:{name:"Equatorial Guinea",flag:"🇬🇶"},GRC:{name:"Greece",flag:"🇬🇷"},GRD:{name:"Grenada",flag:"🇬🇩"},GRL:{name:"Greenland",flag:"🇬🇱"},GTM:{name:"Guatemala",flag:"🇬🇹"},GUF:{name:"French Guiana",flag:"🇬🇫"},GUM:{name:"Guam",flag:"🇬🇺"},GUY:{name:"Guyana",flag:"🇬🇾"},HKG:{name:"Hong Kong",flag:"🇭🇰"},HMD:{name:"Heard Island and McDonald Islands",flag:"🇭🇲"},HND:{name:"Honduras",flag:"🇭🇳"},HRV:{name:"Croatia",flag:"🇭🇷"},HTI:{name:"Haiti",flag:"🇭🇹"},HUN:{name:"Hungary",flag:"🇭🇺"},IDN:{name:"Indonesia",flag:"🇮🇩"},IMN:{name:"Isle of Man",flag:"🇮🇲"},IND:{name:"India",flag:"🇮🇳"},IOT:{name:"British Indian Ocean Territory",flag:"🇮🇴"},IRL:{name:"Ireland",flag:"🇮🇪"},IRN:{name:"Iran",flag:"🇮🇷"},IRQ:{name:"Iraq",flag:"🇮🇶"},ISL:{name:"Iceland",flag:"🇮🇸"},ISR:{name:"Israel",flag:"🇮🇱"},ITA:{name:"Italy",flag:"🇮🇹"},JAM:{name:"Jamaica",flag:"🇯🇲"},JEY:{name:"Jersey",flag:"🇯🇪"},JOR:{name:"Jordan",flag:"🇯🇴"},JPN:{name:"Japan",flag:"🇯🇵"},KAZ:{name:"Kazakhstan",flag:"🇰🇿"},KEN:{name:"Kenya",flag:"🇰🇪"},KGZ:{name:"Kyrgyzstan",flag:"🇰🇬"},KHM:{name:"Cambodia",flag:"🇰🇭"},KIR:{name:"Kiribati",flag:"🇰🇮"},KNA:{name:"Saint Kitts and Nevis",flag:"🇰🇳"},KOR:{name:"Korea, Republic of",flag:"🇰🇷"},KWT:{name:"Kuwait",flag:"🇰🇼"},LAO:{name:"Lao People's Democratic Republic",flag:"🇱🇦"},LBN:{name:"Lebanon",flag:"🇱🇧"},LBR:{name:"Liberia",flag:"🇱🇷"},LBY:{name:"Libya",flag:"🇱🇾"},LCA:{name:"Saint Lucia",flag:"🇱🇨"},LIE:{name:"Liechtenstein",flag:"🇱🇮"},LKA:{name:"Sri Lanka",flag:"🇱🇰"},LSO:{name:"Lesotho",flag:"🇱🇸"},LTU:{name:"Lithuania",flag:"🇱🇹"},LUX:{name:"Luxembourg",flag:"🇱🇺"},LVA:{name:"Latvia",flag:"🇱🇻"},MAC:{name:"Macao",flag:"🇲🇴"},MAF:{name:"Saint Martin (French part)",flag:"🇲🇫"},MAR:{name:"Morocco",flag:"🇲🇦"},MCO:{name:"Monaco",flag:"🇲🇨"},MDA:{name:"Moldova",flag:"🇲🇩"},MDG:{name:"Madagascar",flag:"🇲🇬"},MDV:{name:"Maldives",flag:"🇲🇻"},MEX:{name:"Mexico",flag:"🇲🇽"},MHL:{name:"Marshall Islands",flag:"🇲🇭"},MKD:{name:"North Macedonia",flag:"🇲🇰"},MLI:{name:"Mali",flag:"🇲🇱"},MLT:{name:"Malta",flag:"🇲🇹"},MMR:{name:"Myanmar",flag:"🇲🇲"},MNE:{name:"Montenegro",flag:"🇲🇪"},MNG:{name:"Mongolia",flag:"🇲🇳"},MNP:{name:"Northern Mariana Islands",flag:"🇲🇵"},MOZ:{name:"Mozambique",flag:"🇲🇿"},MRT:{name:"Mauritania",flag:"🇲🇷"},MSR:{name:"Montserrat",flag:"🇲🇸"},MTQ:{name:"Martinique",flag:"🇲🇶"},MUS:{name:"Mauritius",flag:"🇲🇺"},MWI:{name:"Malawi",flag:"🇲🇼"},MYS:{name:"Malaysia",flag:"🇲🇾"},MYT:{name:"Mayotte",flag:"🇾🇹"},NAM:{name:"Namibia",flag:"🇳🇦"},NCL:{name:"New Caledonia",flag:"🇳🇨"},NER:{name:"Niger",flag:"🇳🇪"},NFK:{name:"Norfolk Island",flag:"🇳🇫"},NGA:{name:"Nigeria",flag:"🇳🇬"},NIC:{name:"Nicaragua",flag:"🇳🇮"},NIU:{name:"Niue",flag:"🇳🇺"},NLD:{name:"Netherlands",flag:"🇳🇱"},NOR:{name:"Norway",flag:"🇳🇴"},NPL:{name:"Nepal",flag:"🇳🇵"},NRU:{name:"Nauru",flag:"🇳🇷"},NZL:{name:"New Zealand",flag:"🇳🇿"},OMN:{name:"Oman",flag:"🇴🇲"},PAK:{name:"Pakistan",flag:"🇵🇰"},PAN:{name:"Panama",flag:"🇵🇦"},PCN:{name:"Pitcairn",flag:"🇵🇳"},PER:{name:"Peru",flag:"🇵🇪"},PHL:{name:"Philippines",flag:"🇵🇭"},PLW:{name:"Palau",flag:"🇵🇼"},PNG:{name:"Papua New Guinea",flag:"🇵🇬"},POL:{name:"Poland",flag:"🇵🇱"},PRI:{name:"Puerto Rico",flag:"🇵🇷"},PRK:{name:"Korea (Democratic People's Republic of)",flag:"🇰🇵"},PRT:{name:"Portugal",flag:"🇵🇹"},PRY:{name:"Paraguay",flag:"🇵🇾"},PSE:{name:"Palestine, State of",flag:"🇵🇸"},PYF:{name:"French Polynesia",flag:"🇵🇫"},QAT:{name:"Qatar",flag:"🇶🇦"},REU:{name:"Réunion",flag:"🇷🇪"},ROU:{name:"Romania",flag:"🇷🇴"},RUS:{name:"Russian Federation",flag:"🇷🇺"},RWA:{name:"Rwanda",flag:"🇷🇼"},SAU:{name:"Saudi Arabia",flag:"🇸🇦"},SDN:{name:"Sudan",flag:"🇸🇩"},SEN:{name:"Senegal",flag:"🇸🇳"},SGP:{name:"Singapore",flag:"🇸🇬"},SGS:{name:"South Georgia and the South Sandwich Islands",flag:"🇬🇸"},SHN:{name:"Saint Helena, Ascension and Tristan da Cunha",flag:"🇸🇭"},SJM:{name:"Svalbard and Jan Mayen",flag:"🇸🇯"},SLB:{name:"Solomon Islands",flag:"🇸🇧"},SLE:{name:"Sierra Leone",flag:"🇸🇱"},SLV:{name:"El Salvador",flag:"🇸🇻"},SMR:{name:"San Marino",flag:"🇸🇲"},SOM:{name:"Somalia",flag:"🇸🇴"},SPM:{name:"Saint Pierre and Miquelon",flag:"🇵🇲"},SRB:{name:"Serbia",flag:"🇷🇸"},SSD:{name:"South Sudan",flag:"🇸🇸"},STP:{name:"Sao Tome and Principe",flag:"🇸🇹"},SUR:{name:"Suriname",flag:"🇸🇷"},SVK:{name:"Slovakia",flag:"🇸🇰"},SVN:{name:"Slovenia",flag:"🇸🇮"},SWE:{name:"Sweden",flag:"🇸🇪"},SWZ:{name:"Eswatini",flag:"🇸🇿"},SXM:{name:"Sint Maarten (Dutch part)",flag:"🇸🇽"},SYC:{name:"Seychelles",flag:"🇸🇨"},SYR:{name:"Syrian Arab Republic",flag:"🇸🇾"},TCA:{name:"Turks and Caicos Islands",flag:"🇹🇨"},TCD:{name:"Chad",flag:"🇹🇩"},TGO:{name:"Togo",flag:"🇹🇬"},THA:{name:"Thailand",flag:"🇹🇭"},TJK:{name:"Tajikistan",flag:"🇹🇯"},TKL:{name:"Tokelau",flag:"🇹🇰"},TKM:{name:"Turkmenistan",flag:"🇹🇲"},TLS:{name:"Timor-Leste",flag:"🇹🇱"},TON:{name:"Tonga",flag:"🇹🇴"},TTO:{name:"Trinidad and Tobago",flag:"🇹🇹"},TUN:{name:"Tunisia",flag:"🇹🇳"},TUR:{name:"Türkiye",flag:"🇹🇷"},TUV:{name:"Tuvalu",flag:"🇹🇻"},TWN:{name:"Taiwan",flag:"🇹🇼"},TZA:{name:"Tanzania",flag:"🇹🇿"},UGA:{name:"Uganda",flag:"🇺🇬"},UKR:{name:"Ukraine",flag:"🇺🇦"},UMI:{name:"United States Minor Outlying Islands",flag:"🇺🇲"},URY:{name:"Uruguay",flag:"🇺🇾"},USA:{name:"United States of America",flag:"🇺🇸"},UZB:{name:"Uzbekistan",flag:"🇺🇿"},VAT:{name:"Holy See",flag:"🇻🇦"},VCT:{name:"Saint Vincent and the Grenadines",flag:"🇻🇨"},VEN:{name:"Venezuela",flag:"🇻🇪"},VGB:{name:"Virgin Islands (British)",flag:"🇻🇬"},VIR:{name:"Virgin Islands (U.S.)",flag:"🇻🇮"},VNM:{name:"Vietnam",flag:"🇻🇳"},VUT:{name:"Vanuatu",flag:"🇻🇺"},WLF:{name:"Wallis and Futuna",flag:"🇼🇫"},WSM:{name:"Samoa",flag:"🇼🇸"},YEM:{name:"Yemen",flag:"🇾🇪"},ZAF:{name:"South Africa",flag:"🇿🇦"},ZMB:{name:"Zambia",flag:"🇿🇲"},ZWE:{name:"Zimbabwe",flag:"🇿🇼"}},getFormattedCountryName=Le=>{const Be=countryCodeToInfo[Le];return Be?`${Be.flag} ${Be.name}`:void 0},blobToBase64=Le=>new Promise((Be,Ye)=>{const tt=new FileReader;tt.onloadend=()=>{const nt=tt.result;Be(nt.split(",")[1])},tt.onerror=Ye,tt.readAsDataURL(Le)}),useEventListener=(Le,Be,Ye=window)=>{const tt=React.useRef(()=>{});React.useEffect(()=>{tt.current=Be},[Be]),React.useEffect(()=>{if(!(Ye&&Ye.addEventListener))return;const ft=ht=>{var gt;return(gt=tt==null?void 0:tt.current)==null?void 0:gt.call(tt,ht)};return Ye.addEventListener(Le,ft),()=>{Ye.removeEventListener(Le,ft)}},[Le,Ye])},globalState={},createGlobalState=(Le,Be,Ye)=>(globalState[Le]||(globalState[Le]={callbacks:[],value:Ye}),globalState[Le].callbacks.push(Be),{deregister(){const tt=globalState[Le].callbacks,nt=tt.indexOf(Be);nt>-1&&tt.splice(nt,1)},emit(tt){globalState[Le].value!==tt&&(globalState[Le].value=tt,globalState[Le].callbacks.forEach(nt=>{Be!==nt&&nt(tt)}))}}),usePersistedState=(Le,Be,{get:Ye,set:tt})=>{const nt=React.useRef(null),[ft,ht]=React.useState(()=>Ye(Be,Le));return useEventListener("storage",({key:gt,newValue:At})=>{if(gt===Be){const xt=JSON.parse(At);ft!==xt&&ht(xt)}}),React.useEffect(()=>(nt.current=createGlobalState(Be,ht,Le),()=>{var gt,At;(At=(gt=nt==null?void 0:nt.current)==null?void 0:gt.deregister)==null||At.call(gt)}),[]),React.useEffect(()=>{var gt,At;tt(Be,ft),(At=(gt=nt==null?void 0:nt.current)==null?void 0:gt.emit)==null||At.call(gt,ft)},[Be,tt,ft]),[ft,ht]},createStorage=Le=>({get(Be,Ye){const tt=Le.getItem(Be);return tt===null?typeof Ye=="function"?Ye():Ye:JSON.parse(tt)},set(Be,Ye){Le.setItem(Be,JSON.stringify(Ye))}}),createPersistedState=(Le,Be)=>{if(!Be&&typeof window<"u")try{Be=localStorage}catch{Be=null}if(Be){const Ye=createStorage(Be);return tt=>usePersistedState(tt,Le,Ye)}return React.useState},useSessionState=createPersistedState("sessionData");function usePermissions(){const[Le,Be]=React.useState(!1),[Ye,tt]=React.useState(!1);return React.useEffect(()=>{var nt;if(!navigator.permissions){tt(!0);return}(nt=navigator.permissions)==null||nt.query({name:"camera"}).then(ft=>{ft.state==="granted"&&(Be(!0),tt(!1)),ft.state==="prompt"&&tt(!0)}).catch(()=>{Be(!1),tt(!1)})},[]),[Le,Be,Ye]}function useInterval(Le,Be){const Ye=React.useRef(Le),tt=React.useRef(null);return Ye.current=Le,React.useEffect(()=>{function nt(){Ye.current()}if(Be!==null)return tt.current=setInterval(nt,Be),()=>clearInterval(tt.current)},[Be]),tt.current}const resize=async()=>{await sleep(100);const Le=window.innerWidth*.01,Be=window.innerHeight*.01;document.documentElement.style.setProperty("--vw",`${Le}px`),document.documentElement.style.setProperty("--vh",`${Be}px`)},useResize=()=>{useEventListener("resize",()=>{resize()},window),React.useLayoutEffect(()=>{resize()},[])},isPortrait=()=>{var Le;return((Le=screen.orientation)==null?void 0:Le.type.includes("portrait"))||Math.abs(window.orientation)===0};function useOrientation(){const Le=getUxType(),Be=Le==="mobile"?!1:!isPortrait(),[Ye,tt]=React.useState(Be),nt=mobile.isDesktop();return React.useEffect(()=>{if(Le==="mobile")return;function ft(){tt(!isPortrait()),document.activeElement instanceof HTMLElement&&document.activeElement.blur(),window.focus()}return screen.orientation?screen.orientation.addEventListener("change",ft):window.addEventListener("orientationchange",ft),()=>{screen.orientation?screen.orientation.removeEventListener("change",ft):window.removeEventListener("orientationchange",ft)}},[Le]),useEventListener("resize",()=>{isMobile$1&&tt(!isPortrait())},window),{isRotated:nt?!1:Ye}}const handleUnmountRoot=(Le,Be,Ye)=>(...tt)=>{setTimeout(()=>{if("createRoot"in ReactDOM__namespace)Be.unmount();else if(typeof ReactDOM__namespace.unmountComponentAtNode=="function")ReactDOM__namespace.unmountComponentAtNode(Ye);else throw new Error("Unsupported React version");Le(...tt)},0)},createRoot$1=Le=>{if("createRoot"in ReactDOM__namespace)return ReactDOM__namespace.createRoot(Le);if(typeof ReactDOM__namespace.render=="function")return ReactDOM__namespace.render;throw new Error("Unsupported React version")},customRender=(Le,Be,Ye)=>{if("createRoot"in ReactDOM__namespace)Ye.render(Le);else if(typeof Ye=="function")Ye(Le,Be);else throw new Error("Unsupported React version")};function useQuery(){return React.useMemo(()=>new URLSearchParams(window.location.search),[])}function useSteps(Le=0){const[Be,Ye]=React.useState(Le),tt=React.useCallback(()=>{Ye(nt=>nt+1)},[]);return{currentStep:Be,setStep:Ye,nextStep:tt}}function useOffline(Le=emptyFunc){useEventListener("offline",()=>{navigator.onLine||Le()})}function useToggle(Le=!1){const[Be,Ye]=React.useState(Le);return{state:Be,actions:{on:()=>{Ye(!0)},off:()=>{Ye(!1)},toggle:()=>{Ye(nt=>!nt)},reset:()=>{Ye(Le)}}}}function useClickOutside(Le,Be){const Ye=React.useRef();React.useEffect(()=>{Ye.current=Be;const tt=nt=>{var ft;!(Le!=null&&Le.current)||(ft=Le==null?void 0:Le.current)!=null&&ft.contains(nt.target)||Be()};return document.addEventListener("mousedown",tt,!0),document.addEventListener("touchstart",tt,!0),()=>{document.removeEventListener("mousedown",tt),document.removeEventListener("touchstart",tt)}},[Be,Le])}function useScript(Le,Be){React.useEffect(()=>{const Ye=document.createElement("script");return Ye.src=Le,Ye.type="text/javascript",Ye.async=!0,Ye.onload=Be,document.body.appendChild(Ye),()=>{document.body.removeChild(Ye)}},[Le])}const useUpdateQueryParamsAndReload=()=>{const Le=window.location;return Ye=>{const tt=new URLSearchParams(Le.search);Object.keys(Ye).forEach(ft=>{const ht=Ye[ft];ht==null?tt.delete(ft):tt.set(ft,ht)});const nt=`${Le.pathname}?${tt.toString()}`;window.location.href=nt}},useDocumentTitle=Le=>{React.useEffect(()=>{document.title=Le},[Le])},useAutoFocus=(Le,Be=!1)=>{React.useEffect(()=>(Le.current&&(Le.current.focus(),Le.current.blur()),()=>{Be&&Le.current&&Le.current.blur()}),[Le,Be])};function useDeviceId(){const[Le,Be]=React.useState();return[Le,tt=>{Be(tt)}]}function useDebouncedValue(Le,Be=250){const[Ye,tt]=React.useState(Le);return React.useEffect(()=>{const nt=setTimeout(()=>{tt(Le)},Be);return()=>{clearTimeout(nt)}},[Le,Be]),Ye}function useViewportSize(){const[Le,Be]=React.useState({width:window.innerWidth,height:window.innerHeight});return React.useEffect(()=>{let Ye=null,tt=null;const nt=()=>{tt&&window.clearTimeout(tt),tt=window.setTimeout(()=>{Be({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})},100)};return"ResizeObserver"in window?(Ye=new ResizeObserver(nt),Ye.observe(document.documentElement)):window.addEventListener("resize",nt),nt(),()=>{Ye?Ye.disconnect():window.removeEventListener("resize",nt),tt&&window.clearTimeout(tt)}},[]),Le}const backCameraKeywords=["rear","back","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक"],cameraObjects=new Map;let getCamerasPromise;function isBackCameraLabel(Le){const Be=Le.toLowerCase();return backCameraKeywords.some(Ye=>Be.includes(Ye))}function createCamera(Le,Be,Ye){var Et,kt;if(cameraObjects.has(Le.deviceId))return cameraObjects.get(Le.deviceId);const tt=Le.label,nt=Le.getCapabilities(),ft=(Et=nt==null?void 0:nt.width)==null?void 0:Et.max,ht=(kt=nt==null?void 0:nt.height)==null?void 0:kt.max,gt=nt==null?void 0:nt.aspectRatio;let At;Ye.every(Ct=>Ct.label==="")?At=Ye.length===1||Be+1<=Ye.length/2?"front":"back":At=isBackCameraLabel(tt)?"back":"front";const xt={deviceId:Le.deviceId,label:tt,cameraType:At,width:ft,height:ht,aspectRatio:gt};return cameraObjects.set(Le.deviceId,xt),xt}function extractCamerasFromDevices(Le){const Be=Le.filter(Ye=>Ye.kind==="videoinput").map(createCamera);if(Be.length>1&&!Be.some(Ye=>Ye.cameraType==="back")){let Ye=Be.length-1;const tt=Be.map(nt=>{const ft=nt.label.match(/\b([0-9]+)MP?\b/i);return ft!=null?parseInt(ft[1],10):NaN});tt.some(nt=>isNaN(nt))||(Ye=tt.lastIndexOf(Math.max(...tt))),Be[Ye].cameraType="back"}return Be}function adjustCamerasFromCameraStream(Le,Be){const Ye=Le.getSettings(),tt=Be.find(nt=>nt.deviceId===Ye.deviceId||nt.label!==""&&nt.label===Le.label);if(tt!==void 0){if((Ye!=null&&Ye.facingMode==="environment"||isBackCameraLabel(Le.label))&&Be.length>1)return Be.forEach(ft=>{ft.deviceId===tt.deviceId?ft.cameraType="back":isBackCameraLabel(ft.label)||(ft.cameraType="front")}),Be.filter(ft=>ft.cameraType==="back").sort((ft,ht)=>ft.label.localeCompare(ht.label))[0];if(Be.length===1)return tt}}function getCameras(){return getCamerasPromise!=null||(getCamerasPromise=new Promise(async Le=>{const Be=await navigator.mediaDevices.enumerateDevices(),Ye=extractCamerasFromDevices(Be);return Le(Ye)})),getCamerasPromise}function getUserMediaVideoParams(Le){const Be={resizeMode:"none",facingMode:"environment"};switch(Le){case 0:return{...Be,height:{ideal:720},aspectRatio:{ideal:19.5/9}};case 1:return{...Be,width:{min:3200,ideal:3840,max:4096},height:{min:1800,ideal:2160,max:2400}};case 2:return{...Be,width:{min:1400,ideal:1920,max:2160},height:{min:900,ideal:1080,max:1440}};case 3:return{...Be,width:{min:640,ideal:640,max:800},height:{min:480,ideal:480,max:600}};case 4:return{...Be,width:{min:640,ideal:800,max:960},height:{min:480,ideal:480,max:480}};default:return{}}}const selfieConstraints={video:{facingMode:"user",height:{ideal:480},width:{ideal:640}}},killStream=(Le,Be=!1)=>{if(Be){Le.getVideoTracks().forEach(Ye=>Ye.stop());return}Le.getTracks().forEach(Ye=>Ye.stop())},selfieChecks=({confidence:Le,isBright:Be,hasLenses:Ye,hasFaceMask:tt,hasClosedEyes:nt,hasHeadCover:ft},{hatCheckEnabled:ht=!1,lensesCheckEnabled:gt=!1,maskCheckEnabled:At=!1,eyesClosedCheckEnabled:xt=!1})=>{const Et=Le===0,kt=Be,Ct=gt?!Ye:!0,yt=At?!tt:!0,vt=xt?!nt:!0,bt=ht?!ft:!0;return{livenessPassed:Et,brightnessPassed:kt,lensesPassed:Ct,maskPassed:yt,closedEyesPassed:vt,headCoverPassed:bt,hasErrors:!Et||!kt||!Ct||!yt||!vt||!bt}},logSelfieChecks=(Le,Be,Ye,tt,nt,ft,ht)=>{const gt=[{passed:Be.headCoverPassed,log:"headCoverDected",notification:"notifications.removeHeadwear",description:getSelfieTranslation("removeHeadwear",ht),message:"Hat detected"},{passed:Be.lensesPassed,log:"lensesDetected",notification:"notifications.lenses",description:getSelfieTranslation("lenses",ht),message:"Lenses detected"},{passed:Be.brightnessPassed,log:"badBrightness",notification:"notifications.brightness",description:"notifications.brightnessDescription",message:"Bad brightness"},{passed:Be.maskPassed,log:"badMask",notification:"notifications.mask",description:getSelfieTranslation("mask",ht),message:"Mask detected"},{passed:Be.livenessPassed,log:"spoofAttempt",notification:"notifications.spoof",description:"notifications.spoofDescription",message:"Spoof attempt detected"},{passed:Be.closedEyesPassed,log:"closedEyes",notification:"notifications.closedEyes",description:getSelfieTranslation("closedEyes",ht),message:"Closed eyes detected"}];for(const{passed:At,log:xt,message:Et,notification:kt,description:Ct}of gt)if(!At){Ye(getLogObject(xt,{response:Le,message:Et})),tt(nt(kt)),ft==null||ft(nt(Ct));break}},getIdealContraintsDefault=(Le=720)=>({audio:!1,video:{resizeMode:"none",facingMode:"environment",height:{ideal:Le},aspectRatio:{ideal:19.5/9}}}),getStream=async(Le,Be=0)=>{if(Le==="user")return navigator.mediaDevices.getUserMedia(selfieConstraints);if(mobile.iOS()){const tt=await navigator.mediaDevices.getUserMedia(getIOSConstraints());return await tt.getVideoTracks()[0].applyConstraints({advanced:[{focusDistance:1}]}),tt}try{const tt=await getCameras(),nt=await navigator.mediaDevices.getUserMedia({video:getUserMediaVideoParams(Be)}),ft=nt.getVideoTracks()[0],ht=adjustCamerasFromCameraStream(ft,tt);killStream(nt);let gt=1280,At=720;if(Be>1){const{width:kt,height:Ct}=getUserMediaVideoParams(Be);gt=kt.ideal,At=Ct.ideal}const xt={video:{deviceId:{exact:ht.deviceId},width:{ideal:gt},height:{ideal:At}}};return await navigator.mediaDevices.getUserMedia(xt)}catch(tt){if(Be===5)throw tt;return getStream(Le,Be+1)}},getIOSConstraints=()=>getIdealContraintsDefault(localStorage.getItem("isHighPerformance")==="true"?1080:720);async function chooseNonUltraFrontCameraMultilingual(){const Le=["front","frontal","vorderseite","avant","前面","正面","앞"],Be=["ultra","ウルトラ","울트라"];try{const tt=(await navigator.mediaDevices.enumerateDevices()).find(nt=>{const ft=nt.label.toLowerCase();return nt.kind==="videoinput"&&Le.some(ht=>ft.includes(ht.toLowerCase()))&&!Be.some(ht=>ft.includes(ht.toLowerCase()))});return tt?tt.deviceId:null}catch{return null}}async function getNonUltraWideFrontCameraStream(){const Le=await navigator.mediaDevices.getUserMedia({video:{facingMode:"user"},audio:!1});killStream(Le);const Be=await chooseNonUltraFrontCameraMultilingual();return navigator.mediaDevices.getUserMedia({video:{deviceId:Be}})}const zoomCamera=async(Le,Be)=>{if(!Le)return!1;const Ye=Le.getSettings(),tt=Le.getCapabilities();return"zoom"in Ye||tt.zoom?(await Le.applyConstraints({advanced:[{zoom:tt.zoom.min&&Be<tt.zoom.min||tt.zoom.max&&Be>tt.zoom.max||Be}]}),!0):!1};async function base64ToImageData(Le){const Ye=await(await fetch(`data:image/jpeg;base64,${Le}`)).blob(),tt=new Image,nt=new Promise((gt,At)=>{tt.onload=gt,tt.onerror=At});tt.src=URL.createObjectURL(Ye),await nt;const ft=document.createElement("canvas");ft.width=tt.width,ft.height=tt.height;const ht=ft.getContext("2d");return ht.drawImage(tt,0,0),ht.getImageData(0,0,tt.width,tt.height)}function getChosenCameraInfo(Le,Be=null,Ye=null){const tt=Le.getCapabilities(),nt=Le.getSettings(),{focusMode:ft=!1}=navigator.mediaDevices.getSupportedConstraints();return{label:Le.label,deviceId:nt.deviceId,fallbackOption:Be,videoSource:Ye,resolution:`${nt.width}x${nt.height}`,autofocus:ft,facingMode:nt.facingMode,currentFrameRate:nt.frameRate,zoom:tt.zoom?{current:nt.zoom,min:tt.zoom.min,max:tt.zoom.max,step:tt.zoom.step}:void 0,focusDistance:tt.focusDistance?{current:nt.focusDistance,min:tt.focusDistance.min,max:tt.focusDistance.max,step:tt.focusDistance.step}:void 0}}async function getDeviceCapabilities(){const Le={};try{(await navigator.mediaDevices.enumerateDevices()).filter(tt=>tt.kind==="videoinput").forEach((tt,nt)=>{const ft=tt.getCapabilities();Le[`camera${nt+1}`]={label:tt.label,width:{min:ft.width.min,max:ft.width.max},height:{min:ft.height.min,max:ft.height.max},frameRate:{min:ft.frameRate.min,max:ft.frameRate.max},facingMode:ft.facingMode,focusMode:ft.focusMode||void 0,focusDistance:ft.focusDistance?{min:ft.focusDistance.min,max:ft.focusDistance.max}:void 0}})}catch(Be){console.log("Unable to get device capabilities: ",Be)}return Le}const translations={removeLenses:{default:"notifications.removeLenses",assisted:"notifications.removeLensesAssisted"},openEyes:{default:"notifications.openEyes",assisted:"notifications.openEyesAssisted"},removeMask:{default:"notifications.removeMask",assisted:"notifications.removeMaskAssisted"},ageAssurance:{default:"notifications.selfie.ageAssurance",assisted:"notifications.selfie.ageAssuranceAssisted"},removeHeadwear:{default:"notifications.removeHeadwearDescription",assisted:"notifications.removeHeadwearDescriptionAssisted"},lenses:{default:"notifications.lensesDescription",assisted:"notifications.lensesDescriptionAssisted"},mask:{assisted:"notifications.maskDescriptionAssisted",default:"notifications.maskDescription"},closedEyes:{assisted:"notifications.closedEyesDescriptionAssisted",default:"notifications.closedEyesDescription"}},getSelfieTranslation=(Le,Be)=>{const Ye=translations[Le];return Be?Ye.assisted:Ye.default},getSupportedMediaRecorderMimeType=()=>{const Le=mobile.iOS()?["video/mp4","video/webm","video/webm;codecs=vp9","video/webm;codecs=vp8"]:["video/webm","video/webm;codecs=vp9","video/webm;codecs=vp8","video/mp4"];for(const Be of Le)if(MediaRecorder.isTypeSupported(Be))return Be;return""},getMediaStreamTrackSettings=Le=>{const Be=Le.getSettings(),{width:Ye,height:tt,...nt}=Be;return mobile.isIpad()||!Ye||!tt?Be:mobile.any()&&tt<Ye?{...nt,width:tt,height:Ye}:Be};class Semaphore{constructor(Be=1){this.maxConcurrent=Be,this.current=0,this.queue=[]}async acquire(){return this.current<this.maxConcurrent?(this.current++,Promise.resolve()):new Promise(Be=>{this.queue.push(Be)})}release(){if(this.current=Math.max(0,this.current-1),this.queue.length>0&&this.current<this.maxConcurrent){this.current++;const Be=this.queue.shift();Be&&Be()}}}class Mutex{constructor(){this.semaphore=new Semaphore(1)}async lock(){return this.semaphore.acquire()}unlock(){this.semaphore.release()}async withLock(Be,...Ye){await this.lock();try{return await Be(...Ye)}finally{this.unlock()}}}var __assign$3=function(){return __assign$3=Object.assign||function(Be){for(var Ye,tt=1,nt=arguments.length;tt<nt;tt++){Ye=arguments[tt];for(var ft in Ye)Object.prototype.hasOwnProperty.call(Ye,ft)&&(Be[ft]=Ye[ft])}return Be},__assign$3.apply(this,arguments)};function __spreadArray$2(Le,Be,Ye){if(Ye||arguments.length===2)for(var tt=0,nt=Be.length,ft;tt<nt;tt++)(ft||!(tt in Be))&&(ft||(ft=Array.prototype.slice.call(Be,0,tt)),ft[tt]=Be[tt]);return Le.concat(ft||Array.prototype.slice.call(Be))}typeof SuppressedError=="function"&&SuppressedError;function memoize$1(Le){var Be=Object.create(null);return function(Ye){return Be[Ye]===void 0&&(Be[Ye]=Le(Ye)),Be[Ye]}}var reactPropsRegex$1=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid$1=memoize$1(function(Le){return reactPropsRegex$1.test(Le)||Le.charCodeAt(0)===111&&Le.charCodeAt(1)===110&&Le.charCodeAt(2)<91}),MS$1="-ms-",MOZ$1="-moz-",WEBKIT$1="-webkit-",COMMENT$1="comm",RULESET$1="rule",DECLARATION$1="decl",IMPORT$1="@import",KEYFRAMES$1="@keyframes",LAYER$1="@layer",abs$1=Math.abs,from$1=String.fromCharCode,assign$1=Object.assign;function hash$1(Le,Be){return charat$1(Le,0)^45?(((Be<<2^charat$1(Le,0))<<2^charat$1(Le,1))<<2^charat$1(Le,2))<<2^charat$1(Le,3):0}function trim$3(Le){return Le.trim()}function match$1(Le,Be){return(Le=Be.exec(Le))?Le[0]:Le}function replace$1(Le,Be,Ye){return Le.replace(Be,Ye)}function indexof$1(Le,Be,Ye){return Le.indexOf(Be,Ye)}function charat$1(Le,Be){return Le.charCodeAt(Be)|0}function substr$1(Le,Be,Ye){return Le.slice(Be,Ye)}function strlen$1(Le){return Le.length}function sizeof$1(Le){return Le.length}function append$1(Le,Be){return Be.push(Le),Le}function combine$1(Le,Be){return Le.map(Be).join("")}function filter$1(Le,Be){return Le.filter(function(Ye){return!match$1(Ye,Be)})}var line$1=1,column$1=1,length$1=0,position$4=0,character$1=0,characters$1="";function node$2(Le,Be,Ye,tt,nt,ft,ht,gt){return{value:Le,root:Be,parent:Ye,type:tt,props:nt,children:ft,line:line$1,column:column$1,length:ht,return:"",siblings:gt}}function copy$2(Le,Be){return assign$1(node$2("",null,null,"",null,null,0,Le.siblings),Le,{length:-Le.length},Be)}function lift(Le){for(;Le.root;)Le=copy$2(Le.root,{children:[Le]});append$1(Le,Le.siblings)}function char$1(){return character$1}function prev$1(){return character$1=position$4>0?charat$1(characters$1,--position$4):0,column$1--,character$1===10&&(column$1=1,line$1--),character$1}function next$2(){return character$1=position$4<length$1?charat$1(characters$1,position$4++):0,column$1++,character$1===10&&(column$1=1,line$1++),character$1}function peek$1(){return charat$1(characters$1,position$4)}function caret$1(){return position$4}function slice$3(Le,Be){return substr$1(characters$1,Le,Be)}function token$1(Le){switch(Le){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc$1(Le){return line$1=column$1=1,length$1=strlen$1(characters$1=Le),position$4=0,[]}function dealloc$1(Le){return characters$1="",Le}function delimit$1(Le){return trim$3(slice$3(position$4-1,delimiter$1(Le===91?Le+2:Le===40?Le+1:Le)))}function whitespace$2(Le){for(;(character$1=peek$1())&&character$1<33;)next$2();return token$1(Le)>2||token$1(character$1)>3?"":" "}function escaping$1(Le,Be){for(;--Be&&next$2()&&!(character$1<48||character$1>102||character$1>57&&character$1<65||character$1>70&&character$1<97););return slice$3(Le,caret$1()+(Be<6&&peek$1()==32&&next$2()==32))}function delimiter$1(Le){for(;next$2();)switch(character$1){case Le:return position$4;case 34:case 39:Le!==34&&Le!==39&&delimiter$1(character$1);break;case 40:Le===41&&delimiter$1(Le);break;case 92:next$2();break}return position$4}function commenter$1(Le,Be){for(;next$2()&&Le+character$1!==57;)if(Le+character$1===84&&peek$1()===47)break;return"/*"+slice$3(Be,position$4-1)+"*"+from$1(Le===47?Le:next$2())}function identifier$1(Le){for(;!token$1(peek$1());)next$2();return slice$3(Le,position$4)}function compile$1(Le){return dealloc$1(parse$9("",null,null,null,[""],Le=alloc$1(Le),0,[0],Le))}function parse$9(Le,Be,Ye,tt,nt,ft,ht,gt,At){for(var xt=0,Et=0,kt=ht,Ct=0,yt=0,vt=0,bt=1,It=1,wt=1,Rt=0,Tt="",Bt=nt,Dt=ft,Pt=tt,Nt=Tt;It;)switch(vt=Rt,Rt=next$2()){case 40:if(vt!=108&&charat$1(Nt,kt-1)==58){indexof$1(Nt+=replace$1(delimit$1(Rt),"&","&\f"),"&\f",abs$1(xt?gt[xt-1]:0))!=-1&&(wt=-1);break}case 34:case 39:case 91:Nt+=delimit$1(Rt);break;case 9:case 10:case 13:case 32:Nt+=whitespace$2(vt);break;case 92:Nt+=escaping$1(caret$1()-1,7);continue;case 47:switch(peek$1()){case 42:case 47:append$1(comment$3(commenter$1(next$2(),caret$1()),Be,Ye,At),At);break;default:Nt+="/"}break;case 123*bt:gt[xt++]=strlen$1(Nt)*wt;case 125*bt:case 59:case 0:switch(Rt){case 0:case 125:It=0;case 59+Et:wt==-1&&(Nt=replace$1(Nt,/\f/g,"")),yt>0&&strlen$1(Nt)-kt&&append$1(yt>32?declaration$1(Nt+";",tt,Ye,kt-1,At):declaration$1(replace$1(Nt," ","")+";",tt,Ye,kt-2,At),At);break;case 59:Nt+=";";default:if(append$1(Pt=ruleset$1(Nt,Be,Ye,xt,Et,nt,gt,Tt,Bt=[],Dt=[],kt,ft),ft),Rt===123)if(Et===0)parse$9(Nt,Be,Pt,Pt,Bt,ft,kt,gt,Dt);else switch(Ct===99&&charat$1(Nt,3)===110?100:Ct){case 100:case 108:case 109:case 115:parse$9(Le,Pt,Pt,tt&&append$1(ruleset$1(Le,Pt,Pt,0,0,nt,gt,Tt,nt,Bt=[],kt,Dt),Dt),nt,Dt,kt,gt,tt?Bt:Dt);break;default:parse$9(Nt,Pt,Pt,Pt,[""],Dt,0,gt,Dt)}}xt=Et=yt=0,bt=wt=1,Tt=Nt="",kt=ht;break;case 58:kt=1+strlen$1(Nt),yt=vt;default:if(bt<1){if(Rt==123)--bt;else if(Rt==125&&bt++==0&&prev$1()==125)continue}switch(Nt+=from$1(Rt),Rt*bt){case 38:wt=Et>0?1:(Nt+="\f",-1);break;case 44:gt[xt++]=(strlen$1(Nt)-1)*wt,wt=1;break;case 64:peek$1()===45&&(Nt+=delimit$1(next$2())),Ct=peek$1(),Et=kt=strlen$1(Tt=Nt+=identifier$1(caret$1())),Rt++;break;case 45:vt===45&&strlen$1(Nt)==2&&(bt=0)}}return ft}function ruleset$1(Le,Be,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt){for(var Ct=nt-1,yt=nt===0?ft:[""],vt=sizeof$1(yt),bt=0,It=0,wt=0;bt<tt;++bt)for(var Rt=0,Tt=substr$1(Le,Ct+1,Ct=abs$1(It=ht[bt])),Bt=Le;Rt<vt;++Rt)(Bt=trim$3(It>0?yt[Rt]+" "+Tt:replace$1(Tt,/&\f/g,yt[Rt])))&&(At[wt++]=Bt);return node$2(Le,Be,Ye,nt===0?RULESET$1:gt,At,xt,Et,kt)}function comment$3(Le,Be,Ye,tt){return node$2(Le,Be,Ye,COMMENT$1,from$1(char$1()),substr$1(Le,2,-2),0,tt)}function declaration$1(Le,Be,Ye,tt,nt){return node$2(Le,Be,Ye,DECLARATION$1,substr$1(Le,0,tt),substr$1(Le,tt+1,-1),tt,nt)}function prefix$2(Le,Be,Ye){switch(hash$1(Le,Be)){case 5103:return WEBKIT$1+"print-"+Le+Le;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT$1+Le+Le;case 4789:return MOZ$1+Le+Le;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT$1+Le+MOZ$1+Le+MS$1+Le+Le;case 5936:switch(charat$1(Le,Be+11)){case 114:return WEBKIT$1+Le+MS$1+replace$1(Le,/[svh]\w+-[tblr]{2}/,"tb")+Le;case 108:return WEBKIT$1+Le+MS$1+replace$1(Le,/[svh]\w+-[tblr]{2}/,"tb-rl")+Le;case 45:return WEBKIT$1+Le+MS$1+replace$1(Le,/[svh]\w+-[tblr]{2}/,"lr")+Le}case 6828:case 4268:case 2903:return WEBKIT$1+Le+MS$1+Le+Le;case 6165:return WEBKIT$1+Le+MS$1+"flex-"+Le+Le;case 5187:return WEBKIT$1+Le+replace$1(Le,/(\w+).+(:[^]+)/,WEBKIT$1+"box-$1$2"+MS$1+"flex-$1$2")+Le;case 5443:return WEBKIT$1+Le+MS$1+"flex-item-"+replace$1(Le,/flex-|-self/g,"")+(match$1(Le,/flex-|baseline/)?"":MS$1+"grid-row-"+replace$1(Le,/flex-|-self/g,""))+Le;case 4675:return WEBKIT$1+Le+MS$1+"flex-line-pack"+replace$1(Le,/align-content|flex-|-self/g,"")+Le;case 5548:return WEBKIT$1+Le+MS$1+replace$1(Le,"shrink","negative")+Le;case 5292:return WEBKIT$1+Le+MS$1+replace$1(Le,"basis","preferred-size")+Le;case 6060:return WEBKIT$1+"box-"+replace$1(Le,"-grow","")+WEBKIT$1+Le+MS$1+replace$1(Le,"grow","positive")+Le;case 4554:return WEBKIT$1+replace$1(Le,/([^-])(transform)/g,"$1"+WEBKIT$1+"$2")+Le;case 6187:return replace$1(replace$1(replace$1(Le,/(zoom-|grab)/,WEBKIT$1+"$1"),/(image-set)/,WEBKIT$1+"$1"),Le,"")+Le;case 5495:case 3959:return replace$1(Le,/(image-set\([^]*)/,WEBKIT$1+"$1$`$1");case 4968:return replace$1(replace$1(Le,/(.+:)(flex-)?(.*)/,WEBKIT$1+"box-pack:$3"+MS$1+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT$1+Le+Le;case 4200:if(!match$1(Le,/flex-|baseline/))return MS$1+"grid-column-align"+substr$1(Le,Be)+Le;break;case 2592:case 3360:return MS$1+replace$1(Le,"template-","")+Le;case 4384:case 3616:return Ye&&Ye.some(function(tt,nt){return Be=nt,match$1(tt.props,/grid-\w+-end/)})?~indexof$1(Le+(Ye=Ye[Be].value),"span",0)?Le:MS$1+replace$1(Le,"-start","")+Le+MS$1+"grid-row-span:"+(~indexof$1(Ye,"span",0)?match$1(Ye,/\d+/):+match$1(Ye,/\d+/)-+match$1(Le,/\d+/))+";":MS$1+replace$1(Le,"-start","")+Le;case 4896:case 4128:return Ye&&Ye.some(function(tt){return match$1(tt.props,/grid-\w+-start/)})?Le:MS$1+replace$1(replace$1(Le,"-end","-span"),"span ","")+Le;case 4095:case 3583:case 4068:case 2532:return replace$1(Le,/(.+)-inline(.+)/,WEBKIT$1+"$1$2")+Le;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen$1(Le)-1-Be>6)switch(charat$1(Le,Be+1)){case 109:if(charat$1(Le,Be+4)!==45)break;case 102:return replace$1(Le,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT$1+"$2-$3$1"+MOZ$1+(charat$1(Le,Be+3)==108?"$3":"$2-$3"))+Le;case 115:return~indexof$1(Le,"stretch",0)?prefix$2(replace$1(Le,"stretch","fill-available"),Be,Ye)+Le:Le}break;case 5152:case 5920:return replace$1(Le,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(tt,nt,ft,ht,gt,At,xt){return MS$1+nt+":"+ft+xt+(ht?MS$1+nt+"-span:"+(gt?At:+At-+ft)+xt:"")+Le});case 4949:if(charat$1(Le,Be+6)===121)return replace$1(Le,":",":"+WEBKIT$1)+Le;break;case 6444:switch(charat$1(Le,charat$1(Le,14)===45?18:11)){case 120:return replace$1(Le,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+WEBKIT$1+(charat$1(Le,14)===45?"inline-":"")+"box$3$1"+WEBKIT$1+"$2$3$1"+MS$1+"$2box$3")+Le;case 100:return replace$1(Le,":",":"+MS$1)+Le}break;case 5719:case 2647:case 2135:case 3927:case 2391:return replace$1(Le,"scroll-","scroll-snap-")+Le}return Le}function serialize$2(Le,Be){for(var Ye="",tt=0;tt<Le.length;tt++)Ye+=Be(Le[tt],tt,Le,Be)||"";return Ye}function stringify$5(Le,Be,Ye,tt){switch(Le.type){case LAYER$1:if(Le.children.length)break;case IMPORT$1:case DECLARATION$1:return Le.return=Le.return||Le.value;case COMMENT$1:return"";case KEYFRAMES$1:return Le.return=Le.value+"{"+serialize$2(Le.children,tt)+"}";case RULESET$1:if(!strlen$1(Le.value=Le.props.join(",")))return""}return strlen$1(Ye=serialize$2(Le.children,tt))?Le.return=Le.value+"{"+Ye+"}":""}function middleware$1(Le){var Be=sizeof$1(Le);return function(Ye,tt,nt,ft){for(var ht="",gt=0;gt<Be;gt++)ht+=Le[gt](Ye,tt,nt,ft)||"";return ht}}function rulesheet$1(Le){return function(Be){Be.root||(Be=Be.return)&&Le(Be)}}function prefixer$1(Le,Be,Ye,tt){if(Le.length>-1&&!Le.return)switch(Le.type){case DECLARATION$1:Le.return=prefix$2(Le.value,Le.length,Ye);return;case KEYFRAMES$1:return serialize$2([copy$2(Le,{value:replace$1(Le.value,"@","@"+WEBKIT$1)})],tt);case RULESET$1:if(Le.length)return combine$1(Ye=Le.props,function(nt){switch(match$1(nt,tt=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":lift(copy$2(Le,{props:[replace$1(nt,/:(read-\w+)/,":"+MOZ$1+"$1")]})),lift(copy$2(Le,{props:[nt]})),assign$1(Le,{props:filter$1(Ye,tt)});break;case"::placeholder":lift(copy$2(Le,{props:[replace$1(nt,/:(plac\w+)/,":"+WEBKIT$1+"input-$1")]})),lift(copy$2(Le,{props:[replace$1(nt,/:(plac\w+)/,":"+MOZ$1+"$1")]})),lift(copy$2(Le,{props:[replace$1(nt,/:(plac\w+)/,MS$1+"input-$1")]})),lift(copy$2(Le,{props:[nt]})),assign$1(Le,{props:filter$1(Ye,tt)});break}return""})}}var unitlessKeys$1={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},f$3=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",m$3="active",y$1="data-styled-version",v$e="6.1.19",g$2=`/*!sc*/
|
|
3
3
|
`,S$2=typeof window<"u"&&typeof document<"u",w$f=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),E$2=/invalid hook call/i,N$2=new Set,P$2=function(Le,Be){if(process.env.NODE_ENV!=="production"){var Ye=Be?' with the id of "'.concat(Be,'"'):"",tt="The component ".concat(Le).concat(Ye,` has been created dynamically.
|
|
4
4
|
`)+`You may see this warning because you've called styled inside another component.
|
|
5
5
|
To resolve this only create new StyledComponents outside of any render method and function component.
|
|
@@ -63,7 +63,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[St]+=1);const breakpoints$3={
|
|
|
63
63
|
justify-content: center;
|
|
64
64
|
align-items: center;
|
|
65
65
|
flex-direction: column;
|
|
66
|
-
`;typeof Promise.withResolvers!="function"&&(Promise.withResolvers=()=>{let Le,Be;return{promise:new Promise((tt,nt)=>{Le=tt,Be=nt}),resolve:Le,reject:Be}});class InterruptionHandler{constructor(){this.boundVisibilityChange=this.handleVisibilityChange.bind(this),this.boundOnline=this.handleOnline.bind(this),this.boundOffline=this.handleOffline.bind(this),this.boundUnhandledRejection=this.handleUnhandledRejection.bind(this),this.boundError=this.handleError.bind(this),this.initialized=!1}registerEventListeners(){this.initialized||(document.addEventListener("visibilitychange",this.boundVisibilityChange),window.addEventListener("online",this.boundOnline),window.addEventListener("offline",this.boundOffline),window.addEventListener("unhandledrejection",this.boundUnhandledRejection),window.addEventListener("error",this.boundError),this.initialized=!0)}removeEventListeners(){this.initialized&&(this.initialized=!1,document.removeEventListener("visibilitychange",this.boundVisibilityChange),window.removeEventListener("online",this.boundOnline),window.removeEventListener("offline",this.boundOffline),window.removeEventListener("unhandledrejection",this.boundUnhandledRejection),window.removeEventListener("error",this.boundError))}handleVisibilityChange(){document.hidden?this.onAppHidden():this.onAppVisible()}onAppHidden(){}onAppVisible(){}handleOnline(){}handleOffline(){}handleUnhandledRejection(Be){}handleError(Be){}}const regex$1={CURP_PATTERN:/^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/,EMAIL_PATTERN:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,SSN_PATTERN:/^\d{3}-?\d{2}-?\d{4}$/};function webgl(){let Le,Be,Ye=256,tt=128;Le=document.body.appendChild(document.createElement("canvas")),Le.width=Ye,Le.height=tt;try{Be=Le.getContext("webgl2")||Le.getContext("experimental-webgl2")||Le.getContext("webgl")||Le.getContext("experimental-webgl")||Le.getContext("moz-webgl");const nt="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",ft="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",ht=Be.createBuffer();Be.bindBuffer(Be.ARRAY_BUFFER,ht);const gt=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.7321,0]);Be.bufferData(Be.ARRAY_BUFFER,gt,Be.STATIC_DRAW),ht.itemSize=3,ht.numItems=3;const At=Be.createProgram(),xt=Be.createShader(Be.VERTEX_SHADER);Be.shaderSource(xt,nt),Be.compileShader(xt);const Et=Be.createShader(Be.FRAGMENT_SHADER);Be.shaderSource(Et,ft),Be.compileShader(Et),Be.attachShader(At,xt),Be.attachShader(At,Et),Be.linkProgram(At),Be.useProgram(At),At.vertexPosAttrib=Be.getAttribLocation(At,"attrVertex"),At.offsetUniform=Be.getUniformLocation(At,"uniformOffset"),Be.enableVertexAttribArray(At.vertexPosAttrib),Be.vertexAttribPointer(At.vertexPosAttrib,ht.itemSize,Be.FLOAT,!1,0,0),Be.uniform2f(At.offsetUniform,1,1),Be.drawArrays(Be.TRIANGLE_STRIP,0,ht.numItems);let kt="";const Ct=new Uint8Array(Ye*tt*4);return Be.readPixels(0,0,Ye,tt,Be.RGBA,Be.UNSIGNED_BYTE,Ct),kt=JSON.stringify(Ct).replace(/,?"[0-9]+":/g,""),document.body.removeChild(Le),sha256(kt)}catch{return""}}const sha256=(()=>{let Le=1,Be,Ye=[],tt=[];for(;++Le<18;)for(Be=Le*Le;Be<312;Be+=Le)Ye[Be]=1;function nt(gt,At){return Math.pow(gt,1/At)%1*4294967296|0}for(Le=1,Be=0;Le<313;)Ye[++Le]||(tt[Be]=nt(Le,2),Ye[Be++]=nt(Le,3));function ft(gt,At){return gt>>>At|gt<<32-At}function ht(gt){let At=tt.slice(Le=0),xt=unescape(encodeURI(gt)),Et=[],kt=xt.length,Ct=[],yt,vt,bt;for(;Le<kt;)Ct[Le>>2]|=(xt.charCodeAt(Le)&255)<<8*(3-Le++%4);for(kt*=8,Ct[kt>>5]|=128<<24-kt%32,Ct[bt=kt+64>>5|15]=kt,Le=0;Le<bt;Le+=16){for(yt=At.slice(Be=0,8);Be<64;yt[4]+=vt)Be<16?Et[Be]=Ct[Be+Le]:Et[Be]=(ft(vt=Et[Be-2],17)^ft(vt,19)^vt>>>10)+(Et[Be-7]|0)+(ft(vt=Et[Be-15],7)^ft(vt,18)^vt>>>3)+(Et[Be-16]|0),yt.unshift((vt=(yt.pop()+(ft(gt=yt[4],6)^ft(gt,11)^ft(gt,25))+((gt&yt[5]^~gt&yt[6])+Ye[Be])|0)+(Et[Be++]|0))+(ft(kt=yt[0],2)^ft(kt,13)^ft(kt,22))+(kt&yt[1]^yt[1]&yt[2]^yt[2]&kt));for(Be=8;Be--;)At[Be]=yt[Be]+At[Be]}for(xt="";Be<63;)xt+=(At[++Be>>3]>>4*(7-Be%8)&15).toString(16);return xt}return ht})();var store;function getGlobalConfig(Le){return{lang:store==null?void 0:store.lang,message:Le==null?void 0:Le.message,abortEarly:store==null?void 0:store.abortEarly,abortPipeEarly:store==null?void 0:store.abortPipeEarly}}var store2;function getGlobalMessage(Le){return store2==null?void 0:store2.get(Le)}var store3;function getSchemaMessage(Le){return store3==null?void 0:store3.get(Le)}var store4;function getSpecificMessage(Le,Be){var Ye;return(Ye=store4==null?void 0:store4.get(Le))==null?void 0:Ye.get(Be)}function _stringify$3(Le){var Ye,tt;const Be=typeof Le;return Be==="string"?`"${Le}"`:Be==="number"||Be==="bigint"||Be==="boolean"?`${Le}`:Be==="object"||Be==="function"?(Le&&((tt=(Ye=Object.getPrototypeOf(Le))==null?void 0:Ye.constructor)==null?void 0:tt.name))??"null":Be}function _addIssue(Le,Be,Ye,tt,nt){const ft=nt&&"input"in nt?nt.input:Ye.value,ht=(nt==null?void 0:nt.expected)??Le.expects??null,gt=(nt==null?void 0:nt.received)??_stringify$3(ft),At={kind:Le.kind,type:Le.type,input:ft,expected:ht,received:gt,message:`Invalid ${Be}: ${ht?`Expected ${ht} but r`:"R"}eceived ${gt}`,requirement:Le.requirement,path:nt==null?void 0:nt.path,issues:nt==null?void 0:nt.issues,lang:tt.lang,abortEarly:tt.abortEarly,abortPipeEarly:tt.abortPipeEarly},xt=Le.kind==="schema",Et=(nt==null?void 0:nt.message)??Le.message??getSpecificMessage(Le.reference,At.lang)??(xt?getSchemaMessage(At.lang):null)??tt.message??getGlobalMessage(At.lang);Et!==void 0&&(At.message=typeof Et=="function"?Et(At):Et),xt&&(Ye.typed=!1),Ye.issues?Ye.issues.push(At):Ye.issues=[At]}function _getStandardProps(Le){return{version:1,vendor:"valibot",validate(Be){return Le["~run"]({value:Be},getGlobalConfig())}}}function _isValidObjectKey(Le,Be){return Object.hasOwn(Le,Be)&&Be!=="__proto__"&&Be!=="prototype"&&Be!=="constructor"}function _joinExpects(Le,Be){const Ye=[...new Set(Le)];return Ye.length>1?`(${Ye.join(` ${Be} `)})`:Ye[0]??"never"}function isValiError(Le){return Le instanceof ValiError}var ValiError=class extends Error{constructor(Le){super(Le[0].message),this.name="ValiError",this.issues=Le}};function getFallback(Le,Be,Ye){return typeof Le.fallback=="function"?Le.fallback(Be,Ye):Le.fallback}function getDefault(Le,Be,Ye){return typeof Le.default=="function"?Le.default(Be,Ye):Le.default}function boolean$2(Le){return{kind:"schema",type:"boolean",reference:boolean$2,expects:"boolean",async:!1,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Be,Ye){return typeof Be.value=="boolean"?Be.typed=!0:_addIssue(this,"type",Be,Ye),Be}}}function custom(Le,Be){return{kind:"schema",type:"custom",reference:custom,expects:"unknown",async:!1,check:Le,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return this.check(Ye.value)?Ye.typed=!0:_addIssue(this,"type",Ye,tt),Ye}}}function function_(Le){return{kind:"schema",type:"function",reference:function_,expects:"Function",async:!1,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Be,Ye){return typeof Be.value=="function"?Be.typed=!0:_addIssue(this,"type",Be,Ye),Be}}}function literal(Le,Be){return{kind:"schema",type:"literal",reference:literal,expects:_stringify$3(Le),async:!1,literal:Le,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===this.literal?Ye.typed=!0:_addIssue(this,"type",Ye,tt),Ye}}}function null_(Le){return{kind:"schema",type:"null",reference:null_,expects:"null",async:!1,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Be,Ye){return Be.value===null?Be.typed=!0:_addIssue(this,"type",Be,Ye),Be}}}function number$3(Le){return{kind:"schema",type:"number",reference:number$3,expects:"number",async:!1,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Be,Ye){return typeof Be.value=="number"&&!isNaN(Be.value)?Be.typed=!0:_addIssue(this,"type",Be,Ye),Be}}}function object(Le,Be){return{kind:"schema",type:"object",reference:object,expects:"Object",async:!1,entries:Le,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){var ft;const nt=Ye.value;if(nt&&typeof nt=="object"){Ye.typed=!0,Ye.value={};for(const ht in this.entries){const gt=this.entries[ht];if(ht in nt||(gt.type==="exact_optional"||gt.type==="optional"||gt.type==="nullish")&>.default!==void 0){const At=ht in nt?nt[ht]:getDefault(gt),xt=gt["~run"]({value:At},tt);if(xt.issues){const Et={type:"object",origin:"value",input:nt,key:ht,value:At};for(const kt of xt.issues)kt.path?kt.path.unshift(Et):kt.path=[Et],(ft=Ye.issues)==null||ft.push(kt);if(Ye.issues||(Ye.issues=xt.issues),tt.abortEarly){Ye.typed=!1;break}}xt.typed||(Ye.typed=!1),Ye.value[ht]=xt.value}else if(gt.fallback!==void 0)Ye.value[ht]=getFallback(gt);else if(gt.type!=="exact_optional"&>.type!=="optional"&>.type!=="nullish"&&(_addIssue(this,"key",Ye,tt,{input:void 0,expected:`"${ht}"`,path:[{type:"object",origin:"key",input:nt,key:ht,value:nt[ht]}]}),tt.abortEarly))break}}else _addIssue(this,"type",Ye,tt);return Ye}}}function optional(Le,Be){return{kind:"schema",type:"optional",reference:optional,expects:`(${Le.expects} | undefined)`,async:!1,wrapped:Le,default:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===void 0&&(this.default!==void 0&&(Ye.value=getDefault(this,Ye,tt)),Ye.value===void 0)?(Ye.typed=!0,Ye):this.wrapped["~run"](Ye,tt)}}}function record(Le,Be,Ye){return{kind:"schema",type:"record",reference:record,expects:"Object",async:!1,key:Le,value:Be,message:Ye,get"~standard"(){return _getStandardProps(this)},"~run"(tt,nt){var ht,gt;const ft=tt.value;if(ft&&typeof ft=="object"){tt.typed=!0,tt.value={};for(const At in ft)if(_isValidObjectKey(ft,At)){const xt=ft[At],Et=this.key["~run"]({value:At},nt);if(Et.issues){const Ct={type:"object",origin:"key",input:ft,key:At,value:xt};for(const yt of Et.issues)yt.path=[Ct],(ht=tt.issues)==null||ht.push(yt);if(tt.issues||(tt.issues=Et.issues),nt.abortEarly){tt.typed=!1;break}}const kt=this.value["~run"]({value:xt},nt);if(kt.issues){const Ct={type:"object",origin:"value",input:ft,key:At,value:xt};for(const yt of kt.issues)yt.path?yt.path.unshift(Ct):yt.path=[Ct],(gt=tt.issues)==null||gt.push(yt);if(tt.issues||(tt.issues=kt.issues),nt.abortEarly){tt.typed=!1;break}}(!Et.typed||!kt.typed)&&(tt.typed=!1),Et.typed&&(tt.value[Et.value]=kt.value)}}else _addIssue(this,"type",tt,nt);return tt}}}function string$2(Le){return{kind:"schema",type:"string",reference:string$2,expects:"string",async:!1,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Be,Ye){return typeof Be.value=="string"?Be.typed=!0:_addIssue(this,"type",Be,Ye),Be}}}function _subIssues(Le){let Be;if(Le)for(const Ye of Le)Be?Be.push(...Ye.issues):Be=Ye.issues;return Be}function union(Le,Be){return{kind:"schema",type:"union",reference:union,expects:_joinExpects(Le.map(Ye=>Ye.expects),"|"),async:!1,options:Le,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){let nt,ft,ht;for(const gt of this.options){const At=gt["~run"]({value:Ye.value},tt);if(At.typed)if(At.issues)ft?ft.push(At):ft=[At];else{nt=At;break}else ht?ht.push(At):ht=[At]}if(nt)return nt;if(ft){if(ft.length===1)return ft[0];_addIssue(this,"type",Ye,tt,{issues:_subIssues(ft)}),Ye.typed=!0}else{if((ht==null?void 0:ht.length)===1)return ht[0];_addIssue(this,"type",Ye,tt,{issues:_subIssues(ht)})}return Ye}}}function parse$8(Le,Be,Ye){const tt=Le["~run"]({value:Be},getGlobalConfig(Ye));if(tt.issues)throw new ValiError(tt.issues);return tt.value}function validate$2(...Le){try{Le.forEach(({schema:Be,value:Ye})=>parse$8(Be,Ye))}catch(Be){if(isValiError(Be)){const Ye=Be.issues.map(tt=>{var ft;return`${((ft=tt.path)==null?void 0:ft.map(ht=>ht.key).join("."))||"root"}: ${tt.message}`}).join(", ");throw new Error(`Validation failed: ${Ye}`)}throw Be}}exports.api=void 0;function setApi(Le){exports.api=Le}function setToken(Le){exports.api.defaults.headers["X-Incode-Hardware-Id"]=Le}const eventsQueue=[];function addEvent(Le){const{token:Be,code:Ye,module:tt,screen:nt,clientTimestamp:ft,payload:ht={}}=Le;if(!Be){eventsQueue.push(Le);return}return exports.api.post("/omni/interview-events",[{code:Ye,module:tt,screen:nt,clientTimestamp:ft??new Date().getTime(),payload:ht}],{headers:{"X-Incode-Hardware-Id":Be}}).catch(()=>{})}function emptyQueue(Le){eventsQueue.forEach(Be=>{addEvent({...Be,token:Le})})}const state={token:null};var PipelineProfileName=(Le=>(Le[Le.IdCapture_2_01=0]="IdCapture_2_01",Le[Le.IdCapture_2_02=1]="IdCapture_2_02",Le[Le.IdCapture_3_02=2]="IdCapture_3_02",Le[Le.IdVideoSelfie_2_01=3]="IdVideoSelfie_2_01",Le[Le.SelfieWithAggregationMetrics=4]="SelfieWithAggregationMetrics",Le[Le.SelfieWithQualityMetrics=5]="SelfieWithQualityMetrics",Le[Le.SelfieVideoSelfie=6]="SelfieVideoSelfie",Le))(PipelineProfileName||{});class PipelineProfile{constructor(Be,Ye,tt,nt,ft,ht=null,gt=""){this.pipelineType=Be,this.name=Ye,this.detectionType=tt,this.modelNames=nt,this.parameters=ft,this.paramsConfigurator=ht,this.description=gt}reconfigureParams(Be,Ye){if(this.paramsConfigurator==null)throw new Error("PipelineProfile does not have a paramsConfigurator");this.paramsConfigurator(this.parameters,this.pipelineType,Be,Ye)}}var DetectionType=(Le=>(Le[Le.IDCapture=0]="IDCapture",Le[Le.Selfie=1]="Selfie",Le[Le.SelfieVideoSelfie=2]="SelfieVideoSelfie",Le[Le.IdVideoSelfie=3]="IdVideoSelfie",Le))(DetectionType||{}),WasmPipelineType=(Le=>(Le[Le.IdBlurGlarePipeline=0]="IdBlurGlarePipeline",Le[Le.IdBarcodeAndTextQualityPipeline=1]="IdBarcodeAndTextQualityPipeline",Le[Le.IdVideoSelfiePipeline=2]="IdVideoSelfiePipeline",Le[Le.SelfieWithAggregationMetrics=3]="SelfieWithAggregationMetrics",Le[Le.SelfieWithQualityMetrics=4]="SelfieWithQualityMetrics",Le[Le.IdFaceDetectionPipeline=5]="IdFaceDetectionPipeline",Le))(WasmPipelineType||{}),IdCaptureModelType=(Le=>(Le[Le.IdCaptureV1x=0]="IdCaptureV1x",Le[Le.IdCaptureV2x=1]="IdCaptureV2x",Le[Le.IdCaptureV3x=2]="IdCaptureV3x",Le))(IdCaptureModelType||{}),src$2={},src$1={},$_StatsigGlobal={},Log={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le.Log=Le.LogLevel=void 0;const Be=" DEBUG ",Ye=" INFO ",tt=" WARN ",nt=" ERROR ";function ft(gt){return gt.unshift("[Statsig]"),gt}Le.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class ht{static info(...At){ht.level>=Le.LogLevel.Info&&console.info(Ye,...ft(At))}static debug(...At){ht.level>=Le.LogLevel.Debug&&console.debug(Be,...ft(At))}static warn(...At){ht.level>=Le.LogLevel.Warn&&console.warn(tt,...ft(At))}static error(...At){ht.level>=Le.LogLevel.Error&&console.error(nt,...ft(At))}}Le.Log=ht,ht.level=Le.LogLevel.Warn})(Log),function(Le){var Be,Ye,tt;Object.defineProperty(Le,"__esModule",{value:!0}),Le._getInstance=Le._getStatsigGlobalFlag=Le._getStatsigGlobal=void 0;const nt=Log,ft=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:Ct}catch{return Ct}};Le._getStatsigGlobal=ft;const ht=yt=>(0,Le._getStatsigGlobal)()[yt];Le._getStatsigGlobalFlag=ht;const gt=yt=>{const vt=(0,Le._getStatsigGlobal)();return yt?vt.instances&&vt.instances[yt]:(vt.instances&&Object.keys(vt.instances).length>1&&nt.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),vt.firstInstance)};Le._getInstance=gt;const At="__STATSIG__",xt=typeof window<"u"?window:{},Et=typeof commonjsGlobal<"u"?commonjsGlobal:{},kt=typeof globalThis<"u"?globalThis:{},Ct=(tt=(Ye=(Be=xt[At])!==null&&Be!==void 0?Be:Et[At])!==null&&Ye!==void 0?Ye:kt[At])!==null&&tt!==void 0?tt:{instance:Le._getInstance};xt[At]=Ct,Et[At]=Ct,kt[At]=Ct}($_StatsigGlobal);var Diagnostics={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le.Diagnostics=void 0;const Be=new Map,Ye="start",tt="end",nt="statsig::diagnostics";Le.Diagnostics={_getMarkers:xt=>Be.get(xt),_markInitOverallStart:xt=>{gt(xt,ft({},Ye,"overall"))},_markInitOverallEnd:(xt,Et,kt)=>{gt(xt,ft({success:Et,error:Et?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:kt},tt,"overall"))},_markInitNetworkReqStart:(xt,Et)=>{gt(xt,ft(Et,Ye,"initialize","network_request"))},_markInitNetworkReqEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","network_request"))},_markInitProcessStart:xt=>{gt(xt,ft({},Ye,"initialize","process"))},_markInitProcessEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","process"))},_clearMarkers:xt=>{Be.delete(xt)},_formatError(xt){if(xt&&typeof xt=="object")return{code:At(xt,"code"),name:At(xt,"name"),message:At(xt,"message")}},_getDiagnosticsData(xt,Et,kt,Ct){var yt;return{success:(xt==null?void 0:xt.ok)===!0,statusCode:xt==null?void 0:xt.status,sdkRegion:(yt=xt==null?void 0:xt.headers)===null||yt===void 0?void 0:yt.get("x-statsig-region"),isDelta:kt.includes('"is_delta":true')===!0?!0:void 0,attempt:Et,error:Le.Diagnostics._formatError(Ct)}},_enqueueDiagnosticsEvent(xt,Et,kt,Ct){const yt=Le.Diagnostics._getMarkers(kt);if(yt==null||yt.length<=0)return-1;const vt=yt[yt.length-1].timestamp-yt[0].timestamp;Le.Diagnostics._clearMarkers(kt);const bt=ht(xt,{context:"initialize",markers:yt.slice(),statsigOptions:Ct});return Et.enqueue(bt),vt}};function ft(xt,Et,kt,Ct){return Object.assign({key:kt,action:Et,step:Ct,timestamp:Date.now()},xt)}function ht(xt,Et){return{eventName:nt,user:xt,value:null,metadata:Et,time:Date.now()}}function gt(xt,Et){var kt;const Ct=(kt=Be.get(xt))!==null&&kt!==void 0?kt:[];Ct.push(Et),Be.set(xt,Ct)}function At(xt,Et){if(Et in xt)return xt[Et]}})(Diagnostics);var EventLogger$1={},CacheKey={},Hashing={},TypingUtils={};Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0;function _typeOf(Le){return Array.isArray(Le)?"array":typeof Le}TypingUtils._typeOf=_typeOf;function _isTypeMatch(Le,Be){const Ye=tt=>Array.isArray(tt)?"array":tt===null?"null":typeof tt;return Ye(Le)===Ye(Be)}TypingUtils._isTypeMatch=_isTypeMatch,function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le._getSortedObject=Le._DJB2Object=Le._DJB2=void 0;const Be=TypingUtils,Ye=ft=>{let ht=0;for(let gt=0;gt<ft.length;gt++){const At=ft.charCodeAt(gt);ht=(ht<<5)-ht+At,ht=ht&ht}return String(ht>>>0)};Le._DJB2=Ye;const tt=(ft,ht)=>(0,Le._DJB2)(JSON.stringify((0,Le._getSortedObject)(ft,ht)));Le._DJB2Object=tt;const nt=(ft,ht)=>{if(ft==null)return null;const gt=Object.keys(ft).sort(),At={};return gt.forEach(xt=>{const Et=ft[xt];if(ht===0||(0,Be._typeOf)(Et)!=="object"){At[xt]=Et;return}At[xt]=(0,Le._getSortedObject)(Et,ht!=null?ht-1:ht)}),At};Le._getSortedObject=nt}(Hashing),Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const Hashing_1$4=Hashing;function _getUserStorageKey(Le,Be,Ye){var tt;if(Ye)return Ye(Le,Be);const nt=Be&&Be.customIDs?Be.customIDs:{},ft=[`uid:${(tt=Be==null?void 0:Be.userID)!==null&&tt!==void 0?tt:""}`,`cids:${Object.keys(nt).sort((ht,gt)=>ht.localeCompare(gt)).map(ht=>`${ht}-${nt[ht]}`).join(",")}`,`k:${Le}`];return(0,Hashing_1$4._DJB2)(ft.join("|"))}CacheKey._getUserStorageKey=_getUserStorageKey;function _getStorageKey(Le,Be,Ye){return Be?_getUserStorageKey(Le,Be,Ye):(0,Hashing_1$4._DJB2)(`k:${Le}`)}CacheKey._getStorageKey=_getStorageKey;var NetworkConfig={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le.NetworkParam=Le.NetworkDefault=Le.Endpoint=void 0,Le.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},Le.NetworkDefault={[Le.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[Le.Endpoint._initialize]:"https://featureassets.org/v1",[Le.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},Le.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(NetworkConfig);var SafeJs={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le._getUnloadEvent=Le._getCurrentPageUrlSafe=Le._addDocumentEventListenerSafe=Le._addWindowEventListenerSafe=Le._isServerEnv=Le._getDocumentSafe=Le._getWindowSafe=void 0;const Be=()=>typeof window<"u"?window:null;Le._getWindowSafe=Be;const Ye=()=>{var At;const xt=(0,Le._getWindowSafe)();return(At=xt==null?void 0:xt.document)!==null&&At!==void 0?At:null};Le._getDocumentSafe=Ye;const tt=()=>{if((0,Le._getDocumentSafe)()!==null)return!1;const At=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||At};Le._isServerEnv=tt;const nt=(At,xt)=>{const Et=(0,Le._getWindowSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Le._addWindowEventListenerSafe=nt;const ft=(At,xt)=>{const Et=(0,Le._getDocumentSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Le._addDocumentEventListenerSafe=ft;const ht=()=>{var At;try{return(At=(0,Le._getWindowSafe)())===null||At===void 0?void 0:At.location.href.split(/[?#]/)[0]}catch{return}};Le._getCurrentPageUrlSafe=ht;const gt=()=>{const At=(0,Le._getWindowSafe)();return At&&"onpagehide"in At?"pagehide":"beforeunload"};Le._getUnloadEvent=gt})(SafeJs);var StatsigEvent={};Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const CONFIG_EXPOSURE_NAME="statsig::config_exposure",GATE_EXPOSURE_NAME="statsig::gate_exposure",LAYER_EXPOSURE_NAME="statsig::layer_exposure",_createExposure=(Le,Be,Ye,tt,nt)=>(Ye.bootstrapMetadata&&(tt.bootstrapMetadata=Ye.bootstrapMetadata),{eventName:Le,user:Be,value:null,metadata:_addEvaluationDetailsToMetadata(Ye,tt),secondaryExposures:nt,time:Date.now()}),_isExposureEvent=({eventName:Le})=>Le===GATE_EXPOSURE_NAME||Le===CONFIG_EXPOSURE_NAME||Le===LAYER_EXPOSURE_NAME;StatsigEvent._isExposureEvent=_isExposureEvent;const _createGateExposure=(Le,Be,Ye)=>{var tt,nt,ft;const ht={gate:Be.name,gateValue:String(Be.value),ruleID:Be.ruleID};return((tt=Be.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(ht.configVersion=Be.__evaluation.version),_createExposure(GATE_EXPOSURE_NAME,Le,Be.details,ht,_mapExposures((ft=(nt=Be.__evaluation)===null||nt===void 0?void 0:nt.secondary_exposures)!==null&&ft!==void 0?ft:[],Ye))};StatsigEvent._createGateExposure=_createGateExposure;function _mapExposures(Le,Be){return Le.map(Ye=>typeof Ye=="string"?(Be??{})[Ye]:Ye).filter(Ye=>Ye!=null)}StatsigEvent._mapExposures=_mapExposures;const _createConfigExposure=(Le,Be,Ye)=>{var tt,nt,ft,ht;const gt={config:Be.name,ruleID:Be.ruleID};return((tt=Be.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(gt.configVersion=Be.__evaluation.version),((nt=Be.__evaluation)===null||nt===void 0?void 0:nt.passed)!=null&&(gt.rulePassed=String(Be.__evaluation.passed)),_createExposure(CONFIG_EXPOSURE_NAME,Le,Be.details,gt,_mapExposures((ht=(ft=Be.__evaluation)===null||ft===void 0?void 0:ft.secondary_exposures)!==null&&ht!==void 0?ht:[],Ye))};StatsigEvent._createConfigExposure=_createConfigExposure;const _createLayerParameterExposure=(Le,Be,Ye,tt)=>{var nt,ft,ht,gt,At,xt,Et;const kt=Be.__evaluation,Ct=((nt=kt==null?void 0:kt.explicit_parameters)===null||nt===void 0?void 0:nt.includes(Ye))===!0;let yt="",vt=(ft=kt==null?void 0:kt.undelegated_secondary_exposures)!==null&&ft!==void 0?ft:[];Ct&&(yt=(ht=kt.allocated_experiment_name)!==null&&ht!==void 0?ht:"",vt=(gt=kt.secondary_exposures)!==null&>!==void 0?gt:[]);const bt=(At=Be.__evaluation)===null||At===void 0?void 0:At.parameter_rule_ids,It={config:Be.name,parameterName:Ye,ruleID:(xt=bt==null?void 0:bt[Ye])!==null&&xt!==void 0?xt:Be.ruleID,allocatedExperiment:yt,isExplicitParameter:String(Ct)};return((Et=Be.__evaluation)===null||Et===void 0?void 0:Et.version)!=null&&(It.configVersion=Be.__evaluation.version),_createExposure(LAYER_EXPOSURE_NAME,Le,Be.details,It,_mapExposures(vt,tt))};StatsigEvent._createLayerParameterExposure=_createLayerParameterExposure;const _addEvaluationDetailsToMetadata=(Le,Be)=>(Be.reason=Le.reason,Le.lcut&&(Be.lcut=String(Le.lcut)),Le.receivedAt&&(Be.receivedAt=String(Le.receivedAt)),Be);var StatsigOptionsCommon={};Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"};var StorageProvider={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le._setObjectInStorage=Le._getObjectFromStorage=Le.Storage=void 0;const Be=Log,Ye=SafeJs,tt={},nt={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:kt=>tt[kt]?tt[kt]:null,setItem:(kt,Ct)=>{tt[kt]=Ct},removeItem:kt=>{delete tt[kt]},getAllKeys:()=>Object.keys(tt)};let ft=null;try{const kt=(0,Ye._getWindowSafe)();kt&&kt.localStorage&&typeof kt.localStorage.getItem=="function"&&(ft={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:Ct=>kt.localStorage.getItem(Ct),setItem:(Ct,yt)=>kt.localStorage.setItem(Ct,yt),removeItem:Ct=>kt.localStorage.removeItem(Ct),getAllKeys:()=>Object.keys(kt.localStorage)})}catch{Be.Log.warn("Failed to setup localStorageProvider.")}let ht=ft??nt,gt=ht;function At(kt){try{return kt()}catch(Ct){if(Ct instanceof Error&&Ct.name==="SecurityError")return Le.Storage._setProvider(nt),null;throw Ct}}Le.Storage={isReady:()=>gt.isReady(),isReadyResolver:()=>gt.isReadyResolver(),getProviderName:()=>gt.getProviderName(),getItem:kt=>At(()=>gt.getItem(kt)),setItem:(kt,Ct)=>At(()=>gt.setItem(kt,Ct)),removeItem:kt=>gt.removeItem(kt),getAllKeys:()=>gt.getAllKeys(),_setProvider:kt=>{ht=kt,gt=kt},_setDisabled:kt=>{kt?gt=nt:gt=ht}};function xt(kt){const Ct=Le.Storage.getItem(kt);return JSON.parse(Ct??"null")}Le._getObjectFromStorage=xt;function Et(kt,Ct){Le.Storage.setItem(kt,JSON.stringify(Ct))}Le._setObjectInStorage=Et})(StorageProvider);var UrlConfiguration$1={};Object.defineProperty(UrlConfiguration$1,"__esModule",{value:!0}),UrlConfiguration$1.UrlConfiguration=void 0;const Hashing_1$3=Hashing,NetworkConfig_1$2=NetworkConfig,ENDPOINT_DNS_KEY_MAP={[NetworkConfig_1$2.Endpoint._initialize]:"i",[NetworkConfig_1$2.Endpoint._rgstr]:"e",[NetworkConfig_1$2.Endpoint._download_config_specs]:"d"};class UrlConfiguration{constructor(Be,Ye,tt,nt){this.customUrl=null,this.fallbackUrls=null,this.endpoint=Be,this.endpointDnsKey=ENDPOINT_DNS_KEY_MAP[Be],Ye&&(this.customUrl=Ye),!Ye&&tt&&(this.customUrl=tt.endsWith("/")?`${tt}${Be}`:`${tt}/${Be}`),nt&&(this.fallbackUrls=nt);const ft=NetworkConfig_1$2.NetworkDefault[Be];this.defaultUrl=`${ft}/${Be}`}getUrl(){var Be;return(Be=this.customUrl)!==null&&Be!==void 0?Be:this.defaultUrl}getChecksum(){var Be;const Ye=((Be=this.fallbackUrls)!==null&&Be!==void 0?Be:[]).sort().join(",");return(0,Hashing_1$3._DJB2)(this.customUrl+Ye)}}UrlConfiguration$1.UrlConfiguration=UrlConfiguration;var VisibilityObserving={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le._notifyVisibilityChanged=Le._subscribeToVisiblityChanged=Le._isUnloading=Le._isCurrentlyVisible=void 0;const Be=SafeJs,Ye="foreground",tt="background",nt=[];let ft=Ye,ht=!1;const gt=()=>ft===Ye;Le._isCurrentlyVisible=gt;const At=()=>ht;Le._isUnloading=At;const xt=kt=>{nt.unshift(kt)};Le._subscribeToVisiblityChanged=xt;const Et=kt=>{kt!==ft&&(ft=kt,nt.forEach(Ct=>Ct(kt)))};Le._notifyVisibilityChanged=Et,(0,Be._addWindowEventListenerSafe)("focus",()=>{ht=!1,(0,Le._notifyVisibilityChanged)(Ye)}),(0,Be._addWindowEventListenerSafe)("blur",()=>(0,Le._notifyVisibilityChanged)(tt)),(0,Be._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,Le._notifyVisibilityChanged)(document.visibilityState==="visible"?Ye:tt)}),(0,Be._addWindowEventListenerSafe)((0,Be._getUnloadEvent)(),()=>{ht=!0,(0,Le._notifyVisibilityChanged)(tt)})})(VisibilityObserving);var __awaiter$f=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(EventLogger$1,"__esModule",{value:!0}),EventLogger$1.EventLogger=void 0;const CacheKey_1$1=CacheKey,Hashing_1$2=Hashing,Log_1$8=Log,NetworkConfig_1$1=NetworkConfig,SafeJs_1$3=SafeJs,StatsigEvent_1=StatsigEvent,StatsigOptionsCommon_1$2=StatsigOptionsCommon,StorageProvider_1$4=StorageProvider,UrlConfiguration_1=UrlConfiguration$1,VisibilityObserving_1$1=VisibilityObserving,DEFAULT_QUEUE_SIZE=100,DEFAULT_FLUSH_INTERVAL_MS=1e4,MAX_DEDUPER_KEYS=1e3,DEDUPER_WINDOW_DURATION_MS=6e5,MAX_FAILED_LOGS=500,QUICK_FLUSH_WINDOW_MS=200,EVENT_LOGGER_MAP={},RetryFailedLogsTrigger={Startup:"startup",GainedFocus:"gained_focus"};class EventLogger{static _safeFlushAndForget(Be){var Ye;(Ye=EVENT_LOGGER_MAP[Be])===null||Ye===void 0||Ye.flush().catch(()=>{})}static _safeRetryFailedLogs(Be){var Ye;(Ye=EVENT_LOGGER_MAP[Be])===null||Ye===void 0||Ye._retryFailedLogs(RetryFailedLogsTrigger.GainedFocus)}constructor(Be,Ye,tt,nt){var ft,ht;this._sdkKey=Be,this._emitter=Ye,this._network=tt,this._options=nt,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(ft=nt==null?void 0:nt.loggingEnabled)!==null&&ft!==void 0?ft:(nt==null?void 0:nt.disableLogging)===!0?StatsigOptionsCommon_1$2.LoggingEnabledOption.disabled:StatsigOptionsCommon_1$2.LoggingEnabledOption.browserOnly,nt!=null&&nt.loggingEnabled&&nt.disableLogging!==void 0&&Log_1$8.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(ht=nt==null?void 0:nt.loggingBufferMaxSize)!==null&&ht!==void 0?ht:DEFAULT_QUEUE_SIZE;const gt=nt==null?void 0:nt.networkConfig;this._logEventUrlConfig=new UrlConfiguration_1.UrlConfiguration(NetworkConfig_1$1.Endpoint._rgstr,gt==null?void 0:gt.logEventUrl,gt==null?void 0:gt.api,gt==null?void 0:gt.logEventFallbackUrls)}setLogEventCompressionMode(Be){this._network.setLogEventCompressionMode(Be)}setLoggingEnabled(Be){if(this._loggingEnabled==="disabled"&&Be!=="disabled"){const Ye=this._getStorageKey(),tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);tt&&this._queue.push(...tt),StorageProvider_1$4.Storage.removeItem(Ye)}this._loggingEnabled=Be}enqueue(Be){this._shouldLogEvent(Be)&&(this._normalizeAndAppendEvent(Be),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&EventLogger._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(Be){var Ye;const tt=(Ye=this._nonExposedChecks[Be])!==null&&Ye!==void 0?Ye:0;this._nonExposedChecks[Be]=tt+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var Be;const Ye=(0,SafeJs_1$3._isServerEnv)();Ye&&((Be=this._options)===null||Be===void 0?void 0:Be.loggingEnabled)!=="always"||(EVENT_LOGGER_MAP[this._sdkKey]=this,Ye||(0,VisibilityObserving_1$1._subscribeToVisiblityChanged)(tt=>{tt==="background"?EventLogger._safeFlushAndForget(this._sdkKey):tt==="foreground"&&EventLogger._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(RetryFailedLogsTrigger.Startup),this._startBackgroundFlushInterval())}stop(){return __awaiter$f(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete EVENT_LOGGER_MAP[this._sdkKey],yield this.flush()})}flush(){return __awaiter$f(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const Be=this._queue;this._queue=[],yield this._sendEvents(Be)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>QUICK_FLUSH_WINDOW_MS)&&setTimeout(()=>EventLogger._safeFlushAndForget(this._sdkKey),QUICK_FLUSH_WINDOW_MS))}_shouldLogEvent(Be){var Ye;if(((Ye=this._options)===null||Ye===void 0?void 0:Ye.loggingEnabled)!=="always"&&(0,SafeJs_1$3._isServerEnv)())return!1;if(!(0,StatsigEvent_1._isExposureEvent)(Be))return!0;const tt=Be.user?Be.user:{statsigEnvironment:void 0},nt=(0,CacheKey_1$1._getUserStorageKey)(this._sdkKey,tt),ft=Be.metadata?Be.metadata:{},ht=[Be.eventName,nt,ft.gate,ft.config,ft.ruleID,ft.allocatedExperiment,ft.parameterName,String(ft.isExplicitParameter),ft.reason].join("|"),gt=this._lastExposureTimeMap[ht],At=Date.now();return gt&&At-gt<DEDUPER_WINDOW_DURATION_MS?!1:(Object.keys(this._lastExposureTimeMap).length>MAX_DEDUPER_KEYS&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[ht]=At,!0)}_sendEvents(Be){return __awaiter$f(this,void 0,void 0,function*(){var Ye,tt;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(Be),!1;try{const ft=(0,VisibilityObserving_1$1._isUnloading)()&&this._network.isBeaconSupported()&&((tt=(Ye=this._options)===null||Ye===void 0?void 0:Ye.networkConfig)===null||tt===void 0?void 0:tt.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:Be}),(ft?this._sendEventsViaBeacon(Be):yield this._sendEventsViaPost(Be)).success?(this._emitter({name:"logs_flushed",events:Be}),!0):(Log_1$8.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(Be),!1)}catch{return Log_1$8.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(Be){return __awaiter$f(this,void 0,void 0,function*(){var Ye;const tt=yield this._network.post(this._getRequestData(Be)),nt=(Ye=tt==null?void 0:tt.code)!==null&&Ye!==void 0?Ye:-1;return{success:nt>=200&&nt<300}})}_sendEventsViaBeacon(Be){return{success:this._network.beacon(this._getRequestData(Be))}}_getRequestData(Be){return{sdkKey:this._sdkKey,data:{events:Be},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[NetworkConfig_1$1.NetworkParam.EventCount]:String(Be.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(Be){for(;Be.length>MAX_FAILED_LOGS;)Be.shift();const Ye=this._getStorageKey();try{const tt=this._getFailedLogsFromStorage(Ye);(0,StorageProvider_1$4._setObjectInStorage)(Ye,[...tt,...Be])}catch{Log_1$8.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(Be){let Ye=[];try{const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Be);return Array.isArray(tt)&&(Ye=tt),Ye}catch{return[]}}_retryFailedLogs(Be){const Ye=this._getStorageKey();__awaiter$f(this,void 0,void 0,function*(){StorageProvider_1$4.Storage.isReady()||(yield StorageProvider_1$4.Storage.isReadyResolver());const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);if(!tt)return;Be===RetryFailedLogsTrigger.Startup&&StorageProvider_1$4.Storage.removeItem(Ye),(yield this._sendEvents(tt))&&Be===RetryFailedLogsTrigger.GainedFocus&&StorageProvider_1$4.Storage.removeItem(Ye)}).catch(()=>{Log_1$8.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,Hashing_1$2._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(Be){Be.user&&(Be.user=Object.assign({},Be.user),delete Be.user.privateAttributes);const Ye={},tt=this._getCurrentPageUrl();tt&&(Ye.statsigMetadata={currentPage:tt});const nt=Object.assign(Object.assign({},Be),Ye);Log_1$8.Log.debug("Enqueued Event:",nt),this._queue.push(nt)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var Be;if(((Be=this._options)===null||Be===void 0?void 0:Be.includeCurrentPageUrlWithEvents)!==!1)return(0,SafeJs_1$3._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var Be,Ye;const tt=(Ye=(Be=this._options)===null||Be===void 0?void 0:Be.loggingIntervalMs)!==null&&Ye!==void 0?Ye:DEFAULT_FLUSH_INTERVAL_MS,nt=setInterval(()=>{const ft=EVENT_LOGGER_MAP[this._sdkKey];!ft||ft._flushIntervalId!==nt?clearInterval(nt):EventLogger._safeFlushAndForget(this._sdkKey)},tt);this._flushIntervalId=nt}}EventLogger$1.EventLogger=EventLogger;var StatsigMetadata={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le.StatsigMetadataProvider=Le.SDK_VERSION=void 0,Le.SDK_VERSION="3.28.1";let Be={sdkVersion:Le.SDK_VERSION,sdkType:"js-mono"};Le.StatsigMetadataProvider={get:()=>Be,add:Ye=>{Be=Object.assign(Object.assign({},Be),Ye)}}})(StatsigMetadata);var ClientInterfaces={};Object.defineProperty(ClientInterfaces,"__esModule",{value:!0});var DataAdapterCore$1={},StableID={},UUID={};Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0;function getUUID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let Le=new Date().getTime(),Be=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,tt=>{let nt=Math.random()*16;return Le>0?(nt=(Le+nt)%16|0,Le=Math.floor(Le/16)):(nt=(Be+nt)%16|0,Be=Math.floor(Be/16)),(tt==="x"?nt:nt&7|8).toString(16)})}UUID.getUUID=getUUID,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const CacheKey_1=CacheKey,Log_1$7=Log,SafeJs_1$2=SafeJs,StorageProvider_1$3=StorageProvider,UUID_1=UUID,PROMISE_MAP={},COOKIE_ENABLED_MAP={},DISABLED_MAP={};StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:Le=>{if(DISABLED_MAP[Le])return null;if(PROMISE_MAP[Le]!=null)return PROMISE_MAP[Le];let Be=null;return Be=_loadFromCookie(Le),Be!=null?(PROMISE_MAP[Le]=Be,_persistToStorage(Be,Le),Be):(Be=_loadFromStorage(Le),Be==null&&(Be=(0,UUID_1.getUUID)()),_persistToStorage(Be,Le),_persistToCookie(Be,Le),PROMISE_MAP[Le]=Be,Be)},setOverride:(Le,Be)=>{PROMISE_MAP[Be]=Le,_persistToStorage(Le,Be),_persistToCookie(Le,Be)},_setCookiesEnabled:(Le,Be)=>{COOKIE_ENABLED_MAP[Le]=Be},_setDisabled:(Le,Be)=>{DISABLED_MAP[Le]=Be}};function _getStableIDStorageKey(Le){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Le)}`}function _persistToStorage(Le,Be){const Ye=_getStableIDStorageKey(Be);try{(0,StorageProvider_1$3._setObjectInStorage)(Ye,Le)}catch{Log_1$7.Log.warn("Failed to save StableID to storage")}}function _loadFromStorage(Le){const Be=_getStableIDStorageKey(Le);return(0,StorageProvider_1$3._getObjectFromStorage)(Be)}function _loadFromCookie(Le){if(!COOKIE_ENABLED_MAP[Le]||(0,SafeJs_1$2._getDocumentSafe)()==null)return null;const Be=document.cookie.split(";");for(const Ye of Be){const[tt,nt]=Ye.trim().split("=");if(tt===getCookieName(Le))return decodeURIComponent(nt)}return null}function _persistToCookie(Le,Be){if(!COOKIE_ENABLED_MAP[Be]||(0,SafeJs_1$2._getDocumentSafe)()==null)return;const Ye=new Date;Ye.setFullYear(Ye.getFullYear()+1),document.cookie=`${getCookieName(Be)}=${encodeURIComponent(Le)}; expires=${Ye.toUTCString()}; path=/`}function getCookieName(Le){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Le)}`}StableID.getCookieName=getCookieName;var StatsigUser={};Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const Hashing_1$1=Hashing,Log_1$6=Log;function _normalizeUser(Le,Be,Ye){try{const tt=JSON.parse(JSON.stringify(Le));return Be!=null&&Be.environment!=null?tt.statsigEnvironment=Be.environment:Ye!=null&&(tt.statsigEnvironment={tier:Ye}),tt}catch{return Log_1$6.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}StatsigUser._normalizeUser=_normalizeUser;function _getFullUserHash(Le){return Le?(0,Hashing_1$1._DJB2Object)(Le):null}StatsigUser._getFullUserHash=_getFullUserHash;var TypedJsonParse={};Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const Log_1$5=Log;function _typedJsonParse(Le,Be,Ye){try{const tt=JSON.parse(Le);if(tt&&typeof tt=="object"&&Be in tt)return tt}catch{}return Log_1$5.Log.error(`Failed to parse ${Ye}`),null}TypedJsonParse._typedJsonParse=_typedJsonParse;var __awaiter$e=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(DataAdapterCore$1,"__esModule",{value:!0}),DataAdapterCore$1._makeDataAdapterResult=DataAdapterCore$1.DataAdapterCore=void 0;const Log_1$4=Log,StableID_1$2=StableID,StatsigUser_1=StatsigUser,StorageProvider_1$2=StorageProvider,TypedJsonParse_1=TypedJsonParse,CACHE_LIMIT=10,MAX_CACHE_WRITE_ATTEMPTS=8;class DataAdapterCore{constructor(Be,Ye){this._adapterName=Be,this._cacheSuffix=Ye,this._options=null,this._sdkKey=null,this._cacheLimit=CACHE_LIMIT,this._lastModifiedStoreKey=`statsig.last_modified_time.${Ye}`,this._inMemoryCache=new InMemoryCache}attach(Be,Ye,tt){this._sdkKey=Be,this._options=Ye}getDataSync(Be){const Ye=Be&&(0,StatsigUser_1._normalizeUser)(Be,this._options),tt=this._getCacheKey(Ye),nt=this._inMemoryCache.get(tt,Ye);if(nt&&this._getIsCacheValueValid(nt))return nt;const ft=this._loadFromCache(tt);return ft&&this._getIsCacheValueValid(ft)?(this._inMemoryCache.add(tt,ft,this._cacheLimit),this._inMemoryCache.get(tt,Ye)):null}setData(Be,Ye){const tt=Ye&&(0,StatsigUser_1._normalizeUser)(Ye,this._options),nt=this._getCacheKey(tt);this._inMemoryCache.add(nt,_makeDataAdapterResult("Bootstrap",Be,null,tt),this._cacheLimit)}_getIsCacheValueValid(Be){return Be.stableID==null||Be.stableID===StableID_1$2.StableID.get(this._getSdkKey())}_getDataAsyncImpl(Be,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){StorageProvider_1$2.Storage.isReady()||(yield StorageProvider_1$2.Storage.isReadyResolver());const nt=Be??this.getDataSync(Ye),ft=[this._fetchAndPrepFromNetwork(nt,Ye,tt)];return tt!=null&&tt.timeoutMs&&ft.push(new Promise(ht=>setTimeout(ht,tt.timeoutMs)).then(()=>(Log_1$4.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(ft)})}_prefetchDataImpl(Be,Ye){return __awaiter$e(this,void 0,void 0,function*(){const tt=Be&&(0,StatsigUser_1._normalizeUser)(Be,this._options),nt=this._getCacheKey(tt),ft=yield this._getDataAsyncImpl(null,tt,Ye);ft&&this._inMemoryCache.add(nt,Object.assign(Object.assign({},ft),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(Be,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){var nt;const ft=(nt=Be==null?void 0:Be.data)!==null&&nt!==void 0?nt:null,ht=Be!=null&&this._isCachedResultValidFor204(Be,Ye),gt=yield this._fetchFromNetwork(ft,Ye,tt,ht);if(!gt)return Log_1$4.Log.debug("No response returned for latest value"),null;const At=(0,TypedJsonParse_1._typedJsonParse)(gt,"has_updates","Response"),xt=this._getSdkKey(),Et=StableID_1$2.StableID.get(xt);let kt=null;if((At==null?void 0:At.has_updates)===!0)kt=_makeDataAdapterResult("Network",gt,Et,Ye);else if(ft&&(At==null?void 0:At.has_updates)===!1)kt=_makeDataAdapterResult("NetworkNotModified",ft,Et,Ye);else return null;const Ct=this._getCacheKey(Ye);return this._inMemoryCache.add(Ct,kt,this._cacheLimit),this._writeToCache(Ct,kt),kt})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(Log_1$4.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(Be){var Ye;const tt=(Ye=StorageProvider_1$2.Storage.getItem)===null||Ye===void 0?void 0:Ye.call(StorageProvider_1$2.Storage,Be);if(tt==null)return null;const nt=(0,TypedJsonParse_1._typedJsonParse)(tt,"source","Cached Result");return nt?Object.assign(Object.assign({},nt),{source:"Cache"}):null}_writeToCache(Be,Ye){const tt=JSON.stringify(Ye);for(let nt=0;nt<MAX_CACHE_WRITE_ATTEMPTS;nt++)try{StorageProvider_1$2.Storage.setItem(Be,tt);break}catch(ft){if(!(ft instanceof Error)||!(ft.toString().includes("QuotaExceededError")||ft.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw ft;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(Be,this._cacheLimit-1)}this._runLocalStorageCacheEviction(Be)}_runLocalStorageCacheEviction(Be,Ye=this._cacheLimit){var tt;const nt=(tt=(0,StorageProvider_1$2._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&tt!==void 0?tt:{};nt[Be]=Date.now();const ft=_getEvictableKeys(nt,Ye);for(const ht of ft)delete nt[ht],StorageProvider_1$2.Storage.removeItem(ht);(0,StorageProvider_1$2._setObjectInStorage)(this._lastModifiedStoreKey,nt)}}DataAdapterCore$1.DataAdapterCore=DataAdapterCore;function _makeDataAdapterResult(Le,Be,Ye,tt){return{source:Le,data:Be,receivedAt:Date.now(),stableID:Ye,fullUserHash:(0,StatsigUser_1._getFullUserHash)(tt)}}DataAdapterCore$1._makeDataAdapterResult=_makeDataAdapterResult;class InMemoryCache{constructor(){this._data={}}get(Be,Ye){var tt;const nt=this._data[Be],ft=nt==null?void 0:nt.stableID,ht=(tt=Ye==null?void 0:Ye.customIDs)===null||tt===void 0?void 0:tt.stableID;return ht&&ft&&ht!==ft?(Log_1$4.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):nt}add(Be,Ye,tt){const nt=_getEvictableKeys(this._data,tt-1);for(const ft of nt)delete this._data[ft];this._data[Be]=Ye}merge(Be){this._data=Object.assign(Object.assign({},this._data),Be)}}function _getEvictableKeys(Le,Be){const Ye=Object.keys(Le);return Ye.length<=Be?[]:Be===0?Ye:Ye.sort((tt,nt)=>{const ft=Le[tt],ht=Le[nt];return typeof ft=="object"&&typeof ht=="object"?ft.receivedAt-ht.receivedAt:ft-ht}).slice(0,Ye.length-Be)}var DownloadConfigSpecsResponse={};Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0});var ErrorBoundary={},SDKType={};Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const SDK_CLIENT={};let suffix;SDKType.SDKType={_get:Le=>{var Be;return((Be=SDK_CLIENT[Le])!==null&&Be!==void 0?Be:"js-mono")+(suffix??"")},_setClientType(Le,Be){SDK_CLIENT[Le]=Be},_setBindingType(Le){(!suffix||suffix==="-react")&&(suffix="-"+Le)}},function(Le){var Be=commonjsGlobal&&commonjsGlobal.__awaiter||function(kt,Ct,yt,vt){function bt(It){return It instanceof yt?It:new yt(function(wt){wt(It)})}return new(yt||(yt=Promise))(function(It,wt){function Rt(Dt){try{Bt(vt.next(Dt))}catch(Pt){wt(Pt)}}function Tt(Dt){try{Bt(vt.throw(Dt))}catch(Pt){wt(Pt)}}function Bt(Dt){Dt.done?It(Dt.value):bt(Dt.value).then(Rt,Tt)}Bt((vt=vt.apply(kt,Ct||[])).next())})};Object.defineProperty(Le,"__esModule",{value:!0}),Le.ErrorBoundary=Le.EXCEPTION_ENDPOINT=void 0;const Ye=Log,tt=SDKType,nt=StatsigMetadata;Le.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const ft="[Statsig] UnknownError";class ht{constructor(Ct,yt,vt,bt){this._sdkKey=Ct,this._options=yt,this._emitter=vt,this._lastSeenError=bt,this._seen=new Set}wrap(Ct,yt){try{const vt=Ct;xt(vt).forEach(bt=>{const It=vt[bt];"$EB"in It||(vt[bt]=(...wt)=>this._capture(yt?`${yt}:${bt}`:bt,()=>It.apply(Ct,wt)),vt[bt].$EB=!0)})}catch(vt){this._onError("eb:wrap",vt)}}logError(Ct,yt){this._onError(Ct,yt)}getLastSeenErrorAndReset(){const Ct=this._lastSeenError;return this._lastSeenError=void 0,Ct??null}attachErrorIfNoneExists(Ct){this._lastSeenError||(this._lastSeenError=gt(Ct))}_capture(Ct,yt){try{const vt=yt();return vt&&vt instanceof Promise?vt.catch(bt=>this._onError(Ct,bt)):vt}catch(vt){return this._onError(Ct,vt),null}}_onError(Ct,yt){try{Ye.Log.warn(`Caught error in ${Ct}`,{error:yt}),Be(this,void 0,void 0,function*(){var bt,It,wt,Rt,Tt,Bt,Dt;const Pt=yt||Error(ft),Nt=Pt instanceof Error,Lt=Nt?Pt.name:"No Name",Wt=gt(Pt);if(this._lastSeenError=Wt,this._seen.has(Lt))return;if(this._seen.add(Lt),!((It=(bt=this._options)===null||bt===void 0?void 0:bt.networkConfig)===null||It===void 0)&&It.preventAllNetworkTraffic){(wt=this._emitter)===null||wt===void 0||wt.call(this,{name:"error",error:yt,tag:Ct});return}const Kt=tt.SDKType._get(this._sdkKey),$t=nt.StatsigMetadataProvider.get(),Ut=Nt?Pt.stack:At(Pt),Vt=Object.assign({tag:Ct,exception:Lt,info:Ut,statsigOptions:Et(this._options)},Object.assign(Object.assign({},$t),{sdkType:Kt}));yield((Bt=(Tt=(Rt=this._options)===null||Rt===void 0?void 0:Rt.networkConfig)===null||Tt===void 0?void 0:Tt.networkOverrideFunc)!==null&&Bt!==void 0?Bt:fetch)(Le.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(Kt),"STATSIG-SDK-VERSION":String($t.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(Vt)}),(Dt=this._emitter)===null||Dt===void 0||Dt.call(this,{name:"error",error:yt,tag:Ct})}).then(()=>{}).catch(()=>{})}catch{}}}Le.ErrorBoundary=ht;function gt(kt){return kt instanceof Error?kt:typeof kt=="string"?new Error(kt):new Error("An unknown error occurred.")}function At(kt){try{return JSON.stringify(kt)}catch{return ft}}function xt(kt){const Ct=new Set;let yt=Object.getPrototypeOf(kt);for(;yt&&yt!==Object.prototype;)Object.getOwnPropertyNames(yt).filter(vt=>typeof(yt==null?void 0:yt[vt])=="function").forEach(vt=>Ct.add(vt)),yt=Object.getPrototypeOf(yt);return Array.from(Ct)}function Et(kt){if(!kt)return{};const Ct={};return Object.keys(kt).forEach(yt=>{const vt=yt,bt=kt[vt];switch(typeof bt){case"number":case"bigint":case"boolean":Ct[String(vt)]=bt;break;case"string":bt.length<50?Ct[String(vt)]=bt:Ct[String(vt)]="set";break;case"object":vt==="environment"?Ct.environment=bt:vt==="networkConfig"?Ct.networkConfig=bt:Ct[String(vt)]=bt!=null?"set":"unset";break}}),Ct}}(ErrorBoundary);var EvaluationOptions={};Object.defineProperty(EvaluationOptions,"__esModule",{value:!0});var EvaluationTypes={};Object.defineProperty(EvaluationTypes,"__esModule",{value:!0});var InitializeResponse={};Object.defineProperty(InitializeResponse,"__esModule",{value:!0});var MemoKey={};Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const EXIST_KEYS=new Set([]),DO_NOT_MEMO_KEYS=new Set(["userPersistedValues"]);function createMemoKey(Le,Be,Ye){let tt=`${Le}|${Be}`;if(!Ye)return tt;for(const nt of Object.keys(Ye)){if(DO_NOT_MEMO_KEYS.has(nt))return;EXIST_KEYS.has(nt)?tt+=`|${nt}=true`:tt+=`|${nt}=${Ye[nt]}`}return tt}MemoKey.createMemoKey=createMemoKey;var NetworkCore$1={},NetworkFallbackResolver$1={},DnsTxtQuery={},__awaiter$d=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const FEATURE_ASSETS_DNS_QUERY=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),DNS_QUERY_ENDPOINT="https://cloudflare-dns.com/dns-query",DOMAIN_CHARS=["i","e","d"],MAX_START_LOOKUP=200;function _fetchTxtRecords(Le){return __awaiter$d(this,void 0,void 0,function*(){const Be=yield Le(DNS_QUERY_ENDPOINT,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:FEATURE_ASSETS_DNS_QUERY});if(!Be.ok){const nt=new Error("Failed to fetch TXT records from DNS");throw nt.name="DnsTxtFetchError",nt}const Ye=yield Be.arrayBuffer(),tt=new Uint8Array(Ye);return _parseDnsResponse(tt)})}DnsTxtQuery._fetchTxtRecords=_fetchTxtRecords;function _parseDnsResponse(Le){const Be=Le.findIndex((tt,nt)=>nt<MAX_START_LOOKUP&&String.fromCharCode(tt)==="="&&DOMAIN_CHARS.includes(String.fromCharCode(Le[nt-1])));if(Be===-1){const tt=new Error("Failed to parse TXT records from DNS");throw tt.name="DnsTxtParseError",tt}let Ye="";for(let tt=Be-1;tt<Le.length;tt++)Ye+=String.fromCharCode(Le[tt]);return Ye.split(",")}var __awaiter$c=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(NetworkFallbackResolver$1,"__esModule",{value:!0}),NetworkFallbackResolver$1._isDomainFailure=NetworkFallbackResolver$1.NetworkFallbackResolver=void 0;const DnsTxtQuery_1=DnsTxtQuery,Hashing_1=Hashing,Log_1$3=Log,StorageProvider_1$1=StorageProvider,DEFAULT_TTL_MS=7*24*60*60*1e3,COOLDOWN_TIME_MS=4*60*60*1e3;class NetworkFallbackResolver{constructor(Be){var Ye;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(Ye=Be.networkConfig)===null||Ye===void 0?void 0:Ye.networkOverrideFunc}setErrorBoundary(Be){this._errorBoundary=Be}tryBumpExpiryTime(Be,Ye){var tt;const nt=(tt=this._fallbackInfo)===null||tt===void 0?void 0:tt[Ye.endpoint];nt&&(nt.expiryTime=Date.now()+DEFAULT_TTL_MS,_tryWriteFallbackInfoToCache(Be,Object.assign(Object.assign({},this._fallbackInfo),{[Ye.endpoint]:nt})))}getActiveFallbackUrl(Be,Ye){var tt,nt;if(Ye.customUrl!=null&&Ye.fallbackUrls!=null)return null;let ft=this._fallbackInfo;ft==null&&(ft=(tt=_readFallbackInfoFromCache(Be))!==null&&tt!==void 0?tt:{},this._fallbackInfo=ft);const ht=ft[Ye.endpoint];return!ht||Date.now()>((nt=ht.expiryTime)!==null&&nt!==void 0?nt:0)||Ye.getChecksum()!==ht.urlConfigChecksum?(delete ft[Ye.endpoint],this._fallbackInfo=ft,_tryWriteFallbackInfoToCache(Be,this._fallbackInfo),null):ht.url?ht.url:null}tryFetchUpdatedFallbackInfo(Be,Ye,tt,nt){return __awaiter$c(this,void 0,void 0,function*(){var ft,ht;try{if(!_isDomainFailure(tt,nt))return!1;const At=Ye.customUrl==null&&Ye.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(Ye):Ye.fallbackUrls,xt=this._pickNewFallbackUrl((ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[Ye.endpoint],At);return xt?(this._updateFallbackInfoWithNewUrl(Be,Ye,xt),!0):!1}catch(gt){return(ht=this._errorBoundary)===null||ht===void 0||ht.logError("tryFetchUpdatedFallbackInfo",gt),!1}})}_updateFallbackInfoWithNewUrl(Be,Ye,tt){var nt,ft,ht;const gt={urlConfigChecksum:Ye.getChecksum(),url:tt,expiryTime:Date.now()+DEFAULT_TTL_MS,previous:[]},At=Ye.endpoint,xt=(nt=this._fallbackInfo)===null||nt===void 0?void 0:nt[At];xt&>.previous.push(...xt.previous),gt.previous.length>10&&(gt.previous=[]);const Et=(ht=(ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[At])===null||ht===void 0?void 0:ht.url;Et!=null&>.previous.push(Et),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[At]:gt}),_tryWriteFallbackInfoToCache(Be,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(Be){return __awaiter$c(this,void 0,void 0,function*(){var Ye;const tt=this._dnsQueryCooldowns[Be.endpoint];if(tt&&Date.now()<tt)return null;this._dnsQueryCooldowns[Be.endpoint]=Date.now()+COOLDOWN_TIME_MS;const nt=[],ft=yield(0,DnsTxtQuery_1._fetchTxtRecords)((Ye=this._networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch),ht=_extractPathFromUrl(Be.defaultUrl);for(const gt of ft){if(!gt.startsWith(Be.endpointDnsKey+"="))continue;const At=gt.split("=");if(At.length>1){let xt=At[1];xt.endsWith("/")&&(xt=xt.slice(0,-1)),nt.push(`https://${xt}${ht}`)}}return nt})}_pickNewFallbackUrl(Be,Ye){var tt;if(Ye==null)return null;const nt=new Set((tt=Be==null?void 0:Be.previous)!==null&&tt!==void 0?tt:[]),ft=Be==null?void 0:Be.url;let ht=null;for(const gt of Ye){const At=gt.endsWith("/")?gt.slice(0,-1):gt;if(!nt.has(gt)&&At!==ft){ht=At;break}}return ht}}NetworkFallbackResolver$1.NetworkFallbackResolver=NetworkFallbackResolver;function _isDomainFailure(Le,Be){var Ye;const tt=(Ye=Le==null?void 0:Le.toLowerCase())!==null&&Ye!==void 0?Ye:"";return Be||tt.includes("uncaught exception")||tt.includes("failed to fetch")||tt.includes("networkerror when attempting to fetch resource")}NetworkFallbackResolver$1._isDomainFailure=_isDomainFailure;function _getFallbackInfoStorageKey(Le){return`statsig.network_fallback.${(0,Hashing_1._DJB2)(Le)}`}function _tryWriteFallbackInfoToCache(Le,Be){const Ye=_getFallbackInfoStorageKey(Le);if(!Be||Object.keys(Be).length===0){StorageProvider_1$1.Storage.removeItem(Ye);return}StorageProvider_1$1.Storage.setItem(Ye,JSON.stringify(Be))}function _readFallbackInfoFromCache(Le){const Be=_getFallbackInfoStorageKey(Le),Ye=StorageProvider_1$1.Storage.getItem(Be);if(!Ye)return null;try{return JSON.parse(Ye)}catch{return Log_1$3.Log.error("Failed to parse FallbackInfo"),null}}function _extractPathFromUrl(Le){try{return new URL(Le).pathname}catch{return null}}var SDKFlags={};Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const FLAGMAP={};SDKFlags.SDKFlags={setFlags:(Le,Be)=>{FLAGMAP[Le]=Be},get:(Le,Be)=>{var Ye,tt;return(tt=(Ye=FLAGMAP[Le])===null||Ye===void 0?void 0:Ye[Be])!==null&&tt!==void 0?tt:!1}};var SessionID={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le.StatsigSession=Le.SessionID=void 0;const Be=$_StatsigGlobal,Ye=CacheKey,tt=Log,nt=StorageProvider,ft=UUID,ht=30*60*1e3,gt=4*60*60*1e3,At={};Le.SessionID={get:Rt=>Le.StatsigSession.get(Rt).data.sessionID},Le.StatsigSession={get:Rt=>{At[Rt]==null&&(At[Rt]=xt(Rt));const Tt=At[Rt];return kt(Tt)},overrideInitialSessionID:(Rt,Tt)=>{At[Tt]=Et(Rt,Tt)}};function xt(Rt){let Tt=wt(Rt);const Bt=Date.now();return Tt||(Tt={sessionID:(0,ft.getUUID)(),startTime:Bt,lastUpdate:Bt}),{data:Tt,sdkKey:Rt}}function Et(Rt,Tt){const Bt=Date.now();return{data:{sessionID:Rt,startTime:Bt,lastUpdate:Bt},sdkKey:Tt}}function kt(Rt){const Tt=Date.now(),Bt=Rt.data,Dt=Rt.sdkKey;if(yt(Bt)||vt(Bt)){Bt.sessionID=(0,ft.getUUID)(),Bt.startTime=Tt;const Nt=__STATSIG__==null?void 0:__STATSIG__.instance(Dt);Nt&&Nt.$emt({name:"session_expired"})}Bt.lastUpdate=Tt,It(Bt,Rt.sdkKey),clearTimeout(Rt.idleTimeoutID),clearTimeout(Rt.ageTimeoutID);const Pt=Tt-Bt.startTime;return Rt.idleTimeoutID=Ct(Dt,ht),Rt.ageTimeoutID=Ct(Dt,gt-Pt),Rt}function Ct(Rt,Tt){return setTimeout(()=>{var Bt;const Dt=(Bt=(0,Be._getStatsigGlobal)())===null||Bt===void 0?void 0:Bt.instance(Rt);Dt&&Dt.$emt({name:"session_expired"})},Tt)}function yt({lastUpdate:Rt}){return Date.now()-Rt>ht}function vt({startTime:Rt}){return Date.now()-Rt>gt}function bt(Rt){return`statsig.session_id.${(0,Ye._getStorageKey)(Rt)}`}function It(Rt,Tt){const Bt=bt(Tt);try{(0,nt._setObjectInStorage)(Bt,Rt)}catch{tt.Log.warn("Failed to save SessionID")}}function wt(Rt){const Tt=bt(Rt);return(0,nt._getObjectFromStorage)(Tt)}})(SessionID);var StatsigClientEventEmitter={};Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"};var __awaiter$b=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(NetworkCore$1,"__esModule",{value:!0}),NetworkCore$1.NetworkCore=void 0;const __StatsigGlobal_1$1=$_StatsigGlobal,Diagnostics_1=Diagnostics,Log_1$2=Log,NetworkConfig_1=NetworkConfig,NetworkFallbackResolver_1=NetworkFallbackResolver$1,SDKFlags_1=SDKFlags,SDKType_1=SDKType,SafeJs_1$1=SafeJs,SessionID_1$1=SessionID,StableID_1$1=StableID,StatsigClientEventEmitter_1=StatsigClientEventEmitter,StatsigMetadata_1=StatsigMetadata,StatsigOptionsCommon_1$1=StatsigOptionsCommon,VisibilityObserving_1=VisibilityObserving,DEFAULT_TIMEOUT_MS=1e4,BACKOFF_BASE_MS=500,BACKOFF_MAX_MS=3e4,RATE_LIMIT_WINDOW_MS=1e3,RATE_LIMIT_MAX_REQ_COUNT=50,LEAK_RATE=RATE_LIMIT_MAX_REQ_COUNT/RATE_LIMIT_WINDOW_MS,RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]);class NetworkCore{constructor(Be,Ye){this._emitter=Ye,this._errorBoundary=null,this._timeout=DEFAULT_TIMEOUT_MS,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,Be&&(this._options=Be),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new NetworkFallbackResolver_1.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(Be))}setLogEventCompressionMode(Be){this._options.logEventCompressionMode=Be}setErrorBoundary(Be){this._errorBoundary=Be,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(Be)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const Be=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,Be}beacon(Be){if(!_ensureValidSdkKey(Be))return!1;const Ye=this._getInternalRequestArgs("POST",Be),tt=this._getPopulatedURL(Ye),nt=navigator;return nt.sendBeacon.bind(nt)(tt,Ye.body)}post(Be){return __awaiter$b(this,void 0,void 0,function*(){const Ye=this._getInternalRequestArgs("POST",Be);return this._tryEncodeBody(Ye),yield this._tryToCompressBody(Ye),this._sendRequest(Ye)})}get(Be){const Ye=this._getInternalRequestArgs("GET",Be);return this._sendRequest(Ye)}_sendRequest(Be){return __awaiter$b(this,void 0,void 0,function*(){var Ye,tt,nt,ft;if(!_ensureValidSdkKey(Be)||this._netConfig.preventAllNetworkTraffic)return null;const{method:ht,body:gt,retries:At,attempt:xt}=Be,Et=Be.urlConfig.endpoint;if(this._isRateLimited(Et))return Log_1$2.Log.warn(`Request to ${Et} was blocked because you are making requests too frequently.`),null;const kt=xt??1;let Ct=!1;const yt=this._getPopulatedURL(Be);let vt=null;const bt=(0,VisibilityObserving_1._isUnloading)();try{const It={method:ht,body:gt,headers:Object.assign({},Be.headers),priority:Be.priority,keepalive:bt};_tryMarkInitStart(Be,kt);const wt=this._leakyBucket[Et];wt&&(wt.lastRequestTime=Date.now(),this._leakyBucket[Et]=wt);const Rt=(Ye=this._netConfig.networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch;let Tt;if(vt=yield Promise.race([Rt(yt,It).finally(()=>clearTimeout(Tt)),new Promise((Dt,Pt)=>{Tt=setTimeout(()=>{Ct=!0,Pt(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!vt.ok){const Dt=yield vt.text().catch(()=>"No Text"),Pt=new Error(`NetworkError: ${yt} ${Dt}`);throw Pt.name="NetworkError",Pt}const Bt=yield vt.text();return _tryMarkInitEnd(Be,vt,kt,Bt),this._fallbackResolver.tryBumpExpiryTime(Be.sdkKey,Be.urlConfig),{body:Bt,code:vt.status}}catch(It){const wt=_getErrorMessage(It),Rt=_didTimeout(wt??"",Ct);if(_tryMarkInitEnd(Be,vt,kt,"",It),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(Be.sdkKey,Be.urlConfig,wt,Rt))&&(Be.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(Be.sdkKey,Be.urlConfig)),!At||kt>At||!RETRYABLE_CODES.has((tt=vt==null?void 0:vt.status)!==null&&tt!==void 0?tt:500)){(nt=this._emitter)===null||nt===void 0||nt.call(this,{name:"error",error:It,tag:StatsigClientEventEmitter_1.ErrorTag.NetworkError,requestArgs:Be});const Bt=`A networking error occurred during ${ht} request to ${yt}.`;return Log_1$2.Log.error(Bt,wt,It),(ft=this._errorBoundary)===null||ft===void 0||ft.attachErrorIfNoneExists(Bt),null}return yield _exponentialBackoff(kt),this._sendRequest(Object.assign(Object.assign({},Be),{retries:At,attempt:kt+1}))}})}_getLogEventCompressionMode(Be){let Ye=Be==null?void 0:Be.logEventCompressionMode;return!Ye&&(Be==null?void 0:Be.disableCompression)===!0&&(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled),Ye||(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled),Ye}_isRateLimited(Be){var Ye;const tt=Date.now(),nt=(Ye=this._leakyBucket[Be])!==null&&Ye!==void 0?Ye:{count:0,lastRequestTime:tt},ft=tt-nt.lastRequestTime,ht=Math.floor(ft*LEAK_RATE);return nt.count=Math.max(0,nt.count-ht),nt.count>=RATE_LIMIT_MAX_REQ_COUNT?!0:(nt.count+=1,nt.lastRequestTime=tt,this._leakyBucket[Be]=nt,!1)}_getPopulatedURL(Be){var Ye;const tt=(Ye=Be.fallbackUrl)!==null&&Ye!==void 0?Ye:Be.urlConfig.getUrl();(Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize||Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=tt);const nt=Object.assign({[NetworkConfig_1.NetworkParam.SdkKey]:Be.sdkKey,[NetworkConfig_1.NetworkParam.SdkType]:SDKType_1.SDKType._get(Be.sdkKey),[NetworkConfig_1.NetworkParam.SdkVersion]:StatsigMetadata_1.SDK_VERSION,[NetworkConfig_1.NetworkParam.Time]:String(Date.now()),[NetworkConfig_1.NetworkParam.SessionID]:SessionID_1$1.SessionID.get(Be.sdkKey)},Be.params),ft=Object.keys(nt).map(ht=>`${encodeURIComponent(ht)}=${encodeURIComponent(nt[ht])}`).join("&");return`${tt}${ft?`?${ft}`:""}`}_tryEncodeBody(Be){var Ye;const tt=(0,SafeJs_1$1._getWindowSafe)(),nt=Be.body;if(!(!Be.isStatsigEncodable||this._options.disableStatsigEncoding||typeof nt!="string"||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-encode")!=null||!(tt!=null&&tt.btoa)))try{Be.body=tt.btoa(nt).split("").reverse().join(""),Be.params=Object.assign(Object.assign({},(Ye=Be.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.StatsigEncoded]:"1"})}catch(ft){Log_1$2.Log.warn(`Request encoding failed for ${Be.urlConfig.getUrl()}`,ft)}}_tryToCompressBody(Be){return __awaiter$b(this,void 0,void 0,function*(){var Ye;const tt=Be.body;if(!(typeof tt!="string"||!_allowCompression(Be,this._options)))try{const nt=new TextEncoder().encode(tt),ft=new CompressionStream("gzip"),ht=ft.writable.getWriter();ht.write(nt).catch(Log_1$2.Log.error),ht.close().catch(Log_1$2.Log.error);const gt=ft.readable.getReader(),At=[];let xt;for(;!(xt=yield gt.read()).done;)At.push(xt.value);const Et=At.reduce((yt,vt)=>yt+vt.length,0),kt=new Uint8Array(Et);let Ct=0;for(const yt of At)kt.set(yt,Ct),Ct+=yt.length;Be.body=kt,Be.params=Object.assign(Object.assign({},(Ye=Be.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.IsGzipped]:"1"})}catch(nt){Log_1$2.Log.warn(`Request compression failed for ${Be.urlConfig.getUrl()}`,nt)}})}_getInternalRequestArgs(Be,Ye){const tt=this._fallbackResolver.getActiveFallbackUrl(Ye.sdkKey,Ye.urlConfig),nt=Object.assign(Object.assign({},Ye),{method:Be,fallbackUrl:tt});return"data"in Ye&&_populateRequestBody(nt,Ye.data),nt}}NetworkCore$1.NetworkCore=NetworkCore;const _ensureValidSdkKey=Le=>Le.sdkKey?!0:(Log_1$2.Log.warn("Unable to make request without an SDK key"),!1),_populateRequestBody=(Le,Be)=>{const{sdkKey:Ye,fallbackUrl:tt}=Le,nt=StableID_1$1.StableID.get(Ye),ft=SessionID_1$1.SessionID.get(Ye),ht=SDKType_1.SDKType._get(Ye);Le.body=JSON.stringify(Object.assign(Object.assign({},Be),{statsigMetadata:Object.assign(Object.assign({},StatsigMetadata_1.StatsigMetadataProvider.get()),{stableID:nt,sessionID:ft,sdkType:ht,fallbackUrl:tt})}))};function _allowCompression(Le,Be){if(!Le.isCompressable||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const Ye=Le.urlConfig.customUrl!=null||Le.urlConfig.fallbackUrls!=null,tt=SDKFlags_1.SDKFlags.get(Le.sdkKey,"enable_log_event_compression")===!0;switch(Be.logEventCompressionMode){case StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled:return!1;case StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled:return!(Ye&&!tt);case StatsigOptionsCommon_1$1.LogEventCompressionMode.Forced:return!0;default:return!1}}function _getErrorMessage(Le){return typeof Le=="string"?Le:Le instanceof Error?`${Le.name}: ${Le.message}`:"Unknown Error"}function _didTimeout(Le,Be){return Le.includes("Timeout")||Be}function _tryMarkInitStart(Le,Be){Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqStart(Le.sdkKey,{attempt:Be})}function _tryMarkInitEnd(Le,Be,Ye,tt,nt){Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqEnd(Le.sdkKey,Diagnostics_1.Diagnostics._getDiagnosticsData(Be,Ye,tt,nt))}function _exponentialBackoff(Le){return __awaiter$b(this,void 0,void 0,function*(){yield new Promise(Be=>setTimeout(Be,Math.min(BACKOFF_BASE_MS*(Le*Le),BACKOFF_MAX_MS)))})}var OverrideAdapter={};Object.defineProperty(OverrideAdapter,"__esModule",{value:!0});var ParamStoreTypes={};Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0});var SizeOf={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le._fastApproxSizeOf=void 0;const Be=2,Ye=1,tt=(nt,ft)=>{let ht=0;const gt=Object.keys(nt);for(let At=0;At<gt.length;At++){const xt=gt[At],Et=nt[xt];if(ht+=xt.length,typeof Et=="object"&&Et!==null?ht+=(0,Le._fastApproxSizeOf)(Et,ft)+Be:ht+=String(Et).length+Ye,ht>=ft)return ht}return ht};Le._fastApproxSizeOf=tt})(SizeOf);var StatsigClientBase$1={},__awaiter$a=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(StatsigClientBase$1,"__esModule",{value:!0}),StatsigClientBase$1.StatsigClientBase=void 0;const __StatsigGlobal_1=$_StatsigGlobal,ErrorBoundary_1=ErrorBoundary,EventLogger_1=EventLogger$1,Log_1$1=Log,MemoKey_1=MemoKey,SafeJs_1=SafeJs,SessionID_1=SessionID,StableID_1=StableID,StatsigOptionsCommon_1=StatsigOptionsCommon,StorageProvider_1=StorageProvider,MAX_MEMO_CACHE_SIZE=3e3;class StatsigClientBase{constructor(Be,Ye,tt,nt){var ft,ht,gt,At;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const xt=this.$emt.bind(this);(nt==null?void 0:nt.logLevel)!=null&&(Log_1$1.Log.level=nt.logLevel),nt!=null&&nt.disableStorage&&StorageProvider_1.Storage._setDisabled(!0),nt!=null&&nt.initialSessionID&&SessionID_1.StatsigSession.overrideInitialSessionID(nt.initialSessionID,Be),nt!=null&&nt.storageProvider&&StorageProvider_1.Storage._setProvider(nt.storageProvider),nt!=null&&nt.enableCookies&&StableID_1.StableID._setCookiesEnabled(Be,nt.enableCookies),nt!=null&&nt.disableStableID&&StableID_1.StableID._setDisabled(Be,!0),this._sdkKey=Be,this._options=nt??{},this._memoCache={},this.overrideAdapter=(ft=nt==null?void 0:nt.overrideAdapter)!==null&&ft!==void 0?ft:null,this._logger=new EventLogger_1.EventLogger(Be,xt,tt,nt),this._errorBoundary=new ErrorBoundary_1.ErrorBoundary(Be,nt,xt),this._errorBoundary.wrap(this),this._errorBoundary.wrap(Ye),this._errorBoundary.wrap(this._logger),tt.setErrorBoundary(this._errorBoundary),this.dataAdapter=Ye,this.dataAdapter.attach(Be,nt,tt),this.storageProvider=StorageProvider_1.Storage,(At=(gt=(ht=this.overrideAdapter)===null||ht===void 0?void 0:ht.loadFromStorage)===null||gt===void 0?void 0:gt.call(ht))===null||At===void 0||At.catch(Et=>this._errorBoundary.logError("OA::loadFromStorage",Et)),this._primeReadyRipcord(),_assignGlobalInstance(Be,this)}updateRuntimeOptions(Be){Be.loggingEnabled?(this._options.loggingEnabled=Be.loggingEnabled,this._logger.setLoggingEnabled(Be.loggingEnabled)):Be.disableLogging!=null&&(this._options.disableLogging=Be.disableLogging,this._logger.setLoggingEnabled(Be.disableLogging?"disabled":"browser-only")),Be.disableStorage!=null&&(this._options.disableStorage=Be.disableStorage,StorageProvider_1.Storage._setDisabled(Be.disableStorage)),Be.enableCookies!=null&&(this._options.enableCookies=Be.enableCookies,StableID_1.StableID._setCookiesEnabled(this._sdkKey,Be.enableCookies)),Be.logEventCompressionMode?this._logger.setLogEventCompressionMode(Be.logEventCompressionMode):Be.disableCompression&&this._logger.setLogEventCompressionMode(StatsigOptionsCommon_1.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return __awaiter$a(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(Be,Ye){this._listeners[Be]||(this._listeners[Be]=[]),this._listeners[Be].push(Ye)}off(Be,Ye){if(this._listeners[Be]){const tt=this._listeners[Be].indexOf(Ye);tt!==-1&&this._listeners[Be].splice(tt,1)}}$on(Be,Ye){Ye.__isInternal=!0,this.on(Be,Ye)}$emt(Be){var Ye;const tt=nt=>{try{nt(Be)}catch(ft){if(nt.__isInternal===!0){this._errorBoundary.logError(`__emit:${Be.name}`,ft);return}Log_1$1.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",Be)}};this._listeners[Be.name]&&this._listeners[Be.name].forEach(nt=>tt(nt)),(Ye=this._listeners["*"])===null||Ye===void 0||Ye.forEach(tt)}_setStatus(Be,Ye){this.loadingStatus=Be,this._memoCache={},this.$emt({name:"values_updated",status:Be,values:Ye})}_enqueueExposure(Be,Ye,tt){if((tt==null?void 0:tt.disableExposureLog)===!0){this._logger.incrementNonExposureCount(Be);return}this._logger.enqueue(Ye)}_memoize(Be,Ye){return(tt,nt)=>{if(this._options.disableEvaluationMemoization)return Ye(tt,nt);const ft=(0,MemoKey_1.createMemoKey)(Be,tt,nt);return ft?(ft in this._memoCache||(Object.keys(this._memoCache).length>=MAX_MEMO_CACHE_SIZE&&(this._memoCache={}),this._memoCache[ft]=Ye(tt,nt)),this._memoCache[ft]):Ye(tt,nt)}}}StatsigClientBase$1.StatsigClientBase=StatsigClientBase;function _assignGlobalInstance(Le,Be){var Ye;if((0,SafeJs_1._isServerEnv)())return;const tt=(0,__StatsigGlobal_1._getStatsigGlobal)(),nt=(Ye=tt.instances)!==null&&Ye!==void 0?Ye:{},ft=Be;nt[Le]!=null&&Log_1$1.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),nt[Le]=ft,tt.firstInstance||(tt.firstInstance=ft),tt.instances=nt,__STATSIG__=tt}var StatsigDataAdapter={};Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached";var StatsigPlugin={};Object.defineProperty(StatsigPlugin,"__esModule",{value:!0});var StatsigTypeFactories={};Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const Log_1=Log,TypingUtils_1=TypingUtils;function _makeEvaluation(Le,Be,Ye,tt){var nt;return{name:Le,details:Be,ruleID:(nt=Ye==null?void 0:Ye.rule_id)!==null&&nt!==void 0?nt:"",__evaluation:Ye,value:tt}}function _makeFeatureGate(Le,Be,Ye){var tt;return Object.assign(Object.assign({},_makeEvaluation(Le,Be,Ye,(Ye==null?void 0:Ye.value)===!0)),{idType:(tt=Ye==null?void 0:Ye.id_type)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeFeatureGate=_makeFeatureGate;function _makeDynamicConfig(Le,Be,Ye){var tt,nt;const ft=(tt=Ye==null?void 0:Ye.value)!==null&&tt!==void 0?tt:{};return Object.assign(Object.assign({},_makeEvaluation(Le,Be,Ye,ft)),{idType:(nt=Ye==null?void 0:Ye.id_type)!==null&&nt!==void 0?nt:null,get:_makeTypedGet(Le,Ye==null?void 0:Ye.value)})}StatsigTypeFactories._makeDynamicConfig=_makeDynamicConfig;function _makeExperiment(Le,Be,Ye){var tt;const nt=_makeDynamicConfig(Le,Be,Ye);return Object.assign(Object.assign({},nt),{groupName:(tt=Ye==null?void 0:Ye.group_name)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeExperiment=_makeExperiment;function _makeLayer(Le,Be,Ye,tt){var nt,ft;return Object.assign(Object.assign({},_makeEvaluation(Le,Be,Ye,void 0)),{get:_makeTypedGet(Le,Ye==null?void 0:Ye.value,tt),groupName:(nt=Ye==null?void 0:Ye.group_name)!==null&&nt!==void 0?nt:null,__value:(ft=Ye==null?void 0:Ye.value)!==null&&ft!==void 0?ft:{}})}StatsigTypeFactories._makeLayer=_makeLayer;function _mergeOverride(Le,Be,Ye,tt){return Object.assign(Object.assign(Object.assign({},Le),Be),{get:_makeTypedGet(Le.name,Ye,tt)})}StatsigTypeFactories._mergeOverride=_mergeOverride;function _makeTypedGet(Le,Be,Ye){return(tt,nt)=>{var ft;const ht=(ft=Be==null?void 0:Be[tt])!==null&&ft!==void 0?ft:null;return ht==null?nt??null:nt!=null&&!(0,TypingUtils_1._isTypeMatch)(ht,nt)?(Log_1.Log.warn(`Parameter type mismatch. '${Le}.${tt}' was found to be type '${typeof ht}' but fallback/return type is '${typeof nt}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),nt??null):(Ye==null||Ye(tt),ht)}}StatsigTypeFactories._makeTypedGet=_makeTypedGet;var StatsigTypes={};Object.defineProperty(StatsigTypes,"__esModule",{value:!0});var StatsigUpdateDetails={};Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;const createUpdateDetails=(Le,Be,Ye,tt,nt,ft)=>({duration:Ye,source:Be,success:Le,error:tt,sourceUrl:nt,warnings:ft});StatsigUpdateDetails.createUpdateDetails=createUpdateDetails,StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},function(Le){var Be=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(xt,Et,kt,Ct){Ct===void 0&&(Ct=kt);var yt=Object.getOwnPropertyDescriptor(Et,kt);(!yt||("get"in yt?!Et.__esModule:yt.writable||yt.configurable))&&(yt={enumerable:!0,get:function(){return Et[kt]}}),Object.defineProperty(xt,Ct,yt)}:function(xt,Et,kt,Ct){Ct===void 0&&(Ct=kt),xt[Ct]=Et[kt]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(xt,Et){for(var kt in xt)kt!=="default"&&!Object.prototype.hasOwnProperty.call(Et,kt)&&Be(Et,xt,kt)};Object.defineProperty(Le,"__esModule",{value:!0}),Le.Storage=Le.Log=Le.EventLogger=Le.Diagnostics=void 0;const tt=$_StatsigGlobal,nt=Diagnostics;Object.defineProperty(Le,"Diagnostics",{enumerable:!0,get:function(){return nt.Diagnostics}});const ft=EventLogger$1;Object.defineProperty(Le,"EventLogger",{enumerable:!0,get:function(){return ft.EventLogger}});const ht=Log;Object.defineProperty(Le,"Log",{enumerable:!0,get:function(){return ht.Log}});const gt=StatsigMetadata,At=StorageProvider;Object.defineProperty(Le,"Storage",{enumerable:!0,get:function(){return At.Storage}}),Ye($_StatsigGlobal,Le),Ye(CacheKey,Le),Ye(ClientInterfaces,Le),Ye(DataAdapterCore$1,Le),Ye(Diagnostics,Le),Ye(DownloadConfigSpecsResponse,Le),Ye(ErrorBoundary,Le),Ye(EvaluationOptions,Le),Ye(EvaluationTypes,Le),Ye(Hashing,Le),Ye(InitializeResponse,Le),Ye(Log,Le),Ye(MemoKey,Le),Ye(NetworkConfig,Le),Ye(NetworkCore$1,Le),Ye(OverrideAdapter,Le),Ye(ParamStoreTypes,Le),Ye(SafeJs,Le),Ye(SDKType,Le),Ye(SessionID,Le),Ye(SizeOf,Le),Ye(StableID,Le),Ye(StatsigClientBase$1,Le),Ye(StatsigClientEventEmitter,Le),Ye(StatsigDataAdapter,Le),Ye(StatsigEvent,Le),Ye(StatsigMetadata,Le),Ye(StatsigOptionsCommon,Le),Ye(StatsigPlugin,Le),Ye(StatsigTypeFactories,Le),Ye(StatsigTypes,Le),Ye(StatsigUser,Le),Ye(StorageProvider,Le),Ye(TypedJsonParse,Le),Ye(TypingUtils,Le),Ye(UrlConfiguration$1,Le),Ye(UUID,Le),Ye(VisibilityObserving,Le),Ye(StatsigUpdateDetails,Le),Ye(SDKFlags,Le),Object.assign((0,tt._getStatsigGlobal)(),{Log:ht.Log,SDK_VERSION:gt.SDK_VERSION})}(src$1);var StatsigClient$1={},EvaluationStore$1={},V1InitializeContainer$1={};Object.defineProperty(V1InitializeContainer$1,"__esModule",{value:!0}),V1InitializeContainer$1.V1InitializeContainer=void 0;const client_core_1$7=src$1;class V1InitializeContainer{constructor(Be){this._values=Be}getGate(Be){return this._getResultFromLookup(this._values.feature_gates,Be)}getConfig(Be){return this._getResultFromLookup(this._values.dynamic_configs,Be)}getLayer(Be){return this._getResultFromLookup(this._values.layer_configs,Be)}getParamStore(Be){return this._getResultFromLookup(this._values.param_stores,Be)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Be,Ye){var tt,nt;return Be&&(nt=(tt=Be[Ye])!==null&&tt!==void 0?tt:Be[(0,client_core_1$7._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V1InitializeContainer$1.V1InitializeContainer=V1InitializeContainer;var V2InitializeContainer$1={};Object.defineProperty(V2InitializeContainer$1,"__esModule",{value:!0}),V2InitializeContainer$1.V2InitializeContainer=void 0;const client_core_1$6=src$1;class V2InitializeContainer{constructor(Be){this._values=Be}getGate(Be){var Ye,tt,nt;const ft=this._getResultFromLookup(this._values.feature_gates,Be);return ft?{name:Be,value:ft.v===!0,rule_id:(Ye=ft.r)!==null&&Ye!==void 0?Ye:"default",secondary_exposures:(tt=ft.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ft.i)!==null&&nt!==void 0?nt:""}:null}getConfig(Be){var Ye,tt,nt,ft;const ht=this._getResultFromLookup(this._values.dynamic_configs,Be);return ht?{name:Be,value:(Ye=this._values.values[ht.v])!==null&&Ye!==void 0?Ye:{},rule_id:ht.r,secondary_exposures:(tt=ht.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ht.i)!==null&&nt!==void 0?nt:"",is_user_in_experiment:ht.ue===!0,passed:ht.p===!0,group_name:(ft=ht.gn)!==null&&ft!==void 0?ft:void 0,is_experiment_active:ht.ea===!0,group:ht.r,is_device_based:ht.i==="stableID"}:null}getLayer(Be){var Ye,tt,nt,ft,ht,gt;const At=this._getResultFromLookup(this._values.layer_configs,Be);return At?{name:Be,value:(Ye=this._values.values[At.v])!==null&&Ye!==void 0?Ye:{},rule_id:At.r,secondary_exposures:(tt=At.s)!==null&&tt!==void 0?tt:[],is_user_in_experiment:At.ue===!0,group_name:(nt=At.gn)!==null&&nt!==void 0?nt:void 0,is_experiment_active:At.ea===!0,group:At.r,is_device_based:At.i==="stableID",allocated_experiment_name:(ft=At.ae)!==null&&ft!==void 0?ft:"",explicit_parameters:(ht=At.ep)!==null&&ht!==void 0?ht:[],undelegated_secondary_exposures:(gt=At.us)!==null&>!==void 0?gt:[],parameter_rule_ids:At.pr}:null}getParamStore(Be){return this._getResultFromLookup(this._values.param_stores,Be)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Be,Ye){var tt,nt;return Be&&(nt=(tt=Be[Ye])!==null&&tt!==void 0?tt:Be[(0,client_core_1$6._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V2InitializeContainer$1.V2InitializeContainer=V2InitializeContainer,Object.defineProperty(EvaluationStore$1,"__esModule",{value:!0});const client_core_1$5=src$1,V1InitializeContainer_1=V1InitializeContainer$1,V2InitializeContainer_1=V2InitializeContainer$1;class EvaluationStore{constructor(Be){this._sdkKey=Be,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,client_core_1$5._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(Be,Ye){var tt,nt;if(!Be)return!1;const ft=(0,client_core_1$5._typedJsonParse)(Be.data,"has_updates","EvaluationResponse");return ft==null?!1:(this._source=Be.source,(ft==null?void 0:ft.has_updates)!==!0||((tt=ft.time)!==null&&tt!==void 0?tt:0)<this._lcut||(this._rawValues=Be.data,this._lcut=ft.time,this._receivedAt=Be.receivedAt,ft.response_format==="init-v2"?this._values=new V2InitializeContainer_1.V2InitializeContainer(ft):this._values=new V1InitializeContainer_1.V1InitializeContainer(ft),this._bootstrapMetadata=this._extractBootstrapMetadata(Be.source,ft),Be.source&&ft.user&&this._setWarningState(Ye,ft),client_core_1$5.SDKFlags.setFlags(this._sdkKey,(nt=ft.sdk_flags)!==null&&nt!==void 0?nt:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(Be){const Ye=this._values?this._values.getGate(Be):null;return this._getDetailedStoreResult(Ye)}getConfig(Be){const Ye=this._values?this._values.getConfig(Be):null;return this._getDetailedStoreResult(Ye)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(Be){const Ye=this._values?this._values.getLayer(Be):null;return this._getDetailedStoreResult(Ye)}getParamStore(Be){const Ye=this._values?this._values.getParamStore(Be):null;return this._getDetailedStoreResult(Ye)}getSource(){return this._source}getExposureMapping(){var Be;return(Be=this._values)===null||Be===void 0?void 0:Be.getExposureMapping()}_extractBootstrapMetadata(Be,Ye){if(Be!=="Bootstrap")return null;const tt={};return Ye.user&&(tt.user=Ye.user),Ye.sdkInfo&&(tt.generatorSDKInfo=Ye.sdkInfo),tt.lcut=Ye.time,tt}_getDetailedStoreResult(Be){return{result:Be,details:this._getDetails(Be==null)}}_setWarningState(Be,Ye){var tt,nt;const ft=client_core_1$5.StableID.get(this._sdkKey);if(((tt=Be.customIDs)===null||tt===void 0?void 0:tt.stableID)!==ft&&(!((nt=Be.customIDs)===null||nt===void 0)&&nt.stableID||ft)){this._warnings.add("StableIDMismatch");return}if("user"in Ye){const ht=Ye.user,gt=Object.assign(Object.assign({},Be),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,client_core_1$5._getFullUserHash)(gt)!==(0,client_core_1$5._getFullUserHash)(ht)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const Be={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(Be.warnings=Array.from(this._warnings)),Be}_getDetails(Be){var Ye,tt;const nt=this.getCurrentSourceDetails();let ft=nt.reason;const ht=(Ye=nt.warnings)!==null&&Ye!==void 0?Ye:[];this._source==="Bootstrap"&&ht.length>0&&(ft=ft+ht[0]),ft!=="Uninitialized"&&ft!=="NoValues"&&(ft=`${ft}:${Be?"Unrecognized":"Recognized"}`);const gt=this._source==="Bootstrap"&&(tt=this._bootstrapMetadata)!==null&&tt!==void 0?tt:void 0;return gt&&(nt.bootstrapMetadata=gt),Object.assign(Object.assign({},nt),{reason:ft})}}EvaluationStore$1.default=EvaluationStore;var Network={},EvaluationResponseDeltas={};Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const client_core_1$4=src$1,MAX_DELTAS_SORT_DEPTH=2;function _resolveDeltasResponse(Le,Be){const Ye=(0,client_core_1$4._typedJsonParse)(Be,"checksum","DeltasEvaluationResponse");if(!Ye)return{hadBadDeltaChecksum:!0};const tt=_mergeDeltasIntoCache(Le,Ye),nt=_handleDeletedEntries(tt),ft=(0,client_core_1$4._DJB2Object)({feature_gates:nt.feature_gates,dynamic_configs:nt.dynamic_configs,layer_configs:nt.layer_configs},MAX_DELTAS_SORT_DEPTH);return ft===Ye.checksumV2?JSON.stringify(nt):{hadBadDeltaChecksum:!0,badChecksum:ft,badMergedConfigs:nt,badFullResponse:Ye.deltas_full_response}}EvaluationResponseDeltas._resolveDeltasResponse=_resolveDeltasResponse;function _mergeDeltasIntoCache(Le,Be){return Object.assign(Object.assign(Object.assign({},Le),Be),{feature_gates:Object.assign(Object.assign({},Le.feature_gates),Be.feature_gates),layer_configs:Object.assign(Object.assign({},Le.layer_configs),Be.layer_configs),dynamic_configs:Object.assign(Object.assign({},Le.dynamic_configs),Be.dynamic_configs)})}function _handleDeletedEntries(Le){const Be=Le;return _deleteEntriesInRecord(Le.deleted_gates,Be.feature_gates),delete Be.deleted_gates,_deleteEntriesInRecord(Le.deleted_configs,Be.dynamic_configs),delete Be.deleted_configs,_deleteEntriesInRecord(Le.deleted_layers,Be.layer_configs),delete Be.deleted_layers,Be}function _deleteEntriesInRecord(Le,Be){Le==null||Le.forEach(Ye=>{delete Be[Ye]})}var __awaiter$9=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const client_core_1$3=src$1,EvaluationResponseDeltas_1=EvaluationResponseDeltas;class StatsigNetwork extends client_core_1$3.NetworkCore{constructor(Be,Ye){super(Be,Ye);const tt=Be==null?void 0:Be.networkConfig;this._option=Be,this._initializeUrlConfig=new client_core_1$3.UrlConfiguration(client_core_1$3.Endpoint._initialize,tt==null?void 0:tt.initializeUrl,tt==null?void 0:tt.api,tt==null?void 0:tt.initializeFallbackUrls)}fetchEvaluations(Be,Ye,tt,nt,ft){return __awaiter$9(this,void 0,void 0,function*(){var ht,gt,At,xt,Et,kt;const Ct=Ye?(0,client_core_1$3._typedJsonParse)(Ye,"has_updates","InitializeResponse"):null;let yt={user:nt,hash:(At=(gt=(ht=this._option)===null||ht===void 0?void 0:ht.networkConfig)===null||gt===void 0?void 0:gt.initializeHashAlgorithm)!==null&&At!==void 0?At:"djb2",deltasResponseRequested:!1,full_checksum:null};if(Ct!=null&&Ct.has_updates){const vt=(Ct==null?void 0:Ct.hash_used)!==((kt=(Et=(xt=this._option)===null||xt===void 0?void 0:xt.networkConfig)===null||Et===void 0?void 0:Et.initializeHashAlgorithm)!==null&&kt!==void 0?kt:"djb2");yt=Object.assign(Object.assign({},yt),{sinceTime:ft&&!vt?Ct.time:0,previousDerivedFields:"derived_fields"in Ct&&ft?Ct.derived_fields:{},deltasResponseRequested:!0,full_checksum:Ct.full_checksum,partialUserMatchSinceTime:vt?0:Ct.time})}return this._fetchEvaluations(Be,Ct,yt,tt)})}_fetchEvaluations(Be,Ye,tt,nt){return __awaiter$9(this,void 0,void 0,function*(){var ft,ht;const gt=yield this.post({sdkKey:Be,urlConfig:this._initializeUrlConfig,data:tt,retries:2,isStatsigEncodable:!0,priority:nt});if((gt==null?void 0:gt.code)===204)return'{"has_updates": false}';if((gt==null?void 0:gt.code)!==200)return(ft=gt==null?void 0:gt.body)!==null&&ft!==void 0?ft:null;if((Ye==null?void 0:Ye.has_updates)!==!0||((ht=gt.body)===null||ht===void 0?void 0:ht.includes('"is_delta":true'))!==!0||tt.deltasResponseRequested!==!0)return gt.body;const At=(0,EvaluationResponseDeltas_1._resolveDeltasResponse)(Ye,gt.body);return typeof At=="string"?At:this._fetchEvaluations(Be,Ye,Object.assign(Object.assign(Object.assign({},tt),At),{deltasResponseRequested:!1}),nt)})}}Network.default=StatsigNetwork;var ParamStoreGetterFactory={};Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const client_core_1$2=src$1,NO_EXPOSURE_OPT={disableExposureLog:!0};function _shouldLogExposure(Le){return Le==null||Le.disableExposureLog===!1}function _shouldReturnFallback(Le,Be){return Be!=null&&!(0,client_core_1$2._isTypeMatch)(Le,Be)}function _getMappedStaticValue(Le,Be){return Le.value}function _getMappedGateValue(Le,Be,Ye){return Le.getFeatureGate(Be.gate_name,_shouldLogExposure(Ye)?void 0:NO_EXPOSURE_OPT).value?Be.pass_value:Be.fail_value}function _getMappedDynamicConfigValue(Le,Be,Ye,tt){const ft=Le.getDynamicConfig(Be.config_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Be.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedExperimentValue(Le,Be,Ye,tt){const ft=Le.getExperiment(Be.experiment_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Be.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedLayerValue(Le,Be,Ye,tt){const ft=Le.getLayer(Be.layer_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Be.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _makeParamStoreGetter(Le,Be,Ye){return(tt,nt)=>{if(Be==null)return nt;const ft=Be[tt];if(ft==null||nt!=null&&(0,client_core_1$2._typeOf)(nt)!==ft.param_type)return nt;switch(ft.ref_type){case"static":return _getMappedStaticValue(ft);case"gate":return _getMappedGateValue(Le,ft,Ye);case"dynamic_config":return _getMappedDynamicConfigValue(Le,ft,nt,Ye);case"experiment":return _getMappedExperimentValue(Le,ft,nt,Ye);case"layer":return _getMappedLayerValue(Le,ft,nt,Ye);default:return nt}}}ParamStoreGetterFactory._makeParamStoreGetter=_makeParamStoreGetter;var StatsigEvaluationsDataAdapter$1={},__awaiter$8=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter$1,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=void 0;const client_core_1$1=src$1,Network_1$1=Network;class StatsigEvaluationsDataAdapter extends client_core_1$1.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(Be,Ye,tt){super.attach(Be,Ye,tt),tt!==null&&tt instanceof Network_1$1.default?this._network=tt:this._network=new Network_1$1.default(Ye??{})}getDataAsync(Be,Ye,tt){return this._getDataAsyncImpl(Be,(0,client_core_1$1._normalizeUser)(Ye,this._options),tt)}prefetchData(Be,Ye){return this._prefetchDataImpl(Be,Ye)}setData(Be){const Ye=(0,client_core_1$1._typedJsonParse)(Be,"has_updates","data");Ye&&"user"in Ye?super.setData(Be,Ye.user):client_core_1$1.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(Be,Ye){super.setData(Be,Ye)}_fetchFromNetwork(Be,Ye,tt,nt){return __awaiter$8(this,void 0,void 0,function*(){var ft;const ht=yield(ft=this._network)===null||ft===void 0?void 0:ft.fetchEvaluations(this._getSdkKey(),Be,tt==null?void 0:tt.priority,Ye,nt);return ht??null})}_getCacheKey(Be){var Ye;const tt=(0,client_core_1$1._getStorageKey)(this._getSdkKey(),Be,(Ye=this._options)===null||Ye===void 0?void 0:Ye.customUserCacheKeyFunc);return`${client_core_1$1.DataAdapterCachePrefix}.${this._cacheSuffix}.${tt}`}_isCachedResultValidFor204(Be,Ye){return Be.fullUserHash!=null&&Be.fullUserHash===(0,client_core_1$1._getFullUserHash)(Ye)}}StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=StatsigEvaluationsDataAdapter;var __awaiter$7=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(StatsigClient$1,"__esModule",{value:!0});const client_core_1=src$1,EvaluationStore_1=EvaluationStore$1,Network_1=Network,ParamStoreGetterFactory_1=ParamStoreGetterFactory,StatsigEvaluationsDataAdapter_1=StatsigEvaluationsDataAdapter$1;class StatsigClient extends client_core_1.StatsigClientBase{static instance(Be){const Ye=(0,client_core_1._getStatsigGlobal)().instance(Be);return Ye instanceof StatsigClient?Ye:(client_core_1.Log.warn((0,client_core_1._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new StatsigClient(Be??"",{}))}constructor(Be,Ye,tt=null){var nt,ft;client_core_1.SDKType._setClientType(Be,"javascript-client");const ht=new Network_1.default(tt,At=>{this.$emt(At)});super(Be,(nt=tt==null?void 0:tt.dataAdapter)!==null&&nt!==void 0?nt:new StatsigEvaluationsDataAdapter_1.StatsigEvaluationsDataAdapter,ht,tt),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(client_core_1.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(client_core_1.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(client_core_1.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(client_core_1.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(client_core_1.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(client_core_1.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new EvaluationStore_1.default(Be),this._network=ht,this._user=this._configureUser(Ye,tt),this._sdkInstanceID=(0,client_core_1.getUUID)();const gt=(ft=tt==null?void 0:tt.plugins)!==null&&ft!==void 0?ft:[];for(const At of gt)At.bind(this)}initializeSync(Be){var Ye;return this.loadingStatus!=="Uninitialized"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(Ye=this._store.getWarnings())!==null&&Ye!==void 0?Ye:[]]):(this._logger.start(),this.updateUserSync(this._user,Be))}initializeAsync(Be){return __awaiter$7(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(Be),this._initializePromise)})}updateUserSync(Be,Ye){const tt=performance.now();try{return this._updateUserSyncImpl(Be,Ye,tt)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}}_updateUserSyncImpl(Be,Ye,tt){var nt;const ft=[...(nt=this._store.getWarnings())!==null&&nt!==void 0?nt:[]];this._resetForUser(Be);const ht=this.dataAdapter.getDataSync(this._user);ht==null&&ft.push("NoCachedValues"),this._store.setValues(ht,this._user),this._finalizeUpdate(ht);const gt=Ye==null?void 0:Ye.disableBackgroundCacheRefresh;return gt===!0||gt==null&&(ht==null?void 0:ht.source)==="Bootstrap"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft):(this._runPostUpdate(ht??null,this._user),(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft))}updateUserAsync(Be,Ye){return __awaiter$7(this,void 0,void 0,function*(){const tt=performance.now();try{return yield this._updateUserAsyncImpl(Be,Ye)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}})}_updateUserAsyncImpl(Be,Ye){return __awaiter$7(this,void 0,void 0,function*(){this._resetForUser(Be);const tt=this._user;client_core_1.Diagnostics._markInitOverallStart(this._sdkKey);let nt=this.dataAdapter.getDataSync(tt);if(this._store.setValues(nt,this._user),this._setStatus("Loading",nt),nt=yield this.dataAdapter.getDataAsync(nt,tt,Ye),tt!==this._user)return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let ft=!1;nt!=null&&(client_core_1.Diagnostics._markInitProcessStart(this._sdkKey),ft=this._store.setValues(nt,this._user),client_core_1.Diagnostics._markInitProcessEnd(this._sdkKey,{success:ft})),this._finalizeUpdate(nt),ft||(this._errorBoundary.attachErrorIfNoneExists(client_core_1.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),client_core_1.Diagnostics._markInitOverallEnd(this._sdkKey,ft,this._store.getCurrentSourceDetails());const ht=client_core_1.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,client_core_1.createUpdateDetails)(ft,this._store.getSource(),ht,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:client_core_1.StatsigSession.get(this._sdkKey),stableID:client_core_1.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(Be,Ye){return this.getFeatureGate(Be,Ye).value}logEvent(Be,Ye,tt){const nt=typeof Be=="string"?{eventName:Be,value:Ye,metadata:tt}:Be;this.$emt({name:"log_event_called",event:nt}),this._logger.enqueue(Object.assign(Object.assign({},nt),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(Be){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:Be}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(Be){return __awaiter$7(this,void 0,void 0,function*(){return client_core_1.Storage.isReady()||(yield client_core_1.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,Be)})}_createErrorUpdateDetails(Be,Ye){var tt;return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),performance.now()-Ye,Be,null,[...(tt=this._store.getWarnings())!==null&&tt!==void 0?tt:[]])}_finalizeUpdate(Be){this._store.finalize(),this._setStatus("Ready",Be)}_runPostUpdate(Be,Ye){this.dataAdapter.getDataAsync(Be,Ye,{priority:"low"}).catch(tt=>{client_core_1.Log.error("An error occurred after update.",tt)})}_resetForUser(Be){this._logger.reset(),this._store.reset(),this._user=this._configureUser(Be,this._options)}_configureUser(Be,Ye){var tt,nt,ft;const ht=(0,client_core_1._normalizeUser)(Be,Ye),gt=(tt=ht.customIDs)===null||tt===void 0?void 0:tt.stableID;if(gt){const At=(ft=(nt=this.storageProvider).isReadyResolver)===null||ft===void 0?void 0:ft.call(nt);At?At.then(()=>client_core_1.StableID.setOverride(gt,this._sdkKey),()=>client_core_1.StableID.setOverride(gt,this._sdkKey)):client_core_1.StableID.setOverride(gt,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(ht.analyticsOnlyMetadata=Object.assign(Object.assign({},ht.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),ht}_getFeatureGateImpl(Be,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getGate(Be),gt=(0,client_core_1._makeFeatureGate)(Be,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getGateOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Be,(0,client_core_1._createGateExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"gate_evaluation",gate:xt}),xt}_getDynamicConfigImpl(Be,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getConfig(Be),gt=(0,client_core_1._makeDynamicConfig)(Be,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getDynamicConfigOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Be,(0,client_core_1._createConfigExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:xt}),xt}_getExperimentImpl(Be,Ye){var tt,nt,ft,ht;const{result:gt,details:At}=this._store.getConfig(Be),xt=(0,client_core_1._makeExperiment)(Be,At,gt);xt.__evaluation!=null&&(xt.__evaluation.secondary_exposures=(0,client_core_1._mapExposures)((nt=(tt=xt.__evaluation)===null||tt===void 0?void 0:tt.secondary_exposures)!==null&&nt!==void 0?nt:[],this._store.getExposureMapping()));const Et=(ht=(ft=this.overrideAdapter)===null||ft===void 0?void 0:ft.getExperimentOverride)===null||ht===void 0?void 0:ht.call(ft,xt,this._user,Ye),kt=Et??xt;return this._enqueueExposure(Be,(0,client_core_1._createConfigExposure)(this._user,kt,this._store.getExposureMapping()),Ye),this.$emt({name:"experiment_evaluation",experiment:kt}),kt}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(Be,Ye){var tt,nt,ft;const{result:ht,details:gt}=this._store.getLayer(Be),At=(0,client_core_1._makeLayer)(Be,gt,ht),xt=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getLayerOverride)===null||nt===void 0?void 0:nt.call(tt,At,this._user,Ye);Ye!=null&&Ye.disableExposureLog&&this._logger.incrementNonExposureCount(Be);const Et=(0,client_core_1._mergeOverride)(At,xt,(ft=xt==null?void 0:xt.__value)!==null&&ft!==void 0?ft:At.__value,kt=>{Ye!=null&&Ye.disableExposureLog||this._enqueueExposure(Be,(0,client_core_1._createLayerParameterExposure)(this._user,Et,kt,this._store.getExposureMapping()),Ye)});return this.$emt({name:"layer_evaluation",layer:Et}),Et}_getParameterStoreImpl(Be,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getParamStore(Be);this._logger.incrementNonExposureCount(Be);const gt={name:Be,details:ht,__configuration:ft,get:(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,ft,Ye)},At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getParamStoreOverride)===null||nt===void 0?void 0:nt.call(tt,gt,Ye);return At!=null&&(gt.__configuration=At.config,gt.details=At.details,gt.get=(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,At.config,Ye)),gt}}StatsigClient$1.default=StatsigClient,function(Le){var Be=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,gt,At,xt){xt===void 0&&(xt=At);var Et=Object.getOwnPropertyDescriptor(gt,At);(!Et||("get"in Et?!gt.__esModule:Et.writable||Et.configurable))&&(Et={enumerable:!0,get:function(){return gt[At]}}),Object.defineProperty(ht,xt,Et)}:function(ht,gt,At,xt){xt===void 0&&(xt=At),ht[xt]=gt[At]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,gt){for(var At in ht)At!=="default"&&!Object.prototype.hasOwnProperty.call(gt,At)&&Be(gt,ht,At)};Object.defineProperty(Le,"__esModule",{value:!0}),Le.StatsigClient=void 0;const tt=src$1,nt=StatsigClient$1;Le.StatsigClient=nt.default,Ye(src$1,Le);const ft=Object.assign((0,tt._getStatsigGlobal)(),{StatsigClient:nt.default});Le.default=ft}(src$2);const FEATURE_FLAGS=["id_text_barcode_readability","selfie_local_lenses_check_web","id_model_hebrew_back_id","id_face_readability","new_id_capture_ux_least_risky_clients","id_test_aa","id_iou_check","iad_checks","iad_c_checks","new_fingerprint","mp_test_hashed_id","face_occlusion"],GLOBAL_FLAGS=["new_fingerprint"],ID_MODULE_FLAGS=["id_face_readability","id_test_aa","iad_c_checks","mp_test_hashed_id","id_model_hebrew_back_id","id_iou_check","iad_checks","new_id_capture_ux_least_risky_clients","id_text_barcode_readability"],SELFIE_MODULE_FLAGS=["selfie_local_lenses_check_web","face_occlusion"];function getStatsigEnvironment(Le){return isStageK8sEnv(Le)?{tier:"development"}:isStageEnv(Le)||isDemoEnv(Le)?{tier:"staging"}:isSaasEnv(Le)?{tier:"production"}:{tier:"development"}}const clientApiKey="client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc",featureFlagsValues={id_text_barcode_readability:!1,selfie_local_lenses_check_web:!1,id_model_hebrew_back_id:!1,id_face_readability:!1,new_id_capture_ux_least_risky_clients:!1,id_test_aa:!1,iad_checks:!1,iad_c_checks:!1,id_iou_check:!0,new_fingerprint:!1,mp_test_hashed_id:!1,face_occlusion:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise=null;const initialize=async({flowId:Le,apiKey:Be,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(initPromise)return initPromise;initPromise=(async()=>{var gt;const ft={customIDs:{client_api_key:Be,hashed_onboarding_id:Ye,flow_id:Le},custom:{landing_page:(gt=window==null?void 0:window.location)==null?void 0:gt.href}},ht=new src$2.StatsigClient(clientApiKey,ft,{environment:getStatsigEnvironment(tt)});await ht.initializeAsync(),FEATURE_FLAGS.forEach(At=>{if(nt&&clientExperimentIds[At]===nt){featureFlagsValues[At]=!0;return}featureFlagsValues[At]=ht.checkGate(At)})})(),await initPromise},getFeatureFlag=Le=>featureFlagsValues[Le]??!1,getModuleFeatureFlags=async Le=>{const Be={};GLOBAL_FLAGS.forEach(tt=>{Be[tt]=featureFlagsValues[tt]});const Ye=Le.toLowerCase();return Ye.includes("id")||Ye==="government-validation"?ID_MODULE_FLAGS.forEach(tt=>{Be[tt]=featureFlagsValues[tt]}):(Ye.includes("selfie")||Ye==="face")&&SELFIE_MODULE_FLAGS.forEach(tt=>{Be[tt]=featureFlagsValues[tt]}),Be};function IdCaptureParamsConfigurator(Le,Be,Ye,tt){Object.assign(Le,{areaDown:25e3,areaUp:55e3,areaIOSPassportUp:3e4,areaIOSPassportDown:2e4,widthIOSUp:160,widthIOSDown:85,widthDown:tt?110:135,widthUp:205,framesAggregationInterval:tt?3e3:2e3,minFaceIdQualityScore:.62})}function getSelfieFaceDetectionPipelineParams(){return{frameMinX:0,frameMinY:0,frameMaxX:1,frameMaxY:1,brightnessThreshold:50,blurrinessThreshold:50,tiltRotationAngleThreshold:15,minMagicCropSize:200,headwearThreshold:.86,lensesThreshold:.95,closedEyesThreshold:.9,maskThreshold:.85,minFaceQualityScore:.63,isOcclusionCheckEnabled:getFeatureFlag("face_occlusion"),faceOcclusionThreshold:.3}}const getProfiles=()=>[new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_01,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Current Prod - Id Capture Profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_02,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"https://www.notion.so/ML-Update-ID-processing-model-to-accept-more-back-ID-types-18c4c3caef49801e95b4fd6bf9b92883?pvs=4"),new PipelineProfile(WasmPipelineType.IdBarcodeAndTextQualityPipeline,PipelineProfileName.IdCapture_3_02,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Pipeline with text and barcode quality: https://www.notion.so/Web-Use-Text-Barcode-model-2nd-iteration-1bc4c3caef49805aa9e6d308db9fc6dd?pvs=4"),new PipelineProfile(WasmPipelineType.IdVideoSelfiePipeline,PipelineProfileName.IdVideoSelfie_2_01,DetectionType.IdVideoSelfie,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:!0},IdCaptureParamsConfigurator,"Current Prod - Id Videoselfie profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieWithAggregationMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Selfie face detection profile with aggregation metrics"),new PipelineProfile(WasmPipelineType.SelfieWithQualityMetrics,PipelineProfileName.SelfieWithQualityMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Current Prod - Selfie face detection profile with quality metrics"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieVideoSelfie,DetectionType.SelfieVideoSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"VideoSelfie face detection profile")];function getProfile(Le){const Be=getProfiles().find(Ye=>Ye.name===Le);if(!Be)throw new Error(`Profile not found for type: ${Le}`);return Be}const wasmVersion="v2.12.26";function generateBundle(){const Le=getFeatureFlag("id_text_barcode_readability")?PipelineProfileName.IdCapture_3_02:getFeatureFlag("id_model_hebrew_back_id")?PipelineProfileName.IdCapture_2_02:PipelineProfileName.IdCapture_2_01,Be=PipelineProfileName.SelfieWithQualityMetrics,Ye=PipelineProfileName.SelfieVideoSelfie,tt=PipelineProfileName.IdVideoSelfie_2_01;return[Le,tt,Be,Ye]}function getInitializationParams(){const Be=generateBundle(),Ye="https://d3vv997wtl2myz.cloudfront.net/webcamera/onnx-backend-wasm",tt=`${Ye}/${wasmVersion}/webLib.wasm`,nt=`${Ye}/${wasmVersion}/webLibSimd.wasm`,ft=`${Ye}/${wasmVersion}/webLib.js`,ht=`${Ye}/${wasmVersion}/versions.json`;let gt=new Map,At=new Map;for(const xt of Be){const Et=getProfile(xt);if(!Et)throw new Error(`Profile not found: ${xt}`);const kt=Et.modelNames;let Ct=[];for(const yt of kt)Ct.push(`${Ye}/${wasmVersion}/models/${yt}`);gt.set(Et.pipelineType,Ct),At.set(Et.detectionType,Et)}return{wasmModulePath:tt,wasmSimdModulePath:nt,glueCodePath:ft,versionsFilePath:ht,pipelineModels:gt,enableSIMD:!0,profiles:At,wasmVersion}}window.wasmArrayBuffer=null;class MlWasmJSApi{constructor(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.wasmModule=null,this.pipelineApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceDetectionWasmApi=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,this.isInitialized_=!1,this.inspectorOpened_=!1,this.wasmCallMutex=new Mutex,this.Module=null,this.loadModule=async Be=>{this.Module=(await import(Be)).Module}}async initialize(Be,Ye,tt,nt,ft,ht){await this.freeResources(),this.pipelines_=ht,this.versionsFile=ft,await this.loadModule(tt);const gt=await this.loadWasm(nt,Be,Ye);return this.pipelineApiUtilities=new this.wasmModule.PipelineApiUtilities,this.utilityApi=new this.wasmModule.UtilityApi,this.idCaptureWasmApi=new this.wasmModule.IdCaptureApi,this.faceDetectionWasmApi=new this.wasmModule.FaceDetectionApi,this.isInitialized_=!0,gt}static getInstance(){return MlWasmJSApi.instance||(MlWasmJSApi.instance=new MlWasmJSApi),MlWasmJSApi.instance}isInitialized(){return this.pipelineApiUtilities!=null&&this.utilityApi!=null&&this.idCaptureWasmApi!=null&&this.faceDetectionWasmApi!=null&&this.isInitialized_}async allocateImageBuffers(Be,Ye){this.checkWasmInitialization("Unable to allocate image buffers, cpp API hasn't been initialized"),!(Be&&Ye&&Be==this.imageWidth_&&Ye==this.imageHeight_&&this.inputImageBuffer&&Be*Ye*4===this.inputImageBuffer.length)&&(this.imageWidth_=Be,this.imageHeight_=Ye,this.inputImageBuffer=this.pipelineApiUtilities.allocateInputImageBuffer(Be,Ye,4))}async handleDetectionCallAndUpdateState(Be){this.checkWasmInitialization("Unable to update pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.handleDetectionCallAndUpdateState(this.pipelineTypeToWasmEnum(Be))}encryptImage(Be){return this.checkWasmInitialization("Unable to encrypt the image, cpp API hasn't been initialized"),this.utilityApi.encryptImage(Be)}isVirtualCamera(Be){if(this.checkWasmInitialization("Unable to check if the camera is virtual, cpp API hasn't been initialized"),Be)return this.utilityApi.isVirtualCamera(Be)}estimatePerformance(){return this.checkWasmInitialization("Unable to estimate performance, cpp API hasn't been initialized"),this.utilityApi.estimatePerformance()}async analyzeFrame(Be){this.checkWasmInitialization("Unable to analyze the frame, cpp API hasn't been initialized"),await this.allocateImageBuffers(Be.width,Be.height),this.inputImageBuffer.set(Be.data),this.utilityApi.analyzeFrame()}async freeResources(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,window.wasmArrayBuffer=null,this.pipelineApiUtilities&&typeof this.pipelineApiUtilities.delete=="function"&&(this.pipelineApiUtilities.delete(),this.pipelineApiUtilities=null),this.utilityApi&&typeof this.utilityApi.delete=="function"&&(this.utilityApi.delete(),this.utilityApi=null),this.idCaptureWasmApi&&typeof this.idCaptureWasmApi.delete=="function"&&(this.idCaptureWasmApi.delete(),this.idCaptureWasmApi=null),this.faceDetectionWasmApi&&typeof this.faceDetectionWasmApi.delete=="function"&&(this.faceDetectionWasmApi.delete(),this.faceDetectionWasmApi=null),this.wasmModule=null,this.isInitialized_=!1}resetPipeline(Be){this.checkWasmInitialization("Unable to reset pipeline, cpp API hasn't been initialized"),this.pipelineApiUtilities.resetPipeline(this.pipelineTypeToWasmEnum(Be))}resetAllPipelines(){this.checkWasmInitialization("Unable to reset pipelines, cpp API hasn't been initialized");for(const[Be,Ye]of this.pipelines_)this.resetPipeline(Be)}resetOther(){this.checkWasmInitialization("Unable to reset other states, cpp API hasn't been initialized"),this.utilityApi.resetOther()}reset(){this.resetAllPipelines(),this.resetOther()}async process(Be,Ye){if(this.checkWasmInitialization("Unable to process the image, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");switch(this.inputImageBuffer.set(Be.data),Ye){case WasmPipelineType.IdBlurGlarePipeline:case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.idCaptureWasmApi.runIdCapturePipeline(this.pipelineTypeToWasmEnum(Ye));case WasmPipelineType.IdFaceDetectionPipeline:return this.faceDetectionWasmApi.runIdFaceDetectionPipeline();case WasmPipelineType.IdVideoSelfiePipeline:return this.idCaptureWasmApi.runIdVideoSelfiePipeline();case WasmPipelineType.SelfieWithAggregationMetrics:case WasmPipelineType.SelfieWithQualityMetrics:return this.faceDetectionWasmApi.runSelfieFaceDetectionPipeline(this.pipelineTypeToWasmEnum(Ye));default:throw new Error("Unknown pipeline type")}}async runIdCapture(Be){if(this.checkWasmInitialization("Unable to run Id Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Be.data),this.idCaptureWasmApi.runIdCapture()}async runSelfieCapture(Be){if(this.checkWasmInitialization("Unable to run Selfie Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Be.data),this.faceDetectionWasmApi.runSelfieCapture()}async setFacePositionConstraints(Be,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face position constraints, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFacePositionConstraints(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft)}async setFaceDetectionThresholds(Be,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set face detection thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionThresholds(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At)}async setFaceAttributesThresholds(Be,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face attributes thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceAttributesThresholds(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft)}async setFaceChecksEnabled(Be,Ye,tt,nt,ft,ht){this.checkWasmInitialization("Unable to set face checks enabled flags, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceChecksEnabled(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht)}async setFaceDetectionMode(Be,Ye){this.checkWasmInitialization("Unable to set face detection mode, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionMode(this.pipelineTypeToWasmEnum(Be),Ye)}async setFaceDetectionCallbacks(Be,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt,bt,It,wt,Rt,Tt){this.checkWasmInitialization("Unable to set face detection callbacks, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionCallbacks(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt,bt,It,wt,Rt,Tt)}async setIdCaptureThresholds(Be,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt){this.checkWasmInitialization("Unable to set thresholds, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureThresholds(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt)}async setIdCaptureCallbacks(Be,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt){this.checkWasmInitialization("Unable to set callbacks, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureCallbacks(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt)}async setIdCaptureGeometryParams(Be,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt){this.checkWasmInitialization("Unable to set geometry params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureGeometryParams(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt)}async setIdCaptureConfigParams(Be,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set config params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureConfigParams(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At)}setIdCaptureModelType(Be,Ye){this.checkWasmInitialization("Unable to set model type, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureModelType(this.pipelineTypeToWasmEnum(Be),this.IdCaptureModelTypeToWasmEnum(Ye))}IdPerspectiveTransform(Be,Ye){return this.checkWasmInitialization("Unable to perform perspective transform, cpp API hasn't been initialized"),this.idCaptureWasmApi.IdPerspectiveTransform(Be,Ye)}async getVersions(){const Ye=await(await fetch(this.versionsFile)).text();return JSON.parse(Ye)}async loadWasm(Be,Ye,tt){const nt=Be?tt:Ye;try{window.wasmArrayBuffer=await fetch(nt).then(ft=>ft.arrayBuffer()).then(ft=>new Uint8Array(ft)),this.wasmModule=await this.Module()}catch(ft){if(console.log(ft,Be,"useSmd"),Be)return await this.loadWasm(!1,Ye,tt);throw ft}return Be}async loadModels(){var nt;this.checkWasmInitialization("Unable load the models, cpp API hasn't been initialized");let Be=new this.wasmModule.PipelineTypeToIntMap,Ye=new Map,tt=new Map;for(let[ft,ht]of this.pipelines_){let gt=this.pipelineTypeToWasmEnum(ft),At=[],xt=new this.wasmModule.VectorInt;for(let Et of ht){if(!tt.has(Et)){let Ct=await fetch(Et).then(yt=>yt.arrayBuffer()).then(yt=>new Uint8Array(yt));tt.set(Et,Ct)}let kt=tt.get(Et);xt.push_back(kt.byteLength),At.push(kt)}Be.set(gt,xt),Ye.set(gt,At)}this.modelsBuffers=this.pipelineApiUtilities.allocateModelsBuffers(Be);for(let[ft,ht]of Ye){let gt=(nt=this.modelsBuffers)==null?void 0:nt.get(ft);for(let At=0;At<gt.size();At++){let xt=gt==null?void 0:gt.get(At);if(xt)xt.set(ht[At]);else throw new Error("Unable to get model buffer from shared memory!")}}}async initializePipelines(){this.checkWasmInitialization("Unable to initialize pipelines, cpp API hasn't been initialized"),this.modelsBuffers||await this.loadModels(),this.pipelineApiUtilities.initializePipelines()}async setProductionMode(Be){this.checkWasmInitialization("Unable to set production mode, cpp API hasn't been initialized"),this.utilityApi.setProductionMode(Be)}getPipelineState(){return this.checkWasmInitialization("Unable to get pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.getPipelineState()}getCurrentPipeline(){return this.checkWasmInitialization("Unable to get current pipeline, cpp API hasn't been initialized"),this.pipelineTypeFromWasmEnum(this.pipelineApiUtilities.getCurrentPipeline())}setSdkVersion(Be){this.checkWasmInitialization("Unable to set sdk version, cpp API hasn't been initialized"),this.utilityApi.setSdkVersion(Be)}setSdkPlatform(Be){this.checkWasmInitialization("Unable to set device type, cpp API hasn't been initialized"),this.utilityApi.setSdkPlatform(Be)}setDeviceInfo(Be,Ye=!0){this.checkWasmInitialization("Unable to set device info, cpp API hasn't been initialized"),this.utilityApi.setDeviceInfo(Be,Ye)}setBrowserInfo(Be,Ye=!0){this.checkWasmInitialization("Unable to set browser info, cpp API hasn't been initialized"),this.utilityApi.setBrowserInfo(Be,Ye)}setCameraInfo(Be,Ye=!0){this.checkWasmInitialization("Unable to set camera info, cpp API hasn't been initialized"),this.utilityApi.setCameraInfo(Be,Ye)}setZc(Be){this.checkWasmInitialization("Unable to set zc, cpp API hasn't been initialized"),this.utilityApi.setZc(Be)}setMotionStatus(Be){this.checkWasmInitialization("Unable to set motion status, cpp API hasn't been initialized"),this.utilityApi.setMotionStatus(Be)}setMetadataField(Be,Ye){this.checkWasmInitialization("Unable to set metadata field, cpp API hasn't been initialized"),this.utilityApi.setMetadataField(Be,Ye)}setInspectorOpened(Be){this.inspectorOpened_=Be}setBackgroundMode(Be){this.checkWasmInitialization("Unable to set background mode, cpp API hasn't been initialized"),this.utilityApi.setBackgroundMode(Be)}getCheck(){return this.checkWasmInitialization("Unable to get check, cpp API hasn't been initialized"),this.utilityApi.getCheck()}getMetadata(){return this.checkWasmInitialization("Unable to get metadata, cpp API hasn't been initialized"),this.utilityApi.setInspectorOpened(this.inspectorOpened_),this.utilityApi.getMetadata()}async prc(Be){return this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.prc.bind(this.utilityApi),[Be])}async poc(Be){this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.poc.bind(this.utilityApi),[Be])}async pc(Be){this.checkWasmInitialization("Unable to pc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.pc.bind(this.utilityApi),[Be])}pipelineTypeToWasmEnum(Be){switch(Be){case WasmPipelineType.IdBlurGlarePipeline:return this.wasmModule.PipelineType.IdBlurGlarePipeline;case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.wasmModule.PipelineType.IdBarcodeAndTextQualityPipeline;case WasmPipelineType.IdFaceDetectionPipeline:return this.wasmModule.PipelineType.IdFaceDetectionPipeline;case WasmPipelineType.IdVideoSelfiePipeline:return this.wasmModule.PipelineType.IdVideoSelfiePipeline;case WasmPipelineType.SelfieWithAggregationMetrics:return this.wasmModule.PipelineType.SelfieWithAggregationMetrics;case WasmPipelineType.SelfieWithQualityMetrics:return this.wasmModule.PipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}pipelineTypeFromWasmEnum(Be){switch(Be){case this.wasmModule.PipelineType.IdBlurGlarePipeline:return WasmPipelineType.IdBlurGlarePipeline;case this.wasmModule.IdBarcodeAndTextQualityPipeline:return WasmPipelineType.IdBarcodeAndTextQualityPipeline;case this.wasmModule.PipelineType.IdFaceDetectionPipeline:return WasmPipelineType.IdFaceDetectionPipeline;case this.wasmModule.PipelineType.IdVideoSelfiePipeline:return WasmPipelineType.IdVideoSelfiePipeline;case this.wasmModule.PipelineType.SelfieWithAggregationMetrics:return WasmPipelineType.SelfieWithAggregationMetrics;case this.wasmModule.PipelineType.SelfieWithQualityMetrics:return WasmPipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}IdCaptureModelTypeToWasmEnum(Be){switch(Be){case IdCaptureModelType.IdCaptureV1x:return this.wasmModule.IdCaptureModelType.IdCaptureV1x;case IdCaptureModelType.IdCaptureV2x:return this.wasmModule.IdCaptureModelType.IdCaptureV2x;case IdCaptureModelType.IdCaptureV3x:return this.wasmModule.IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}IdCaptureModelTypeFromWasmEnum(Be){switch(Be){case this.wasmModule.IdCaptureModelType.IdCaptureV1x:return IdCaptureModelType.IdCaptureV1x;case this.wasmModule.IdCaptureModelType.IdCaptureV2x:return IdCaptureModelType.IdCaptureV2x;case this.wasmModule.IdCaptureModelType.IdCaptureV3x:return IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}checkWasmInitialization(Be){if(!this.isInitialized())throw new Error(Be)}async wasmCallWrapper(Be,Ye=[]){return await this.wasmCallMutex.withLock(async(...tt)=>{let nt=!1;try{for(;;){if(nt=Be(...tt),nt)return;await new Promise(ft=>setTimeout(ft,0))}}catch(ft){console.log("Error in wasmCallWrapper:",ft)}},...Ye)}}const MlWasmJSApi$1=MlWasmJSApi.getInstance(),version$4="1.85.0-20251106212758.0";function e$2(Le,Be){return function(Ye,tt){return Object.prototype.hasOwnProperty.call(Ye,tt)}(Le,Be)?Le[Be]:void 0}function t$2(Le,Be,Ye,tt){const nt=document,ft="securitypolicyviolation";let ht;const gt=xt=>{const Et=new URL(Le,location.href),{blockedURI:kt}=xt;kt!==Et.href&&kt!==Et.protocol.slice(0,-1)&&kt!==Et.origin||(ht=xt,At())};nt.addEventListener(ft,gt);const At=()=>nt.removeEventListener(ft,gt);return Promise.resolve().then(Be).then(xt=>(At(),xt),xt=>new Promise(Et=>{const kt=new MessageChannel;kt.port1.onmessage=()=>Et(),kt.port2.postMessage(null)}).then(()=>{if(At(),ht)return Ye(ht);throw xt}))}function n$2(Le){let Be="";for(let Ye=0;Ye<Le.length;++Ye)if(Ye>0){const tt=Le[Ye].toLowerCase();tt!==Le[Ye]?Be+=` ${tt}`:Be+=Le[Ye]}else Be+=Le[Ye].toUpperCase();return Be}const r$4={default:"endpoint"},o$1={default:"tlsEndpoint"},i$5="Client timeout",R$2="Network connection error",s$3="Network request aborted",a$3="Response cannot be parsed",c$3="Blocked by CSP",E$1="The endpoint parameter is not a valid URL",l$1="Handle on demand agent data error",u$1=n$2("WrongRegion"),d$1=n$2("SubscriptionNotActive"),_$2=n$2("UnsupportedVersion"),O$1=n$2("InstallationMethodRestricted"),p$1=n$2("HostnameRestricted"),I$1=n$2("IntegrationFailed"),f$2=n$2("NetworkRestricted"),N$1=n$2("InvalidProxyIntegrationSecret"),T$1=n$2("InvalidProxyIntegrationHeaders"),h$e=n$2("ProxyIntegrationSecretEnvironmentMismatch"),v$d="API key required",m$2="API key not found",A$1="API key expired",w$e="Request cannot be parsed",P$1="Request failed",D$1="Request failed to process",S$1="Too many requests, rate limit exceeded",y="Not available for this origin",g$1="Not available with restricted header",L$1=v$d,C$1=m$2,U$1=A$1;var b$2="3.12.3";const M$1="Failed to load the JS script of the agent",K="9319";function V(Le,Be){const Ye=[],[tt,nt]=function(gt){const At=function(kt){const Ct=[...kt];return{current:()=>Ct[0],postpone(){const yt=Ct.shift();yt!==void 0&&Ct.push(yt)},exclude(){Ct.shift()}}}(gt),xt=function(kt,Ct){let yt=0;return()=>Math.random()*Math.min(Ct,kt*Math.pow(2,yt++))}(100,3e3),Et=new Set;return[At.current(),(kt,Ct)=>{let yt;const vt=Ct instanceof Error?Ct.message:"";if(vt===c$3||vt===E$1)At.exclude(),yt=0;else if(vt===K)At.exclude();else if(vt===M$1){const It=Date.now()-kt.getTime()<50,wt=At.current();wt&&It&&!Et.has(wt)&&(Et.add(wt),yt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,yt??kt.getTime()+xt()-Date.now()]}]}(Le);let ft;if(tt===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));const ht=gt=>{const At=new Date,xt=kt=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:kt}),Et=Be(gt);return Et.then(()=>xt(),xt),Et.catch(kt=>{if(ft!=null||(ft=kt),Ye.length>=5)throw ft;const Ct=nt(At,kt);if(!Ct)throw ft;const[yt,vt]=Ct;return(bt=vt,new Promise(It=>setTimeout(It,bt))).then(()=>ht(yt));var bt})};return ht(tt).then(gt=>[gt,Ye])}const k$1="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",G=k$1;function B$1(Le){var Be,Ye;const{picked:tt,rest:nt}=function(Et,kt){const Ct={},yt={};for(const[vt,bt]of Object.entries(Et))kt.includes(vt)?Ct[vt]=bt:yt[vt]=bt;return{picked:Ct,rest:yt}}(Le,["scriptUrlPattern","token","apiKey"]),ft=tt.token,ht=(Be=tt.apiKey)!==null&&Be!==void 0?Be:ft,gt=(Ye=e$2(Le,"scriptUrlPattern"))!==null&&Ye!==void 0?Ye:k$1,[At,xt]=function(){const Et=[],kt=()=>{Et.push({time:new Date,state:document.visibilityState})},Ct=function(yt,vt,bt,It){return yt.addEventListener(vt,bt,It),()=>yt.removeEventListener(vt,bt,It)}(document,"visibilitychange",kt);return kt(),[Et,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$d);const Et=function(kt,Ct){return(Array.isArray(kt)?kt:[kt]).map(yt=>function(vt,bt){const It=encodeURIComponent;return vt.replace(/<[^<>]+>/g,wt=>wt==="<version>"?"3":wt==="<apiKey>"?It(bt):wt==="<loaderVersion>"?It(b$2):wt)}(String(yt),Ct))}(gt,ht);return V(Et,F$1)}).catch(Et=>{throw xt(),function(kt){return kt instanceof Error&&kt.message===K?new Error(M$1):kt}(Et)}).then(([Et,kt])=>(xt(),Et.load({...nt,ldi:{attempts:kt,visibilityStates:At}})))}function F$1(Le){return t$2(Le,()=>function(Be){return new Promise((Ye,tt)=>{if(function(gt){if(URL.prototype)try{return new URL(gt,location.href),!1}catch(At){if(At instanceof Error&&At.name==="TypeError")return!0;throw At}}(Be))throw new Error(E$1);const nt=document.createElement("script"),ft=()=>{var gt;return(gt=nt.parentNode)===null||gt===void 0?void 0:gt.removeChild(nt)},ht=document.head||document.getElementsByTagName("head")[0];nt.onload=()=>{ft(),Ye()},nt.onerror=()=>{ft(),tt(new Error(M$1))},nt.async=!0,nt.src=Be,ht.appendChild(nt)})}(Le),()=>{throw new Error(c$3)}).then(x$1)}function x$1(){const Le=window,Be="__fpjs_p_l_b",Ye=Le[Be];if(function(tt,nt){var ft;const ht=(ft=Object.getOwnPropertyDescriptor)===null||ft===void 0?void 0:ft.call(Object,tt,nt);ht!=null&&ht.configurable?delete tt[nt]:ht&&!ht.writable||(tt[nt]=void 0)}(Le,Be),typeof(Ye==null?void 0:Ye.load)!="function")throw new Error(K);return Ye}var H={load:B$1,defaultScriptUrlPattern:G,ERROR_SCRIPT_LOAD_FAIL:M$1,ERROR_API_KEY_EXPIRED:A$1,ERROR_API_KEY_INVALID:m$2,ERROR_API_KEY_MISSING:v$d,ERROR_BAD_REQUEST_FORMAT:w$e,ERROR_BAD_RESPONSE_FORMAT:a$3,ERROR_CLIENT_TIMEOUT:i$5,ERROR_CSP_BLOCK:c$3,ERROR_FORBIDDEN_ENDPOINT:p$1,ERROR_FORBIDDEN_HEADER:g$1,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:P$1,ERROR_HANDLE_AGENT_DATA:l$1,ERROR_INSTALLATION_METHOD_RESTRICTED:O$1,ERROR_INTEGRATION_FAILURE:I$1,ERROR_INVALID_ENDPOINT:E$1,ERROR_INVALID_PROXY_INTEGRATION_HEADERS:T$1,ERROR_INVALID_PROXY_INTEGRATION_SECRET:N$1,ERROR_NETWORK_ABORT:s$3,ERROR_NETWORK_CONNECTION:R$2,ERROR_NETWORK_RESTRICTED:f$2,ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:h$e,ERROR_RATE_LIMIT:S$1,ERROR_SERVER_TIMEOUT:D$1,ERROR_SUBSCRIPTION_NOT_ACTIVE:d$1,ERROR_TOKEN_EXPIRED:U$1,ERROR_TOKEN_INVALID:C$1,ERROR_TOKEN_MISSING:L$1,ERROR_UNSUPPORTED_VERSION:_$2,ERROR_WRONG_REGION:u$1,defaultEndpoint:r$4,defaultTlsEndpoint:o$1};function e$1(Le,Be,Ye,tt){return new(Ye||(Ye=Promise))(function(nt,ft){function ht(xt){try{At(tt.next(xt))}catch(Et){ft(Et)}}function gt(xt){try{At(tt.throw(xt))}catch(Et){ft(Et)}}function At(xt){var Et;xt.done?nt(xt.value):(Et=xt.value,Et instanceof Ye?Et:new Ye(function(kt){kt(Et)})).then(ht,gt)}At((tt=tt.apply(Le,[])).next())})}function n$1(Le,Be){var Ye,tt,nt,ft,ht={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return ft={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function gt(At){return function(xt){return function(Et){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,Et[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&Et[0]?tt.return:Et[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,Et[1])).done)return nt;switch(tt=0,nt&&(Et=[2&Et[0],nt.value]),Et[0]){case 0:case 1:nt=Et;break;case 4:return ht.label++,{value:Et[1],done:!1};case 5:ht.label++,tt=Et[1],Et=[0];continue;case 7:Et=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||Et[0]!==6&&Et[0]!==2)){ht=0;continue}if(Et[0]===3&&(!nt||Et[1]>nt[0]&&Et[1]<nt[3])){ht.label=Et[1];break}if(Et[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=Et;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(Et);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}Et=Be.call(Le,ht)}catch(kt){Et=[6,kt],tt=0}finally{Ye=nt=0}if(5&Et[0])throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}([At,xt])}}}typeof SuppressedError=="function"&&SuppressedError;var r$3={exclude:[],include:[],logging:!0,timeout:1e3},o={},a$2={timeout:"true"},i$4=function(Le,Be){typeof window<"u"&&(o[Le]=Be)},u=function(){return Object.fromEntries(Object.entries(o).filter(function(Le){var Be,Ye=Le[0];return!(!((Be=r$3==null?void 0:r$3.exclude)===null||Be===void 0)&&Be.includes(Ye))}).filter(function(Le){var Be,Ye,tt,nt,ft=Le[0];return!((Be=r$3==null?void 0:r$3.include)===null||Be===void 0)&&Be.some(function(ht){return ht.includes(".")})?(Ye=r$3==null?void 0:r$3.include)===null||Ye===void 0?void 0:Ye.some(function(ht){return ht.startsWith(ft)}):((tt=r$3==null?void 0:r$3.include)===null||tt===void 0?void 0:tt.length)===0||((nt=r$3==null?void 0:r$3.include)===null||nt===void 0?void 0:nt.includes(ft))}).map(function(Le){return[Le[0],(0,Le[1])()]}))};function c$2(Le){return Le^=Le>>>16,Le=Math.imul(Le,2246822507),Le^=Le>>>13,Le=Math.imul(Le,3266489909),(Le^=Le>>>16)>>>0}var s$2=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(Le,Be){return Le<<Be|Le>>>32-Be}function d(Le,Be){var Ye;if(Be===void 0&&(Be=0),Be=Be?0|Be:0,typeof Le=="string"&&(Ye=Le,Le=new TextEncoder().encode(Ye).buffer),!(Le instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var tt=new Uint32Array([Be,Be,Be,Be]);(function(ft,ht){for(var gt=ft.byteLength/16|0,At=new Uint32Array(ft,0,4*gt),xt=0;xt<gt;xt++){var Et=At.subarray(4*xt,4*(xt+1));Et[0]=Math.imul(Et[0],s$2[0]),Et[0]=l(Et[0],15),Et[0]=Math.imul(Et[0],s$2[1]),ht[0]=ht[0]^Et[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,Et[1]=Math.imul(Et[1],s$2[1]),Et[1]=l(Et[1],16),Et[1]=Math.imul(Et[1],s$2[2]),ht[1]=ht[1]^Et[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,Et[2]=Math.imul(Et[2],s$2[2]),Et[2]=l(Et[2],17),Et[2]=Math.imul(Et[2],s$2[3]),ht[2]=ht[2]^Et[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,Et[3]=Math.imul(Et[3],s$2[3]),Et[3]=l(Et[3],18),Et[3]=Math.imul(Et[3],s$2[0]),ht[3]=ht[3]^Et[3],ht[3]=l(ht[3],13),ht[3]=ht[3]+ht[0],ht[3]=Math.imul(ht[3],5)+850148119}})(Le,tt),function(ft,ht){var gt=ft.byteLength/16|0,At=ft.byteLength%16,xt=new Uint32Array(4),Et=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^Et[14]<<16;case 14:xt[3]=xt[3]^Et[13]<<8;case 13:xt[3]=xt[3]^Et[12],xt[3]=Math.imul(xt[3],s$2[3]),xt[3]=l(xt[3],18),xt[3]=Math.imul(xt[3],s$2[0]),ht[3]=ht[3]^xt[3];case 12:xt[2]=xt[2]^Et[11]<<24;case 11:xt[2]=xt[2]^Et[10]<<16;case 10:xt[2]=xt[2]^Et[9]<<8;case 9:xt[2]=xt[2]^Et[8],xt[2]=Math.imul(xt[2],s$2[2]),xt[2]=l(xt[2],17),xt[2]=Math.imul(xt[2],s$2[3]),ht[2]=ht[2]^xt[2];case 8:xt[1]=xt[1]^Et[7]<<24;case 7:xt[1]=xt[1]^Et[6]<<16;case 6:xt[1]=xt[1]^Et[5]<<8;case 5:xt[1]=xt[1]^Et[4],xt[1]=Math.imul(xt[1],s$2[1]),xt[1]=l(xt[1],16),xt[1]=Math.imul(xt[1],s$2[2]),ht[1]=ht[1]^xt[1];case 4:xt[0]=xt[0]^Et[3]<<24;case 3:xt[0]=xt[0]^Et[2]<<16;case 2:xt[0]=xt[0]^Et[1]<<8;case 1:xt[0]=xt[0]^Et[0],xt[0]=Math.imul(xt[0],s$2[0]),xt[0]=l(xt[0],15),xt[0]=Math.imul(xt[0],s$2[1]),ht[0]=ht[0]^xt[0]}}(Le,tt),function(ft,ht){ht[0]=ht[0]^ft.byteLength,ht[1]=ht[1]^ft.byteLength,ht[2]=ht[2]^ft.byteLength,ht[3]=ht[3]^ft.byteLength,ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0,ht[0]=c$2(ht[0]),ht[1]=c$2(ht[1]),ht[2]=c$2(ht[2]),ht[3]=c$2(ht[3]),ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0}(Le,tt);var nt=new Uint8Array(tt.buffer);return Array.from(nt).map(function(ft){return ft.toString(16).padStart(2,"0")}).join("")}function f$1(Le,Be){return new Promise(function(Ye){setTimeout(function(){return Ye(Be)},Le)})}function m$1(Le,Be,Ye){return Promise.all(Le.map(function(tt){return Promise.race([tt,f$1(Be,Ye)])}))}function g(){return e$1(this,void 0,void 0,function(){var Le,Be,Ye,tt,nt;return n$1(this,function(ft){switch(ft.label){case 0:return ft.trys.push([0,2,,3]),Le=u(),Be=Object.keys(Le),[4,m$1(Object.values(Le),(r$3==null?void 0:r$3.timeout)||1e3,a$2)];case 1:return Ye=ft.sent(),tt=Ye.filter(function(ht){return ht!==void 0}),nt={},tt.forEach(function(ht,gt){nt[Be[gt]]=ht}),[2,p(nt,r$3.exclude||[],r$3.include||[],"")];case 2:throw ft.sent();case 3:return[2]}})})}function p(Le,Be,Ye,tt){tt===void 0&&(tt="");for(var nt={},ft=function(xt,Et){var kt=tt+xt+".";if(typeof Et!="object"||Array.isArray(Et)){var Ct=Be.some(function(bt){return kt.startsWith(bt)}),yt=Ye.some(function(bt){return kt.startsWith(bt)});Ct&&!yt||(nt[xt]=Et)}else{var vt=p(Et,Be,Ye,kt);Object.keys(vt).length>0&&(nt[xt]=vt)}},ht=0,gt=Object.entries(Le);ht<gt.length;ht++){var At=gt[ht];ft(At[0],At[1])}return nt}function w$d(Le){return e$1(this,void 0,void 0,function(){var Be,Ye;return n$1(this,function(tt){switch(tt.label){case 0:return tt.trys.push([0,2,,3]),[4,g()];case 1:return Be=tt.sent(),Ye=d(JSON.stringify(Be)),Math.random()<1e-5&&r$3.logging&&function(nt,ft){e$1(this,void 0,void 0,function(){var ht,gt;return n$1(this,function(At){switch(At.label){case 0:if(ht="https://logging.thumbmarkjs.com/v1/log",gt={thumbmark:nt,components:ft,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),At.label=1;case 1:return At.trys.push([1,3,,4]),[4,fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)})];case 2:case 3:return At.sent(),[3,4];case 4:return[2]}})})}(Ye,Be),[2,Ye.toString()];case 2:throw tt.sent();case 3:return[2]}})})}function b$1(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var Le=navigator.userAgent,Be={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},Ye=0,tt=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/];Ye<tt.length;Ye++){var nt=tt[Ye],ft=Le.match(nt);if(ft&&ft.groups)return{name:Be[ft.groups.name.toLowerCase()]||ft.groups.name,version:ft.groups.version}}return{name:"unknown",version:"unknown"}}function S(Le){for(var Be=0,Ye=0;Ye<Le.length;++Ye)Be+=Math.abs(Le[Ye]);return Be}var M=b$1();function E(Le,Be,Ye){for(var tt=[],nt=0;nt<Le[0].data.length;nt++){for(var ft=[],ht=0;ht<Le.length;ht++)ft.push(Le[ht].data[nt]);tt.push(P(ft))}var gt=new Uint8ClampedArray(tt);return new ImageData(gt,Be,Ye)}function P(Le){if(Le.length===0)return 0;for(var Be={},Ye=0,tt=Le;Ye<tt.length;Ye++)Be[ft=tt[Ye]]=(Be[ft]||0)+1;var nt=Le[0];for(var ft in Be)Be[ft]>Be[nt]&&(nt=parseInt(ft,10));return nt}["SamsungBrowser","Safari"].includes(M.name)||i$4("audio",function(){return e$1(this,void 0,void 0,function(){return n$1(this,function(Le){return[2,new Promise(function(Be,Ye){try{var tt=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),nt=tt.createBufferSource(),ft=tt.createOscillator();ft.frequency.value=1e3;var ht,gt=tt.createDynamicsCompressor();gt.threshold.value=-50,gt.knee.value=40,gt.ratio.value=12,gt.attack.value=0,gt.release.value=.2,ft.connect(gt),gt.connect(tt.destination),ft.start(),tt.oncomplete=function(At){ht=At.renderedBuffer.getChannelData(0),Be({sampleHash:S(ht),oscillator:ft.type,maxChannels:tt.destination.maxChannelCount,channelCountMode:nt.channelCountMode})},tt.startRendering()}catch(At){console.error("Error creating audio fingerprint:",At),Ye(At)}})]})})});var A=b$1(),C=A.name.toLowerCase(),x=A.version.split(".")[0]||"0",T=parseInt(x,10);C==="firefox"||C==="safari"&&T===17||i$4("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(Le){var Be=Array.from({length:3},function(){return function(){var Ye=document.createElement("canvas"),tt=Ye.getContext("2d");if(!tt)return new ImageData(1,1);Ye.width=280,Ye.height=20;var nt=tt.createLinearGradient(0,0,Ye.width,Ye.height);nt.addColorStop(0,"red"),nt.addColorStop(.16666666666666666,"orange"),nt.addColorStop(.3333333333333333,"yellow"),nt.addColorStop(.5,"green"),nt.addColorStop(.6666666666666666,"blue"),nt.addColorStop(.8333333333333334,"indigo"),nt.addColorStop(1,"violet"),tt.fillStyle=nt,tt.fillRect(0,0,Ye.width,Ye.height);var ft="Random Text WMwmil10Oo";return tt.font="23.123px Arial",tt.fillStyle="black",tt.fillText(ft,-5,15),tt.fillStyle="rgba(0, 0, 255, 0.5)",tt.fillText(ft,-3.3,17.7),tt.beginPath(),tt.moveTo(0,0),tt.lineTo(2*Ye.width/7,Ye.height),tt.strokeStyle="white",tt.lineWidth=2,tt.stroke(),tt.getImageData(0,0,Ye.width,Ye.height)}()});Le({commonImageDataHash:d(E(Be,280,20).data.toString()).toString()})})});var k,I=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],R$1=["monospace","sans-serif","serif"];function L(Le,Be){if(!Le)throw new Error("Canvas context not supported");return Le.font,Le.font="72px ".concat(Be),Le.measureText("WwMmLli0Oo").width}function _$1(){var Le,Be=document.createElement("canvas"),Ye=(Le=Be.getContext("webgl"))!==null&&Le!==void 0?Le:Be.getContext("experimental-webgl");if(Ye&&"getParameter"in Ye)try{var tt=(Ye.getParameter(Ye.VENDOR)||"").toString(),nt=(Ye.getParameter(Ye.RENDERER)||"").toString(),ft={vendor:tt,renderer:nt,version:(Ye.getParameter(Ye.VERSION)||"").toString(),shadingLanguageVersion:(Ye.getParameter(Ye.SHADING_LANGUAGE_VERSION)||"").toString()};if(!nt.length||!tt.length){var ht=Ye.getExtension("WEBGL_debug_renderer_info");if(ht){var gt=(Ye.getParameter(ht.UNMASKED_VENDOR_WEBGL)||"").toString(),At=(Ye.getParameter(ht.UNMASKED_RENDERER_WEBGL)||"").toString();gt&&(ft.vendorUnmasked=gt),At&&(ft.rendererUnmasked=At)}}return ft}catch{}return"undefined"}function O(){var Le=new Float32Array(1),Be=new Uint8Array(Le.buffer);return Le[0]=1/0,Le[0]=Le[0]-Le[0],Be[3]}function B(Le,Be){var Ye={};return Be.forEach(function(tt){var nt=function(ft){if(ft.length===0)return null;var ht={};ft.forEach(function(xt){var Et=String(xt);ht[Et]=(ht[Et]||0)+1});var gt=ft[0],At=1;return Object.keys(ht).forEach(function(xt){ht[xt]>At&&(gt=xt,At=ht[xt])}),gt}(Le.map(function(ft){return tt in ft?ft[tt]:void 0}).filter(function(ft){return ft!==void 0}));nt&&(Ye[tt]=nt)}),Ye}function D(){var Le=[],Be={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(Be).forEach(function(Ye){Be[Ye].forEach(function(tt){matchMedia("(".concat(Ye,": ").concat(tt,")")).matches&&Le.push("".concat(Ye,": ").concat(tt))})}),Le}b$1().name!="Firefox"&&i$4("fonts",function(){var Le=this;return new Promise(function(Be,Ye){try{(function(tt){var nt;e$1(this,void 0,void 0,function(){var ft,ht,gt;return n$1(this,function(At){switch(At.label){case 0:return document.body?[3,2]:[4,(xt=50,new Promise(function(kt){return setTimeout(kt,xt,Et)}))];case 1:return At.sent(),[3,0];case 2:if((ft=document.createElement("iframe")).setAttribute("frameBorder","0"),(ht=ft.style).setProperty("position","fixed"),ht.setProperty("display","block","important"),ht.setProperty("visibility","visible"),ht.setProperty("border","0"),ht.setProperty("opacity","0"),ft.src="about:blank",document.body.appendChild(ft),!(gt=ft.contentDocument||((nt=ft.contentWindow)===null||nt===void 0?void 0:nt.document)))throw new Error("Iframe document is not accessible");return tt({iframe:gt}),setTimeout(function(){document.body.removeChild(ft)},0),[2]}var xt,Et})})})(function(tt){var nt=tt.iframe;return e$1(Le,void 0,void 0,function(){var ft,ht,gt,At;return n$1(this,function(xt){return ft=nt.createElement("canvas"),ht=ft.getContext("2d"),gt=R$1.map(function(Et){return L(ht,Et)}),At={},I.forEach(function(Et){var kt=L(ht,Et);gt.includes(kt)||(At[Et]=kt)}),Be(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$4("hardware",function(){return new Promise(function(Le,Be){var Ye=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,tt=window.performance&&window.performance.memory?window.performance.memory:0;Le({videocard:_$1(),architecture:O(),deviceMemory:Ye.toString()||"undefined",jsHeapSizeLimit:tt.jsHeapSizeLimit||0})})}),i$4("locales",function(){return new Promise(function(Le){Le({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$4("permissions",function(){return e$1(this,void 0,void 0,function(){var Le;return n$1(this,function(Be){return k=(r$3==null?void 0:r$3.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],b$1().name.toLowerCase()==="safari"&&(k=k.filter(function(Ye){return!["camera","geolocation","microphone"].includes(Ye)})),Le=Array.from({length:(r$3==null?void 0:r$3.retries)||3},function(){return function(){return e$1(this,void 0,void 0,function(){var Ye,tt,nt,ft,ht;return n$1(this,function(gt){switch(gt.label){case 0:Ye={},tt=0,nt=k,gt.label=1;case 1:if(!(tt<nt.length))return[3,6];ft=nt[tt],gt.label=2;case 2:return gt.trys.push([2,4,,5]),[4,navigator.permissions.query({name:ft})];case 3:return ht=gt.sent(),Ye[ft]=ht.state.toString(),[3,5];case 4:return gt.sent(),[3,5];case 5:return tt++,[3,1];case 6:return[2,Ye]}})})}()}),[2,Promise.all(Le).then(function(Ye){return B(Ye,k)})]})})}),i$4("plugins",function(){var Le=[];if(navigator.plugins)for(var Be=0;Be<navigator.plugins.length;Be++){var Ye=navigator.plugins[Be];Le.push([Ye.name,Ye.filename,Ye.description].join("|"))}return new Promise(function(tt){tt({plugins:Le})})}),i$4("screen",function(){return new Promise(function(Le){Le({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$4("system",function(){return new Promise(function(Le){var Be=b$1(),Ye={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:Be.name,version:Be.version}};Be.name.toLowerCase()!=="safari"&&(Ye.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var tt=window.ApplePaySession.supportsVersion,nt=15;nt>0;nt--)if(tt(nt))return nt}catch{return 0}return 0}(),Ye.cookieEnabled=window.navigator.cookieEnabled),Le(Ye)})});var U,N=b$1().name!=="SamsungBrowser"?1:3,F=null;i$4("webgl",function(){return e$1(this,void 0,void 0,function(){var Le;return n$1(this,function(Be){typeof document<"u"&&((U=document.createElement("canvas")).width=200,U.height=100,F=U.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return Le=Array.from({length:N},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var Ye=`
|
|
66
|
+
`;typeof Promise.withResolvers!="function"&&(Promise.withResolvers=()=>{let Le,Be;return{promise:new Promise((tt,nt)=>{Le=tt,Be=nt}),resolve:Le,reject:Be}});class InterruptionHandler{constructor(){this.boundVisibilityChange=this.handleVisibilityChange.bind(this),this.boundOnline=this.handleOnline.bind(this),this.boundOffline=this.handleOffline.bind(this),this.boundUnhandledRejection=this.handleUnhandledRejection.bind(this),this.boundError=this.handleError.bind(this),this.initialized=!1}registerEventListeners(){this.initialized||(document.addEventListener("visibilitychange",this.boundVisibilityChange),window.addEventListener("online",this.boundOnline),window.addEventListener("offline",this.boundOffline),window.addEventListener("unhandledrejection",this.boundUnhandledRejection),window.addEventListener("error",this.boundError),this.initialized=!0)}removeEventListeners(){this.initialized&&(this.initialized=!1,document.removeEventListener("visibilitychange",this.boundVisibilityChange),window.removeEventListener("online",this.boundOnline),window.removeEventListener("offline",this.boundOffline),window.removeEventListener("unhandledrejection",this.boundUnhandledRejection),window.removeEventListener("error",this.boundError))}handleVisibilityChange(){document.hidden?this.onAppHidden():this.onAppVisible()}onAppHidden(){}onAppVisible(){}handleOnline(){}handleOffline(){}handleUnhandledRejection(Be){}handleError(Be){}}const regex$1={CURP_PATTERN:/^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/,EMAIL_PATTERN:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,SSN_PATTERN:/^\d{3}-?\d{2}-?\d{4}$/};function webgl(){let Le,Be,Ye=256,tt=128;Le=document.body.appendChild(document.createElement("canvas")),Le.width=Ye,Le.height=tt;try{Be=Le.getContext("webgl2")||Le.getContext("experimental-webgl2")||Le.getContext("webgl")||Le.getContext("experimental-webgl")||Le.getContext("moz-webgl");const nt="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",ft="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",ht=Be.createBuffer();Be.bindBuffer(Be.ARRAY_BUFFER,ht);const gt=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.7321,0]);Be.bufferData(Be.ARRAY_BUFFER,gt,Be.STATIC_DRAW),ht.itemSize=3,ht.numItems=3;const At=Be.createProgram(),xt=Be.createShader(Be.VERTEX_SHADER);Be.shaderSource(xt,nt),Be.compileShader(xt);const Et=Be.createShader(Be.FRAGMENT_SHADER);Be.shaderSource(Et,ft),Be.compileShader(Et),Be.attachShader(At,xt),Be.attachShader(At,Et),Be.linkProgram(At),Be.useProgram(At),At.vertexPosAttrib=Be.getAttribLocation(At,"attrVertex"),At.offsetUniform=Be.getUniformLocation(At,"uniformOffset"),Be.enableVertexAttribArray(At.vertexPosAttrib),Be.vertexAttribPointer(At.vertexPosAttrib,ht.itemSize,Be.FLOAT,!1,0,0),Be.uniform2f(At.offsetUniform,1,1),Be.drawArrays(Be.TRIANGLE_STRIP,0,ht.numItems);let kt="";const Ct=new Uint8Array(Ye*tt*4);return Be.readPixels(0,0,Ye,tt,Be.RGBA,Be.UNSIGNED_BYTE,Ct),kt=JSON.stringify(Ct).replace(/,?"[0-9]+":/g,""),document.body.removeChild(Le),sha256(kt)}catch{return""}}const sha256=(()=>{let Le=1,Be,Ye=[],tt=[];for(;++Le<18;)for(Be=Le*Le;Be<312;Be+=Le)Ye[Be]=1;function nt(gt,At){return Math.pow(gt,1/At)%1*4294967296|0}for(Le=1,Be=0;Le<313;)Ye[++Le]||(tt[Be]=nt(Le,2),Ye[Be++]=nt(Le,3));function ft(gt,At){return gt>>>At|gt<<32-At}function ht(gt){let At=tt.slice(Le=0),xt=unescape(encodeURI(gt)),Et=[],kt=xt.length,Ct=[],yt,vt,bt;for(;Le<kt;)Ct[Le>>2]|=(xt.charCodeAt(Le)&255)<<8*(3-Le++%4);for(kt*=8,Ct[kt>>5]|=128<<24-kt%32,Ct[bt=kt+64>>5|15]=kt,Le=0;Le<bt;Le+=16){for(yt=At.slice(Be=0,8);Be<64;yt[4]+=vt)Be<16?Et[Be]=Ct[Be+Le]:Et[Be]=(ft(vt=Et[Be-2],17)^ft(vt,19)^vt>>>10)+(Et[Be-7]|0)+(ft(vt=Et[Be-15],7)^ft(vt,18)^vt>>>3)+(Et[Be-16]|0),yt.unshift((vt=(yt.pop()+(ft(gt=yt[4],6)^ft(gt,11)^ft(gt,25))+((gt&yt[5]^~gt&yt[6])+Ye[Be])|0)+(Et[Be++]|0))+(ft(kt=yt[0],2)^ft(kt,13)^ft(kt,22))+(kt&yt[1]^yt[1]&yt[2]^yt[2]&kt));for(Be=8;Be--;)At[Be]=yt[Be]+At[Be]}for(xt="";Be<63;)xt+=(At[++Be>>3]>>4*(7-Be%8)&15).toString(16);return xt}return ht})();var store;function getGlobalConfig(Le){return{lang:store==null?void 0:store.lang,message:Le==null?void 0:Le.message,abortEarly:store==null?void 0:store.abortEarly,abortPipeEarly:store==null?void 0:store.abortPipeEarly}}var store2;function getGlobalMessage(Le){return store2==null?void 0:store2.get(Le)}var store3;function getSchemaMessage(Le){return store3==null?void 0:store3.get(Le)}var store4;function getSpecificMessage(Le,Be){var Ye;return(Ye=store4==null?void 0:store4.get(Le))==null?void 0:Ye.get(Be)}function _stringify$3(Le){var Ye,tt;const Be=typeof Le;return Be==="string"?`"${Le}"`:Be==="number"||Be==="bigint"||Be==="boolean"?`${Le}`:Be==="object"||Be==="function"?(Le&&((tt=(Ye=Object.getPrototypeOf(Le))==null?void 0:Ye.constructor)==null?void 0:tt.name))??"null":Be}function _addIssue(Le,Be,Ye,tt,nt){const ft=nt&&"input"in nt?nt.input:Ye.value,ht=(nt==null?void 0:nt.expected)??Le.expects??null,gt=(nt==null?void 0:nt.received)??_stringify$3(ft),At={kind:Le.kind,type:Le.type,input:ft,expected:ht,received:gt,message:`Invalid ${Be}: ${ht?`Expected ${ht} but r`:"R"}eceived ${gt}`,requirement:Le.requirement,path:nt==null?void 0:nt.path,issues:nt==null?void 0:nt.issues,lang:tt.lang,abortEarly:tt.abortEarly,abortPipeEarly:tt.abortPipeEarly},xt=Le.kind==="schema",Et=(nt==null?void 0:nt.message)??Le.message??getSpecificMessage(Le.reference,At.lang)??(xt?getSchemaMessage(At.lang):null)??tt.message??getGlobalMessage(At.lang);Et!==void 0&&(At.message=typeof Et=="function"?Et(At):Et),xt&&(Ye.typed=!1),Ye.issues?Ye.issues.push(At):Ye.issues=[At]}function _getStandardProps(Le){return{version:1,vendor:"valibot",validate(Be){return Le["~run"]({value:Be},getGlobalConfig())}}}function _isValidObjectKey(Le,Be){return Object.hasOwn(Le,Be)&&Be!=="__proto__"&&Be!=="prototype"&&Be!=="constructor"}function _joinExpects(Le,Be){const Ye=[...new Set(Le)];return Ye.length>1?`(${Ye.join(` ${Be} `)})`:Ye[0]??"never"}function isValiError(Le){return Le instanceof ValiError}var ValiError=class extends Error{constructor(Le){super(Le[0].message),this.name="ValiError",this.issues=Le}};function getFallback(Le,Be,Ye){return typeof Le.fallback=="function"?Le.fallback(Be,Ye):Le.fallback}function getDefault(Le,Be,Ye){return typeof Le.default=="function"?Le.default(Be,Ye):Le.default}function boolean$2(Le){return{kind:"schema",type:"boolean",reference:boolean$2,expects:"boolean",async:!1,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Be,Ye){return typeof Be.value=="boolean"?Be.typed=!0:_addIssue(this,"type",Be,Ye),Be}}}function custom(Le,Be){return{kind:"schema",type:"custom",reference:custom,expects:"unknown",async:!1,check:Le,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return this.check(Ye.value)?Ye.typed=!0:_addIssue(this,"type",Ye,tt),Ye}}}function function_(Le){return{kind:"schema",type:"function",reference:function_,expects:"Function",async:!1,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Be,Ye){return typeof Be.value=="function"?Be.typed=!0:_addIssue(this,"type",Be,Ye),Be}}}function literal(Le,Be){return{kind:"schema",type:"literal",reference:literal,expects:_stringify$3(Le),async:!1,literal:Le,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===this.literal?Ye.typed=!0:_addIssue(this,"type",Ye,tt),Ye}}}function null_(Le){return{kind:"schema",type:"null",reference:null_,expects:"null",async:!1,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Be,Ye){return Be.value===null?Be.typed=!0:_addIssue(this,"type",Be,Ye),Be}}}function number$3(Le){return{kind:"schema",type:"number",reference:number$3,expects:"number",async:!1,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Be,Ye){return typeof Be.value=="number"&&!isNaN(Be.value)?Be.typed=!0:_addIssue(this,"type",Be,Ye),Be}}}function object(Le,Be){return{kind:"schema",type:"object",reference:object,expects:"Object",async:!1,entries:Le,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){var ft;const nt=Ye.value;if(nt&&typeof nt=="object"){Ye.typed=!0,Ye.value={};for(const ht in this.entries){const gt=this.entries[ht];if(ht in nt||(gt.type==="exact_optional"||gt.type==="optional"||gt.type==="nullish")&>.default!==void 0){const At=ht in nt?nt[ht]:getDefault(gt),xt=gt["~run"]({value:At},tt);if(xt.issues){const Et={type:"object",origin:"value",input:nt,key:ht,value:At};for(const kt of xt.issues)kt.path?kt.path.unshift(Et):kt.path=[Et],(ft=Ye.issues)==null||ft.push(kt);if(Ye.issues||(Ye.issues=xt.issues),tt.abortEarly){Ye.typed=!1;break}}xt.typed||(Ye.typed=!1),Ye.value[ht]=xt.value}else if(gt.fallback!==void 0)Ye.value[ht]=getFallback(gt);else if(gt.type!=="exact_optional"&>.type!=="optional"&>.type!=="nullish"&&(_addIssue(this,"key",Ye,tt,{input:void 0,expected:`"${ht}"`,path:[{type:"object",origin:"key",input:nt,key:ht,value:nt[ht]}]}),tt.abortEarly))break}}else _addIssue(this,"type",Ye,tt);return Ye}}}function optional(Le,Be){return{kind:"schema",type:"optional",reference:optional,expects:`(${Le.expects} | undefined)`,async:!1,wrapped:Le,default:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===void 0&&(this.default!==void 0&&(Ye.value=getDefault(this,Ye,tt)),Ye.value===void 0)?(Ye.typed=!0,Ye):this.wrapped["~run"](Ye,tt)}}}function record(Le,Be,Ye){return{kind:"schema",type:"record",reference:record,expects:"Object",async:!1,key:Le,value:Be,message:Ye,get"~standard"(){return _getStandardProps(this)},"~run"(tt,nt){var ht,gt;const ft=tt.value;if(ft&&typeof ft=="object"){tt.typed=!0,tt.value={};for(const At in ft)if(_isValidObjectKey(ft,At)){const xt=ft[At],Et=this.key["~run"]({value:At},nt);if(Et.issues){const Ct={type:"object",origin:"key",input:ft,key:At,value:xt};for(const yt of Et.issues)yt.path=[Ct],(ht=tt.issues)==null||ht.push(yt);if(tt.issues||(tt.issues=Et.issues),nt.abortEarly){tt.typed=!1;break}}const kt=this.value["~run"]({value:xt},nt);if(kt.issues){const Ct={type:"object",origin:"value",input:ft,key:At,value:xt};for(const yt of kt.issues)yt.path?yt.path.unshift(Ct):yt.path=[Ct],(gt=tt.issues)==null||gt.push(yt);if(tt.issues||(tt.issues=kt.issues),nt.abortEarly){tt.typed=!1;break}}(!Et.typed||!kt.typed)&&(tt.typed=!1),Et.typed&&(tt.value[Et.value]=kt.value)}}else _addIssue(this,"type",tt,nt);return tt}}}function string$2(Le){return{kind:"schema",type:"string",reference:string$2,expects:"string",async:!1,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Be,Ye){return typeof Be.value=="string"?Be.typed=!0:_addIssue(this,"type",Be,Ye),Be}}}function _subIssues(Le){let Be;if(Le)for(const Ye of Le)Be?Be.push(...Ye.issues):Be=Ye.issues;return Be}function union(Le,Be){return{kind:"schema",type:"union",reference:union,expects:_joinExpects(Le.map(Ye=>Ye.expects),"|"),async:!1,options:Le,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){let nt,ft,ht;for(const gt of this.options){const At=gt["~run"]({value:Ye.value},tt);if(At.typed)if(At.issues)ft?ft.push(At):ft=[At];else{nt=At;break}else ht?ht.push(At):ht=[At]}if(nt)return nt;if(ft){if(ft.length===1)return ft[0];_addIssue(this,"type",Ye,tt,{issues:_subIssues(ft)}),Ye.typed=!0}else{if((ht==null?void 0:ht.length)===1)return ht[0];_addIssue(this,"type",Ye,tt,{issues:_subIssues(ht)})}return Ye}}}function parse$8(Le,Be,Ye){const tt=Le["~run"]({value:Be},getGlobalConfig(Ye));if(tt.issues)throw new ValiError(tt.issues);return tt.value}function validate$2(...Le){try{Le.forEach(({schema:Be,value:Ye})=>parse$8(Be,Ye))}catch(Be){if(isValiError(Be)){const Ye=Be.issues.map(tt=>{var ft;return`${((ft=tt.path)==null?void 0:ft.map(ht=>ht.key).join("."))||"root"}: ${tt.message}`}).join(", ");throw new Error(`Validation failed: ${Ye}`)}throw Be}}exports.api=void 0;function setApi(Le){exports.api=Le}function setToken(Le){exports.api.defaults.headers["X-Incode-Hardware-Id"]=Le}const eventsQueue=[];function addEvent(Le){const{token:Be,code:Ye,module:tt,screen:nt,clientTimestamp:ft,payload:ht={}}=Le;if(!Be){eventsQueue.push(Le);return}return exports.api.post("/omni/interview-events",[{code:Ye,module:tt,screen:nt,clientTimestamp:ft??new Date().getTime(),payload:ht}],{headers:{"X-Incode-Hardware-Id":Be}}).catch(()=>{})}function emptyQueue(Le){eventsQueue.forEach(Be=>{addEvent({...Be,token:Le})})}const state={token:null};var PipelineProfileName=(Le=>(Le[Le.IdCapture_2_01=0]="IdCapture_2_01",Le[Le.IdCapture_2_02=1]="IdCapture_2_02",Le[Le.IdCapture_3_02=2]="IdCapture_3_02",Le[Le.IdVideoSelfie_2_01=3]="IdVideoSelfie_2_01",Le[Le.SelfieWithAggregationMetrics=4]="SelfieWithAggregationMetrics",Le[Le.SelfieWithQualityMetrics=5]="SelfieWithQualityMetrics",Le[Le.SelfieVideoSelfie=6]="SelfieVideoSelfie",Le))(PipelineProfileName||{});class PipelineProfile{constructor(Be,Ye,tt,nt,ft,ht=null,gt=""){this.pipelineType=Be,this.name=Ye,this.detectionType=tt,this.modelNames=nt,this.parameters=ft,this.paramsConfigurator=ht,this.description=gt}reconfigureParams(Be,Ye){if(this.paramsConfigurator==null)throw new Error("PipelineProfile does not have a paramsConfigurator");this.paramsConfigurator(this.parameters,this.pipelineType,Be,Ye)}}var DetectionType=(Le=>(Le[Le.IDCapture=0]="IDCapture",Le[Le.Selfie=1]="Selfie",Le[Le.SelfieVideoSelfie=2]="SelfieVideoSelfie",Le[Le.IdVideoSelfie=3]="IdVideoSelfie",Le))(DetectionType||{}),WasmPipelineType=(Le=>(Le[Le.IdBlurGlarePipeline=0]="IdBlurGlarePipeline",Le[Le.IdBarcodeAndTextQualityPipeline=1]="IdBarcodeAndTextQualityPipeline",Le[Le.IdVideoSelfiePipeline=2]="IdVideoSelfiePipeline",Le[Le.SelfieWithAggregationMetrics=3]="SelfieWithAggregationMetrics",Le[Le.SelfieWithQualityMetrics=4]="SelfieWithQualityMetrics",Le[Le.IdFaceDetectionPipeline=5]="IdFaceDetectionPipeline",Le))(WasmPipelineType||{}),IdCaptureModelType=(Le=>(Le[Le.IdCaptureV1x=0]="IdCaptureV1x",Le[Le.IdCaptureV2x=1]="IdCaptureV2x",Le[Le.IdCaptureV3x=2]="IdCaptureV3x",Le))(IdCaptureModelType||{}),src$2={},src$1={},$_StatsigGlobal={},Log={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le.Log=Le.LogLevel=void 0;const Be=" DEBUG ",Ye=" INFO ",tt=" WARN ",nt=" ERROR ";function ft(gt){return gt.unshift("[Statsig]"),gt}Le.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class ht{static info(...At){ht.level>=Le.LogLevel.Info&&console.info(Ye,...ft(At))}static debug(...At){ht.level>=Le.LogLevel.Debug&&console.debug(Be,...ft(At))}static warn(...At){ht.level>=Le.LogLevel.Warn&&console.warn(tt,...ft(At))}static error(...At){ht.level>=Le.LogLevel.Error&&console.error(nt,...ft(At))}}Le.Log=ht,ht.level=Le.LogLevel.Warn})(Log),function(Le){var Be,Ye,tt;Object.defineProperty(Le,"__esModule",{value:!0}),Le._getInstance=Le._getStatsigGlobalFlag=Le._getStatsigGlobal=void 0;const nt=Log,ft=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:Ct}catch{return Ct}};Le._getStatsigGlobal=ft;const ht=yt=>(0,Le._getStatsigGlobal)()[yt];Le._getStatsigGlobalFlag=ht;const gt=yt=>{const vt=(0,Le._getStatsigGlobal)();return yt?vt.instances&&vt.instances[yt]:(vt.instances&&Object.keys(vt.instances).length>1&&nt.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),vt.firstInstance)};Le._getInstance=gt;const At="__STATSIG__",xt=typeof window<"u"?window:{},Et=typeof commonjsGlobal<"u"?commonjsGlobal:{},kt=typeof globalThis<"u"?globalThis:{},Ct=(tt=(Ye=(Be=xt[At])!==null&&Be!==void 0?Be:Et[At])!==null&&Ye!==void 0?Ye:kt[At])!==null&&tt!==void 0?tt:{instance:Le._getInstance};xt[At]=Ct,Et[At]=Ct,kt[At]=Ct}($_StatsigGlobal);var Diagnostics={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le.Diagnostics=void 0;const Be=new Map,Ye="start",tt="end",nt="statsig::diagnostics";Le.Diagnostics={_getMarkers:xt=>Be.get(xt),_markInitOverallStart:xt=>{gt(xt,ft({},Ye,"overall"))},_markInitOverallEnd:(xt,Et,kt)=>{gt(xt,ft({success:Et,error:Et?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:kt},tt,"overall"))},_markInitNetworkReqStart:(xt,Et)=>{gt(xt,ft(Et,Ye,"initialize","network_request"))},_markInitNetworkReqEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","network_request"))},_markInitProcessStart:xt=>{gt(xt,ft({},Ye,"initialize","process"))},_markInitProcessEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","process"))},_clearMarkers:xt=>{Be.delete(xt)},_formatError(xt){if(xt&&typeof xt=="object")return{code:At(xt,"code"),name:At(xt,"name"),message:At(xt,"message")}},_getDiagnosticsData(xt,Et,kt,Ct){var yt;return{success:(xt==null?void 0:xt.ok)===!0,statusCode:xt==null?void 0:xt.status,sdkRegion:(yt=xt==null?void 0:xt.headers)===null||yt===void 0?void 0:yt.get("x-statsig-region"),isDelta:kt.includes('"is_delta":true')===!0?!0:void 0,attempt:Et,error:Le.Diagnostics._formatError(Ct)}},_enqueueDiagnosticsEvent(xt,Et,kt,Ct){const yt=Le.Diagnostics._getMarkers(kt);if(yt==null||yt.length<=0)return-1;const vt=yt[yt.length-1].timestamp-yt[0].timestamp;Le.Diagnostics._clearMarkers(kt);const bt=ht(xt,{context:"initialize",markers:yt.slice(),statsigOptions:Ct});return Et.enqueue(bt),vt}};function ft(xt,Et,kt,Ct){return Object.assign({key:kt,action:Et,step:Ct,timestamp:Date.now()},xt)}function ht(xt,Et){return{eventName:nt,user:xt,value:null,metadata:Et,time:Date.now()}}function gt(xt,Et){var kt;const Ct=(kt=Be.get(xt))!==null&&kt!==void 0?kt:[];Ct.push(Et),Be.set(xt,Ct)}function At(xt,Et){if(Et in xt)return xt[Et]}})(Diagnostics);var EventLogger$1={},CacheKey={},Hashing={},TypingUtils={};Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0;function _typeOf(Le){return Array.isArray(Le)?"array":typeof Le}TypingUtils._typeOf=_typeOf;function _isTypeMatch(Le,Be){const Ye=tt=>Array.isArray(tt)?"array":tt===null?"null":typeof tt;return Ye(Le)===Ye(Be)}TypingUtils._isTypeMatch=_isTypeMatch,function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le._getSortedObject=Le._DJB2Object=Le._DJB2=void 0;const Be=TypingUtils,Ye=ft=>{let ht=0;for(let gt=0;gt<ft.length;gt++){const At=ft.charCodeAt(gt);ht=(ht<<5)-ht+At,ht=ht&ht}return String(ht>>>0)};Le._DJB2=Ye;const tt=(ft,ht)=>(0,Le._DJB2)(JSON.stringify((0,Le._getSortedObject)(ft,ht)));Le._DJB2Object=tt;const nt=(ft,ht)=>{if(ft==null)return null;const gt=Object.keys(ft).sort(),At={};return gt.forEach(xt=>{const Et=ft[xt];if(ht===0||(0,Be._typeOf)(Et)!=="object"){At[xt]=Et;return}At[xt]=(0,Le._getSortedObject)(Et,ht!=null?ht-1:ht)}),At};Le._getSortedObject=nt}(Hashing),Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const Hashing_1$4=Hashing;function _getUserStorageKey(Le,Be,Ye){var tt;if(Ye)return Ye(Le,Be);const nt=Be&&Be.customIDs?Be.customIDs:{},ft=[`uid:${(tt=Be==null?void 0:Be.userID)!==null&&tt!==void 0?tt:""}`,`cids:${Object.keys(nt).sort((ht,gt)=>ht.localeCompare(gt)).map(ht=>`${ht}-${nt[ht]}`).join(",")}`,`k:${Le}`];return(0,Hashing_1$4._DJB2)(ft.join("|"))}CacheKey._getUserStorageKey=_getUserStorageKey;function _getStorageKey(Le,Be,Ye){return Be?_getUserStorageKey(Le,Be,Ye):(0,Hashing_1$4._DJB2)(`k:${Le}`)}CacheKey._getStorageKey=_getStorageKey;var NetworkConfig={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le.NetworkParam=Le.NetworkDefault=Le.Endpoint=void 0,Le.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},Le.NetworkDefault={[Le.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[Le.Endpoint._initialize]:"https://featureassets.org/v1",[Le.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},Le.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(NetworkConfig);var SafeJs={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le._getUnloadEvent=Le._getCurrentPageUrlSafe=Le._addDocumentEventListenerSafe=Le._addWindowEventListenerSafe=Le._isServerEnv=Le._getDocumentSafe=Le._getWindowSafe=void 0;const Be=()=>typeof window<"u"?window:null;Le._getWindowSafe=Be;const Ye=()=>{var At;const xt=(0,Le._getWindowSafe)();return(At=xt==null?void 0:xt.document)!==null&&At!==void 0?At:null};Le._getDocumentSafe=Ye;const tt=()=>{if((0,Le._getDocumentSafe)()!==null)return!1;const At=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||At};Le._isServerEnv=tt;const nt=(At,xt)=>{const Et=(0,Le._getWindowSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Le._addWindowEventListenerSafe=nt;const ft=(At,xt)=>{const Et=(0,Le._getDocumentSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Le._addDocumentEventListenerSafe=ft;const ht=()=>{var At;try{return(At=(0,Le._getWindowSafe)())===null||At===void 0?void 0:At.location.href.split(/[?#]/)[0]}catch{return}};Le._getCurrentPageUrlSafe=ht;const gt=()=>{const At=(0,Le._getWindowSafe)();return At&&"onpagehide"in At?"pagehide":"beforeunload"};Le._getUnloadEvent=gt})(SafeJs);var StatsigEvent={};Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const CONFIG_EXPOSURE_NAME="statsig::config_exposure",GATE_EXPOSURE_NAME="statsig::gate_exposure",LAYER_EXPOSURE_NAME="statsig::layer_exposure",_createExposure=(Le,Be,Ye,tt,nt)=>(Ye.bootstrapMetadata&&(tt.bootstrapMetadata=Ye.bootstrapMetadata),{eventName:Le,user:Be,value:null,metadata:_addEvaluationDetailsToMetadata(Ye,tt),secondaryExposures:nt,time:Date.now()}),_isExposureEvent=({eventName:Le})=>Le===GATE_EXPOSURE_NAME||Le===CONFIG_EXPOSURE_NAME||Le===LAYER_EXPOSURE_NAME;StatsigEvent._isExposureEvent=_isExposureEvent;const _createGateExposure=(Le,Be,Ye)=>{var tt,nt,ft;const ht={gate:Be.name,gateValue:String(Be.value),ruleID:Be.ruleID};return((tt=Be.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(ht.configVersion=Be.__evaluation.version),_createExposure(GATE_EXPOSURE_NAME,Le,Be.details,ht,_mapExposures((ft=(nt=Be.__evaluation)===null||nt===void 0?void 0:nt.secondary_exposures)!==null&&ft!==void 0?ft:[],Ye))};StatsigEvent._createGateExposure=_createGateExposure;function _mapExposures(Le,Be){return Le.map(Ye=>typeof Ye=="string"?(Be??{})[Ye]:Ye).filter(Ye=>Ye!=null)}StatsigEvent._mapExposures=_mapExposures;const _createConfigExposure=(Le,Be,Ye)=>{var tt,nt,ft,ht;const gt={config:Be.name,ruleID:Be.ruleID};return((tt=Be.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(gt.configVersion=Be.__evaluation.version),((nt=Be.__evaluation)===null||nt===void 0?void 0:nt.passed)!=null&&(gt.rulePassed=String(Be.__evaluation.passed)),_createExposure(CONFIG_EXPOSURE_NAME,Le,Be.details,gt,_mapExposures((ht=(ft=Be.__evaluation)===null||ft===void 0?void 0:ft.secondary_exposures)!==null&&ht!==void 0?ht:[],Ye))};StatsigEvent._createConfigExposure=_createConfigExposure;const _createLayerParameterExposure=(Le,Be,Ye,tt)=>{var nt,ft,ht,gt,At,xt,Et;const kt=Be.__evaluation,Ct=((nt=kt==null?void 0:kt.explicit_parameters)===null||nt===void 0?void 0:nt.includes(Ye))===!0;let yt="",vt=(ft=kt==null?void 0:kt.undelegated_secondary_exposures)!==null&&ft!==void 0?ft:[];Ct&&(yt=(ht=kt.allocated_experiment_name)!==null&&ht!==void 0?ht:"",vt=(gt=kt.secondary_exposures)!==null&>!==void 0?gt:[]);const bt=(At=Be.__evaluation)===null||At===void 0?void 0:At.parameter_rule_ids,It={config:Be.name,parameterName:Ye,ruleID:(xt=bt==null?void 0:bt[Ye])!==null&&xt!==void 0?xt:Be.ruleID,allocatedExperiment:yt,isExplicitParameter:String(Ct)};return((Et=Be.__evaluation)===null||Et===void 0?void 0:Et.version)!=null&&(It.configVersion=Be.__evaluation.version),_createExposure(LAYER_EXPOSURE_NAME,Le,Be.details,It,_mapExposures(vt,tt))};StatsigEvent._createLayerParameterExposure=_createLayerParameterExposure;const _addEvaluationDetailsToMetadata=(Le,Be)=>(Be.reason=Le.reason,Le.lcut&&(Be.lcut=String(Le.lcut)),Le.receivedAt&&(Be.receivedAt=String(Le.receivedAt)),Be);var StatsigOptionsCommon={};Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"};var StorageProvider={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le._setObjectInStorage=Le._getObjectFromStorage=Le.Storage=void 0;const Be=Log,Ye=SafeJs,tt={},nt={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:kt=>tt[kt]?tt[kt]:null,setItem:(kt,Ct)=>{tt[kt]=Ct},removeItem:kt=>{delete tt[kt]},getAllKeys:()=>Object.keys(tt)};let ft=null;try{const kt=(0,Ye._getWindowSafe)();kt&&kt.localStorage&&typeof kt.localStorage.getItem=="function"&&(ft={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:Ct=>kt.localStorage.getItem(Ct),setItem:(Ct,yt)=>kt.localStorage.setItem(Ct,yt),removeItem:Ct=>kt.localStorage.removeItem(Ct),getAllKeys:()=>Object.keys(kt.localStorage)})}catch{Be.Log.warn("Failed to setup localStorageProvider.")}let ht=ft??nt,gt=ht;function At(kt){try{return kt()}catch(Ct){if(Ct instanceof Error&&Ct.name==="SecurityError")return Le.Storage._setProvider(nt),null;throw Ct}}Le.Storage={isReady:()=>gt.isReady(),isReadyResolver:()=>gt.isReadyResolver(),getProviderName:()=>gt.getProviderName(),getItem:kt=>At(()=>gt.getItem(kt)),setItem:(kt,Ct)=>At(()=>gt.setItem(kt,Ct)),removeItem:kt=>gt.removeItem(kt),getAllKeys:()=>gt.getAllKeys(),_setProvider:kt=>{ht=kt,gt=kt},_setDisabled:kt=>{kt?gt=nt:gt=ht}};function xt(kt){const Ct=Le.Storage.getItem(kt);return JSON.parse(Ct??"null")}Le._getObjectFromStorage=xt;function Et(kt,Ct){Le.Storage.setItem(kt,JSON.stringify(Ct))}Le._setObjectInStorage=Et})(StorageProvider);var UrlConfiguration$1={};Object.defineProperty(UrlConfiguration$1,"__esModule",{value:!0}),UrlConfiguration$1.UrlConfiguration=void 0;const Hashing_1$3=Hashing,NetworkConfig_1$2=NetworkConfig,ENDPOINT_DNS_KEY_MAP={[NetworkConfig_1$2.Endpoint._initialize]:"i",[NetworkConfig_1$2.Endpoint._rgstr]:"e",[NetworkConfig_1$2.Endpoint._download_config_specs]:"d"};class UrlConfiguration{constructor(Be,Ye,tt,nt){this.customUrl=null,this.fallbackUrls=null,this.endpoint=Be,this.endpointDnsKey=ENDPOINT_DNS_KEY_MAP[Be],Ye&&(this.customUrl=Ye),!Ye&&tt&&(this.customUrl=tt.endsWith("/")?`${tt}${Be}`:`${tt}/${Be}`),nt&&(this.fallbackUrls=nt);const ft=NetworkConfig_1$2.NetworkDefault[Be];this.defaultUrl=`${ft}/${Be}`}getUrl(){var Be;return(Be=this.customUrl)!==null&&Be!==void 0?Be:this.defaultUrl}getChecksum(){var Be;const Ye=((Be=this.fallbackUrls)!==null&&Be!==void 0?Be:[]).sort().join(",");return(0,Hashing_1$3._DJB2)(this.customUrl+Ye)}}UrlConfiguration$1.UrlConfiguration=UrlConfiguration;var VisibilityObserving={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le._notifyVisibilityChanged=Le._subscribeToVisiblityChanged=Le._isUnloading=Le._isCurrentlyVisible=void 0;const Be=SafeJs,Ye="foreground",tt="background",nt=[];let ft=Ye,ht=!1;const gt=()=>ft===Ye;Le._isCurrentlyVisible=gt;const At=()=>ht;Le._isUnloading=At;const xt=kt=>{nt.unshift(kt)};Le._subscribeToVisiblityChanged=xt;const Et=kt=>{kt!==ft&&(ft=kt,nt.forEach(Ct=>Ct(kt)))};Le._notifyVisibilityChanged=Et,(0,Be._addWindowEventListenerSafe)("focus",()=>{ht=!1,(0,Le._notifyVisibilityChanged)(Ye)}),(0,Be._addWindowEventListenerSafe)("blur",()=>(0,Le._notifyVisibilityChanged)(tt)),(0,Be._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,Le._notifyVisibilityChanged)(document.visibilityState==="visible"?Ye:tt)}),(0,Be._addWindowEventListenerSafe)((0,Be._getUnloadEvent)(),()=>{ht=!0,(0,Le._notifyVisibilityChanged)(tt)})})(VisibilityObserving);var __awaiter$f=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(EventLogger$1,"__esModule",{value:!0}),EventLogger$1.EventLogger=void 0;const CacheKey_1$1=CacheKey,Hashing_1$2=Hashing,Log_1$8=Log,NetworkConfig_1$1=NetworkConfig,SafeJs_1$3=SafeJs,StatsigEvent_1=StatsigEvent,StatsigOptionsCommon_1$2=StatsigOptionsCommon,StorageProvider_1$4=StorageProvider,UrlConfiguration_1=UrlConfiguration$1,VisibilityObserving_1$1=VisibilityObserving,DEFAULT_QUEUE_SIZE=100,DEFAULT_FLUSH_INTERVAL_MS=1e4,MAX_DEDUPER_KEYS=1e3,DEDUPER_WINDOW_DURATION_MS=6e5,MAX_FAILED_LOGS=500,QUICK_FLUSH_WINDOW_MS=200,EVENT_LOGGER_MAP={},RetryFailedLogsTrigger={Startup:"startup",GainedFocus:"gained_focus"};class EventLogger{static _safeFlushAndForget(Be){var Ye;(Ye=EVENT_LOGGER_MAP[Be])===null||Ye===void 0||Ye.flush().catch(()=>{})}static _safeRetryFailedLogs(Be){var Ye;(Ye=EVENT_LOGGER_MAP[Be])===null||Ye===void 0||Ye._retryFailedLogs(RetryFailedLogsTrigger.GainedFocus)}constructor(Be,Ye,tt,nt){var ft,ht;this._sdkKey=Be,this._emitter=Ye,this._network=tt,this._options=nt,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(ft=nt==null?void 0:nt.loggingEnabled)!==null&&ft!==void 0?ft:(nt==null?void 0:nt.disableLogging)===!0?StatsigOptionsCommon_1$2.LoggingEnabledOption.disabled:StatsigOptionsCommon_1$2.LoggingEnabledOption.browserOnly,nt!=null&&nt.loggingEnabled&&nt.disableLogging!==void 0&&Log_1$8.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(ht=nt==null?void 0:nt.loggingBufferMaxSize)!==null&&ht!==void 0?ht:DEFAULT_QUEUE_SIZE;const gt=nt==null?void 0:nt.networkConfig;this._logEventUrlConfig=new UrlConfiguration_1.UrlConfiguration(NetworkConfig_1$1.Endpoint._rgstr,gt==null?void 0:gt.logEventUrl,gt==null?void 0:gt.api,gt==null?void 0:gt.logEventFallbackUrls)}setLogEventCompressionMode(Be){this._network.setLogEventCompressionMode(Be)}setLoggingEnabled(Be){if(this._loggingEnabled==="disabled"&&Be!=="disabled"){const Ye=this._getStorageKey(),tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);tt&&this._queue.push(...tt),StorageProvider_1$4.Storage.removeItem(Ye)}this._loggingEnabled=Be}enqueue(Be){this._shouldLogEvent(Be)&&(this._normalizeAndAppendEvent(Be),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&EventLogger._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(Be){var Ye;const tt=(Ye=this._nonExposedChecks[Be])!==null&&Ye!==void 0?Ye:0;this._nonExposedChecks[Be]=tt+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var Be;const Ye=(0,SafeJs_1$3._isServerEnv)();Ye&&((Be=this._options)===null||Be===void 0?void 0:Be.loggingEnabled)!=="always"||(EVENT_LOGGER_MAP[this._sdkKey]=this,Ye||(0,VisibilityObserving_1$1._subscribeToVisiblityChanged)(tt=>{tt==="background"?EventLogger._safeFlushAndForget(this._sdkKey):tt==="foreground"&&EventLogger._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(RetryFailedLogsTrigger.Startup),this._startBackgroundFlushInterval())}stop(){return __awaiter$f(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete EVENT_LOGGER_MAP[this._sdkKey],yield this.flush()})}flush(){return __awaiter$f(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const Be=this._queue;this._queue=[],yield this._sendEvents(Be)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>QUICK_FLUSH_WINDOW_MS)&&setTimeout(()=>EventLogger._safeFlushAndForget(this._sdkKey),QUICK_FLUSH_WINDOW_MS))}_shouldLogEvent(Be){var Ye;if(((Ye=this._options)===null||Ye===void 0?void 0:Ye.loggingEnabled)!=="always"&&(0,SafeJs_1$3._isServerEnv)())return!1;if(!(0,StatsigEvent_1._isExposureEvent)(Be))return!0;const tt=Be.user?Be.user:{statsigEnvironment:void 0},nt=(0,CacheKey_1$1._getUserStorageKey)(this._sdkKey,tt),ft=Be.metadata?Be.metadata:{},ht=[Be.eventName,nt,ft.gate,ft.config,ft.ruleID,ft.allocatedExperiment,ft.parameterName,String(ft.isExplicitParameter),ft.reason].join("|"),gt=this._lastExposureTimeMap[ht],At=Date.now();return gt&&At-gt<DEDUPER_WINDOW_DURATION_MS?!1:(Object.keys(this._lastExposureTimeMap).length>MAX_DEDUPER_KEYS&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[ht]=At,!0)}_sendEvents(Be){return __awaiter$f(this,void 0,void 0,function*(){var Ye,tt;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(Be),!1;try{const ft=(0,VisibilityObserving_1$1._isUnloading)()&&this._network.isBeaconSupported()&&((tt=(Ye=this._options)===null||Ye===void 0?void 0:Ye.networkConfig)===null||tt===void 0?void 0:tt.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:Be}),(ft?this._sendEventsViaBeacon(Be):yield this._sendEventsViaPost(Be)).success?(this._emitter({name:"logs_flushed",events:Be}),!0):(Log_1$8.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(Be),!1)}catch{return Log_1$8.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(Be){return __awaiter$f(this,void 0,void 0,function*(){var Ye;const tt=yield this._network.post(this._getRequestData(Be)),nt=(Ye=tt==null?void 0:tt.code)!==null&&Ye!==void 0?Ye:-1;return{success:nt>=200&&nt<300}})}_sendEventsViaBeacon(Be){return{success:this._network.beacon(this._getRequestData(Be))}}_getRequestData(Be){return{sdkKey:this._sdkKey,data:{events:Be},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[NetworkConfig_1$1.NetworkParam.EventCount]:String(Be.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(Be){for(;Be.length>MAX_FAILED_LOGS;)Be.shift();const Ye=this._getStorageKey();try{const tt=this._getFailedLogsFromStorage(Ye);(0,StorageProvider_1$4._setObjectInStorage)(Ye,[...tt,...Be])}catch{Log_1$8.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(Be){let Ye=[];try{const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Be);return Array.isArray(tt)&&(Ye=tt),Ye}catch{return[]}}_retryFailedLogs(Be){const Ye=this._getStorageKey();__awaiter$f(this,void 0,void 0,function*(){StorageProvider_1$4.Storage.isReady()||(yield StorageProvider_1$4.Storage.isReadyResolver());const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);if(!tt)return;Be===RetryFailedLogsTrigger.Startup&&StorageProvider_1$4.Storage.removeItem(Ye),(yield this._sendEvents(tt))&&Be===RetryFailedLogsTrigger.GainedFocus&&StorageProvider_1$4.Storage.removeItem(Ye)}).catch(()=>{Log_1$8.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,Hashing_1$2._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(Be){Be.user&&(Be.user=Object.assign({},Be.user),delete Be.user.privateAttributes);const Ye={},tt=this._getCurrentPageUrl();tt&&(Ye.statsigMetadata={currentPage:tt});const nt=Object.assign(Object.assign({},Be),Ye);Log_1$8.Log.debug("Enqueued Event:",nt),this._queue.push(nt)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var Be;if(((Be=this._options)===null||Be===void 0?void 0:Be.includeCurrentPageUrlWithEvents)!==!1)return(0,SafeJs_1$3._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var Be,Ye;const tt=(Ye=(Be=this._options)===null||Be===void 0?void 0:Be.loggingIntervalMs)!==null&&Ye!==void 0?Ye:DEFAULT_FLUSH_INTERVAL_MS,nt=setInterval(()=>{const ft=EVENT_LOGGER_MAP[this._sdkKey];!ft||ft._flushIntervalId!==nt?clearInterval(nt):EventLogger._safeFlushAndForget(this._sdkKey)},tt);this._flushIntervalId=nt}}EventLogger$1.EventLogger=EventLogger;var StatsigMetadata={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le.StatsigMetadataProvider=Le.SDK_VERSION=void 0,Le.SDK_VERSION="3.28.1";let Be={sdkVersion:Le.SDK_VERSION,sdkType:"js-mono"};Le.StatsigMetadataProvider={get:()=>Be,add:Ye=>{Be=Object.assign(Object.assign({},Be),Ye)}}})(StatsigMetadata);var ClientInterfaces={};Object.defineProperty(ClientInterfaces,"__esModule",{value:!0});var DataAdapterCore$1={},StableID={},UUID={};Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0;function getUUID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let Le=new Date().getTime(),Be=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,tt=>{let nt=Math.random()*16;return Le>0?(nt=(Le+nt)%16|0,Le=Math.floor(Le/16)):(nt=(Be+nt)%16|0,Be=Math.floor(Be/16)),(tt==="x"?nt:nt&7|8).toString(16)})}UUID.getUUID=getUUID,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const CacheKey_1=CacheKey,Log_1$7=Log,SafeJs_1$2=SafeJs,StorageProvider_1$3=StorageProvider,UUID_1=UUID,PROMISE_MAP={},COOKIE_ENABLED_MAP={},DISABLED_MAP={};StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:Le=>{if(DISABLED_MAP[Le])return null;if(PROMISE_MAP[Le]!=null)return PROMISE_MAP[Le];let Be=null;return Be=_loadFromCookie(Le),Be!=null?(PROMISE_MAP[Le]=Be,_persistToStorage(Be,Le),Be):(Be=_loadFromStorage(Le),Be==null&&(Be=(0,UUID_1.getUUID)()),_persistToStorage(Be,Le),_persistToCookie(Be,Le),PROMISE_MAP[Le]=Be,Be)},setOverride:(Le,Be)=>{PROMISE_MAP[Be]=Le,_persistToStorage(Le,Be),_persistToCookie(Le,Be)},_setCookiesEnabled:(Le,Be)=>{COOKIE_ENABLED_MAP[Le]=Be},_setDisabled:(Le,Be)=>{DISABLED_MAP[Le]=Be}};function _getStableIDStorageKey(Le){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Le)}`}function _persistToStorage(Le,Be){const Ye=_getStableIDStorageKey(Be);try{(0,StorageProvider_1$3._setObjectInStorage)(Ye,Le)}catch{Log_1$7.Log.warn("Failed to save StableID to storage")}}function _loadFromStorage(Le){const Be=_getStableIDStorageKey(Le);return(0,StorageProvider_1$3._getObjectFromStorage)(Be)}function _loadFromCookie(Le){if(!COOKIE_ENABLED_MAP[Le]||(0,SafeJs_1$2._getDocumentSafe)()==null)return null;const Be=document.cookie.split(";");for(const Ye of Be){const[tt,nt]=Ye.trim().split("=");if(tt===getCookieName(Le))return decodeURIComponent(nt)}return null}function _persistToCookie(Le,Be){if(!COOKIE_ENABLED_MAP[Be]||(0,SafeJs_1$2._getDocumentSafe)()==null)return;const Ye=new Date;Ye.setFullYear(Ye.getFullYear()+1),document.cookie=`${getCookieName(Be)}=${encodeURIComponent(Le)}; expires=${Ye.toUTCString()}; path=/`}function getCookieName(Le){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Le)}`}StableID.getCookieName=getCookieName;var StatsigUser={};Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const Hashing_1$1=Hashing,Log_1$6=Log;function _normalizeUser(Le,Be,Ye){try{const tt=JSON.parse(JSON.stringify(Le));return Be!=null&&Be.environment!=null?tt.statsigEnvironment=Be.environment:Ye!=null&&(tt.statsigEnvironment={tier:Ye}),tt}catch{return Log_1$6.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}StatsigUser._normalizeUser=_normalizeUser;function _getFullUserHash(Le){return Le?(0,Hashing_1$1._DJB2Object)(Le):null}StatsigUser._getFullUserHash=_getFullUserHash;var TypedJsonParse={};Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const Log_1$5=Log;function _typedJsonParse(Le,Be,Ye){try{const tt=JSON.parse(Le);if(tt&&typeof tt=="object"&&Be in tt)return tt}catch{}return Log_1$5.Log.error(`Failed to parse ${Ye}`),null}TypedJsonParse._typedJsonParse=_typedJsonParse;var __awaiter$e=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(DataAdapterCore$1,"__esModule",{value:!0}),DataAdapterCore$1._makeDataAdapterResult=DataAdapterCore$1.DataAdapterCore=void 0;const Log_1$4=Log,StableID_1$2=StableID,StatsigUser_1=StatsigUser,StorageProvider_1$2=StorageProvider,TypedJsonParse_1=TypedJsonParse,CACHE_LIMIT=10,MAX_CACHE_WRITE_ATTEMPTS=8;class DataAdapterCore{constructor(Be,Ye){this._adapterName=Be,this._cacheSuffix=Ye,this._options=null,this._sdkKey=null,this._cacheLimit=CACHE_LIMIT,this._lastModifiedStoreKey=`statsig.last_modified_time.${Ye}`,this._inMemoryCache=new InMemoryCache}attach(Be,Ye,tt){this._sdkKey=Be,this._options=Ye}getDataSync(Be){const Ye=Be&&(0,StatsigUser_1._normalizeUser)(Be,this._options),tt=this._getCacheKey(Ye),nt=this._inMemoryCache.get(tt,Ye);if(nt&&this._getIsCacheValueValid(nt))return nt;const ft=this._loadFromCache(tt);return ft&&this._getIsCacheValueValid(ft)?(this._inMemoryCache.add(tt,ft,this._cacheLimit),this._inMemoryCache.get(tt,Ye)):null}setData(Be,Ye){const tt=Ye&&(0,StatsigUser_1._normalizeUser)(Ye,this._options),nt=this._getCacheKey(tt);this._inMemoryCache.add(nt,_makeDataAdapterResult("Bootstrap",Be,null,tt),this._cacheLimit)}_getIsCacheValueValid(Be){return Be.stableID==null||Be.stableID===StableID_1$2.StableID.get(this._getSdkKey())}_getDataAsyncImpl(Be,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){StorageProvider_1$2.Storage.isReady()||(yield StorageProvider_1$2.Storage.isReadyResolver());const nt=Be??this.getDataSync(Ye),ft=[this._fetchAndPrepFromNetwork(nt,Ye,tt)];return tt!=null&&tt.timeoutMs&&ft.push(new Promise(ht=>setTimeout(ht,tt.timeoutMs)).then(()=>(Log_1$4.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(ft)})}_prefetchDataImpl(Be,Ye){return __awaiter$e(this,void 0,void 0,function*(){const tt=Be&&(0,StatsigUser_1._normalizeUser)(Be,this._options),nt=this._getCacheKey(tt),ft=yield this._getDataAsyncImpl(null,tt,Ye);ft&&this._inMemoryCache.add(nt,Object.assign(Object.assign({},ft),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(Be,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){var nt;const ft=(nt=Be==null?void 0:Be.data)!==null&&nt!==void 0?nt:null,ht=Be!=null&&this._isCachedResultValidFor204(Be,Ye),gt=yield this._fetchFromNetwork(ft,Ye,tt,ht);if(!gt)return Log_1$4.Log.debug("No response returned for latest value"),null;const At=(0,TypedJsonParse_1._typedJsonParse)(gt,"has_updates","Response"),xt=this._getSdkKey(),Et=StableID_1$2.StableID.get(xt);let kt=null;if((At==null?void 0:At.has_updates)===!0)kt=_makeDataAdapterResult("Network",gt,Et,Ye);else if(ft&&(At==null?void 0:At.has_updates)===!1)kt=_makeDataAdapterResult("NetworkNotModified",ft,Et,Ye);else return null;const Ct=this._getCacheKey(Ye);return this._inMemoryCache.add(Ct,kt,this._cacheLimit),this._writeToCache(Ct,kt),kt})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(Log_1$4.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(Be){var Ye;const tt=(Ye=StorageProvider_1$2.Storage.getItem)===null||Ye===void 0?void 0:Ye.call(StorageProvider_1$2.Storage,Be);if(tt==null)return null;const nt=(0,TypedJsonParse_1._typedJsonParse)(tt,"source","Cached Result");return nt?Object.assign(Object.assign({},nt),{source:"Cache"}):null}_writeToCache(Be,Ye){const tt=JSON.stringify(Ye);for(let nt=0;nt<MAX_CACHE_WRITE_ATTEMPTS;nt++)try{StorageProvider_1$2.Storage.setItem(Be,tt);break}catch(ft){if(!(ft instanceof Error)||!(ft.toString().includes("QuotaExceededError")||ft.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw ft;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(Be,this._cacheLimit-1)}this._runLocalStorageCacheEviction(Be)}_runLocalStorageCacheEviction(Be,Ye=this._cacheLimit){var tt;const nt=(tt=(0,StorageProvider_1$2._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&tt!==void 0?tt:{};nt[Be]=Date.now();const ft=_getEvictableKeys(nt,Ye);for(const ht of ft)delete nt[ht],StorageProvider_1$2.Storage.removeItem(ht);(0,StorageProvider_1$2._setObjectInStorage)(this._lastModifiedStoreKey,nt)}}DataAdapterCore$1.DataAdapterCore=DataAdapterCore;function _makeDataAdapterResult(Le,Be,Ye,tt){return{source:Le,data:Be,receivedAt:Date.now(),stableID:Ye,fullUserHash:(0,StatsigUser_1._getFullUserHash)(tt)}}DataAdapterCore$1._makeDataAdapterResult=_makeDataAdapterResult;class InMemoryCache{constructor(){this._data={}}get(Be,Ye){var tt;const nt=this._data[Be],ft=nt==null?void 0:nt.stableID,ht=(tt=Ye==null?void 0:Ye.customIDs)===null||tt===void 0?void 0:tt.stableID;return ht&&ft&&ht!==ft?(Log_1$4.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):nt}add(Be,Ye,tt){const nt=_getEvictableKeys(this._data,tt-1);for(const ft of nt)delete this._data[ft];this._data[Be]=Ye}merge(Be){this._data=Object.assign(Object.assign({},this._data),Be)}}function _getEvictableKeys(Le,Be){const Ye=Object.keys(Le);return Ye.length<=Be?[]:Be===0?Ye:Ye.sort((tt,nt)=>{const ft=Le[tt],ht=Le[nt];return typeof ft=="object"&&typeof ht=="object"?ft.receivedAt-ht.receivedAt:ft-ht}).slice(0,Ye.length-Be)}var DownloadConfigSpecsResponse={};Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0});var ErrorBoundary={},SDKType={};Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const SDK_CLIENT={};let suffix;SDKType.SDKType={_get:Le=>{var Be;return((Be=SDK_CLIENT[Le])!==null&&Be!==void 0?Be:"js-mono")+(suffix??"")},_setClientType(Le,Be){SDK_CLIENT[Le]=Be},_setBindingType(Le){(!suffix||suffix==="-react")&&(suffix="-"+Le)}},function(Le){var Be=commonjsGlobal&&commonjsGlobal.__awaiter||function(kt,Ct,yt,vt){function bt(It){return It instanceof yt?It:new yt(function(wt){wt(It)})}return new(yt||(yt=Promise))(function(It,wt){function Rt(Dt){try{Bt(vt.next(Dt))}catch(Pt){wt(Pt)}}function Tt(Dt){try{Bt(vt.throw(Dt))}catch(Pt){wt(Pt)}}function Bt(Dt){Dt.done?It(Dt.value):bt(Dt.value).then(Rt,Tt)}Bt((vt=vt.apply(kt,Ct||[])).next())})};Object.defineProperty(Le,"__esModule",{value:!0}),Le.ErrorBoundary=Le.EXCEPTION_ENDPOINT=void 0;const Ye=Log,tt=SDKType,nt=StatsigMetadata;Le.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const ft="[Statsig] UnknownError";class ht{constructor(Ct,yt,vt,bt){this._sdkKey=Ct,this._options=yt,this._emitter=vt,this._lastSeenError=bt,this._seen=new Set}wrap(Ct,yt){try{const vt=Ct;xt(vt).forEach(bt=>{const It=vt[bt];"$EB"in It||(vt[bt]=(...wt)=>this._capture(yt?`${yt}:${bt}`:bt,()=>It.apply(Ct,wt)),vt[bt].$EB=!0)})}catch(vt){this._onError("eb:wrap",vt)}}logError(Ct,yt){this._onError(Ct,yt)}getLastSeenErrorAndReset(){const Ct=this._lastSeenError;return this._lastSeenError=void 0,Ct??null}attachErrorIfNoneExists(Ct){this._lastSeenError||(this._lastSeenError=gt(Ct))}_capture(Ct,yt){try{const vt=yt();return vt&&vt instanceof Promise?vt.catch(bt=>this._onError(Ct,bt)):vt}catch(vt){return this._onError(Ct,vt),null}}_onError(Ct,yt){try{Ye.Log.warn(`Caught error in ${Ct}`,{error:yt}),Be(this,void 0,void 0,function*(){var bt,It,wt,Rt,Tt,Bt,Dt;const Pt=yt||Error(ft),Nt=Pt instanceof Error,Lt=Nt?Pt.name:"No Name",Wt=gt(Pt);if(this._lastSeenError=Wt,this._seen.has(Lt))return;if(this._seen.add(Lt),!((It=(bt=this._options)===null||bt===void 0?void 0:bt.networkConfig)===null||It===void 0)&&It.preventAllNetworkTraffic){(wt=this._emitter)===null||wt===void 0||wt.call(this,{name:"error",error:yt,tag:Ct});return}const Kt=tt.SDKType._get(this._sdkKey),$t=nt.StatsigMetadataProvider.get(),Ut=Nt?Pt.stack:At(Pt),Vt=Object.assign({tag:Ct,exception:Lt,info:Ut,statsigOptions:Et(this._options)},Object.assign(Object.assign({},$t),{sdkType:Kt}));yield((Bt=(Tt=(Rt=this._options)===null||Rt===void 0?void 0:Rt.networkConfig)===null||Tt===void 0?void 0:Tt.networkOverrideFunc)!==null&&Bt!==void 0?Bt:fetch)(Le.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(Kt),"STATSIG-SDK-VERSION":String($t.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(Vt)}),(Dt=this._emitter)===null||Dt===void 0||Dt.call(this,{name:"error",error:yt,tag:Ct})}).then(()=>{}).catch(()=>{})}catch{}}}Le.ErrorBoundary=ht;function gt(kt){return kt instanceof Error?kt:typeof kt=="string"?new Error(kt):new Error("An unknown error occurred.")}function At(kt){try{return JSON.stringify(kt)}catch{return ft}}function xt(kt){const Ct=new Set;let yt=Object.getPrototypeOf(kt);for(;yt&&yt!==Object.prototype;)Object.getOwnPropertyNames(yt).filter(vt=>typeof(yt==null?void 0:yt[vt])=="function").forEach(vt=>Ct.add(vt)),yt=Object.getPrototypeOf(yt);return Array.from(Ct)}function Et(kt){if(!kt)return{};const Ct={};return Object.keys(kt).forEach(yt=>{const vt=yt,bt=kt[vt];switch(typeof bt){case"number":case"bigint":case"boolean":Ct[String(vt)]=bt;break;case"string":bt.length<50?Ct[String(vt)]=bt:Ct[String(vt)]="set";break;case"object":vt==="environment"?Ct.environment=bt:vt==="networkConfig"?Ct.networkConfig=bt:Ct[String(vt)]=bt!=null?"set":"unset";break}}),Ct}}(ErrorBoundary);var EvaluationOptions={};Object.defineProperty(EvaluationOptions,"__esModule",{value:!0});var EvaluationTypes={};Object.defineProperty(EvaluationTypes,"__esModule",{value:!0});var InitializeResponse={};Object.defineProperty(InitializeResponse,"__esModule",{value:!0});var MemoKey={};Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const EXIST_KEYS=new Set([]),DO_NOT_MEMO_KEYS=new Set(["userPersistedValues"]);function createMemoKey(Le,Be,Ye){let tt=`${Le}|${Be}`;if(!Ye)return tt;for(const nt of Object.keys(Ye)){if(DO_NOT_MEMO_KEYS.has(nt))return;EXIST_KEYS.has(nt)?tt+=`|${nt}=true`:tt+=`|${nt}=${Ye[nt]}`}return tt}MemoKey.createMemoKey=createMemoKey;var NetworkCore$1={},NetworkFallbackResolver$1={},DnsTxtQuery={},__awaiter$d=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const FEATURE_ASSETS_DNS_QUERY=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),DNS_QUERY_ENDPOINT="https://cloudflare-dns.com/dns-query",DOMAIN_CHARS=["i","e","d"],MAX_START_LOOKUP=200;function _fetchTxtRecords(Le){return __awaiter$d(this,void 0,void 0,function*(){const Be=yield Le(DNS_QUERY_ENDPOINT,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:FEATURE_ASSETS_DNS_QUERY});if(!Be.ok){const nt=new Error("Failed to fetch TXT records from DNS");throw nt.name="DnsTxtFetchError",nt}const Ye=yield Be.arrayBuffer(),tt=new Uint8Array(Ye);return _parseDnsResponse(tt)})}DnsTxtQuery._fetchTxtRecords=_fetchTxtRecords;function _parseDnsResponse(Le){const Be=Le.findIndex((tt,nt)=>nt<MAX_START_LOOKUP&&String.fromCharCode(tt)==="="&&DOMAIN_CHARS.includes(String.fromCharCode(Le[nt-1])));if(Be===-1){const tt=new Error("Failed to parse TXT records from DNS");throw tt.name="DnsTxtParseError",tt}let Ye="";for(let tt=Be-1;tt<Le.length;tt++)Ye+=String.fromCharCode(Le[tt]);return Ye.split(",")}var __awaiter$c=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(NetworkFallbackResolver$1,"__esModule",{value:!0}),NetworkFallbackResolver$1._isDomainFailure=NetworkFallbackResolver$1.NetworkFallbackResolver=void 0;const DnsTxtQuery_1=DnsTxtQuery,Hashing_1=Hashing,Log_1$3=Log,StorageProvider_1$1=StorageProvider,DEFAULT_TTL_MS=7*24*60*60*1e3,COOLDOWN_TIME_MS=4*60*60*1e3;class NetworkFallbackResolver{constructor(Be){var Ye;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(Ye=Be.networkConfig)===null||Ye===void 0?void 0:Ye.networkOverrideFunc}setErrorBoundary(Be){this._errorBoundary=Be}tryBumpExpiryTime(Be,Ye){var tt;const nt=(tt=this._fallbackInfo)===null||tt===void 0?void 0:tt[Ye.endpoint];nt&&(nt.expiryTime=Date.now()+DEFAULT_TTL_MS,_tryWriteFallbackInfoToCache(Be,Object.assign(Object.assign({},this._fallbackInfo),{[Ye.endpoint]:nt})))}getActiveFallbackUrl(Be,Ye){var tt,nt;if(Ye.customUrl!=null&&Ye.fallbackUrls!=null)return null;let ft=this._fallbackInfo;ft==null&&(ft=(tt=_readFallbackInfoFromCache(Be))!==null&&tt!==void 0?tt:{},this._fallbackInfo=ft);const ht=ft[Ye.endpoint];return!ht||Date.now()>((nt=ht.expiryTime)!==null&&nt!==void 0?nt:0)||Ye.getChecksum()!==ht.urlConfigChecksum?(delete ft[Ye.endpoint],this._fallbackInfo=ft,_tryWriteFallbackInfoToCache(Be,this._fallbackInfo),null):ht.url?ht.url:null}tryFetchUpdatedFallbackInfo(Be,Ye,tt,nt){return __awaiter$c(this,void 0,void 0,function*(){var ft,ht;try{if(!_isDomainFailure(tt,nt))return!1;const At=Ye.customUrl==null&&Ye.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(Ye):Ye.fallbackUrls,xt=this._pickNewFallbackUrl((ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[Ye.endpoint],At);return xt?(this._updateFallbackInfoWithNewUrl(Be,Ye,xt),!0):!1}catch(gt){return(ht=this._errorBoundary)===null||ht===void 0||ht.logError("tryFetchUpdatedFallbackInfo",gt),!1}})}_updateFallbackInfoWithNewUrl(Be,Ye,tt){var nt,ft,ht;const gt={urlConfigChecksum:Ye.getChecksum(),url:tt,expiryTime:Date.now()+DEFAULT_TTL_MS,previous:[]},At=Ye.endpoint,xt=(nt=this._fallbackInfo)===null||nt===void 0?void 0:nt[At];xt&>.previous.push(...xt.previous),gt.previous.length>10&&(gt.previous=[]);const Et=(ht=(ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[At])===null||ht===void 0?void 0:ht.url;Et!=null&>.previous.push(Et),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[At]:gt}),_tryWriteFallbackInfoToCache(Be,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(Be){return __awaiter$c(this,void 0,void 0,function*(){var Ye;const tt=this._dnsQueryCooldowns[Be.endpoint];if(tt&&Date.now()<tt)return null;this._dnsQueryCooldowns[Be.endpoint]=Date.now()+COOLDOWN_TIME_MS;const nt=[],ft=yield(0,DnsTxtQuery_1._fetchTxtRecords)((Ye=this._networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch),ht=_extractPathFromUrl(Be.defaultUrl);for(const gt of ft){if(!gt.startsWith(Be.endpointDnsKey+"="))continue;const At=gt.split("=");if(At.length>1){let xt=At[1];xt.endsWith("/")&&(xt=xt.slice(0,-1)),nt.push(`https://${xt}${ht}`)}}return nt})}_pickNewFallbackUrl(Be,Ye){var tt;if(Ye==null)return null;const nt=new Set((tt=Be==null?void 0:Be.previous)!==null&&tt!==void 0?tt:[]),ft=Be==null?void 0:Be.url;let ht=null;for(const gt of Ye){const At=gt.endsWith("/")?gt.slice(0,-1):gt;if(!nt.has(gt)&&At!==ft){ht=At;break}}return ht}}NetworkFallbackResolver$1.NetworkFallbackResolver=NetworkFallbackResolver;function _isDomainFailure(Le,Be){var Ye;const tt=(Ye=Le==null?void 0:Le.toLowerCase())!==null&&Ye!==void 0?Ye:"";return Be||tt.includes("uncaught exception")||tt.includes("failed to fetch")||tt.includes("networkerror when attempting to fetch resource")}NetworkFallbackResolver$1._isDomainFailure=_isDomainFailure;function _getFallbackInfoStorageKey(Le){return`statsig.network_fallback.${(0,Hashing_1._DJB2)(Le)}`}function _tryWriteFallbackInfoToCache(Le,Be){const Ye=_getFallbackInfoStorageKey(Le);if(!Be||Object.keys(Be).length===0){StorageProvider_1$1.Storage.removeItem(Ye);return}StorageProvider_1$1.Storage.setItem(Ye,JSON.stringify(Be))}function _readFallbackInfoFromCache(Le){const Be=_getFallbackInfoStorageKey(Le),Ye=StorageProvider_1$1.Storage.getItem(Be);if(!Ye)return null;try{return JSON.parse(Ye)}catch{return Log_1$3.Log.error("Failed to parse FallbackInfo"),null}}function _extractPathFromUrl(Le){try{return new URL(Le).pathname}catch{return null}}var SDKFlags={};Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const FLAGMAP={};SDKFlags.SDKFlags={setFlags:(Le,Be)=>{FLAGMAP[Le]=Be},get:(Le,Be)=>{var Ye,tt;return(tt=(Ye=FLAGMAP[Le])===null||Ye===void 0?void 0:Ye[Be])!==null&&tt!==void 0?tt:!1}};var SessionID={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le.StatsigSession=Le.SessionID=void 0;const Be=$_StatsigGlobal,Ye=CacheKey,tt=Log,nt=StorageProvider,ft=UUID,ht=30*60*1e3,gt=4*60*60*1e3,At={};Le.SessionID={get:Rt=>Le.StatsigSession.get(Rt).data.sessionID},Le.StatsigSession={get:Rt=>{At[Rt]==null&&(At[Rt]=xt(Rt));const Tt=At[Rt];return kt(Tt)},overrideInitialSessionID:(Rt,Tt)=>{At[Tt]=Et(Rt,Tt)}};function xt(Rt){let Tt=wt(Rt);const Bt=Date.now();return Tt||(Tt={sessionID:(0,ft.getUUID)(),startTime:Bt,lastUpdate:Bt}),{data:Tt,sdkKey:Rt}}function Et(Rt,Tt){const Bt=Date.now();return{data:{sessionID:Rt,startTime:Bt,lastUpdate:Bt},sdkKey:Tt}}function kt(Rt){const Tt=Date.now(),Bt=Rt.data,Dt=Rt.sdkKey;if(yt(Bt)||vt(Bt)){Bt.sessionID=(0,ft.getUUID)(),Bt.startTime=Tt;const Nt=__STATSIG__==null?void 0:__STATSIG__.instance(Dt);Nt&&Nt.$emt({name:"session_expired"})}Bt.lastUpdate=Tt,It(Bt,Rt.sdkKey),clearTimeout(Rt.idleTimeoutID),clearTimeout(Rt.ageTimeoutID);const Pt=Tt-Bt.startTime;return Rt.idleTimeoutID=Ct(Dt,ht),Rt.ageTimeoutID=Ct(Dt,gt-Pt),Rt}function Ct(Rt,Tt){return setTimeout(()=>{var Bt;const Dt=(Bt=(0,Be._getStatsigGlobal)())===null||Bt===void 0?void 0:Bt.instance(Rt);Dt&&Dt.$emt({name:"session_expired"})},Tt)}function yt({lastUpdate:Rt}){return Date.now()-Rt>ht}function vt({startTime:Rt}){return Date.now()-Rt>gt}function bt(Rt){return`statsig.session_id.${(0,Ye._getStorageKey)(Rt)}`}function It(Rt,Tt){const Bt=bt(Tt);try{(0,nt._setObjectInStorage)(Bt,Rt)}catch{tt.Log.warn("Failed to save SessionID")}}function wt(Rt){const Tt=bt(Rt);return(0,nt._getObjectFromStorage)(Tt)}})(SessionID);var StatsigClientEventEmitter={};Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"};var __awaiter$b=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(NetworkCore$1,"__esModule",{value:!0}),NetworkCore$1.NetworkCore=void 0;const __StatsigGlobal_1$1=$_StatsigGlobal,Diagnostics_1=Diagnostics,Log_1$2=Log,NetworkConfig_1=NetworkConfig,NetworkFallbackResolver_1=NetworkFallbackResolver$1,SDKFlags_1=SDKFlags,SDKType_1=SDKType,SafeJs_1$1=SafeJs,SessionID_1$1=SessionID,StableID_1$1=StableID,StatsigClientEventEmitter_1=StatsigClientEventEmitter,StatsigMetadata_1=StatsigMetadata,StatsigOptionsCommon_1$1=StatsigOptionsCommon,VisibilityObserving_1=VisibilityObserving,DEFAULT_TIMEOUT_MS=1e4,BACKOFF_BASE_MS=500,BACKOFF_MAX_MS=3e4,RATE_LIMIT_WINDOW_MS=1e3,RATE_LIMIT_MAX_REQ_COUNT=50,LEAK_RATE=RATE_LIMIT_MAX_REQ_COUNT/RATE_LIMIT_WINDOW_MS,RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]);class NetworkCore{constructor(Be,Ye){this._emitter=Ye,this._errorBoundary=null,this._timeout=DEFAULT_TIMEOUT_MS,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,Be&&(this._options=Be),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new NetworkFallbackResolver_1.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(Be))}setLogEventCompressionMode(Be){this._options.logEventCompressionMode=Be}setErrorBoundary(Be){this._errorBoundary=Be,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(Be)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const Be=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,Be}beacon(Be){if(!_ensureValidSdkKey(Be))return!1;const Ye=this._getInternalRequestArgs("POST",Be),tt=this._getPopulatedURL(Ye),nt=navigator;return nt.sendBeacon.bind(nt)(tt,Ye.body)}post(Be){return __awaiter$b(this,void 0,void 0,function*(){const Ye=this._getInternalRequestArgs("POST",Be);return this._tryEncodeBody(Ye),yield this._tryToCompressBody(Ye),this._sendRequest(Ye)})}get(Be){const Ye=this._getInternalRequestArgs("GET",Be);return this._sendRequest(Ye)}_sendRequest(Be){return __awaiter$b(this,void 0,void 0,function*(){var Ye,tt,nt,ft;if(!_ensureValidSdkKey(Be)||this._netConfig.preventAllNetworkTraffic)return null;const{method:ht,body:gt,retries:At,attempt:xt}=Be,Et=Be.urlConfig.endpoint;if(this._isRateLimited(Et))return Log_1$2.Log.warn(`Request to ${Et} was blocked because you are making requests too frequently.`),null;const kt=xt??1;let Ct=!1;const yt=this._getPopulatedURL(Be);let vt=null;const bt=(0,VisibilityObserving_1._isUnloading)();try{const It={method:ht,body:gt,headers:Object.assign({},Be.headers),priority:Be.priority,keepalive:bt};_tryMarkInitStart(Be,kt);const wt=this._leakyBucket[Et];wt&&(wt.lastRequestTime=Date.now(),this._leakyBucket[Et]=wt);const Rt=(Ye=this._netConfig.networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch;let Tt;if(vt=yield Promise.race([Rt(yt,It).finally(()=>clearTimeout(Tt)),new Promise((Dt,Pt)=>{Tt=setTimeout(()=>{Ct=!0,Pt(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!vt.ok){const Dt=yield vt.text().catch(()=>"No Text"),Pt=new Error(`NetworkError: ${yt} ${Dt}`);throw Pt.name="NetworkError",Pt}const Bt=yield vt.text();return _tryMarkInitEnd(Be,vt,kt,Bt),this._fallbackResolver.tryBumpExpiryTime(Be.sdkKey,Be.urlConfig),{body:Bt,code:vt.status}}catch(It){const wt=_getErrorMessage(It),Rt=_didTimeout(wt??"",Ct);if(_tryMarkInitEnd(Be,vt,kt,"",It),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(Be.sdkKey,Be.urlConfig,wt,Rt))&&(Be.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(Be.sdkKey,Be.urlConfig)),!At||kt>At||!RETRYABLE_CODES.has((tt=vt==null?void 0:vt.status)!==null&&tt!==void 0?tt:500)){(nt=this._emitter)===null||nt===void 0||nt.call(this,{name:"error",error:It,tag:StatsigClientEventEmitter_1.ErrorTag.NetworkError,requestArgs:Be});const Bt=`A networking error occurred during ${ht} request to ${yt}.`;return Log_1$2.Log.error(Bt,wt,It),(ft=this._errorBoundary)===null||ft===void 0||ft.attachErrorIfNoneExists(Bt),null}return yield _exponentialBackoff(kt),this._sendRequest(Object.assign(Object.assign({},Be),{retries:At,attempt:kt+1}))}})}_getLogEventCompressionMode(Be){let Ye=Be==null?void 0:Be.logEventCompressionMode;return!Ye&&(Be==null?void 0:Be.disableCompression)===!0&&(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled),Ye||(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled),Ye}_isRateLimited(Be){var Ye;const tt=Date.now(),nt=(Ye=this._leakyBucket[Be])!==null&&Ye!==void 0?Ye:{count:0,lastRequestTime:tt},ft=tt-nt.lastRequestTime,ht=Math.floor(ft*LEAK_RATE);return nt.count=Math.max(0,nt.count-ht),nt.count>=RATE_LIMIT_MAX_REQ_COUNT?!0:(nt.count+=1,nt.lastRequestTime=tt,this._leakyBucket[Be]=nt,!1)}_getPopulatedURL(Be){var Ye;const tt=(Ye=Be.fallbackUrl)!==null&&Ye!==void 0?Ye:Be.urlConfig.getUrl();(Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize||Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=tt);const nt=Object.assign({[NetworkConfig_1.NetworkParam.SdkKey]:Be.sdkKey,[NetworkConfig_1.NetworkParam.SdkType]:SDKType_1.SDKType._get(Be.sdkKey),[NetworkConfig_1.NetworkParam.SdkVersion]:StatsigMetadata_1.SDK_VERSION,[NetworkConfig_1.NetworkParam.Time]:String(Date.now()),[NetworkConfig_1.NetworkParam.SessionID]:SessionID_1$1.SessionID.get(Be.sdkKey)},Be.params),ft=Object.keys(nt).map(ht=>`${encodeURIComponent(ht)}=${encodeURIComponent(nt[ht])}`).join("&");return`${tt}${ft?`?${ft}`:""}`}_tryEncodeBody(Be){var Ye;const tt=(0,SafeJs_1$1._getWindowSafe)(),nt=Be.body;if(!(!Be.isStatsigEncodable||this._options.disableStatsigEncoding||typeof nt!="string"||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-encode")!=null||!(tt!=null&&tt.btoa)))try{Be.body=tt.btoa(nt).split("").reverse().join(""),Be.params=Object.assign(Object.assign({},(Ye=Be.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.StatsigEncoded]:"1"})}catch(ft){Log_1$2.Log.warn(`Request encoding failed for ${Be.urlConfig.getUrl()}`,ft)}}_tryToCompressBody(Be){return __awaiter$b(this,void 0,void 0,function*(){var Ye;const tt=Be.body;if(!(typeof tt!="string"||!_allowCompression(Be,this._options)))try{const nt=new TextEncoder().encode(tt),ft=new CompressionStream("gzip"),ht=ft.writable.getWriter();ht.write(nt).catch(Log_1$2.Log.error),ht.close().catch(Log_1$2.Log.error);const gt=ft.readable.getReader(),At=[];let xt;for(;!(xt=yield gt.read()).done;)At.push(xt.value);const Et=At.reduce((yt,vt)=>yt+vt.length,0),kt=new Uint8Array(Et);let Ct=0;for(const yt of At)kt.set(yt,Ct),Ct+=yt.length;Be.body=kt,Be.params=Object.assign(Object.assign({},(Ye=Be.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.IsGzipped]:"1"})}catch(nt){Log_1$2.Log.warn(`Request compression failed for ${Be.urlConfig.getUrl()}`,nt)}})}_getInternalRequestArgs(Be,Ye){const tt=this._fallbackResolver.getActiveFallbackUrl(Ye.sdkKey,Ye.urlConfig),nt=Object.assign(Object.assign({},Ye),{method:Be,fallbackUrl:tt});return"data"in Ye&&_populateRequestBody(nt,Ye.data),nt}}NetworkCore$1.NetworkCore=NetworkCore;const _ensureValidSdkKey=Le=>Le.sdkKey?!0:(Log_1$2.Log.warn("Unable to make request without an SDK key"),!1),_populateRequestBody=(Le,Be)=>{const{sdkKey:Ye,fallbackUrl:tt}=Le,nt=StableID_1$1.StableID.get(Ye),ft=SessionID_1$1.SessionID.get(Ye),ht=SDKType_1.SDKType._get(Ye);Le.body=JSON.stringify(Object.assign(Object.assign({},Be),{statsigMetadata:Object.assign(Object.assign({},StatsigMetadata_1.StatsigMetadataProvider.get()),{stableID:nt,sessionID:ft,sdkType:ht,fallbackUrl:tt})}))};function _allowCompression(Le,Be){if(!Le.isCompressable||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const Ye=Le.urlConfig.customUrl!=null||Le.urlConfig.fallbackUrls!=null,tt=SDKFlags_1.SDKFlags.get(Le.sdkKey,"enable_log_event_compression")===!0;switch(Be.logEventCompressionMode){case StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled:return!1;case StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled:return!(Ye&&!tt);case StatsigOptionsCommon_1$1.LogEventCompressionMode.Forced:return!0;default:return!1}}function _getErrorMessage(Le){return typeof Le=="string"?Le:Le instanceof Error?`${Le.name}: ${Le.message}`:"Unknown Error"}function _didTimeout(Le,Be){return Le.includes("Timeout")||Be}function _tryMarkInitStart(Le,Be){Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqStart(Le.sdkKey,{attempt:Be})}function _tryMarkInitEnd(Le,Be,Ye,tt,nt){Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqEnd(Le.sdkKey,Diagnostics_1.Diagnostics._getDiagnosticsData(Be,Ye,tt,nt))}function _exponentialBackoff(Le){return __awaiter$b(this,void 0,void 0,function*(){yield new Promise(Be=>setTimeout(Be,Math.min(BACKOFF_BASE_MS*(Le*Le),BACKOFF_MAX_MS)))})}var OverrideAdapter={};Object.defineProperty(OverrideAdapter,"__esModule",{value:!0});var ParamStoreTypes={};Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0});var SizeOf={};(function(Le){Object.defineProperty(Le,"__esModule",{value:!0}),Le._fastApproxSizeOf=void 0;const Be=2,Ye=1,tt=(nt,ft)=>{let ht=0;const gt=Object.keys(nt);for(let At=0;At<gt.length;At++){const xt=gt[At],Et=nt[xt];if(ht+=xt.length,typeof Et=="object"&&Et!==null?ht+=(0,Le._fastApproxSizeOf)(Et,ft)+Be:ht+=String(Et).length+Ye,ht>=ft)return ht}return ht};Le._fastApproxSizeOf=tt})(SizeOf);var StatsigClientBase$1={},__awaiter$a=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(StatsigClientBase$1,"__esModule",{value:!0}),StatsigClientBase$1.StatsigClientBase=void 0;const __StatsigGlobal_1=$_StatsigGlobal,ErrorBoundary_1=ErrorBoundary,EventLogger_1=EventLogger$1,Log_1$1=Log,MemoKey_1=MemoKey,SafeJs_1=SafeJs,SessionID_1=SessionID,StableID_1=StableID,StatsigOptionsCommon_1=StatsigOptionsCommon,StorageProvider_1=StorageProvider,MAX_MEMO_CACHE_SIZE=3e3;class StatsigClientBase{constructor(Be,Ye,tt,nt){var ft,ht,gt,At;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const xt=this.$emt.bind(this);(nt==null?void 0:nt.logLevel)!=null&&(Log_1$1.Log.level=nt.logLevel),nt!=null&&nt.disableStorage&&StorageProvider_1.Storage._setDisabled(!0),nt!=null&&nt.initialSessionID&&SessionID_1.StatsigSession.overrideInitialSessionID(nt.initialSessionID,Be),nt!=null&&nt.storageProvider&&StorageProvider_1.Storage._setProvider(nt.storageProvider),nt!=null&&nt.enableCookies&&StableID_1.StableID._setCookiesEnabled(Be,nt.enableCookies),nt!=null&&nt.disableStableID&&StableID_1.StableID._setDisabled(Be,!0),this._sdkKey=Be,this._options=nt??{},this._memoCache={},this.overrideAdapter=(ft=nt==null?void 0:nt.overrideAdapter)!==null&&ft!==void 0?ft:null,this._logger=new EventLogger_1.EventLogger(Be,xt,tt,nt),this._errorBoundary=new ErrorBoundary_1.ErrorBoundary(Be,nt,xt),this._errorBoundary.wrap(this),this._errorBoundary.wrap(Ye),this._errorBoundary.wrap(this._logger),tt.setErrorBoundary(this._errorBoundary),this.dataAdapter=Ye,this.dataAdapter.attach(Be,nt,tt),this.storageProvider=StorageProvider_1.Storage,(At=(gt=(ht=this.overrideAdapter)===null||ht===void 0?void 0:ht.loadFromStorage)===null||gt===void 0?void 0:gt.call(ht))===null||At===void 0||At.catch(Et=>this._errorBoundary.logError("OA::loadFromStorage",Et)),this._primeReadyRipcord(),_assignGlobalInstance(Be,this)}updateRuntimeOptions(Be){Be.loggingEnabled?(this._options.loggingEnabled=Be.loggingEnabled,this._logger.setLoggingEnabled(Be.loggingEnabled)):Be.disableLogging!=null&&(this._options.disableLogging=Be.disableLogging,this._logger.setLoggingEnabled(Be.disableLogging?"disabled":"browser-only")),Be.disableStorage!=null&&(this._options.disableStorage=Be.disableStorage,StorageProvider_1.Storage._setDisabled(Be.disableStorage)),Be.enableCookies!=null&&(this._options.enableCookies=Be.enableCookies,StableID_1.StableID._setCookiesEnabled(this._sdkKey,Be.enableCookies)),Be.logEventCompressionMode?this._logger.setLogEventCompressionMode(Be.logEventCompressionMode):Be.disableCompression&&this._logger.setLogEventCompressionMode(StatsigOptionsCommon_1.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return __awaiter$a(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(Be,Ye){this._listeners[Be]||(this._listeners[Be]=[]),this._listeners[Be].push(Ye)}off(Be,Ye){if(this._listeners[Be]){const tt=this._listeners[Be].indexOf(Ye);tt!==-1&&this._listeners[Be].splice(tt,1)}}$on(Be,Ye){Ye.__isInternal=!0,this.on(Be,Ye)}$emt(Be){var Ye;const tt=nt=>{try{nt(Be)}catch(ft){if(nt.__isInternal===!0){this._errorBoundary.logError(`__emit:${Be.name}`,ft);return}Log_1$1.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",Be)}};this._listeners[Be.name]&&this._listeners[Be.name].forEach(nt=>tt(nt)),(Ye=this._listeners["*"])===null||Ye===void 0||Ye.forEach(tt)}_setStatus(Be,Ye){this.loadingStatus=Be,this._memoCache={},this.$emt({name:"values_updated",status:Be,values:Ye})}_enqueueExposure(Be,Ye,tt){if((tt==null?void 0:tt.disableExposureLog)===!0){this._logger.incrementNonExposureCount(Be);return}this._logger.enqueue(Ye)}_memoize(Be,Ye){return(tt,nt)=>{if(this._options.disableEvaluationMemoization)return Ye(tt,nt);const ft=(0,MemoKey_1.createMemoKey)(Be,tt,nt);return ft?(ft in this._memoCache||(Object.keys(this._memoCache).length>=MAX_MEMO_CACHE_SIZE&&(this._memoCache={}),this._memoCache[ft]=Ye(tt,nt)),this._memoCache[ft]):Ye(tt,nt)}}}StatsigClientBase$1.StatsigClientBase=StatsigClientBase;function _assignGlobalInstance(Le,Be){var Ye;if((0,SafeJs_1._isServerEnv)())return;const tt=(0,__StatsigGlobal_1._getStatsigGlobal)(),nt=(Ye=tt.instances)!==null&&Ye!==void 0?Ye:{},ft=Be;nt[Le]!=null&&Log_1$1.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),nt[Le]=ft,tt.firstInstance||(tt.firstInstance=ft),tt.instances=nt,__STATSIG__=tt}var StatsigDataAdapter={};Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached";var StatsigPlugin={};Object.defineProperty(StatsigPlugin,"__esModule",{value:!0});var StatsigTypeFactories={};Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const Log_1=Log,TypingUtils_1=TypingUtils;function _makeEvaluation(Le,Be,Ye,tt){var nt;return{name:Le,details:Be,ruleID:(nt=Ye==null?void 0:Ye.rule_id)!==null&&nt!==void 0?nt:"",__evaluation:Ye,value:tt}}function _makeFeatureGate(Le,Be,Ye){var tt;return Object.assign(Object.assign({},_makeEvaluation(Le,Be,Ye,(Ye==null?void 0:Ye.value)===!0)),{idType:(tt=Ye==null?void 0:Ye.id_type)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeFeatureGate=_makeFeatureGate;function _makeDynamicConfig(Le,Be,Ye){var tt,nt;const ft=(tt=Ye==null?void 0:Ye.value)!==null&&tt!==void 0?tt:{};return Object.assign(Object.assign({},_makeEvaluation(Le,Be,Ye,ft)),{idType:(nt=Ye==null?void 0:Ye.id_type)!==null&&nt!==void 0?nt:null,get:_makeTypedGet(Le,Ye==null?void 0:Ye.value)})}StatsigTypeFactories._makeDynamicConfig=_makeDynamicConfig;function _makeExperiment(Le,Be,Ye){var tt;const nt=_makeDynamicConfig(Le,Be,Ye);return Object.assign(Object.assign({},nt),{groupName:(tt=Ye==null?void 0:Ye.group_name)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeExperiment=_makeExperiment;function _makeLayer(Le,Be,Ye,tt){var nt,ft;return Object.assign(Object.assign({},_makeEvaluation(Le,Be,Ye,void 0)),{get:_makeTypedGet(Le,Ye==null?void 0:Ye.value,tt),groupName:(nt=Ye==null?void 0:Ye.group_name)!==null&&nt!==void 0?nt:null,__value:(ft=Ye==null?void 0:Ye.value)!==null&&ft!==void 0?ft:{}})}StatsigTypeFactories._makeLayer=_makeLayer;function _mergeOverride(Le,Be,Ye,tt){return Object.assign(Object.assign(Object.assign({},Le),Be),{get:_makeTypedGet(Le.name,Ye,tt)})}StatsigTypeFactories._mergeOverride=_mergeOverride;function _makeTypedGet(Le,Be,Ye){return(tt,nt)=>{var ft;const ht=(ft=Be==null?void 0:Be[tt])!==null&&ft!==void 0?ft:null;return ht==null?nt??null:nt!=null&&!(0,TypingUtils_1._isTypeMatch)(ht,nt)?(Log_1.Log.warn(`Parameter type mismatch. '${Le}.${tt}' was found to be type '${typeof ht}' but fallback/return type is '${typeof nt}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),nt??null):(Ye==null||Ye(tt),ht)}}StatsigTypeFactories._makeTypedGet=_makeTypedGet;var StatsigTypes={};Object.defineProperty(StatsigTypes,"__esModule",{value:!0});var StatsigUpdateDetails={};Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;const createUpdateDetails=(Le,Be,Ye,tt,nt,ft)=>({duration:Ye,source:Be,success:Le,error:tt,sourceUrl:nt,warnings:ft});StatsigUpdateDetails.createUpdateDetails=createUpdateDetails,StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},function(Le){var Be=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(xt,Et,kt,Ct){Ct===void 0&&(Ct=kt);var yt=Object.getOwnPropertyDescriptor(Et,kt);(!yt||("get"in yt?!Et.__esModule:yt.writable||yt.configurable))&&(yt={enumerable:!0,get:function(){return Et[kt]}}),Object.defineProperty(xt,Ct,yt)}:function(xt,Et,kt,Ct){Ct===void 0&&(Ct=kt),xt[Ct]=Et[kt]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(xt,Et){for(var kt in xt)kt!=="default"&&!Object.prototype.hasOwnProperty.call(Et,kt)&&Be(Et,xt,kt)};Object.defineProperty(Le,"__esModule",{value:!0}),Le.Storage=Le.Log=Le.EventLogger=Le.Diagnostics=void 0;const tt=$_StatsigGlobal,nt=Diagnostics;Object.defineProperty(Le,"Diagnostics",{enumerable:!0,get:function(){return nt.Diagnostics}});const ft=EventLogger$1;Object.defineProperty(Le,"EventLogger",{enumerable:!0,get:function(){return ft.EventLogger}});const ht=Log;Object.defineProperty(Le,"Log",{enumerable:!0,get:function(){return ht.Log}});const gt=StatsigMetadata,At=StorageProvider;Object.defineProperty(Le,"Storage",{enumerable:!0,get:function(){return At.Storage}}),Ye($_StatsigGlobal,Le),Ye(CacheKey,Le),Ye(ClientInterfaces,Le),Ye(DataAdapterCore$1,Le),Ye(Diagnostics,Le),Ye(DownloadConfigSpecsResponse,Le),Ye(ErrorBoundary,Le),Ye(EvaluationOptions,Le),Ye(EvaluationTypes,Le),Ye(Hashing,Le),Ye(InitializeResponse,Le),Ye(Log,Le),Ye(MemoKey,Le),Ye(NetworkConfig,Le),Ye(NetworkCore$1,Le),Ye(OverrideAdapter,Le),Ye(ParamStoreTypes,Le),Ye(SafeJs,Le),Ye(SDKType,Le),Ye(SessionID,Le),Ye(SizeOf,Le),Ye(StableID,Le),Ye(StatsigClientBase$1,Le),Ye(StatsigClientEventEmitter,Le),Ye(StatsigDataAdapter,Le),Ye(StatsigEvent,Le),Ye(StatsigMetadata,Le),Ye(StatsigOptionsCommon,Le),Ye(StatsigPlugin,Le),Ye(StatsigTypeFactories,Le),Ye(StatsigTypes,Le),Ye(StatsigUser,Le),Ye(StorageProvider,Le),Ye(TypedJsonParse,Le),Ye(TypingUtils,Le),Ye(UrlConfiguration$1,Le),Ye(UUID,Le),Ye(VisibilityObserving,Le),Ye(StatsigUpdateDetails,Le),Ye(SDKFlags,Le),Object.assign((0,tt._getStatsigGlobal)(),{Log:ht.Log,SDK_VERSION:gt.SDK_VERSION})}(src$1);var StatsigClient$1={},EvaluationStore$1={},V1InitializeContainer$1={};Object.defineProperty(V1InitializeContainer$1,"__esModule",{value:!0}),V1InitializeContainer$1.V1InitializeContainer=void 0;const client_core_1$7=src$1;class V1InitializeContainer{constructor(Be){this._values=Be}getGate(Be){return this._getResultFromLookup(this._values.feature_gates,Be)}getConfig(Be){return this._getResultFromLookup(this._values.dynamic_configs,Be)}getLayer(Be){return this._getResultFromLookup(this._values.layer_configs,Be)}getParamStore(Be){return this._getResultFromLookup(this._values.param_stores,Be)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Be,Ye){var tt,nt;return Be&&(nt=(tt=Be[Ye])!==null&&tt!==void 0?tt:Be[(0,client_core_1$7._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V1InitializeContainer$1.V1InitializeContainer=V1InitializeContainer;var V2InitializeContainer$1={};Object.defineProperty(V2InitializeContainer$1,"__esModule",{value:!0}),V2InitializeContainer$1.V2InitializeContainer=void 0;const client_core_1$6=src$1;class V2InitializeContainer{constructor(Be){this._values=Be}getGate(Be){var Ye,tt,nt;const ft=this._getResultFromLookup(this._values.feature_gates,Be);return ft?{name:Be,value:ft.v===!0,rule_id:(Ye=ft.r)!==null&&Ye!==void 0?Ye:"default",secondary_exposures:(tt=ft.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ft.i)!==null&&nt!==void 0?nt:""}:null}getConfig(Be){var Ye,tt,nt,ft;const ht=this._getResultFromLookup(this._values.dynamic_configs,Be);return ht?{name:Be,value:(Ye=this._values.values[ht.v])!==null&&Ye!==void 0?Ye:{},rule_id:ht.r,secondary_exposures:(tt=ht.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ht.i)!==null&&nt!==void 0?nt:"",is_user_in_experiment:ht.ue===!0,passed:ht.p===!0,group_name:(ft=ht.gn)!==null&&ft!==void 0?ft:void 0,is_experiment_active:ht.ea===!0,group:ht.r,is_device_based:ht.i==="stableID"}:null}getLayer(Be){var Ye,tt,nt,ft,ht,gt;const At=this._getResultFromLookup(this._values.layer_configs,Be);return At?{name:Be,value:(Ye=this._values.values[At.v])!==null&&Ye!==void 0?Ye:{},rule_id:At.r,secondary_exposures:(tt=At.s)!==null&&tt!==void 0?tt:[],is_user_in_experiment:At.ue===!0,group_name:(nt=At.gn)!==null&&nt!==void 0?nt:void 0,is_experiment_active:At.ea===!0,group:At.r,is_device_based:At.i==="stableID",allocated_experiment_name:(ft=At.ae)!==null&&ft!==void 0?ft:"",explicit_parameters:(ht=At.ep)!==null&&ht!==void 0?ht:[],undelegated_secondary_exposures:(gt=At.us)!==null&>!==void 0?gt:[],parameter_rule_ids:At.pr}:null}getParamStore(Be){return this._getResultFromLookup(this._values.param_stores,Be)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Be,Ye){var tt,nt;return Be&&(nt=(tt=Be[Ye])!==null&&tt!==void 0?tt:Be[(0,client_core_1$6._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V2InitializeContainer$1.V2InitializeContainer=V2InitializeContainer,Object.defineProperty(EvaluationStore$1,"__esModule",{value:!0});const client_core_1$5=src$1,V1InitializeContainer_1=V1InitializeContainer$1,V2InitializeContainer_1=V2InitializeContainer$1;class EvaluationStore{constructor(Be){this._sdkKey=Be,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,client_core_1$5._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(Be,Ye){var tt,nt;if(!Be)return!1;const ft=(0,client_core_1$5._typedJsonParse)(Be.data,"has_updates","EvaluationResponse");return ft==null?!1:(this._source=Be.source,(ft==null?void 0:ft.has_updates)!==!0||((tt=ft.time)!==null&&tt!==void 0?tt:0)<this._lcut||(this._rawValues=Be.data,this._lcut=ft.time,this._receivedAt=Be.receivedAt,ft.response_format==="init-v2"?this._values=new V2InitializeContainer_1.V2InitializeContainer(ft):this._values=new V1InitializeContainer_1.V1InitializeContainer(ft),this._bootstrapMetadata=this._extractBootstrapMetadata(Be.source,ft),Be.source&&ft.user&&this._setWarningState(Ye,ft),client_core_1$5.SDKFlags.setFlags(this._sdkKey,(nt=ft.sdk_flags)!==null&&nt!==void 0?nt:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(Be){const Ye=this._values?this._values.getGate(Be):null;return this._getDetailedStoreResult(Ye)}getConfig(Be){const Ye=this._values?this._values.getConfig(Be):null;return this._getDetailedStoreResult(Ye)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(Be){const Ye=this._values?this._values.getLayer(Be):null;return this._getDetailedStoreResult(Ye)}getParamStore(Be){const Ye=this._values?this._values.getParamStore(Be):null;return this._getDetailedStoreResult(Ye)}getSource(){return this._source}getExposureMapping(){var Be;return(Be=this._values)===null||Be===void 0?void 0:Be.getExposureMapping()}_extractBootstrapMetadata(Be,Ye){if(Be!=="Bootstrap")return null;const tt={};return Ye.user&&(tt.user=Ye.user),Ye.sdkInfo&&(tt.generatorSDKInfo=Ye.sdkInfo),tt.lcut=Ye.time,tt}_getDetailedStoreResult(Be){return{result:Be,details:this._getDetails(Be==null)}}_setWarningState(Be,Ye){var tt,nt;const ft=client_core_1$5.StableID.get(this._sdkKey);if(((tt=Be.customIDs)===null||tt===void 0?void 0:tt.stableID)!==ft&&(!((nt=Be.customIDs)===null||nt===void 0)&&nt.stableID||ft)){this._warnings.add("StableIDMismatch");return}if("user"in Ye){const ht=Ye.user,gt=Object.assign(Object.assign({},Be),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,client_core_1$5._getFullUserHash)(gt)!==(0,client_core_1$5._getFullUserHash)(ht)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const Be={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(Be.warnings=Array.from(this._warnings)),Be}_getDetails(Be){var Ye,tt;const nt=this.getCurrentSourceDetails();let ft=nt.reason;const ht=(Ye=nt.warnings)!==null&&Ye!==void 0?Ye:[];this._source==="Bootstrap"&&ht.length>0&&(ft=ft+ht[0]),ft!=="Uninitialized"&&ft!=="NoValues"&&(ft=`${ft}:${Be?"Unrecognized":"Recognized"}`);const gt=this._source==="Bootstrap"&&(tt=this._bootstrapMetadata)!==null&&tt!==void 0?tt:void 0;return gt&&(nt.bootstrapMetadata=gt),Object.assign(Object.assign({},nt),{reason:ft})}}EvaluationStore$1.default=EvaluationStore;var Network={},EvaluationResponseDeltas={};Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const client_core_1$4=src$1,MAX_DELTAS_SORT_DEPTH=2;function _resolveDeltasResponse(Le,Be){const Ye=(0,client_core_1$4._typedJsonParse)(Be,"checksum","DeltasEvaluationResponse");if(!Ye)return{hadBadDeltaChecksum:!0};const tt=_mergeDeltasIntoCache(Le,Ye),nt=_handleDeletedEntries(tt),ft=(0,client_core_1$4._DJB2Object)({feature_gates:nt.feature_gates,dynamic_configs:nt.dynamic_configs,layer_configs:nt.layer_configs},MAX_DELTAS_SORT_DEPTH);return ft===Ye.checksumV2?JSON.stringify(nt):{hadBadDeltaChecksum:!0,badChecksum:ft,badMergedConfigs:nt,badFullResponse:Ye.deltas_full_response}}EvaluationResponseDeltas._resolveDeltasResponse=_resolveDeltasResponse;function _mergeDeltasIntoCache(Le,Be){return Object.assign(Object.assign(Object.assign({},Le),Be),{feature_gates:Object.assign(Object.assign({},Le.feature_gates),Be.feature_gates),layer_configs:Object.assign(Object.assign({},Le.layer_configs),Be.layer_configs),dynamic_configs:Object.assign(Object.assign({},Le.dynamic_configs),Be.dynamic_configs)})}function _handleDeletedEntries(Le){const Be=Le;return _deleteEntriesInRecord(Le.deleted_gates,Be.feature_gates),delete Be.deleted_gates,_deleteEntriesInRecord(Le.deleted_configs,Be.dynamic_configs),delete Be.deleted_configs,_deleteEntriesInRecord(Le.deleted_layers,Be.layer_configs),delete Be.deleted_layers,Be}function _deleteEntriesInRecord(Le,Be){Le==null||Le.forEach(Ye=>{delete Be[Ye]})}var __awaiter$9=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const client_core_1$3=src$1,EvaluationResponseDeltas_1=EvaluationResponseDeltas;class StatsigNetwork extends client_core_1$3.NetworkCore{constructor(Be,Ye){super(Be,Ye);const tt=Be==null?void 0:Be.networkConfig;this._option=Be,this._initializeUrlConfig=new client_core_1$3.UrlConfiguration(client_core_1$3.Endpoint._initialize,tt==null?void 0:tt.initializeUrl,tt==null?void 0:tt.api,tt==null?void 0:tt.initializeFallbackUrls)}fetchEvaluations(Be,Ye,tt,nt,ft){return __awaiter$9(this,void 0,void 0,function*(){var ht,gt,At,xt,Et,kt;const Ct=Ye?(0,client_core_1$3._typedJsonParse)(Ye,"has_updates","InitializeResponse"):null;let yt={user:nt,hash:(At=(gt=(ht=this._option)===null||ht===void 0?void 0:ht.networkConfig)===null||gt===void 0?void 0:gt.initializeHashAlgorithm)!==null&&At!==void 0?At:"djb2",deltasResponseRequested:!1,full_checksum:null};if(Ct!=null&&Ct.has_updates){const vt=(Ct==null?void 0:Ct.hash_used)!==((kt=(Et=(xt=this._option)===null||xt===void 0?void 0:xt.networkConfig)===null||Et===void 0?void 0:Et.initializeHashAlgorithm)!==null&&kt!==void 0?kt:"djb2");yt=Object.assign(Object.assign({},yt),{sinceTime:ft&&!vt?Ct.time:0,previousDerivedFields:"derived_fields"in Ct&&ft?Ct.derived_fields:{},deltasResponseRequested:!0,full_checksum:Ct.full_checksum,partialUserMatchSinceTime:vt?0:Ct.time})}return this._fetchEvaluations(Be,Ct,yt,tt)})}_fetchEvaluations(Be,Ye,tt,nt){return __awaiter$9(this,void 0,void 0,function*(){var ft,ht;const gt=yield this.post({sdkKey:Be,urlConfig:this._initializeUrlConfig,data:tt,retries:2,isStatsigEncodable:!0,priority:nt});if((gt==null?void 0:gt.code)===204)return'{"has_updates": false}';if((gt==null?void 0:gt.code)!==200)return(ft=gt==null?void 0:gt.body)!==null&&ft!==void 0?ft:null;if((Ye==null?void 0:Ye.has_updates)!==!0||((ht=gt.body)===null||ht===void 0?void 0:ht.includes('"is_delta":true'))!==!0||tt.deltasResponseRequested!==!0)return gt.body;const At=(0,EvaluationResponseDeltas_1._resolveDeltasResponse)(Ye,gt.body);return typeof At=="string"?At:this._fetchEvaluations(Be,Ye,Object.assign(Object.assign(Object.assign({},tt),At),{deltasResponseRequested:!1}),nt)})}}Network.default=StatsigNetwork;var ParamStoreGetterFactory={};Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const client_core_1$2=src$1,NO_EXPOSURE_OPT={disableExposureLog:!0};function _shouldLogExposure(Le){return Le==null||Le.disableExposureLog===!1}function _shouldReturnFallback(Le,Be){return Be!=null&&!(0,client_core_1$2._isTypeMatch)(Le,Be)}function _getMappedStaticValue(Le,Be){return Le.value}function _getMappedGateValue(Le,Be,Ye){return Le.getFeatureGate(Be.gate_name,_shouldLogExposure(Ye)?void 0:NO_EXPOSURE_OPT).value?Be.pass_value:Be.fail_value}function _getMappedDynamicConfigValue(Le,Be,Ye,tt){const ft=Le.getDynamicConfig(Be.config_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Be.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedExperimentValue(Le,Be,Ye,tt){const ft=Le.getExperiment(Be.experiment_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Be.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedLayerValue(Le,Be,Ye,tt){const ft=Le.getLayer(Be.layer_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Be.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _makeParamStoreGetter(Le,Be,Ye){return(tt,nt)=>{if(Be==null)return nt;const ft=Be[tt];if(ft==null||nt!=null&&(0,client_core_1$2._typeOf)(nt)!==ft.param_type)return nt;switch(ft.ref_type){case"static":return _getMappedStaticValue(ft);case"gate":return _getMappedGateValue(Le,ft,Ye);case"dynamic_config":return _getMappedDynamicConfigValue(Le,ft,nt,Ye);case"experiment":return _getMappedExperimentValue(Le,ft,nt,Ye);case"layer":return _getMappedLayerValue(Le,ft,nt,Ye);default:return nt}}}ParamStoreGetterFactory._makeParamStoreGetter=_makeParamStoreGetter;var StatsigEvaluationsDataAdapter$1={},__awaiter$8=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter$1,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=void 0;const client_core_1$1=src$1,Network_1$1=Network;class StatsigEvaluationsDataAdapter extends client_core_1$1.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(Be,Ye,tt){super.attach(Be,Ye,tt),tt!==null&&tt instanceof Network_1$1.default?this._network=tt:this._network=new Network_1$1.default(Ye??{})}getDataAsync(Be,Ye,tt){return this._getDataAsyncImpl(Be,(0,client_core_1$1._normalizeUser)(Ye,this._options),tt)}prefetchData(Be,Ye){return this._prefetchDataImpl(Be,Ye)}setData(Be){const Ye=(0,client_core_1$1._typedJsonParse)(Be,"has_updates","data");Ye&&"user"in Ye?super.setData(Be,Ye.user):client_core_1$1.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(Be,Ye){super.setData(Be,Ye)}_fetchFromNetwork(Be,Ye,tt,nt){return __awaiter$8(this,void 0,void 0,function*(){var ft;const ht=yield(ft=this._network)===null||ft===void 0?void 0:ft.fetchEvaluations(this._getSdkKey(),Be,tt==null?void 0:tt.priority,Ye,nt);return ht??null})}_getCacheKey(Be){var Ye;const tt=(0,client_core_1$1._getStorageKey)(this._getSdkKey(),Be,(Ye=this._options)===null||Ye===void 0?void 0:Ye.customUserCacheKeyFunc);return`${client_core_1$1.DataAdapterCachePrefix}.${this._cacheSuffix}.${tt}`}_isCachedResultValidFor204(Be,Ye){return Be.fullUserHash!=null&&Be.fullUserHash===(0,client_core_1$1._getFullUserHash)(Ye)}}StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=StatsigEvaluationsDataAdapter;var __awaiter$7=commonjsGlobal&&commonjsGlobal.__awaiter||function(Le,Be,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Le,Be||[])).next())})};Object.defineProperty(StatsigClient$1,"__esModule",{value:!0});const client_core_1=src$1,EvaluationStore_1=EvaluationStore$1,Network_1=Network,ParamStoreGetterFactory_1=ParamStoreGetterFactory,StatsigEvaluationsDataAdapter_1=StatsigEvaluationsDataAdapter$1;class StatsigClient extends client_core_1.StatsigClientBase{static instance(Be){const Ye=(0,client_core_1._getStatsigGlobal)().instance(Be);return Ye instanceof StatsigClient?Ye:(client_core_1.Log.warn((0,client_core_1._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new StatsigClient(Be??"",{}))}constructor(Be,Ye,tt=null){var nt,ft;client_core_1.SDKType._setClientType(Be,"javascript-client");const ht=new Network_1.default(tt,At=>{this.$emt(At)});super(Be,(nt=tt==null?void 0:tt.dataAdapter)!==null&&nt!==void 0?nt:new StatsigEvaluationsDataAdapter_1.StatsigEvaluationsDataAdapter,ht,tt),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(client_core_1.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(client_core_1.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(client_core_1.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(client_core_1.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(client_core_1.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(client_core_1.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new EvaluationStore_1.default(Be),this._network=ht,this._user=this._configureUser(Ye,tt),this._sdkInstanceID=(0,client_core_1.getUUID)();const gt=(ft=tt==null?void 0:tt.plugins)!==null&&ft!==void 0?ft:[];for(const At of gt)At.bind(this)}initializeSync(Be){var Ye;return this.loadingStatus!=="Uninitialized"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(Ye=this._store.getWarnings())!==null&&Ye!==void 0?Ye:[]]):(this._logger.start(),this.updateUserSync(this._user,Be))}initializeAsync(Be){return __awaiter$7(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(Be),this._initializePromise)})}updateUserSync(Be,Ye){const tt=performance.now();try{return this._updateUserSyncImpl(Be,Ye,tt)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}}_updateUserSyncImpl(Be,Ye,tt){var nt;const ft=[...(nt=this._store.getWarnings())!==null&&nt!==void 0?nt:[]];this._resetForUser(Be);const ht=this.dataAdapter.getDataSync(this._user);ht==null&&ft.push("NoCachedValues"),this._store.setValues(ht,this._user),this._finalizeUpdate(ht);const gt=Ye==null?void 0:Ye.disableBackgroundCacheRefresh;return gt===!0||gt==null&&(ht==null?void 0:ht.source)==="Bootstrap"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft):(this._runPostUpdate(ht??null,this._user),(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft))}updateUserAsync(Be,Ye){return __awaiter$7(this,void 0,void 0,function*(){const tt=performance.now();try{return yield this._updateUserAsyncImpl(Be,Ye)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}})}_updateUserAsyncImpl(Be,Ye){return __awaiter$7(this,void 0,void 0,function*(){this._resetForUser(Be);const tt=this._user;client_core_1.Diagnostics._markInitOverallStart(this._sdkKey);let nt=this.dataAdapter.getDataSync(tt);if(this._store.setValues(nt,this._user),this._setStatus("Loading",nt),nt=yield this.dataAdapter.getDataAsync(nt,tt,Ye),tt!==this._user)return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let ft=!1;nt!=null&&(client_core_1.Diagnostics._markInitProcessStart(this._sdkKey),ft=this._store.setValues(nt,this._user),client_core_1.Diagnostics._markInitProcessEnd(this._sdkKey,{success:ft})),this._finalizeUpdate(nt),ft||(this._errorBoundary.attachErrorIfNoneExists(client_core_1.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),client_core_1.Diagnostics._markInitOverallEnd(this._sdkKey,ft,this._store.getCurrentSourceDetails());const ht=client_core_1.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,client_core_1.createUpdateDetails)(ft,this._store.getSource(),ht,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:client_core_1.StatsigSession.get(this._sdkKey),stableID:client_core_1.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(Be,Ye){return this.getFeatureGate(Be,Ye).value}logEvent(Be,Ye,tt){const nt=typeof Be=="string"?{eventName:Be,value:Ye,metadata:tt}:Be;this.$emt({name:"log_event_called",event:nt}),this._logger.enqueue(Object.assign(Object.assign({},nt),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(Be){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:Be}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(Be){return __awaiter$7(this,void 0,void 0,function*(){return client_core_1.Storage.isReady()||(yield client_core_1.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,Be)})}_createErrorUpdateDetails(Be,Ye){var tt;return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),performance.now()-Ye,Be,null,[...(tt=this._store.getWarnings())!==null&&tt!==void 0?tt:[]])}_finalizeUpdate(Be){this._store.finalize(),this._setStatus("Ready",Be)}_runPostUpdate(Be,Ye){this.dataAdapter.getDataAsync(Be,Ye,{priority:"low"}).catch(tt=>{client_core_1.Log.error("An error occurred after update.",tt)})}_resetForUser(Be){this._logger.reset(),this._store.reset(),this._user=this._configureUser(Be,this._options)}_configureUser(Be,Ye){var tt,nt,ft;const ht=(0,client_core_1._normalizeUser)(Be,Ye),gt=(tt=ht.customIDs)===null||tt===void 0?void 0:tt.stableID;if(gt){const At=(ft=(nt=this.storageProvider).isReadyResolver)===null||ft===void 0?void 0:ft.call(nt);At?At.then(()=>client_core_1.StableID.setOverride(gt,this._sdkKey),()=>client_core_1.StableID.setOverride(gt,this._sdkKey)):client_core_1.StableID.setOverride(gt,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(ht.analyticsOnlyMetadata=Object.assign(Object.assign({},ht.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),ht}_getFeatureGateImpl(Be,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getGate(Be),gt=(0,client_core_1._makeFeatureGate)(Be,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getGateOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Be,(0,client_core_1._createGateExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"gate_evaluation",gate:xt}),xt}_getDynamicConfigImpl(Be,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getConfig(Be),gt=(0,client_core_1._makeDynamicConfig)(Be,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getDynamicConfigOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Be,(0,client_core_1._createConfigExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:xt}),xt}_getExperimentImpl(Be,Ye){var tt,nt,ft,ht;const{result:gt,details:At}=this._store.getConfig(Be),xt=(0,client_core_1._makeExperiment)(Be,At,gt);xt.__evaluation!=null&&(xt.__evaluation.secondary_exposures=(0,client_core_1._mapExposures)((nt=(tt=xt.__evaluation)===null||tt===void 0?void 0:tt.secondary_exposures)!==null&&nt!==void 0?nt:[],this._store.getExposureMapping()));const Et=(ht=(ft=this.overrideAdapter)===null||ft===void 0?void 0:ft.getExperimentOverride)===null||ht===void 0?void 0:ht.call(ft,xt,this._user,Ye),kt=Et??xt;return this._enqueueExposure(Be,(0,client_core_1._createConfigExposure)(this._user,kt,this._store.getExposureMapping()),Ye),this.$emt({name:"experiment_evaluation",experiment:kt}),kt}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(Be,Ye){var tt,nt,ft;const{result:ht,details:gt}=this._store.getLayer(Be),At=(0,client_core_1._makeLayer)(Be,gt,ht),xt=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getLayerOverride)===null||nt===void 0?void 0:nt.call(tt,At,this._user,Ye);Ye!=null&&Ye.disableExposureLog&&this._logger.incrementNonExposureCount(Be);const Et=(0,client_core_1._mergeOverride)(At,xt,(ft=xt==null?void 0:xt.__value)!==null&&ft!==void 0?ft:At.__value,kt=>{Ye!=null&&Ye.disableExposureLog||this._enqueueExposure(Be,(0,client_core_1._createLayerParameterExposure)(this._user,Et,kt,this._store.getExposureMapping()),Ye)});return this.$emt({name:"layer_evaluation",layer:Et}),Et}_getParameterStoreImpl(Be,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getParamStore(Be);this._logger.incrementNonExposureCount(Be);const gt={name:Be,details:ht,__configuration:ft,get:(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,ft,Ye)},At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getParamStoreOverride)===null||nt===void 0?void 0:nt.call(tt,gt,Ye);return At!=null&&(gt.__configuration=At.config,gt.details=At.details,gt.get=(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,At.config,Ye)),gt}}StatsigClient$1.default=StatsigClient,function(Le){var Be=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,gt,At,xt){xt===void 0&&(xt=At);var Et=Object.getOwnPropertyDescriptor(gt,At);(!Et||("get"in Et?!gt.__esModule:Et.writable||Et.configurable))&&(Et={enumerable:!0,get:function(){return gt[At]}}),Object.defineProperty(ht,xt,Et)}:function(ht,gt,At,xt){xt===void 0&&(xt=At),ht[xt]=gt[At]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,gt){for(var At in ht)At!=="default"&&!Object.prototype.hasOwnProperty.call(gt,At)&&Be(gt,ht,At)};Object.defineProperty(Le,"__esModule",{value:!0}),Le.StatsigClient=void 0;const tt=src$1,nt=StatsigClient$1;Le.StatsigClient=nt.default,Ye(src$1,Le);const ft=Object.assign((0,tt._getStatsigGlobal)(),{StatsigClient:nt.default});Le.default=ft}(src$2);const FEATURE_FLAGS=["id_text_barcode_readability","selfie_local_lenses_check_web","id_model_hebrew_back_id","id_face_readability","new_id_capture_ux_least_risky_clients","id_test_aa","id_iou_check","iad_checks","iad_c_checks","new_fingerprint","mp_test_hashed_id","face_occlusion"],GLOBAL_FLAGS=["new_fingerprint"],ID_MODULE_FLAGS=["id_face_readability","id_test_aa","iad_c_checks","mp_test_hashed_id","id_model_hebrew_back_id","id_iou_check","iad_checks","new_id_capture_ux_least_risky_clients","id_text_barcode_readability"],SELFIE_MODULE_FLAGS=["selfie_local_lenses_check_web","face_occlusion"];function getStatsigEnvironment(Le){return isStageK8sEnv(Le)?{tier:"development"}:isStageEnv(Le)||isDemoEnv(Le)?{tier:"staging"}:isSaasEnv(Le)?{tier:"production"}:{tier:"development"}}const clientApiKey="client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc",featureFlagsValues={id_text_barcode_readability:!1,selfie_local_lenses_check_web:!1,id_model_hebrew_back_id:!1,id_face_readability:!1,new_id_capture_ux_least_risky_clients:!1,id_test_aa:!1,iad_checks:!1,iad_c_checks:!1,id_iou_check:!0,new_fingerprint:!1,mp_test_hashed_id:!1,face_occlusion:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise=null;const initialize=async({flowId:Le,apiKey:Be,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(initPromise)return initPromise;initPromise=(async()=>{var gt;const ft={customIDs:{client_api_key:Be,hashed_onboarding_id:Ye,flow_id:Le},custom:{landing_page:(gt=window==null?void 0:window.location)==null?void 0:gt.href}},ht=new src$2.StatsigClient(clientApiKey,ft,{environment:getStatsigEnvironment(tt)});await ht.initializeAsync(),FEATURE_FLAGS.forEach(At=>{if(nt&&clientExperimentIds[At]===nt){featureFlagsValues[At]=!0;return}featureFlagsValues[At]=ht.checkGate(At)})})(),await initPromise},getFeatureFlag=Le=>featureFlagsValues[Le]??!1,getModuleFeatureFlags=async Le=>{const Be={};GLOBAL_FLAGS.forEach(tt=>{Be[tt]=featureFlagsValues[tt]});const Ye=Le.toLowerCase();return Ye.includes("id")||Ye==="government-validation"?ID_MODULE_FLAGS.forEach(tt=>{Be[tt]=featureFlagsValues[tt]}):(Ye.includes("selfie")||Ye==="face")&&SELFIE_MODULE_FLAGS.forEach(tt=>{Be[tt]=featureFlagsValues[tt]}),Be};function IdCaptureParamsConfigurator(Le,Be,Ye,tt){Object.assign(Le,{areaDown:25e3,areaUp:55e3,areaIOSPassportUp:3e4,areaIOSPassportDown:2e4,widthIOSUp:160,widthIOSDown:85,widthDown:tt?110:135,widthUp:205,framesAggregationInterval:tt?3e3:2e3,minFaceIdQualityScore:.62})}function getSelfieFaceDetectionPipelineParams(){return{frameMinX:0,frameMinY:0,frameMaxX:1,frameMaxY:1,brightnessThreshold:50,blurrinessThreshold:50,tiltRotationAngleThreshold:15,minMagicCropSize:200,headwearThreshold:.86,lensesThreshold:.95,closedEyesThreshold:.9,maskThreshold:.85,minFaceQualityScore:.63,isOcclusionCheckEnabled:getFeatureFlag("face_occlusion"),faceOcclusionThreshold:.3}}const getProfiles=()=>[new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_01,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Current Prod - Id Capture Profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_02,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"https://www.notion.so/ML-Update-ID-processing-model-to-accept-more-back-ID-types-18c4c3caef49801e95b4fd6bf9b92883?pvs=4"),new PipelineProfile(WasmPipelineType.IdBarcodeAndTextQualityPipeline,PipelineProfileName.IdCapture_3_02,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Pipeline with text and barcode quality: https://www.notion.so/Web-Use-Text-Barcode-model-2nd-iteration-1bc4c3caef49805aa9e6d308db9fc6dd?pvs=4"),new PipelineProfile(WasmPipelineType.IdVideoSelfiePipeline,PipelineProfileName.IdVideoSelfie_2_01,DetectionType.IdVideoSelfie,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:!0},IdCaptureParamsConfigurator,"Current Prod - Id Videoselfie profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieWithAggregationMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Selfie face detection profile with aggregation metrics"),new PipelineProfile(WasmPipelineType.SelfieWithQualityMetrics,PipelineProfileName.SelfieWithQualityMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Current Prod - Selfie face detection profile with quality metrics"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieVideoSelfie,DetectionType.SelfieVideoSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"VideoSelfie face detection profile")];function getProfile(Le){const Be=getProfiles().find(Ye=>Ye.name===Le);if(!Be)throw new Error(`Profile not found for type: ${Le}`);return Be}const wasmVersion="v2.12.26";function generateBundle(){const Le=getFeatureFlag("id_text_barcode_readability")?PipelineProfileName.IdCapture_3_02:getFeatureFlag("id_model_hebrew_back_id")?PipelineProfileName.IdCapture_2_02:PipelineProfileName.IdCapture_2_01,Be=PipelineProfileName.SelfieWithQualityMetrics,Ye=PipelineProfileName.SelfieVideoSelfie,tt=PipelineProfileName.IdVideoSelfie_2_01;return[Le,tt,Be,Ye]}function getInitializationParams(){const Be=generateBundle(),Ye="https://d3vv997wtl2myz.cloudfront.net/webcamera/onnx-backend-wasm",tt=`${Ye}/${wasmVersion}/webLib.wasm`,nt=`${Ye}/${wasmVersion}/webLibSimd.wasm`,ft=`${Ye}/${wasmVersion}/webLib.js`,ht=`${Ye}/${wasmVersion}/versions.json`;let gt=new Map,At=new Map;for(const xt of Be){const Et=getProfile(xt);if(!Et)throw new Error(`Profile not found: ${xt}`);const kt=Et.modelNames;let Ct=[];for(const yt of kt)Ct.push(`${Ye}/${wasmVersion}/models/${yt}`);gt.set(Et.pipelineType,Ct),At.set(Et.detectionType,Et)}return{wasmModulePath:tt,wasmSimdModulePath:nt,glueCodePath:ft,versionsFilePath:ht,pipelineModels:gt,enableSIMD:!0,profiles:At,wasmVersion}}window.wasmArrayBuffer=null;class MlWasmJSApi{constructor(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.wasmModule=null,this.pipelineApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceDetectionWasmApi=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,this.isInitialized_=!1,this.inspectorOpened_=!1,this.wasmCallMutex=new Mutex,this.Module=null,this.loadModule=async Be=>{this.Module=(await import(Be)).Module}}async initialize(Be,Ye,tt,nt,ft,ht){await this.freeResources(),this.pipelines_=ht,this.versionsFile=ft,await this.loadModule(tt);const gt=await this.loadWasm(nt,Be,Ye);return this.pipelineApiUtilities=new this.wasmModule.PipelineApiUtilities,this.utilityApi=new this.wasmModule.UtilityApi,this.idCaptureWasmApi=new this.wasmModule.IdCaptureApi,this.faceDetectionWasmApi=new this.wasmModule.FaceDetectionApi,this.isInitialized_=!0,gt}static getInstance(){return MlWasmJSApi.instance||(MlWasmJSApi.instance=new MlWasmJSApi),MlWasmJSApi.instance}isInitialized(){return this.pipelineApiUtilities!=null&&this.utilityApi!=null&&this.idCaptureWasmApi!=null&&this.faceDetectionWasmApi!=null&&this.isInitialized_}async allocateImageBuffers(Be,Ye){this.checkWasmInitialization("Unable to allocate image buffers, cpp API hasn't been initialized"),!(Be&&Ye&&Be==this.imageWidth_&&Ye==this.imageHeight_&&this.inputImageBuffer&&Be*Ye*4===this.inputImageBuffer.length)&&(this.imageWidth_=Be,this.imageHeight_=Ye,this.inputImageBuffer=this.pipelineApiUtilities.allocateInputImageBuffer(Be,Ye,4))}async handleDetectionCallAndUpdateState(Be){this.checkWasmInitialization("Unable to update pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.handleDetectionCallAndUpdateState(this.pipelineTypeToWasmEnum(Be))}encryptImage(Be){return this.checkWasmInitialization("Unable to encrypt the image, cpp API hasn't been initialized"),this.utilityApi.encryptImage(Be)}isVirtualCamera(Be){if(this.checkWasmInitialization("Unable to check if the camera is virtual, cpp API hasn't been initialized"),Be)return this.utilityApi.isVirtualCamera(Be)}estimatePerformance(){return this.checkWasmInitialization("Unable to estimate performance, cpp API hasn't been initialized"),this.utilityApi.estimatePerformance()}async analyzeFrame(Be){this.checkWasmInitialization("Unable to analyze the frame, cpp API hasn't been initialized"),await this.allocateImageBuffers(Be.width,Be.height),this.inputImageBuffer.set(Be.data),this.utilityApi.analyzeFrame()}async freeResources(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,window.wasmArrayBuffer=null,this.pipelineApiUtilities&&typeof this.pipelineApiUtilities.delete=="function"&&(this.pipelineApiUtilities.delete(),this.pipelineApiUtilities=null),this.utilityApi&&typeof this.utilityApi.delete=="function"&&(this.utilityApi.delete(),this.utilityApi=null),this.idCaptureWasmApi&&typeof this.idCaptureWasmApi.delete=="function"&&(this.idCaptureWasmApi.delete(),this.idCaptureWasmApi=null),this.faceDetectionWasmApi&&typeof this.faceDetectionWasmApi.delete=="function"&&(this.faceDetectionWasmApi.delete(),this.faceDetectionWasmApi=null),this.wasmModule=null,this.isInitialized_=!1}resetPipeline(Be){this.checkWasmInitialization("Unable to reset pipeline, cpp API hasn't been initialized"),this.pipelineApiUtilities.resetPipeline(this.pipelineTypeToWasmEnum(Be))}resetAllPipelines(){this.checkWasmInitialization("Unable to reset pipelines, cpp API hasn't been initialized");for(const[Be,Ye]of this.pipelines_)this.resetPipeline(Be)}resetOther(){this.checkWasmInitialization("Unable to reset other states, cpp API hasn't been initialized"),this.utilityApi.resetOther()}reset(){this.resetAllPipelines(),this.resetOther()}async process(Be,Ye){if(this.checkWasmInitialization("Unable to process the image, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");switch(this.inputImageBuffer.set(Be.data),Ye){case WasmPipelineType.IdBlurGlarePipeline:case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.idCaptureWasmApi.runIdCapturePipeline(this.pipelineTypeToWasmEnum(Ye));case WasmPipelineType.IdFaceDetectionPipeline:return this.faceDetectionWasmApi.runIdFaceDetectionPipeline();case WasmPipelineType.IdVideoSelfiePipeline:return this.idCaptureWasmApi.runIdVideoSelfiePipeline();case WasmPipelineType.SelfieWithAggregationMetrics:case WasmPipelineType.SelfieWithQualityMetrics:return this.faceDetectionWasmApi.runSelfieFaceDetectionPipeline(this.pipelineTypeToWasmEnum(Ye));default:throw new Error("Unknown pipeline type")}}async runIdCapture(Be){if(this.checkWasmInitialization("Unable to run Id Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Be.data),this.idCaptureWasmApi.runIdCapture()}async runSelfieCapture(Be){if(this.checkWasmInitialization("Unable to run Selfie Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Be.data),this.faceDetectionWasmApi.runSelfieCapture()}async setFacePositionConstraints(Be,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face position constraints, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFacePositionConstraints(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft)}async setFaceDetectionThresholds(Be,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set face detection thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionThresholds(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At)}async setFaceAttributesThresholds(Be,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face attributes thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceAttributesThresholds(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft)}async setFaceChecksEnabled(Be,Ye,tt,nt,ft,ht){this.checkWasmInitialization("Unable to set face checks enabled flags, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceChecksEnabled(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht)}async setFaceDetectionMode(Be,Ye){this.checkWasmInitialization("Unable to set face detection mode, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionMode(this.pipelineTypeToWasmEnum(Be),Ye)}async setFaceDetectionCallbacks(Be,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt,bt,It,wt,Rt,Tt){this.checkWasmInitialization("Unable to set face detection callbacks, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionCallbacks(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt,bt,It,wt,Rt,Tt)}async setIdCaptureThresholds(Be,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt){this.checkWasmInitialization("Unable to set thresholds, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureThresholds(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt)}async setIdCaptureCallbacks(Be,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt){this.checkWasmInitialization("Unable to set callbacks, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureCallbacks(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt)}async setIdCaptureGeometryParams(Be,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt){this.checkWasmInitialization("Unable to set geometry params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureGeometryParams(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt)}async setIdCaptureConfigParams(Be,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set config params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureConfigParams(this.pipelineTypeToWasmEnum(Be),Ye,tt,nt,ft,ht,gt,At)}setIdCaptureModelType(Be,Ye){this.checkWasmInitialization("Unable to set model type, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureModelType(this.pipelineTypeToWasmEnum(Be),this.IdCaptureModelTypeToWasmEnum(Ye))}IdPerspectiveTransform(Be,Ye){return this.checkWasmInitialization("Unable to perform perspective transform, cpp API hasn't been initialized"),this.idCaptureWasmApi.IdPerspectiveTransform(Be,Ye)}async getVersions(){const Ye=await(await fetch(this.versionsFile)).text();return JSON.parse(Ye)}async loadWasm(Be,Ye,tt){const nt=Be?tt:Ye;try{window.wasmArrayBuffer=await fetch(nt).then(ft=>ft.arrayBuffer()).then(ft=>new Uint8Array(ft)),this.wasmModule=await this.Module()}catch(ft){if(console.log(ft,Be,"useSmd"),Be)return await this.loadWasm(!1,Ye,tt);throw ft}return Be}async loadModels(){var nt;this.checkWasmInitialization("Unable load the models, cpp API hasn't been initialized");let Be=new this.wasmModule.PipelineTypeToIntMap,Ye=new Map,tt=new Map;for(let[ft,ht]of this.pipelines_){let gt=this.pipelineTypeToWasmEnum(ft),At=[],xt=new this.wasmModule.VectorInt;for(let Et of ht){if(!tt.has(Et)){let Ct=await fetch(Et).then(yt=>yt.arrayBuffer()).then(yt=>new Uint8Array(yt));tt.set(Et,Ct)}let kt=tt.get(Et);xt.push_back(kt.byteLength),At.push(kt)}Be.set(gt,xt),Ye.set(gt,At)}this.modelsBuffers=this.pipelineApiUtilities.allocateModelsBuffers(Be);for(let[ft,ht]of Ye){let gt=(nt=this.modelsBuffers)==null?void 0:nt.get(ft);for(let At=0;At<gt.size();At++){let xt=gt==null?void 0:gt.get(At);if(xt)xt.set(ht[At]);else throw new Error("Unable to get model buffer from shared memory!")}}}async initializePipelines(){this.checkWasmInitialization("Unable to initialize pipelines, cpp API hasn't been initialized"),this.modelsBuffers||await this.loadModels(),this.pipelineApiUtilities.initializePipelines()}async setProductionMode(Be){this.checkWasmInitialization("Unable to set production mode, cpp API hasn't been initialized"),this.utilityApi.setProductionMode(Be)}getPipelineState(){return this.checkWasmInitialization("Unable to get pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.getPipelineState()}getCurrentPipeline(){return this.checkWasmInitialization("Unable to get current pipeline, cpp API hasn't been initialized"),this.pipelineTypeFromWasmEnum(this.pipelineApiUtilities.getCurrentPipeline())}setSdkVersion(Be){this.checkWasmInitialization("Unable to set sdk version, cpp API hasn't been initialized"),this.utilityApi.setSdkVersion(Be)}setSdkPlatform(Be){this.checkWasmInitialization("Unable to set device type, cpp API hasn't been initialized"),this.utilityApi.setSdkPlatform(Be)}setDeviceInfo(Be,Ye=!0){this.checkWasmInitialization("Unable to set device info, cpp API hasn't been initialized"),this.utilityApi.setDeviceInfo(Be,Ye)}setBrowserInfo(Be,Ye=!0){this.checkWasmInitialization("Unable to set browser info, cpp API hasn't been initialized"),this.utilityApi.setBrowserInfo(Be,Ye)}setCameraInfo(Be,Ye=!0){this.checkWasmInitialization("Unable to set camera info, cpp API hasn't been initialized"),this.utilityApi.setCameraInfo(Be,Ye)}setZc(Be){this.checkWasmInitialization("Unable to set zc, cpp API hasn't been initialized"),this.utilityApi.setZc(Be)}setMotionStatus(Be){this.checkWasmInitialization("Unable to set motion status, cpp API hasn't been initialized"),this.utilityApi.setMotionStatus(Be)}setMetadataField(Be,Ye){this.checkWasmInitialization("Unable to set metadata field, cpp API hasn't been initialized"),this.utilityApi.setMetadataField(Be,Ye)}setInspectorOpened(Be){this.inspectorOpened_=Be}setBackgroundMode(Be){this.checkWasmInitialization("Unable to set background mode, cpp API hasn't been initialized"),this.utilityApi.setBackgroundMode(Be)}getCheck(){return this.checkWasmInitialization("Unable to get check, cpp API hasn't been initialized"),this.utilityApi.getCheck()}getMetadata(){return this.checkWasmInitialization("Unable to get metadata, cpp API hasn't been initialized"),this.utilityApi.setInspectorOpened(this.inspectorOpened_),this.utilityApi.getMetadata()}async prc(Be){return this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.prc.bind(this.utilityApi),[Be])}async poc(Be){this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.poc.bind(this.utilityApi),[Be])}async pc(Be){this.checkWasmInitialization("Unable to pc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.pc.bind(this.utilityApi),[Be])}pipelineTypeToWasmEnum(Be){switch(Be){case WasmPipelineType.IdBlurGlarePipeline:return this.wasmModule.PipelineType.IdBlurGlarePipeline;case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.wasmModule.PipelineType.IdBarcodeAndTextQualityPipeline;case WasmPipelineType.IdFaceDetectionPipeline:return this.wasmModule.PipelineType.IdFaceDetectionPipeline;case WasmPipelineType.IdVideoSelfiePipeline:return this.wasmModule.PipelineType.IdVideoSelfiePipeline;case WasmPipelineType.SelfieWithAggregationMetrics:return this.wasmModule.PipelineType.SelfieWithAggregationMetrics;case WasmPipelineType.SelfieWithQualityMetrics:return this.wasmModule.PipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}pipelineTypeFromWasmEnum(Be){switch(Be){case this.wasmModule.PipelineType.IdBlurGlarePipeline:return WasmPipelineType.IdBlurGlarePipeline;case this.wasmModule.IdBarcodeAndTextQualityPipeline:return WasmPipelineType.IdBarcodeAndTextQualityPipeline;case this.wasmModule.PipelineType.IdFaceDetectionPipeline:return WasmPipelineType.IdFaceDetectionPipeline;case this.wasmModule.PipelineType.IdVideoSelfiePipeline:return WasmPipelineType.IdVideoSelfiePipeline;case this.wasmModule.PipelineType.SelfieWithAggregationMetrics:return WasmPipelineType.SelfieWithAggregationMetrics;case this.wasmModule.PipelineType.SelfieWithQualityMetrics:return WasmPipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}IdCaptureModelTypeToWasmEnum(Be){switch(Be){case IdCaptureModelType.IdCaptureV1x:return this.wasmModule.IdCaptureModelType.IdCaptureV1x;case IdCaptureModelType.IdCaptureV2x:return this.wasmModule.IdCaptureModelType.IdCaptureV2x;case IdCaptureModelType.IdCaptureV3x:return this.wasmModule.IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}IdCaptureModelTypeFromWasmEnum(Be){switch(Be){case this.wasmModule.IdCaptureModelType.IdCaptureV1x:return IdCaptureModelType.IdCaptureV1x;case this.wasmModule.IdCaptureModelType.IdCaptureV2x:return IdCaptureModelType.IdCaptureV2x;case this.wasmModule.IdCaptureModelType.IdCaptureV3x:return IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}checkWasmInitialization(Be){if(!this.isInitialized())throw new Error(Be)}async wasmCallWrapper(Be,Ye=[]){return await this.wasmCallMutex.withLock(async(...tt)=>{let nt=!1;try{for(;;){if(nt=Be(...tt),nt)return;await new Promise(ft=>setTimeout(ft,0))}}catch(ft){console.log("Error in wasmCallWrapper:",ft)}},...Ye)}}const MlWasmJSApi$1=MlWasmJSApi.getInstance(),version$4="1.85.0-20251106221029.0";function e$2(Le,Be){return function(Ye,tt){return Object.prototype.hasOwnProperty.call(Ye,tt)}(Le,Be)?Le[Be]:void 0}function t$2(Le,Be,Ye,tt){const nt=document,ft="securitypolicyviolation";let ht;const gt=xt=>{const Et=new URL(Le,location.href),{blockedURI:kt}=xt;kt!==Et.href&&kt!==Et.protocol.slice(0,-1)&&kt!==Et.origin||(ht=xt,At())};nt.addEventListener(ft,gt);const At=()=>nt.removeEventListener(ft,gt);return Promise.resolve().then(Be).then(xt=>(At(),xt),xt=>new Promise(Et=>{const kt=new MessageChannel;kt.port1.onmessage=()=>Et(),kt.port2.postMessage(null)}).then(()=>{if(At(),ht)return Ye(ht);throw xt}))}function n$2(Le){let Be="";for(let Ye=0;Ye<Le.length;++Ye)if(Ye>0){const tt=Le[Ye].toLowerCase();tt!==Le[Ye]?Be+=` ${tt}`:Be+=Le[Ye]}else Be+=Le[Ye].toUpperCase();return Be}const r$4={default:"endpoint"},o$1={default:"tlsEndpoint"},i$5="Client timeout",R$2="Network connection error",s$3="Network request aborted",a$3="Response cannot be parsed",c$3="Blocked by CSP",E$1="The endpoint parameter is not a valid URL",l$1="Handle on demand agent data error",u$1=n$2("WrongRegion"),d$1=n$2("SubscriptionNotActive"),_$2=n$2("UnsupportedVersion"),O$1=n$2("InstallationMethodRestricted"),p$1=n$2("HostnameRestricted"),I$1=n$2("IntegrationFailed"),f$2=n$2("NetworkRestricted"),N$1=n$2("InvalidProxyIntegrationSecret"),T$1=n$2("InvalidProxyIntegrationHeaders"),h$e=n$2("ProxyIntegrationSecretEnvironmentMismatch"),v$d="API key required",m$2="API key not found",A$1="API key expired",w$e="Request cannot be parsed",P$1="Request failed",D$1="Request failed to process",S$1="Too many requests, rate limit exceeded",y="Not available for this origin",g$1="Not available with restricted header",L$1=v$d,C$1=m$2,U$1=A$1;var b$2="3.12.3";const M$1="Failed to load the JS script of the agent",K="9319";function V(Le,Be){const Ye=[],[tt,nt]=function(gt){const At=function(kt){const Ct=[...kt];return{current:()=>Ct[0],postpone(){const yt=Ct.shift();yt!==void 0&&Ct.push(yt)},exclude(){Ct.shift()}}}(gt),xt=function(kt,Ct){let yt=0;return()=>Math.random()*Math.min(Ct,kt*Math.pow(2,yt++))}(100,3e3),Et=new Set;return[At.current(),(kt,Ct)=>{let yt;const vt=Ct instanceof Error?Ct.message:"";if(vt===c$3||vt===E$1)At.exclude(),yt=0;else if(vt===K)At.exclude();else if(vt===M$1){const It=Date.now()-kt.getTime()<50,wt=At.current();wt&&It&&!Et.has(wt)&&(Et.add(wt),yt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,yt??kt.getTime()+xt()-Date.now()]}]}(Le);let ft;if(tt===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));const ht=gt=>{const At=new Date,xt=kt=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:kt}),Et=Be(gt);return Et.then(()=>xt(),xt),Et.catch(kt=>{if(ft!=null||(ft=kt),Ye.length>=5)throw ft;const Ct=nt(At,kt);if(!Ct)throw ft;const[yt,vt]=Ct;return(bt=vt,new Promise(It=>setTimeout(It,bt))).then(()=>ht(yt));var bt})};return ht(tt).then(gt=>[gt,Ye])}const k$1="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",G=k$1;function B$1(Le){var Be,Ye;const{picked:tt,rest:nt}=function(Et,kt){const Ct={},yt={};for(const[vt,bt]of Object.entries(Et))kt.includes(vt)?Ct[vt]=bt:yt[vt]=bt;return{picked:Ct,rest:yt}}(Le,["scriptUrlPattern","token","apiKey"]),ft=tt.token,ht=(Be=tt.apiKey)!==null&&Be!==void 0?Be:ft,gt=(Ye=e$2(Le,"scriptUrlPattern"))!==null&&Ye!==void 0?Ye:k$1,[At,xt]=function(){const Et=[],kt=()=>{Et.push({time:new Date,state:document.visibilityState})},Ct=function(yt,vt,bt,It){return yt.addEventListener(vt,bt,It),()=>yt.removeEventListener(vt,bt,It)}(document,"visibilitychange",kt);return kt(),[Et,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$d);const Et=function(kt,Ct){return(Array.isArray(kt)?kt:[kt]).map(yt=>function(vt,bt){const It=encodeURIComponent;return vt.replace(/<[^<>]+>/g,wt=>wt==="<version>"?"3":wt==="<apiKey>"?It(bt):wt==="<loaderVersion>"?It(b$2):wt)}(String(yt),Ct))}(gt,ht);return V(Et,F$1)}).catch(Et=>{throw xt(),function(kt){return kt instanceof Error&&kt.message===K?new Error(M$1):kt}(Et)}).then(([Et,kt])=>(xt(),Et.load({...nt,ldi:{attempts:kt,visibilityStates:At}})))}function F$1(Le){return t$2(Le,()=>function(Be){return new Promise((Ye,tt)=>{if(function(gt){if(URL.prototype)try{return new URL(gt,location.href),!1}catch(At){if(At instanceof Error&&At.name==="TypeError")return!0;throw At}}(Be))throw new Error(E$1);const nt=document.createElement("script"),ft=()=>{var gt;return(gt=nt.parentNode)===null||gt===void 0?void 0:gt.removeChild(nt)},ht=document.head||document.getElementsByTagName("head")[0];nt.onload=()=>{ft(),Ye()},nt.onerror=()=>{ft(),tt(new Error(M$1))},nt.async=!0,nt.src=Be,ht.appendChild(nt)})}(Le),()=>{throw new Error(c$3)}).then(x$1)}function x$1(){const Le=window,Be="__fpjs_p_l_b",Ye=Le[Be];if(function(tt,nt){var ft;const ht=(ft=Object.getOwnPropertyDescriptor)===null||ft===void 0?void 0:ft.call(Object,tt,nt);ht!=null&&ht.configurable?delete tt[nt]:ht&&!ht.writable||(tt[nt]=void 0)}(Le,Be),typeof(Ye==null?void 0:Ye.load)!="function")throw new Error(K);return Ye}var H={load:B$1,defaultScriptUrlPattern:G,ERROR_SCRIPT_LOAD_FAIL:M$1,ERROR_API_KEY_EXPIRED:A$1,ERROR_API_KEY_INVALID:m$2,ERROR_API_KEY_MISSING:v$d,ERROR_BAD_REQUEST_FORMAT:w$e,ERROR_BAD_RESPONSE_FORMAT:a$3,ERROR_CLIENT_TIMEOUT:i$5,ERROR_CSP_BLOCK:c$3,ERROR_FORBIDDEN_ENDPOINT:p$1,ERROR_FORBIDDEN_HEADER:g$1,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:P$1,ERROR_HANDLE_AGENT_DATA:l$1,ERROR_INSTALLATION_METHOD_RESTRICTED:O$1,ERROR_INTEGRATION_FAILURE:I$1,ERROR_INVALID_ENDPOINT:E$1,ERROR_INVALID_PROXY_INTEGRATION_HEADERS:T$1,ERROR_INVALID_PROXY_INTEGRATION_SECRET:N$1,ERROR_NETWORK_ABORT:s$3,ERROR_NETWORK_CONNECTION:R$2,ERROR_NETWORK_RESTRICTED:f$2,ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:h$e,ERROR_RATE_LIMIT:S$1,ERROR_SERVER_TIMEOUT:D$1,ERROR_SUBSCRIPTION_NOT_ACTIVE:d$1,ERROR_TOKEN_EXPIRED:U$1,ERROR_TOKEN_INVALID:C$1,ERROR_TOKEN_MISSING:L$1,ERROR_UNSUPPORTED_VERSION:_$2,ERROR_WRONG_REGION:u$1,defaultEndpoint:r$4,defaultTlsEndpoint:o$1};function e$1(Le,Be,Ye,tt){return new(Ye||(Ye=Promise))(function(nt,ft){function ht(xt){try{At(tt.next(xt))}catch(Et){ft(Et)}}function gt(xt){try{At(tt.throw(xt))}catch(Et){ft(Et)}}function At(xt){var Et;xt.done?nt(xt.value):(Et=xt.value,Et instanceof Ye?Et:new Ye(function(kt){kt(Et)})).then(ht,gt)}At((tt=tt.apply(Le,[])).next())})}function n$1(Le,Be){var Ye,tt,nt,ft,ht={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return ft={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function gt(At){return function(xt){return function(Et){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,Et[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&Et[0]?tt.return:Et[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,Et[1])).done)return nt;switch(tt=0,nt&&(Et=[2&Et[0],nt.value]),Et[0]){case 0:case 1:nt=Et;break;case 4:return ht.label++,{value:Et[1],done:!1};case 5:ht.label++,tt=Et[1],Et=[0];continue;case 7:Et=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||Et[0]!==6&&Et[0]!==2)){ht=0;continue}if(Et[0]===3&&(!nt||Et[1]>nt[0]&&Et[1]<nt[3])){ht.label=Et[1];break}if(Et[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=Et;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(Et);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}Et=Be.call(Le,ht)}catch(kt){Et=[6,kt],tt=0}finally{Ye=nt=0}if(5&Et[0])throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}([At,xt])}}}typeof SuppressedError=="function"&&SuppressedError;var r$3={exclude:[],include:[],logging:!0,timeout:1e3},o={},a$2={timeout:"true"},i$4=function(Le,Be){typeof window<"u"&&(o[Le]=Be)},u=function(){return Object.fromEntries(Object.entries(o).filter(function(Le){var Be,Ye=Le[0];return!(!((Be=r$3==null?void 0:r$3.exclude)===null||Be===void 0)&&Be.includes(Ye))}).filter(function(Le){var Be,Ye,tt,nt,ft=Le[0];return!((Be=r$3==null?void 0:r$3.include)===null||Be===void 0)&&Be.some(function(ht){return ht.includes(".")})?(Ye=r$3==null?void 0:r$3.include)===null||Ye===void 0?void 0:Ye.some(function(ht){return ht.startsWith(ft)}):((tt=r$3==null?void 0:r$3.include)===null||tt===void 0?void 0:tt.length)===0||((nt=r$3==null?void 0:r$3.include)===null||nt===void 0?void 0:nt.includes(ft))}).map(function(Le){return[Le[0],(0,Le[1])()]}))};function c$2(Le){return Le^=Le>>>16,Le=Math.imul(Le,2246822507),Le^=Le>>>13,Le=Math.imul(Le,3266489909),(Le^=Le>>>16)>>>0}var s$2=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(Le,Be){return Le<<Be|Le>>>32-Be}function d(Le,Be){var Ye;if(Be===void 0&&(Be=0),Be=Be?0|Be:0,typeof Le=="string"&&(Ye=Le,Le=new TextEncoder().encode(Ye).buffer),!(Le instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var tt=new Uint32Array([Be,Be,Be,Be]);(function(ft,ht){for(var gt=ft.byteLength/16|0,At=new Uint32Array(ft,0,4*gt),xt=0;xt<gt;xt++){var Et=At.subarray(4*xt,4*(xt+1));Et[0]=Math.imul(Et[0],s$2[0]),Et[0]=l(Et[0],15),Et[0]=Math.imul(Et[0],s$2[1]),ht[0]=ht[0]^Et[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,Et[1]=Math.imul(Et[1],s$2[1]),Et[1]=l(Et[1],16),Et[1]=Math.imul(Et[1],s$2[2]),ht[1]=ht[1]^Et[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,Et[2]=Math.imul(Et[2],s$2[2]),Et[2]=l(Et[2],17),Et[2]=Math.imul(Et[2],s$2[3]),ht[2]=ht[2]^Et[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,Et[3]=Math.imul(Et[3],s$2[3]),Et[3]=l(Et[3],18),Et[3]=Math.imul(Et[3],s$2[0]),ht[3]=ht[3]^Et[3],ht[3]=l(ht[3],13),ht[3]=ht[3]+ht[0],ht[3]=Math.imul(ht[3],5)+850148119}})(Le,tt),function(ft,ht){var gt=ft.byteLength/16|0,At=ft.byteLength%16,xt=new Uint32Array(4),Et=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^Et[14]<<16;case 14:xt[3]=xt[3]^Et[13]<<8;case 13:xt[3]=xt[3]^Et[12],xt[3]=Math.imul(xt[3],s$2[3]),xt[3]=l(xt[3],18),xt[3]=Math.imul(xt[3],s$2[0]),ht[3]=ht[3]^xt[3];case 12:xt[2]=xt[2]^Et[11]<<24;case 11:xt[2]=xt[2]^Et[10]<<16;case 10:xt[2]=xt[2]^Et[9]<<8;case 9:xt[2]=xt[2]^Et[8],xt[2]=Math.imul(xt[2],s$2[2]),xt[2]=l(xt[2],17),xt[2]=Math.imul(xt[2],s$2[3]),ht[2]=ht[2]^xt[2];case 8:xt[1]=xt[1]^Et[7]<<24;case 7:xt[1]=xt[1]^Et[6]<<16;case 6:xt[1]=xt[1]^Et[5]<<8;case 5:xt[1]=xt[1]^Et[4],xt[1]=Math.imul(xt[1],s$2[1]),xt[1]=l(xt[1],16),xt[1]=Math.imul(xt[1],s$2[2]),ht[1]=ht[1]^xt[1];case 4:xt[0]=xt[0]^Et[3]<<24;case 3:xt[0]=xt[0]^Et[2]<<16;case 2:xt[0]=xt[0]^Et[1]<<8;case 1:xt[0]=xt[0]^Et[0],xt[0]=Math.imul(xt[0],s$2[0]),xt[0]=l(xt[0],15),xt[0]=Math.imul(xt[0],s$2[1]),ht[0]=ht[0]^xt[0]}}(Le,tt),function(ft,ht){ht[0]=ht[0]^ft.byteLength,ht[1]=ht[1]^ft.byteLength,ht[2]=ht[2]^ft.byteLength,ht[3]=ht[3]^ft.byteLength,ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0,ht[0]=c$2(ht[0]),ht[1]=c$2(ht[1]),ht[2]=c$2(ht[2]),ht[3]=c$2(ht[3]),ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0}(Le,tt);var nt=new Uint8Array(tt.buffer);return Array.from(nt).map(function(ft){return ft.toString(16).padStart(2,"0")}).join("")}function f$1(Le,Be){return new Promise(function(Ye){setTimeout(function(){return Ye(Be)},Le)})}function m$1(Le,Be,Ye){return Promise.all(Le.map(function(tt){return Promise.race([tt,f$1(Be,Ye)])}))}function g(){return e$1(this,void 0,void 0,function(){var Le,Be,Ye,tt,nt;return n$1(this,function(ft){switch(ft.label){case 0:return ft.trys.push([0,2,,3]),Le=u(),Be=Object.keys(Le),[4,m$1(Object.values(Le),(r$3==null?void 0:r$3.timeout)||1e3,a$2)];case 1:return Ye=ft.sent(),tt=Ye.filter(function(ht){return ht!==void 0}),nt={},tt.forEach(function(ht,gt){nt[Be[gt]]=ht}),[2,p(nt,r$3.exclude||[],r$3.include||[],"")];case 2:throw ft.sent();case 3:return[2]}})})}function p(Le,Be,Ye,tt){tt===void 0&&(tt="");for(var nt={},ft=function(xt,Et){var kt=tt+xt+".";if(typeof Et!="object"||Array.isArray(Et)){var Ct=Be.some(function(bt){return kt.startsWith(bt)}),yt=Ye.some(function(bt){return kt.startsWith(bt)});Ct&&!yt||(nt[xt]=Et)}else{var vt=p(Et,Be,Ye,kt);Object.keys(vt).length>0&&(nt[xt]=vt)}},ht=0,gt=Object.entries(Le);ht<gt.length;ht++){var At=gt[ht];ft(At[0],At[1])}return nt}function w$d(Le){return e$1(this,void 0,void 0,function(){var Be,Ye;return n$1(this,function(tt){switch(tt.label){case 0:return tt.trys.push([0,2,,3]),[4,g()];case 1:return Be=tt.sent(),Ye=d(JSON.stringify(Be)),Math.random()<1e-5&&r$3.logging&&function(nt,ft){e$1(this,void 0,void 0,function(){var ht,gt;return n$1(this,function(At){switch(At.label){case 0:if(ht="https://logging.thumbmarkjs.com/v1/log",gt={thumbmark:nt,components:ft,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),At.label=1;case 1:return At.trys.push([1,3,,4]),[4,fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)})];case 2:case 3:return At.sent(),[3,4];case 4:return[2]}})})}(Ye,Be),[2,Ye.toString()];case 2:throw tt.sent();case 3:return[2]}})})}function b$1(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var Le=navigator.userAgent,Be={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},Ye=0,tt=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/];Ye<tt.length;Ye++){var nt=tt[Ye],ft=Le.match(nt);if(ft&&ft.groups)return{name:Be[ft.groups.name.toLowerCase()]||ft.groups.name,version:ft.groups.version}}return{name:"unknown",version:"unknown"}}function S(Le){for(var Be=0,Ye=0;Ye<Le.length;++Ye)Be+=Math.abs(Le[Ye]);return Be}var M=b$1();function E(Le,Be,Ye){for(var tt=[],nt=0;nt<Le[0].data.length;nt++){for(var ft=[],ht=0;ht<Le.length;ht++)ft.push(Le[ht].data[nt]);tt.push(P(ft))}var gt=new Uint8ClampedArray(tt);return new ImageData(gt,Be,Ye)}function P(Le){if(Le.length===0)return 0;for(var Be={},Ye=0,tt=Le;Ye<tt.length;Ye++)Be[ft=tt[Ye]]=(Be[ft]||0)+1;var nt=Le[0];for(var ft in Be)Be[ft]>Be[nt]&&(nt=parseInt(ft,10));return nt}["SamsungBrowser","Safari"].includes(M.name)||i$4("audio",function(){return e$1(this,void 0,void 0,function(){return n$1(this,function(Le){return[2,new Promise(function(Be,Ye){try{var tt=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),nt=tt.createBufferSource(),ft=tt.createOscillator();ft.frequency.value=1e3;var ht,gt=tt.createDynamicsCompressor();gt.threshold.value=-50,gt.knee.value=40,gt.ratio.value=12,gt.attack.value=0,gt.release.value=.2,ft.connect(gt),gt.connect(tt.destination),ft.start(),tt.oncomplete=function(At){ht=At.renderedBuffer.getChannelData(0),Be({sampleHash:S(ht),oscillator:ft.type,maxChannels:tt.destination.maxChannelCount,channelCountMode:nt.channelCountMode})},tt.startRendering()}catch(At){console.error("Error creating audio fingerprint:",At),Ye(At)}})]})})});var A=b$1(),C=A.name.toLowerCase(),x=A.version.split(".")[0]||"0",T=parseInt(x,10);C==="firefox"||C==="safari"&&T===17||i$4("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(Le){var Be=Array.from({length:3},function(){return function(){var Ye=document.createElement("canvas"),tt=Ye.getContext("2d");if(!tt)return new ImageData(1,1);Ye.width=280,Ye.height=20;var nt=tt.createLinearGradient(0,0,Ye.width,Ye.height);nt.addColorStop(0,"red"),nt.addColorStop(.16666666666666666,"orange"),nt.addColorStop(.3333333333333333,"yellow"),nt.addColorStop(.5,"green"),nt.addColorStop(.6666666666666666,"blue"),nt.addColorStop(.8333333333333334,"indigo"),nt.addColorStop(1,"violet"),tt.fillStyle=nt,tt.fillRect(0,0,Ye.width,Ye.height);var ft="Random Text WMwmil10Oo";return tt.font="23.123px Arial",tt.fillStyle="black",tt.fillText(ft,-5,15),tt.fillStyle="rgba(0, 0, 255, 0.5)",tt.fillText(ft,-3.3,17.7),tt.beginPath(),tt.moveTo(0,0),tt.lineTo(2*Ye.width/7,Ye.height),tt.strokeStyle="white",tt.lineWidth=2,tt.stroke(),tt.getImageData(0,0,Ye.width,Ye.height)}()});Le({commonImageDataHash:d(E(Be,280,20).data.toString()).toString()})})});var k,I=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],R$1=["monospace","sans-serif","serif"];function L(Le,Be){if(!Le)throw new Error("Canvas context not supported");return Le.font,Le.font="72px ".concat(Be),Le.measureText("WwMmLli0Oo").width}function _$1(){var Le,Be=document.createElement("canvas"),Ye=(Le=Be.getContext("webgl"))!==null&&Le!==void 0?Le:Be.getContext("experimental-webgl");if(Ye&&"getParameter"in Ye)try{var tt=(Ye.getParameter(Ye.VENDOR)||"").toString(),nt=(Ye.getParameter(Ye.RENDERER)||"").toString(),ft={vendor:tt,renderer:nt,version:(Ye.getParameter(Ye.VERSION)||"").toString(),shadingLanguageVersion:(Ye.getParameter(Ye.SHADING_LANGUAGE_VERSION)||"").toString()};if(!nt.length||!tt.length){var ht=Ye.getExtension("WEBGL_debug_renderer_info");if(ht){var gt=(Ye.getParameter(ht.UNMASKED_VENDOR_WEBGL)||"").toString(),At=(Ye.getParameter(ht.UNMASKED_RENDERER_WEBGL)||"").toString();gt&&(ft.vendorUnmasked=gt),At&&(ft.rendererUnmasked=At)}}return ft}catch{}return"undefined"}function O(){var Le=new Float32Array(1),Be=new Uint8Array(Le.buffer);return Le[0]=1/0,Le[0]=Le[0]-Le[0],Be[3]}function B(Le,Be){var Ye={};return Be.forEach(function(tt){var nt=function(ft){if(ft.length===0)return null;var ht={};ft.forEach(function(xt){var Et=String(xt);ht[Et]=(ht[Et]||0)+1});var gt=ft[0],At=1;return Object.keys(ht).forEach(function(xt){ht[xt]>At&&(gt=xt,At=ht[xt])}),gt}(Le.map(function(ft){return tt in ft?ft[tt]:void 0}).filter(function(ft){return ft!==void 0}));nt&&(Ye[tt]=nt)}),Ye}function D(){var Le=[],Be={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(Be).forEach(function(Ye){Be[Ye].forEach(function(tt){matchMedia("(".concat(Ye,": ").concat(tt,")")).matches&&Le.push("".concat(Ye,": ").concat(tt))})}),Le}b$1().name!="Firefox"&&i$4("fonts",function(){var Le=this;return new Promise(function(Be,Ye){try{(function(tt){var nt;e$1(this,void 0,void 0,function(){var ft,ht,gt;return n$1(this,function(At){switch(At.label){case 0:return document.body?[3,2]:[4,(xt=50,new Promise(function(kt){return setTimeout(kt,xt,Et)}))];case 1:return At.sent(),[3,0];case 2:if((ft=document.createElement("iframe")).setAttribute("frameBorder","0"),(ht=ft.style).setProperty("position","fixed"),ht.setProperty("display","block","important"),ht.setProperty("visibility","visible"),ht.setProperty("border","0"),ht.setProperty("opacity","0"),ft.src="about:blank",document.body.appendChild(ft),!(gt=ft.contentDocument||((nt=ft.contentWindow)===null||nt===void 0?void 0:nt.document)))throw new Error("Iframe document is not accessible");return tt({iframe:gt}),setTimeout(function(){document.body.removeChild(ft)},0),[2]}var xt,Et})})})(function(tt){var nt=tt.iframe;return e$1(Le,void 0,void 0,function(){var ft,ht,gt,At;return n$1(this,function(xt){return ft=nt.createElement("canvas"),ht=ft.getContext("2d"),gt=R$1.map(function(Et){return L(ht,Et)}),At={},I.forEach(function(Et){var kt=L(ht,Et);gt.includes(kt)||(At[Et]=kt)}),Be(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$4("hardware",function(){return new Promise(function(Le,Be){var Ye=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,tt=window.performance&&window.performance.memory?window.performance.memory:0;Le({videocard:_$1(),architecture:O(),deviceMemory:Ye.toString()||"undefined",jsHeapSizeLimit:tt.jsHeapSizeLimit||0})})}),i$4("locales",function(){return new Promise(function(Le){Le({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$4("permissions",function(){return e$1(this,void 0,void 0,function(){var Le;return n$1(this,function(Be){return k=(r$3==null?void 0:r$3.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],b$1().name.toLowerCase()==="safari"&&(k=k.filter(function(Ye){return!["camera","geolocation","microphone"].includes(Ye)})),Le=Array.from({length:(r$3==null?void 0:r$3.retries)||3},function(){return function(){return e$1(this,void 0,void 0,function(){var Ye,tt,nt,ft,ht;return n$1(this,function(gt){switch(gt.label){case 0:Ye={},tt=0,nt=k,gt.label=1;case 1:if(!(tt<nt.length))return[3,6];ft=nt[tt],gt.label=2;case 2:return gt.trys.push([2,4,,5]),[4,navigator.permissions.query({name:ft})];case 3:return ht=gt.sent(),Ye[ft]=ht.state.toString(),[3,5];case 4:return gt.sent(),[3,5];case 5:return tt++,[3,1];case 6:return[2,Ye]}})})}()}),[2,Promise.all(Le).then(function(Ye){return B(Ye,k)})]})})}),i$4("plugins",function(){var Le=[];if(navigator.plugins)for(var Be=0;Be<navigator.plugins.length;Be++){var Ye=navigator.plugins[Be];Le.push([Ye.name,Ye.filename,Ye.description].join("|"))}return new Promise(function(tt){tt({plugins:Le})})}),i$4("screen",function(){return new Promise(function(Le){Le({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$4("system",function(){return new Promise(function(Le){var Be=b$1(),Ye={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:Be.name,version:Be.version}};Be.name.toLowerCase()!=="safari"&&(Ye.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var tt=window.ApplePaySession.supportsVersion,nt=15;nt>0;nt--)if(tt(nt))return nt}catch{return 0}return 0}(),Ye.cookieEnabled=window.navigator.cookieEnabled),Le(Ye)})});var U,N=b$1().name!=="SamsungBrowser"?1:3,F=null;i$4("webgl",function(){return e$1(this,void 0,void 0,function(){var Le;return n$1(this,function(Be){typeof document<"u"&&((U=document.createElement("canvas")).width=200,U.height=100,F=U.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return Le=Array.from({length:N},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var Ye=`
|
|
67
67
|
attribute vec2 position;
|
|
68
68
|
void main() {
|
|
69
69
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
@@ -3581,7 +3581,7 @@ linearGradient:first-of-type {
|
|
|
3581
3581
|
.hidden {
|
|
3582
3582
|
display: none;
|
|
3583
3583
|
}
|
|
3584
|
-
`,App$1=({disableFullScreen:Le=!1,isKiosk:Be=!1,children:Ye,token:tt,style:nt,disableUnsupportedBrowserScreen:ft=!1})=>{const{isRotated:ht}=useOrientation(),{ready:gt}=useTranslation$1(),{shouldShow:At,onContinue:xt}=useBrowserNotSupported();return useResize(
|
|
3584
|
+
`,App$1=({disableFullScreen:Le=!1,isKiosk:Be=!1,children:Ye,token:tt,style:nt,disableUnsupportedBrowserScreen:ft=!1})=>{const{isRotated:ht}=useOrientation(),{ready:gt}=useTranslation$1(),{shouldShow:At,onContinue:xt}=useBrowserNotSupported();return useResize(),React.useEffect(()=>{tt&&initialize(tt)},[tt]),gt?options.redirectFromUnsupportedBrowsers&&At&&!ft?jsxRuntimeExports.jsx(BrowserNotSupported,{onContinue:xt,token:tt}):jsxRuntimeExports.jsx(AppProvider,{children:jsxRuntimeExports.jsx(ReadyToRenderProvider,{children:jsxRuntimeExports.jsx(NotificationProvider,{initialValue:{isOpen:!1},children:jsxRuntimeExports.jsxs(Container$f,{className:cx("IncodeDefaultComponentContainer",{"disable-full-screen":Le,"is-desktop":mobile.isDesktop(),kiosk:Be}),style:nt,children:[!!mobile.any()&&!mobile.isIpad()&&ht&&jsxRuntimeExports.jsx(LandscapeNotSupported,{}),Ye]})})})}):null},FaceFlow$1=({onSuccess:Le,onError:Be,session:Ye,captureConfig:tt,uiConfig:nt,parentSize:ft,captureOnly:ht,onCapture:gt})=>{const At=React.useRef(!1);return React.useEffect(()=>{At.current||(At.current=!0,faceFlowManager.initialize({sessionToken:Ye==null?void 0:Ye.token,captureConfig:tt,parentSize:ft,uiConfig:nt,captureOnly:ht,onCapture:gt}).catch(xt=>{Be(xt)}))},[Ye,Be,nt,ft,tt,ht,gt]),jsxRuntimeExports.jsx(IncodeProvider,{token:Ye==null?void 0:Ye.token,uiConfig:nt,children:jsxRuntimeExports.jsx(FaceFlowContent$1,{onSuccess:Le,onError:Be,uiConfig:nt})})},FaceFlowContent$1=({onSuccess:Le,onError:Be,uiConfig:Ye})=>{var Et;const{currentStep:tt,flowOutcome:nt,successData:ft,errorDetails:ht,goToCapture:gt,goToPermissions:At,completeWithError:xt}=useFaceFlowState();return React.useEffect(()=>{nt&&(nt==="success"&&Le(ft),nt==="error"&&Be(ht))},[nt,ft,ht,Le,Be]),tt==="tutorial"?jsxRuntimeExports.jsx(Tutorial$2,{onContinue:At,onClose:()=>faceFlowManager.onClose()}):tt==="permissions"?jsxRuntimeExports.jsx(Permissions,{onContinue:gt,emitError:kt=>{xt({code:kt,message:"Error in permissions",error:new Error(kt)})},uiConfig:Ye,onClose:()=>faceFlowManager.onClose(),isDeepsightEnabled:(Et=faceFlowManager.getCaptureConfiguration())==null?void 0:Et.isDeepsightEnabled}):tt==="capture"?jsxRuntimeExports.jsx(Capture,{}):null},StyledButton$b=dt(Button$c)`
|
|
3585
3585
|
height: 58px;
|
|
3586
3586
|
text-transform: uppercase;
|
|
3587
3587
|
&.button-hidden {
|