notificare-react-preview-components 1.2.0 → 1.2.1

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/cjs/index.js CHANGED
@@ -6,5 +6,5 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */function Mt(){return Ct||(Ct=1,"production"===process.env.NODE_ENV?jt.exports=function(){if(Et)return Nt;Et=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var _=e.$$typeof;switch(_){case t:switch(e=e.type){case c:case l:case i:case a:case r:case d:return e;default:switch(e=e&&e.$$typeof){case s:case p:case f:case u:case o:return e;default:return _}}case n:return _}}}function w(e){return b(e)===l}return Nt.AsyncMode=c,Nt.ConcurrentMode=l,Nt.ContextConsumer=s,Nt.ContextProvider=o,Nt.Element=t,Nt.ForwardRef=p,Nt.Fragment=i,Nt.Lazy=f,Nt.Memo=u,Nt.Portal=n,Nt.Profiler=a,Nt.StrictMode=r,Nt.Suspense=d,Nt.isAsyncMode=function(e){return w(e)||b(e)===c},Nt.isConcurrentMode=w,Nt.isContextConsumer=function(e){return b(e)===s},Nt.isContextProvider=function(e){return b(e)===o},Nt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Nt.isForwardRef=function(e){return b(e)===p},Nt.isFragment=function(e){return b(e)===i},Nt.isLazy=function(e){return b(e)===f},Nt.isMemo=function(e){return b(e)===u},Nt.isPortal=function(e){return b(e)===n},Nt.isProfiler=function(e){return b(e)===a},Nt.isStrictMode=function(e){return b(e)===r},Nt.isSuspense=function(e){return b(e)===d},Nt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===a||e===r||e===d||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===u||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h)},Nt.typeOf=b,Nt}():jt.exports=(St||(St=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var _=e.$$typeof;switch(_){case t:var h=e.type;switch(h){case c:case l:case i:case a:case r:case d:return h;default:var m=h&&h.$$typeof;switch(m){case s:case p:case f:case u:case o:return m;default:return _}}case n:return _}}}var w=c,y=l,x=s,k=o,E=t,j=p,N=i,S=f,C=u,T=n,A=a,P=r,M=d,L=!1;function O(e){return b(e)===l}Pt.AsyncMode=w,Pt.ConcurrentMode=y,Pt.ContextConsumer=x,Pt.ContextProvider=k,Pt.Element=E,Pt.ForwardRef=j,Pt.Fragment=N,Pt.Lazy=S,Pt.Memo=C,Pt.Portal=T,Pt.Profiler=A,Pt.StrictMode=P,Pt.Suspense=M,Pt.isAsyncMode=function(e){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||b(e)===c},Pt.isConcurrentMode=O,Pt.isContextConsumer=function(e){return b(e)===s},Pt.isContextProvider=function(e){return b(e)===o},Pt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Pt.isForwardRef=function(e){return b(e)===p},Pt.isFragment=function(e){return b(e)===i},Pt.isLazy=function(e){return b(e)===f},Pt.isMemo=function(e){return b(e)===u},Pt.isPortal=function(e){return b(e)===n},Pt.isProfiler=function(e){return b(e)===a},Pt.isStrictMode=function(e){return b(e)===r},Pt.isSuspense=function(e){return b(e)===d},Pt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===a||e===r||e===d||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===u||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h)},Pt.typeOf=b}()),Pt)),jt.exports}!function(){if(At)return Tt;At=1;var e=Mt(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},r={};function a(n){return e.isMemo(n)?i:r[n.$$typeof]||t}r[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r[e.Memo]=i;var o=Object.defineProperty,s=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;Tt=function e(t,i,r){if("string"!=typeof i){if(d){var _=p(i);_&&_!==d&&e(t,_,r)}var u=s(i);c&&(u=u.concat(c(i)));for(var f=a(t),h=a(i),m=0;m<u.length;++m){var g=u[m];if(!(n[g]||r&&r[g]||h&&h[g]||f&&f[g])){var v=l(i,g);try{o(t,g,v)}catch(e){}}}}return t}}();var Lt="undefined"==typeof window||window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?r.createContext(null):window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=r.createContext(null));Lt.Consumer;var Ot,It,Rt=Lt.Provider,Ut=Lt;function Bt(){var e=r.useContext(Ut);return vt(e),e}function Ht(e){var t=function(t){var n=Bt(),i=t.value,r=t.children,a=c(t,["value","children"]),o="string"==typeof i?new Date(i||0):i;return r("formatDate"===e?n.formatDateToParts(o,a):n.formatTimeToParts(o,a))};return t.displayName=It[e],t}function Ft(e){var t=function(t){var n=Bt(),i=t.value,a=t.children,o=c(t,["value","children"]),s=n[e](i,o);if("function"==typeof a)return a(s);var l=n.textComponent||r.Fragment;return r.createElement(l,null,s)};return t.displayName=Ot[e],t}function Dt(e){return e?Object.keys(e).reduce((function(t,n){var i,a=e[n];return t[n]=Ce(a)?(i=a,function(e){return i(r.Children.toArray(e))}):a,t}),{}):e}!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(Ot||(Ot={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(It||(It={}));var zt=function(e,t,n,i){for(var a=[],o=4;o<arguments.length;o++)a[o-4]=arguments[o];var s=Dt(i),c=Ke.apply(void 0,p([e,t,n,s],a,!1));return Array.isArray(c)?function(e){var t;return null!==(t=r.Children.map(e,yt))&&void 0!==t?t:[]}(c):c},Gt=function(e,t){var n=e.defaultRichTextElements,i=c(e,["defaultRichTextElements"]),r=Dt(n),a=gt(s(s(s({},bt),i),{defaultRichTextElements:r}),t),o={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:r};return s(s({},a),{formatMessage:zt.bind(null,o,a.formatters),$t:zt.bind(null,o,a.formatters)})};function Zt(e){var t=Bt(),n=t.formatMessage,i=t.textComponent,a=void 0===i?r.Fragment:i,o=e.id,s=e.description,c=e.defaultMessage,l=e.values,p=e.children,d=e.tagName,_=void 0===d?a:d,u=n({id:o,description:s,defaultMessage:c},l,{ignoreTag:e.ignoreTag});return"function"==typeof p?p(Array.isArray(u)?u:[u]):_?r.createElement(_,null,u):r.createElement(r.Fragment,null,u)}Zt.displayName="FormattedMessage";var Vt=r.memo(Zt,(function(e,t){var n=e.values,i=c(e,["values"]),r=t.values,a=c(t,["values"]);return xt(r,n)&&xt(i,a)}));function $t(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}Vt.displayName="MemoizedFormattedMessage";var Wt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t.state={cache:t.cache,intl:Gt($t(t.props),t.cache),prevConfig:$t(t.props)},t}return o(t,e),t.getDerivedStateFromProps=function(e,t){var n=t.prevConfig,i=t.cache,r=$t(e);return xt(n,r)?null:{intl:Gt(r,i),prevConfig:r}},t.prototype.render=function(){return vt(this.state.intl),r.createElement(Rt,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=bt,t}(r.PureComponent);function Kt(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}Ft("formatDate"),Ft("formatTime"),Ft("formatNumber"),Ft("formatList"),Ft("formatDisplayName"),Ht("formatDate"),Ht("formatTime");function qt({children:t,theme:n}){return e.jsxs("div",{className:"notificare__android-phone-background__wrapper "+("dark"===n?"notificare__android-phone-background__wrapper--dark":""),"data-testid":"android-phone-background",children:[e.jsx("div",{className:"notificare__android-phone-background__camera"}),e.jsx("div",{className:"notificare__android-phone-background__content",children:t})]})}Kt(".notificare .notificare__android-phone-background__wrapper {\n width: 350px;\n border-radius: 40px;\n border: 6px solid #c6c6c6;\n background-color: #fff;\n overflow: hidden;\n}\n\n.notificare .notificare__android-phone-background__wrapper--dark {\n background-color: #9ea2a1;\n border-color: #eaeaea;\n}\n\n.notificare .notificare__android-phone-background__camera {\n width: 20px;\n height: 20px;\n background: #c6c6c6;\n border-radius: 50%;\n margin: 20px auto 10px;\n}\n\n.notificare .notificare__android-phone-background__content {\n width: 100%;\n height: 615px;\n overflow: hidden;\n position: relative;\n}");var Xt;function Yt({children:t,theme:n}){return e.jsxs("div",{className:"notificare__ios-phone-background__wrapper "+("dark"===n?"notificare__ios-phone-background__wrapper--dark":""),"data-testid":"ios-phone-background",children:[e.jsx("div",{className:"notificare__ios-phone-background__camera"}),e.jsx("div",{className:"notificare__ios-phone-background__content",children:t})]})}function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Jt.apply(null,arguments)}Kt(".notificare .notificare__ios-phone-background__wrapper {\n width: 350px;\n border-radius: 40px;\n border: 6px solid #c6c6c6;\n background-color: #fff;\n overflow: hidden;\n}\n\n.notificare .notificare__ios-phone-background__wrapper--dark {\n background-color: #9ea2a1;\n border-color: #eaeaea;\n}\n\n.notificare .notificare__ios-phone-background__camera {\n width: 80px;\n height: 20px;\n background: #c6c6c6;\n margin: 20px auto 10px;\n border-radius: 20px;\n}\n\n.notificare .notificare__ios-phone-background__content {\n width: 100%;\n height: 615px;\n overflow: hidden;\n position: relative;\n}");var Qt,en=function(e){return r.createElement("svg",Jt({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Xt||(Xt=r.createElement("path",{fill:"#64706e",d:"M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5"})))};function tn(){return e.jsx("div",{className:"notificare__loading__wrapper","data-testid":"loading",children:e.jsx(en,{className:"notificare__loading__icon"})})}function nn(){return nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},nn.apply(null,arguments)}Kt(".notificare .notificare__loading__wrapper {\n width: 100%;\n display: flex;\n justify-content: center;\n padding-top: 50px;\n}\n\n.notificare .notificare__loading__icon {\n width: 60px;\n height: 60px;\n animation: notificare-loading-icon-spin 2s linear infinite;\n}\n\n@keyframes notificare-loading-icon-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}");var rn=function(e){return r.createElement("svg",nn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Qt||(Qt=r.createElement("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32m0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24m32 224a32 32 0 1 0-64 0 32 32 0 1 0 64 0"})))};const an={"controls.platform":"Platform","controls.formFactor":"Form Factor","controls.operatingSystem":"OS","controls.operatingSystem.macos":"macOS","controls.variant":"Variant","controls.displayMode.lockScreen":"Lock Screen","controls.displayMode.expandedLockScreen":"Lock Screen - Expanded","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information","preview.error.invalidNotification":"→ Invalid Notification","preview.error.provideGoogleMapsApiKey":"→ A Google Maps API key should be provided","preview.error.notSupportedPreviewVariant":"→ Not supported variant","preview.error.invalidUrl":"The URL is invalid.","preview.error.iosStoreAppNotFound":"The app was not found. Check the unique identifier and try again","preview.error.webshotFail":"Webshot failed to be loaded. Check console for more details.","preview.error.notSupportedNotificationTypePreviewVariant":"→ Previewing notifications of type ''{notificationType}'' is not possible in this variant","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a custom URL Scheme is not possible","preview.error.urlResolverInvalidUrl":"→ The provided URL is invalid","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with an HTTP URL without 'notificareWebView' query parameter is not possible in this variant","preview.error.notSupportedUrlResolverWithDynamicLink":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a dynamic link is not possible","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a relative URL (starts with '/') is not possible","preview.error.googleMapsAuthFailure":"Authentication failure. Your Google Maps API key might be invalid. Check console for more information.","preview.error.googleMapsLoadFailure":"Google Maps failed to be loaded. Check console for more information.","preview.error.noValidContentObject":"No valid content object was provided","preview.error.iosStoreAppLoadFailure":"The app failed to be loaded. Check console for more details","preview.android.alert.appUi.cancel":"Cancel","preview.android.inAppBrowser.appUi.pageTitleLoading":"Loading...","preview.android.lockscreen.time":"now","preview.ios.alert.appUi.cancel":"Cancel","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Done","preview.ios.inAppBrowser.appUi.notSecure":"Not Secure —","preview.ios.rate.appUi.rateNow":"Yes, I'll Rate Now","preview.ios.rate.appUi.doNotRate":"No, Thanks","preview.ios.store.appUi.done":"Done","preview.ios.store.appUi.install":"Install","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Ratings","preview.ios.store.appUi.age":"Age","preview.ios.store.appUi.yearsOld":"Years Old","preview.ios.store.appUi.category":"Category","preview.ios.store.appUi.developer":"Developer","preview.ios.store.appUi.whatsNew":"What's New","preview.ios.store.appUi.historyVersion":"Version {version}","preview.ios.store.appUi.screenshots":"Screenshots","preview.ios.lockScreen.time":"Now","preview.web.desktop.macos.lockScreen.time":"now","preview.web.desktop.macos.lockScreen.settings":"Settings","preview.web.desktop.macos.lockScreen.options":"Options"};var on;function sn({message:t}){const n=Bt();return e.jsxs("div",{className:"notificare__preview-error__wrapper","data-testid":"preview-error",children:[e.jsx(rn,{className:"notificare__preview-error__icon"}),e.jsxs("p",{className:"notificare__preview-error__text",children:[n.formatMessage({id:"preview.error.notGeneratedPreview",defaultMessage:an["preview.error.notGeneratedPreview"]}),t&&e.jsxs(e.Fragment,{children:[e.jsx("br",{})," ",e.jsx("br",{})," ",t]})]})]})}function cn(){return cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},cn.apply(null,arguments)}Kt(".notificare .notificare__preview-error__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 100%;\n height: 440px;\n text-align: center;\n padding: 0 20px;\n}\n\n.notificare .notificare__preview-error__icon {\n width: 72px;\n margin-bottom: 20px;\n height: auto;\n}\n\n.notificare .notificare__preview-error__text {\n font-weight: 700;\n font-size: 16px;\n color: #232c2a;\n}");var ln=function(e){return r.createElement("svg",cn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),on||(on=r.createElement("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})))};class pn extends Error{constructor(e){super(`Failed to fetch a resource with response code '${e.status.toString()}'.`),this.response=e,this.name="NetworkRequestError",Error.captureStackTrace&&Error.captureStackTrace(this,pn)}}function dn(e,t){return l(this,void 0,void 0,(function*(){const n=yield fetch(e,t);if(!n.ok)throw new pn(n);return yield n.json()}))}function _n(e){return e.startsWith("https://")||e.startsWith("http://")?e:`https://push.notifica.re/upload${e}`}const un={name:"My app",icon:void 0,androidPackageName:"com.example.app",websitePushConfig:{icon:void 0,allowedDomains:["https://my-app.com/"]}};function fn({id:e,serviceKey:n}){const[i,r]=t.useState({status:"idle"});return t.useEffect((()=>e?n?void function(e,t){return l(this,void 0,void 0,(function*(){const n=new URL(`/application/${encodeURIComponent(e)}/info`,"https://push.notifica.re");n.searchParams.set("apiKey",t);const{application:i}=yield dn(n);return{name:i.name,icon:i.icon,androidPackageName:i.androidPackageName,websitePushConfig:i.websitePushConfig&&{icon:i.websitePushConfig.icon?_n(i.websitePushConfig.icon):void 0,allowedDomains:i.websitePushConfig.allowedDomains}}}))}(e,n).then((e=>{r({status:"success",data:e})})).catch((e=>{console.error("Error fetching the application: ",e),r({status:"success",data:un})})):(console.warn("An application ID was provided, but a service key is missing. Using default application instead."),void r({status:"success",data:un})):(console.warn("An application ID was not provided. Using default application instead."),void r({status:"success",data:un}))),[e,n]),i}function hn(e,n){const[i,r]=t.useState(e);return t.useEffect((()=>{const t=setTimeout((()=>{r(e)}),n);return()=>{clearTimeout(t)}}),[e,n]),i}function mn(e){try{return Intl.NumberFormat.supportedLocalesOf([e]).length>0}catch(e){return!1}}const gn={"preview.error.invalidInAppMessage":"→ Invalid in-app message","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information"},vn={"preview.error.invalidInAppMessage":"→ Message intégré invalide","preview.error.notGeneratedPreview":"L'aperçu n’a pas pu être généré","preview.error.checkConsole":"Consultez la console pour plus d’informations"},bn={"preview.error.invalidInAppMessage":"→ Mensagem in-app inválida","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações"},wn={"controls.platform":"Plateforme","controls.formFactor":"Format","controls.operatingSystem":"SE","controls.operatingSystem.macos":"macOS","controls.variant":"Variante","controls.displayMode.lockScreen":"Écran verrouillé","controls.displayMode.expandedLockScreen":"Écran verrouillé - Étendu","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Aperçu non généré","preview.error.checkConsole":"Consultez la console pour plus d’informations","preview.error.invalidNotification":"→ Notification invalide","preview.error.provideGoogleMapsApiKey":"→ Une clé API Google Maps doit être fournie","preview.error.notSupportedPreviewVariant":"→ Variante non prise en charge","preview.error.invalidUrl":"L’URL est invalide.","preview.error.iosStoreAppNotFound":"L'application n’a pas été trouvée. Vérifiez l’identifiant unique et réessayez","preview.error.webshotFail":"La capture Web a échoué. Consultez la console pour plus de détails.","preview.error.notSupportedNotificationTypePreviewVariant":"→ L’aperçu des notifications de type ''{notificationType}'' n’est pas possible dans cette variante","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec un schéma d’URL personnalisé (URL Scheme) n’est pas possible","preview.error.urlResolverInvalidUrl":"→ L’URL fournie est invalide","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec une URL HTTP sans le paramètre de requête 'notificareWebView' n’est pas possible dans cette variante","preview.error.notSupportedUrlResolverWithDynamicLink":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec un lien dynamique n’est pas possible","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec une URL relative (commençant par '/') n’est pas possible","preview.error.googleMapsAuthFailure":"Échec de l’authentification. Votre clé API Google Maps pourrait être invalide. Consultez la console pour plus d’informations.","preview.error.googleMapsLoadFailure":"Échec du chargement de Google Maps. Consultez la console pour plus d’informations.","preview.error.noValidContentObject":"Aucun objet de contenu valide fourni","preview.error.iosStoreAppLoadFailure":"Échec du chargement de l’application. Consultez la console pour plus de détails","preview.android.alert.appUi.cancel":"Annuler","preview.android.inAppBrowser.appUi.pageTitleLoading":"Chargement...","preview.android.lockscreen.time":"maintenant","preview.ios.alert.appUi.cancel":"Annuler","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Terminé","preview.ios.inAppBrowser.appUi.notSecure":"Non Sécurisé —","preview.ios.rate.appUi.rateNow":"Oui, je vais noter maintenant","preview.ios.rate.appUi.doNotRate":"Non, Merci","preview.ios.store.appUi.done":"Terminé","preview.ios.store.appUi.install":"Installer","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Évaluations","preview.ios.store.appUi.age":"Âge","preview.ios.store.appUi.yearsOld":"Ans","preview.ios.store.appUi.category":"Catégorie","preview.ios.store.appUi.developer":"Développeur","preview.ios.store.appUi.whatsNew":"Nouveautés","preview.ios.store.appUi.historyVersion":"Version {version}","preview.ios.store.appUi.screenshots":"Captures d’écran","preview.ios.lockScreen.time":"Maintenant","preview.web.desktop.macos.lockScreen.time":"maintenant","preview.web.desktop.macos.lockScreen.settings":"Réglages","preview.web.desktop.macos.lockScreen.options":"Options"},yn={"controls.platform":"Plataforma","controls.formFactor":"Formato","controls.operatingSystem":"SO","controls.operatingSystem.macos":"macOS","controls.variant":"Variante","controls.displayMode.lockScreen":"Ecrã de Bloqueio","controls.displayMode.expandedLockScreen":"Ecrã de Bloqueio - Expandido","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações","preview.error.invalidNotification":"→ Notificação inválida","preview.error.provideGoogleMapsApiKey":"→ Deve ser fornecida uma chave de API do Google Maps","preview.error.notSupportedPreviewVariant":"→ Variante não suportada","preview.error.invalidUrl":"A URL é inválida.","preview.error.iosStoreAppNotFound":"A aplicação não foi encontrada. Verifique o identificador único e tente novamente","preview.error.webshotFail":"Não foi possível efetuar a captura da página web. Consulte a consola para mais informações.","preview.error.notSupportedNotificationTypePreviewVariant":"→ A pré-visualização de notificações do tipo ''{notificationType}'' não é possível nesta variante","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um esquema de URL personalizado (URL Scheme) não é possível","preview.error.urlResolverInvalidUrl":"→ O URL fornecido é inválido","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um URL HTTP sem o parâmetro de query 'notificareWebView' não é possível nesta variante","preview.error.notSupportedUrlResolverWithDynamicLink":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um link dinâmico não é possível","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um URL relativo (que começa por '/') não é possível","preview.error.googleMapsAuthFailure":"Falha de autenticação. A chave da API do Google Maps poderá ser inválida. Consulte a consola para mais informações.","preview.error.googleMapsLoadFailure":"Não foi possível carregar o Google Maps. Consulte a consola para mais informações.","preview.error.noValidContentObject":"Nenhum objeto válido foi fornecido","preview.error.iosStoreAppLoadFailure":"Não foi possível carregar a aplicação. Consulte a consola para mais informações","preview.android.alert.appUi.cancel":"Cancelar","preview.android.inAppBrowser.appUi.pageTitleLoading":"A carregar...","preview.android.lockscreen.time":"agora","preview.ios.alert.appUi.cancel":"Cancelar","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Concluído","preview.ios.inAppBrowser.appUi.notSecure":"Não seguro —","preview.ios.rate.appUi.rateNow":"Sim, avaliar agora","preview.ios.rate.appUi.doNotRate":"Não, obrigado","preview.ios.store.appUi.done":"OK","preview.ios.store.appUi.install":"Obter","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Classificações","preview.ios.store.appUi.age":"Idade","preview.ios.store.appUi.yearsOld":"Anos","preview.ios.store.appUi.category":"Categoria","preview.ios.store.appUi.developer":"Programador","preview.ios.store.appUi.whatsNew":"Novidades","preview.ios.store.appUi.historyVersion":"Versão {version}","preview.ios.store.appUi.screenshots":"Capturas de ecrã","preview.ios.lockScreen.time":"Agora","preview.web.desktop.macos.lockScreen.time":"agora","preview.web.desktop.macos.lockScreen.settings":"Definições","preview.web.desktop.macos.lockScreen.options":"Opções"},xn={"preview.error.invalidPushOnboardingApplicationInfo":"→ Invalid application information","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information"},kn={"preview.error.invalidPushOnboardingApplicationInfo":"→ Informations d’application invalides","preview.error.notGeneratedPreview":"L'aperçu n’a pas pu être généré","preview.error.checkConsole":"Consultez la console pour plus d’informations"},En={"preview.error.invalidPushOnboardingApplicationInfo":"→ Informação da aplicação inválida","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações"};function jn({locale:e,customTranslations:n,type:i}){const[r,a]=t.useState({status:"idle"}),o=t.useMemo((()=>{if(!mn(e))return null;return function(e,t){switch(e){case"en":switch(t){case"push":return an;case"in-app":return gn;case"onboarding":return xn}break;case"pt":switch(t){case"push":return yn;case"in-app":return bn;case"onboarding":return En}break;case"fr":switch(t){case"push":return wn;case"in-app":return vn;case"onboarding":return kn}break;default:return null}}(new Intl.Locale(e).language,i)}),[e,i]);return t.useEffect((function(){mn(e)?a({status:"success",data:{locale:e,translations:Object.assign(Object.assign({},o),n)}}):a({status:"error",error:new Error("→ The locale you chose is invalid. Choose a different one and try again")})}),[e,n,o]),r}function Nn({label:n,options:i,value:r,onValueChanged:a,disabled:o=!1}){const s=Bt(),[c,l]=t.useState(!1),[p,d]=t.useState((function(){const e=i.find((e=>e.value===r));if(!e)throw new Error(`Value "${String(r)}" not found in the Selector options.`);return s.formatMessage({id:e.labelId,defaultMessage:e.defaultLabel})})),_=t.useRef(null),u=t.useRef(null);return function({refs:e,onClickOutside:n}){t.useEffect((()=>{function t(t){const i=e.every((e=>{var n;return!(null===(n=e.current)||void 0===n?void 0:n.contains(t.target))}));i&&n()}return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}}),[e])}({refs:[_,u],onClickOutside:()=>{l(!1)}}),e.jsxs("div",{className:"notificare__selector__wrapper",children:[e.jsx("p",{className:"notificare__selector__label",children:n}),e.jsxs("button",{className:"notificare__selector__button",onClick:()=>l(!c),disabled:o,ref:u,children:[p,e.jsx(ln,{className:"notificare__selector__button-expand-icon"})]}),c&&e.jsx("div",{className:"notificare__selector__options",ref:_,children:i.map((t=>e.jsx("button",{className:"notificare__selector__option-button "+(r===t.value?"notificare__selector__option-button--selected":""),onClick:()=>{null==a||a(t.value),l(!1),d(s.formatMessage({id:t.labelId,defaultMessage:t.defaultLabel}))},"data-testid":`selector-option-${t.value.toString()}`,children:s.formatMessage({id:t.labelId,defaultMessage:t.defaultLabel})},t.value)))})]})}Kt(".notificare .notificare__selector__wrapper {\n position: relative;\n}\n\n.notificare .notificare__selector__label {\n font-size: 14px;\n color: #6e6e6e;\n margin-bottom: 7px;\n}\n\n.notificare .notificare__selector__button {\n width: 350px;\n height: 42px;\n background-color: #F6F6F6;\n color: #1c1c1c;\n border: 1px solid #E8E8E8;\n text-align: left;\n padding-left: 14px;\n font-size: 16px;\n display: flex;\n align-items: center;\n}\n\n.notificare .notificare__selector__button:not(:disabled) {\n cursor: pointer;\n}\n\n.notificare .notificare__selector__button:disabled {\n color: #b3b3b3;\n}\n\n.notificare .notificare__selector__button-expand-icon {\n width: 16px;\n height: 16px;\n margin-left: auto;\n margin-right: 14px;\n}\n\n.notificare .notificare__selector__button:disabled .notificare__selector__button-expand-icon {\n fill: #b3b3b3;\n}\n\n.notificare .notificare__selector__options {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 63px;\n z-index: 1;\n box-shadow: 0 14px 10px -10px rgba(0, 0, 0, 0.2);\n}\n\n.notificare .notificare__selector__option-button {\n width: 350px;\n height: 42px;\n background-color: #ececec;\n color: #151515;\n border: 0;\n font-size: 15px;\n text-align: left;\n padding-left: 14px;\n}\n\n.notificare .notificare__selector__option-button--selected {\n background-color: #c8c8c8;\n}\n\n.notificare .notificare__selector__option-button:hover {\n background-color: #5E5E5E;\n color: white;\n cursor: pointer;\n}\n");function Sn({label:n,options:i,value:r,onValueChanged:a}){return e.jsxs("div",{className:"notificare__toggle-group__wrapper",children:[e.jsx("p",{className:"notificare__toggle-group__label","data-testid":`toggle-group-${n}`,children:n}),e.jsx("div",{className:"notificare__toggle-group__options",children:i.map(((n,o)=>e.jsxs(t.Fragment,{children:[e.jsx("button",{className:"notificare__toggle-group__option-button "+(r===n.value?"notificare__toggle-group__option-button--selected":""),onClick:()=>a(n.value),"aria-label":`Button with option '${n.value.toString()}'`,"data-testid":`toggle-group-option-${n.value.toString()}`,children:e.jsx("div",{className:"notificare__toggle-group__option-button-icon "+(r===n.value?"notificare__toggle-group__option-button-icon--selected":""),children:n.icon})}),o!==i.length-1&&e.jsx("div",{className:"notificare__toggle-group__border"})]},n.value)))})]})}Kt(".notificare .notificare__toggle-group__wrapper {\n display: flex;\n flex-direction: column;\n row-gap: 7px;\n}\n\n.notificare .notificare__toggle-group__label {\n font-size: 14px;\n color: #6e6e6e;\n}\n\n.notificare .notificare__toggle-group__options {\n display: flex;\n border-radius: 8px;\n border: 1px solid #DADADA;\n width: max-content;\n overflow: hidden;\n background-color: #F6F6F6;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.notificare .notificare__toggle-group__option-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n transition: all 0.3s;\n background: #f6f6f6;\n color: #374151;\n border: 0;\n cursor: pointer;\n}\n\n.notificare .notificare__toggle-group__option-button--selected {\n background: #5E5E5E;\n color: #ffffff;\n}\n\n.notificare .notificare__toggle-group__option-button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n fill: #C0C0C0;\n}\n\n.notificare .notificare__toggle-group__option-button-icon--selected {\n fill: #FFF\n}\n\n.notificare .notificare__toggle-group__border {\n width: 1px;\n height: 40px;\n background: #DADADA;\n}");function Cn({message:t,showConsoleWarning:n}){return e.jsxs("div",{className:"notificare__unavailable-preview__wrapper","data-testid":"unavailable-preview",children:[e.jsxs("div",{className:"notificare__unavailable-preview__warning",children:[e.jsx(rn,{className:"notificare__unavailable-preview__alert-icon"}),e.jsxs("div",{className:"notificare__unavailable-preview__text-container",children:[e.jsx("div",{className:"notificare__unavailable-preview__title",children:e.jsx(Vt,{id:"preview.error.notGeneratedPreview",defaultMessage:an["preview.error.notGeneratedPreview"]})}),e.jsx("div",{className:"notificare__unavailable-preview__reason-text","data-testid":"unavailable-preview-reason-text",children:t})]})]}),n&&e.jsx("div",{className:"notificare__unavailable-preview__check-console-text",children:e.jsx(Vt,{id:"preview.error.checkConsole",defaultMessage:an["preview.error.checkConsole"]})})]})}Kt(".notificare .notificare__unavailable-preview__wrapper {\n width: 350px;\n}\n\n.notificare .notificare__unavailable-preview__warning {\n width: 100%;\n background-color: #fff1cc;\n border: 1px solid #d5d5d5;\n display: flex;\n align-items: center;\n padding: 14px;\n border-radius: 10px;\n column-gap: 14px;\n}\n\n.notificare .notificare__unavailable-preview__text-container {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n width: 100%;\n}\n\n.notificare .notificare__unavailable-preview__title {\n font-size: 15px;\n color: #232323;\n font-weight: bold;\n}\n\n.notificare .notificare__unavailable-preview__reason-text {\n font-size: 13px;\n color: #bd6868;\n}\n\n.notificare .notificare__unavailable-preview__alert-icon {\n width: 40px;\n height: auto;\n}\n\n.notificare .notificare__unavailable-preview__check-console-text {\n font-size: 12px;\n color: #989898;\n text-align: right;\n margin-top: 6px;\n margin-right: 3px;\n font-style: italic;\n position: relative;\n}");const Tn=t.createContext(void 0);function An(t){var{children:n}=t,i=c(t,["children"]);return e.jsx(Tn.Provider,{value:i,children:n})}function Pn(){const e=t.useContext(Tn);if(!e)throw new Error("useOptions should be used inside an OptionsProvider");return e}function Mn(e,t,n){return l(this,void 0,void 0,(function*(){const i=new URL(`/webshot/${encodeURIComponent(e)}/result`,"https://push.notifica.re");i.searchParams.set("apiKey",t);const r=yield function(e,t){return l(this,void 0,void 0,(function*(){const n=yield fetch(e,t);if(!n.ok)throw new pn(n);return yield n.blob()}))}(i,{signal:n});return URL.createObjectURL(r)}))}function Ln(e,t){console.error(`${t}\n\n${e}`)}function On(e){try{return"https:"===new URL(e).protocol}catch(e){return!1}}function In(e){try{const t=new URL(e).hostname,n=t.split(".");return n.length>2?n.slice(-2).join("."):t}catch(e){return console.error("Invalid URL:",e),""}}function Rn(e){const n=Bt(),i=Pn(),{url:r,platform:a,width:o,height:s,serviceKey:c}=hn(Object.assign(Object.assign({},e),{serviceKey:i.serviceKey}),500),[p,d]=t.useState({status:"idle"}),[_,u]=t.useState();return t.useEffect((function(){const e=new AbortController,t=e.signal;if(u(void 0),function(e){try{return new URL(e),!0}catch(e){return!1}}(r))return d({status:"loading"}),function(e,t,n,i,r,a){return l(this,void 0,void 0,(function*(){const o=new URL("/webshot","https://push.notifica.re");o.searchParams.set("apiKey",r);const{webshot:s}=yield dn(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e,delay:3e3,platform:i,type:"png",params:{width:t,height:n}}),signal:a});return s.id}))}(r,o,s,a,c,t).then((e=>{t.aborted||u(e)})).catch((e=>{t.aborted||(Ln(e,"An error has occurred while trying to create the webshot request:"),d({status:"error",error:new Error(n.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))}))})),()=>{e.abort()};d({status:"error",error:new Error(n.formatMessage({id:"preview.error.invalidUrl",defaultMessage:an["preview.error.invalidUrl"]}))})}),[r,o,s,a,c,n]),t.useEffect((function(){if(!_)return;const e=new AbortController,t=e.signal;let i,r=!1;const a=()=>l(this,void 0,void 0,(function*(){if(!r){r=!0;try{const e=yield function(e,t,n){return l(this,void 0,void 0,(function*(){const i=new URL(`/webshot/${encodeURIComponent(e)}`,"https://push.notifica.re");i.searchParams.set("apiKey",t);const{webshot:r}=yield dn(i,{signal:n});return r}))}(_,c,t);if(t.aborted)return;switch(e.status){case"finished":{clearInterval(i);const e=yield Mn(_,c,t);if(t.aborted)return;d({status:"success",data:e});break}case"error":clearInterval(i),Ln(e.result,"An error has occurred while trying to get the webshot request status:"),d({status:"error",error:new Error(n.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))})}}catch(e){if(t.aborted)return;clearInterval(i),Ln(e,"Webshot error:"),d({status:"error",error:new Error(n.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))})}r=!1}}));return a(),i=setInterval((()=>{a()}),3e3),()=>{e.abort(),clearInterval(i)}}),[_]),p}var Un;function Bn({url:n,platform:i,width:r,height:a,onLoadingChanged:o,canShow:s=!0}){const c=Rn({url:n,platform:i,width:r,height:a});return t.useEffect((function(){switch(c.status){case"idle":case"loading":null==o||o(!0);break;case"success":case"error":null==o||o(!1)}}),[c,o]),e.jsxs("div",{className:"notificare__webshot__wrapper",style:{width:r,height:a},children:["loading"===c.status&&e.jsx(tn,{}),"success"===c.status&&s&&e.jsx("img",{src:c.data,alt:"Webshot","data-testid":"webshot"}),"error"===c.status&&e.jsx(sn,{message:c.error.message})]})}function Hn(){return Hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Hn.apply(null,arguments)}Kt(".notificare .notificare__webshot__wrapper {\n background-color: #fff;\n}");var Fn,Dn=function(e){return r.createElement("svg",Hn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},e),Un||(Un=r.createElement("path",{d:"M144 144v48h160v-48c0-44.2-35.8-80-80-80s-80 35.8-80 80m-64 48v-48C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64v192c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64z"})))};function zn(){return zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},zn.apply(null,arguments)}var Gn=function(e){return r.createElement("svg",zn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),Fn||(Fn=r.createElement("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256z"})))};function Zn({url:n,onLoadingChanged:i,canShow:r}){const[a,o]=t.useState(""),[s,c]=t.useState({isLoading:!0}),{serviceKey:p}=Pn(),d=Bt();return t.useEffect((function(){Vn(!0,c,i),function(e,t){return l(this,void 0,void 0,(function*(){var n,i;const r=new URL("/proxy","https://push.notifica.re");r.searchParams.set("apiKey",e),r.searchParams.set("url",t);const a=yield fetch(r),o=yield a.text();return null!==(i=null===(n=(new DOMParser).parseFromString(o,"text/html").querySelector("title"))||void 0===n?void 0:n.textContent)&&void 0!==i?i:""}))}(p,n).then(o).catch((e=>{Ln(e,"Error while getting page title:")})).finally((()=>{Vn(!1,c,i)}))}),[n,p,i]),e.jsxs("div",{className:"notificare__push__android__in-app-browser__app-ui__bar",children:[e.jsx(Gn,{className:"notificare__push__android__in-app-browser__app-ui__x-mark-icon"}),On(n)?e.jsx(Dn,{className:"notificare__push__android__in-app-browser__app-ui__bar-lock-icon"}):e.jsx(rn,{className:"notificare__push__android__in-app-browser__app-ui__alert-icon"}),e.jsxs("div",{className:"notificare__push__android__in-app-browser__app-ui__bar-domain",children:[e.jsx("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--title",children:!s.isLoading&&r?a:d.formatMessage({id:"preview.android.inAppBrowser.appUi.pageTitleLoading",defaultMessage:an["preview.android.inAppBrowser.appUi.pageTitleLoading"]})}),e.jsx("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--url",children:In(n)})]})]})}function Vn(e,t,n){t({isLoading:e}),null==n||n(e)}Kt(".notificare .notificare__push__android__in-app-browser__app-ui__bar {\n display: flex;\n width: 334px;\n height: 45px;\n padding: 0 15px;\n align-items: center;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__x-mark-icon {\n margin-right: 20px;\n height: 24px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-lock-icon {\n margin-right: 7px;\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__alert-icon {\n margin-right: 7px;\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-domain {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text--title {\n font-size: 14px;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text--url {\n font-size: 12px;\n}");function $n({notification:n}){const[i,r]=t.useState(!0),[a,o]=t.useState(!0),s=n.content[0].data;return e.jsxs("div",{"data-testid":"android-app-ui-in-app-browser-notification",children:[e.jsx(Zn,{url:s,onLoadingChanged:r,canShow:!a}),e.jsx(Bn,{url:s,platform:"Android",width:338,height:570,onLoadingChanged:o,canShow:!i})]})}Kt("");const Wn=t.createContext(void 0);function Kn({application:t,children:n}){return e.jsx(Wn.Provider,{value:t,children:n})}function qn(){const e=t.useContext(Wn);if(!e)throw new Error("useApplication should be used inside an ApplicationProvider");return e}function Xn(e,t){return l(this,void 0,void 0,(function*(){const n=new URL("/proxy","https://push.notifica.re");return n.searchParams.set("apiKey",e),n.searchParams.set("url",t),yield function(e,t){return l(this,void 0,void 0,(function*(){const n=yield fetch(e,t);if(!n.ok)throw new pn(n);return yield n.text()}))}(n)}))}function Yn(e){return!!(e.actions&&e.actions.length>0)}function Jn(e){return!(!e.actions||1!==e.actions.length)}function Qn(e){return!!(e.actions&&e.actions.length>1)}function ei(e){var t;return!!(null===(t=e.attachments)||void 0===t?void 0:t[0])}function ti(e){const t=(new DOMParser).parseFromString(e,"text/html").querySelectorAll("a");let n=!1;return t.forEach((e=>{new URL(e.href,window.location.origin).searchParams.has("notificareOpenAction")&&(n=!0)})),n}var ni;function ii(){return ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ii.apply(null,arguments)}var ri,ai=function(e){return r.createElement("svg",ii({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},e),ni||(ni=r.createElement("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H109.3l105.3-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"})))};function oi(){return oi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},oi.apply(null,arguments)}var si=function(e){return r.createElement("svg",oi({xmlns:"http://www.w3.org/2000/svg","data-testid":"android-app-ui-navigation-bar-options-button",viewBox:"0 0 128 512",width:"1em",height:"1em"},e),ri||(ri=r.createElement("path",{d:"M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112m0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112m56-104A56 56 0 1 0 8 96a56 56 0 1 0 112 0"})))};function ci({title:t,showOptions:n}){return e.jsxs("div",{className:"notificare__push__android__app-ui__navigation-bar",children:[e.jsx(ai,{className:"notificare__push__android__app-ui__navigation-bar-arrow-icon"}),e.jsx("div",{className:"notificare__push__android__app-ui__navigation-bar-title",children:t}),n&&e.jsx(si,{"data-testid":"android-app-ui-navigation-bar-options-button",className:"notificare__push__android__app-ui__navigation-bar-options-button"})]})}Kt(".notificare .notificare__push__android__app-ui__navigation-bar {\n display: flex;\n width: 338px;\n height: 45px;\n padding: 0 15px;\n align-items: center;\n justify-content: flex-start;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-arrow-icon {\n margin-right: 20px;\n height: 24px;\n width: auto;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-title {\n width: 100%;\n font-size: 18px;\n font-weight: 700;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-options-button {\n margin-left: auto;\n height: 24px;\n}");var li;function pi({notification:n}){const i=qn(),r=n.content[0].data,[a,o]=t.useState(""),{serviceKey:s}=Pn();return t.useEffect((function(){Xn(s,r).then(o).catch((e=>{Ln(e,"Error fetching website markup:")}))}),[r,s]),e.jsxs("div",{"data-testid":"android-app-ui-url-notification",children:[e.jsx(ci,{title:n.title||i.name,showOptions:Yn(n)&&!ti(a)}),e.jsx(Bn,{url:r,platform:"Android",width:338,height:570})]})}function di(e){if(!(e=e.trim()))return li.INVALID_URL;if(e.startsWith("/"))return li.RELATIVE_URL;let t;try{t=new URL(e)}catch(e){return li.INVALID_URL}const n="http:"===t.protocol||"https:"===t.protocol,i=t.host.endsWith("ntc.re");if(!n)return li.URL_SCHEME;if(i)return li.DYNAMIC_LINK;const r=t.searchParams.get("notificareWebView");return"1"===r||"true"===(null==r?void 0:r.toLowerCase())?li.WEB_VIEW:li.IN_APP_BROWSER}function _i({notification:n,onError:i}){const r=Bt(),a=di(n.content[0].data),o=(()=>{switch(a){case li.INVALID_URL:return{status:"error",errorCode:"preview.error.urlResolverInvalidUrl"};case li.URL_SCHEME:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithUrlSchemePreview"};case li.DYNAMIC_LINK:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithDynamicLink"};case li.RELATIVE_URL:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithRelativeUrl"};case li.WEB_VIEW:return{status:"success",preview:e.jsx(pi,{notification:n})};case li.IN_APP_BROWSER:return{status:"success",preview:e.jsx($n,{notification:n})}}})();switch(t.useEffect((function(){"error"===o.status&&i(r.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,i,r]),o.status){case"error":return;case"success":return o.preview}}Kt(""),function(e){e.INVALID_URL="invalid-url",e.DYNAMIC_LINK="dynamic-link",e.WEB_VIEW="web-view",e.IN_APP_BROWSER="in-app-browser",e.URL_SCHEME="url-scheme",e.RELATIVE_URL="relative-url"}(li||(li={}));function ui({notification:t}){const n=qn(),i=Bt(),r=function(e){const t="https://play.google.com";for(const n of e)switch(n.type){case"re.notifica.content.GooglePlayDetails":{const e=new URL("/store/apps/details",t);return e.searchParams.set("id",n.data),e.toString()}case"re.notifica.content.GooglePlayDeveloper":{const e=new URL("/store/apps/dev",t);return e.searchParams.set("id",n.data),e.toString()}case"re.notifica.content.GooglePlayCollection":return new URL(`/store/apps/collection/${encodeURIComponent(n.data)}`,t).toString();case"re.notifica.content.GooglePlaySearch":{const e=new URL("/store/search",t);return e.searchParams.set("q",n.data),e.searchParams.set("c","apps"),e.toString()}}return null}(t.content);return e.jsxs("div",{"data-testid":"android-app-ui-app-recommendation-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:!1}),r?e.jsx(Bn,{url:r,platform:"Android",width:338,height:570}):e.jsx(sn,{message:i.formatMessage({id:"preview.error.noValidContentObject",defaultMessage:an["preview.error.noValidContentObject"]})})]})}Kt("");function fi({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"android-app-ui-passbook-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx(Bn,{url:`https://push.notifica.re/pass/web/${t.content[0].data.split("/")[5]}`,platform:"Android",width:338,height:570}),")"]})}Kt("");var hi,mi;function gi({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"android-app-ui-images-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx("div",{className:"notificare__push__android__image__app-ui__rich-content",children:e.jsx("div",{className:"notificare__push__android__image__app-ui__image-slider",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__push__android__image__app-ui__image-slider-item",src:t.data,alt:"Slider image"},n)))})})]})}Kt(".notificare .notificare__push__android__image__app-ui__rich-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: 570px;\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scrollbar-width: none; /* Hide in Firefox */\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider::-webkit-scrollbar {\n display: none; /* Hide in Chrome and Safari */\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}");var vi=kt(mi?hi:(mi=1,hi=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,r,a;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!==r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!==r--;)if(!Object.prototype.hasOwnProperty.call(n,a[r]))return!1;for(r=i;0!==r--;){var o=a[r];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}));function bi(){return bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},bi.apply(null,arguments)}function wi(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}function yi(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}const xi="NOT_LOADED",ki="LOADING",Ei="LOADED",ji="FAILED",Ni="AUTH_FAILURE";class Si{static async load(e,t){var n;const i=e.libraries?e.libraries.split(","):[],r=this.serializeParams(e);this.listeners.push(t),null!=(n=window.google)&&null!=(n=n.maps)&&n.importLibrary?(this.serializedApiParams||(this.loadingStatus=Ei),this.notifyLoadingStatusListeners()):(this.serializedApiParams=r,this.initImportLibrary(e)),this.serializedApiParams&&this.serializedApiParams!==r&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const a=["maps",...i];await Promise.all(a.map((e=>google.maps.importLibrary(e))))}static serializeParams(e){return[e.v,e.key,e.language,e.region,e.authReferrerPolicy,e.solutionChannel].join("/")}static initImportLibrary(e){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary)return void console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");let t=null;const n=()=>t||(t=new Promise(((t,n)=>{var i;const r=document.createElement("script"),a=new URLSearchParams;for(const[t,n]of Object.entries(e)){const e=t.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase()));a.set(e,String(n))}a.set("loading","async"),a.set("callback","__googleMapsCallback__"),r.async=!0,r.src="https://maps.googleapis.com/maps/api/js?"+a.toString(),r.nonce=(null==(i=document.querySelector("script[nonce]"))?void 0:i.nonce)||"",r.onerror=()=>{this.loadingStatus=ji,this.notifyLoadingStatusListeners(),n(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=Ei,this.notifyLoadingStatusListeners(),t()},window.gm_authFailure=()=>{this.loadingStatus=Ni,this.notifyLoadingStatusListeners()},this.loadingStatus=ki,this.notifyLoadingStatusListeners(),document.head.append(r)})),t);google.maps.importLibrary=e=>n().then((()=>google.maps.importLibrary(e)))}static notifyLoadingStatusListeners(){for(const e of this.listeners)e(this.loadingStatus)}}Si.loadingStatus=xi,Si.serializedApiParams=void 0,Si.listeners=[];const Ci=["onLoad","onError","apiKey","version","libraries"],Ti=["children"],Ai=t.createContext(null);const Pi=e=>{const{children:n}=e,i=wi(e,Ti),{mapInstances:r,addMapInstance:a,removeMapInstance:o,clearMapInstances:s}=function(){const[e,n]=t.useState({});return{mapInstances:e,addMapInstance:(e,t="default")=>{n((n=>bi({},n,{[t]:e})))},removeMapInstance:(e="default")=>{n((t=>wi(t,[e].map(yi))))},clearMapInstances:()=>{n({})}}}(),{status:c,loadedLibraries:l,importLibrary:p}=function(e){const{onLoad:n,onError:i,apiKey:r,version:a,libraries:o=[]}=e,s=wi(e,Ci),[c,l]=t.useState(Si.loadingStatus),[p,d]=t.useReducer(((e,t)=>e[t.name]?e:bi({},e,{[t.name]:t.value})),{}),_=t.useMemo((()=>null==o?void 0:o.join(",")),[o]),u=t.useMemo((()=>JSON.stringify(bi({apiKey:r,version:a},s))),[r,a,s]),f=t.useCallback((async e=>{var t;if(p[e])return p[e];if(null==(t=google)||null==(t=t.maps)||!t.importLibrary)throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const n=await window.google.maps.importLibrary(e);return d({name:e,value:n}),n}),[p]);return t.useEffect((()=>{(async()=>{try{const e=bi({key:r},s);a&&(e.v=a),(null==_?void 0:_.length)>0&&(e.libraries=_),(void 0===e.channel||e.channel<0||e.channel>999)&&delete e.channel,void 0===e.solutionChannel?e.solutionChannel="GMP_visgl_rgmlibrary_v1_default":""===e.solutionChannel&&delete e.solutionChannel,await Si.load(e,(e=>l(e)));for(const e of["core","maps",...o])await f(e);n&&n()}catch(e){i?i(e):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",e)}})()}),[r,_,u]),{status:c,loadedLibraries:p,importLibrary:f}}(i),d=t.useMemo((()=>({mapInstances:r,addMapInstance:a,removeMapInstance:o,clearMapInstances:s,status:c,loadedLibraries:l,importLibrary:p})),[r,a,o,s,c,l,p]);return t.createElement(Ai.Provider,{value:d},n)};function Mi(e,t,n){const i={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(Oi.includes(e)){const e=i,n=t.getCenter(),r=t.getZoom(),a=t.getHeading()||0,o=t.getTilt()||0,s=t.getBounds();return n&&s&&Number.isFinite(r)||console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),e.detail={center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:a,tilt:o,bounds:(null==s?void 0:s.toJSON())||{north:90,east:180,south:-90,west:-180}},e}if(Ii.includes(e)){var r;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const e=i;return e.domEvent=n.domEvent,e.stoppable=!0,e.stop=()=>n.stop(),e.detail={latLng:(null==(r=n.latLng)?void 0:r.toJSON())||null,placeId:n.placeId},e}return i}const Li={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},Oi=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Ii=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Ri=Object.keys(Li);const Ui=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Bi(e,n){const i={},r=Object.keys(n);for(const e of r)Ui.has(e)&&(i[e]=n[e]);!function(e,n){const i=t.useRef(void 0);i.current&&vi(n,i.current)||(i.current=n),t.useEffect(e,i.current)}((()=>{e&&e.setOptions(i)}),[i])}function Hi(){var e;return(null==(e=t.useContext(Ai))?void 0:e.status)||xi}function Fi(e){return function(e){return!(!e||"object"!=typeof e)&&"lat"in e&&"lng"in e&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)}(e)?e:e.toJSON()}const Di=()=>t.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"}},t.createElement("h2",null,"Error: AuthFailure"),t.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",t.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."));function zi(){return Hi()===Ei}function Gi(e){const n=function(){const[,e]=t.useReducer((e=>e+1),0);return e}(),i=t.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return t.useEffect((()=>{if(!e)return;const t=google.maps.event.addListener(e,"bounds_changed",(()=>{!function(e,t){const n=e.getCenter(),i=e.getZoom(),r=e.getHeading()||0,a=e.getTilt()||0,o=e.getBounds();n&&o&&Number.isFinite(i)||console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:i||0,heading:r,tilt:a})}(e,i),n()}));return()=>t.remove()}),[e,n]),i}const Zi=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],Vi=["padding"];class $i{static has(e){return this.entries[e]&&this.entries[e].length>0}static pop(e){return this.entries[e]&&this.entries[e].pop()||null}static push(e,t){this.entries[e]||(this.entries[e]=[]),this.entries[e].push(t)}}function Wi(e,n){const i=zi(),[r,a]=t.useState(null),[o,s]=function(){const[e,n]=t.useState(null);return[e,t.useCallback((e=>n(e)),[n])]}(),c=Gi(r),{id:l,defaultBounds:p,defaultCenter:d,defaultZoom:_,defaultHeading:u,defaultTilt:f,reuseMaps:h,renderingType:m,colorScheme:g}=e,v=wi(e,Zi),b=void 0!==e.zoom||void 0!==e.defaultZoom,w=void 0!==e.center||void 0!==e.defaultCenter;p||b&&w||console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!v.center&&d&&(v.center=d),!v.zoom&&Number.isFinite(_)&&(v.zoom=_),!v.heading&&Number.isFinite(u)&&(v.heading=u),!v.tilt&&Number.isFinite(f)&&(v.tilt=f);for(const e of Object.keys(v))void 0===v[e]&&delete v[e];const y=t.useRef(void 0);return t.useEffect((()=>{if(!o||!i)return;const{addMapInstance:t,removeMapInstance:r}=n,{mapId:s}=e,d=`${s||"default"}:${m||"default"}:${g||"LIGHT"}`;let _,u;if(h&&$i.has(d)?(u=$i.pop(d),_=u.getDiv(),o.appendChild(_),u.setOptions(v),setTimeout((()=>u.setCenter(u.getCenter())),0)):(_=document.createElement("div"),_.style.height="100%",o.appendChild(_),u=new google.maps.Map(_,bi({},v,m?{renderingType:m}:{},g?{colorScheme:g}:{}))),a(u),t(u,l),p){const{padding:e}=p,t=wi(p,Vi);u.fitBounds(t,e)}else b&&w||u.fitBounds({east:180,west:-180,south:-90,north:90});if(y.current){const{mapId:e,cameraState:t}=y.current;e!==s&&u.setOptions(t)}return()=>{y.current={mapId:s,cameraState:c.current},_.remove(),h?$i.push(d,u):google.maps.event.clearInstanceListeners(u),a(null),r(l)}}),[o,i,l,e.mapId,e.renderingType,e.colorScheme]),[r,s,c]}$i.entries={};const Ki=t.createContext(null),qi=e=>{const{children:n,id:i,className:r,style:a}=e,o=t.useContext(Ai),s=Hi();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[c,l,p]=Wi(e,o);!function(e,n,i){const r=i.center?Fi(i.center):null;let a=null,o=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(a=r.lat,o=r.lng);const s=Number.isFinite(i.zoom)?i.zoom:null,c=Number.isFinite(i.heading)?i.heading:null,l=Number.isFinite(i.tilt)?i.tilt:null;t.useLayoutEffect((()=>{if(!e)return;const t={};let i=!1;null===a||null===o||n.current.center.lat===a&&n.current.center.lng===o||(t.center={lat:a,lng:o},i=!0),null!==s&&n.current.zoom!==s&&(t.zoom=s,i=!0),null!==c&&n.current.heading!==c&&(t.heading=c,i=!0),null!==l&&n.current.tilt!==l&&(t.tilt=l,i=!0),i&&e.moveCamera(t)}))}(c,p,e),function(e,n){for(const i of Ri){const r=n[i],a=Li[i];t.useEffect((()=>{if(!e)return;if(!r)return;const t=google.maps.event.addListener(e,a,(t=>{r(Mi(a,e,t))}));return()=>t.remove()}),[e,a,r])}}(c,e),Bi(c,e);const d=function(e,n){const{viewport:i,viewState:r}=n,a=!!i;return t.useLayoutEffect((()=>{if(!e||!r)return;const{latitude:t,longitude:n,bearing:i,pitch:a,zoom:o}=r;e.moveCamera({center:{lat:t,lng:n},heading:i,tilt:a,zoom:o+1})}),[e,r]),a}(c,e),_=!!e.controlled;t.useEffect((()=>{if(c)return d&&c.setOptions({disableDefaultUI:!0}),(d||_)&&c.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{c.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}}),[c,d,_,e.gestureHandling,e.keyboardShortcuts]);const u=e.center?Fi(e.center):null;let f=null,h=null;u&&Number.isFinite(u.lat)&&Number.isFinite(u.lng)&&(f=u.lat,h=u.lng);const m=t.useMemo((()=>{var t,n,i,r,a;return{center:{lat:null!=(t=f)?t:0,lng:null!=(n=h)?n:0},zoom:null!=(i=e.zoom)?i:0,heading:null!=(r=e.heading)?r:0,tilt:null!=(a=e.tilt)?a:0}}),[f,h,e.zoom,e.heading,e.tilt]);t.useLayoutEffect((()=>{if(!c||!_)return;c.moveCamera(m);const e=c.addListener("bounds_changed",(()=>{c.moveCamera(m)}));return()=>e.remove()}),[c,_,m]);const g=t.useMemo((()=>bi({width:"100%",height:"100%",position:"relative",zIndex:d?-1:0},a)),[a,d]),v=t.useMemo((()=>({map:c})),[c]);return s===Ni?t.createElement("div",{style:bi({position:"relative"},r?{}:g),className:r},t.createElement(Di,null)):t.createElement("div",bi({ref:l,"data-testid":"map",style:r?void 0:g,className:r},i?{id:i}:{}),c?t.createElement(Ki.Provider,{value:v},n):null)};qi.deckGLViewProps=!0;const Xi=new Set;const Yi=(e=null)=>{const n=t.useContext(Ai),{map:i}=t.useContext(Ki)||{};if(null===n)return function(...e){const t=JSON.stringify(e);Xi.has(t)||(Xi.add(t),console.error(...e))}("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=n;return null!==e?r[e]||null:i||(r.default||null)};function Ji(e,n,i){t.useEffect((()=>{if(!e||!n||!i)return;const t=google.maps.event.addListener(e,n,i);return()=>t.remove()}),[e,n,i])}function Qi(e,n,i){t.useEffect((()=>{e&&(e[n]=i)}),[e,n,i])}function er(e,n,i){t.useEffect((()=>{if(e&&n&&i)return e.addEventListener(n,i),()=>e.removeEventListener(n,i)}),[e,n,i])}const tr=t.createContext(null),nr={BOTTOM:["50%","100%"]},ir=({children:e,styles:n,className:i,anchorPoint:r})=>{const[a,o]=null!=r?r:nr.BOTTOM;let s=`-${a}`,c=`-${o}`;a.trimStart().startsWith("-")&&(s=a.substring(1)),o.trimStart().startsWith("-")&&(c=o.substring(1));const l=`translate(50%, 100%) translate(${s}, ${c})`;return t.createElement("div",{style:{transform:l}},t.createElement("div",{className:i,style:n},e))};function rr(e){const[n,i]=t.useState(null),[r,a]=t.useState(null),o=Yi(),s=function(e){const n=zi(),i=t.useContext(Ai);return t.useEffect((()=>{n&&i&&i.importLibrary(e)}),[n,i,e]),(null==i?void 0:i.loadedLibraries[e])||null}("marker"),{children:c,onClick:l,className:p,onMouseEnter:d,onMouseLeave:_,onDrag:u,onDragStart:f,onDragEnd:h,collisionBehavior:m,clickable:g,draggable:v,position:b,title:w,zIndex:y}=e,x=t.Children.count(c);return t.useEffect((()=>{if(!o||!s)return;const e=new s.AdvancedMarkerElement;e.map=o,i(e);let t=null;return x>0&&(t=document.createElement("div"),t.isCustomMarker=!0,e.content=t,a(t)),()=>{var n;e.map=null,null==(n=t)||n.remove(),i(null),a(null)}}),[o,s,x]),t.useEffect((()=>{!n||!n.content||x>0||(n.content.className=p||"")}),[n,p,x]),Qi(n,"position",b),Qi(n,"title",null!=w?w:""),Qi(n,"zIndex",y),Qi(n,"collisionBehavior",m),t.useEffect((()=>{n&&(n.gmpDraggable=void 0!==v?v:!!(u||f||h))}),[n,v,u,h,f]),t.useEffect((()=>{if(!n)return;const e=void 0!==g||Boolean(l)||Boolean(d)||Boolean(_);n.gmpClickable=e,e&&null!=n&&n.content&&n.content.nodeType===Node.ELEMENT_NODE&&(n.content.style.pointerEvents="none",n.content.firstElementChild&&(n.content.firstElementChild.style.pointerEvents="all"))}),[n,g,l,d,_]),Ji(n,"click",l),Ji(n,"drag",u),Ji(n,"dragstart",f),Ji(n,"dragend",h),er(null==n?void 0:n.element,"mouseenter",d),er(null==n?void 0:n.element,"mouseleave",_),[n,r]}t.forwardRef(((e,i)=>{const{children:r,style:a,className:o,anchorPoint:s}=e,[c,l]=rr(e),p=t.useMemo((()=>c?{marker:c}:null),[c]);return t.useImperativeHandle(i,(()=>c),[c]),l?t.createElement(tr.Provider,{value:p},n.createPortal(t.createElement(ir,{anchorPoint:s,styles:a,className:o},r),l)):null}));const ar=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];const or=t.forwardRef(((e,n)=>{const i=function(e){const[n,i]=t.useState(null),r=Yi(),{onClick:a,onDrag:o,onDragStart:s,onDragEnd:c,onMouseOver:l,onMouseOut:p}=e,d=wi(e,ar),{position:_,draggable:u}=d;return t.useEffect((()=>{if(!r)return void(void 0===r&&console.error("<Marker> has to be inside a Map component."));const e=new google.maps.Marker(d);return e.setMap(r),i(e),()=>{e.setMap(null),i(null)}}),[r]),t.useEffect((()=>{if(!n)return;const e=n,t=google.maps.event;return a&&t.addListener(e,"click",a),o&&t.addListener(e,"drag",o),s&&t.addListener(e,"dragstart",s),c&&t.addListener(e,"dragend",c),l&&t.addListener(e,"mouseover",l),p&&t.addListener(e,"mouseout",p),n.setDraggable(Boolean(u)),()=>{t.clearInstanceListeners(e)}}),[n,u,a,o,s,c,l,p]),t.useEffect((()=>{n&&d&&n.setOptions(d)}),[n,d]),t.useEffect((()=>{!u&&_&&n&&n.setPosition(_)}),[u,_,n]),n}(e);return t.useImperativeHandle(n,(()=>i),[i]),t.createElement(t.Fragment,null)}));function sr({notification:n,width:i,height:r}){const{googleMapsAPIKey:a}=Pn(),[o,s]=t.useState(!1),c=t.useMemo((()=>function(e){const t=[];return e.content.forEach((e=>{t.push({title:e.data.title,latitude:e.data.latitude,longitude:e.data.longitude})})),t}(n).map(((e,t)=>({id:t,lat:e.latitude,lng:e.longitude,title:e.title})))),[n.content]),l=t.useMemo((()=>c.length>0?{lat:c[0].lat,lng:c[0].lng}:{lat:0,lng:0}),[c]);return t.useEffect((()=>{s(!0)}),[]),0!==c.length&&o?e.jsx("div",{"data-testid":"map-notification",children:e.jsx(Pi,{apiKey:a||"",children:e.jsx(cr,{markers:c,center:l,width:i,height:r})})}):e.jsx(tn,{})}function cr({markers:t,center:n,width:i,height:r}){const a=Hi(),o=Bt();return e.jsxs("div",{style:{width:i,height:r,backgroundColor:"white",position:"relative",overflow:"hidden"},children:[a===ki&&e.jsx(tn,{}),a===Ni&&e.jsx(sn,{message:o.formatMessage({id:"preview.error.googleMapsAuthFailure",defaultMessage:an["preview.error.googleMapsAuthFailure"]})}),a===ji&&e.jsx(sn,{message:o.formatMessage({id:"preview.error.googleMapsLoadFailure",defaultMessage:an["preview.error.googleMapsLoadFailure"]})}),a===Ei&&e.jsx(qi,{style:{width:i,height:r},defaultCenter:n,defaultZoom:10,gestureHandling:"greedy",disableDefaultUI:!0,children:t.map((t=>e.jsx(or,{position:{lat:t.lat,lng:t.lng},title:t.title},t.id)))})]})}Kt("");function lr({notification:n,onError:i}){const r=qn(),{googleMapsAPIKey:a}=Pn(),o=Bt();if(t.useEffect((function(){a||i(o.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[a,i,o]),a)return e.jsxs("div",{"data-testid":"android-app-ui-map-notification",children:[e.jsx(ci,{title:r.name,showOptions:Yn(n)}),e.jsx(sr,{notification:n,width:"100%",height:"570px"})]})}Kt("");var pr;function dr({notification:t}){const n=qn(),i=new URL("/store/apps/details","https://play.google.com");return i.searchParams.set("id",n.androidPackageName||""),e.jsxs("div",{"data-testid":"android-app-ui-rate-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:!1}),e.jsx(Bn,{url:i.toString(),platform:"Android",width:338,height:570})]})}function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_r.apply(null,arguments)}Kt("");var ur=function(e){return r.createElement("svg",_r({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid slice",viewBox:"1757.501 1648.178 806.546 806.694"},e),pr||(pr=r.createElement("rect",{width:"100%",height:"100%",fill:"transparent"})),r.createElement("path",{d:"M-33.085-33.085h66.17v66.17h-66.17z",style:{fill:"#232c2a",strokeWidth:1},transform:"translate(2160.42 2051.46)scale(12.2)"}),r.createElement("circle",{r:35,style:{fill:"#232c2a",stroke:"#444",strokeWidth:1},transform:"matrix(7.2 0 0 7.2 2160.42 2051.79)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"rotate(-135 1505.372 579.04)scale(15.19 -.07)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(10.71 -10.71 -.05 -.05 2160.62 2052.92)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(10.69 0 0 -.07 2160.36 2053.16)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(0 -10.69 -.07 0 1896.9 2052.81)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(0 -10.69 -.07 0 2423.68 2053.49)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(-10.69 0 0 .07 2160.38 1790.29)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(-10.68 0 0 .07 2160.42 2313.82)"}))};function fr({notification:t}){var n;const i=qn();return e.jsx("div",{className:"notificare__push__android__alert__app-ui","data-testid":"android-app-ui-text-alert-notification",children:e.jsxs("div",{className:"notificare__push__android__alert__app-ui__wrapper",children:[e.jsxs("div",{className:"notificare__push__android__alert__app-ui__header",children:[e.jsx("div",{className:"notificare__push__android__alert__app-ui__app-icon",children:i.icon?e.jsx("img",{className:"notificare__push__android__alert__app-ui__app-icon-image",alt:"App icon",src:i.icon}):e.jsx(ur,{className:"notificare__push__android__alert__app-ui__default-app-icon"})}),e.jsx("p",{className:"notificare__push__android__alert__app-ui__title",children:t.title||i.name})]}),e.jsx("p",{className:"notificare__push__android__alert__app-ui__message",children:t.message}),Yn(t)&&e.jsxs("div",{className:"notificare__push__android__alert__app-ui__actions",children:[null===(n=t.actions)||void 0===n?void 0:n.map(((t,n)=>e.jsx("p",{className:"notificare__push__android__alert__app-ui__action-label","data-testid":`android-app-ui-text-alert-notification-action-${n.toString()}`,children:t.label},n))),e.jsx("p",{className:"notificare__push__android__alert__app-ui__cancel-label",children:e.jsx(Vt,{id:"preview.android.alert.appUi.cancel",defaultMessage:an["preview.android.alert.appUi.cancel"]})},"cancel-button-label")]})]})})}Kt(".notificare .notificare__push__android__alert__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__android__alert__app-ui__wrapper {\n position: relative;\n background-color: #fff;\n width: 290px;\n border-radius: 2px;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n/* Header - App Icon and Title */\n\n.notificare .notificare__push__android__alert__app-ui__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: 32px;\n height: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__alert__app-ui__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__android__alert__app-ui__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n.notificare .notificare__push__android__alert__app-ui__header {\n display: flex;\n align-items: center;\n column-gap: 10px;\n padding: 20px 20px 0;\n}\n\n.notificare .notificare__push__android__alert__app-ui__title {\n font-weight: 700;\n font-size: 18px;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 208px;\n}\n\n/* Message */\n\n.notificare .notificare__push__android__alert__app-ui__message {\n font-size: 16px;\n margin-top: 20px;\n margin-bottom: 0;\n word-break: break-all;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 8;\n padding: 0 20px 20px;\n}\n\n/* Actions */\n\n.notificare .notificare__push__android__alert__app-ui__actions {\n border-top: 1px solid #f2f4f6;\n}\n\n.notificare .notificare__push__android__alert__app-ui__action-label {\n font-size: 14px;\n font-weight: 600;\n padding: 15px 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__alert__app-ui__cancel-label {\n font-size: 14px;\n font-weight: 600;\n color: #64706e;\n padding: 15px 20px 20px;\n}");function hr({videoData:t,width:n,height:i}){const r=()=>{switch(t.type){case"re.notifica.content.YouTube":return`https://www.youtube.com/embed/${t.data}`;case"re.notifica.content.Vimeo":return`https://player.vimeo.com/video/${t.data}`;case"re.notifica.content.HTML5Video":return t.data;default:return""}};return"re.notifica.content.YouTube"===t.type||"re.notifica.content.Vimeo"===t.type?e.jsx("iframe",{className:"notificare__push__video-rich-content",src:r(),sandbox:"allow-scripts allow-same-origin",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",width:n,height:i}):e.jsx("video",{className:"notificare__push__video-rich-content",width:n,height:i,autoPlay:!0,controls:!0,children:e.jsx("source",{src:r(),type:"video/mp4"})})}Kt(".notificare .notificare__push__video-rich-content {\n border: 0;\n background-color: #fff;\n}");function mr({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"android-app-ui-video-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx(hr,{videoData:t.content[0],width:"100%",height:"570px"})]})}Kt("");function gr({notification:t}){const n=qn(),i=t.content[0].data;return e.jsxs("div",{"data-testid":"android-app-ui-web-view-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)&&!ti(i)}),e.jsx("iframe",{className:"notificare__push__android__web-view__app-ui__content",srcDoc:i,sandbox:"allow-same-origin"})]})}Kt(".notificare .notificare__push__android__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 570px;\n background-color: #fff;\n pointer-events: none;\n}");function vr({notification:t,expanded:n}){var i,r;const a=qn();return e.jsxs("div",{className:"notificare__push__android__lock-screen","data-testid":"android-lock-screen-notification",children:[e.jsx("div",{className:"notificare__push__android__lock-screen__app-icon",children:a.icon?e.jsx("img",{className:"notificare__push__android__lock-screen__app-icon-image",alt:"App icon",src:a.icon}):e.jsx(ur,{className:"notificare__push__android__lock-screen__default-app-icon"})}),e.jsxs("div",{className:"notificare__push__android__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__android__lock-screen__text-content-top "+(ei(t)&&!n?"notificare__push__android__lock-screen__text-content-top--has-media":""),children:[e.jsxs("div",{className:"notificare__push__android__lock-screen__title-and-subtitle",children:[e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--title",children:n?a.name:t.title||a.name}),t.subtitle&&!ei(t)&&e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--subtitle",children:t.subtitle})]}),e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--time",children:e.jsx(Vt,{id:"preview.android.lockscreen.time",defaultMessage:an["preview.android.lockscreen.time"]})})]}),n&&e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--expanded-title",children:t.title}),e.jsx("p",{className:`notificare__push__android__lock-screen__text ${n?"notificare__push__android__lock-screen__text--expanded-message":""} ${ei(t)&&!n?"notificare__push__android__lock-screen__text--message-with-media":"notificare__push__android__lock-screen__text--message-without-media"}`,children:t.message}),ei(t)&&n&&e.jsx("img",{className:"notificare__push__android__lock-screen__expanded-media",src:null===(i=t.attachments)||void 0===i?void 0:i[0].uri,alt:"Expanded media","data-testid":"android-lock-screen-notification-expanded-media"})]}),ei(t)&&!n&&e.jsx("img",{className:"notificare__push__android__lock-screen__media",src:null===(r=t.attachments)||void 0===r?void 0:r[0].uri,alt:"Media icon","data-testid":"android-lock-screen-notification-media"})]})}Kt(".notificare .notificare__push__android__lock-screen {\n position: absolute;\n font-family: 'Roboto', sans-serif;\n background-color: #f2f4f6;\n width: 315px;\n border-radius: 20px;\n padding: 10px;\n display: flex;\n flex-direction: row;\n column-gap: 11px;\n left: 50%;\n transform: translateX(-50%);\n top: 40px;\n}\n\n.notificare .notificare__push__android__lock-screen__wrapper {\n position: relative;\n}\n\n/* App Icon */\n\n.notificare .notificare__push__android__lock-screen__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: 32px;\n height: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__lock-screen__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__android__lock-screen__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n/* Text Content */\n\n.notificare .notificare__push__android__lock-screen__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n}\n\n.notificare .notificare__push__android__lock-screen__text-content-top {\n display: flex;\n column-gap: 5px;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text-content-top--has-media {\n max-width: 191px;\n}\n\n.notificare .notificare__push__android__lock-screen__title-and-subtitle {\n display: flex;\n overflow: hidden;\n column-gap: 6px;\n}\n\n.notificare .notificare__push__android__lock-screen__text {\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push__android__lock-screen__text--title {\n font-weight: 700;\n font-size: 14px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--expanded-title {\n font-weight: 700;\n font-size: 14px;\n margin-top: 5px;\n width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--subtitle {\n color: #64706e;\n font-size: 12px;\n font-weight: 400;\n}\n\n.notificare .notificare__push__android__lock-screen__text--time {\n color: #64706e;\n font-size: 12px;\n font-weight: 400;\n flex-shrink: 0;\n max-width: 135px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--message-without-media {\n font-size: 14px;\n width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--message-with-media {\n font-size: 14px;\n width: 191px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--expanded-message {\n font-size: 14px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n word-break: break-word;\n width: 252px;\n white-space: wrap;\n}\n\n/* Media */\n\n.notificare .notificare__push__android__lock-screen__media {\n width: 50px;\n border-radius: 5px;\n object-fit: cover;\n}\n\n.notificare .notificare__push__android__lock-screen__expanded-media {\n width: 252px;\n max-height: 168px;\n border-radius: 15px;\n margin-top: 5px;\n}\n");function br({notification:n,previewState:i,onError:r}){const a=Bt(),o=(()=>{switch(i.displayMode){case"lockscreen":case"lockscreen-expanded":return{preview:e.jsx(vr,{notification:n,expanded:"lockscreen-expanded"===i.displayMode}),theme:"light"};case"app-ui":switch(n.type){case"re.notifica.notification.Alert":return{preview:e.jsx(fr,{notification:n}),theme:"dark"};case"re.notifica.notification.WebView":return{preview:e.jsx(gr,{notification:n}),theme:"light"};case"re.notifica.notification.URL":return{preview:e.jsx(pi,{notification:n}),theme:"light"};case"re.notifica.notification.InAppBrowser":return{preview:e.jsx($n,{notification:n}),theme:"light"};case"re.notifica.notification.Image":return{preview:e.jsx(gi,{notification:n}),theme:"light"};case"re.notifica.notification.Map":return{preview:e.jsx(lr,{notification:n,onError:r}),theme:"light"};case"re.notifica.notification.Rate":return{preview:e.jsx(dr,{notification:n}),theme:"light"};case"re.notifica.notification.Passbook":return{preview:e.jsx(fi,{notification:n}),theme:"light"};case"re.notifica.notification.Video":return{preview:e.jsx(mr,{notification:n}),theme:"light"};case"re.notifica.notification.Store":return{preview:e.jsx(ui,{notification:n}),theme:"light"};case"re.notifica.notification.URLResolver":return{preview:e.jsx(_i,{notification:n,onError:r}),theme:"light"};case"re.notifica.notification.None":case"re.notifica.notification.URLScheme":return}}})();if(t.useEffect((function(){o||r(a.formatMessage({id:"preview.error.notSupportedNotificationTypePreviewVariant",defaultMessage:an["preview.error.notSupportedNotificationTypePreviewVariant"]},{notificationType:n.type}))}),[o,n,r,a]),o)return e.jsx(qt,{theme:o.theme,children:e.jsx("div",{className:"notificare__push__android__preview",children:o.preview})})}Kt(".notificare .notificare__push__android__preview {\n font-family: 'Roboto', sans-serif;\n height: 100%;\n}");function wr(t){const{url:n}=t;return e.jsxs("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar",children:[e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-done-button",children:e.jsx(Vt,{id:"preview.ios.inAppBrowser.appUi.done",defaultMessage:an["preview.ios.inAppBrowser.appUi.done"]})}),e.jsxs("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar-domain",children:[On(n)?e.jsx(Dn,{className:"notificare__push__ios__in-app-browser__app-ui__bar-lock-icon"}):e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-not-secure",children:e.jsx(Vt,{id:"preview.ios.inAppBrowser.appUi.notSecure",defaultMessage:an["preview.ios.inAppBrowser.appUi.notSecure"]})}),e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-url",children:In(n)})]})]})}Kt(".notificare .notificare__push__ios__in-app-browser__app-ui__bar {\n display: flex;\n width: 100%;\n padding: 12px 0;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n margin-top: 10px;\n background-color: #fff;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-done-button {\n font-size: 14px;\n font-weight: 700;\n position: absolute;\n left: 0;\n margin-left: 15px;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-lock-icon {\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-domain {\n display: flex;\n column-gap: 5px;\n font-size: 14px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-not-secure {\n color: #64706e;\n font-weight: 400;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-url {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}");function yr({notification:t}){const n=t.content[0].data;return e.jsxs("div",{"data-testid":"ios-app-ui-in-app-browser-notification",children:[e.jsx(wr,{url:n}),e.jsx(Bn,{url:n,platform:"iOS",width:338,height:564})]})}Kt("");function xr({title:t,showOptions:n}){return e.jsxs("div",{className:"notificare__push__ios__app-ui__title-bar",children:[e.jsx("div",{className:"notificare__push__ios__app-ui__title-bar-text",children:t}),n&&e.jsx(si,{className:"notificare__push__ios__app-ui__title-bar-options-button","data-testid":"ios-app-ui-title-bar-options-button"})]})}Kt(".notificare .notificare__push__ios__app-ui__title-bar {\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n background-color: #fff;\n margin-top: 10px;\n position: relative;\n}\n\n.notificare .notificare__push__ios__app-ui__title-bar-text {\n padding: 11px 25px;\n font-size: 14px;\n font-weight: 700;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n max-width: 255px;\n position: relative;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.notificare .notificare__push__ios__app-ui__title-bar-options-button {\n width: 20px;\n margin-left: auto;\n margin-right: 12px;\n}");var kr;function Er({notification:n}){const i=n.content[0].data,r=qn(),[a,o]=t.useState(""),{serviceKey:s}=Pn();return t.useEffect((function(){Xn(s,i).then(o).catch((e=>{Ln(e,"Error fetching website markup:")}))}),[i,s]),e.jsxs("div",{"data-testid":"ios-app-ui-url-notification",children:[e.jsx(xr,{title:n.title||r.name,showOptions:Yn(n)&&!ti(a)}),e.jsx(Bn,{url:i,platform:"iOS",width:338,height:566})]})}function jr({notification:n,onError:i}){const r=Bt(),a=di(n.content[0].data),o=(()=>{switch(a){case li.INVALID_URL:return{status:"error",errorCode:"preview.error.urlResolverInvalidUrl"};case li.URL_SCHEME:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithUrlSchemePreview"};case li.DYNAMIC_LINK:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithDynamicLink"};case li.RELATIVE_URL:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithRelativeUrl"};case li.WEB_VIEW:return{status:"success",preview:e.jsx(Er,{notification:n})};case li.IN_APP_BROWSER:return{status:"success",preview:e.jsx(yr,{notification:n})}}})();switch(t.useEffect((function(){"error"===o.status&&i(r.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,i,r]),o.status){case"error":return;case"success":return o.preview}}function Nr(){return Nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Nr.apply(null,arguments)}Kt("");var Sr,Cr=function(e){return r.createElement("svg",Nr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),kr||(kr=r.createElement("path",{d:"M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8zm212.4 204.4 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2a88.1 88.1 0 0 0 73.8 0zm-152 198.2 152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2a88.1 88.1 0 0 0 73.8 0"})))};function Tr(){return Tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Tr.apply(null,arguments)}var Ar,Pr=function(e){return r.createElement("svg",Tr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Sr||(Sr=r.createElement("path",{d:"M399 384.2c-22.1-38.4-63.6-64.2-111-64.2h-64c-47.4 0-88.9 25.8-111 64.2 35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8M0 256a256 256 0 1 1 512 0 256 256 0 1 1-512 0m256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144"})))};function Mr(e){const{contentList:n}=hn(e,500),i=Bt(),[r,a]=t.useState({status:"idle"});return t.useEffect((function(){const e=function(e){for(const t of e)if("re.notifica.content.AppStore"===t.type)return t.data.identifier;return null}(n);e?(a({status:"loading"}),function(e){return l(this,void 0,void 0,(function*(){const t=new URL("/lookup","https://itunes.apple.com");t.searchParams.set("country","NL"),t.searchParams.set("id",e);const n=(Date.now()/1e3).toString();return t.searchParams.set("x",n),yield dn(t)}))}(e).then((e=>{0!==e.resultCount?a({status:"success",data:e.results[0]}):a({status:"error",error:new Error(i.formatMessage({id:"preview.error.iosStoreAppNotFound",defaultMessage:an["preview.error.iosStoreAppNotFound"]}))})})).catch((e=>{Ln(e,"Error fetching App Store app info:"),a({status:"error",error:new Error(i.formatMessage({id:"preview.error.iosStoreAppLoadFailure",defaultMessage:an["preview.error.iosStoreAppLoadFailure"]}))})}))):a({status:"error",error:new Error(i.formatMessage({id:"preview.error.noValidContentObject",defaultMessage:an["preview.error.noValidContentObject"]}))})}),[n,i]),r}function Lr(e,t){var n;const i=new Intl.RelativeTimeFormat(t,{style:"long"}),r=new Date(e),a=new Date,o=Math.floor((a.getTime()-r.getTime())/1e3),s=[{value:60,unit:"second"},{value:3600,unit:"minute"},{value:86400,unit:"hour"},{value:604800,unit:"day"},{value:2592e3,unit:"week"},{value:31536e3,unit:"month"}];for(let e=0;e<s.length;e++){const{value:t,unit:r}=s[e];if(o<t){const t=Math.floor(o/((null===(n=s[e-1])||void 0===n?void 0:n.value)||1));return i.format(-t,r)}}const c=Math.floor(o/s[s.length-1].value);return i.format(-c,"year")}function Or(){return Or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Or.apply(null,arguments)}var Ir,Rr,Ur=function(e){return r.createElement("svg",Or({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),Ar||(Ar=r.createElement("path",{d:"M316.9 18c-5.3-11-16.5-18-28.8-18s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329l-24.6 145.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329l104.2-103.1c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7l-143.7-21.2z"})))};function Br(){return Br=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Br.apply(null,arguments)}var Hr=function(e){return r.createElement("svg",Br({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),Ir||(Ir=r.createElement("defs",null,r.createElement("linearGradient",{id:"half-star_svg__a"},r.createElement("stop",{offset:"50%"}),r.createElement("stop",{offset:"50%",stopColor:"#ccc"})))),Rr||(Rr=r.createElement("path",{fill:"url(#half-star_svg__a)",d:"M316.9 18c-5.3-11-16.5-18-28.8-18s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329l-24.6 145.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329l104.2-103.1c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7l-143.7-21.2z"})))};function Fr(t){const{rating:n}=t,i=[];for(let t=1;t<=5;t++)t<=n?i.push(e.jsx(Ur,{className:"notificare__push__ios__store__app-ui__star-icon"},t)):t-.5<=n?i.push(e.jsx(Hr,{className:"notificare__push__ios__store__app-ui__star-icon"},t)):i.push(e.jsx(Ur,{className:"notificare__push__ios__store__app-ui__star-icon notificare__push__ios__store__app-ui__star-icon--empty"},t));return e.jsx("div",{className:"notificare__push__ios__store__app-ui__star-rating",children:i})}Kt(".notificare .notificare__push__ios__store__app-ui__star-rating {\n display: inline-flex;\n flex-grow: 0;\n position: relative;\n}\n\n.notificare .notificare__push__ios__store__app-ui__star-icon {\n width: 10px;\n height: 10px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__star-icon--empty {\n fill: #EAEAEA;\n}");function Dr({notification:t}){const n=t.content,i=Bt(),r=Mr({contentList:n});return e.jsxs("div",{"data-testid":"ios-app-ui-app-recommendation-notification",children:[e.jsx("div",{className:"notificare__push__ios__store__app-ui__bar",children:e.jsx(Vt,{id:"preview.ios.store.appUi.done",defaultMessage:an["preview.ios.store.appUi.done"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui",children:["loading"===r.status&&e.jsx(tn,{}),"error"===r.status&&e.jsx(sn,{message:r.error.message}),"success"===r.status&&e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page",children:[e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-header",children:[e.jsx("img",{src:r.data.artworkUrl512,className:"notificare__push__ios__store__app-ui__app-icon",alt:"App icon"}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-app-info",children:[e.jsxs("div",{children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-app-name",children:r.data.trackName}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-app-category",children:r.data.primaryGenreName})]}),e.jsx("div",{className:"notificare__push__ios__store__app-ui__page-install",children:e.jsx(Vt,{id:"preview.ios.store.appUi.install",defaultMessage:an["preview.ios.store.appUi.install"]})})]})]}),e.jsx("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info-wrapper",children:e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info",children:[e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.ratings",defaultMessage:an["preview.ios.store.appUi.ratings"],values:{userRatingCount:r.data.userRatingCount}})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:r.data.averageUserRating.toFixed(1)}),e.jsx(Fr,{rating:r.data.averageUserRating})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.age",defaultMessage:an["preview.ios.store.appUi.age"]})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:r.data.trackContentRating}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:e.jsx(Vt,{id:"preview.ios.store.appUi.yearsOld",defaultMessage:an["preview.ios.store.appUi.yearsOld"]})})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.category",defaultMessage:an["preview.ios.store.appUi.category"]})}),e.jsx(Cr,{className:"notificare__push__ios__store__app-ui__page-info-block-icon"}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:r.data.primaryGenreName})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.developer",defaultMessage:an["preview.ios.store.appUi.developer"]})}),e.jsx(Pr,{className:"notificare__push__ios__store__app-ui__page-info-block-icon"}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:r.data.sellerName})]})]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-history",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.whatsNew",defaultMessage:an["preview.ios.store.appUi.whatsNew"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-history-version-last-update",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-version",children:e.jsx(Vt,{id:"preview.ios.store.appUi.historyVersion",defaultMessage:an["preview.ios.store.appUi.historyVersion"],values:{version:r.data.version}})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-last-update",children:Lr(r.data.currentVersionReleaseDate,i.locale)})]}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-notes",children:r.data.releaseNotes})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-previews",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-previews-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.screenshots",defaultMessage:an["preview.ios.store.appUi.screenshots"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-previews-images",children:[e.jsx("img",{src:r.data.screenshotUrls[0],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"}),e.jsx("img",{src:r.data.screenshotUrls[1],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"})]})]})]})]})]})}Kt("/* Top Bar */\n\n.notificare .notificare__push__ios__store__app-ui__bar {\n display: flex;\n width: 100%;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n font-size: 14px;\n font-weight: 700;\n padding: 11px 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n background-color: #fff;\n margin-top: 10px;\n}\n\n/* --- App Recommendation Content --- */\n\n.notificare .notificare__push__ios__store__app-ui {\n height: 566px;\n background-color: #fff;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page {\n width: 100%;\n overflow: hidden;\n}\n\n/* Header */\n\n.notificare .notificare__push__ios__store__app-ui__page-header {\n width: 100%;\n padding: 15px;\n display: flex;\n column-gap: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__app-icon {\n width: 90px;\n height: 90px;\n border-radius: 15px;\n overflow: hidden;\n flex-shrink: 0;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-info {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-name {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-category {\n font-size: 12px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-install {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n padding: 7px 12px;\n background: #3b82f6;\n color: #fff;\n border-radius: 15px;\n width: max-content;\n}\n\n/* Other info */\n\n.notificare .notificare__push__ios__store__app-ui__page-other-app-info-wrapper {\n padding: 0 15px;\n width: calc(100% - 15px);\n overflow: hidden;\n position: relative;\n margin-bottom: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-other-app-info {\n display: flex;\n width: 1000px;\n border-bottom: 1px solid #f2f4f6;\n border-top: 1px solid #f2f4f6;\n position: relative;\n box-sizing: border-box;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block {\n padding: 5px;\n width: 85px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-title {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-value {\n font-size: 30px;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-icon {\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-bottom-text {\n font-size: 11px;\n text-align: center;\n}\n\n/* History */\n\n.notificare .notificare__push__ios__store__app-ui__page-history {\n margin: 0 15px;\n border-bottom: 1px solid #f2f4f6;\n padding-bottom: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-version-last-update {\n display: flex;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-version {\n font-size: 12px;\n color: #64706e;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-last-update {\n font-size: 11px;\n color: #64706e;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-notes {\n margin-top: 5px;\n font-size: 12px;\n max-height: 60px;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n padding-right: 5px;\n word-break: break-word;\n}\n\n/* Previews */\n\n.notificare .notificare__push__ios__store__app-ui__page-previews {\n margin-top: 15px;\n padding: 0 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-previews-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-previews-images {\n display: flex;\n max-height: 400px;\n overflow: hidden;\n column-gap: 8px;\n margin-top: 10px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-preview-image {\n border-radius: 15px;\n width: 150px;\n}");function zr({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-passbook-notification",children:[e.jsx(xr,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx(Bn,{url:`https://push.notifica.re/pass/web/${t.content[0].data.split("/")[5]}`,platform:"Web",width:338,height:566})]})}Kt("");function Gr({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-images-notification",children:[e.jsx(xr,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx("div",{className:"notificare__push__ios__image__app-ui__rich-content",children:e.jsx("div",{className:"notificare__push__ios__image__app-ui__slider",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__push__ios__image__app-ui__slider-item",src:t.data,alt:"Slider image"},n)))})})]})}Kt(".notificare .notificare__push__ios__image__app-ui__rich-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: 566px;\n background-color: white;\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scrollbar-width: none; /* Hide in Firefox */\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider::-webkit-scrollbar {\n display: none; /* Hide in Chrome and Safari */\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}");function Zr({notification:n,onError:i}){const r=qn(),{googleMapsAPIKey:a}=Pn(),o=Bt();if(t.useEffect((function(){a||i(o.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[a,i,o]),a)return e.jsxs("div",{"data-testid":"ios-app-ui-map-notification",children:[e.jsx(xr,{title:n.title||r.name,showOptions:Yn(n)}),e.jsx(sr,{notification:n,width:"100%",height:"566px"})]})}Kt("");function Vr({title:t}){const n=qn();return e.jsx("div",{className:"notificare__push__ios__rate__app-ui","data-testid":"ios-app-ui-rate-notification",children:e.jsxs("div",{className:"notificare__push__ios__rate__app-ui__wrapper",children:[e.jsx("p",{className:"notificare__push__ios__rate__app-ui__header",children:t||n.name}),e.jsx("div",{className:"notificare__push__ios__rate__app-ui__action",children:e.jsx(Vt,{id:"preview.ios.rate.appUi.rateNow",defaultMessage:an["preview.ios.rate.appUi.rateNow"]})}),e.jsx("div",{className:"notificare__push__ios__rate__app-ui__action",children:e.jsx(Vt,{id:"preview.ios.rate.appUi.doNotRate",defaultMessage:an["preview.ios.rate.appUi.doNotRate"]})})]})})}Kt(".notificare .notificare__push__ios__rate__app-ui {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__ios__rate__app-ui__wrapper {\n width: 300px;\n background: #fff;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid #f2f4f6;\n}\n\n/* Header */\n\n.notificare .notificare__push__ios__rate__app-ui__header {\n padding: 20px;\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n word-break: break-word;\n}\n\n/* Actions */\n\n.notificare .notificare__push__ios__rate__app-ui__action {\n padding: 10px 20px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-top: 1px solid #f2f4f6;\n font-size: 14px;\n font-weight: 700;\n}");function $r({notification:t}){var n,i;const r=qn();return e.jsx("div",{className:"notificare__push__ios__alert__app-ui","data-testid":"ios-app-ui-text-alert-notification",children:e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__background",children:[e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__title-and-message",children:[e.jsx("p",{className:"notificare__push__ios__alert__app-ui__title",children:t.title||r.name}),e.jsx("p",{className:"notificare__push__ios__alert__app-ui__message",children:t.message})]}),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__actions",children:Jn(t)?e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__actions-single",children:[e.jsx("div",{className:"notificare__push__ios__alert__app-ui__single-cancel",children:e.jsx(Vt,{id:"preview.ios.alert.appUi.cancel",defaultMessage:an["preview.ios.alert.appUi.cancel"]})}),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__action notificare__push__ios__alert__app-ui__action--single","data-testid":"ios-app-ui-text-alert-notification-single-action",children:null===(n=t.actions)||void 0===n?void 0:n[0].label})]}):Qn(t)?e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__actions-multiple",children:[null===(i=t.actions)||void 0===i?void 0:i.map(((t,n)=>e.jsx("div",{className:"notificare__push__ios__alert__app-ui__action notificare__push__ios__alert__app-ui__action--multiple","data-testid":`ios-app-ui-text-alert-notification-action-${n.toString()}`,children:t.label},n))),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__multiple-cancel",children:e.jsx(Vt,{id:"preview.ios.alert.appUi.cancel",defaultMessage:an["preview.ios.alert.appUi.cancel"]})})]}):e.jsx("div",{className:"notificare__push__ios__alert__app-ui__no-actions",children:e.jsx(Vt,{id:"preview.ios.alert.appUi.ok",defaultMessage:an["preview.ios.alert.appUi.ok"]})})})]})})}Kt(".notificare .notificare__push__ios__alert__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__background {\n width: 300px;\n background: #fff;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid #f2f4f6;\n}\n\n/* Header - Title and Message */\n\n.notificare .notificare__push__ios__alert__app-ui__title-and-message {\n padding: 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n word-break: break-word;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__title {\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__message {\n margin-top: 3px;\n font-size: 12px;\n font-weight: 500;\n text-align: center;\n}\n\n/* --- Actions --- */\n\n.notificare .notificare__push__ios__alert__app-ui__actions {\n font-size: 14px;\n font-weight: 700;\n border-top: 1px solid #f2f4f6;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action {\n padding: 10px 20px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Single Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__actions-single {\n display: flex;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__single-cancel {\n padding: 10px 20px;\n border-right: 1px solid #f2f4f6;\n width: 50%;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action--single {\n width: 50%;\n}\n\n/* Multiple Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__actions-multiple {\n display: flex;\n flex-direction: column;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__multiple-cancel {\n padding: 10px 20px;\n width: 100%;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action--multiple {\n width: 100%;\n border-bottom: 1px solid #f2f4f6;\n}\n\n/* No Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__no-actions {\n width: 100%;\n text-align: center;\n padding: 10px 20px;\n}");function Wr({notification:t}){const n=t.content[0],i=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-video-notification",children:[e.jsx(xr,{title:t.title||i.name,showOptions:Yn(t)}),e.jsx(hr,{videoData:n,width:"100%",height:"566px"})]})}Kt("");function Kr({notification:t}){const n=t.content[0].data,i=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-web-view-notification",children:[e.jsx(xr,{title:t.title||i.name,showOptions:Yn(t)&&!ti(n)}),e.jsx("iframe",{className:"notificare__push__ios__web-view__app-ui__content",srcDoc:n,sandbox:"allow-same-origin"})]})}Kt(".notificare .notificare__push__ios__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 566px;\n background-color: #fff;\n pointer-events: none;\n}");function qr({notification:t,expanded:n}){var i,r;const a=qn();return e.jsxs("div",{className:"notificare__push__ios__lock-screen","data-testid":"ios-lock-screen-notification",children:[e.jsxs("div",{className:"notificare__push__ios__lock-screen__main-content",children:[e.jsx("div",{className:"notificare__push__ios__lock-screen__app-icon",children:a.icon?e.jsx("img",{className:"notificare__push__ios__lock-screen__app-icon-image",alt:"App icon",src:a.icon}):e.jsx(ur,{className:"notificare__push__ios__lock-screen__default-app-icon"})}),e.jsxs("div",{className:"notificare__push__ios__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__ios__lock-screen__title-and-time",children:[e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(n?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:t.title||a.name}),e.jsx("p",{className:"notificare__push__ios__lock-screen__text notificare__push__ios__lock-screen__text--time",children:e.jsx(Vt,{id:"preview.ios.lockScreen.time",defaultMessage:an["preview.ios.lockScreen.time"]})})]}),t.subtitle&&e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(n?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:t.subtitle}),e.jsxs("div",{className:"notificare__push__ios__lock-screen__message-and-media",children:[e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(ei(t)&&!n?"notificare__push__ios__lock-screen__text--message-with-media":"notificare__push__ios__lock-screen__text--message-without-media"),children:t.message}),ei(t)&&!n&&e.jsx("img",{className:"notificare__push__ios__lock-screen__media-image",src:null===(i=t.attachments)||void 0===i?void 0:i[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-media"})]})]})]}),ei(t)&&n&&e.jsx("img",{className:"notificare__push__ios__lock-screen__expanded-media",src:null===(r=t.attachments)||void 0===r?void 0:r[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-expanded-media"})]})}Kt(".notificare .notificare__push__ios__lock-screen {\n position: absolute;\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n left: 50%;\n transform: translateX(-50%);\n bottom: 80px;\n background-color: #f2f4f6;\n width: 315px;\n border-radius: 20px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__lock-screen__main-content {\n width: 100%;\n display: flex;\n align-items: center;\n column-gap: 11px;\n padding: 10px;\n}\n\n/* App Icon */\n\n.notificare .notificare__push__ios__lock-screen__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 10px;\n width: 35px;\n height: 35px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__lock-screen__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__ios__lock-screen__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n/* Text Content */\n\n.notificare .notificare__push__ios__lock-screen__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n width: 249px;\n}\n\n.notificare .notificare__push__ios__lock-screen__title-and-time {\n display: flex;\n column-gap: 5px;\n margin-top: 0;\n margin-bottom: 0;\n position: relative;\n width: 100%;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__lock-screen__text {\n font-size: 13px;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--title-or-subtitle {\n font-weight: 700;\n width: 210px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--expanded-title-or-subtitle {\n font-weight: 700;\n width: 210px;\n white-space: wrap;\n word-break: break-word;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--time {\n color: #64706e;\n font-size: 12px;\n text-align: right;\n flex-shrink: 0;\n max-width: 130px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--message-without-media {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n -webkit-line-clamp: 4;\n width: 242px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--message-with-media {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n -webkit-line-clamp: 4;\n width: 210px;\n}\n\n/* Media */\n\n.notificare .notificare__push__ios__lock-screen__message-and-media {\n display: flex;\n column-gap: 7px;\n}\n\n.notificare .notificare__push__ios__lock-screen__media-image {\n border-radius: 5px;\n object-fit: cover;\n width: 32px;\n height: 32px;\n align-self: flex-start;\n justify-self: flex-end;\n}\n\n.notificare .notificare__push__ios__lock-screen__expanded-media {\n object-fit: cover;\n width: 100%;\n max-height: 275px;\n overflow: hidden;\n display: block;\n}\n");var Xr;function Yr({notification:n,previewState:i,onError:r}){const a=Bt(),o=(()=>{switch(i.displayMode){case"lockscreen":case"lockscreen-expanded":return{preview:e.jsx(qr,{notification:n,expanded:"lockscreen-expanded"===i.displayMode}),theme:"light"};case"app-ui":switch(n.type){case"re.notifica.notification.Alert":return{preview:e.jsx($r,{notification:n}),theme:"dark"};case"re.notifica.notification.WebView":return{preview:e.jsx(Kr,{notification:n}),theme:"dark"};case"re.notifica.notification.URL":return{preview:e.jsx(Er,{notification:n}),theme:"dark"};case"re.notifica.notification.InAppBrowser":return{preview:e.jsx(yr,{notification:n}),theme:"dark"};case"re.notifica.notification.Image":return{preview:e.jsx(Gr,{notification:n}),theme:"dark"};case"re.notifica.notification.Map":return{preview:e.jsx(Zr,{notification:n,onError:r}),theme:"dark"};case"re.notifica.notification.Rate":return{preview:e.jsx(Vr,{title:n.title}),theme:"dark"};case"re.notifica.notification.Passbook":return{preview:e.jsx(zr,{notification:n}),theme:"dark"};case"re.notifica.notification.Video":return{preview:e.jsx(Wr,{notification:n}),theme:"dark"};case"re.notifica.notification.Store":return{preview:e.jsx(Dr,{notification:n}),theme:"dark"};case"re.notifica.notification.URLResolver":return{preview:e.jsx(jr,{notification:n,onError:r}),theme:"dark"};case"re.notifica.notification.None":case"re.notifica.notification.URLScheme":return}}})();if(t.useEffect((function(){o||r(a.formatMessage({id:"preview.error.notSupportedNotificationTypePreviewVariant",defaultMessage:an["preview.error.notSupportedNotificationTypePreviewVariant"]},{notificationType:n.type}))}),[o,n,r,a]),o)return e.jsx(Yt,{theme:o.theme,children:e.jsx("div",{className:"notificare__push__ios__preview",children:o.preview})})}function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Jr.apply(null,arguments)}Kt(".notificare .notificare__push__ios__preview {\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n height: 100%;\n}");var Qr=function(e){return r.createElement("svg",Jr({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48"},e),Xr||(Xr=r.createElement("defs",null,r.createElement("linearGradient",{id:"google-chrome_svg__a",x1:3.217,x2:44.781,y1:15,y2:15,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#d93025"}),r.createElement("stop",{offset:1,stopColor:"#ea4335"})),r.createElement("linearGradient",{id:"google-chrome_svg__b",x1:20.722,x2:41.504,y1:47.679,y2:11.684,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#fcc934"}),r.createElement("stop",{offset:1,stopColor:"#fbbc04"})),r.createElement("linearGradient",{id:"google-chrome_svg__c",x1:26.598,x2:5.816,y1:46.502,y2:10.506,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#1e8e3e"}),r.createElement("stop",{offset:1,stopColor:"#34a853"})))),r.createElement("circle",{cx:24,cy:23.995,r:12,style:{fill:"#fff"}}),r.createElement("path",{d:"M3.215 36A24 24 0 1 0 12 3.215 24 24 0 0 0 3.215 36m31.177-18A12 12 0 1 1 18 13.608 12 12 0 0 1 34.392 18",style:{fill:"none"}}),r.createElement("path",{d:"M24 12h20.781a23.994 23.994 0 0 0-41.564.003L13.607 30l.01-.002A11.985 11.985 0 0 1 24 12",style:{fill:"url(#google-chrome_svg__a)"}}),r.createElement("circle",{cx:24,cy:24,r:9.5,style:{fill:"#1a73e8"}}),r.createElement("path",{d:"M34.391 30.003 24.001 48A23.994 23.994 0 0 0 44.78 12.003H23.999l-.003.01a11.985 11.985 0 0 1 10.395 17.99",style:{fill:"url(#google-chrome_svg__b)"}}),r.createElement("path",{d:"M13.609 30.003 3.218 12.006A23.994 23.994 0 0 0 24.003 48l10.39-17.997-.007-.007a11.985 11.985 0 0 1-20.777.007",style:{fill:"url(#google-chrome_svg__c)"}}))};function ea(t){const{open:n,disabled:i,onToggle:r}=t;return e.jsx("button",{disabled:i,className:"notificare__push__web__desktop__lock-screen__expand-button "+(n?"notificare__push__web__desktop__lock-screen__expand-button--rotated":""),onClick:r,"data-testid":"web-desktop-expand-button",children:e.jsx(ln,{className:"notificare__push__web__desktop__lock-screen__expand-button-svg"})})}Kt(".notificare .notificare__push__web__desktop__lock-screen__expand-button {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: transform 0.4s ease;\n transform: rotate(270deg);\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button--rotated {\n transform: rotate(360deg);\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-svg {\n width: 11px;\n height: 11px;\n fill: #9e9e9e;\n}");var ta;function na({notification:n}){var i,r,a;const[o,s]=t.useState("collapsed"),[c,l]=t.useState(!1),[p,d]=t.useState(-1),[_,u]=t.useState(!1),f=t.useRef(null),h=t.useRef(null),m=qn();function g(){f.current&&clearTimeout(f.current)}return t.useEffect((function(){if(ei(n)||Yn(n))u(!0);else if(h.current){const e=3,t=window.getComputedStyle(h.current),n=parseFloat(t.lineHeight),i=h.current.scrollHeight;u(i>n*e)}else;}),[n]),t.useEffect((function(){return()=>{g()}}),[]),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen "+("expanded"===o?"notificare__push__web__desktop__lock-screen--expanded":"notificare__push__web__desktop__lock-screen--collapsed"),"data-testid":"web-desktop-notification",children:[e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__main-content",children:[e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon",children:e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon-background",children:e.jsx(Qr,{className:"notificare__push__web__desktop__lock-screen__browser-icon-svg","aria-label":"Google Chrome icon"})})}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__time-and-title-wrapper",children:[e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--title",children:n.title||m.name}),!c&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__time-container "+("collapsed"!==o?"notificare__push__web__desktop__lock-screen__time-container--hidden":""),children:e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--time",children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.time",defaultMessage:an["preview.web.desktop.macos.lockScreen.time"]})})})]}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__domain-and-message-and-media-wrapper",children:[e.jsxs("div",{children:[e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--domain",children:m.websitePushConfig&&m.websitePushConfig.allowedDomains.length>0?In(m.websitePushConfig.allowedDomains[0]):"example.com"}),e.jsx("p",{ref:h,className:`notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--message ${"expanded"===o?"notificare__push__web__desktop__lock-screen__text--expandable-message":"notificare__push__web__desktop__lock-screen__text--collapsed-message"} ${"expanded"!==o&&ei(n)?"notificare__push__web__desktop__lock_screen__text--message-with-attachment":""}`,children:n.message})]}),!c&&ei(n)&&e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__small-media "+("collapsed"!==o?"notificare__push__web__desktop__lock-screen__small-media--hidden":""),src:null===(i=n.attachments)||void 0===i?void 0:i[0].uri,alt:"Small media icon"})]})]})]}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__expanded-content "+("expanded"===o?"notificare__push__web__desktop__lock-screen__expanded-content--visible":""),children:[ei(n)&&e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__expanded-media",src:null===(r=n.attachments)||void 0===r?void 0:r[0].uri,alt:"Expanded media"}),e.jsx("hr",{className:"notificare__push__web__desktop__lock-screen__expanded-divisor"}),null===(a=n.actions)||void 0===a?void 0:a.map(((t,n)=>e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__action",children:[e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>d(n),onMouseLeave:()=>d(-1),"data-testid":`web-desktop-expanded-action-${n.toString()}`,children:t.label}),e.jsx("hr",{className:"notificare__push__web__desktop__lock-screen__expanded-buttons-divisor "+(p===n||p-1===n?"notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent":"")})]},n))),e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>{var e,t;return d(null!==(t=null===(e=n.actions)||void 0===e?void 0:e.length)&&void 0!==t?t:-1)},onMouseLeave:()=>d(-1),children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})]}),_&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__expand-button-container "+(c||"collapsed"!==o?"notificare__push__web__desktop__lock-screen__expand-button-container--visible":""),children:e.jsx(ea,{open:"expanded"===o,disabled:!1,onToggle:function(){if(g(),"expanded"!==o)return l(!1),void s("expanded");s("collapsing"),f.current=setTimeout((()=>{s("collapsed")}),400)}})}),e.jsx("div",{className:`notificare__push__web__desktop__lock-screen__settings-button-container ${c?"notificare__push__web__desktop__lock-screen__settings-button-container--visible":""} ${"collapsed"!==o?"notificare__push__web__desktop__lock-screen__settings-button-container--hidden":""}`,children:n.actions&&n.actions.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",onClick:()=>l(!c),"data-testid":"web-desktop-settings-button",children:[e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.options",defaultMessage:an["preview.web.desktop.macos.lockScreen.options"]}),e.jsx(ln,{className:"notificare__push__web__desktop__lock-screen__settings-button-expand-icon"})]}),c&&e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__settings-selector",children:[n.actions.map(((t,n)=>e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option","data-testid":`web-desktop-options-action-${n.toString()}`,children:t.label},n))),e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option",children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})]})]}):e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})})]})}function ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ia.apply(null,arguments)}Kt("/* Preview Wrapper */\n\n.notificare .notificare__push__web__desktop__lock-screen {\n position: relative;\n background-color: #f4f4f4;\n width: 340px;\n border-radius: 15px;\n border: 1px solid #e4e4e4;\n box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.1);\n transition: max-height 0.4s ease-in-out, overflow 0s ease-in-out 1s;\n align-self: start;\n max-height: 113px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen--collapsed {\n animation: showOverflow 0s linear 0.4s forwards;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen--expanded {\n max-height: 500px;\n background-color: #fff;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen:hover .notificare__push__web__desktop__lock-screen__time-container {\n opacity: 0;\n max-width: 0;\n transition: opacity 0.2s ease-in-out, max-width 0s linear 0.2s;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen:hover .notificare__push__web__desktop__lock-screen__small-media {\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen:hover :is(.notificare__push__web__desktop__lock-screen__settings-button-container, .notificare__push__web__desktop__lock-screen__expand-button-container) {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.2s;\n}\n\n/* Expand Button */\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-container {\n position: absolute;\n top: 8px;\n right: 8px;\n visibility: hidden;\n opacity: 0;\n transition: visibility linear 0.2s, opacity 0.2s ease-in-out;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-container--visible {\n visibility: visible;\n opacity: 1;\n}\n\n/* MAIN CONTENT */\n\n.notificare .notificare__push__web__desktop__lock-screen__main-content {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: row;\n column-gap: 10px;\n padding: 12px;\n}\n\n/* Browser Icon */\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon-background {\n background-color: #ffffff;\n border-radius: 10px;\n padding: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon-svg {\n width: 30px;\n height: auto;\n}\n\n/* Main notification content */\n\n.notificare .notificare__push__web__desktop__lock-screen__text-content {\n width: 100%;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time-and-title-wrapper {\n position: relative;\n display: flex;\n width: 266px;\n overflow: hidden;\n column-gap: 6px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time-container {\n margin-left: auto;\n flex-shrink: 0;\n max-width: 80px;\n transition: opacity 0.2s ease-in-out, max-width 0s linear;\n opacity: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time-container--hidden {\n opacity: 0;\n max-width: 0;\n}\n\n\n.notificare .notificare__push__web__desktop__lock-screen__domain-and-message-and-media-wrapper {\n display: flex;\n column-gap: 6px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text {\n font-size: 14px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--title {\n font-weight: 700;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--domain {\n font-weight: 700;\n margin-top: 2px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--message {\n margin-top: 2px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n line-height: 1.2;\n transition: max-height 0.4s ease 0s;\n max-height: 50px;\n}\n\n.notificare .notificare__push__web__desktop__lock_screen__text--message-with-attachment {\n max-width: 222px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--expandable-message {\n max-height: 300px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--collapsed-message {\n animation: applyClamp 0s linear 0.4s forwards;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--time {\n font-size: 12px;\n color: #64706e;\n}\n\n/* Media */\n\n.notificare .notificare__push__web__desktop__lock-screen__small-media {\n display: flex;\n width: 35px;\n height: 35px;\n border-radius: 25%;\n object-fit: cover;\n transition: opacity 0.2s ease-in-out 0s;\n margin-left: auto;\n margin-top: 2px;\n opacity: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__small-media--hidden {\n opacity: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-media {\n width: 100%;\n display: block;\n}\n\n/* Expanded Content */\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-content {\n width: 100%;\n max-height: 0;\n visibility: hidden;\n transition: visibility 0s linear 0.4s, max-height 0s linear 0.4s, padding 0s linear 0.4s;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-content--visible {\n padding: 0 14px 14px;\n visibility: visible;\n max-height: 500px;\n transition-delay: 0s, 0s;\n}\n\n/* SETTINGS */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container {\n position: absolute;\n bottom: 10px;\n right: 14px;\n z-index: 10;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.2s ease-in-out, visibility 0.2s;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container--visible {\n visibility: visible;\n opacity: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container--hidden {\n visibility: hidden !important;\n opacity: 0 !important;\n transition-delay: 0s !important;\n}\n\n/* Settings Button */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button {\n min-width: 70px;\n display: flex;\n background-color: #d6d6d6;\n border-radius: 7px;\n border: 0;\n padding: 5px 10px 5px;\n font-size: 13px;\n justify-content: center;\n box-shadow: -5px -7px 10px 10px rgba(242, 244, 246, 1);\n position: relative;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-expand-icon {\n width: 9px;\n margin-left: 4px;\n color: #000000;\n}\n\n/* Settings Selector */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector {\n background-color: #eaeaea;\n border-radius: 7px;\n box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);\n padding: 4px;\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 32px;\n width: max-content;\n right: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector-option {\n min-width: 70px;\n background-color: transparent;\n border-radius: 7px;\n font-size: 13px;\n border: 0;\n padding: 5px 10px;\n flex: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector-option:hover {\n background-color: #3b82f6;\n color: #fff;\n}\n\n/* Expanded Options - Actions & Settings */\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-divisor {\n border: none;\n border-top: 1px solid #d6d6d6;\n width: 102%;\n margin-left: -1%;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-button {\n font-size: 14px;\n border-radius: 7px;\n width: 100%;\n border: 0;\n padding: 8px;\n background-color: transparent;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-button:hover {\n background-color: #efefef;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-buttons-divisor {\n border: none;\n border-top: 1px solid #d6d6d6;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent {\n border-top: 1px solid transparent;\n}\n\n/* keyframes */\n\n@keyframes applyClamp {\n to {\n -webkit-line-clamp: 3;\n }\n}\n\n@keyframes showOverflow {\n to {\n overflow: visible;\n }\n}\n\n\n");var ra=function(e){return r.createElement("svg",ia({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"1em",height:"1em"},e),ta||(ta=r.createElement("path",{d:"m12.45 37.65-2.1-2.1L21.9 24 10.35 12.45l2.1-2.1L24 21.9l11.55-11.55 2.1 2.1L26.1 24l11.55 11.55-2.1 2.1L24 26.1Z"})))};function aa({notification:t}){return e.jsx("div",{"data-testid":"web-mobile-app-ui-url-notification",children:e.jsx(Bn,{url:t.content[0].data,platform:"Web",width:268,height:430})})}function oa({notification:n,onError:i}){const r=Bt(),a=di(n.content[0].data),o=(()=>{switch(a){case li.INVALID_URL:return{status:"error",errorCode:"preview.error.urlResolverInvalidUrl"};case li.URL_SCHEME:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithUrlSchemePreview"};case li.IN_APP_BROWSER:return{status:"error",errorCode:"preview.error.urlResolverNoNotificareWebViewQueryParameter"};case li.DYNAMIC_LINK:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithDynamicLink"};case li.RELATIVE_URL:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithRelativeUrl"};case li.WEB_VIEW:return{status:"success",preview:e.jsx(aa,{notification:n})}}})();switch(t.useEffect((function(){"error"===o.status&&i(r.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,i,r]),o.status){case"error":return;case"success":return o.preview}}function sa({notification:t}){var n;return e.jsxs("div",{"data-testid":"web-mobile-app-ui-text-alert-notification",children:[ei(t)&&e.jsx("img",{className:"notificare__web__phone__alert__app-ui__media",src:null===(n=t.attachments)||void 0===n?void 0:n[0].uri,alt:"Notification attachment"}),e.jsxs("div",{children:[e.jsx("p",{className:"notificare__web__phone__alert__app-ui__title",children:t.title}),e.jsx("p",{className:"notificare__web__phone__alert__app-ui__subtitle",children:t.subtitle}),e.jsx("p",{className:"notificare__web__phone__alert__app-ui__message",children:t.message})]})]})}Kt(".notificare .notificare__web__phone__alert__app-ui__media {\n max-width: 100%;\n max-height: 250px;\n aspect-ratio: 16 / 9;\n margin-bottom: 10px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 8px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__subtitle {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__message {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n}");function ca({notification:t}){return e.jsx("div",{className:"notificare__web__phone__image__app-ui__image-slider","data-testid":"web-mobile-app-ui-image-notification",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__web__phone__image__app-ui__image-slider-item",src:t.data,alt:"Slider image"},n)))})}Kt(".notificare .notificare__web__phone__image__app-ui__image-slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scroll-behavior: smooth;\n scrollbar-width: thin; /* Firefox */\n scrollbar-color: #bbb transparent; /* Firefox */\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}\n\n/* For Chrome, Edge and Safari */\n.notificare .notificare__web__phone__image__app-ui__image-slider::-webkit-scrollbar {\n height: 4px;\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-webkit-scrollbar-thumb {\n background: #999;\n border-radius: 10px;\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-webkit-scrollbar-track {\n background: transparent;\n}");function la({notification:t}){return e.jsx("iframe",{className:"notificare__web__phone__web-view__app-ui__content",srcDoc:t.content[0].data,sandbox:"allow-same-origin","data-testid":"web-mobile-app-ui-web-view-notification"})}Kt(".notificare .notificare__web__phone__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 360px;\n background-color: #fff;\n pointer-events: none;\n}");var pa;function da({notification:n,onError:i}){var r;const a=qn(),{googleMapsAPIKey:o}=Pn(),s=Bt();return t.useEffect((function(){o||"re.notifica.notification.Map"!==n.type||i(s.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[n,o,s,i]),e.jsx("div",{className:"notificare__web__phone__app-ui",children:e.jsxs("div",{className:"notificare__web__phone__app-ui__background",children:[e.jsxs("div",{className:"notificare__web__phone__app-ui__header",children:[e.jsx("div",{className:"notificare__web__phone__app-ui__app-icon",children:(null===(r=a.websitePushConfig)||void 0===r?void 0:r.icon)?e.jsx("img",{className:"notificare__web__phone__app-ui__app-icon-image",src:a.websitePushConfig.icon,alt:"App icon"}):e.jsx(ur,{className:"notificare__web__phone__app-ui__default-app-icon"})}),e.jsx("p",{className:"notificare__web__phone__app-ui__app-name",children:a.name}),e.jsx("button",{className:"notificare__web__phone__app-ui__close-button",children:e.jsx(ra,{className:"notificare__web__phone__app-ui__close-button-icon"})})]}),(()=>{switch(n.type){case"re.notifica.notification.Alert":return e.jsx(sa,{notification:n});case"re.notifica.notification.WebView":return e.jsx(la,{notification:n});case"re.notifica.notification.URL":return e.jsx("div",{"data-testid":"web-mobile-app-ui-url-notification",children:e.jsx(Bn,{url:n.content[0].data,platform:"Web",width:268,height:430})});case"re.notifica.notification.Image":return e.jsx(ca,{notification:n});case"re.notifica.notification.Map":return e.jsx(sr,{notification:n,width:"100%",height:"400px"});case"re.notifica.notification.Video":return e.jsx("div",{"data-testid":"web-mobile-app-ui-video-notification",children:e.jsx(hr,{videoData:n.content[0],width:"100%",height:"430px"})});case"re.notifica.notification.URLResolver":return e.jsx(oa,{notification:n,onError:i})}})(),n.actions&&e.jsx("div",{className:n.actions.length>=3?"notificare__web__phone__app-ui__actions-column":"notificare__web__phone__app-ui__actions-row",children:n.actions.map(((t,n)=>e.jsx("button",{className:"notificare__web__phone__app-ui__action "+(0===n?"notificare__web__phone__app-ui__action--primary":"notificare__web__phone__app-ui__action--secondary"),"data-testid":`web-mobile-app-ui-action-${n.toString()}`,children:t.label},n)))})]})})}function _a({notification:n,previewState:i,onError:r}){const a=Bt(),o=(()=>{switch(i.formFactor){case"desktop":return{status:"success",preview:e.jsx(na,{notification:n})};case"phone":switch(i.displayMode){case"app-ui":switch(n.type){case"re.notifica.notification.Alert":case"re.notifica.notification.Image":case"re.notifica.notification.Map":case"re.notifica.notification.URLResolver":case"re.notifica.notification.URL":case"re.notifica.notification.Video":case"re.notifica.notification.WebView":{const t="android"===i.os?qt:Yt;return{status:"success",preview:e.jsx(t,{theme:"dark",children:e.jsx(da,{notification:n,onError:r})})}}case"re.notifica.notification.InAppBrowser":case"re.notifica.notification.Rate":case"re.notifica.notification.Store":case"re.notifica.notification.Passbook":case"re.notifica.notification.None":case"re.notifica.notification.URLScheme":return{status:"error",errorCode:"preview.error.notSupportedNotificationTypePreviewVariant"}}break;case"lockscreen":case"lockscreen-expanded":return{status:"error",errorCode:"preview.error.notSupportedPreviewVariant"}}}})();switch(t.useEffect((function(){"error"===o.status&&r(a.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,r,a]),o.status){case"success":return o.preview;case"error":return}}function ua({notification:n,previewState:i}){const[r,a]=t.useState(null),[o,s]=t.useState(i);if(o!==i&&(a(null),s(i)),r)return e.jsx(Cn,{message:r,showConsoleWarning:!1});switch(i.platform){case"android":return e.jsx(br,{notification:n,previewState:i,onError:a});case"ios":return e.jsx(Yr,{notification:n,previewState:i,onError:a});case"web":return e.jsx(_a,{notification:n,previewState:i,onError:a})}}function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},fa.apply(null,arguments)}Kt("/* MAIN */\n\n.notificare .notificare__web__phone__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__web__phone__app-ui__background {\n width: 300px;\n background-color: white;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n row-gap: 16px;\n}\n\n/* Header */\n\n.notificare .notificare__web__phone__app-ui__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n column-gap: 16px;\n}\n\n.notificare .notificare__web__phone__app-ui__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n height: 32px;\n width: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__web__phone__app-ui__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__web__phone__app-ui__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n.notificare .notificare__web__phone__app-ui__app-name {\n font-size: 18px;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button {\n width: 32px;\n height: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n border: none;\n cursor: pointer;\n border-radius: 4px;\n padding: 0;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button:hover {\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button-icon {\n width: 24px;\n height: 24px;\n}\n\n/* Actions */\n\n.notificare .notificare__web__phone__app-ui__actions-row {\n display: flex;\n flex-wrap: wrap;\n column-gap: 8px;\n row-gap: 8px;\n flex-direction: row-reverse;\n}\n\n.notificare .notificare__web__phone__app-ui__actions-column {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n align-items: stretch;\n}\n\n.notificare .notificare__web__phone__app-ui__action {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n overflow: hidden;\n padding: 8px 16px;\n text-overflow: ellipsis;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n white-space: nowrap;\n border-radius: 4px;\n border: 0;\n cursor: pointer;\n}\n\n.notificare .notificare__web__phone__app-ui__action--full-width {\n width: 100%\n}\n\n.notificare .notificare__web__phone__app-ui__action--primary {\n background-color: #2b42f7;\n color: rgba(255, 255, 255, 0.87);\n}\n\n.notificare .notificare__web__phone__app-ui__action--primary:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__web__phone__app-ui__action--secondary {\n background-color: transparent;\n color: #2b42f7;\n}\n\n.notificare .notificare__web__phone__app-ui__action--secondary:hover {\n background-color: #f4f5f9;\n}\n");var ha,ma=function(e){return r.createElement("svg",fa({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),pa||(pa=r.createElement("path",{d:"M420.6 301.9a24 24 0 1 1 24-24 24 24 0 0 1-24 24m-265.1 0a24 24 0 1 1 24-24 24 24 0 0 1-24 24m273.7-144.5 47.9-83a10 10 0 1 0-17.3-10l-48.5 84.1a301.3 301.3 0 0 0-246.6 0l-48.5-84a10 10 0 1 0-17.3 10l47.9 83C64.5 202.2 8.2 285.6 0 384h576c-8.2-98.5-64.5-181.8-146.9-226.6"})))};function ga(){return ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ga.apply(null,arguments)}var va;function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ba.apply(null,arguments)}var wa;function ya(){return ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ya.apply(null,arguments)}var xa,ka=function(e){return r.createElement("svg",ya({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),wa||(wa=r.createElement("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9m-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3"})))};function Ea(){return Ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ea.apply(null,arguments)}function ja({previewState:t,onPreviewStateChanged:n}){const i=Bt();return e.jsxs("div",{className:"notificare__push__preview-controls","data-testid":"controls",children:[e.jsxs("div",{className:"notificare__push__preview-controls-toggle-groups",children:[e.jsx(Sn,{label:i.formatMessage({id:"controls.platform",defaultMessage:an["controls.platform"]}),options:Na,value:t.platform,onValueChanged:function(e){if(t.platform!==e)switch(e){case"android":case"ios":n(Object.assign(Object.assign({},t),{platform:e}));break;case"web":n(Object.assign(Object.assign({},t),{platform:"web",formFactor:"desktop",os:"macos",displayMode:"lockscreen"}))}}}),"web"===t.platform&&e.jsx(Sn,{label:i.formatMessage({id:"controls.formFactor",defaultMessage:an["controls.formFactor"]}),options:Sa,value:t.formFactor,onValueChanged:function(e){if("web"===t.platform&&t.formFactor!==e)switch(e){case"desktop":n(Object.assign(Object.assign({},t),{formFactor:e,os:"macos",displayMode:"lockscreen"}));break;case"phone":n(Object.assign(Object.assign({},t),{formFactor:e,os:"android",displayMode:"app-ui"}))}}}),"web"===t.platform&&"phone"===t.formFactor&&e.jsx(Sn,{label:i.formatMessage({id:"controls.operatingSystem",defaultMessage:an["controls.operatingSystem"]}),options:Ca,value:t.os,onValueChanged:function(e){"web"===t.platform&&"phone"===t.formFactor&&t.os!==e&&n(Object.assign(Object.assign({},t),{os:e}))}})]}),("android"===t.platform||"ios"===t.platform)&&e.jsx(Nn,{label:i.formatMessage({id:"controls.variant",defaultMessage:an["controls.variant"]}),options:Aa,value:t.displayMode,onValueChanged:function(e){t.displayMode!==e&&n(Object.assign(Object.assign({},t),{displayMode:e}))}}),"web"===t.platform&&"desktop"===t.formFactor&&e.jsx(Nn,{label:i.formatMessage({id:"controls.operatingSystem",defaultMessage:an["controls.operatingSystem"]}),options:Ta,value:t.os,disabled:!0}),"web"===t.platform&&"phone"===t.formFactor&&e.jsx(Nn,{label:i.formatMessage({id:"controls.variant",defaultMessage:an["controls.variant"]}),options:Aa,value:"app-ui",disabled:!0})]})}Kt(".notificare .notificare__push__preview-controls {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 350px;\n row-gap: 14px;\n}\n\n.notificare .notificare__push__preview-controls-preview {\n margin-top: 14px;\n}\n\n.notificare .notificare__push__preview-controls-toggle-groups {\n display: flex;\n align-items: center;\n column-gap: 30px;\n align-self: start;\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-divider {\n width: 20px;\n height: 20px;\n animation: fadeIn 0.3s ease-out;\n}\n\n/* Icons */\n\n.notificare .notificare__push__preview-controls-android-icon {\n width: 22px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-ios-icon {\n width: 28px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-html5-icon {\n width: 28px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-desktop-icon {\n width: 22px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-phone-icon {\n width: 24px;\n height: auto;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}");const Na=[{value:"android",icon:e.jsx(ma,{className:"notificare__push__preview-controls-android-icon"},"platforms-android-icon")},{value:"ios",icon:e.jsx(ka,{className:"notificare__push__preview-controls-ios-icon"},"platform-ios-icon")},{value:"web",icon:e.jsx((function(e){return r.createElement("svg",ba({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),va||(va=r.createElement("path",{d:"m0 32 34.9 395.8L191.5 480l157.6-52.2L384 32zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1z"})))}),{className:"notificare__push__preview-controls-html5-icon"},"platform-html5-icon")}],Sa=[{value:"desktop",icon:e.jsx((function(e){return r.createElement("svg",ga({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),ha||(ha=r.createElement("path",{d:"M64 0C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h176l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32h256c17.7 0 32-14.3 32-32s-14.3-32-32-32h-69.3L336 416h176c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zm448 64v288H64V64z"})))}),{className:"notificare__push__preview-controls-desktop-icon"},"form-factor-desktop-icon")},{value:"phone",icon:e.jsx((function(e){return r.createElement("svg",Ea({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),xa||(xa=r.createElement("path",{d:"M16 64C16 28.7 44.7 0 80 0h224c35.3 0 64 28.7 64 64v384c0 35.3-28.7 64-64 64H80c-35.3 0-64-28.7-64-64zm208 384a32 32 0 1 0-64 0 32 32 0 1 0 64 0m80-384H80v320h224z"})))}),{className:"notificare__push__preview-controls-phone-icon"},"form-factor-phone-icon")}],Ca=[{value:"android",icon:e.jsx(ma,{className:"notificare__push__preview-controls-android-icon"},"device-android-icon")},{value:"ios",icon:e.jsx(ka,{className:"notificare__push__preview-controls-ios-icon"},"device-iphone-icon")}],Ta=[{value:"macos",labelId:"controls.operatingSystem.macos",defaultLabel:an["controls.operatingSystem.macos"]}],Aa=[{value:"lockscreen",labelId:"controls.displayMode.lockScreen",defaultLabel:an["controls.displayMode.lockScreen"]},{value:"lockscreen-expanded",labelId:"controls.displayMode.expandedLockScreen",defaultLabel:an["controls.displayMode.expandedLockScreen"]},{value:"app-ui",labelId:"controls.displayMode.appUi",defaultLabel:an["controls.displayMode.appUi"]}];Kt("@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');\n\n.notificare {\n font-family: proxima-nova, Helvetica, Arial, sans-serif;\n color: #232c2a;\n}\n\n.notificare * {\n border: 0;\n margin: 0;\n box-sizing: border-box;\n}");Kt(".notificare .notificare__push__preview-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: max-content;\n}\n\n.notificare .notificare__push__preview {\n margin-top: 20px;\n}\n\n/* Disable label selection in every preview */\n.notificare .notificare__push__preview p,\n.notificare .notificare__push__preview span,\n.notificare .notificare__push__preview div,\n.notificare .notificare__push__preview h1,\n.notificare .notificare__push__preview h2,\n.notificare .notificare__push__preview h3,\n.notificare .notificare__push__preview h4,\n.notificare .notificare__push__preview h5,\n.notificare .notificare__push__preview h6 {\n user-select: none;\n}");const Pa={"android-lockscreen":{platform:"android",displayMode:"lockscreen"},"android-lockscreen-expanded":{platform:"android",displayMode:"lockscreen-expanded"},"android-app-ui":{platform:"android",displayMode:"app-ui"},"ios-lockscreen":{platform:"ios",displayMode:"lockscreen"},"ios-lockscreen-expanded":{platform:"ios",displayMode:"lockscreen-expanded"},"ios-app-ui":{platform:"ios",displayMode:"app-ui"},"web-desktop-macos":{platform:"web",displayMode:"lockscreen",formFactor:"desktop",os:"macos"},"web-android-app-ui":{platform:"web",displayMode:"app-ui",formFactor:"phone",os:"android"},"web-iphone-app-ui":{platform:"web",displayMode:"app-ui",formFactor:"phone",os:"ios"}};function Ma({notification:n,applicationId:i,showControls:r=!0,variant:a="android-lockscreen"}){const[o,s]=t.useState(Pa[a]),{serviceKey:c}=Pn(),l=fn({id:i,serviceKey:c});return e.jsxs("div",{className:"notificare__push__preview-wrapper",children:[r&&e.jsx(ja,{previewState:o,onPreviewStateChanged:s}),(()=>{switch(l.status){case"idle":case"loading":return e.jsx(tn,{});case"success":return e.jsx(Kn,{application:l.data,children:e.jsx("div",{className:"notificare__push__preview",children:e.jsx(ua,{notification:n,previewState:o})})})}})()]})}var La,Oa;!function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),i={};for(const e of n)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(La||(La={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(Oa||(Oa={}));const Ia=La.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ra=e=>{switch(typeof e){case"undefined":return Ia.undefined;case"string":return Ia.string;case"number":return Number.isNaN(e)?Ia.nan:Ia.number;case"boolean":return Ia.boolean;case"function":return Ia.function;case"bigint":return Ia.bigint;case"symbol":return Ia.symbol;case"object":return Array.isArray(e)?Ia.array:null===e?Ia.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Ia.promise:"undefined"!=typeof Map&&e instanceof Map?Ia.map:"undefined"!=typeof Set&&e instanceof Set?Ia.set:"undefined"!=typeof Date&&e instanceof Date?Ia.date:Ia.object;default:return Ia.unknown}},Ua=La.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ba extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(i);else if("invalid_return_type"===r.code)i(r.returnTypeError);else if("invalid_arguments"===r.code)i(r.argumentsError);else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(this),n}static assert(e){if(!(e instanceof Ba))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,La.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Ba.create=e=>new Ba(e);const Ha=(e,t)=>{let n;switch(e.code){case Ua.invalid_type:n=e.received===Ia.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Ua.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,La.jsonStringifyReplacer)}`;break;case Ua.unrecognized_keys:n=`Unrecognized key(s) in object: ${La.joinValues(e.keys,", ")}`;break;case Ua.invalid_union:n="Invalid input";break;case Ua.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${La.joinValues(e.options)}`;break;case Ua.invalid_enum_value:n=`Invalid enum value. Expected ${La.joinValues(e.options)}, received '${e.received}'`;break;case Ua.invalid_arguments:n="Invalid function arguments";break;case Ua.invalid_return_type:n="Invalid function return type";break;case Ua.invalid_date:n="Invalid date";break;case Ua.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:La.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Ua.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Ua.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Ua.custom:n="Invalid input";break;case Ua.invalid_intersection_types:n="Intersection results could not be merged";break;case Ua.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ua.not_finite:n="Number must be finite";break;default:n=t.defaultError,La.assertNever(e)}return{message:n}};let Fa=Ha;function Da(e,t){const n=Fa,i=(e=>{const{data:t,path:n,errorMaps:i,issueData:r}=e,a=[...n,...r.path||[]],o={...r,path:a};if(void 0!==r.message)return{...r,path:a,message:r.message};let s="";const c=i.filter((e=>!!e)).slice().reverse();for(const e of c)s=e(o,{data:t,defaultError:s}).message;return{...r,path:a,message:s}})({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ha?void 0:Ha].filter((e=>!!e))});e.common.issues.push(i)}class za{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if("aborted"===i.status)return Ga;"dirty"===i.status&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,i=await e.value;n.push({key:t,value:i})}return za.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:t,value:r}=i;if("aborted"===t.status)return Ga;if("aborted"===r.status)return Ga;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!i.alwaysSet||(n[t.value]=r.value)}return{status:e.value,value:n}}}const Ga=Object.freeze({status:"aborted"}),Za=e=>({status:"dirty",value:e}),Va=e=>({status:"valid",value:e}),$a=e=>"aborted"===e.status,Wa=e=>"dirty"===e.status,Ka=e=>"valid"===e.status,qa=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Xa;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(Xa||(Xa={}));var Ya,Ja,Qa=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},eo=function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};class to{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const no=(e,t)=>{if(Ka(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Ba(e.common.issues);return this._error=t,this._error}}};function io(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:r}=e;if(t&&(n||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(t,r)=>{const{message:a}=e;return"invalid_enum_value"===t.code?{message:a??r.defaultError}:void 0===r.data?{message:a??i??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:a??n??r.defaultError}},description:r}}class ro{get description(){return this._def.description}_getType(e){return Ra(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Ra(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new za,ctx:{common:e.parent.common,data:e.data,parsedType:Ra(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(qa(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ra(e)},i=this._parseSync({data:e,path:n.path,parent:n});return no(n,i)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ra(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return Ka(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((e=>Ka(e)?{value:e.value}:{issues:t.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ra(e)},i=this._parse({data:e,path:n.path,parent:n}),r=await(qa(i)?i:Promise.resolve(i));return no(n,r)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,i)=>{const r=e(t),a=()=>i.addIssue({code:Ua.custom,...n(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(a(),!1))):!!r||(a(),!1)}))}refinement(e,t){return this._refinement(((n,i)=>!!e(n)||(i.addIssue("function"==typeof t?t(n,i):t),!1)))}_refinement(e){return new is({schema:this,typeName:_s.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return rs.create(this,this._def)}nullable(){return as.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Fo.create(this)}promise(){return ns.create(this,this._def)}or(e){return Go.create([this,e],this._def)}and(e){return Wo.create(this,e,this._def)}transform(e){return new is({...io(this._def),schema:this,typeName:_s.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new os({...io(this._def),innerType:this,defaultValue:t,typeName:_s.ZodDefault})}brand(){return new ls({typeName:_s.ZodBranded,type:this,...io(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ss({...io(this._def),innerType:this,catchValue:t,typeName:_s.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ps.create(this,e)}readonly(){return ds.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ao=/^c[^\s-]{8,}$/i,oo=/^[0-9a-z]+$/,so=/^[0-9A-HJKMNP-TV-Z]{26}$/i,co=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,lo=/^[a-z0-9_-]{21}$/i,po=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_o=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,uo=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let fo;const ho=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,mo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,go=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,vo=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wo=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yo="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",xo=new RegExp(`^${yo}$`);function ko(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function Eo(e){let t=`${yo}T${ko(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function jo(e,t){if(!po.test(e))return!1;try{const[n]=e.split("."),i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return"object"==typeof r&&null!==r&&((!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||r.alg===t)))}catch{return!1}}function No(e,t){return!("v4"!==t&&t||!mo.test(e))||!("v6"!==t&&t||!vo.test(e))}class So extends ro{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==Ia.string){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.string,received:t.parsedType}),Ga}const t=new za;let n;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("max"===a.kind)e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const i=e.data.length>a.value,r=e.data.length<a.value;(i||r)&&(n=this._getOrReturnCtx(e,n),i?Da(n,{code:Ua.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&Da(n,{code:Ua.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)uo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"email",code:Ua.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)fo||(fo=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),fo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"emoji",code:Ua.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)co.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"uuid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("nanoid"===a.kind)lo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"nanoid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)ao.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cuid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)oo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cuid2",code:Ua.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)so.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"ulid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),Da(n,{validation:"url",code:Ua.invalid_string,message:a.message}),t.dirty()}else if("regex"===a.kind){a.regex.lastIndex=0;a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"regex",code:Ua.invalid_string,message:a.message}),t.dirty())}else if("trim"===a.kind)e.data=e.data.trim();else if("includes"===a.kind)e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty());else if("toLowerCase"===a.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===a.kind)e.data=e.data.toUpperCase();else if("startsWith"===a.kind)e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty());else if("endsWith"===a.kind)e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty());else if("datetime"===a.kind){Eo(a).test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"datetime",message:a.message}),t.dirty())}else if("date"===a.kind){xo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"date",message:a.message}),t.dirty())}else if("time"===a.kind){new RegExp(`^${ko(a)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"time",message:a.message}),t.dirty())}else"duration"===a.kind?_o.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"duration",code:Ua.invalid_string,message:a.message}),t.dirty()):"ip"===a.kind?(i=e.data,("v4"!==(r=a.version)&&r||!ho.test(i))&&("v6"!==r&&r||!go.test(i))&&(n=this._getOrReturnCtx(e,n),Da(n,{validation:"ip",code:Ua.invalid_string,message:a.message}),t.dirty())):"jwt"===a.kind?jo(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"jwt",code:Ua.invalid_string,message:a.message}),t.dirty()):"cidr"===a.kind?No(e.data,a.version)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cidr",code:Ua.invalid_string,message:a.message}),t.dirty()):"base64"===a.kind?bo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"base64",code:Ua.invalid_string,message:a.message}),t.dirty()):"base64url"===a.kind?wo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"base64url",code:Ua.invalid_string,message:a.message}),t.dirty()):La.assertNever(a);var i,r;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:Ua.invalid_string,...Xa.errToObj(n)})}_addCheck(e){return new So({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Xa.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Xa.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Xa.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Xa.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Xa.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Xa.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Xa.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Xa.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Xa.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Xa.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Xa.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Xa.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Xa.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Xa.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...Xa.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Xa.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Xa.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...Xa.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Xa.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Xa.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Xa.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Xa.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Xa.errToObj(t)})}nonempty(e){return this.min(1,Xa.errToObj(e))}trim(){return new So({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new So({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new So({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Co(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}So.create=e=>new So({checks:[],typeName:_s.ZodString,coerce:e?.coerce??!1,...io(e)});class To extends ro{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==Ia.number){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.number,received:t.parsedType}),Ga}let t;const n=new za;for(const i of this._def.checks)if("int"===i.kind)La.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty());else if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else"multipleOf"===i.kind?0!==Co(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_finite,message:i.message}),n.dirty()):La.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Xa.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Xa.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Xa.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Xa.toString(t))}setLimit(e,t,n,i){return new To({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Xa.toString(i)}]})}_addCheck(e){return new To({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Xa.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Xa.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Xa.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Xa.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Xa.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Xa.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Xa.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Xa.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Xa.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&La.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}To.create=e=>new To({checks:[],typeName:_s.ZodNumber,coerce:e?.coerce||!1,...io(e)});class Ao extends ro{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ia.bigint)return this._getInvalidInput(e);let t;const n=new za;for(const i of this._def.checks)if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):La.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.bigint,received:t.parsedType}),Ga}gte(e,t){return this.setLimit("min",e,!0,Xa.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Xa.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Xa.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Xa.toString(t))}setLimit(e,t,n,i){return new Ao({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Xa.toString(i)}]})}_addCheck(e){return new Ao({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Xa.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Xa.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Xa.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Xa.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Xa.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Ao.create=e=>new Ao({checks:[],typeName:_s.ZodBigInt,coerce:e?.coerce??!1,...io(e)});class Po extends ro{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==Ia.boolean){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.boolean,received:t.parsedType}),Ga}return Va(e.data)}}Po.create=e=>new Po({typeName:_s.ZodBoolean,coerce:e?.coerce||!1,...io(e)});class Mo extends ro{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==Ia.date){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.date,received:t.parsedType}),Ga}if(Number.isNaN(e.data.getTime())){return Da(this._getOrReturnCtx(e),{code:Ua.invalid_date}),Ga}const t=new za;let n;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):La.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Mo({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Xa.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Xa.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Mo.create=e=>new Mo({checks:[],coerce:e?.coerce||!1,typeName:_s.ZodDate,...io(e)});class Lo extends ro{_parse(e){if(this._getType(e)!==Ia.symbol){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.symbol,received:t.parsedType}),Ga}return Va(e.data)}}Lo.create=e=>new Lo({typeName:_s.ZodSymbol,...io(e)});class Oo extends ro{_parse(e){if(this._getType(e)!==Ia.undefined){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.undefined,received:t.parsedType}),Ga}return Va(e.data)}}Oo.create=e=>new Oo({typeName:_s.ZodUndefined,...io(e)});class Io extends ro{_parse(e){if(this._getType(e)!==Ia.null){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.null,received:t.parsedType}),Ga}return Va(e.data)}}Io.create=e=>new Io({typeName:_s.ZodNull,...io(e)});class Ro extends ro{constructor(){super(...arguments),this._any=!0}_parse(e){return Va(e.data)}}Ro.create=e=>new Ro({typeName:_s.ZodAny,...io(e)});class Uo extends ro{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Va(e.data)}}Uo.create=e=>new Uo({typeName:_s.ZodUnknown,...io(e)});class Bo extends ro{_parse(e){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.never,received:t.parsedType}),Ga}}Bo.create=e=>new Bo({typeName:_s.ZodNever,...io(e)});class Ho extends ro{_parse(e){if(this._getType(e)!==Ia.undefined){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.void,received:t.parsedType}),Ga}return Va(e.data)}}Ho.create=e=>new Ho({typeName:_s.ZodVoid,...io(e)});class Fo extends ro{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==Ia.array)return Da(t,{code:Ua.invalid_type,expected:Ia.array,received:t.parsedType}),Ga;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,r=t.data.length<i.exactLength.value;(e||r)&&(Da(t,{code:e?Ua.too_big:Ua.too_small,minimum:r?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(Da(t,{code:Ua.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(Da(t,{code:Ua.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>i.type._parseAsync(new to(t,e,t.path,n))))).then((e=>za.mergeArray(n,e)));const r=[...t.data].map(((e,n)=>i.type._parseSync(new to(t,e,t.path,n))));return za.mergeArray(n,r)}get element(){return this._def.type}min(e,t){return new Fo({...this._def,minLength:{value:e,message:Xa.toString(t)}})}max(e,t){return new Fo({...this._def,maxLength:{value:e,message:Xa.toString(t)}})}length(e,t){return new Fo({...this._def,exactLength:{value:e,message:Xa.toString(t)}})}nonempty(e){return this.min(1,e)}}function Do(e){if(e instanceof zo){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=rs.create(Do(i))}return new zo({...e._def,shape:()=>t})}return e instanceof Fo?new Fo({...e._def,type:Do(e.element)}):e instanceof rs?rs.create(Do(e.unwrap())):e instanceof as?as.create(Do(e.unwrap())):e instanceof Ko?Ko.create(e.items.map((e=>Do(e)))):e}Fo.create=(e,t)=>new Fo({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_s.ZodArray,...io(t)});class zo extends ro{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=La.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==Ia.object){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.object,received:t.parsedType}),Ga}const{status:t,ctx:n}=this._processInputParams(e),{shape:i,keys:r}=this._getCached(),a=[];if(!(this._def.catchall instanceof Bo&&"strip"===this._def.unknownKeys))for(const e in n.data)r.includes(e)||a.push(e);const o=[];for(const e of r){const t=i[e],r=n.data[e];o.push({key:{status:"valid",value:e},value:t._parse(new to(n,r,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Bo){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of a)o.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(Da(n,{code:Ua.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a){const i=n.data[t];o.push({key:{status:"valid",value:t},value:e._parse(new to(n,i,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of o){const n=await t.key,i=await t.value;e.push({key:n,value:i,alwaysSet:t.alwaysSet})}return e})).then((e=>za.mergeObjectSync(t,e))):za.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return Xa.errToObj,new zo({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{const i=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:Xa.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new zo({...this._def,unknownKeys:"strip"})}passthrough(){return new zo({...this._def,unknownKeys:"passthrough"})}extend(e){return new zo({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new zo({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_s.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new zo({...this._def,catchall:e})}pick(e){const t={};for(const n of La.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new zo({...this._def,shape:()=>t})}omit(e){const t={};for(const n of La.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new zo({...this._def,shape:()=>t})}deepPartial(){return Do(this)}partial(e){const t={};for(const n of La.objectKeys(this.shape)){const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}return new zo({...this._def,shape:()=>t})}required(e){const t={};for(const n of La.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof rs;)e=e._def.innerType;t[n]=e}return new zo({...this._def,shape:()=>t})}keyof(){return Qo(La.objectKeys(this.shape))}}zo.create=(e,t)=>new zo({shape:()=>e,unknownKeys:"strip",catchall:Bo.create(),typeName:_s.ZodObject,...io(t)}),zo.strictCreate=(e,t)=>new zo({shape:()=>e,unknownKeys:"strict",catchall:Bo.create(),typeName:_s.ZodObject,...io(t)}),zo.lazycreate=(e,t)=>new zo({shape:e,unknownKeys:"strip",catchall:Bo.create(),typeName:_s.ZodObject,...io(t)});class Go extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new Ba(e.ctx.common.issues)));return Da(t,{code:Ua.invalid_union,unionErrors:n}),Ga}));{let e;const i=[];for(const r of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=r._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&i.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=i.map((e=>new Ba(e)));return Da(t,{code:Ua.invalid_union,unionErrors:r}),Ga}}get options(){return this._def.options}}Go.create=(e,t)=>new Go({options:e,typeName:_s.ZodUnion,...io(t)});const Zo=e=>e instanceof Yo?Zo(e.schema):e instanceof is?Zo(e.innerType()):e instanceof Jo?[e.value]:e instanceof es?e.options:e instanceof ts?La.objectValues(e.enum):e instanceof os?Zo(e._def.innerType):e instanceof Oo?[void 0]:e instanceof Io?[null]:e instanceof rs?[void 0,...Zo(e.unwrap())]:e instanceof as?[null,...Zo(e.unwrap())]:e instanceof ls||e instanceof ds?Zo(e.unwrap()):e instanceof ss?Zo(e._def.innerType):[];class Vo extends ro{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ia.object)return Da(t,{code:Ua.invalid_type,expected:Ia.object,received:t.parsedType}),Ga;const n=this.discriminator,i=t.data[n],r=this.optionsMap.get(i);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(Da(t,{code:Ua.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ga)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const n of t){const t=Zo(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(i.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);i.set(r,n)}}return new Vo({typeName:_s.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...io(n)})}}function $o(e,t){const n=Ra(e),i=Ra(t);if(e===t)return{valid:!0,data:e};if(n===Ia.object&&i===Ia.object){const n=La.objectKeys(t),i=La.objectKeys(e).filter((e=>-1!==n.indexOf(e))),r={...e,...t};for(const n of i){const i=$o(e[n],t[n]);if(!i.valid)return{valid:!1};r[n]=i.data}return{valid:!0,data:r}}if(n===Ia.array&&i===Ia.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let i=0;i<e.length;i++){const r=$o(e[i],t[i]);if(!r.valid)return{valid:!1};n.push(r.data)}return{valid:!0,data:n}}return n===Ia.date&&i===Ia.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class Wo extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=(e,i)=>{if($a(e)||$a(i))return Ga;const r=$o(e.value,i.value);return r.valid?((Wa(e)||Wa(i))&&t.dirty(),{status:t.value,value:r.data}):(Da(n,{code:Ua.invalid_intersection_types}),Ga)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>i(e,t))):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Wo.create=(e,t,n)=>new Wo({left:e,right:t,typeName:_s.ZodIntersection,...io(n)});class Ko extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ia.array)return Da(n,{code:Ua.invalid_type,expected:Ia.array,received:n.parsedType}),Ga;if(n.data.length<this._def.items.length)return Da(n,{code:Ua.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ga;!this._def.rest&&n.data.length>this._def.items.length&&(Da(n,{code:Ua.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...n.data].map(((e,t)=>{const i=this._def.items[t]||this._def.rest;return i?i._parse(new to(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(i).then((e=>za.mergeArray(t,e))):za.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new Ko({...this._def,rest:e})}}Ko.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ko({items:e,typeName:_s.ZodTuple,rest:null,...io(t)})};class qo extends ro{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ia.map)return Da(n,{code:Ua.invalid_type,expected:Ia.map,received:n.parsedType}),Ga;const i=this._def.keyType,r=this._def.valueType,a=[...n.data.entries()].map((([e,t],a)=>({key:i._parse(new to(n,e,n.path,[a,"key"])),value:r._parse(new to(n,t,n.path,[a,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of a){const i=await n.key,r=await n.value;if("aborted"===i.status||"aborted"===r.status)return Ga;"dirty"!==i.status&&"dirty"!==r.status||t.dirty(),e.set(i.value,r.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of a){const i=n.key,r=n.value;if("aborted"===i.status||"aborted"===r.status)return Ga;"dirty"!==i.status&&"dirty"!==r.status||t.dirty(),e.set(i.value,r.value)}return{status:t.value,value:e}}}}qo.create=(e,t,n)=>new qo({valueType:t,keyType:e,typeName:_s.ZodMap,...io(n)});class Xo extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ia.set)return Da(n,{code:Ua.invalid_type,expected:Ia.set,received:n.parsedType}),Ga;const i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&(Da(n,{code:Ua.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&(Da(n,{code:Ua.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const r=this._def.valueType;function a(e){const n=new Set;for(const i of e){if("aborted"===i.status)return Ga;"dirty"===i.status&&t.dirty(),n.add(i.value)}return{status:t.value,value:n}}const o=[...n.data.values()].map(((e,t)=>r._parse(new to(n,e,n.path,t))));return n.common.async?Promise.all(o).then((e=>a(e))):a(o)}min(e,t){return new Xo({...this._def,minSize:{value:e,message:Xa.toString(t)}})}max(e,t){return new Xo({...this._def,maxSize:{value:e,message:Xa.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Xo.create=(e,t)=>new Xo({valueType:e,minSize:null,maxSize:null,typeName:_s.ZodSet,...io(t)});class Yo extends ro{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Yo.create=(e,t)=>new Yo({getter:e,typeName:_s.ZodLazy,...io(t)});class Jo extends ro{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Da(t,{received:t.data,code:Ua.invalid_literal,expected:this._def.value}),Ga}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Qo(e,t){return new es({values:e,typeName:_s.ZodEnum,...io(t)})}Jo.create=(e,t)=>new Jo({value:e,typeName:_s.ZodLiteral,...io(t)});class es extends ro{constructor(){super(...arguments),Ya.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return Da(t,{expected:La.joinValues(n),received:t.parsedType,code:Ua.invalid_type}),Ga}if(Qa(this,Ya,"f")||eo(this,Ya,new Set(this._def.values),"f"),!Qa(this,Ya,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return Da(t,{received:t.data,code:Ua.invalid_enum_value,options:n}),Ga}return Va(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return es.create(e,{...this._def,...t})}exclude(e,t=this._def){return es.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}Ya=new WeakMap,es.create=Qo;class ts extends ro{constructor(){super(...arguments),Ja.set(this,void 0)}_parse(e){const t=La.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ia.string&&n.parsedType!==Ia.number){const e=La.objectValues(t);return Da(n,{expected:La.joinValues(e),received:n.parsedType,code:Ua.invalid_type}),Ga}if(Qa(this,Ja,"f")||eo(this,Ja,new Set(La.getValidEnumValues(this._def.values)),"f"),!Qa(this,Ja,"f").has(e.data)){const e=La.objectValues(t);return Da(n,{received:n.data,code:Ua.invalid_enum_value,options:e}),Ga}return Va(e.data)}get enum(){return this._def.values}}Ja=new WeakMap,ts.create=(e,t)=>new ts({values:e,typeName:_s.ZodNativeEnum,...io(t)});class ns extends ro{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ia.promise&&!1===t.common.async)return Da(t,{code:Ua.invalid_type,expected:Ia.promise,received:t.parsedType}),Ga;const n=t.parsedType===Ia.promise?t.data:Promise.resolve(t.data);return Va(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}ns.create=(e,t)=>new ns({type:e,typeName:_s.ZodPromise,...io(t)});class is extends ro{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_s.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,r={addIssue:e=>{Da(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===i.type){const e=i.transform(n.data,r);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return Ga;const i=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===i.status?Ga:"dirty"===i.status||"dirty"===t.value?Za(i.value):i}));{if("aborted"===t.value)return Ga;const i=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===i.status?Ga:"dirty"===i.status||"dirty"===t.value?Za(i.value):i}}if("refinement"===i.type){const e=e=>{const t=i.refinement(e,r);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===i.status?Ga:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?Ga:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===i.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ka(e))return e;const a=i.transform(e.value,r);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>Ka(e)?Promise.resolve(i.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}La.assertNever(i)}}is.create=(e,t,n)=>new is({schema:e,typeName:_s.ZodEffects,effect:t,...io(n)}),is.createWithPreprocess=(e,t,n)=>new is({schema:t,effect:{type:"preprocess",transform:e},typeName:_s.ZodEffects,...io(n)});class rs extends ro{_parse(e){return this._getType(e)===Ia.undefined?Va(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rs.create=(e,t)=>new rs({innerType:e,typeName:_s.ZodOptional,...io(t)});class as extends ro{_parse(e){return this._getType(e)===Ia.null?Va(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}as.create=(e,t)=>new as({innerType:e,typeName:_s.ZodNullable,...io(t)});class os extends ro{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===Ia.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}os.create=(e,t)=>new os({innerType:e,typeName:_s.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...io(t)});class ss extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return qa(i)?i.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Ba(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new Ba(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ss.create=(e,t)=>new ss({innerType:e,typeName:_s.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...io(t)});class cs extends ro{_parse(e){if(this._getType(e)!==Ia.nan){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.nan,received:t.parsedType}),Ga}return{status:"valid",value:e.data}}}cs.create=e=>new cs({typeName:_s.ZodNaN,...io(e)});class ls extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class ps extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Ga:"dirty"===e.status?(t.dirty(),Za(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Ga:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new ps({in:e,out:t,typeName:_s.ZodPipeline})}}class ds extends ro{_parse(e){const t=this._def.innerType._parse(e),n=e=>(Ka(e)&&(e.value=Object.freeze(e.value)),e);return qa(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}var _s;ds.create=(e,t)=>new ds({innerType:e,typeName:_s.ZodReadonly,...io(t)}),function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(_s||(_s={}));const us=So.create,fs=To.create,hs=Po.create;Bo.create;const ms=Fo.create,gs=zo.create;Go.create;const vs=Vo.create;Wo.create,Ko.create;const bs=Jo.create,ws=es.create;ns.create,rs.create,as.create;const ys=gs({title:us({message:"Property 'title' should be a string"}).optional(),subtitle:us({message:"Property 'subtitle' should be a string"}).optional(),message:us({message:"Property 'message' is required and should be a string"}).nonempty("Property 'message' cannot be empty"),actions:ms(gs({type:us({message:"Action property 'type' is required and should be a string"}),label:us({message:"Action property 'label' is required and should be a string"}),target:us({message:"Action property 'target' should be a string"}).optional(),camera:hs({message:"Action property 'camera' should be a boolean"}).optional(),keyboard:hs({message:"Action property 'keyboard' should be a boolean"}).optional()})).optional(),attachments:ms(gs({mimeType:us({message:"Attachment property 'mimeType' is required and should be a string"}),uri:us({message:"Attachment property 'uri' is required and should be a string"}).url("Attachment property 'uri' should be a valid URL")})).optional()}),xs=gs({type:bs("re.notifica.notification.None")}).merge(ys),ks=gs({type:bs("re.notifica.notification.URLResolver"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Es=gs({type:bs("re.notifica.notification.Alert")}).merge(ys),js=gs({type:bs("re.notifica.notification.Image"),content:ms(gs({type:ws(["re.notifica.content.PNG","re.notifica.content.JPEG","re.notifica.content.GIF"],{message:"Content objects should be of type 're.notifica.content.PNG', 're.notifica.content.JPEG' or 're.notifica.content.GIF'"}),data:us({message:"Content objects data should be strings"}).url("Content objects data should be valid URLs")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ns=gs({type:bs("re.notifica.notification.InAppBrowser"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ss=gs({type:bs("re.notifica.notification.Map"),content:ms(gs({type:bs("re.notifica.content.Marker",{message:"Content objects should be of type 're.notifica.content.Marker'"}),data:gs({title:us({message:"Content object data property 'title' is required and should be a string"}),description:us({message:"Content object data property 'description' is required should be a string"}),latitude:fs({message:"Content object data property 'latitude' is required and should be a number"}).min(-90,"Content object data property 'latitude' should be a minimum of -90").max(90,"Content object data property 'latitude' should be a maximum of 90"),longitude:fs({message:"Content object data property 'longitude' is required and should be a number"}).min(-180,"Content object data property 'longitude' must be at least -180").max(180,"Content object data property 'longitude' must be at most 180")})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Cs=gs({type:bs("re.notifica.notification.Passbook"),content:ms(gs({type:bs("re.notifica.content.PKPass",{message:"Content object should be of type 're.notifica.content.PKPass'"}),data:us({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ts=gs({type:bs("re.notifica.notification.Rate")}).merge(ys),As=gs({type:bs("re.notifica.notification.Store"),content:ms(vs("type",[gs({type:bs("re.notifica.content.AppStore"),data:gs({identifier:us({message:"Content object data property 'identifier' is mandatory and should be a string"}),campaignToken:us({message:"Content object data property 'campaignToken' should be a string"}).optional(),affiliateToken:us({message:"Content object data property 'affiliateToken' should be a string"}).optional(),providerToken:us({message:"Content object data property 'providerToken' should be a string"}).optional()},{message:"AppStore content object data is required and must be an object with 'identifier' (mandatory), 'campaignToken', 'affiliateToken', or 'providerToken'"})}),gs({type:ws(["re.notifica.content.GooglePlayDetails","re.notifica.content.GooglePlayDeveloper","re.notifica.content.GooglePlayCollection","re.notifica.content.GooglePlaySearch","re.notifica.content.AppGalleryDetails","re.notifica.content.AppGallerySearch"]),data:us({message:"GooglePlay and AppGallery content object data is required and must be a string"}).nonempty("GooglePlay and AppGallery content object data cannot be empty")})]),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ps=vs("type",[Es,js,Ns,Ss,xs,Cs,Ts,As,ks,gs({type:bs("re.notifica.notification.URL"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),gs({type:bs("re.notifica.notification.URLScheme"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),gs({type:bs("re.notifica.notification.Video"),content:ms(gs({type:us({message:"Content object type is required and should be a string"}),data:us({message:"Content object data is required and should be a string"}).nonempty("Content object data cannot be empty")}),{message:"The notification must be content-rich. Property 'content' is required"}).superRefine(((e,t)=>{e.forEach(((e,n)=>{if(["re.notifica.content.YouTube","re.notifica.content.Vimeo","re.notifica.content.HTML5Video"].includes(e.type)||t.addIssue({code:Ua.custom,message:"Content object should be of type 're.notifica.content.YouTube', 're.notifica.content.Vimeo' or 're.notifica.content.HTML5Video'",path:["content",n,"type"]}),"re.notifica.content.HTML5Video"===e.type)try{new URL(e.data)}catch(e){t.addIssue({code:Ua.custom,message:"For a HTML5Video, content object data should be a valid URL",path:["content",n,"data"]})}}))}))}).merge(ys),gs({type:bs("re.notifica.notification.WebView"),content:ms(gs({type:bs("re.notifica.content.HTML",{message:"Content object should be of type 're.notifica.content.HTML'"}),data:us({message:"Content data is required and should be a string containing the HTML markup"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys)]);function Ms({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.find((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")&&!e.path.includes("content")));if(t){const e=Ps.options.map((e=>e.shape.type.value));console.error(`Notification error:\n\nInvalid notification type. Expected one of: ${e.join(", ")}\n`)}else{const t=e.map((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")&&e.path.includes("content")?`Invalid content type. Expected one of: ${e.options.join(", ")}\n`:e.message));console.error(`Notification errors:\n\n${t.join("\n")}`)}}(n)}),[n]),e.jsx(Cn,{message:i.formatMessage({id:"preview.error.invalidNotification",defaultMessage:an["preview.error.invalidNotification"]}),showConsoleWarning:!0})}Kt("");function Ls({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__banner__wrapper","data-testid":"in-app-messaging-banner-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__banner__window",children:[t.image&&e.jsx("img",{alt:"App icon",className:"notificare__in-app-messaging__banner__image",src:t.image,"data-testid":"in-app-messaging-banner-preview-image"}),e.jsxs("div",{className:"notificare__in-app-messaging__banner__text-content",children:[e.jsx("p",{className:"notificare__in-app-messaging__banner__title","data-testid":"in-app-messaging-banner-preview-title",children:t.title}),e.jsx("p",{className:"notificare__in-app-messaging__banner__message","data-testid":"in-app-messaging-banner-preview-message",children:t.message})]})]})})}Kt(".notificare .notificare__in-app-messaging__banner__wrapper {\n width: 100%;\n justify-content: center;\n margin-top: 20px;\n display: flex;\n}\n\n.notificare .notificare__in-app-messaging__banner__window {\n width: 320px;\n border-radius: 4px;\n display: flex;\n background-color: #fff;\n padding: 16px;\n column-gap: 16px;\n}\n\n.notificare .notificare__in-app-messaging__banner__image {\n width: 58px;\n height: 58px;\n object-fit: cover;\n}\n\n.notificare .notificare__in-app-messaging__banner__text-content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.notificare .notificare__in-app-messaging__banner__title {\n font-size: 16px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 4px;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__banner__message {\n font-size: 14px;\n width: 100%;\n line-height: 20px;\n}");function Os({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__card__wrapper","data-testid":"in-app-messaging-card-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__card__window",children:[e.jsxs("div",{className:"notificare__in-app-messaging__card__header",children:[e.jsx("button",{className:"notificare__in-app-messaging__card__close-button "+(t.image?"notificare__in-app-messaging__card__close-button--with-image":""),children:e.jsx(ra,{className:"notificare__in-app-messaging__card__close-button-icon"})}),t.image&&e.jsx("img",{className:"notificare__in-app-messaging__card__image",src:t.image,"data-testid":"in-app-messaging-card-preview-image"})]}),e.jsxs("div",{className:"notificare__in-app-messaging__card__text-content",children:[e.jsx("p",{className:"notificare__in-app-messaging__card__title","data-testid":"in-app-messaging-card-preview-title",children:t.title}),e.jsx("p",{className:"notificare__in-app-messaging__card__message","data-testid":"in-app-messaging-card-preview-message",children:t.message})]}),e.jsxs("div",{className:"notificare__in-app-messaging__card__actions",children:[e.jsx("button",{className:"notificare__in-app-messaging__card__action-button notificare__in-app-messaging__card__action-button--primary "+(t.primaryAction.destructive?"notificare__in-app-messaging__card__action-button--destructive":""),"data-testid":"in-app-messaging-card-preview-primary-action-label",children:t.primaryAction.label}),t.secondaryAction&&e.jsx("button",{className:"notificare__in-app-messaging__card__action-button notificare__in-app-messaging__card__action-button--secondary "+(t.secondaryAction.destructive?"notificare__in-app-messaging__card__action-button--destructive":""),"data-testid":"in-app-messaging-card-preview-secondary-action-label",children:t.secondaryAction.label})]})]})})}Kt(".notificare .notificare__in-app-messaging__card__wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__in-app-messaging__card__window {\n width: 320px;\n background-color: white;\n border-radius: 5px;\n padding: 16px;\n overflow: hidden;\n row-gap: 16px;\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__card__header {\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button {\n position: absolute;\n right: 8px;\n top: 8px;\n align-items: center;\n cursor: pointer;\n border-radius: 4px;\n display: flex;\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n justify-content: center;\n padding: 0;\n background-color: transparent;\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button:hover {\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button--with-image {\n border-radius: 16px;\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button--with-image:hover {\n border-radius: 4px;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button-icon {\n fill: #000000de;\n height: 22px;\n width: 22px;\n}\n\n.notificare .notificare__in-app-messaging__card__image {\n aspect-ratio: 2 / 1;\n width: 100%;\n object-fit: cover;\n}\n\n.notificare .notificare__in-app-messaging__card__title {\n font-weight: 600;\n font-size: 16px;\n margin-bottom: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__card__message {\n font-size: 14px;\n width: 100%;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__card__actions {\n display: flex;\n flex-direction: row-reverse;\n column-gap: 16px;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button {\n padding: 8px 16px;\n font-weight: 500;\n font-size: 14px;\n border-radius: 4px;\n cursor: pointer;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n line-height: 20px;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--primary {\n background-color: #2b42f7;\n color: rgba(255, 255, 255, 0.87);\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--primary:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--secondary {\n background-color: #fff;\n color: #2b42f7;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--secondary:hover {\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--destructive {\n background-color: #fff;\n color: #ba1a1a;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--destructive:hover {\n background-color: #ffdad699;\n}");function Is({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__wrapper","data-testid":"in-app-messaging-fullscreen-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__fullscreen__window",children:[e.jsx("img",{alt:"App icon",className:"notificare__in-app-messaging__fullscreen__background-image",src:t.image,"data-testid":"in-app-messaging-fullscreen-preview-image"}),e.jsx("button",{className:"notificare__in-app-messaging__fullscreen__close-button",children:e.jsx(ra,{className:"notificare__in-app-messaging__fullscreen__close-button-icon"})}),e.jsxs("div",{className:"notificare__in-app-messaging__fullscreen__text-content",children:[e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__title","data-testid":"in-app-messaging-fullscreen-preview-title",children:t.title}),e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__message","data-testid":"in-app-messaging-fullscreen-preview-message",children:t.message})]})]})})}Kt(".notificare .notificare__in-app-messaging__fullscreen__wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__window {\n width: 310px;\n height: 95%;\n border-radius: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__background-image {\n height: 100%;\n object-fit: cover;\n width: 100%;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button {\n position: absolute;\n right: 8px;\n top: 8px;\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n justify-content: center;\n border-radius: 16px;\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button:hover {\n border-radius: 4px;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button-icon {\n fill: #000000de;\n width: 22px;\n height: 22px;\n flex-shrink: 0;\n flex-grow: 0;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__text-content {\n position: absolute;\n bottom: 0;\n padding: 32px 16px 16px;\n width: 100%;\n background: linear-gradient(rgba(255, 255, 255, 0), #fff);\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__title {\n font-weight: 600;\n font-size: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 4px;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__message {\n font-size: 14px;\n line-height: 20px;\n}");function Rs({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__preview",children:e.jsx(qt,{theme:"dark",children:(()=>{switch(t.type){case"re.notifica.inappmessage.Banner":return e.jsx(Ls,{inAppMessage:t});case"re.notifica.inappmessage.Card":return e.jsx(Os,{inAppMessage:t});case"re.notifica.inappmessage.Fullscreen":return e.jsx(Is,{inAppMessage:t})}})()})})}Kt(".notificare .notificare__in-app-messaging__preview {\n user-select: none;\n}");const Us=vs("type",[gs({type:bs("re.notifica.inappmessage.Banner"),title:us({message:"Property 'title' is required and should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").nonempty("Property 'title' cannot be empty"),message:us({message:"Property 'message' is required and should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").nonempty("Property 'message' cannot be empty"),image:us({message:"Property 'image' should be a string"}).url("Property 'image' should be a valid URL").optional()}),gs({type:bs("re.notifica.inappmessage.Card"),title:us({message:"Property 'title' is required and should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").nonempty("Property 'title' cannot be empty"),message:us({message:"Property 'message' is required and should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").nonempty("Property 'message' cannot be empty"),image:us({message:"Property 'image' should be a string"}).url("Property 'image' should be a valid URL").optional(),primaryAction:gs({label:us({message:"Primary action property 'label' is required and should be a string"}).max(32,"Primary action property 'label' cannot contain more than 32 characters").nonempty("Primary action property 'label' cannot be empty"),destructive:hs({message:"Primary action property 'destructive' should be a boolean"}).optional()},{message:"A Card must contain a primary action. Property 'primaryAction' is required"}),secondaryAction:gs({label:us({message:"Secondary action property 'label' is required and should be a string"}).max(32,"Secondary action property 'label' cannot contain more than 32 characters").nonempty("Secondary action property 'label' cannot be empty"),destructive:hs({message:"Secondary action property 'destructive' should be a boolean"}).optional()}).optional()}),gs({type:bs("re.notifica.inappmessage.Fullscreen"),title:us({message:"Property 'title' should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").optional(),message:us({message:"Property 'message' should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").optional(),image:us({message:"Property 'image' is required and should be a string"}).url("Property 'image' should be a valid URL")})]);function Bs({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.find((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")));if(t){const e=Us.options.map((e=>e.shape.type.value));console.error(`In-app message error:\n\nInvalid type. Expected one of: ${e.join(", ")}`)}else{const t=e.map((({message:e})=>e));console.error(`In-app message errors:\n\n${t.join("\n")}`)}}(n)}),[n]),e.jsx(Cn,{message:i.formatMessage({id:"preview.error.invalidInAppMessage",defaultMessage:gn["preview.error.invalidInAppMessage"]}),showConsoleWarning:!0})}var Hs;function Fs({applicationId:t,applicationInfo:n,serviceKey:i}){const r=fn({id:t,serviceKey:i});return(()=>{var t,i,a,o;switch(r.status){case"idle":case"loading":return e.jsx(tn,{});case"success":{const s=null!==(t=n.websitePushConfig.icon)&&void 0!==t?t:null===(i=r.data.websitePushConfig)||void 0===i?void 0:i.icon,c=null!==(o=null!==(a=n.websitePushConfig.launchConfig.applicationName)&&void 0!==a?a:n.name)&&void 0!==o?o:r.data.name,l=n.websitePushConfig.launchConfig.autoOnboardingOptions;return e.jsx("div",{className:"notificare__push-onboarding__dialog__wrapper","data-testid":"push-onboarding-dialog-preview-wrapper",children:e.jsxs("div",{className:"notificare__push-onboarding__dialog__window",children:[e.jsxs("div",{className:"notificare__push-onboarding__dialog__content",children:[s?e.jsx("img",{className:"notificare__push-onboarding__dialog__icon",src:s,"data-testid":"push-onboarding-dialog-preview-icon"}):e.jsx("div",{className:"notificare__push-onboarding__dialog__default-icon-container",children:e.jsx(ur,{className:"notificare__push-onboarding__dialog__default-icon"})}),e.jsxs("div",{className:"notificare__push-onboarding__dialog__text-content",children:[e.jsx("p",{className:"notificare__push-onboarding__dialog__title","data-testid":"push-onboarding-dialog-preview-title",children:c}),e.jsx("p",{className:"notificare__push-onboarding__dialog__message","data-testid":"push-onboarding-dialog-preview-message",children:null==l?void 0:l.message})]})]}),e.jsx("div",{className:"notificare__push-onboarding__dialog__footer",children:e.jsxs("div",{className:"notificare__push-onboarding__dialog__actions",children:[e.jsx("button",{className:"notificare__push-onboarding__dialog__action-button notificare__push-onboarding__dialog__action-button--cancel","data-testid":"push-onboarding-dialog-cancel-button",children:null==l?void 0:l.cancelButton}),e.jsx("button",{className:"notificare__push-onboarding__dialog__action-button notificare__push-onboarding__dialog__action-button--accept","data-testid":"push-onboarding-dialog-accept-button",children:null==l?void 0:l.acceptButton})]})})]})})}}})()}function Ds(){return Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ds.apply(null,arguments)}Kt(".notificare .notificare__push-onboarding__dialog__wrapper {\n width: 100%;\n justify-content: center;\n margin-top: 20px;\n display: flex;\n}\n\n.notificare .notificare__push-onboarding__dialog__window {\n width: 320px;\n border-radius: 4px;\n display: flex;\n flex-direction: column;\n background-color: #fff;\n padding: 16px;\n row-gap: 16px;\n box-shadow: 0 0 32px -8px rgba(0, 0, 0, 0.52);\n margin-top: 64px;\n}\n\n.notificare .notificare__push-onboarding__dialog__content {\n display: flex;\n flex-direction: row;\n column-gap: 16px;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.notificare .notificare__push-onboarding__dialog__icon {\n width: 64px;\n height: 64px;\n border-radius: 4px;\n}\n\n.notificare .notificare__push-onboarding__dialog__default-icon-container {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n min-width: 64px;\n height: 64px;\n overflow: hidden;\n}\n\n.notificare .notificare__push-onboarding__dialog__default-icon {\n width: 64px;\n height: 64px;\n}\n\n.notificare .notificare__push-onboarding__dialog__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 4px;\n overflow: hidden;\n}\n\n.notificare .notificare__push-onboarding__dialog__title {\n font-size: 24px;\n line-height: 24px;\n font-weight: 400;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push-onboarding__dialog__message {\n font-size: 14px;\n line-height: 20px;\n border: none;\n color: rgba(0, 0, 0, 0.86);\n}\n\n.notificare .notificare__push-onboarding__dialog__footer {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n margin-top: 16px;\n}\n\n.notificare .notificare__push-onboarding__dialog__actions {\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n justify-content: flex-end;\n column-gap: 8px;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button {\n padding: 8px 16px;\n font-weight: 500;\n font-size: 14px;\n border-radius: 4px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n line-height: 20px;\n background-color: transparent;\n cursor: pointer;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--accept {\n background-color: #2b42f7;\n color: rgba(255, 255, 255, 0.87);\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--accept:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--cancel {\n color: #ba1a1a;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--cancel:hover {\n background-color: #ffdad699;\n}");var zs,Gs=function(e){return r.createElement("svg",Ds({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"},e),Hs||(Hs=r.createElement("g",{fillRule:"evenodd"},r.createElement("path",{fillRule:"nonzero",d:"M11.955 0q.519.002.976.138a7.8 7.8 0 0 0-1.42 1.624c-.815.202-1.327.97-1.357 2.002-.012.302-.174.441-.465.51-1.986.547-3.496 2.162-3.59 7.238-.104 2.265-.499 3.764-1.335 4.693-.604.674-1.301 1.36-1.51 1.696v.14h17.401v-.14c-.209-.337-.894-1.022-1.51-1.696-.515-.58-.862-1.382-1.076-2.455H18a7.8 7.8 0 0 0 1.96-.25c.16.661.402 1.256.777 1.648.999 1.034 2.184 2.08 2.184 3.241 0 .848-.663 1.406-1.754 1.406h-4.903C16.171 22.048 14.417 24 11.954 24c-2.45 0-4.205-1.963-4.298-4.205H2.754C1.651 19.795 1 19.237 1 18.389c0-1.161 1.173-2.207 2.184-3.24.767-.802.976-2.452 1.069-3.788.081-4.577 1.266-7.527 4.356-8.643C8.992 1.197 10.247 0 11.955 0m2.497 19.795H9.47c.08 1.58 1.092 2.567 2.486 2.567 1.405 0 2.404-.987 2.497-2.567Z"}),r.createElement("path",{d:"M18 0a6 6 0 1 1 0 12 6 6 0 0 1 0-12m2.312 3.117L17.998 5.43 15.69 3.117a.41.41 0 0 0-.572 0 .41.41 0 0 0 0 .572L17.43 6l-2.313 2.313a.41.41 0 0 0 0 .572.41.41 0 0 0 .572 0L18 6.571l2.313 2.313a.404.404 0 0 0 .568-.572L18.57 5.998l2.31-2.308a.404.404 0 0 0-.568-.573"}))))};function Zs(){return Zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Zs.apply(null,arguments)}var Vs,$s=function(e){return r.createElement("svg",Zs({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"},e),zs||(zs=r.createElement("g",{fillRule:"evenodd"},r.createElement("path",{fillRule:"nonzero",d:"M11.955 0q.519.002.976.138a7.8 7.8 0 0 0-1.42 1.624c-.815.202-1.327.97-1.357 2.002-.012.302-.174.441-.465.51-1.986.547-3.496 2.162-3.59 7.238-.104 2.265-.499 3.764-1.335 4.693-.604.674-1.301 1.36-1.51 1.696v.14h17.401v-.14c-.209-.337-.894-1.022-1.51-1.696-.515-.58-.862-1.382-1.076-2.455H18a7.8 7.8 0 0 0 1.96-.25c.16.661.402 1.256.777 1.648.999 1.034 2.184 2.08 2.184 3.241 0 .848-.663 1.406-1.754 1.406h-4.903C16.171 22.048 14.417 24 11.954 24c-2.45 0-4.205-1.963-4.298-4.205H2.754C1.651 19.795 1 19.237 1 18.389c0-1.161 1.173-2.207 2.184-3.24.767-.802.976-2.452 1.069-3.788.081-4.577 1.266-7.527 4.356-8.643C8.992 1.197 10.247 0 11.955 0m2.497 19.795H9.47c.08 1.58 1.092 2.567 2.486 2.567 1.405 0 2.404-.987 2.497-2.567Z"}),r.createElement("path",{d:"M18 0a6 6 0 1 1 0 12 6 6 0 0 1 0-12m2.683 3c-.14 0-.216.046-.3.18l-3.126 5.023-1.623-2.142c-.087-.122-.174-.172-.3-.172a.32.32 0 0 0-.334.33c0 .081.035.172.101.257l1.807 2.32c.105.137.213.204.362.204q.226-.001.352-.197l3.29-5.224A.5.5 0 0 0 21 3.32c0-.193-.125-.319-.317-.319Z"}))))};function Ws(){return Ws=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ws.apply(null,arguments)}var Ks=function(e){return r.createElement("svg",Ws({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"},e),Vs||(Vs=r.createElement("path",{d:"M1 18.39c0 .847.65 1.405 1.754 1.405h4.902C7.75 22.037 9.503 24 11.955 24c2.462 0 4.216-1.952 4.31-4.205h4.902c1.091 0 1.754-.558 1.754-1.406 0-1.161-1.185-2.207-2.184-3.24-.767-.802-.976-2.452-1.069-3.788-.081-4.577-1.266-7.527-4.356-8.643C14.917 1.197 13.674 0 11.955 0c-1.708 0-2.963 1.197-3.346 2.718-3.09 1.116-4.275 4.066-4.356 8.643-.093 1.336-.302 2.986-1.07 3.787C2.174 16.182 1 17.228 1 18.39m2.254-.35v-.139c.209-.337.906-1.022 1.51-1.696.836-.929 1.231-2.428 1.336-4.693.093-5.076 1.603-6.691 3.59-7.237.29-.07.452-.21.464-.511.035-1.208.732-2.056 1.8-2.056 1.08 0 1.766.848 1.813 2.056.011.302.162.441.453.51 1.998.547 3.508 2.162 3.601 7.238.104 2.265.5 3.764 1.324 4.693.616.674 1.301 1.36 1.51 1.696v.14H3.254Zm6.215 1.755h4.983c-.093 1.58-1.092 2.567-2.497 2.567-1.394 0-2.405-.987-2.486-2.567"})))};function qs({permissionStatus:t,options:n}){return e.jsx("div",{className:"notificare__push-onboarding__floating-button__wrapper","data-testid":"push-onboarding-floating-button-preview-wrapper",children:e.jsxs("div",{className:`notificare__push-onboarding__floating-button ${"start"===n.alignment.horizontal?"notificare__push-onboarding__floating-button--start":"notificare__push-onboarding__floating-button--end"} ${"top"===n.alignment.vertical?"notificare__push-onboarding__floating-button--top":"notificare__push-onboarding__floating-button--bottom"}`,"data-testid":"push-onboarding-floating-button-preview",children:["default"===t&&e.jsx(Ks,{className:"notificare__push-onboarding__floating-button__icon"}),"granted"===t&&e.jsx($s,{className:"notificare__push-onboarding__floating-button__icon"}),"denied"===t&&e.jsx(Gs,{className:"notificare__push-onboarding__floating-button__icon"}),e.jsxs("div",{className:"notificare__push-onboarding__floating-button-tooltip","data-testid":"push-onboarding-floating-button-preview-tooltip",children:["default"===t&&n.permissionTexts.default,"granted"===t&&n.permissionTexts.granted,"denied"===t&&n.permissionTexts.denied]})]})})}function Xs({permissionStatus:t,applicationInfo:n,applicationId:i,serviceKey:r}){return e.jsx(qt,{theme:"dark",children:n.websitePushConfig.launchConfig.autoOnboardingOptions?e.jsx(Fs,{applicationId:i,applicationInfo:n,serviceKey:r}):n.websitePushConfig.launchConfig.floatingButtonOptions&&e.jsx(qs,{permissionStatus:t,options:n.websitePushConfig.launchConfig.floatingButtonOptions})})}function Ys({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.map((({message:e})=>e));console.error(`Push onboarding preview errors:\n\n${t.join("\n")}`)}(n)}),[n]),e.jsx(Cn,{message:i.formatMessage({id:"preview.error.invalidPushOnboardingApplicationInfo",defaultMessage:xn["preview.error.invalidPushOnboardingApplicationInfo"]}),showConsoleWarning:!0})}Kt(".notificare .notificare__push-onboarding__floating-button__wrapper {\n width: 100%;\n height: calc(615px - 32px);\n}\n\n.notificare .notificare__push-onboarding__floating-button {\n position: absolute;\n margin: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 16px;\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n background-color: #dfe0ff;\n color: #000a64;\n box-shadow: 0 3px 1px -2px rgb(0 0 0 / 0.2), 0 2px 2px 0 rgb(0 0 0 / 0.14), 0 1px 5px 0 rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button:active {\n box-shadow: 0 2px 4px -1px rgb(0 0 0 / 0.2), 0 4px 5px 0 rgb(0 0 0 / 0.14), 0 1px 10px 0 rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button:focus {\n box-shadow: 0 5px 5px -3px rgb(0 0 0 / 0.2), 0 8px 10px 1px rgb(0 0 0 / 0.14), 0 3px 14px 2px rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button:hover {\n box-shadow: 0 5px 5px -3px rgb(0 0 0 / 0.2), 0 8px 10px 1px rgb(0 0 0 / 0.14), 0 3px 14px 2px rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button--start {\n left: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--end {\n right: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--top {\n top: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--bottom {\n bottom: 0\n}\n\n.notificare .notificare__push-onboarding__floating-button__icon {\n fill: #000a64;\n width: 24px;\n height: 24px;\n}\n\n.notificare .notificare__push-onboarding__floating-button-tooltip {\n visibility: hidden;\n position: absolute;\n padding: 12px 24px;\n background-color: #fff;\n color: rgba(0, 0, 0, 0.87);\n border-radius: 8px;\n box-shadow: 0 5px 5px -3px rgb(0 0 0 / 0.2), 0 8px 10px 1px rgb(0 0 0 / 0.14), 0 3px 14px 2px rgb(0 0 0 / 0.12);\n opacity: 0;\n transition: opacity 0.3s;\n font-size: 14px;\n line-height: 20px;\n max-width: 274px;\n width: max-content;\n overflow-wrap: break-word;\n}\n\n.notificare .notificare__push-onboarding__floating-button--start .notificare__push-onboarding__floating-button-tooltip {\n left: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--end .notificare__push-onboarding__floating-button-tooltip {\n right: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--top .notificare__push-onboarding__floating-button-tooltip {\n top: calc(100% + 16px);\n}\n\n.notificare .notificare__push-onboarding__floating-button--bottom .notificare__push-onboarding__floating-button-tooltip {\n bottom: calc(100% + 16px);\n}\n\n.notificare .notificare__push-onboarding__floating-button:hover .notificare__push-onboarding__floating-button-tooltip {\n visibility: visible;\n opacity: 1;\n}");const Js=gs({name:us({message:"Application property 'name' should be a string"}).optional(),websitePushConfig:gs({icon:us({message:"Application Website Push config property 'icon' should be a string"}).optional(),launchConfig:gs({applicationName:us({message:"Application Launch config property 'applicationName' should be a string"}).optional(),autoOnboardingOptions:gs({message:us({message:"Auto (dialog) onboarding options property 'message' is required and should be a string"}),cancelButton:us({message:"Auto (dialog) onboarding options property 'cancelButton' is required and should be a string"}),acceptButton:us({message:"Auto (dialog) onboarding options property 'acceptButton' is required and should be a string"})}).optional(),floatingButtonOptions:gs({alignment:gs({horizontal:ws(["start","end"],{errorMap:()=>({message:"Floating button horizontal alignment should be 'start' or 'end'"})}),vertical:ws(["top","bottom"],{errorMap:()=>({message:"Floating button vertical alignment should be 'top' or 'bottom'"})})}),permissionTexts:gs({default:us({message:"Floating button permission texts property 'default' is required and should be a string"}),granted:us({message:"Floating button permission texts property 'granted' is required and should be a string"}),denied:us({message:"Floating button permission texts property 'denied' is required and should be a string"})})}).optional()}).refine((e=>e.autoOnboardingOptions||e.floatingButtonOptions),{message:"Either 'floatingButtonOptions' or 'autoOnboardingOptions' must be present in the launch config options"})})});exports.NotificareInAppMessagePreview=function({inAppMessage:n,locale:i="en-US",translations:r}){const a=jn({locale:i,customTranslations:r,type:"in-app"}),o=t.useMemo((()=>Us.safeParse(n)),[n]);return e.jsxs("div",{className:"notificare",children:["success"===a.status&&e.jsx(Wt,{locale:a.data.locale,defaultLocale:"en-US",messages:a.data.translations,children:o.success?e.jsx(Rs,{inAppMessage:o.data}):e.jsx(Bs,{errors:o.error.errors})}),"error"===a.status&&e.jsx(Wt,{locale:"en-US",messages:gn,children:e.jsx(Cn,{message:a.error.message})})]})},exports.NotificareNotificationPreview=function({notification:n,applicationId:i,showControls:r=!0,variant:a="android-lockscreen",serviceKey:o,googleMapsAPIKey:s,locale:c="en-US",translations:l}){const p=jn({locale:c,customTranslations:l,type:"push"}),d=t.useMemo((()=>Ps.safeParse(n)),[n]);return e.jsxs("div",{className:"notificare",children:["success"===p.status&&e.jsx(Wt,{locale:p.data.locale,defaultLocale:"en-US",messages:p.data.translations,children:e.jsx(An,{serviceKey:o,googleMapsAPIKey:s,children:d.success?e.jsx(Ma,{notification:d.data,applicationId:i,showControls:r,variant:a}):e.jsx(Ms,{errors:d.error.errors})})}),"error"===p.status&&e.jsx(Wt,{locale:"en-US",messages:an,children:e.jsx(Cn,{message:p.error.message})})]})},exports.NotificarePushOnboardingPreview=function({applicationId:n,permissionStatus:i="default",applicationInfo:r,serviceKey:a,locale:o="en-US",translations:s}){const c=jn({locale:o,customTranslations:s,type:"onboarding"}),l=t.useMemo((()=>Js.safeParse(r)),[r]);return e.jsxs("div",{className:"notificare",children:["success"===c.status&&e.jsx(Wt,{locale:c.data.locale,defaultLocale:"en-US",messages:c.data.translations,children:l.success?e.jsx("div",{className:"notificare__push__preview",children:e.jsx(Xs,{applicationId:n,permissionStatus:i,applicationInfo:r,serviceKey:a})}):e.jsx(Ys,{errors:l.error.errors})}),"error"===c.status&&e.jsx(Wt,{locale:"en-US",messages:xn,children:e.jsx(Cn,{message:c.error.message})})]})};
9
+ */function Mt(){return Ct||(Ct=1,"production"===process.env.NODE_ENV?jt.exports=function(){if(Et)return Nt;Et=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var _=e.$$typeof;switch(_){case t:switch(e=e.type){case c:case l:case i:case a:case r:case d:return e;default:switch(e=e&&e.$$typeof){case s:case p:case f:case u:case o:return e;default:return _}}case n:return _}}}function w(e){return b(e)===l}return Nt.AsyncMode=c,Nt.ConcurrentMode=l,Nt.ContextConsumer=s,Nt.ContextProvider=o,Nt.Element=t,Nt.ForwardRef=p,Nt.Fragment=i,Nt.Lazy=f,Nt.Memo=u,Nt.Portal=n,Nt.Profiler=a,Nt.StrictMode=r,Nt.Suspense=d,Nt.isAsyncMode=function(e){return w(e)||b(e)===c},Nt.isConcurrentMode=w,Nt.isContextConsumer=function(e){return b(e)===s},Nt.isContextProvider=function(e){return b(e)===o},Nt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Nt.isForwardRef=function(e){return b(e)===p},Nt.isFragment=function(e){return b(e)===i},Nt.isLazy=function(e){return b(e)===f},Nt.isMemo=function(e){return b(e)===u},Nt.isPortal=function(e){return b(e)===n},Nt.isProfiler=function(e){return b(e)===a},Nt.isStrictMode=function(e){return b(e)===r},Nt.isSuspense=function(e){return b(e)===d},Nt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===a||e===r||e===d||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===u||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h)},Nt.typeOf=b,Nt}():jt.exports=(St||(St=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var _=e.$$typeof;switch(_){case t:var h=e.type;switch(h){case c:case l:case i:case a:case r:case d:return h;default:var m=h&&h.$$typeof;switch(m){case s:case p:case f:case u:case o:return m;default:return _}}case n:return _}}}var w=c,y=l,x=s,k=o,E=t,j=p,N=i,S=f,C=u,T=n,A=a,P=r,M=d,L=!1;function O(e){return b(e)===l}Pt.AsyncMode=w,Pt.ConcurrentMode=y,Pt.ContextConsumer=x,Pt.ContextProvider=k,Pt.Element=E,Pt.ForwardRef=j,Pt.Fragment=N,Pt.Lazy=S,Pt.Memo=C,Pt.Portal=T,Pt.Profiler=A,Pt.StrictMode=P,Pt.Suspense=M,Pt.isAsyncMode=function(e){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||b(e)===c},Pt.isConcurrentMode=O,Pt.isContextConsumer=function(e){return b(e)===s},Pt.isContextProvider=function(e){return b(e)===o},Pt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Pt.isForwardRef=function(e){return b(e)===p},Pt.isFragment=function(e){return b(e)===i},Pt.isLazy=function(e){return b(e)===f},Pt.isMemo=function(e){return b(e)===u},Pt.isPortal=function(e){return b(e)===n},Pt.isProfiler=function(e){return b(e)===a},Pt.isStrictMode=function(e){return b(e)===r},Pt.isSuspense=function(e){return b(e)===d},Pt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===a||e===r||e===d||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===u||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||e.$$typeof===m||e.$$typeof===g||e.$$typeof===v||e.$$typeof===h)},Pt.typeOf=b}()),Pt)),jt.exports}!function(){if(At)return Tt;At=1;var e=Mt(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},r={};function a(n){return e.isMemo(n)?i:r[n.$$typeof]||t}r[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r[e.Memo]=i;var o=Object.defineProperty,s=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;Tt=function e(t,i,r){if("string"!=typeof i){if(d){var _=p(i);_&&_!==d&&e(t,_,r)}var u=s(i);c&&(u=u.concat(c(i)));for(var f=a(t),h=a(i),m=0;m<u.length;++m){var g=u[m];if(!(n[g]||r&&r[g]||h&&h[g]||f&&f[g])){var v=l(i,g);try{o(t,g,v)}catch(e){}}}}return t}}();var Lt="undefined"==typeof window||window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?r.createContext(null):window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=r.createContext(null));Lt.Consumer;var Ot,It,Rt=Lt.Provider,Ut=Lt;function Bt(){var e=r.useContext(Ut);return vt(e),e}function Ht(e){var t=function(t){var n=Bt(),i=t.value,r=t.children,a=c(t,["value","children"]),o="string"==typeof i?new Date(i||0):i;return r("formatDate"===e?n.formatDateToParts(o,a):n.formatTimeToParts(o,a))};return t.displayName=It[e],t}function Ft(e){var t=function(t){var n=Bt(),i=t.value,a=t.children,o=c(t,["value","children"]),s=n[e](i,o);if("function"==typeof a)return a(s);var l=n.textComponent||r.Fragment;return r.createElement(l,null,s)};return t.displayName=Ot[e],t}function Dt(e){return e?Object.keys(e).reduce((function(t,n){var i,a=e[n];return t[n]=Ce(a)?(i=a,function(e){return i(r.Children.toArray(e))}):a,t}),{}):e}!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(Ot||(Ot={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(It||(It={}));var zt=function(e,t,n,i){for(var a=[],o=4;o<arguments.length;o++)a[o-4]=arguments[o];var s=Dt(i),c=Ke.apply(void 0,p([e,t,n,s],a,!1));return Array.isArray(c)?function(e){var t;return null!==(t=r.Children.map(e,yt))&&void 0!==t?t:[]}(c):c},Gt=function(e,t){var n=e.defaultRichTextElements,i=c(e,["defaultRichTextElements"]),r=Dt(n),a=gt(s(s(s({},bt),i),{defaultRichTextElements:r}),t),o={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:r};return s(s({},a),{formatMessage:zt.bind(null,o,a.formatters),$t:zt.bind(null,o,a.formatters)})};function Zt(e){var t=Bt(),n=t.formatMessage,i=t.textComponent,a=void 0===i?r.Fragment:i,o=e.id,s=e.description,c=e.defaultMessage,l=e.values,p=e.children,d=e.tagName,_=void 0===d?a:d,u=n({id:o,description:s,defaultMessage:c},l,{ignoreTag:e.ignoreTag});return"function"==typeof p?p(Array.isArray(u)?u:[u]):_?r.createElement(_,null,u):r.createElement(r.Fragment,null,u)}Zt.displayName="FormattedMessage";var Vt=r.memo(Zt,(function(e,t){var n=e.values,i=c(e,["values"]),r=t.values,a=c(t,["values"]);return xt(r,n)&&xt(i,a)}));function $t(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}Vt.displayName="MemoizedFormattedMessage";var Wt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t.state={cache:t.cache,intl:Gt($t(t.props),t.cache),prevConfig:$t(t.props)},t}return o(t,e),t.getDerivedStateFromProps=function(e,t){var n=t.prevConfig,i=t.cache,r=$t(e);return xt(n,r)?null:{intl:Gt(r,i),prevConfig:r}},t.prototype.render=function(){return vt(this.state.intl),r.createElement(Rt,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=bt,t}(r.PureComponent);function Kt(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}Ft("formatDate"),Ft("formatTime"),Ft("formatNumber"),Ft("formatList"),Ft("formatDisplayName"),Ht("formatDate"),Ht("formatTime");function qt({children:t,theme:n}){return e.jsxs("div",{className:"notificare__android-phone-background__wrapper "+("dark"===n?"notificare__android-phone-background__wrapper--dark":""),"data-testid":"android-phone-background",children:[e.jsx("div",{className:"notificare__android-phone-background__camera"}),e.jsx("div",{className:"notificare__android-phone-background__content",children:t})]})}Kt(".notificare .notificare__android-phone-background__wrapper {\n width: 350px;\n border-radius: 40px;\n border: 6px solid #c6c6c6;\n background-color: #fff;\n overflow: hidden;\n}\n\n.notificare .notificare__android-phone-background__wrapper--dark {\n background-color: #9ea2a1;\n border-color: #eaeaea;\n}\n\n.notificare .notificare__android-phone-background__camera {\n width: 20px;\n height: 20px;\n background: #c6c6c6;\n border-radius: 50%;\n margin: 20px auto 10px;\n}\n\n.notificare .notificare__android-phone-background__content {\n width: 100%;\n height: 615px;\n overflow: hidden;\n position: relative;\n}");var Xt;function Yt({children:t,theme:n}){return e.jsxs("div",{className:"notificare__ios-phone-background__wrapper "+("dark"===n?"notificare__ios-phone-background__wrapper--dark":""),"data-testid":"ios-phone-background",children:[e.jsx("div",{className:"notificare__ios-phone-background__camera"}),e.jsx("div",{className:"notificare__ios-phone-background__content",children:t})]})}function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Jt.apply(null,arguments)}Kt(".notificare .notificare__ios-phone-background__wrapper {\n width: 350px;\n border-radius: 40px;\n border: 6px solid #c6c6c6;\n background-color: #fff;\n overflow: hidden;\n}\n\n.notificare .notificare__ios-phone-background__wrapper--dark {\n background-color: #9ea2a1;\n border-color: #eaeaea;\n}\n\n.notificare .notificare__ios-phone-background__camera {\n width: 80px;\n height: 20px;\n background: #c6c6c6;\n margin: 20px auto 10px;\n border-radius: 20px;\n}\n\n.notificare .notificare__ios-phone-background__content {\n width: 100%;\n height: 615px;\n overflow: hidden;\n position: relative;\n}");var Qt,en=function(e){return r.createElement("svg",Jt({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Xt||(Xt=r.createElement("path",{fill:"#64706e",d:"M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5"})))};function tn(){return e.jsx("div",{className:"notificare__loading__wrapper","data-testid":"loading",children:e.jsx(en,{className:"notificare__loading__icon"})})}function nn(){return nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},nn.apply(null,arguments)}Kt(".notificare .notificare__loading__wrapper {\n width: 100%;\n display: flex;\n justify-content: center;\n padding-top: 50px;\n}\n\n.notificare .notificare__loading__icon {\n width: 60px;\n height: 60px;\n animation: notificare-loading-icon-spin 2s linear infinite;\n}\n\n@keyframes notificare-loading-icon-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}");var rn=function(e){return r.createElement("svg",nn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Qt||(Qt=r.createElement("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32m0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24m32 224a32 32 0 1 0-64 0 32 32 0 1 0 64 0"})))};const an={"controls.platform":"Platform","controls.formFactor":"Form Factor","controls.operatingSystem":"OS","controls.operatingSystem.macos":"macOS","controls.variant":"Variant","controls.displayMode.lockScreen":"Lock Screen","controls.displayMode.expandedLockScreen":"Lock Screen - Expanded","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information","preview.error.invalidNotification":"→ Invalid Notification","preview.error.provideGoogleMapsApiKey":"→ A Google Maps API key should be provided","preview.error.notSupportedPreviewVariant":"→ Not supported variant","preview.error.invalidUrl":"The URL is invalid.","preview.error.iosStoreAppNotFound":"The app was not found. Check the unique identifier and try again","preview.error.webshotFail":"Webshot failed to be loaded. Check console for more details.","preview.error.notSupportedNotificationTypePreviewVariant":"→ Previewing notifications of type ''{notificationType}'' is not possible in this variant","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a custom URL Scheme is not possible","preview.error.urlResolverInvalidUrl":"→ The provided URL is invalid","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with an HTTP URL without 'notificareWebView' query parameter is not possible in this variant","preview.error.notSupportedUrlResolverWithDynamicLink":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a dynamic link is not possible","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ Previewing notifications of type 're.notifica.notification.URLResolver' with a relative URL (starts with '/') is not possible","preview.error.googleMapsAuthFailure":"Authentication failure. Your Google Maps API key might be invalid. Check console for more information.","preview.error.googleMapsLoadFailure":"Google Maps failed to be loaded. Check console for more information.","preview.error.noValidContentObject":"No valid content object was provided","preview.error.iosStoreAppLoadFailure":"The app failed to be loaded. Check console for more details","preview.android.alert.appUi.cancel":"Cancel","preview.android.inAppBrowser.appUi.pageTitleLoading":"Loading...","preview.android.lockscreen.time":"now","preview.ios.alert.appUi.cancel":"Cancel","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Done","preview.ios.inAppBrowser.appUi.notSecure":"Not Secure —","preview.ios.rate.appUi.rateNow":"Yes, I'll Rate Now","preview.ios.rate.appUi.doNotRate":"No, Thanks","preview.ios.store.appUi.done":"Done","preview.ios.store.appUi.install":"Install","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Ratings","preview.ios.store.appUi.age":"Age","preview.ios.store.appUi.yearsOld":"Years Old","preview.ios.store.appUi.category":"Category","preview.ios.store.appUi.developer":"Developer","preview.ios.store.appUi.whatsNew":"What's New","preview.ios.store.appUi.historyVersion":"Version {version}","preview.ios.store.appUi.screenshots":"Screenshots","preview.ios.lockScreen.time":"Now","preview.web.desktop.macos.lockScreen.time":"now","preview.web.desktop.macos.lockScreen.settings":"Settings","preview.web.desktop.macos.lockScreen.options":"Options"};var on;function sn({message:t}){const n=Bt();return e.jsxs("div",{className:"notificare__preview-error__wrapper","data-testid":"preview-error",children:[e.jsx(rn,{className:"notificare__preview-error__icon"}),e.jsxs("p",{className:"notificare__preview-error__text",children:[n.formatMessage({id:"preview.error.notGeneratedPreview",defaultMessage:an["preview.error.notGeneratedPreview"]}),t&&e.jsxs(e.Fragment,{children:[e.jsx("br",{})," ",e.jsx("br",{})," ",t]})]})]})}function cn(){return cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},cn.apply(null,arguments)}Kt(".notificare .notificare__preview-error__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 100%;\n height: 440px;\n text-align: center;\n padding: 0 20px;\n}\n\n.notificare .notificare__preview-error__icon {\n width: 72px;\n margin-bottom: 20px;\n height: auto;\n}\n\n.notificare .notificare__preview-error__text {\n font-weight: 700;\n font-size: 16px;\n color: #232c2a;\n}");var ln=function(e){return r.createElement("svg",cn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),on||(on=r.createElement("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})))};class pn extends Error{constructor(e){super(`Failed to fetch a resource with response code '${e.status.toString()}'.`),this.response=e,this.name="NetworkRequestError",Error.captureStackTrace&&Error.captureStackTrace(this,pn)}}function dn(e,t){return l(this,void 0,void 0,(function*(){const n=yield fetch(e,t);if(!n.ok)throw new pn(n);return yield n.json()}))}function _n(e){return e.startsWith("https://")||e.startsWith("http://")?e:`https://push.notifica.re/upload${e}`}const un={name:"My app",icon:void 0,androidPackageName:"com.example.app",websitePushConfig:{icon:void 0,allowedDomains:["https://my-app.com/"]}};function fn({id:e,serviceKey:n}){const[i,r]=t.useState({status:"idle"});return t.useEffect((()=>e?n?void function(e,t){return l(this,void 0,void 0,(function*(){const n=new URL(`/application/${encodeURIComponent(e)}/info`,"https://push.notifica.re");n.searchParams.set("apiKey",t);const{application:i}=yield dn(n);return{name:i.name,icon:i.icon,androidPackageName:i.androidPackageName,websitePushConfig:i.websitePushConfig&&{icon:i.websitePushConfig.icon?_n(i.websitePushConfig.icon):void 0,allowedDomains:i.websitePushConfig.allowedDomains}}}))}(e,n).then((e=>{r({status:"success",data:e})})).catch((e=>{console.error("Error fetching the application: ",e),r({status:"success",data:un})})):(console.warn("An application ID was provided, but a service key is missing. Using default application instead."),void r({status:"success",data:un})):(console.warn("An application ID was not provided. Using default application instead."),void r({status:"success",data:un}))),[e,n]),i}function hn(e,n){const[i,r]=t.useState(e);return t.useEffect((()=>{const t=setTimeout((()=>{r(e)}),n);return()=>{clearTimeout(t)}}),[e,n]),i}function mn(e){try{return Intl.NumberFormat.supportedLocalesOf([e]).length>0}catch(e){return!1}}const gn={"preview.error.invalidInAppMessage":"→ Invalid in-app message","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information"},vn={"preview.error.invalidInAppMessage":"→ Message intégré invalide","preview.error.notGeneratedPreview":"L'aperçu n’a pas pu être généré","preview.error.checkConsole":"Consultez la console pour plus d’informations"},bn={"preview.error.invalidInAppMessage":"→ Mensagem in-app inválida","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações"},wn={"controls.platform":"Plateforme","controls.formFactor":"Format","controls.operatingSystem":"SE","controls.operatingSystem.macos":"macOS","controls.variant":"Variante","controls.displayMode.lockScreen":"Écran verrouillé","controls.displayMode.expandedLockScreen":"Écran verrouillé - Étendu","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Aperçu non généré","preview.error.checkConsole":"Consultez la console pour plus d’informations","preview.error.invalidNotification":"→ Notification invalide","preview.error.provideGoogleMapsApiKey":"→ Une clé API Google Maps doit être fournie","preview.error.notSupportedPreviewVariant":"→ Variante non prise en charge","preview.error.invalidUrl":"L’URL est invalide.","preview.error.iosStoreAppNotFound":"L'application n’a pas été trouvée. Vérifiez l’identifiant unique et réessayez","preview.error.webshotFail":"La capture Web a échoué. Consultez la console pour plus de détails.","preview.error.notSupportedNotificationTypePreviewVariant":"→ L’aperçu des notifications de type ''{notificationType}'' n’est pas possible dans cette variante","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec un schéma d’URL personnalisé (URL Scheme) n’est pas possible","preview.error.urlResolverInvalidUrl":"→ L’URL fournie est invalide","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec une URL HTTP sans le paramètre de requête 'notificareWebView' n’est pas possible dans cette variante","preview.error.notSupportedUrlResolverWithDynamicLink":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec un lien dynamique n’est pas possible","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ L’aperçu des notifications de type 're.notifica.notification.URLResolver' avec une URL relative (commençant par '/') n’est pas possible","preview.error.googleMapsAuthFailure":"Échec de l’authentification. Votre clé API Google Maps pourrait être invalide. Consultez la console pour plus d’informations.","preview.error.googleMapsLoadFailure":"Échec du chargement de Google Maps. Consultez la console pour plus d’informations.","preview.error.noValidContentObject":"Aucun objet de contenu valide fourni","preview.error.iosStoreAppLoadFailure":"Échec du chargement de l’application. Consultez la console pour plus de détails","preview.android.alert.appUi.cancel":"Annuler","preview.android.inAppBrowser.appUi.pageTitleLoading":"Chargement...","preview.android.lockscreen.time":"maintenant","preview.ios.alert.appUi.cancel":"Annuler","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Terminé","preview.ios.inAppBrowser.appUi.notSecure":"Non Sécurisé —","preview.ios.rate.appUi.rateNow":"Oui, je vais noter maintenant","preview.ios.rate.appUi.doNotRate":"Non, Merci","preview.ios.store.appUi.done":"Terminé","preview.ios.store.appUi.install":"Installer","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Évaluations","preview.ios.store.appUi.age":"Âge","preview.ios.store.appUi.yearsOld":"Ans","preview.ios.store.appUi.category":"Catégorie","preview.ios.store.appUi.developer":"Développeur","preview.ios.store.appUi.whatsNew":"Nouveautés","preview.ios.store.appUi.historyVersion":"Version {version}","preview.ios.store.appUi.screenshots":"Captures d’écran","preview.ios.lockScreen.time":"Maintenant","preview.web.desktop.macos.lockScreen.time":"maintenant","preview.web.desktop.macos.lockScreen.settings":"Réglages","preview.web.desktop.macos.lockScreen.options":"Options"},yn={"controls.platform":"Plataforma","controls.formFactor":"Formato","controls.operatingSystem":"SO","controls.operatingSystem.macos":"macOS","controls.variant":"Variante","controls.displayMode.lockScreen":"Ecrã de Bloqueio","controls.displayMode.expandedLockScreen":"Ecrã de Bloqueio - Expandido","controls.displayMode.appUi":"App UI","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações","preview.error.invalidNotification":"→ Notificação inválida","preview.error.provideGoogleMapsApiKey":"→ Deve ser fornecida uma chave de API do Google Maps","preview.error.notSupportedPreviewVariant":"→ Variante não suportada","preview.error.invalidUrl":"A URL é inválida.","preview.error.iosStoreAppNotFound":"A aplicação não foi encontrada. Verifique o identificador único e tente novamente","preview.error.webshotFail":"Não foi possível efetuar a captura da página web. Consulte a consola para mais informações.","preview.error.notSupportedNotificationTypePreviewVariant":"→ A pré-visualização de notificações do tipo ''{notificationType}'' não é possível nesta variante","preview.error.notSupportedUrlResolverWithUrlSchemePreview":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um esquema de URL personalizado (URL Scheme) não é possível","preview.error.urlResolverInvalidUrl":"→ O URL fornecido é inválido","preview.error.urlResolverNoNotificareWebViewQueryParameter":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um URL HTTP sem o parâmetro de query 'notificareWebView' não é possível nesta variante","preview.error.notSupportedUrlResolverWithDynamicLink":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um link dinâmico não é possível","preview.error.notSupportedUrlResolverWithRelativeUrl":"→ A pré-visualização de notificações do tipo 're.notifica.notification.URLResolver' com um URL relativo (que começa por '/') não é possível","preview.error.googleMapsAuthFailure":"Falha de autenticação. A chave da API do Google Maps poderá ser inválida. Consulte a consola para mais informações.","preview.error.googleMapsLoadFailure":"Não foi possível carregar o Google Maps. Consulte a consola para mais informações.","preview.error.noValidContentObject":"Nenhum objeto válido foi fornecido","preview.error.iosStoreAppLoadFailure":"Não foi possível carregar a aplicação. Consulte a consola para mais informações","preview.android.alert.appUi.cancel":"Cancelar","preview.android.inAppBrowser.appUi.pageTitleLoading":"A carregar...","preview.android.lockscreen.time":"agora","preview.ios.alert.appUi.cancel":"Cancelar","preview.ios.alert.appUi.ok":"OK","preview.ios.inAppBrowser.appUi.done":"Concluído","preview.ios.inAppBrowser.appUi.notSecure":"Não seguro —","preview.ios.rate.appUi.rateNow":"Sim, avaliar agora","preview.ios.rate.appUi.doNotRate":"Não, obrigado","preview.ios.store.appUi.done":"OK","preview.ios.store.appUi.install":"Obter","preview.ios.store.appUi.ratings":"{userRatingCount, number, ::compact-short} Classificações","preview.ios.store.appUi.age":"Idade","preview.ios.store.appUi.yearsOld":"Anos","preview.ios.store.appUi.category":"Categoria","preview.ios.store.appUi.developer":"Programador","preview.ios.store.appUi.whatsNew":"Novidades","preview.ios.store.appUi.historyVersion":"Versão {version}","preview.ios.store.appUi.screenshots":"Capturas de ecrã","preview.ios.lockScreen.time":"Agora","preview.web.desktop.macos.lockScreen.time":"agora","preview.web.desktop.macos.lockScreen.settings":"Definições","preview.web.desktop.macos.lockScreen.options":"Opções"},xn={"preview.error.invalidPushOnboardingApplicationInfo":"→ Invalid application information","preview.error.notGeneratedPreview":"Preview could not be generated","preview.error.checkConsole":"Check console for more information"},kn={"preview.error.invalidPushOnboardingApplicationInfo":"→ Informations d’application invalides","preview.error.notGeneratedPreview":"L'aperçu n’a pas pu être généré","preview.error.checkConsole":"Consultez la console pour plus d’informations"},En={"preview.error.invalidPushOnboardingApplicationInfo":"→ Informação da aplicação inválida","preview.error.notGeneratedPreview":"Não foi possível gerar a pré-visualização","preview.error.checkConsole":"Consulte a consola para mais informações"};function jn({locale:e,customTranslations:n,type:i}){const[r,a]=t.useState({status:"idle"}),o=t.useMemo((()=>{if(!mn(e))return null;return function(e,t){switch(e){case"en":switch(t){case"push":return an;case"in-app":return gn;case"onboarding":return xn}break;case"pt":switch(t){case"push":return yn;case"in-app":return bn;case"onboarding":return En}break;case"fr":switch(t){case"push":return wn;case"in-app":return vn;case"onboarding":return kn}break;default:return null}}(new Intl.Locale(e).language,i)}),[e,i]);return t.useEffect((function(){mn(e)?a({status:"success",data:{locale:e,translations:Object.assign(Object.assign({},o),n)}}):a({status:"error",error:new Error("→ The locale you chose is invalid. Choose a different one and try again")})}),[e,n,o]),r}function Nn({label:n,options:i,value:r,onValueChanged:a,disabled:o=!1}){const s=Bt(),[c,l]=t.useState(!1),[p,d]=t.useState((function(){const e=i.find((e=>e.value===r));if(!e)throw new Error(`Value "${String(r)}" not found in the Selector options.`);return s.formatMessage({id:e.labelId,defaultMessage:e.defaultLabel})})),_=t.useRef(null),u=t.useRef(null);return function({refs:e,onClickOutside:n}){t.useEffect((()=>{function t(t){const i=e.every((e=>{var n;return!(null===(n=e.current)||void 0===n?void 0:n.contains(t.target))}));i&&n()}return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}}),[e])}({refs:[_,u],onClickOutside:()=>{l(!1)}}),e.jsxs("div",{className:"notificare__selector__wrapper",children:[e.jsx("p",{className:"notificare__selector__label",children:n}),e.jsxs("button",{className:"notificare__selector__button",onClick:()=>l(!c),disabled:o,ref:u,type:"button",children:[p,e.jsx(ln,{className:"notificare__selector__button-expand-icon"})]}),c&&e.jsx("div",{className:"notificare__selector__options",ref:_,children:i.map((t=>e.jsx("button",{className:"notificare__selector__option-button "+(r===t.value?"notificare__selector__option-button--selected":""),onClick:()=>{null==a||a(t.value),l(!1),d(s.formatMessage({id:t.labelId,defaultMessage:t.defaultLabel}))},type:"button","data-testid":`selector-option-${t.value.toString()}`,children:s.formatMessage({id:t.labelId,defaultMessage:t.defaultLabel})},t.value)))})]})}Kt(".notificare .notificare__selector__wrapper {\n position: relative;\n}\n\n.notificare .notificare__selector__label {\n font-size: 14px;\n color: #6e6e6e;\n margin-bottom: 7px;\n}\n\n.notificare .notificare__selector__button {\n width: 350px;\n height: 42px;\n background-color: #F6F6F6;\n color: #1c1c1c;\n border: 1px solid #E8E8E8;\n text-align: left;\n padding-left: 14px;\n font-size: 16px;\n display: flex;\n align-items: center;\n}\n\n.notificare .notificare__selector__button:not(:disabled) {\n cursor: pointer;\n}\n\n.notificare .notificare__selector__button:disabled {\n color: #b3b3b3;\n}\n\n.notificare .notificare__selector__button-expand-icon {\n width: 16px;\n height: 16px;\n margin-left: auto;\n margin-right: 14px;\n}\n\n.notificare .notificare__selector__button:disabled .notificare__selector__button-expand-icon {\n fill: #b3b3b3;\n}\n\n.notificare .notificare__selector__options {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 63px;\n z-index: 1;\n box-shadow: 0 14px 10px -10px rgba(0, 0, 0, 0.2);\n}\n\n.notificare .notificare__selector__option-button {\n width: 350px;\n height: 42px;\n background-color: #ececec;\n color: #151515;\n border: 0;\n font-size: 15px;\n text-align: left;\n padding-left: 14px;\n}\n\n.notificare .notificare__selector__option-button--selected {\n background-color: #c8c8c8;\n}\n\n.notificare .notificare__selector__option-button:hover {\n background-color: #5E5E5E;\n color: white;\n cursor: pointer;\n}\n");function Sn({label:n,options:i,value:r,onValueChanged:a}){return e.jsxs("div",{className:"notificare__toggle-group__wrapper",children:[e.jsx("p",{className:"notificare__toggle-group__label","data-testid":`toggle-group-${n}`,children:n}),e.jsx("div",{className:"notificare__toggle-group__options",children:i.map(((n,o)=>e.jsxs(t.Fragment,{children:[e.jsx("button",{className:"notificare__toggle-group__option-button "+(r===n.value?"notificare__toggle-group__option-button--selected":""),onClick:()=>a(n.value),"aria-label":`Button with option '${n.value.toString()}'`,type:"button","data-testid":`toggle-group-option-${n.value.toString()}`,children:e.jsx("div",{className:"notificare__toggle-group__option-button-icon "+(r===n.value?"notificare__toggle-group__option-button-icon--selected":""),children:n.icon})}),o!==i.length-1&&e.jsx("div",{className:"notificare__toggle-group__border"})]},n.value)))})]})}Kt(".notificare .notificare__toggle-group__wrapper {\n display: flex;\n flex-direction: column;\n row-gap: 7px;\n}\n\n.notificare .notificare__toggle-group__label {\n font-size: 14px;\n color: #6e6e6e;\n}\n\n.notificare .notificare__toggle-group__options {\n display: flex;\n border-radius: 8px;\n border: 1px solid #DADADA;\n width: max-content;\n overflow: hidden;\n background-color: #F6F6F6;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.notificare .notificare__toggle-group__option-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n transition: all 0.3s;\n background: #f6f6f6;\n color: #374151;\n border: 0;\n cursor: pointer;\n}\n\n.notificare .notificare__toggle-group__option-button--selected {\n background: #5E5E5E;\n color: #ffffff;\n}\n\n.notificare .notificare__toggle-group__option-button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n fill: #C0C0C0;\n}\n\n.notificare .notificare__toggle-group__option-button-icon--selected {\n fill: #FFF\n}\n\n.notificare .notificare__toggle-group__border {\n width: 1px;\n height: 40px;\n background: #DADADA;\n}");function Cn({message:t,showConsoleWarning:n}){return e.jsxs("div",{className:"notificare__unavailable-preview__wrapper","data-testid":"unavailable-preview",children:[e.jsxs("div",{className:"notificare__unavailable-preview__warning",children:[e.jsx(rn,{className:"notificare__unavailable-preview__alert-icon"}),e.jsxs("div",{className:"notificare__unavailable-preview__text-container",children:[e.jsx("div",{className:"notificare__unavailable-preview__title",children:e.jsx(Vt,{id:"preview.error.notGeneratedPreview",defaultMessage:an["preview.error.notGeneratedPreview"]})}),e.jsx("div",{className:"notificare__unavailable-preview__reason-text","data-testid":"unavailable-preview-reason-text",children:t})]})]}),n&&e.jsx("div",{className:"notificare__unavailable-preview__check-console-text",children:e.jsx(Vt,{id:"preview.error.checkConsole",defaultMessage:an["preview.error.checkConsole"]})})]})}Kt(".notificare .notificare__unavailable-preview__wrapper {\n width: 350px;\n}\n\n.notificare .notificare__unavailable-preview__warning {\n width: 100%;\n background-color: #fff1cc;\n border: 1px solid #d5d5d5;\n display: flex;\n align-items: center;\n padding: 14px;\n border-radius: 10px;\n column-gap: 14px;\n}\n\n.notificare .notificare__unavailable-preview__text-container {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n width: 100%;\n}\n\n.notificare .notificare__unavailable-preview__title {\n font-size: 15px;\n color: #232323;\n font-weight: bold;\n}\n\n.notificare .notificare__unavailable-preview__reason-text {\n font-size: 13px;\n color: #bd6868;\n}\n\n.notificare .notificare__unavailable-preview__alert-icon {\n width: 40px;\n height: auto;\n}\n\n.notificare .notificare__unavailable-preview__check-console-text {\n font-size: 12px;\n color: #989898;\n text-align: right;\n margin-top: 6px;\n margin-right: 3px;\n font-style: italic;\n position: relative;\n}");const Tn=t.createContext(void 0);function An(t){var{children:n}=t,i=c(t,["children"]);return e.jsx(Tn.Provider,{value:i,children:n})}function Pn(){const e=t.useContext(Tn);if(!e)throw new Error("useOptions should be used inside an OptionsProvider");return e}function Mn(e,t,n){return l(this,void 0,void 0,(function*(){const i=new URL(`/webshot/${encodeURIComponent(e)}/result`,"https://push.notifica.re");i.searchParams.set("apiKey",t);const r=yield function(e,t){return l(this,void 0,void 0,(function*(){const n=yield fetch(e,t);if(!n.ok)throw new pn(n);return yield n.blob()}))}(i,{signal:n});return URL.createObjectURL(r)}))}function Ln(e,t){console.error(`${t}\n\n${e}`)}function On(e){try{return"https:"===new URL(e).protocol}catch(e){return!1}}function In(e){try{const t=new URL(e).hostname,n=t.split(".");return n.length>2?n.slice(-2).join("."):t}catch(e){return console.error("Invalid URL:",e),""}}function Rn(e){const n=Bt(),i=Pn(),{url:r,platform:a,width:o,height:s,serviceKey:c}=hn(Object.assign(Object.assign({},e),{serviceKey:i.serviceKey}),500),[p,d]=t.useState({status:"idle"}),[_,u]=t.useState();return t.useEffect((function(){const e=new AbortController,t=e.signal;if(u(void 0),function(e){try{return new URL(e),!0}catch(e){return!1}}(r))return d({status:"loading"}),function(e,t,n,i,r,a){return l(this,void 0,void 0,(function*(){const o=new URL("/webshot","https://push.notifica.re");o.searchParams.set("apiKey",r);const{webshot:s}=yield dn(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e,delay:3e3,platform:i,type:"png",params:{width:t,height:n}}),signal:a});return s.id}))}(r,o,s,a,c,t).then((e=>{t.aborted||u(e)})).catch((e=>{t.aborted||(Ln(e,"An error has occurred while trying to create the webshot request:"),d({status:"error",error:new Error(n.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))}))})),()=>{e.abort()};d({status:"error",error:new Error(n.formatMessage({id:"preview.error.invalidUrl",defaultMessage:an["preview.error.invalidUrl"]}))})}),[r,o,s,a,c,n]),t.useEffect((function(){if(!_)return;const e=new AbortController,t=e.signal;let i,r=!1;const a=()=>l(this,void 0,void 0,(function*(){if(!r){r=!0;try{const e=yield function(e,t,n){return l(this,void 0,void 0,(function*(){const i=new URL(`/webshot/${encodeURIComponent(e)}`,"https://push.notifica.re");i.searchParams.set("apiKey",t);const{webshot:r}=yield dn(i,{signal:n});return r}))}(_,c,t);if(t.aborted)return;switch(e.status){case"finished":{clearInterval(i);const e=yield Mn(_,c,t);if(t.aborted)return;d({status:"success",data:e});break}case"error":clearInterval(i),Ln(e.result,"An error has occurred while trying to get the webshot request status:"),d({status:"error",error:new Error(n.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))})}}catch(e){if(t.aborted)return;clearInterval(i),Ln(e,"Webshot error:"),d({status:"error",error:new Error(n.formatMessage({id:"preview.error.webshotFail",defaultMessage:an["preview.error.webshotFail"]}))})}r=!1}}));return a(),i=setInterval((()=>{a()}),3e3),()=>{e.abort(),clearInterval(i)}}),[_]),p}var Un;function Bn({url:n,platform:i,width:r,height:a,onLoadingChanged:o,canShow:s=!0}){const c=Rn({url:n,platform:i,width:r,height:a});return t.useEffect((function(){switch(c.status){case"idle":case"loading":null==o||o(!0);break;case"success":case"error":null==o||o(!1)}}),[c,o]),e.jsxs("div",{className:"notificare__webshot__wrapper",style:{width:r,height:a},children:["loading"===c.status&&e.jsx(tn,{}),"success"===c.status&&s&&e.jsx("img",{src:c.data,alt:"Webshot","data-testid":"webshot"}),"error"===c.status&&e.jsx(sn,{message:c.error.message})]})}function Hn(){return Hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Hn.apply(null,arguments)}Kt(".notificare .notificare__webshot__wrapper {\n background-color: #fff;\n}");var Fn,Dn=function(e){return r.createElement("svg",Hn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},e),Un||(Un=r.createElement("path",{d:"M144 144v48h160v-48c0-44.2-35.8-80-80-80s-80 35.8-80 80m-64 48v-48C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64v192c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64z"})))};function zn(){return zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},zn.apply(null,arguments)}var Gn=function(e){return r.createElement("svg",zn({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),Fn||(Fn=r.createElement("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256z"})))};function Zn({url:n,onLoadingChanged:i,canShow:r}){const[a,o]=t.useState(""),[s,c]=t.useState({isLoading:!0}),{serviceKey:p}=Pn(),d=Bt();return t.useEffect((function(){Vn(!0,c,i),function(e,t){return l(this,void 0,void 0,(function*(){var n,i;const r=new URL("/proxy","https://push.notifica.re");r.searchParams.set("apiKey",e),r.searchParams.set("url",t);const a=yield fetch(r),o=yield a.text();return null!==(i=null===(n=(new DOMParser).parseFromString(o,"text/html").querySelector("title"))||void 0===n?void 0:n.textContent)&&void 0!==i?i:""}))}(p,n).then(o).catch((e=>{Ln(e,"Error while getting page title:")})).finally((()=>{Vn(!1,c,i)}))}),[n,p,i]),e.jsxs("div",{className:"notificare__push__android__in-app-browser__app-ui__bar",children:[e.jsx(Gn,{className:"notificare__push__android__in-app-browser__app-ui__x-mark-icon"}),On(n)?e.jsx(Dn,{className:"notificare__push__android__in-app-browser__app-ui__bar-lock-icon"}):e.jsx(rn,{className:"notificare__push__android__in-app-browser__app-ui__alert-icon"}),e.jsxs("div",{className:"notificare__push__android__in-app-browser__app-ui__bar-domain",children:[e.jsx("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--title",children:!s.isLoading&&r?a:d.formatMessage({id:"preview.android.inAppBrowser.appUi.pageTitleLoading",defaultMessage:an["preview.android.inAppBrowser.appUi.pageTitleLoading"]})}),e.jsx("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--url",children:In(n)})]})]})}function Vn(e,t,n){t({isLoading:e}),null==n||n(e)}Kt(".notificare .notificare__push__android__in-app-browser__app-ui__bar {\n display: flex;\n width: 334px;\n height: 45px;\n padding: 0 15px;\n align-items: center;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__x-mark-icon {\n margin-right: 20px;\n height: 24px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-lock-icon {\n margin-right: 7px;\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__alert-icon {\n margin-right: 7px;\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-domain {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text--title {\n font-size: 14px;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text--url {\n font-size: 12px;\n}");function $n({notification:n}){const[i,r]=t.useState(!0),[a,o]=t.useState(!0),s=n.content[0].data;return e.jsxs("div",{"data-testid":"android-app-ui-in-app-browser-notification",children:[e.jsx(Zn,{url:s,onLoadingChanged:r,canShow:!a}),e.jsx(Bn,{url:s,platform:"Android",width:338,height:570,onLoadingChanged:o,canShow:!i})]})}Kt("");const Wn=t.createContext(void 0);function Kn({application:t,children:n}){return e.jsx(Wn.Provider,{value:t,children:n})}function qn(){const e=t.useContext(Wn);if(!e)throw new Error("useApplication should be used inside an ApplicationProvider");return e}function Xn(e,t){return l(this,void 0,void 0,(function*(){const n=new URL("/proxy","https://push.notifica.re");return n.searchParams.set("apiKey",e),n.searchParams.set("url",t),yield function(e,t){return l(this,void 0,void 0,(function*(){const n=yield fetch(e,t);if(!n.ok)throw new pn(n);return yield n.text()}))}(n)}))}function Yn(e){return!!(e.actions&&e.actions.length>0)}function Jn(e){return!(!e.actions||1!==e.actions.length)}function Qn(e){return!!(e.actions&&e.actions.length>1)}function ei(e){var t;return!!(null===(t=e.attachments)||void 0===t?void 0:t[0])}function ti(e){const t=(new DOMParser).parseFromString(e,"text/html").querySelectorAll("a");let n=!1;return t.forEach((e=>{new URL(e.href,window.location.origin).searchParams.has("notificareOpenAction")&&(n=!0)})),n}var ni;function ii(){return ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ii.apply(null,arguments)}var ri,ai=function(e){return r.createElement("svg",ii({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},e),ni||(ni=r.createElement("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H109.3l105.3-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"})))};function oi(){return oi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},oi.apply(null,arguments)}var si=function(e){return r.createElement("svg",oi({xmlns:"http://www.w3.org/2000/svg","data-testid":"android-app-ui-navigation-bar-options-button",viewBox:"0 0 128 512",width:"1em",height:"1em"},e),ri||(ri=r.createElement("path",{d:"M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112m0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112m56-104A56 56 0 1 0 8 96a56 56 0 1 0 112 0"})))};function ci({title:t,showOptions:n}){return e.jsxs("div",{className:"notificare__push__android__app-ui__navigation-bar",children:[e.jsx(ai,{className:"notificare__push__android__app-ui__navigation-bar-arrow-icon"}),e.jsx("div",{className:"notificare__push__android__app-ui__navigation-bar-title",children:t}),n&&e.jsx(si,{"data-testid":"android-app-ui-navigation-bar-options-button",className:"notificare__push__android__app-ui__navigation-bar-options-button"})]})}Kt(".notificare .notificare__push__android__app-ui__navigation-bar {\n display: flex;\n width: 338px;\n height: 45px;\n padding: 0 15px;\n align-items: center;\n justify-content: flex-start;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-arrow-icon {\n margin-right: 20px;\n height: 24px;\n width: auto;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-title {\n width: 100%;\n font-size: 18px;\n font-weight: 700;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-options-button {\n margin-left: auto;\n height: 24px;\n}");var li;function pi({notification:n}){const i=qn(),r=n.content[0].data,[a,o]=t.useState(""),{serviceKey:s}=Pn();return t.useEffect((function(){Xn(s,r).then(o).catch((e=>{Ln(e,"Error fetching website markup:")}))}),[r,s]),e.jsxs("div",{"data-testid":"android-app-ui-url-notification",children:[e.jsx(ci,{title:n.title||i.name,showOptions:Yn(n)&&!ti(a)}),e.jsx(Bn,{url:r,platform:"Android",width:338,height:570})]})}function di(e){if(!(e=e.trim()))return li.INVALID_URL;if(e.startsWith("/"))return li.RELATIVE_URL;let t;try{t=new URL(e)}catch(e){return li.INVALID_URL}const n="http:"===t.protocol||"https:"===t.protocol,i=t.host.endsWith("ntc.re");if(!n)return li.URL_SCHEME;if(i)return li.DYNAMIC_LINK;const r=t.searchParams.get("notificareWebView");return"1"===r||"true"===(null==r?void 0:r.toLowerCase())?li.WEB_VIEW:li.IN_APP_BROWSER}function _i({notification:n,onError:i}){const r=Bt(),a=di(n.content[0].data),o=(()=>{switch(a){case li.INVALID_URL:return{status:"error",errorCode:"preview.error.urlResolverInvalidUrl"};case li.URL_SCHEME:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithUrlSchemePreview"};case li.DYNAMIC_LINK:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithDynamicLink"};case li.RELATIVE_URL:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithRelativeUrl"};case li.WEB_VIEW:return{status:"success",preview:e.jsx(pi,{notification:n})};case li.IN_APP_BROWSER:return{status:"success",preview:e.jsx($n,{notification:n})}}})();switch(t.useEffect((function(){"error"===o.status&&i(r.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,i,r]),o.status){case"error":return;case"success":return o.preview}}Kt(""),function(e){e.INVALID_URL="invalid-url",e.DYNAMIC_LINK="dynamic-link",e.WEB_VIEW="web-view",e.IN_APP_BROWSER="in-app-browser",e.URL_SCHEME="url-scheme",e.RELATIVE_URL="relative-url"}(li||(li={}));function ui({notification:t}){const n=qn(),i=Bt(),r=function(e){const t="https://play.google.com";for(const n of e)switch(n.type){case"re.notifica.content.GooglePlayDetails":{const e=new URL("/store/apps/details",t);return e.searchParams.set("id",n.data),e.toString()}case"re.notifica.content.GooglePlayDeveloper":{const e=new URL("/store/apps/dev",t);return e.searchParams.set("id",n.data),e.toString()}case"re.notifica.content.GooglePlayCollection":return new URL(`/store/apps/collection/${encodeURIComponent(n.data)}`,t).toString();case"re.notifica.content.GooglePlaySearch":{const e=new URL("/store/search",t);return e.searchParams.set("q",n.data),e.searchParams.set("c","apps"),e.toString()}}return null}(t.content);return e.jsxs("div",{"data-testid":"android-app-ui-app-recommendation-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:!1}),r?e.jsx(Bn,{url:r,platform:"Android",width:338,height:570}):e.jsx(sn,{message:i.formatMessage({id:"preview.error.noValidContentObject",defaultMessage:an["preview.error.noValidContentObject"]})})]})}Kt("");function fi({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"android-app-ui-passbook-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx(Bn,{url:`https://push.notifica.re/pass/web/${t.content[0].data.split("/")[5]}`,platform:"Android",width:338,height:570}),")"]})}Kt("");var hi,mi;function gi({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"android-app-ui-images-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx("div",{className:"notificare__push__android__image__app-ui__rich-content",children:e.jsx("div",{className:"notificare__push__android__image__app-ui__image-slider",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__push__android__image__app-ui__image-slider-item",src:t.data,alt:"Slider image"},n)))})})]})}Kt(".notificare .notificare__push__android__image__app-ui__rich-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: 570px;\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scrollbar-width: none; /* Hide in Firefox */\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider::-webkit-scrollbar {\n display: none; /* Hide in Chrome and Safari */\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}");var vi=kt(mi?hi:(mi=1,hi=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,r,a;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!==r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!==r--;)if(!Object.prototype.hasOwnProperty.call(n,a[r]))return!1;for(r=i;0!==r--;){var o=a[r];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}));function bi(){return bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},bi.apply(null,arguments)}function wi(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}function yi(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}const xi="NOT_LOADED",ki="LOADING",Ei="LOADED",ji="FAILED",Ni="AUTH_FAILURE";class Si{static async load(e,t){var n;const i=e.libraries?e.libraries.split(","):[],r=this.serializeParams(e);this.listeners.push(t),null!=(n=window.google)&&null!=(n=n.maps)&&n.importLibrary?(this.serializedApiParams||(this.loadingStatus=Ei),this.notifyLoadingStatusListeners()):(this.serializedApiParams=r,this.initImportLibrary(e)),this.serializedApiParams&&this.serializedApiParams!==r&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const a=["maps",...i];await Promise.all(a.map((e=>google.maps.importLibrary(e))))}static serializeParams(e){return[e.v,e.key,e.language,e.region,e.authReferrerPolicy,e.solutionChannel].join("/")}static initImportLibrary(e){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary)return void console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");let t=null;const n=()=>t||(t=new Promise(((t,n)=>{var i;const r=document.createElement("script"),a=new URLSearchParams;for(const[t,n]of Object.entries(e)){const e=t.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase()));a.set(e,String(n))}a.set("loading","async"),a.set("callback","__googleMapsCallback__"),r.async=!0,r.src="https://maps.googleapis.com/maps/api/js?"+a.toString(),r.nonce=(null==(i=document.querySelector("script[nonce]"))?void 0:i.nonce)||"",r.onerror=()=>{this.loadingStatus=ji,this.notifyLoadingStatusListeners(),n(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=Ei,this.notifyLoadingStatusListeners(),t()},window.gm_authFailure=()=>{this.loadingStatus=Ni,this.notifyLoadingStatusListeners()},this.loadingStatus=ki,this.notifyLoadingStatusListeners(),document.head.append(r)})),t);google.maps.importLibrary=e=>n().then((()=>google.maps.importLibrary(e)))}static notifyLoadingStatusListeners(){for(const e of this.listeners)e(this.loadingStatus)}}Si.loadingStatus=xi,Si.serializedApiParams=void 0,Si.listeners=[];const Ci=["onLoad","onError","apiKey","version","libraries"],Ti=["children"],Ai=t.createContext(null);const Pi=e=>{const{children:n}=e,i=wi(e,Ti),{mapInstances:r,addMapInstance:a,removeMapInstance:o,clearMapInstances:s}=function(){const[e,n]=t.useState({});return{mapInstances:e,addMapInstance:(e,t="default")=>{n((n=>bi({},n,{[t]:e})))},removeMapInstance:(e="default")=>{n((t=>wi(t,[e].map(yi))))},clearMapInstances:()=>{n({})}}}(),{status:c,loadedLibraries:l,importLibrary:p}=function(e){const{onLoad:n,onError:i,apiKey:r,version:a,libraries:o=[]}=e,s=wi(e,Ci),[c,l]=t.useState(Si.loadingStatus),[p,d]=t.useReducer(((e,t)=>e[t.name]?e:bi({},e,{[t.name]:t.value})),{}),_=t.useMemo((()=>null==o?void 0:o.join(",")),[o]),u=t.useMemo((()=>JSON.stringify(bi({apiKey:r,version:a},s))),[r,a,s]),f=t.useCallback((async e=>{var t;if(p[e])return p[e];if(null==(t=google)||null==(t=t.maps)||!t.importLibrary)throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const n=await window.google.maps.importLibrary(e);return d({name:e,value:n}),n}),[p]);return t.useEffect((()=>{(async()=>{try{const e=bi({key:r},s);a&&(e.v=a),(null==_?void 0:_.length)>0&&(e.libraries=_),(void 0===e.channel||e.channel<0||e.channel>999)&&delete e.channel,void 0===e.solutionChannel?e.solutionChannel="GMP_visgl_rgmlibrary_v1_default":""===e.solutionChannel&&delete e.solutionChannel,await Si.load(e,(e=>l(e)));for(const e of["core","maps",...o])await f(e);n&&n()}catch(e){i?i(e):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",e)}})()}),[r,_,u]),{status:c,loadedLibraries:p,importLibrary:f}}(i),d=t.useMemo((()=>({mapInstances:r,addMapInstance:a,removeMapInstance:o,clearMapInstances:s,status:c,loadedLibraries:l,importLibrary:p})),[r,a,o,s,c,l,p]);return t.createElement(Ai.Provider,{value:d},n)};function Mi(e,t,n){const i={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(Oi.includes(e)){const e=i,n=t.getCenter(),r=t.getZoom(),a=t.getHeading()||0,o=t.getTilt()||0,s=t.getBounds();return n&&s&&Number.isFinite(r)||console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),e.detail={center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:a,tilt:o,bounds:(null==s?void 0:s.toJSON())||{north:90,east:180,south:-90,west:-180}},e}if(Ii.includes(e)){var r;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const e=i;return e.domEvent=n.domEvent,e.stoppable=!0,e.stop=()=>n.stop(),e.detail={latLng:(null==(r=n.latLng)?void 0:r.toJSON())||null,placeId:n.placeId},e}return i}const Li={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},Oi=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Ii=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Ri=Object.keys(Li);const Ui=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Bi(e,n){const i={},r=Object.keys(n);for(const e of r)Ui.has(e)&&(i[e]=n[e]);!function(e,n){const i=t.useRef(void 0);i.current&&vi(n,i.current)||(i.current=n),t.useEffect(e,i.current)}((()=>{e&&e.setOptions(i)}),[i])}function Hi(){var e;return(null==(e=t.useContext(Ai))?void 0:e.status)||xi}function Fi(e){return function(e){return!(!e||"object"!=typeof e)&&"lat"in e&&"lng"in e&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)}(e)?e:e.toJSON()}const Di=()=>t.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"}},t.createElement("h2",null,"Error: AuthFailure"),t.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",t.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."));function zi(){return Hi()===Ei}function Gi(e){const n=function(){const[,e]=t.useReducer((e=>e+1),0);return e}(),i=t.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return t.useEffect((()=>{if(!e)return;const t=google.maps.event.addListener(e,"bounds_changed",(()=>{!function(e,t){const n=e.getCenter(),i=e.getZoom(),r=e.getHeading()||0,a=e.getTilt()||0,o=e.getBounds();n&&o&&Number.isFinite(i)||console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:i||0,heading:r,tilt:a})}(e,i),n()}));return()=>t.remove()}),[e,n]),i}const Zi=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],Vi=["padding"];class $i{static has(e){return this.entries[e]&&this.entries[e].length>0}static pop(e){return this.entries[e]&&this.entries[e].pop()||null}static push(e,t){this.entries[e]||(this.entries[e]=[]),this.entries[e].push(t)}}function Wi(e,n){const i=zi(),[r,a]=t.useState(null),[o,s]=function(){const[e,n]=t.useState(null);return[e,t.useCallback((e=>n(e)),[n])]}(),c=Gi(r),{id:l,defaultBounds:p,defaultCenter:d,defaultZoom:_,defaultHeading:u,defaultTilt:f,reuseMaps:h,renderingType:m,colorScheme:g}=e,v=wi(e,Zi),b=void 0!==e.zoom||void 0!==e.defaultZoom,w=void 0!==e.center||void 0!==e.defaultCenter;p||b&&w||console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!v.center&&d&&(v.center=d),!v.zoom&&Number.isFinite(_)&&(v.zoom=_),!v.heading&&Number.isFinite(u)&&(v.heading=u),!v.tilt&&Number.isFinite(f)&&(v.tilt=f);for(const e of Object.keys(v))void 0===v[e]&&delete v[e];const y=t.useRef(void 0);return t.useEffect((()=>{if(!o||!i)return;const{addMapInstance:t,removeMapInstance:r}=n,{mapId:s}=e,d=`${s||"default"}:${m||"default"}:${g||"LIGHT"}`;let _,u;if(h&&$i.has(d)?(u=$i.pop(d),_=u.getDiv(),o.appendChild(_),u.setOptions(v),setTimeout((()=>u.setCenter(u.getCenter())),0)):(_=document.createElement("div"),_.style.height="100%",o.appendChild(_),u=new google.maps.Map(_,bi({},v,m?{renderingType:m}:{},g?{colorScheme:g}:{}))),a(u),t(u,l),p){const{padding:e}=p,t=wi(p,Vi);u.fitBounds(t,e)}else b&&w||u.fitBounds({east:180,west:-180,south:-90,north:90});if(y.current){const{mapId:e,cameraState:t}=y.current;e!==s&&u.setOptions(t)}return()=>{y.current={mapId:s,cameraState:c.current},_.remove(),h?$i.push(d,u):google.maps.event.clearInstanceListeners(u),a(null),r(l)}}),[o,i,l,e.mapId,e.renderingType,e.colorScheme]),[r,s,c]}$i.entries={};const Ki=t.createContext(null),qi=e=>{const{children:n,id:i,className:r,style:a}=e,o=t.useContext(Ai),s=Hi();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[c,l,p]=Wi(e,o);!function(e,n,i){const r=i.center?Fi(i.center):null;let a=null,o=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(a=r.lat,o=r.lng);const s=Number.isFinite(i.zoom)?i.zoom:null,c=Number.isFinite(i.heading)?i.heading:null,l=Number.isFinite(i.tilt)?i.tilt:null;t.useLayoutEffect((()=>{if(!e)return;const t={};let i=!1;null===a||null===o||n.current.center.lat===a&&n.current.center.lng===o||(t.center={lat:a,lng:o},i=!0),null!==s&&n.current.zoom!==s&&(t.zoom=s,i=!0),null!==c&&n.current.heading!==c&&(t.heading=c,i=!0),null!==l&&n.current.tilt!==l&&(t.tilt=l,i=!0),i&&e.moveCamera(t)}))}(c,p,e),function(e,n){for(const i of Ri){const r=n[i],a=Li[i];t.useEffect((()=>{if(!e)return;if(!r)return;const t=google.maps.event.addListener(e,a,(t=>{r(Mi(a,e,t))}));return()=>t.remove()}),[e,a,r])}}(c,e),Bi(c,e);const d=function(e,n){const{viewport:i,viewState:r}=n,a=!!i;return t.useLayoutEffect((()=>{if(!e||!r)return;const{latitude:t,longitude:n,bearing:i,pitch:a,zoom:o}=r;e.moveCamera({center:{lat:t,lng:n},heading:i,tilt:a,zoom:o+1})}),[e,r]),a}(c,e),_=!!e.controlled;t.useEffect((()=>{if(c)return d&&c.setOptions({disableDefaultUI:!0}),(d||_)&&c.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{c.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}}),[c,d,_,e.gestureHandling,e.keyboardShortcuts]);const u=e.center?Fi(e.center):null;let f=null,h=null;u&&Number.isFinite(u.lat)&&Number.isFinite(u.lng)&&(f=u.lat,h=u.lng);const m=t.useMemo((()=>{var t,n,i,r,a;return{center:{lat:null!=(t=f)?t:0,lng:null!=(n=h)?n:0},zoom:null!=(i=e.zoom)?i:0,heading:null!=(r=e.heading)?r:0,tilt:null!=(a=e.tilt)?a:0}}),[f,h,e.zoom,e.heading,e.tilt]);t.useLayoutEffect((()=>{if(!c||!_)return;c.moveCamera(m);const e=c.addListener("bounds_changed",(()=>{c.moveCamera(m)}));return()=>e.remove()}),[c,_,m]);const g=t.useMemo((()=>bi({width:"100%",height:"100%",position:"relative",zIndex:d?-1:0},a)),[a,d]),v=t.useMemo((()=>({map:c})),[c]);return s===Ni?t.createElement("div",{style:bi({position:"relative"},r?{}:g),className:r},t.createElement(Di,null)):t.createElement("div",bi({ref:l,"data-testid":"map",style:r?void 0:g,className:r},i?{id:i}:{}),c?t.createElement(Ki.Provider,{value:v},n):null)};qi.deckGLViewProps=!0;const Xi=new Set;const Yi=(e=null)=>{const n=t.useContext(Ai),{map:i}=t.useContext(Ki)||{};if(null===n)return function(...e){const t=JSON.stringify(e);Xi.has(t)||(Xi.add(t),console.error(...e))}("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=n;return null!==e?r[e]||null:i||(r.default||null)};function Ji(e,n,i){t.useEffect((()=>{if(!e||!n||!i)return;const t=google.maps.event.addListener(e,n,i);return()=>t.remove()}),[e,n,i])}function Qi(e,n,i){t.useEffect((()=>{e&&(e[n]=i)}),[e,n,i])}function er(e,n,i){t.useEffect((()=>{if(e&&n&&i)return e.addEventListener(n,i),()=>e.removeEventListener(n,i)}),[e,n,i])}const tr=t.createContext(null),nr={BOTTOM:["50%","100%"]},ir=({children:e,styles:n,className:i,anchorPoint:r})=>{const[a,o]=null!=r?r:nr.BOTTOM;let s=`-${a}`,c=`-${o}`;a.trimStart().startsWith("-")&&(s=a.substring(1)),o.trimStart().startsWith("-")&&(c=o.substring(1));const l=`translate(50%, 100%) translate(${s}, ${c})`;return t.createElement("div",{style:{transform:l}},t.createElement("div",{className:i,style:n},e))};function rr(e){const[n,i]=t.useState(null),[r,a]=t.useState(null),o=Yi(),s=function(e){const n=zi(),i=t.useContext(Ai);return t.useEffect((()=>{n&&i&&i.importLibrary(e)}),[n,i,e]),(null==i?void 0:i.loadedLibraries[e])||null}("marker"),{children:c,onClick:l,className:p,onMouseEnter:d,onMouseLeave:_,onDrag:u,onDragStart:f,onDragEnd:h,collisionBehavior:m,clickable:g,draggable:v,position:b,title:w,zIndex:y}=e,x=t.Children.count(c);return t.useEffect((()=>{if(!o||!s)return;const e=new s.AdvancedMarkerElement;e.map=o,i(e);let t=null;return x>0&&(t=document.createElement("div"),t.isCustomMarker=!0,e.content=t,a(t)),()=>{var n;e.map=null,null==(n=t)||n.remove(),i(null),a(null)}}),[o,s,x]),t.useEffect((()=>{!n||!n.content||x>0||(n.content.className=p||"")}),[n,p,x]),Qi(n,"position",b),Qi(n,"title",null!=w?w:""),Qi(n,"zIndex",y),Qi(n,"collisionBehavior",m),t.useEffect((()=>{n&&(n.gmpDraggable=void 0!==v?v:!!(u||f||h))}),[n,v,u,h,f]),t.useEffect((()=>{if(!n)return;const e=void 0!==g||Boolean(l)||Boolean(d)||Boolean(_);n.gmpClickable=e,e&&null!=n&&n.content&&n.content.nodeType===Node.ELEMENT_NODE&&(n.content.style.pointerEvents="none",n.content.firstElementChild&&(n.content.firstElementChild.style.pointerEvents="all"))}),[n,g,l,d,_]),Ji(n,"click",l),Ji(n,"drag",u),Ji(n,"dragstart",f),Ji(n,"dragend",h),er(null==n?void 0:n.element,"mouseenter",d),er(null==n?void 0:n.element,"mouseleave",_),[n,r]}t.forwardRef(((e,i)=>{const{children:r,style:a,className:o,anchorPoint:s}=e,[c,l]=rr(e),p=t.useMemo((()=>c?{marker:c}:null),[c]);return t.useImperativeHandle(i,(()=>c),[c]),l?t.createElement(tr.Provider,{value:p},n.createPortal(t.createElement(ir,{anchorPoint:s,styles:a,className:o},r),l)):null}));const ar=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];const or=t.forwardRef(((e,n)=>{const i=function(e){const[n,i]=t.useState(null),r=Yi(),{onClick:a,onDrag:o,onDragStart:s,onDragEnd:c,onMouseOver:l,onMouseOut:p}=e,d=wi(e,ar),{position:_,draggable:u}=d;return t.useEffect((()=>{if(!r)return void(void 0===r&&console.error("<Marker> has to be inside a Map component."));const e=new google.maps.Marker(d);return e.setMap(r),i(e),()=>{e.setMap(null),i(null)}}),[r]),t.useEffect((()=>{if(!n)return;const e=n,t=google.maps.event;return a&&t.addListener(e,"click",a),o&&t.addListener(e,"drag",o),s&&t.addListener(e,"dragstart",s),c&&t.addListener(e,"dragend",c),l&&t.addListener(e,"mouseover",l),p&&t.addListener(e,"mouseout",p),n.setDraggable(Boolean(u)),()=>{t.clearInstanceListeners(e)}}),[n,u,a,o,s,c,l,p]),t.useEffect((()=>{n&&d&&n.setOptions(d)}),[n,d]),t.useEffect((()=>{!u&&_&&n&&n.setPosition(_)}),[u,_,n]),n}(e);return t.useImperativeHandle(n,(()=>i),[i]),t.createElement(t.Fragment,null)}));function sr({notification:n,width:i,height:r}){const{googleMapsAPIKey:a}=Pn(),[o,s]=t.useState(!1),c=t.useMemo((()=>function(e){const t=[];return e.content.forEach((e=>{t.push({title:e.data.title,latitude:e.data.latitude,longitude:e.data.longitude})})),t}(n).map(((e,t)=>({id:t,lat:e.latitude,lng:e.longitude,title:e.title})))),[n.content]),l=t.useMemo((()=>c.length>0?{lat:c[0].lat,lng:c[0].lng}:{lat:0,lng:0}),[c]);return t.useEffect((()=>{s(!0)}),[]),0!==c.length&&o?e.jsx("div",{"data-testid":"map-notification",children:e.jsx(Pi,{apiKey:a||"",children:e.jsx(cr,{markers:c,center:l,width:i,height:r})})}):e.jsx(tn,{})}function cr({markers:t,center:n,width:i,height:r}){const a=Hi(),o=Bt();return e.jsxs("div",{style:{width:i,height:r,backgroundColor:"white",position:"relative",overflow:"hidden"},children:[a===ki&&e.jsx(tn,{}),a===Ni&&e.jsx(sn,{message:o.formatMessage({id:"preview.error.googleMapsAuthFailure",defaultMessage:an["preview.error.googleMapsAuthFailure"]})}),a===ji&&e.jsx(sn,{message:o.formatMessage({id:"preview.error.googleMapsLoadFailure",defaultMessage:an["preview.error.googleMapsLoadFailure"]})}),a===Ei&&e.jsx(qi,{style:{width:i,height:r},defaultCenter:n,defaultZoom:10,gestureHandling:"greedy",disableDefaultUI:!0,children:t.map((t=>e.jsx(or,{position:{lat:t.lat,lng:t.lng},title:t.title},t.id)))})]})}Kt("");function lr({notification:n,onError:i}){const r=qn(),{googleMapsAPIKey:a}=Pn(),o=Bt();if(t.useEffect((function(){a||i(o.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[a,i,o]),a)return e.jsxs("div",{"data-testid":"android-app-ui-map-notification",children:[e.jsx(ci,{title:r.name,showOptions:Yn(n)}),e.jsx(sr,{notification:n,width:"100%",height:"570px"})]})}Kt("");var pr;function dr({notification:t}){const n=qn(),i=new URL("/store/apps/details","https://play.google.com");return i.searchParams.set("id",n.androidPackageName||""),e.jsxs("div",{"data-testid":"android-app-ui-rate-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:!1}),e.jsx(Bn,{url:i.toString(),platform:"Android",width:338,height:570})]})}function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_r.apply(null,arguments)}Kt("");var ur=function(e){return r.createElement("svg",_r({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid slice",viewBox:"1757.501 1648.178 806.546 806.694"},e),pr||(pr=r.createElement("rect",{width:"100%",height:"100%",fill:"transparent"})),r.createElement("path",{d:"M-33.085-33.085h66.17v66.17h-66.17z",style:{fill:"#232c2a",strokeWidth:1},transform:"translate(2160.42 2051.46)scale(12.2)"}),r.createElement("circle",{r:35,style:{fill:"#232c2a",stroke:"#444",strokeWidth:1},transform:"matrix(7.2 0 0 7.2 2160.42 2051.79)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"rotate(-135 1505.372 579.04)scale(15.19 -.07)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(10.71 -10.71 -.05 -.05 2160.62 2052.92)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(10.69 0 0 -.07 2160.36 2053.16)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(0 -10.69 -.07 0 1896.9 2052.81)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(0 -10.69 -.07 0 2423.68 2053.49)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(-10.69 0 0 .07 2160.38 1790.29)"}),r.createElement("path",{d:"M-17.46-19.415h34.92v38.83h-34.92z",style:{fill:"#444",stroke:"#444",strokeWidth:40},transform:"matrix(-10.68 0 0 .07 2160.42 2313.82)"}))};function fr({notification:t}){var n;const i=qn();return e.jsx("div",{className:"notificare__push__android__alert__app-ui","data-testid":"android-app-ui-text-alert-notification",children:e.jsxs("div",{className:"notificare__push__android__alert__app-ui__wrapper",children:[e.jsxs("div",{className:"notificare__push__android__alert__app-ui__header",children:[e.jsx("div",{className:"notificare__push__android__alert__app-ui__app-icon",children:i.icon?e.jsx("img",{className:"notificare__push__android__alert__app-ui__app-icon-image",alt:"App icon",src:i.icon}):e.jsx(ur,{className:"notificare__push__android__alert__app-ui__default-app-icon"})}),e.jsx("p",{className:"notificare__push__android__alert__app-ui__title",children:t.title||i.name})]}),e.jsx("p",{className:"notificare__push__android__alert__app-ui__message",children:t.message}),Yn(t)&&e.jsxs("div",{className:"notificare__push__android__alert__app-ui__actions",children:[null===(n=t.actions)||void 0===n?void 0:n.map(((t,n)=>e.jsx("p",{className:"notificare__push__android__alert__app-ui__action-label","data-testid":`android-app-ui-text-alert-notification-action-${n.toString()}`,children:t.label},n))),e.jsx("p",{className:"notificare__push__android__alert__app-ui__cancel-label",children:e.jsx(Vt,{id:"preview.android.alert.appUi.cancel",defaultMessage:an["preview.android.alert.appUi.cancel"]})},"cancel-button-label")]})]})})}Kt(".notificare .notificare__push__android__alert__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__android__alert__app-ui__wrapper {\n position: relative;\n background-color: #fff;\n width: 290px;\n border-radius: 2px;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n/* Header - App Icon and Title */\n\n.notificare .notificare__push__android__alert__app-ui__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: 32px;\n height: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__alert__app-ui__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__android__alert__app-ui__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n.notificare .notificare__push__android__alert__app-ui__header {\n display: flex;\n align-items: center;\n column-gap: 10px;\n padding: 20px 20px 0;\n}\n\n.notificare .notificare__push__android__alert__app-ui__title {\n font-weight: 700;\n font-size: 18px;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 208px;\n}\n\n/* Message */\n\n.notificare .notificare__push__android__alert__app-ui__message {\n font-size: 16px;\n margin-top: 20px;\n margin-bottom: 0;\n word-break: break-all;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 8;\n padding: 0 20px 20px;\n}\n\n/* Actions */\n\n.notificare .notificare__push__android__alert__app-ui__actions {\n border-top: 1px solid #f2f4f6;\n}\n\n.notificare .notificare__push__android__alert__app-ui__action-label {\n font-size: 14px;\n font-weight: 600;\n padding: 15px 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__alert__app-ui__cancel-label {\n font-size: 14px;\n font-weight: 600;\n color: #64706e;\n padding: 15px 20px 20px;\n}");function hr({videoData:t,width:n,height:i}){const r=()=>{switch(t.type){case"re.notifica.content.YouTube":return`https://www.youtube.com/embed/${t.data}`;case"re.notifica.content.Vimeo":return`https://player.vimeo.com/video/${t.data}`;case"re.notifica.content.HTML5Video":return t.data;default:return""}};return"re.notifica.content.YouTube"===t.type||"re.notifica.content.Vimeo"===t.type?e.jsx("iframe",{className:"notificare__push__video-rich-content",src:r(),sandbox:"allow-scripts allow-same-origin",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",width:n,height:i}):e.jsx("video",{className:"notificare__push__video-rich-content",width:n,height:i,autoPlay:!0,controls:!0,children:e.jsx("source",{src:r(),type:"video/mp4"})})}Kt(".notificare .notificare__push__video-rich-content {\n border: 0;\n background-color: #fff;\n}");function mr({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"android-app-ui-video-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx(hr,{videoData:t.content[0],width:"100%",height:"570px"})]})}Kt("");function gr({notification:t}){const n=qn(),i=t.content[0].data;return e.jsxs("div",{"data-testid":"android-app-ui-web-view-notification",children:[e.jsx(ci,{title:t.title||n.name,showOptions:Yn(t)&&!ti(i)}),e.jsx("iframe",{className:"notificare__push__android__web-view__app-ui__content",srcDoc:i,sandbox:"allow-same-origin"})]})}Kt(".notificare .notificare__push__android__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 570px;\n background-color: #fff;\n pointer-events: none;\n}");function vr({notification:t,expanded:n}){var i,r;const a=qn();return e.jsxs("div",{className:"notificare__push__android__lock-screen","data-testid":"android-lock-screen-notification",children:[e.jsx("div",{className:"notificare__push__android__lock-screen__app-icon",children:a.icon?e.jsx("img",{className:"notificare__push__android__lock-screen__app-icon-image",alt:"App icon",src:a.icon}):e.jsx(ur,{className:"notificare__push__android__lock-screen__default-app-icon"})}),e.jsxs("div",{className:"notificare__push__android__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__android__lock-screen__text-content-top "+(ei(t)&&!n?"notificare__push__android__lock-screen__text-content-top--has-media":""),children:[e.jsxs("div",{className:"notificare__push__android__lock-screen__title-and-subtitle",children:[e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--title",children:n?a.name:t.title||a.name}),t.subtitle&&!ei(t)&&e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--subtitle",children:t.subtitle})]}),e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--time",children:e.jsx(Vt,{id:"preview.android.lockscreen.time",defaultMessage:an["preview.android.lockscreen.time"]})})]}),n&&e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--expanded-title",children:t.title}),e.jsx("p",{className:`notificare__push__android__lock-screen__text ${n?"notificare__push__android__lock-screen__text--expanded-message":""} ${ei(t)&&!n?"notificare__push__android__lock-screen__text--message-with-media":"notificare__push__android__lock-screen__text--message-without-media"}`,children:t.message}),ei(t)&&n&&e.jsx("img",{className:"notificare__push__android__lock-screen__expanded-media",src:null===(i=t.attachments)||void 0===i?void 0:i[0].uri,alt:"Expanded media","data-testid":"android-lock-screen-notification-expanded-media"})]}),ei(t)&&!n&&e.jsx("img",{className:"notificare__push__android__lock-screen__media",src:null===(r=t.attachments)||void 0===r?void 0:r[0].uri,alt:"Media icon","data-testid":"android-lock-screen-notification-media"})]})}Kt(".notificare .notificare__push__android__lock-screen {\n position: absolute;\n font-family: 'Roboto', sans-serif;\n background-color: #f2f4f6;\n width: 315px;\n border-radius: 20px;\n padding: 10px;\n display: flex;\n flex-direction: row;\n column-gap: 11px;\n left: 50%;\n transform: translateX(-50%);\n top: 40px;\n}\n\n.notificare .notificare__push__android__lock-screen__wrapper {\n position: relative;\n}\n\n/* App Icon */\n\n.notificare .notificare__push__android__lock-screen__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: 32px;\n height: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__lock-screen__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__android__lock-screen__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n/* Text Content */\n\n.notificare .notificare__push__android__lock-screen__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n}\n\n.notificare .notificare__push__android__lock-screen__text-content-top {\n display: flex;\n column-gap: 5px;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text-content-top--has-media {\n max-width: 191px;\n}\n\n.notificare .notificare__push__android__lock-screen__title-and-subtitle {\n display: flex;\n overflow: hidden;\n column-gap: 6px;\n}\n\n.notificare .notificare__push__android__lock-screen__text {\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push__android__lock-screen__text--title {\n font-weight: 700;\n font-size: 14px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--expanded-title {\n font-weight: 700;\n font-size: 14px;\n margin-top: 5px;\n width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--subtitle {\n color: #64706e;\n font-size: 12px;\n font-weight: 400;\n}\n\n.notificare .notificare__push__android__lock-screen__text--time {\n color: #64706e;\n font-size: 12px;\n font-weight: 400;\n flex-shrink: 0;\n max-width: 135px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--message-without-media {\n font-size: 14px;\n width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--message-with-media {\n font-size: 14px;\n width: 191px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--expanded-message {\n font-size: 14px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n word-break: break-word;\n width: 252px;\n white-space: wrap;\n}\n\n/* Media */\n\n.notificare .notificare__push__android__lock-screen__media {\n width: 50px;\n border-radius: 5px;\n object-fit: cover;\n}\n\n.notificare .notificare__push__android__lock-screen__expanded-media {\n width: 252px;\n max-height: 168px;\n border-radius: 15px;\n margin-top: 5px;\n}\n");function br({notification:n,previewState:i,onError:r}){const a=Bt(),o=(()=>{switch(i.displayMode){case"lockscreen":case"lockscreen-expanded":return{preview:e.jsx(vr,{notification:n,expanded:"lockscreen-expanded"===i.displayMode}),theme:"light"};case"app-ui":switch(n.type){case"re.notifica.notification.Alert":return{preview:e.jsx(fr,{notification:n}),theme:"dark"};case"re.notifica.notification.WebView":return{preview:e.jsx(gr,{notification:n}),theme:"light"};case"re.notifica.notification.URL":return{preview:e.jsx(pi,{notification:n}),theme:"light"};case"re.notifica.notification.InAppBrowser":return{preview:e.jsx($n,{notification:n}),theme:"light"};case"re.notifica.notification.Image":return{preview:e.jsx(gi,{notification:n}),theme:"light"};case"re.notifica.notification.Map":return{preview:e.jsx(lr,{notification:n,onError:r}),theme:"light"};case"re.notifica.notification.Rate":return{preview:e.jsx(dr,{notification:n}),theme:"light"};case"re.notifica.notification.Passbook":return{preview:e.jsx(fi,{notification:n}),theme:"light"};case"re.notifica.notification.Video":return{preview:e.jsx(mr,{notification:n}),theme:"light"};case"re.notifica.notification.Store":return{preview:e.jsx(ui,{notification:n}),theme:"light"};case"re.notifica.notification.URLResolver":return{preview:e.jsx(_i,{notification:n,onError:r}),theme:"light"};case"re.notifica.notification.None":case"re.notifica.notification.URLScheme":return}}})();if(t.useEffect((function(){o||r(a.formatMessage({id:"preview.error.notSupportedNotificationTypePreviewVariant",defaultMessage:an["preview.error.notSupportedNotificationTypePreviewVariant"]},{notificationType:n.type}))}),[o,n,r,a]),o)return e.jsx(qt,{theme:o.theme,children:e.jsx("div",{className:"notificare__push__android__preview",children:o.preview})})}Kt(".notificare .notificare__push__android__preview {\n font-family: 'Roboto', sans-serif;\n height: 100%;\n}");function wr(t){const{url:n}=t;return e.jsxs("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar",children:[e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-done-button",children:e.jsx(Vt,{id:"preview.ios.inAppBrowser.appUi.done",defaultMessage:an["preview.ios.inAppBrowser.appUi.done"]})}),e.jsxs("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar-domain",children:[On(n)?e.jsx(Dn,{className:"notificare__push__ios__in-app-browser__app-ui__bar-lock-icon"}):e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-not-secure",children:e.jsx(Vt,{id:"preview.ios.inAppBrowser.appUi.notSecure",defaultMessage:an["preview.ios.inAppBrowser.appUi.notSecure"]})}),e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-url",children:In(n)})]})]})}Kt(".notificare .notificare__push__ios__in-app-browser__app-ui__bar {\n display: flex;\n width: 100%;\n padding: 12px 0;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n margin-top: 10px;\n background-color: #fff;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-done-button {\n font-size: 14px;\n font-weight: 700;\n position: absolute;\n left: 0;\n margin-left: 15px;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-lock-icon {\n height: 14px;\n width: auto;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-domain {\n display: flex;\n column-gap: 5px;\n font-size: 14px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-not-secure {\n color: #64706e;\n font-weight: 400;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-url {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}");function yr({notification:t}){const n=t.content[0].data;return e.jsxs("div",{"data-testid":"ios-app-ui-in-app-browser-notification",children:[e.jsx(wr,{url:n}),e.jsx(Bn,{url:n,platform:"iOS",width:338,height:564})]})}Kt("");function xr({title:t,showOptions:n}){return e.jsxs("div",{className:"notificare__push__ios__app-ui__title-bar",children:[e.jsx("div",{className:"notificare__push__ios__app-ui__title-bar-text",children:t}),n&&e.jsx(si,{className:"notificare__push__ios__app-ui__title-bar-options-button","data-testid":"ios-app-ui-title-bar-options-button"})]})}Kt(".notificare .notificare__push__ios__app-ui__title-bar {\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n background-color: #fff;\n margin-top: 10px;\n position: relative;\n}\n\n.notificare .notificare__push__ios__app-ui__title-bar-text {\n padding: 11px 25px;\n font-size: 14px;\n font-weight: 700;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n max-width: 255px;\n position: relative;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.notificare .notificare__push__ios__app-ui__title-bar-options-button {\n width: 20px;\n margin-left: auto;\n margin-right: 12px;\n}");var kr;function Er({notification:n}){const i=n.content[0].data,r=qn(),[a,o]=t.useState(""),{serviceKey:s}=Pn();return t.useEffect((function(){Xn(s,i).then(o).catch((e=>{Ln(e,"Error fetching website markup:")}))}),[i,s]),e.jsxs("div",{"data-testid":"ios-app-ui-url-notification",children:[e.jsx(xr,{title:n.title||r.name,showOptions:Yn(n)&&!ti(a)}),e.jsx(Bn,{url:i,platform:"iOS",width:338,height:566})]})}function jr({notification:n,onError:i}){const r=Bt(),a=di(n.content[0].data),o=(()=>{switch(a){case li.INVALID_URL:return{status:"error",errorCode:"preview.error.urlResolverInvalidUrl"};case li.URL_SCHEME:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithUrlSchemePreview"};case li.DYNAMIC_LINK:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithDynamicLink"};case li.RELATIVE_URL:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithRelativeUrl"};case li.WEB_VIEW:return{status:"success",preview:e.jsx(Er,{notification:n})};case li.IN_APP_BROWSER:return{status:"success",preview:e.jsx(yr,{notification:n})}}})();switch(t.useEffect((function(){"error"===o.status&&i(r.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,i,r]),o.status){case"error":return;case"success":return o.preview}}function Nr(){return Nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Nr.apply(null,arguments)}Kt("");var Sr,Cr=function(e){return r.createElement("svg",Nr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),kr||(kr=r.createElement("path",{d:"M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8zm212.4 204.4 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2a88.1 88.1 0 0 0 73.8 0zm-152 198.2 152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0l-218.6-101c-8.5-4-13.9-12.5-13.9-21.8s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2a88.1 88.1 0 0 0 73.8 0"})))};function Tr(){return Tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Tr.apply(null,arguments)}var Ar,Pr=function(e){return r.createElement("svg",Tr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em"},e),Sr||(Sr=r.createElement("path",{d:"M399 384.2c-22.1-38.4-63.6-64.2-111-64.2h-64c-47.4 0-88.9 25.8-111 64.2 35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8M0 256a256 256 0 1 1 512 0 256 256 0 1 1-512 0m256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144"})))};function Mr(e){const{contentList:n}=hn(e,500),i=Bt(),[r,a]=t.useState({status:"idle"});return t.useEffect((function(){const e=function(e){for(const t of e)if("re.notifica.content.AppStore"===t.type)return t.data.identifier;return null}(n);e?(a({status:"loading"}),function(e){return l(this,void 0,void 0,(function*(){const t=new URL("/lookup","https://itunes.apple.com");t.searchParams.set("country","NL"),t.searchParams.set("id",e);const n=(Date.now()/1e3).toString();return t.searchParams.set("x",n),yield dn(t)}))}(e).then((e=>{0!==e.resultCount?a({status:"success",data:e.results[0]}):a({status:"error",error:new Error(i.formatMessage({id:"preview.error.iosStoreAppNotFound",defaultMessage:an["preview.error.iosStoreAppNotFound"]}))})})).catch((e=>{Ln(e,"Error fetching App Store app info:"),a({status:"error",error:new Error(i.formatMessage({id:"preview.error.iosStoreAppLoadFailure",defaultMessage:an["preview.error.iosStoreAppLoadFailure"]}))})}))):a({status:"error",error:new Error(i.formatMessage({id:"preview.error.noValidContentObject",defaultMessage:an["preview.error.noValidContentObject"]}))})}),[n,i]),r}function Lr(e,t){var n;const i=new Intl.RelativeTimeFormat(t,{style:"long"}),r=new Date(e),a=new Date,o=Math.floor((a.getTime()-r.getTime())/1e3),s=[{value:60,unit:"second"},{value:3600,unit:"minute"},{value:86400,unit:"hour"},{value:604800,unit:"day"},{value:2592e3,unit:"week"},{value:31536e3,unit:"month"}];for(let e=0;e<s.length;e++){const{value:t,unit:r}=s[e];if(o<t){const t=Math.floor(o/((null===(n=s[e-1])||void 0===n?void 0:n.value)||1));return i.format(-t,r)}}const c=Math.floor(o/s[s.length-1].value);return i.format(-c,"year")}function Or(){return Or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Or.apply(null,arguments)}var Ir,Rr,Ur=function(e){return r.createElement("svg",Or({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),Ar||(Ar=r.createElement("path",{d:"M316.9 18c-5.3-11-16.5-18-28.8-18s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329l-24.6 145.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329l104.2-103.1c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7l-143.7-21.2z"})))};function Br(){return Br=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Br.apply(null,arguments)}var Hr=function(e){return r.createElement("svg",Br({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),Ir||(Ir=r.createElement("defs",null,r.createElement("linearGradient",{id:"half-star_svg__a"},r.createElement("stop",{offset:"50%"}),r.createElement("stop",{offset:"50%",stopColor:"#ccc"})))),Rr||(Rr=r.createElement("path",{fill:"url(#half-star_svg__a)",d:"M316.9 18c-5.3-11-16.5-18-28.8-18s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329l-24.6 145.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329l104.2-103.1c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7l-143.7-21.2z"})))};function Fr(t){const{rating:n}=t,i=[];for(let t=1;t<=5;t++)t<=n?i.push(e.jsx(Ur,{className:"notificare__push__ios__store__app-ui__star-icon"},t)):t-.5<=n?i.push(e.jsx(Hr,{className:"notificare__push__ios__store__app-ui__star-icon"},t)):i.push(e.jsx(Ur,{className:"notificare__push__ios__store__app-ui__star-icon notificare__push__ios__store__app-ui__star-icon--empty"},t));return e.jsx("div",{className:"notificare__push__ios__store__app-ui__star-rating",children:i})}Kt(".notificare .notificare__push__ios__store__app-ui__star-rating {\n display: inline-flex;\n flex-grow: 0;\n position: relative;\n}\n\n.notificare .notificare__push__ios__store__app-ui__star-icon {\n width: 10px;\n height: 10px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__star-icon--empty {\n fill: #EAEAEA;\n}");function Dr({notification:t}){const n=t.content,i=Bt(),r=Mr({contentList:n});return e.jsxs("div",{"data-testid":"ios-app-ui-app-recommendation-notification",children:[e.jsx("div",{className:"notificare__push__ios__store__app-ui__bar",children:e.jsx(Vt,{id:"preview.ios.store.appUi.done",defaultMessage:an["preview.ios.store.appUi.done"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui",children:["loading"===r.status&&e.jsx(tn,{}),"error"===r.status&&e.jsx(sn,{message:r.error.message}),"success"===r.status&&e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page",children:[e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-header",children:[e.jsx("img",{src:r.data.artworkUrl512,className:"notificare__push__ios__store__app-ui__app-icon",alt:"App icon"}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-app-info",children:[e.jsxs("div",{children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-app-name",children:r.data.trackName}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-app-category",children:r.data.primaryGenreName})]}),e.jsx("div",{className:"notificare__push__ios__store__app-ui__page-install",children:e.jsx(Vt,{id:"preview.ios.store.appUi.install",defaultMessage:an["preview.ios.store.appUi.install"]})})]})]}),e.jsx("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info-wrapper",children:e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info",children:[e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.ratings",defaultMessage:an["preview.ios.store.appUi.ratings"],values:{userRatingCount:r.data.userRatingCount}})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:r.data.averageUserRating.toFixed(1)}),e.jsx(Fr,{rating:r.data.averageUserRating})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.age",defaultMessage:an["preview.ios.store.appUi.age"]})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:r.data.trackContentRating}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:e.jsx(Vt,{id:"preview.ios.store.appUi.yearsOld",defaultMessage:an["preview.ios.store.appUi.yearsOld"]})})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.category",defaultMessage:an["preview.ios.store.appUi.category"]})}),e.jsx(Cr,{className:"notificare__push__ios__store__app-ui__page-info-block-icon"}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:r.data.primaryGenreName})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.developer",defaultMessage:an["preview.ios.store.appUi.developer"]})}),e.jsx(Pr,{className:"notificare__push__ios__store__app-ui__page-info-block-icon"}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:r.data.sellerName})]})]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-history",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.whatsNew",defaultMessage:an["preview.ios.store.appUi.whatsNew"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-history-version-last-update",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-version",children:e.jsx(Vt,{id:"preview.ios.store.appUi.historyVersion",defaultMessage:an["preview.ios.store.appUi.historyVersion"],values:{version:r.data.version}})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-last-update",children:Lr(r.data.currentVersionReleaseDate,i.locale)})]}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-notes",children:r.data.releaseNotes})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-previews",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-previews-title",children:e.jsx(Vt,{id:"preview.ios.store.appUi.screenshots",defaultMessage:an["preview.ios.store.appUi.screenshots"]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-previews-images",children:[e.jsx("img",{src:r.data.screenshotUrls[0],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"}),e.jsx("img",{src:r.data.screenshotUrls[1],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"})]})]})]})]})]})}Kt("/* Top Bar */\n\n.notificare .notificare__push__ios__store__app-ui__bar {\n display: flex;\n width: 100%;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n font-size: 14px;\n font-weight: 700;\n padding: 11px 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n background-color: #fff;\n margin-top: 10px;\n}\n\n/* --- App Recommendation Content --- */\n\n.notificare .notificare__push__ios__store__app-ui {\n height: 566px;\n background-color: #fff;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page {\n width: 100%;\n overflow: hidden;\n}\n\n/* Header */\n\n.notificare .notificare__push__ios__store__app-ui__page-header {\n width: 100%;\n padding: 15px;\n display: flex;\n column-gap: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__app-icon {\n width: 90px;\n height: 90px;\n border-radius: 15px;\n overflow: hidden;\n flex-shrink: 0;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-info {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-name {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-category {\n font-size: 12px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-install {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n padding: 7px 12px;\n background: #3b82f6;\n color: #fff;\n border-radius: 15px;\n width: max-content;\n}\n\n/* Other info */\n\n.notificare .notificare__push__ios__store__app-ui__page-other-app-info-wrapper {\n padding: 0 15px;\n width: calc(100% - 15px);\n overflow: hidden;\n position: relative;\n margin-bottom: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-other-app-info {\n display: flex;\n width: 1000px;\n border-bottom: 1px solid #f2f4f6;\n border-top: 1px solid #f2f4f6;\n position: relative;\n box-sizing: border-box;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block {\n padding: 5px;\n width: 85px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-title {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-value {\n font-size: 30px;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-icon {\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-bottom-text {\n font-size: 11px;\n text-align: center;\n}\n\n/* History */\n\n.notificare .notificare__push__ios__store__app-ui__page-history {\n margin: 0 15px;\n border-bottom: 1px solid #f2f4f6;\n padding-bottom: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-version-last-update {\n display: flex;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-version {\n font-size: 12px;\n color: #64706e;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-last-update {\n font-size: 11px;\n color: #64706e;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-notes {\n margin-top: 5px;\n font-size: 12px;\n max-height: 60px;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n padding-right: 5px;\n word-break: break-word;\n}\n\n/* Previews */\n\n.notificare .notificare__push__ios__store__app-ui__page-previews {\n margin-top: 15px;\n padding: 0 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-previews-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-previews-images {\n display: flex;\n max-height: 400px;\n overflow: hidden;\n column-gap: 8px;\n margin-top: 10px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-preview-image {\n border-radius: 15px;\n width: 150px;\n}");function zr({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-passbook-notification",children:[e.jsx(xr,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx(Bn,{url:`https://push.notifica.re/pass/web/${t.content[0].data.split("/")[5]}`,platform:"Web",width:338,height:566})]})}Kt("");function Gr({notification:t}){const n=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-images-notification",children:[e.jsx(xr,{title:t.title||n.name,showOptions:Yn(t)}),e.jsx("div",{className:"notificare__push__ios__image__app-ui__rich-content",children:e.jsx("div",{className:"notificare__push__ios__image__app-ui__slider",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__push__ios__image__app-ui__slider-item",src:t.data,alt:"Slider image"},n)))})})]})}Kt(".notificare .notificare__push__ios__image__app-ui__rich-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: 566px;\n background-color: white;\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scrollbar-width: none; /* Hide in Firefox */\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider::-webkit-scrollbar {\n display: none; /* Hide in Chrome and Safari */\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}");function Zr({notification:n,onError:i}){const r=qn(),{googleMapsAPIKey:a}=Pn(),o=Bt();if(t.useEffect((function(){a||i(o.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[a,i,o]),a)return e.jsxs("div",{"data-testid":"ios-app-ui-map-notification",children:[e.jsx(xr,{title:n.title||r.name,showOptions:Yn(n)}),e.jsx(sr,{notification:n,width:"100%",height:"566px"})]})}Kt("");function Vr({title:t}){const n=qn();return e.jsx("div",{className:"notificare__push__ios__rate__app-ui","data-testid":"ios-app-ui-rate-notification",children:e.jsxs("div",{className:"notificare__push__ios__rate__app-ui__wrapper",children:[e.jsx("p",{className:"notificare__push__ios__rate__app-ui__header",children:t||n.name}),e.jsx("div",{className:"notificare__push__ios__rate__app-ui__action",children:e.jsx(Vt,{id:"preview.ios.rate.appUi.rateNow",defaultMessage:an["preview.ios.rate.appUi.rateNow"]})}),e.jsx("div",{className:"notificare__push__ios__rate__app-ui__action",children:e.jsx(Vt,{id:"preview.ios.rate.appUi.doNotRate",defaultMessage:an["preview.ios.rate.appUi.doNotRate"]})})]})})}Kt(".notificare .notificare__push__ios__rate__app-ui {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__ios__rate__app-ui__wrapper {\n width: 300px;\n background: #fff;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid #f2f4f6;\n}\n\n/* Header */\n\n.notificare .notificare__push__ios__rate__app-ui__header {\n padding: 20px;\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n word-break: break-word;\n}\n\n/* Actions */\n\n.notificare .notificare__push__ios__rate__app-ui__action {\n padding: 10px 20px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-top: 1px solid #f2f4f6;\n font-size: 14px;\n font-weight: 700;\n}");function $r({notification:t}){var n,i;const r=qn();return e.jsx("div",{className:"notificare__push__ios__alert__app-ui","data-testid":"ios-app-ui-text-alert-notification",children:e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__background",children:[e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__title-and-message",children:[e.jsx("p",{className:"notificare__push__ios__alert__app-ui__title",children:t.title||r.name}),e.jsx("p",{className:"notificare__push__ios__alert__app-ui__message",children:t.message})]}),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__actions",children:Jn(t)?e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__actions-single",children:[e.jsx("div",{className:"notificare__push__ios__alert__app-ui__single-cancel",children:e.jsx(Vt,{id:"preview.ios.alert.appUi.cancel",defaultMessage:an["preview.ios.alert.appUi.cancel"]})}),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__action notificare__push__ios__alert__app-ui__action--single","data-testid":"ios-app-ui-text-alert-notification-single-action",children:null===(n=t.actions)||void 0===n?void 0:n[0].label})]}):Qn(t)?e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__actions-multiple",children:[null===(i=t.actions)||void 0===i?void 0:i.map(((t,n)=>e.jsx("div",{className:"notificare__push__ios__alert__app-ui__action notificare__push__ios__alert__app-ui__action--multiple","data-testid":`ios-app-ui-text-alert-notification-action-${n.toString()}`,children:t.label},n))),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__multiple-cancel",children:e.jsx(Vt,{id:"preview.ios.alert.appUi.cancel",defaultMessage:an["preview.ios.alert.appUi.cancel"]})})]}):e.jsx("div",{className:"notificare__push__ios__alert__app-ui__no-actions",children:e.jsx(Vt,{id:"preview.ios.alert.appUi.ok",defaultMessage:an["preview.ios.alert.appUi.ok"]})})})]})})}Kt(".notificare .notificare__push__ios__alert__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__background {\n width: 300px;\n background: #fff;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid #f2f4f6;\n}\n\n/* Header - Title and Message */\n\n.notificare .notificare__push__ios__alert__app-ui__title-and-message {\n padding: 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n word-break: break-word;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__title {\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__message {\n margin-top: 3px;\n font-size: 12px;\n font-weight: 500;\n text-align: center;\n}\n\n/* --- Actions --- */\n\n.notificare .notificare__push__ios__alert__app-ui__actions {\n font-size: 14px;\n font-weight: 700;\n border-top: 1px solid #f2f4f6;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action {\n padding: 10px 20px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Single Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__actions-single {\n display: flex;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__single-cancel {\n padding: 10px 20px;\n border-right: 1px solid #f2f4f6;\n width: 50%;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action--single {\n width: 50%;\n}\n\n/* Multiple Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__actions-multiple {\n display: flex;\n flex-direction: column;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__multiple-cancel {\n padding: 10px 20px;\n width: 100%;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action--multiple {\n width: 100%;\n border-bottom: 1px solid #f2f4f6;\n}\n\n/* No Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__no-actions {\n width: 100%;\n text-align: center;\n padding: 10px 20px;\n}");function Wr({notification:t}){const n=t.content[0],i=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-video-notification",children:[e.jsx(xr,{title:t.title||i.name,showOptions:Yn(t)}),e.jsx(hr,{videoData:n,width:"100%",height:"566px"})]})}Kt("");function Kr({notification:t}){const n=t.content[0].data,i=qn();return e.jsxs("div",{"data-testid":"ios-app-ui-web-view-notification",children:[e.jsx(xr,{title:t.title||i.name,showOptions:Yn(t)&&!ti(n)}),e.jsx("iframe",{className:"notificare__push__ios__web-view__app-ui__content",srcDoc:n,sandbox:"allow-same-origin"})]})}Kt(".notificare .notificare__push__ios__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 566px;\n background-color: #fff;\n pointer-events: none;\n}");function qr({notification:t,expanded:n}){var i,r;const a=qn();return e.jsxs("div",{className:"notificare__push__ios__lock-screen","data-testid":"ios-lock-screen-notification",children:[e.jsxs("div",{className:"notificare__push__ios__lock-screen__main-content",children:[e.jsx("div",{className:"notificare__push__ios__lock-screen__app-icon",children:a.icon?e.jsx("img",{className:"notificare__push__ios__lock-screen__app-icon-image",alt:"App icon",src:a.icon}):e.jsx(ur,{className:"notificare__push__ios__lock-screen__default-app-icon"})}),e.jsxs("div",{className:"notificare__push__ios__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__ios__lock-screen__title-and-time",children:[e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(n?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:t.title||a.name}),e.jsx("p",{className:"notificare__push__ios__lock-screen__text notificare__push__ios__lock-screen__text--time",children:e.jsx(Vt,{id:"preview.ios.lockScreen.time",defaultMessage:an["preview.ios.lockScreen.time"]})})]}),t.subtitle&&e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(n?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:t.subtitle}),e.jsxs("div",{className:"notificare__push__ios__lock-screen__message-and-media",children:[e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(ei(t)&&!n?"notificare__push__ios__lock-screen__text--message-with-media":"notificare__push__ios__lock-screen__text--message-without-media"),children:t.message}),ei(t)&&!n&&e.jsx("img",{className:"notificare__push__ios__lock-screen__media-image",src:null===(i=t.attachments)||void 0===i?void 0:i[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-media"})]})]})]}),ei(t)&&n&&e.jsx("img",{className:"notificare__push__ios__lock-screen__expanded-media",src:null===(r=t.attachments)||void 0===r?void 0:r[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-expanded-media"})]})}Kt(".notificare .notificare__push__ios__lock-screen {\n position: absolute;\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n left: 50%;\n transform: translateX(-50%);\n bottom: 80px;\n background-color: #f2f4f6;\n width: 315px;\n border-radius: 20px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__lock-screen__main-content {\n width: 100%;\n display: flex;\n align-items: center;\n column-gap: 11px;\n padding: 10px;\n}\n\n/* App Icon */\n\n.notificare .notificare__push__ios__lock-screen__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 10px;\n width: 35px;\n height: 35px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__lock-screen__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__ios__lock-screen__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n/* Text Content */\n\n.notificare .notificare__push__ios__lock-screen__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n width: 249px;\n}\n\n.notificare .notificare__push__ios__lock-screen__title-and-time {\n display: flex;\n column-gap: 5px;\n margin-top: 0;\n margin-bottom: 0;\n position: relative;\n width: 100%;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__lock-screen__text {\n font-size: 13px;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--title-or-subtitle {\n font-weight: 700;\n width: 210px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--expanded-title-or-subtitle {\n font-weight: 700;\n width: 210px;\n white-space: wrap;\n word-break: break-word;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--time {\n color: #64706e;\n font-size: 12px;\n text-align: right;\n flex-shrink: 0;\n max-width: 130px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--message-without-media {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n -webkit-line-clamp: 4;\n width: 242px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--message-with-media {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n -webkit-line-clamp: 4;\n width: 210px;\n}\n\n/* Media */\n\n.notificare .notificare__push__ios__lock-screen__message-and-media {\n display: flex;\n column-gap: 7px;\n}\n\n.notificare .notificare__push__ios__lock-screen__media-image {\n border-radius: 5px;\n object-fit: cover;\n width: 32px;\n height: 32px;\n align-self: flex-start;\n justify-self: flex-end;\n}\n\n.notificare .notificare__push__ios__lock-screen__expanded-media {\n object-fit: cover;\n width: 100%;\n max-height: 275px;\n overflow: hidden;\n display: block;\n}\n");var Xr;function Yr({notification:n,previewState:i,onError:r}){const a=Bt(),o=(()=>{switch(i.displayMode){case"lockscreen":case"lockscreen-expanded":return{preview:e.jsx(qr,{notification:n,expanded:"lockscreen-expanded"===i.displayMode}),theme:"light"};case"app-ui":switch(n.type){case"re.notifica.notification.Alert":return{preview:e.jsx($r,{notification:n}),theme:"dark"};case"re.notifica.notification.WebView":return{preview:e.jsx(Kr,{notification:n}),theme:"dark"};case"re.notifica.notification.URL":return{preview:e.jsx(Er,{notification:n}),theme:"dark"};case"re.notifica.notification.InAppBrowser":return{preview:e.jsx(yr,{notification:n}),theme:"dark"};case"re.notifica.notification.Image":return{preview:e.jsx(Gr,{notification:n}),theme:"dark"};case"re.notifica.notification.Map":return{preview:e.jsx(Zr,{notification:n,onError:r}),theme:"dark"};case"re.notifica.notification.Rate":return{preview:e.jsx(Vr,{title:n.title}),theme:"dark"};case"re.notifica.notification.Passbook":return{preview:e.jsx(zr,{notification:n}),theme:"dark"};case"re.notifica.notification.Video":return{preview:e.jsx(Wr,{notification:n}),theme:"dark"};case"re.notifica.notification.Store":return{preview:e.jsx(Dr,{notification:n}),theme:"dark"};case"re.notifica.notification.URLResolver":return{preview:e.jsx(jr,{notification:n,onError:r}),theme:"dark"};case"re.notifica.notification.None":case"re.notifica.notification.URLScheme":return}}})();if(t.useEffect((function(){o||r(a.formatMessage({id:"preview.error.notSupportedNotificationTypePreviewVariant",defaultMessage:an["preview.error.notSupportedNotificationTypePreviewVariant"]},{notificationType:n.type}))}),[o,n,r,a]),o)return e.jsx(Yt,{theme:o.theme,children:e.jsx("div",{className:"notificare__push__ios__preview",children:o.preview})})}function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Jr.apply(null,arguments)}Kt(".notificare .notificare__push__ios__preview {\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n height: 100%;\n}");var Qr=function(e){return r.createElement("svg",Jr({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48"},e),Xr||(Xr=r.createElement("defs",null,r.createElement("linearGradient",{id:"google-chrome_svg__a",x1:3.217,x2:44.781,y1:15,y2:15,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#d93025"}),r.createElement("stop",{offset:1,stopColor:"#ea4335"})),r.createElement("linearGradient",{id:"google-chrome_svg__b",x1:20.722,x2:41.504,y1:47.679,y2:11.684,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#fcc934"}),r.createElement("stop",{offset:1,stopColor:"#fbbc04"})),r.createElement("linearGradient",{id:"google-chrome_svg__c",x1:26.598,x2:5.816,y1:46.502,y2:10.506,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{offset:0,stopColor:"#1e8e3e"}),r.createElement("stop",{offset:1,stopColor:"#34a853"})))),r.createElement("circle",{cx:24,cy:23.995,r:12,style:{fill:"#fff"}}),r.createElement("path",{d:"M3.215 36A24 24 0 1 0 12 3.215 24 24 0 0 0 3.215 36m31.177-18A12 12 0 1 1 18 13.608 12 12 0 0 1 34.392 18",style:{fill:"none"}}),r.createElement("path",{d:"M24 12h20.781a23.994 23.994 0 0 0-41.564.003L13.607 30l.01-.002A11.985 11.985 0 0 1 24 12",style:{fill:"url(#google-chrome_svg__a)"}}),r.createElement("circle",{cx:24,cy:24,r:9.5,style:{fill:"#1a73e8"}}),r.createElement("path",{d:"M34.391 30.003 24.001 48A23.994 23.994 0 0 0 44.78 12.003H23.999l-.003.01a11.985 11.985 0 0 1 10.395 17.99",style:{fill:"url(#google-chrome_svg__b)"}}),r.createElement("path",{d:"M13.609 30.003 3.218 12.006A23.994 23.994 0 0 0 24.003 48l10.39-17.997-.007-.007a11.985 11.985 0 0 1-20.777.007",style:{fill:"url(#google-chrome_svg__c)"}}))};function ea(t){const{open:n,disabled:i,onToggle:r}=t;return e.jsx("button",{disabled:i,className:"notificare__push__web__desktop__lock-screen__expand-button "+(n?"notificare__push__web__desktop__lock-screen__expand-button--rotated":""),onClick:r,type:"button","data-testid":"web-desktop-expand-button",children:e.jsx(ln,{className:"notificare__push__web__desktop__lock-screen__expand-button-svg"})})}Kt(".notificare .notificare__push__web__desktop__lock-screen__expand-button {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: transform 0.4s ease;\n transform: rotate(270deg);\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button--rotated {\n transform: rotate(360deg);\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-svg {\n width: 11px;\n height: 11px;\n fill: #9e9e9e;\n}");var ta;function na({notification:n}){var i,r,a;const[o,s]=t.useState("collapsed"),[c,l]=t.useState(!1),[p,d]=t.useState(-1),[_,u]=t.useState(!1),f=t.useRef(null),h=t.useRef(null),m=qn();function g(){f.current&&clearTimeout(f.current)}return t.useEffect((function(){if(ei(n)||Yn(n))u(!0);else if(h.current){const e=3,t=window.getComputedStyle(h.current),n=parseFloat(t.lineHeight),i=h.current.scrollHeight;u(i>n*e)}else;}),[n]),t.useEffect((function(){return()=>{g()}}),[]),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen "+("expanded"===o?"notificare__push__web__desktop__lock-screen--expanded":"notificare__push__web__desktop__lock-screen--collapsed"),"data-testid":"web-desktop-notification",children:[e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__main-content",children:[e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon",children:e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon-background",children:e.jsx(Qr,{className:"notificare__push__web__desktop__lock-screen__browser-icon-svg","aria-label":"Google Chrome icon"})})}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__time-and-title-wrapper",children:[e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--title",children:n.title||m.name}),!c&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__time-container "+("collapsed"!==o?"notificare__push__web__desktop__lock-screen__time-container--hidden":""),children:e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--time",children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.time",defaultMessage:an["preview.web.desktop.macos.lockScreen.time"]})})})]}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__domain-and-message-and-media-wrapper",children:[e.jsxs("div",{children:[e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--domain",children:m.websitePushConfig&&m.websitePushConfig.allowedDomains.length>0?In(m.websitePushConfig.allowedDomains[0]):"example.com"}),e.jsx("p",{ref:h,className:`notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--message ${"expanded"===o?"notificare__push__web__desktop__lock-screen__text--expandable-message":"notificare__push__web__desktop__lock-screen__text--collapsed-message"} ${"expanded"!==o&&ei(n)?"notificare__push__web__desktop__lock_screen__text--message-with-attachment":""}`,children:n.message})]}),!c&&ei(n)&&e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__small-media "+("collapsed"!==o?"notificare__push__web__desktop__lock-screen__small-media--hidden":""),src:null===(i=n.attachments)||void 0===i?void 0:i[0].uri,alt:"Small media icon"})]})]})]}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__expanded-content "+("expanded"===o?"notificare__push__web__desktop__lock-screen__expanded-content--visible":""),children:[ei(n)&&e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__expanded-media",src:null===(r=n.attachments)||void 0===r?void 0:r[0].uri,alt:"Expanded media"}),e.jsx("hr",{className:"notificare__push__web__desktop__lock-screen__expanded-divisor"}),null===(a=n.actions)||void 0===a?void 0:a.map(((t,n)=>e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__action",children:[e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>d(n),onMouseLeave:()=>d(-1),type:"button","data-testid":`web-desktop-expanded-action-${n.toString()}`,children:t.label}),e.jsx("hr",{className:"notificare__push__web__desktop__lock-screen__expanded-buttons-divisor "+(p===n||p-1===n?"notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent":"")})]},n))),e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>{var e,t;return d(null!==(t=null===(e=n.actions)||void 0===e?void 0:e.length)&&void 0!==t?t:-1)},onMouseLeave:()=>d(-1),type:"button",children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})]}),_&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__expand-button-container "+(c||"collapsed"!==o?"notificare__push__web__desktop__lock-screen__expand-button-container--visible":""),children:e.jsx(ea,{open:"expanded"===o,disabled:!1,onToggle:function(){if(g(),"expanded"!==o)return l(!1),void s("expanded");s("collapsing"),f.current=setTimeout((()=>{s("collapsed")}),400)}})}),e.jsx("div",{className:`notificare__push__web__desktop__lock-screen__settings-button-container ${c?"notificare__push__web__desktop__lock-screen__settings-button-container--visible":""} ${"collapsed"!==o?"notificare__push__web__desktop__lock-screen__settings-button-container--hidden":""}`,children:n.actions&&n.actions.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",onClick:()=>l(!c),type:"button","data-testid":"web-desktop-settings-button",children:[e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.options",defaultMessage:an["preview.web.desktop.macos.lockScreen.options"]}),e.jsx(ln,{className:"notificare__push__web__desktop__lock-screen__settings-button-expand-icon"})]}),c&&e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__settings-selector",children:[n.actions.map(((t,n)=>e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option",type:"button","data-testid":`web-desktop-options-action-${n.toString()}`,children:t.label},n))),e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option",type:"button",children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})]})]}):e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",type:"button",children:e.jsx(Vt,{id:"preview.web.desktop.macos.lockScreen.settings",defaultMessage:an["preview.web.desktop.macos.lockScreen.settings"]})})})]})}function ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ia.apply(null,arguments)}Kt("/* Preview Wrapper */\n\n.notificare .notificare__push__web__desktop__lock-screen {\n position: relative;\n background-color: #f4f4f4;\n width: 340px;\n border-radius: 15px;\n border: 1px solid #e4e4e4;\n box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.1);\n transition: max-height 0.4s ease-in-out, overflow 0s ease-in-out 1s;\n align-self: start;\n max-height: 113px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen--collapsed {\n animation: showOverflow 0s linear 0.4s forwards;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen--expanded {\n max-height: 500px;\n background-color: #fff;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen:hover .notificare__push__web__desktop__lock-screen__time-container {\n opacity: 0;\n max-width: 0;\n transition: opacity 0.2s ease-in-out, max-width 0s linear 0.2s;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen:hover .notificare__push__web__desktop__lock-screen__small-media {\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen:hover :is(.notificare__push__web__desktop__lock-screen__settings-button-container, .notificare__push__web__desktop__lock-screen__expand-button-container) {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.2s;\n}\n\n/* Expand Button */\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-container {\n position: absolute;\n top: 8px;\n right: 8px;\n visibility: hidden;\n opacity: 0;\n transition: visibility linear 0.2s, opacity 0.2s ease-in-out;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-container--visible {\n visibility: visible;\n opacity: 1;\n}\n\n/* MAIN CONTENT */\n\n.notificare .notificare__push__web__desktop__lock-screen__main-content {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: row;\n column-gap: 10px;\n padding: 12px;\n}\n\n/* Browser Icon */\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon-background {\n background-color: #ffffff;\n border-radius: 10px;\n padding: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon-svg {\n width: 30px;\n height: auto;\n}\n\n/* Main notification content */\n\n.notificare .notificare__push__web__desktop__lock-screen__text-content {\n width: 100%;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time-and-title-wrapper {\n position: relative;\n display: flex;\n width: 266px;\n overflow: hidden;\n column-gap: 6px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time-container {\n margin-left: auto;\n flex-shrink: 0;\n max-width: 80px;\n transition: opacity 0.2s ease-in-out, max-width 0s linear;\n opacity: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time-container--hidden {\n opacity: 0;\n max-width: 0;\n}\n\n\n.notificare .notificare__push__web__desktop__lock-screen__domain-and-message-and-media-wrapper {\n display: flex;\n column-gap: 6px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text {\n font-size: 14px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--title {\n font-weight: 700;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--domain {\n font-weight: 700;\n margin-top: 2px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--message {\n margin-top: 2px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n line-height: 1.2;\n transition: max-height 0.4s ease 0s;\n max-height: 50px;\n}\n\n.notificare .notificare__push__web__desktop__lock_screen__text--message-with-attachment {\n max-width: 222px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--expandable-message {\n max-height: 300px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--collapsed-message {\n animation: applyClamp 0s linear 0.4s forwards;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--time {\n font-size: 12px;\n color: #64706e;\n}\n\n/* Media */\n\n.notificare .notificare__push__web__desktop__lock-screen__small-media {\n display: flex;\n width: 35px;\n height: 35px;\n border-radius: 25%;\n object-fit: cover;\n transition: opacity 0.2s ease-in-out 0s;\n margin-left: auto;\n margin-top: 2px;\n opacity: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__small-media--hidden {\n opacity: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-media {\n width: 100%;\n display: block;\n}\n\n/* Expanded Content */\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-content {\n width: 100%;\n max-height: 0;\n visibility: hidden;\n transition: visibility 0s linear 0.4s, max-height 0s linear 0.4s, padding 0s linear 0.4s;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-content--visible {\n padding: 0 14px 14px;\n visibility: visible;\n max-height: 500px;\n transition-delay: 0s, 0s;\n}\n\n/* SETTINGS */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container {\n position: absolute;\n bottom: 10px;\n right: 14px;\n z-index: 10;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.2s ease-in-out, visibility 0.2s;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container--visible {\n visibility: visible;\n opacity: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container--hidden {\n visibility: hidden !important;\n opacity: 0 !important;\n transition-delay: 0s !important;\n}\n\n/* Settings Button */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button {\n min-width: 70px;\n display: flex;\n background-color: #d6d6d6;\n border-radius: 7px;\n border: 0;\n padding: 5px 10px 5px;\n font-size: 13px;\n justify-content: center;\n box-shadow: -5px -7px 10px 10px rgba(242, 244, 246, 1);\n position: relative;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-expand-icon {\n width: 9px;\n margin-left: 4px;\n color: #000000;\n}\n\n/* Settings Selector */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector {\n background-color: #eaeaea;\n border-radius: 7px;\n box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);\n padding: 4px;\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 32px;\n width: max-content;\n right: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector-option {\n min-width: 70px;\n background-color: transparent;\n border-radius: 7px;\n font-size: 13px;\n border: 0;\n padding: 5px 10px;\n flex: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector-option:hover {\n background-color: #3b82f6;\n color: #fff;\n}\n\n/* Expanded Options - Actions & Settings */\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-divisor {\n border: none;\n border-top: 1px solid #d6d6d6;\n width: 102%;\n margin-left: -1%;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-button {\n font-size: 14px;\n border-radius: 7px;\n width: 100%;\n border: 0;\n padding: 8px;\n background-color: transparent;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-button:hover {\n background-color: #efefef;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-buttons-divisor {\n border: none;\n border-top: 1px solid #d6d6d6;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent {\n border-top: 1px solid transparent;\n}\n\n/* keyframes */\n\n@keyframes applyClamp {\n to {\n -webkit-line-clamp: 3;\n }\n}\n\n@keyframes showOverflow {\n to {\n overflow: visible;\n }\n}\n\n\n");var ra=function(e){return r.createElement("svg",ia({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"1em",height:"1em"},e),ta||(ta=r.createElement("path",{d:"m12.45 37.65-2.1-2.1L21.9 24 10.35 12.45l2.1-2.1L24 21.9l11.55-11.55 2.1 2.1L26.1 24l11.55 11.55-2.1 2.1L24 26.1Z"})))};function aa({notification:t}){return e.jsx("div",{"data-testid":"web-mobile-app-ui-url-notification",children:e.jsx(Bn,{url:t.content[0].data,platform:"Web",width:268,height:430})})}function oa({notification:n,onError:i}){const r=Bt(),a=di(n.content[0].data),o=(()=>{switch(a){case li.INVALID_URL:return{status:"error",errorCode:"preview.error.urlResolverInvalidUrl"};case li.URL_SCHEME:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithUrlSchemePreview"};case li.IN_APP_BROWSER:return{status:"error",errorCode:"preview.error.urlResolverNoNotificareWebViewQueryParameter"};case li.DYNAMIC_LINK:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithDynamicLink"};case li.RELATIVE_URL:return{status:"error",errorCode:"preview.error.notSupportedUrlResolverWithRelativeUrl"};case li.WEB_VIEW:return{status:"success",preview:e.jsx(aa,{notification:n})}}})();switch(t.useEffect((function(){"error"===o.status&&i(r.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,i,r]),o.status){case"error":return;case"success":return o.preview}}function sa({notification:t}){var n;return e.jsxs("div",{"data-testid":"web-mobile-app-ui-text-alert-notification",children:[ei(t)&&e.jsx("img",{className:"notificare__web__phone__alert__app-ui__media",src:null===(n=t.attachments)||void 0===n?void 0:n[0].uri,alt:"Notification attachment"}),e.jsxs("div",{children:[e.jsx("p",{className:"notificare__web__phone__alert__app-ui__title",children:t.title}),e.jsx("p",{className:"notificare__web__phone__alert__app-ui__subtitle",children:t.subtitle}),e.jsx("p",{className:"notificare__web__phone__alert__app-ui__message",children:t.message})]})]})}Kt(".notificare .notificare__web__phone__alert__app-ui__media {\n max-width: 100%;\n max-height: 250px;\n aspect-ratio: 16 / 9;\n margin-bottom: 10px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 8px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__subtitle {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__message {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n}");function ca({notification:t}){return e.jsx("div",{className:"notificare__web__phone__image__app-ui__image-slider","data-testid":"web-mobile-app-ui-image-notification",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__web__phone__image__app-ui__image-slider-item",src:t.data,alt:"Slider image"},n)))})}Kt(".notificare .notificare__web__phone__image__app-ui__image-slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scroll-behavior: smooth;\n scrollbar-width: thin; /* Firefox */\n scrollbar-color: #bbb transparent; /* Firefox */\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}\n\n/* For Chrome, Edge and Safari */\n.notificare .notificare__web__phone__image__app-ui__image-slider::-webkit-scrollbar {\n height: 4px;\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-webkit-scrollbar-thumb {\n background: #999;\n border-radius: 10px;\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-webkit-scrollbar-track {\n background: transparent;\n}");function la({notification:t}){return e.jsx("iframe",{className:"notificare__web__phone__web-view__app-ui__content",srcDoc:t.content[0].data,sandbox:"allow-same-origin","data-testid":"web-mobile-app-ui-web-view-notification"})}Kt(".notificare .notificare__web__phone__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 360px;\n background-color: #fff;\n pointer-events: none;\n}");var pa;function da({notification:n,onError:i}){var r;const a=qn(),{googleMapsAPIKey:o}=Pn(),s=Bt();return t.useEffect((function(){o||"re.notifica.notification.Map"!==n.type||i(s.formatMessage({id:"preview.error.provideGoogleMapsApiKey",defaultMessage:an["preview.error.provideGoogleMapsApiKey"]}))}),[n,o,s,i]),e.jsx("div",{className:"notificare__web__phone__app-ui",children:e.jsxs("div",{className:"notificare__web__phone__app-ui__background",children:[e.jsxs("div",{className:"notificare__web__phone__app-ui__header",children:[e.jsx("div",{className:"notificare__web__phone__app-ui__app-icon",children:(null===(r=a.websitePushConfig)||void 0===r?void 0:r.icon)?e.jsx("img",{className:"notificare__web__phone__app-ui__app-icon-image",src:a.websitePushConfig.icon,alt:"App icon"}):e.jsx(ur,{className:"notificare__web__phone__app-ui__default-app-icon"})}),e.jsx("p",{className:"notificare__web__phone__app-ui__app-name",children:a.name}),e.jsx("button",{className:"notificare__web__phone__app-ui__close-button",type:"button",children:e.jsx(ra,{className:"notificare__web__phone__app-ui__close-button-icon"})})]}),(()=>{switch(n.type){case"re.notifica.notification.Alert":return e.jsx(sa,{notification:n});case"re.notifica.notification.WebView":return e.jsx(la,{notification:n});case"re.notifica.notification.URL":return e.jsx("div",{"data-testid":"web-mobile-app-ui-url-notification",children:e.jsx(Bn,{url:n.content[0].data,platform:"Web",width:268,height:430})});case"re.notifica.notification.Image":return e.jsx(ca,{notification:n});case"re.notifica.notification.Map":return e.jsx(sr,{notification:n,width:"100%",height:"400px"});case"re.notifica.notification.Video":return e.jsx("div",{"data-testid":"web-mobile-app-ui-video-notification",children:e.jsx(hr,{videoData:n.content[0],width:"100%",height:"430px"})});case"re.notifica.notification.URLResolver":return e.jsx(oa,{notification:n,onError:i})}})(),n.actions&&e.jsx("div",{className:n.actions.length>=3?"notificare__web__phone__app-ui__actions-column":"notificare__web__phone__app-ui__actions-row",children:n.actions.map(((t,n)=>e.jsx("button",{className:"notificare__web__phone__app-ui__action "+(0===n?"notificare__web__phone__app-ui__action--primary":"notificare__web__phone__app-ui__action--secondary"),type:"button","data-testid":`web-mobile-app-ui-action-${n.toString()}`,children:t.label},n)))})]})})}function _a({notification:n,previewState:i,onError:r}){const a=Bt(),o=(()=>{switch(i.formFactor){case"desktop":return{status:"success",preview:e.jsx(na,{notification:n})};case"phone":switch(i.displayMode){case"app-ui":switch(n.type){case"re.notifica.notification.Alert":case"re.notifica.notification.Image":case"re.notifica.notification.Map":case"re.notifica.notification.URLResolver":case"re.notifica.notification.URL":case"re.notifica.notification.Video":case"re.notifica.notification.WebView":{const t="android"===i.os?qt:Yt;return{status:"success",preview:e.jsx(t,{theme:"dark",children:e.jsx(da,{notification:n,onError:r})})}}case"re.notifica.notification.InAppBrowser":case"re.notifica.notification.Rate":case"re.notifica.notification.Store":case"re.notifica.notification.Passbook":case"re.notifica.notification.None":case"re.notifica.notification.URLScheme":return{status:"error",errorCode:"preview.error.notSupportedNotificationTypePreviewVariant"}}break;case"lockscreen":case"lockscreen-expanded":return{status:"error",errorCode:"preview.error.notSupportedPreviewVariant"}}}})();switch(t.useEffect((function(){"error"===o.status&&r(a.formatMessage({id:o.errorCode,defaultMessage:an[o.errorCode]},{notificationType:n.type}))}),[o,n,r,a]),o.status){case"success":return o.preview;case"error":return}}function ua({notification:n,previewState:i}){const[r,a]=t.useState(null),[o,s]=t.useState(i);if(o!==i&&(a(null),s(i)),r)return e.jsx(Cn,{message:r,showConsoleWarning:!1});switch(i.platform){case"android":return e.jsx(br,{notification:n,previewState:i,onError:a});case"ios":return e.jsx(Yr,{notification:n,previewState:i,onError:a});case"web":return e.jsx(_a,{notification:n,previewState:i,onError:a})}}function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},fa.apply(null,arguments)}Kt("/* MAIN */\n\n.notificare .notificare__web__phone__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__web__phone__app-ui__background {\n width: 300px;\n background-color: white;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n row-gap: 16px;\n}\n\n/* Header */\n\n.notificare .notificare__web__phone__app-ui__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n column-gap: 16px;\n}\n\n.notificare .notificare__web__phone__app-ui__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n height: 32px;\n width: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__web__phone__app-ui__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__web__phone__app-ui__default-app-icon {\n height: 100%;\n width: 100%;\n}\n\n.notificare .notificare__web__phone__app-ui__app-name {\n font-size: 18px;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button {\n width: 32px;\n height: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n border: none;\n cursor: pointer;\n border-radius: 4px;\n padding: 0;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button:hover {\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button-icon {\n width: 24px;\n height: 24px;\n}\n\n/* Actions */\n\n.notificare .notificare__web__phone__app-ui__actions-row {\n display: flex;\n flex-wrap: wrap;\n column-gap: 8px;\n row-gap: 8px;\n flex-direction: row-reverse;\n}\n\n.notificare .notificare__web__phone__app-ui__actions-column {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n align-items: stretch;\n}\n\n.notificare .notificare__web__phone__app-ui__action {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n overflow: hidden;\n padding: 8px 16px;\n text-overflow: ellipsis;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n white-space: nowrap;\n border-radius: 4px;\n border: 0;\n cursor: pointer;\n}\n\n.notificare .notificare__web__phone__app-ui__action--full-width {\n width: 100%\n}\n\n.notificare .notificare__web__phone__app-ui__action--primary {\n background-color: #2b42f7;\n color: rgba(255, 255, 255, 0.87);\n}\n\n.notificare .notificare__web__phone__app-ui__action--primary:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__web__phone__app-ui__action--secondary {\n background-color: transparent;\n color: #2b42f7;\n}\n\n.notificare .notificare__web__phone__app-ui__action--secondary:hover {\n background-color: #f4f5f9;\n}\n");var ha,ma=function(e){return r.createElement("svg",fa({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),pa||(pa=r.createElement("path",{d:"M420.6 301.9a24 24 0 1 1 24-24 24 24 0 0 1-24 24m-265.1 0a24 24 0 1 1 24-24 24 24 0 0 1-24 24m273.7-144.5 47.9-83a10 10 0 1 0-17.3-10l-48.5 84.1a301.3 301.3 0 0 0-246.6 0l-48.5-84a10 10 0 1 0-17.3 10l47.9 83C64.5 202.2 8.2 285.6 0 384h576c-8.2-98.5-64.5-181.8-146.9-226.6"})))};function ga(){return ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ga.apply(null,arguments)}var va;function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ba.apply(null,arguments)}var wa;function ya(){return ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ya.apply(null,arguments)}var xa,ka=function(e){return r.createElement("svg",ya({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),wa||(wa=r.createElement("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9m-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3"})))};function Ea(){return Ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ea.apply(null,arguments)}function ja({previewState:t,onPreviewStateChanged:n}){const i=Bt();return e.jsxs("div",{className:"notificare__push__preview-controls","data-testid":"controls",children:[e.jsxs("div",{className:"notificare__push__preview-controls-toggle-groups",children:[e.jsx(Sn,{label:i.formatMessage({id:"controls.platform",defaultMessage:an["controls.platform"]}),options:Na,value:t.platform,onValueChanged:function(e){if(t.platform!==e)switch(e){case"android":case"ios":n(Object.assign(Object.assign({},t),{platform:e}));break;case"web":n(Object.assign(Object.assign({},t),{platform:"web",formFactor:"desktop",os:"macos",displayMode:"lockscreen"}))}}}),"web"===t.platform&&e.jsx(Sn,{label:i.formatMessage({id:"controls.formFactor",defaultMessage:an["controls.formFactor"]}),options:Sa,value:t.formFactor,onValueChanged:function(e){if("web"===t.platform&&t.formFactor!==e)switch(e){case"desktop":n(Object.assign(Object.assign({},t),{formFactor:e,os:"macos",displayMode:"lockscreen"}));break;case"phone":n(Object.assign(Object.assign({},t),{formFactor:e,os:"android",displayMode:"app-ui"}))}}}),"web"===t.platform&&"phone"===t.formFactor&&e.jsx(Sn,{label:i.formatMessage({id:"controls.operatingSystem",defaultMessage:an["controls.operatingSystem"]}),options:Ca,value:t.os,onValueChanged:function(e){"web"===t.platform&&"phone"===t.formFactor&&t.os!==e&&n(Object.assign(Object.assign({},t),{os:e}))}})]}),("android"===t.platform||"ios"===t.platform)&&e.jsx(Nn,{label:i.formatMessage({id:"controls.variant",defaultMessage:an["controls.variant"]}),options:Aa,value:t.displayMode,onValueChanged:function(e){t.displayMode!==e&&n(Object.assign(Object.assign({},t),{displayMode:e}))}}),"web"===t.platform&&"desktop"===t.formFactor&&e.jsx(Nn,{label:i.formatMessage({id:"controls.operatingSystem",defaultMessage:an["controls.operatingSystem"]}),options:Ta,value:t.os,disabled:!0}),"web"===t.platform&&"phone"===t.formFactor&&e.jsx(Nn,{label:i.formatMessage({id:"controls.variant",defaultMessage:an["controls.variant"]}),options:Aa,value:"app-ui",disabled:!0})]})}Kt(".notificare .notificare__push__preview-controls {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 350px;\n row-gap: 14px;\n}\n\n.notificare .notificare__push__preview-controls-preview {\n margin-top: 14px;\n}\n\n.notificare .notificare__push__preview-controls-toggle-groups {\n display: flex;\n align-items: center;\n column-gap: 30px;\n align-self: start;\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-divider {\n width: 20px;\n height: 20px;\n animation: fadeIn 0.3s ease-out;\n}\n\n/* Icons */\n\n.notificare .notificare__push__preview-controls-android-icon {\n width: 22px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-ios-icon {\n width: 28px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-html5-icon {\n width: 28px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-desktop-icon {\n width: 22px;\n height: auto;\n}\n\n.notificare .notificare__push__preview-controls-phone-icon {\n width: 24px;\n height: auto;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}");const Na=[{value:"android",icon:e.jsx(ma,{className:"notificare__push__preview-controls-android-icon"},"platforms-android-icon")},{value:"ios",icon:e.jsx(ka,{className:"notificare__push__preview-controls-ios-icon"},"platform-ios-icon")},{value:"web",icon:e.jsx((function(e){return r.createElement("svg",ba({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),va||(va=r.createElement("path",{d:"m0 32 34.9 395.8L191.5 480l157.6-52.2L384 32zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1z"})))}),{className:"notificare__push__preview-controls-html5-icon"},"platform-html5-icon")}],Sa=[{value:"desktop",icon:e.jsx((function(e){return r.createElement("svg",ga({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em"},e),ha||(ha=r.createElement("path",{d:"M64 0C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h176l-10.7 32H160c-17.7 0-32 14.3-32 32s14.3 32 32 32h256c17.7 0 32-14.3 32-32s-14.3-32-32-32h-69.3L336 416h176c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zm448 64v288H64V64z"})))}),{className:"notificare__push__preview-controls-desktop-icon"},"form-factor-desktop-icon")},{value:"phone",icon:e.jsx((function(e){return r.createElement("svg",Ea({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",width:"1em",height:"1em"},e),xa||(xa=r.createElement("path",{d:"M16 64C16 28.7 44.7 0 80 0h224c35.3 0 64 28.7 64 64v384c0 35.3-28.7 64-64 64H80c-35.3 0-64-28.7-64-64zm208 384a32 32 0 1 0-64 0 32 32 0 1 0 64 0m80-384H80v320h224z"})))}),{className:"notificare__push__preview-controls-phone-icon"},"form-factor-phone-icon")}],Ca=[{value:"android",icon:e.jsx(ma,{className:"notificare__push__preview-controls-android-icon"},"device-android-icon")},{value:"ios",icon:e.jsx(ka,{className:"notificare__push__preview-controls-ios-icon"},"device-iphone-icon")}],Ta=[{value:"macos",labelId:"controls.operatingSystem.macos",defaultLabel:an["controls.operatingSystem.macos"]}],Aa=[{value:"lockscreen",labelId:"controls.displayMode.lockScreen",defaultLabel:an["controls.displayMode.lockScreen"]},{value:"lockscreen-expanded",labelId:"controls.displayMode.expandedLockScreen",defaultLabel:an["controls.displayMode.expandedLockScreen"]},{value:"app-ui",labelId:"controls.displayMode.appUi",defaultLabel:an["controls.displayMode.appUi"]}];Kt("@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');\n\n.notificare {\n font-family: proxima-nova, Helvetica, Arial, sans-serif;\n color: #232c2a;\n}\n\n.notificare * {\n border: 0;\n margin: 0;\n box-sizing: border-box;\n}");Kt(".notificare .notificare__push__preview-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: max-content;\n}\n\n.notificare .notificare__push__preview {\n margin-top: 20px;\n}\n\n/* Disable label selection in every preview */\n.notificare .notificare__push__preview p,\n.notificare .notificare__push__preview span,\n.notificare .notificare__push__preview div,\n.notificare .notificare__push__preview h1,\n.notificare .notificare__push__preview h2,\n.notificare .notificare__push__preview h3,\n.notificare .notificare__push__preview h4,\n.notificare .notificare__push__preview h5,\n.notificare .notificare__push__preview h6 {\n user-select: none;\n}");const Pa={"android-lockscreen":{platform:"android",displayMode:"lockscreen"},"android-lockscreen-expanded":{platform:"android",displayMode:"lockscreen-expanded"},"android-app-ui":{platform:"android",displayMode:"app-ui"},"ios-lockscreen":{platform:"ios",displayMode:"lockscreen"},"ios-lockscreen-expanded":{platform:"ios",displayMode:"lockscreen-expanded"},"ios-app-ui":{platform:"ios",displayMode:"app-ui"},"web-desktop-macos":{platform:"web",displayMode:"lockscreen",formFactor:"desktop",os:"macos"},"web-android-app-ui":{platform:"web",displayMode:"app-ui",formFactor:"phone",os:"android"},"web-iphone-app-ui":{platform:"web",displayMode:"app-ui",formFactor:"phone",os:"ios"}};function Ma({notification:n,applicationId:i,showControls:r=!0,variant:a="android-lockscreen"}){const[o,s]=t.useState(Pa[a]),{serviceKey:c}=Pn(),l=fn({id:i,serviceKey:c});return e.jsxs("div",{className:"notificare__push__preview-wrapper",children:[r&&e.jsx(ja,{previewState:o,onPreviewStateChanged:s}),(()=>{switch(l.status){case"idle":case"loading":return e.jsx(tn,{});case"success":return e.jsx(Kn,{application:l.data,children:e.jsx("div",{className:"notificare__push__preview",children:e.jsx(ua,{notification:n,previewState:o})})})}})()]})}var La,Oa;!function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),i={};for(const e of n)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(La||(La={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(Oa||(Oa={}));const Ia=La.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ra=e=>{switch(typeof e){case"undefined":return Ia.undefined;case"string":return Ia.string;case"number":return Number.isNaN(e)?Ia.nan:Ia.number;case"boolean":return Ia.boolean;case"function":return Ia.function;case"bigint":return Ia.bigint;case"symbol":return Ia.symbol;case"object":return Array.isArray(e)?Ia.array:null===e?Ia.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Ia.promise:"undefined"!=typeof Map&&e instanceof Map?Ia.map:"undefined"!=typeof Set&&e instanceof Set?Ia.set:"undefined"!=typeof Date&&e instanceof Date?Ia.date:Ia.object;default:return Ia.unknown}},Ua=La.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ba extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},i=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(i);else if("invalid_return_type"===r.code)i(r.returnTypeError);else if("invalid_arguments"===r.code)i(r.argumentsError);else if(0===r.path.length)n._errors.push(t(r));else{let e=n,i=0;for(;i<r.path.length;){const n=r.path[i];i===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(this),n}static assert(e){if(!(e instanceof Ba))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,La.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Ba.create=e=>new Ba(e);const Ha=(e,t)=>{let n;switch(e.code){case Ua.invalid_type:n=e.received===Ia.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Ua.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,La.jsonStringifyReplacer)}`;break;case Ua.unrecognized_keys:n=`Unrecognized key(s) in object: ${La.joinValues(e.keys,", ")}`;break;case Ua.invalid_union:n="Invalid input";break;case Ua.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${La.joinValues(e.options)}`;break;case Ua.invalid_enum_value:n=`Invalid enum value. Expected ${La.joinValues(e.options)}, received '${e.received}'`;break;case Ua.invalid_arguments:n="Invalid function arguments";break;case Ua.invalid_return_type:n="Invalid function return type";break;case Ua.invalid_date:n="Invalid date";break;case Ua.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:La.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Ua.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Ua.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Ua.custom:n="Invalid input";break;case Ua.invalid_intersection_types:n="Intersection results could not be merged";break;case Ua.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ua.not_finite:n="Number must be finite";break;default:n=t.defaultError,La.assertNever(e)}return{message:n}};let Fa=Ha;function Da(e,t){const n=Fa,i=(e=>{const{data:t,path:n,errorMaps:i,issueData:r}=e,a=[...n,...r.path||[]],o={...r,path:a};if(void 0!==r.message)return{...r,path:a,message:r.message};let s="";const c=i.filter((e=>!!e)).slice().reverse();for(const e of c)s=e(o,{data:t,defaultError:s}).message;return{...r,path:a,message:s}})({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ha?void 0:Ha].filter((e=>!!e))});e.common.issues.push(i)}class za{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if("aborted"===i.status)return Ga;"dirty"===i.status&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,i=await e.value;n.push({key:t,value:i})}return za.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:t,value:r}=i;if("aborted"===t.status)return Ga;if("aborted"===r.status)return Ga;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!i.alwaysSet||(n[t.value]=r.value)}return{status:e.value,value:n}}}const Ga=Object.freeze({status:"aborted"}),Za=e=>({status:"dirty",value:e}),Va=e=>({status:"valid",value:e}),$a=e=>"aborted"===e.status,Wa=e=>"dirty"===e.status,Ka=e=>"valid"===e.status,qa=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Xa;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(Xa||(Xa={}));var Ya,Ja,Qa=function(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)},eo=function(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,n):r?r.value=n:t.set(e,n),n};class to{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const no=(e,t)=>{if(Ka(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Ba(e.common.issues);return this._error=t,this._error}}};function io(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:r}=e;if(t&&(n||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(t,r)=>{const{message:a}=e;return"invalid_enum_value"===t.code?{message:a??r.defaultError}:void 0===r.data?{message:a??i??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:a??n??r.defaultError}},description:r}}class ro{get description(){return this._def.description}_getType(e){return Ra(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Ra(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new za,ctx:{common:e.parent.common,data:e.data,parsedType:Ra(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(qa(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ra(e)},i=this._parseSync({data:e,path:n.path,parent:n});return no(n,i)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ra(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return Ka(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((e=>Ka(e)?{value:e.value}:{issues:t.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ra(e)},i=this._parse({data:e,path:n.path,parent:n}),r=await(qa(i)?i:Promise.resolve(i));return no(n,r)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,i)=>{const r=e(t),a=()=>i.addIssue({code:Ua.custom,...n(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(a(),!1))):!!r||(a(),!1)}))}refinement(e,t){return this._refinement(((n,i)=>!!e(n)||(i.addIssue("function"==typeof t?t(n,i):t),!1)))}_refinement(e){return new is({schema:this,typeName:_s.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return rs.create(this,this._def)}nullable(){return as.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Fo.create(this)}promise(){return ns.create(this,this._def)}or(e){return Go.create([this,e],this._def)}and(e){return Wo.create(this,e,this._def)}transform(e){return new is({...io(this._def),schema:this,typeName:_s.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new os({...io(this._def),innerType:this,defaultValue:t,typeName:_s.ZodDefault})}brand(){return new ls({typeName:_s.ZodBranded,type:this,...io(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ss({...io(this._def),innerType:this,catchValue:t,typeName:_s.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ps.create(this,e)}readonly(){return ds.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ao=/^c[^\s-]{8,}$/i,oo=/^[0-9a-z]+$/,so=/^[0-9A-HJKMNP-TV-Z]{26}$/i,co=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,lo=/^[a-z0-9_-]{21}$/i,po=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_o=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,uo=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let fo;const ho=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,mo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,go=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,vo=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wo=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yo="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",xo=new RegExp(`^${yo}$`);function ko(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function Eo(e){let t=`${yo}T${ko(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function jo(e,t){if(!po.test(e))return!1;try{const[n]=e.split("."),i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(i));return"object"==typeof r&&null!==r&&((!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||r.alg===t)))}catch{return!1}}function No(e,t){return!("v4"!==t&&t||!mo.test(e))||!("v6"!==t&&t||!vo.test(e))}class So extends ro{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==Ia.string){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.string,received:t.parsedType}),Ga}const t=new za;let n;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("max"===a.kind)e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const i=e.data.length>a.value,r=e.data.length<a.value;(i||r)&&(n=this._getOrReturnCtx(e,n),i?Da(n,{code:Ua.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&Da(n,{code:Ua.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)uo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"email",code:Ua.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)fo||(fo=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),fo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"emoji",code:Ua.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)co.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"uuid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("nanoid"===a.kind)lo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"nanoid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)ao.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cuid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)oo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cuid2",code:Ua.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)so.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"ulid",code:Ua.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),Da(n,{validation:"url",code:Ua.invalid_string,message:a.message}),t.dirty()}else if("regex"===a.kind){a.regex.lastIndex=0;a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"regex",code:Ua.invalid_string,message:a.message}),t.dirty())}else if("trim"===a.kind)e.data=e.data.trim();else if("includes"===a.kind)e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty());else if("toLowerCase"===a.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===a.kind)e.data=e.data.toUpperCase();else if("startsWith"===a.kind)e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty());else if("endsWith"===a.kind)e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty());else if("datetime"===a.kind){Eo(a).test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"datetime",message:a.message}),t.dirty())}else if("date"===a.kind){xo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"date",message:a.message}),t.dirty())}else if("time"===a.kind){new RegExp(`^${ko(a)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.invalid_string,validation:"time",message:a.message}),t.dirty())}else"duration"===a.kind?_o.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"duration",code:Ua.invalid_string,message:a.message}),t.dirty()):"ip"===a.kind?(i=e.data,("v4"!==(r=a.version)&&r||!ho.test(i))&&("v6"!==r&&r||!go.test(i))&&(n=this._getOrReturnCtx(e,n),Da(n,{validation:"ip",code:Ua.invalid_string,message:a.message}),t.dirty())):"jwt"===a.kind?jo(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"jwt",code:Ua.invalid_string,message:a.message}),t.dirty()):"cidr"===a.kind?No(e.data,a.version)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"cidr",code:Ua.invalid_string,message:a.message}),t.dirty()):"base64"===a.kind?bo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"base64",code:Ua.invalid_string,message:a.message}),t.dirty()):"base64url"===a.kind?wo.test(e.data)||(n=this._getOrReturnCtx(e,n),Da(n,{validation:"base64url",code:Ua.invalid_string,message:a.message}),t.dirty()):La.assertNever(a);var i,r;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:Ua.invalid_string,...Xa.errToObj(n)})}_addCheck(e){return new So({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Xa.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Xa.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Xa.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Xa.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Xa.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Xa.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Xa.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Xa.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Xa.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Xa.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Xa.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Xa.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Xa.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Xa.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...Xa.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Xa.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Xa.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...Xa.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Xa.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Xa.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Xa.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Xa.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Xa.errToObj(t)})}nonempty(e){return this.min(1,Xa.errToObj(e))}trim(){return new So({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new So({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new So({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Co(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}So.create=e=>new So({checks:[],typeName:_s.ZodString,coerce:e?.coerce??!1,...io(e)});class To extends ro{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==Ia.number){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.number,received:t.parsedType}),Ga}let t;const n=new za;for(const i of this._def.checks)if("int"===i.kind)La.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty());else if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else"multipleOf"===i.kind?0!==Co(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_finite,message:i.message}),n.dirty()):La.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Xa.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Xa.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Xa.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Xa.toString(t))}setLimit(e,t,n,i){return new To({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Xa.toString(i)}]})}_addCheck(e){return new To({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Xa.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Xa.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Xa.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Xa.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Xa.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Xa.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Xa.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Xa.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Xa.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&La.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}To.create=e=>new To({checks:[],typeName:_s.ZodNumber,coerce:e?.coerce||!1,...io(e)});class Ao extends ro{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Ia.bigint)return this._getInvalidInput(e);let t;const n=new za;for(const i of this._def.checks)if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Da(t,{code:Ua.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):La.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.bigint,received:t.parsedType}),Ga}gte(e,t){return this.setLimit("min",e,!0,Xa.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Xa.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Xa.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Xa.toString(t))}setLimit(e,t,n,i){return new Ao({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Xa.toString(i)}]})}_addCheck(e){return new Ao({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Xa.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Xa.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Xa.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Xa.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Xa.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Ao.create=e=>new Ao({checks:[],typeName:_s.ZodBigInt,coerce:e?.coerce??!1,...io(e)});class Po extends ro{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==Ia.boolean){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.boolean,received:t.parsedType}),Ga}return Va(e.data)}}Po.create=e=>new Po({typeName:_s.ZodBoolean,coerce:e?.coerce||!1,...io(e)});class Mo extends ro{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==Ia.date){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.date,received:t.parsedType}),Ga}if(Number.isNaN(e.data.getTime())){return Da(this._getOrReturnCtx(e),{code:Ua.invalid_date}),Ga}const t=new za;let n;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),Da(n,{code:Ua.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):La.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Mo({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Xa.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Xa.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}Mo.create=e=>new Mo({checks:[],coerce:e?.coerce||!1,typeName:_s.ZodDate,...io(e)});class Lo extends ro{_parse(e){if(this._getType(e)!==Ia.symbol){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.symbol,received:t.parsedType}),Ga}return Va(e.data)}}Lo.create=e=>new Lo({typeName:_s.ZodSymbol,...io(e)});class Oo extends ro{_parse(e){if(this._getType(e)!==Ia.undefined){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.undefined,received:t.parsedType}),Ga}return Va(e.data)}}Oo.create=e=>new Oo({typeName:_s.ZodUndefined,...io(e)});class Io extends ro{_parse(e){if(this._getType(e)!==Ia.null){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.null,received:t.parsedType}),Ga}return Va(e.data)}}Io.create=e=>new Io({typeName:_s.ZodNull,...io(e)});class Ro extends ro{constructor(){super(...arguments),this._any=!0}_parse(e){return Va(e.data)}}Ro.create=e=>new Ro({typeName:_s.ZodAny,...io(e)});class Uo extends ro{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Va(e.data)}}Uo.create=e=>new Uo({typeName:_s.ZodUnknown,...io(e)});class Bo extends ro{_parse(e){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.never,received:t.parsedType}),Ga}}Bo.create=e=>new Bo({typeName:_s.ZodNever,...io(e)});class Ho extends ro{_parse(e){if(this._getType(e)!==Ia.undefined){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.void,received:t.parsedType}),Ga}return Va(e.data)}}Ho.create=e=>new Ho({typeName:_s.ZodVoid,...io(e)});class Fo extends ro{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==Ia.array)return Da(t,{code:Ua.invalid_type,expected:Ia.array,received:t.parsedType}),Ga;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,r=t.data.length<i.exactLength.value;(e||r)&&(Da(t,{code:e?Ua.too_big:Ua.too_small,minimum:r?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(Da(t,{code:Ua.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(Da(t,{code:Ua.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>i.type._parseAsync(new to(t,e,t.path,n))))).then((e=>za.mergeArray(n,e)));const r=[...t.data].map(((e,n)=>i.type._parseSync(new to(t,e,t.path,n))));return za.mergeArray(n,r)}get element(){return this._def.type}min(e,t){return new Fo({...this._def,minLength:{value:e,message:Xa.toString(t)}})}max(e,t){return new Fo({...this._def,maxLength:{value:e,message:Xa.toString(t)}})}length(e,t){return new Fo({...this._def,exactLength:{value:e,message:Xa.toString(t)}})}nonempty(e){return this.min(1,e)}}function Do(e){if(e instanceof zo){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=rs.create(Do(i))}return new zo({...e._def,shape:()=>t})}return e instanceof Fo?new Fo({...e._def,type:Do(e.element)}):e instanceof rs?rs.create(Do(e.unwrap())):e instanceof as?as.create(Do(e.unwrap())):e instanceof Ko?Ko.create(e.items.map((e=>Do(e)))):e}Fo.create=(e,t)=>new Fo({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_s.ZodArray,...io(t)});class zo extends ro{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=La.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==Ia.object){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.object,received:t.parsedType}),Ga}const{status:t,ctx:n}=this._processInputParams(e),{shape:i,keys:r}=this._getCached(),a=[];if(!(this._def.catchall instanceof Bo&&"strip"===this._def.unknownKeys))for(const e in n.data)r.includes(e)||a.push(e);const o=[];for(const e of r){const t=i[e],r=n.data[e];o.push({key:{status:"valid",value:e},value:t._parse(new to(n,r,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Bo){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of a)o.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(Da(n,{code:Ua.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a){const i=n.data[t];o.push({key:{status:"valid",value:t},value:e._parse(new to(n,i,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of o){const n=await t.key,i=await t.value;e.push({key:n,value:i,alwaysSet:t.alwaysSet})}return e})).then((e=>za.mergeObjectSync(t,e))):za.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return Xa.errToObj,new zo({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{const i=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:Xa.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new zo({...this._def,unknownKeys:"strip"})}passthrough(){return new zo({...this._def,unknownKeys:"passthrough"})}extend(e){return new zo({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new zo({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_s.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new zo({...this._def,catchall:e})}pick(e){const t={};for(const n of La.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new zo({...this._def,shape:()=>t})}omit(e){const t={};for(const n of La.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new zo({...this._def,shape:()=>t})}deepPartial(){return Do(this)}partial(e){const t={};for(const n of La.objectKeys(this.shape)){const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}return new zo({...this._def,shape:()=>t})}required(e){const t={};for(const n of La.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof rs;)e=e._def.innerType;t[n]=e}return new zo({...this._def,shape:()=>t})}keyof(){return Qo(La.objectKeys(this.shape))}}zo.create=(e,t)=>new zo({shape:()=>e,unknownKeys:"strip",catchall:Bo.create(),typeName:_s.ZodObject,...io(t)}),zo.strictCreate=(e,t)=>new zo({shape:()=>e,unknownKeys:"strict",catchall:Bo.create(),typeName:_s.ZodObject,...io(t)}),zo.lazycreate=(e,t)=>new zo({shape:e,unknownKeys:"strip",catchall:Bo.create(),typeName:_s.ZodObject,...io(t)});class Go extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new Ba(e.ctx.common.issues)));return Da(t,{code:Ua.invalid_union,unionErrors:n}),Ga}));{let e;const i=[];for(const r of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=r._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&i.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=i.map((e=>new Ba(e)));return Da(t,{code:Ua.invalid_union,unionErrors:r}),Ga}}get options(){return this._def.options}}Go.create=(e,t)=>new Go({options:e,typeName:_s.ZodUnion,...io(t)});const Zo=e=>e instanceof Yo?Zo(e.schema):e instanceof is?Zo(e.innerType()):e instanceof Jo?[e.value]:e instanceof es?e.options:e instanceof ts?La.objectValues(e.enum):e instanceof os?Zo(e._def.innerType):e instanceof Oo?[void 0]:e instanceof Io?[null]:e instanceof rs?[void 0,...Zo(e.unwrap())]:e instanceof as?[null,...Zo(e.unwrap())]:e instanceof ls||e instanceof ds?Zo(e.unwrap()):e instanceof ss?Zo(e._def.innerType):[];class Vo extends ro{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ia.object)return Da(t,{code:Ua.invalid_type,expected:Ia.object,received:t.parsedType}),Ga;const n=this.discriminator,i=t.data[n],r=this.optionsMap.get(i);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(Da(t,{code:Ua.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ga)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const n of t){const t=Zo(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(i.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);i.set(r,n)}}return new Vo({typeName:_s.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...io(n)})}}function $o(e,t){const n=Ra(e),i=Ra(t);if(e===t)return{valid:!0,data:e};if(n===Ia.object&&i===Ia.object){const n=La.objectKeys(t),i=La.objectKeys(e).filter((e=>-1!==n.indexOf(e))),r={...e,...t};for(const n of i){const i=$o(e[n],t[n]);if(!i.valid)return{valid:!1};r[n]=i.data}return{valid:!0,data:r}}if(n===Ia.array&&i===Ia.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let i=0;i<e.length;i++){const r=$o(e[i],t[i]);if(!r.valid)return{valid:!1};n.push(r.data)}return{valid:!0,data:n}}return n===Ia.date&&i===Ia.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class Wo extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=(e,i)=>{if($a(e)||$a(i))return Ga;const r=$o(e.value,i.value);return r.valid?((Wa(e)||Wa(i))&&t.dirty(),{status:t.value,value:r.data}):(Da(n,{code:Ua.invalid_intersection_types}),Ga)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>i(e,t))):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Wo.create=(e,t,n)=>new Wo({left:e,right:t,typeName:_s.ZodIntersection,...io(n)});class Ko extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ia.array)return Da(n,{code:Ua.invalid_type,expected:Ia.array,received:n.parsedType}),Ga;if(n.data.length<this._def.items.length)return Da(n,{code:Ua.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ga;!this._def.rest&&n.data.length>this._def.items.length&&(Da(n,{code:Ua.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...n.data].map(((e,t)=>{const i=this._def.items[t]||this._def.rest;return i?i._parse(new to(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(i).then((e=>za.mergeArray(t,e))):za.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new Ko({...this._def,rest:e})}}Ko.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ko({items:e,typeName:_s.ZodTuple,rest:null,...io(t)})};class qo extends ro{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ia.map)return Da(n,{code:Ua.invalid_type,expected:Ia.map,received:n.parsedType}),Ga;const i=this._def.keyType,r=this._def.valueType,a=[...n.data.entries()].map((([e,t],a)=>({key:i._parse(new to(n,e,n.path,[a,"key"])),value:r._parse(new to(n,t,n.path,[a,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of a){const i=await n.key,r=await n.value;if("aborted"===i.status||"aborted"===r.status)return Ga;"dirty"!==i.status&&"dirty"!==r.status||t.dirty(),e.set(i.value,r.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of a){const i=n.key,r=n.value;if("aborted"===i.status||"aborted"===r.status)return Ga;"dirty"!==i.status&&"dirty"!==r.status||t.dirty(),e.set(i.value,r.value)}return{status:t.value,value:e}}}}qo.create=(e,t,n)=>new qo({valueType:t,keyType:e,typeName:_s.ZodMap,...io(n)});class Xo extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Ia.set)return Da(n,{code:Ua.invalid_type,expected:Ia.set,received:n.parsedType}),Ga;const i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&(Da(n,{code:Ua.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&(Da(n,{code:Ua.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const r=this._def.valueType;function a(e){const n=new Set;for(const i of e){if("aborted"===i.status)return Ga;"dirty"===i.status&&t.dirty(),n.add(i.value)}return{status:t.value,value:n}}const o=[...n.data.values()].map(((e,t)=>r._parse(new to(n,e,n.path,t))));return n.common.async?Promise.all(o).then((e=>a(e))):a(o)}min(e,t){return new Xo({...this._def,minSize:{value:e,message:Xa.toString(t)}})}max(e,t){return new Xo({...this._def,maxSize:{value:e,message:Xa.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Xo.create=(e,t)=>new Xo({valueType:e,minSize:null,maxSize:null,typeName:_s.ZodSet,...io(t)});class Yo extends ro{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Yo.create=(e,t)=>new Yo({getter:e,typeName:_s.ZodLazy,...io(t)});class Jo extends ro{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Da(t,{received:t.data,code:Ua.invalid_literal,expected:this._def.value}),Ga}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Qo(e,t){return new es({values:e,typeName:_s.ZodEnum,...io(t)})}Jo.create=(e,t)=>new Jo({value:e,typeName:_s.ZodLiteral,...io(t)});class es extends ro{constructor(){super(...arguments),Ya.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return Da(t,{expected:La.joinValues(n),received:t.parsedType,code:Ua.invalid_type}),Ga}if(Qa(this,Ya,"f")||eo(this,Ya,new Set(this._def.values),"f"),!Qa(this,Ya,"f").has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return Da(t,{received:t.data,code:Ua.invalid_enum_value,options:n}),Ga}return Va(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return es.create(e,{...this._def,...t})}exclude(e,t=this._def){return es.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}Ya=new WeakMap,es.create=Qo;class ts extends ro{constructor(){super(...arguments),Ja.set(this,void 0)}_parse(e){const t=La.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Ia.string&&n.parsedType!==Ia.number){const e=La.objectValues(t);return Da(n,{expected:La.joinValues(e),received:n.parsedType,code:Ua.invalid_type}),Ga}if(Qa(this,Ja,"f")||eo(this,Ja,new Set(La.getValidEnumValues(this._def.values)),"f"),!Qa(this,Ja,"f").has(e.data)){const e=La.objectValues(t);return Da(n,{received:n.data,code:Ua.invalid_enum_value,options:e}),Ga}return Va(e.data)}get enum(){return this._def.values}}Ja=new WeakMap,ts.create=(e,t)=>new ts({values:e,typeName:_s.ZodNativeEnum,...io(t)});class ns extends ro{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Ia.promise&&!1===t.common.async)return Da(t,{code:Ua.invalid_type,expected:Ia.promise,received:t.parsedType}),Ga;const n=t.parsedType===Ia.promise?t.data:Promise.resolve(t.data);return Va(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}ns.create=(e,t)=>new ns({type:e,typeName:_s.ZodPromise,...io(t)});class is extends ro{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_s.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,r={addIssue:e=>{Da(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===i.type){const e=i.transform(n.data,r);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return Ga;const i=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===i.status?Ga:"dirty"===i.status||"dirty"===t.value?Za(i.value):i}));{if("aborted"===t.value)return Ga;const i=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===i.status?Ga:"dirty"===i.status||"dirty"===t.value?Za(i.value):i}}if("refinement"===i.type){const e=e=>{const t=i.refinement(e,r);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===i.status?Ga:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?Ga:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===i.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ka(e))return e;const a=i.transform(e.value,r);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>Ka(e)?Promise.resolve(i.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}La.assertNever(i)}}is.create=(e,t,n)=>new is({schema:e,typeName:_s.ZodEffects,effect:t,...io(n)}),is.createWithPreprocess=(e,t,n)=>new is({schema:t,effect:{type:"preprocess",transform:e},typeName:_s.ZodEffects,...io(n)});class rs extends ro{_parse(e){return this._getType(e)===Ia.undefined?Va(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}rs.create=(e,t)=>new rs({innerType:e,typeName:_s.ZodOptional,...io(t)});class as extends ro{_parse(e){return this._getType(e)===Ia.null?Va(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}as.create=(e,t)=>new as({innerType:e,typeName:_s.ZodNullable,...io(t)});class os extends ro{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===Ia.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}os.create=(e,t)=>new os({innerType:e,typeName:_s.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...io(t)});class ss extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return qa(i)?i.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Ba(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new Ba(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ss.create=(e,t)=>new ss({innerType:e,typeName:_s.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...io(t)});class cs extends ro{_parse(e){if(this._getType(e)!==Ia.nan){const t=this._getOrReturnCtx(e);return Da(t,{code:Ua.invalid_type,expected:Ia.nan,received:t.parsedType}),Ga}return{status:"valid",value:e.data}}}cs.create=e=>new cs({typeName:_s.ZodNaN,...io(e)});class ls extends ro{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class ps extends ro{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Ga:"dirty"===e.status?(t.dirty(),Za(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Ga:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new ps({in:e,out:t,typeName:_s.ZodPipeline})}}class ds extends ro{_parse(e){const t=this._def.innerType._parse(e),n=e=>(Ka(e)&&(e.value=Object.freeze(e.value)),e);return qa(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}var _s;ds.create=(e,t)=>new ds({innerType:e,typeName:_s.ZodReadonly,...io(t)}),function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(_s||(_s={}));const us=So.create,fs=To.create,hs=Po.create;Bo.create;const ms=Fo.create,gs=zo.create;Go.create;const vs=Vo.create;Wo.create,Ko.create;const bs=Jo.create,ws=es.create;ns.create,rs.create,as.create;const ys=gs({title:us({message:"Property 'title' should be a string"}).optional(),subtitle:us({message:"Property 'subtitle' should be a string"}).optional(),message:us({message:"Property 'message' is required and should be a string"}).nonempty("Property 'message' cannot be empty"),actions:ms(gs({type:us({message:"Action property 'type' is required and should be a string"}),label:us({message:"Action property 'label' is required and should be a string"}),target:us({message:"Action property 'target' should be a string"}).optional(),camera:hs({message:"Action property 'camera' should be a boolean"}).optional(),keyboard:hs({message:"Action property 'keyboard' should be a boolean"}).optional()})).optional(),attachments:ms(gs({mimeType:us({message:"Attachment property 'mimeType' is required and should be a string"}),uri:us({message:"Attachment property 'uri' is required and should be a string"}).url("Attachment property 'uri' should be a valid URL")})).optional()}),xs=gs({type:bs("re.notifica.notification.None")}).merge(ys),ks=gs({type:bs("re.notifica.notification.URLResolver"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Es=gs({type:bs("re.notifica.notification.Alert")}).merge(ys),js=gs({type:bs("re.notifica.notification.Image"),content:ms(gs({type:ws(["re.notifica.content.PNG","re.notifica.content.JPEG","re.notifica.content.GIF"],{message:"Content objects should be of type 're.notifica.content.PNG', 're.notifica.content.JPEG' or 're.notifica.content.GIF'"}),data:us({message:"Content objects data should be strings"}).url("Content objects data should be valid URLs")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ns=gs({type:bs("re.notifica.notification.InAppBrowser"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ss=gs({type:bs("re.notifica.notification.Map"),content:ms(gs({type:bs("re.notifica.content.Marker",{message:"Content objects should be of type 're.notifica.content.Marker'"}),data:gs({title:us({message:"Content object data property 'title' is required and should be a string"}),description:us({message:"Content object data property 'description' is required should be a string"}),latitude:fs({message:"Content object data property 'latitude' is required and should be a number"}).min(-90,"Content object data property 'latitude' should be a minimum of -90").max(90,"Content object data property 'latitude' should be a maximum of 90"),longitude:fs({message:"Content object data property 'longitude' is required and should be a number"}).min(-180,"Content object data property 'longitude' must be at least -180").max(180,"Content object data property 'longitude' must be at most 180")})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Cs=gs({type:bs("re.notifica.notification.Passbook"),content:ms(gs({type:bs("re.notifica.content.PKPass",{message:"Content object should be of type 're.notifica.content.PKPass'"}),data:us({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ts=gs({type:bs("re.notifica.notification.Rate")}).merge(ys),As=gs({type:bs("re.notifica.notification.Store"),content:ms(vs("type",[gs({type:bs("re.notifica.content.AppStore"),data:gs({identifier:us({message:"Content object data property 'identifier' is mandatory and should be a string"}),campaignToken:us({message:"Content object data property 'campaignToken' should be a string"}).optional(),affiliateToken:us({message:"Content object data property 'affiliateToken' should be a string"}).optional(),providerToken:us({message:"Content object data property 'providerToken' should be a string"}).optional()},{message:"AppStore content object data is required and must be an object with 'identifier' (mandatory), 'campaignToken', 'affiliateToken', or 'providerToken'"})}),gs({type:ws(["re.notifica.content.GooglePlayDetails","re.notifica.content.GooglePlayDeveloper","re.notifica.content.GooglePlayCollection","re.notifica.content.GooglePlaySearch","re.notifica.content.AppGalleryDetails","re.notifica.content.AppGallerySearch"]),data:us({message:"GooglePlay and AppGallery content object data is required and must be a string"}).nonempty("GooglePlay and AppGallery content object data cannot be empty")})]),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),Ps=vs("type",[Es,js,Ns,Ss,xs,Cs,Ts,As,ks,gs({type:bs("re.notifica.notification.URL"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"}).url("Content object data should be a valid URL")}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),gs({type:bs("re.notifica.notification.URLScheme"),content:ms(gs({type:bs("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:us({message:"Content object data is required and should be a string"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys),gs({type:bs("re.notifica.notification.Video"),content:ms(gs({type:us({message:"Content object type is required and should be a string"}),data:us({message:"Content object data is required and should be a string"}).nonempty("Content object data cannot be empty")}),{message:"The notification must be content-rich. Property 'content' is required"}).superRefine(((e,t)=>{e.forEach(((e,n)=>{if(["re.notifica.content.YouTube","re.notifica.content.Vimeo","re.notifica.content.HTML5Video"].includes(e.type)||t.addIssue({code:Ua.custom,message:"Content object should be of type 're.notifica.content.YouTube', 're.notifica.content.Vimeo' or 're.notifica.content.HTML5Video'",path:["content",n,"type"]}),"re.notifica.content.HTML5Video"===e.type)try{new URL(e.data)}catch(e){t.addIssue({code:Ua.custom,message:"For a HTML5Video, content object data should be a valid URL",path:["content",n,"data"]})}}))}))}).merge(ys),gs({type:bs("re.notifica.notification.WebView"),content:ms(gs({type:bs("re.notifica.content.HTML",{message:"Content object should be of type 're.notifica.content.HTML'"}),data:us({message:"Content data is required and should be a string containing the HTML markup"})}),{message:"The notification must be content-rich. Property 'content' is required"})}).merge(ys)]);function Ms({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.find((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")&&!e.path.includes("content")));if(t){const e=Ps.options.map((e=>e.shape.type.value));console.error(`Notification error:\n\nInvalid notification type. Expected one of: ${e.join(", ")}\n`)}else{const t=e.map((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")&&e.path.includes("content")?`Invalid content type. Expected one of: ${e.options.join(", ")}\n`:e.message));console.error(`Notification errors:\n\n${t.join("\n")}`)}}(n)}),[n]),e.jsx(Cn,{message:i.formatMessage({id:"preview.error.invalidNotification",defaultMessage:an["preview.error.invalidNotification"]}),showConsoleWarning:!0})}Kt("");function Ls({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__banner__wrapper","data-testid":"in-app-messaging-banner-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__banner__window",children:[t.image&&e.jsx("img",{alt:"App icon",className:"notificare__in-app-messaging__banner__image",src:t.image,"data-testid":"in-app-messaging-banner-preview-image"}),e.jsxs("div",{className:"notificare__in-app-messaging__banner__text-content",children:[e.jsx("p",{className:"notificare__in-app-messaging__banner__title","data-testid":"in-app-messaging-banner-preview-title",children:t.title}),e.jsx("p",{className:"notificare__in-app-messaging__banner__message","data-testid":"in-app-messaging-banner-preview-message",children:t.message})]})]})})}Kt(".notificare .notificare__in-app-messaging__banner__wrapper {\n width: 100%;\n justify-content: center;\n margin-top: 20px;\n display: flex;\n}\n\n.notificare .notificare__in-app-messaging__banner__window {\n width: 320px;\n border-radius: 4px;\n display: flex;\n background-color: #fff;\n padding: 16px;\n column-gap: 16px;\n}\n\n.notificare .notificare__in-app-messaging__banner__image {\n width: 58px;\n height: 58px;\n object-fit: cover;\n}\n\n.notificare .notificare__in-app-messaging__banner__text-content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.notificare .notificare__in-app-messaging__banner__title {\n font-size: 16px;\n font-weight: 600;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 4px;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__banner__message {\n font-size: 14px;\n width: 100%;\n line-height: 20px;\n}");function Os({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__card__wrapper","data-testid":"in-app-messaging-card-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__card__window",children:[e.jsxs("div",{className:"notificare__in-app-messaging__card__header",children:[e.jsx("button",{className:"notificare__in-app-messaging__card__close-button "+(t.image?"notificare__in-app-messaging__card__close-button--with-image":""),type:"button",children:e.jsx(ra,{className:"notificare__in-app-messaging__card__close-button-icon"})}),t.image&&e.jsx("img",{className:"notificare__in-app-messaging__card__image",src:t.image,"data-testid":"in-app-messaging-card-preview-image"})]}),e.jsxs("div",{className:"notificare__in-app-messaging__card__text-content",children:[e.jsx("p",{className:"notificare__in-app-messaging__card__title","data-testid":"in-app-messaging-card-preview-title",children:t.title}),e.jsx("p",{className:"notificare__in-app-messaging__card__message","data-testid":"in-app-messaging-card-preview-message",children:t.message})]}),e.jsxs("div",{className:"notificare__in-app-messaging__card__actions",children:[e.jsx("button",{className:"notificare__in-app-messaging__card__action-button notificare__in-app-messaging__card__action-button--primary "+(t.primaryAction.destructive?"notificare__in-app-messaging__card__action-button--destructive":""),type:"button","data-testid":"in-app-messaging-card-preview-primary-action-label",children:t.primaryAction.label}),t.secondaryAction&&e.jsx("button",{className:"notificare__in-app-messaging__card__action-button notificare__in-app-messaging__card__action-button--secondary "+(t.secondaryAction.destructive?"notificare__in-app-messaging__card__action-button--destructive":""),type:"button","data-testid":"in-app-messaging-card-preview-secondary-action-label",children:t.secondaryAction.label})]})]})})}Kt(".notificare .notificare__in-app-messaging__card__wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__in-app-messaging__card__window {\n width: 320px;\n background-color: white;\n border-radius: 5px;\n padding: 16px;\n overflow: hidden;\n row-gap: 16px;\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__card__header {\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button {\n position: absolute;\n right: 8px;\n top: 8px;\n align-items: center;\n cursor: pointer;\n border-radius: 4px;\n display: flex;\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n justify-content: center;\n padding: 0;\n background-color: transparent;\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button:hover {\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button--with-image {\n border-radius: 16px;\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button--with-image:hover {\n border-radius: 4px;\n}\n\n.notificare .notificare__in-app-messaging__card__close-button-icon {\n fill: #000000de;\n height: 22px;\n width: 22px;\n}\n\n.notificare .notificare__in-app-messaging__card__image {\n aspect-ratio: 2 / 1;\n width: 100%;\n object-fit: cover;\n}\n\n.notificare .notificare__in-app-messaging__card__title {\n font-weight: 600;\n font-size: 16px;\n margin-bottom: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__card__message {\n font-size: 14px;\n width: 100%;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__card__actions {\n display: flex;\n flex-direction: row-reverse;\n column-gap: 16px;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button {\n padding: 8px 16px;\n font-weight: 500;\n font-size: 14px;\n border-radius: 4px;\n cursor: pointer;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n line-height: 20px;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--primary {\n background-color: #2b42f7;\n color: rgba(255, 255, 255, 0.87);\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--primary:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--secondary {\n background-color: #fff;\n color: #2b42f7;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--secondary:hover {\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--destructive {\n background-color: #fff;\n color: #ba1a1a;\n}\n\n.notificare .notificare__in-app-messaging__card__action-button--destructive:hover {\n background-color: #ffdad699;\n}");function Is({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__wrapper","data-testid":"in-app-messaging-fullscreen-preview-wrapper",children:e.jsxs("div",{className:"notificare__in-app-messaging__fullscreen__window",children:[e.jsx("img",{alt:"App icon",className:"notificare__in-app-messaging__fullscreen__background-image",src:t.image,"data-testid":"in-app-messaging-fullscreen-preview-image"}),e.jsx("button",{className:"notificare__in-app-messaging__fullscreen__close-button",type:"button",children:e.jsx(ra,{className:"notificare__in-app-messaging__fullscreen__close-button-icon"})}),e.jsxs("div",{className:"notificare__in-app-messaging__fullscreen__text-content",children:[e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__title","data-testid":"in-app-messaging-fullscreen-preview-title",children:t.title}),e.jsx("div",{className:"notificare__in-app-messaging__fullscreen__message","data-testid":"in-app-messaging-fullscreen-preview-message",children:t.message})]})]})})}Kt(".notificare .notificare__in-app-messaging__fullscreen__wrapper {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__window {\n width: 310px;\n height: 95%;\n border-radius: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__background-image {\n height: 100%;\n object-fit: cover;\n width: 100%;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button {\n position: absolute;\n right: 8px;\n top: 8px;\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n justify-content: center;\n border-radius: 16px;\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button:hover {\n border-radius: 4px;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__close-button-icon {\n fill: #000000de;\n width: 22px;\n height: 22px;\n flex-shrink: 0;\n flex-grow: 0;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__text-content {\n position: absolute;\n bottom: 0;\n padding: 32px 16px 16px;\n width: 100%;\n background: linear-gradient(rgba(255, 255, 255, 0), #fff);\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__title {\n font-weight: 600;\n font-size: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 4px;\n line-height: 20px;\n}\n\n.notificare .notificare__in-app-messaging__fullscreen__message {\n font-size: 14px;\n line-height: 20px;\n}");function Rs({inAppMessage:t}){return e.jsx("div",{className:"notificare__in-app-messaging__preview",children:e.jsx(qt,{theme:"dark",children:(()=>{switch(t.type){case"re.notifica.inappmessage.Banner":return e.jsx(Ls,{inAppMessage:t});case"re.notifica.inappmessage.Card":return e.jsx(Os,{inAppMessage:t});case"re.notifica.inappmessage.Fullscreen":return e.jsx(Is,{inAppMessage:t})}})()})})}Kt(".notificare .notificare__in-app-messaging__preview {\n user-select: none;\n}");const Us=vs("type",[gs({type:bs("re.notifica.inappmessage.Banner"),title:us({message:"Property 'title' is required and should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").nonempty("Property 'title' cannot be empty"),message:us({message:"Property 'message' is required and should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").nonempty("Property 'message' cannot be empty"),image:us({message:"Property 'image' should be a string"}).url("Property 'image' should be a valid URL").optional()}),gs({type:bs("re.notifica.inappmessage.Card"),title:us({message:"Property 'title' is required and should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").nonempty("Property 'title' cannot be empty"),message:us({message:"Property 'message' is required and should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").nonempty("Property 'message' cannot be empty"),image:us({message:"Property 'image' should be a string"}).url("Property 'image' should be a valid URL").optional(),primaryAction:gs({label:us({message:"Primary action property 'label' is required and should be a string"}).max(32,"Primary action property 'label' cannot contain more than 32 characters").nonempty("Primary action property 'label' cannot be empty"),destructive:hs({message:"Primary action property 'destructive' should be a boolean"}).optional()},{message:"A Card must contain a primary action. Property 'primaryAction' is required"}),secondaryAction:gs({label:us({message:"Secondary action property 'label' is required and should be a string"}).max(32,"Secondary action property 'label' cannot contain more than 32 characters").nonempty("Secondary action property 'label' cannot be empty"),destructive:hs({message:"Secondary action property 'destructive' should be a boolean"}).optional()}).optional()}),gs({type:bs("re.notifica.inappmessage.Fullscreen"),title:us({message:"Property 'title' should be a string"}).max(256,"Property 'title' cannot contain more than 256 characters").optional(),message:us({message:"Property 'message' should be a string"}).max(256,"Property 'message' cannot contain more than 256 characters").optional(),image:us({message:"Property 'image' is required and should be a string"}).url("Property 'image' should be a valid URL")})]);function Bs({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.find((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")));if(t){const e=Us.options.map((e=>e.shape.type.value));console.error(`In-app message error:\n\nInvalid type. Expected one of: ${e.join(", ")}`)}else{const t=e.map((({message:e})=>e));console.error(`In-app message errors:\n\n${t.join("\n")}`)}}(n)}),[n]),e.jsx(Cn,{message:i.formatMessage({id:"preview.error.invalidInAppMessage",defaultMessage:gn["preview.error.invalidInAppMessage"]}),showConsoleWarning:!0})}var Hs;function Fs({applicationId:t,applicationInfo:n,serviceKey:i}){const r=fn({id:t,serviceKey:i});return(()=>{var t,i,a,o;switch(r.status){case"idle":case"loading":return e.jsx(tn,{});case"success":{const s=null!==(t=n.websitePushConfig.icon)&&void 0!==t?t:null===(i=r.data.websitePushConfig)||void 0===i?void 0:i.icon,c=null!==(o=null!==(a=n.websitePushConfig.launchConfig.applicationName)&&void 0!==a?a:n.name)&&void 0!==o?o:r.data.name,l=n.websitePushConfig.launchConfig.autoOnboardingOptions;return e.jsx("div",{className:"notificare__push-onboarding__dialog__wrapper","data-testid":"push-onboarding-dialog-preview-wrapper",children:e.jsxs("div",{className:"notificare__push-onboarding__dialog__window",children:[e.jsxs("div",{className:"notificare__push-onboarding__dialog__content",children:[s?e.jsx("img",{className:"notificare__push-onboarding__dialog__icon",src:s,"data-testid":"push-onboarding-dialog-preview-icon"}):e.jsx("div",{className:"notificare__push-onboarding__dialog__default-icon-container",children:e.jsx(ur,{className:"notificare__push-onboarding__dialog__default-icon"})}),e.jsxs("div",{className:"notificare__push-onboarding__dialog__text-content",children:[e.jsx("p",{className:"notificare__push-onboarding__dialog__title","data-testid":"push-onboarding-dialog-preview-title",children:c}),e.jsx("p",{className:"notificare__push-onboarding__dialog__message","data-testid":"push-onboarding-dialog-preview-message",children:null==l?void 0:l.message})]})]}),e.jsx("div",{className:"notificare__push-onboarding__dialog__footer",children:e.jsxs("div",{className:"notificare__push-onboarding__dialog__actions",children:[e.jsx("button",{className:"notificare__push-onboarding__dialog__action-button notificare__push-onboarding__dialog__action-button--cancel",type:"button","data-testid":"push-onboarding-dialog-cancel-button",children:null==l?void 0:l.cancelButton}),e.jsx("button",{className:"notificare__push-onboarding__dialog__action-button notificare__push-onboarding__dialog__action-button--accept",type:"button","data-testid":"push-onboarding-dialog-accept-button",children:null==l?void 0:l.acceptButton})]})})]})})}}})()}function Ds(){return Ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ds.apply(null,arguments)}Kt(".notificare .notificare__push-onboarding__dialog__wrapper {\n width: 100%;\n justify-content: center;\n margin-top: 20px;\n display: flex;\n}\n\n.notificare .notificare__push-onboarding__dialog__window {\n width: 320px;\n border-radius: 4px;\n display: flex;\n flex-direction: column;\n background-color: #fff;\n padding: 16px;\n row-gap: 16px;\n box-shadow: 0 0 32px -8px rgba(0, 0, 0, 0.52);\n margin-top: 64px;\n}\n\n.notificare .notificare__push-onboarding__dialog__content {\n display: flex;\n flex-direction: row;\n column-gap: 16px;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.notificare .notificare__push-onboarding__dialog__icon {\n width: 64px;\n height: 64px;\n border-radius: 4px;\n}\n\n.notificare .notificare__push-onboarding__dialog__default-icon-container {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n min-width: 64px;\n height: 64px;\n overflow: hidden;\n}\n\n.notificare .notificare__push-onboarding__dialog__default-icon {\n width: 64px;\n height: 64px;\n}\n\n.notificare .notificare__push-onboarding__dialog__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 4px;\n overflow: hidden;\n}\n\n.notificare .notificare__push-onboarding__dialog__title {\n font-size: 24px;\n line-height: 24px;\n font-weight: 400;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push-onboarding__dialog__message {\n font-size: 14px;\n line-height: 20px;\n border: none;\n color: rgba(0, 0, 0, 0.86);\n}\n\n.notificare .notificare__push-onboarding__dialog__footer {\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n margin-top: 16px;\n}\n\n.notificare .notificare__push-onboarding__dialog__actions {\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n justify-content: flex-end;\n column-gap: 8px;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button {\n padding: 8px 16px;\n font-weight: 500;\n font-size: 14px;\n border-radius: 4px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n line-height: 20px;\n background-color: transparent;\n cursor: pointer;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--accept {\n background-color: #2b42f7;\n color: rgba(255, 255, 255, 0.87);\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--accept:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--cancel {\n color: #ba1a1a;\n}\n\n.notificare .notificare__push-onboarding__dialog__action-button--cancel:hover {\n background-color: #ffdad699;\n}");var zs,Gs=function(e){return r.createElement("svg",Ds({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"},e),Hs||(Hs=r.createElement("g",{fillRule:"evenodd"},r.createElement("path",{fillRule:"nonzero",d:"M11.955 0q.519.002.976.138a7.8 7.8 0 0 0-1.42 1.624c-.815.202-1.327.97-1.357 2.002-.012.302-.174.441-.465.51-1.986.547-3.496 2.162-3.59 7.238-.104 2.265-.499 3.764-1.335 4.693-.604.674-1.301 1.36-1.51 1.696v.14h17.401v-.14c-.209-.337-.894-1.022-1.51-1.696-.515-.58-.862-1.382-1.076-2.455H18a7.8 7.8 0 0 0 1.96-.25c.16.661.402 1.256.777 1.648.999 1.034 2.184 2.08 2.184 3.241 0 .848-.663 1.406-1.754 1.406h-4.903C16.171 22.048 14.417 24 11.954 24c-2.45 0-4.205-1.963-4.298-4.205H2.754C1.651 19.795 1 19.237 1 18.389c0-1.161 1.173-2.207 2.184-3.24.767-.802.976-2.452 1.069-3.788.081-4.577 1.266-7.527 4.356-8.643C8.992 1.197 10.247 0 11.955 0m2.497 19.795H9.47c.08 1.58 1.092 2.567 2.486 2.567 1.405 0 2.404-.987 2.497-2.567Z"}),r.createElement("path",{d:"M18 0a6 6 0 1 1 0 12 6 6 0 0 1 0-12m2.312 3.117L17.998 5.43 15.69 3.117a.41.41 0 0 0-.572 0 .41.41 0 0 0 0 .572L17.43 6l-2.313 2.313a.41.41 0 0 0 0 .572.41.41 0 0 0 .572 0L18 6.571l2.313 2.313a.404.404 0 0 0 .568-.572L18.57 5.998l2.31-2.308a.404.404 0 0 0-.568-.573"}))))};function Zs(){return Zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Zs.apply(null,arguments)}var Vs,$s=function(e){return r.createElement("svg",Zs({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"},e),zs||(zs=r.createElement("g",{fillRule:"evenodd"},r.createElement("path",{fillRule:"nonzero",d:"M11.955 0q.519.002.976.138a7.8 7.8 0 0 0-1.42 1.624c-.815.202-1.327.97-1.357 2.002-.012.302-.174.441-.465.51-1.986.547-3.496 2.162-3.59 7.238-.104 2.265-.499 3.764-1.335 4.693-.604.674-1.301 1.36-1.51 1.696v.14h17.401v-.14c-.209-.337-.894-1.022-1.51-1.696-.515-.58-.862-1.382-1.076-2.455H18a7.8 7.8 0 0 0 1.96-.25c.16.661.402 1.256.777 1.648.999 1.034 2.184 2.08 2.184 3.241 0 .848-.663 1.406-1.754 1.406h-4.903C16.171 22.048 14.417 24 11.954 24c-2.45 0-4.205-1.963-4.298-4.205H2.754C1.651 19.795 1 19.237 1 18.389c0-1.161 1.173-2.207 2.184-3.24.767-.802.976-2.452 1.069-3.788.081-4.577 1.266-7.527 4.356-8.643C8.992 1.197 10.247 0 11.955 0m2.497 19.795H9.47c.08 1.58 1.092 2.567 2.486 2.567 1.405 0 2.404-.987 2.497-2.567Z"}),r.createElement("path",{d:"M18 0a6 6 0 1 1 0 12 6 6 0 0 1 0-12m2.683 3c-.14 0-.216.046-.3.18l-3.126 5.023-1.623-2.142c-.087-.122-.174-.172-.3-.172a.32.32 0 0 0-.334.33c0 .081.035.172.101.257l1.807 2.32c.105.137.213.204.362.204q.226-.001.352-.197l3.29-5.224A.5.5 0 0 0 21 3.32c0-.193-.125-.319-.317-.319Z"}))))};function Ws(){return Ws=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ws.apply(null,arguments)}var Ks=function(e){return r.createElement("svg",Ws({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"},e),Vs||(Vs=r.createElement("path",{d:"M1 18.39c0 .847.65 1.405 1.754 1.405h4.902C7.75 22.037 9.503 24 11.955 24c2.462 0 4.216-1.952 4.31-4.205h4.902c1.091 0 1.754-.558 1.754-1.406 0-1.161-1.185-2.207-2.184-3.24-.767-.802-.976-2.452-1.069-3.788-.081-4.577-1.266-7.527-4.356-8.643C14.917 1.197 13.674 0 11.955 0c-1.708 0-2.963 1.197-3.346 2.718-3.09 1.116-4.275 4.066-4.356 8.643-.093 1.336-.302 2.986-1.07 3.787C2.174 16.182 1 17.228 1 18.39m2.254-.35v-.139c.209-.337.906-1.022 1.51-1.696.836-.929 1.231-2.428 1.336-4.693.093-5.076 1.603-6.691 3.59-7.237.29-.07.452-.21.464-.511.035-1.208.732-2.056 1.8-2.056 1.08 0 1.766.848 1.813 2.056.011.302.162.441.453.51 1.998.547 3.508 2.162 3.601 7.238.104 2.265.5 3.764 1.324 4.693.616.674 1.301 1.36 1.51 1.696v.14H3.254Zm6.215 1.755h4.983c-.093 1.58-1.092 2.567-2.497 2.567-1.394 0-2.405-.987-2.486-2.567"})))};function qs({permissionStatus:t,options:n}){return e.jsx("div",{className:"notificare__push-onboarding__floating-button__wrapper","data-testid":"push-onboarding-floating-button-preview-wrapper",children:e.jsxs("div",{className:`notificare__push-onboarding__floating-button ${"start"===n.alignment.horizontal?"notificare__push-onboarding__floating-button--start":"notificare__push-onboarding__floating-button--end"} ${"top"===n.alignment.vertical?"notificare__push-onboarding__floating-button--top":"notificare__push-onboarding__floating-button--bottom"}`,"data-testid":"push-onboarding-floating-button-preview",children:["default"===t&&e.jsx(Ks,{className:"notificare__push-onboarding__floating-button__icon"}),"granted"===t&&e.jsx($s,{className:"notificare__push-onboarding__floating-button__icon"}),"denied"===t&&e.jsx(Gs,{className:"notificare__push-onboarding__floating-button__icon"}),e.jsxs("div",{className:"notificare__push-onboarding__floating-button-tooltip","data-testid":"push-onboarding-floating-button-preview-tooltip",children:["default"===t&&n.permissionTexts.default,"granted"===t&&n.permissionTexts.granted,"denied"===t&&n.permissionTexts.denied]})]})})}function Xs({permissionStatus:t,applicationInfo:n,applicationId:i,serviceKey:r}){return e.jsx(qt,{theme:"dark",children:n.websitePushConfig.launchConfig.autoOnboardingOptions?e.jsx(Fs,{applicationId:i,applicationInfo:n,serviceKey:r}):n.websitePushConfig.launchConfig.floatingButtonOptions&&e.jsx(qs,{permissionStatus:t,options:n.websitePushConfig.launchConfig.floatingButtonOptions})})}function Ys({errors:n}){const i=Bt();return t.useEffect((function(){!function(e){const t=e.map((({message:e})=>e));console.error(`Push onboarding preview errors:\n\n${t.join("\n")}`)}(n)}),[n]),e.jsx(Cn,{message:i.formatMessage({id:"preview.error.invalidPushOnboardingApplicationInfo",defaultMessage:xn["preview.error.invalidPushOnboardingApplicationInfo"]}),showConsoleWarning:!0})}Kt(".notificare .notificare__push-onboarding__floating-button__wrapper {\n width: 100%;\n height: calc(615px - 32px);\n}\n\n.notificare .notificare__push-onboarding__floating-button {\n position: absolute;\n margin: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 16px;\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n background-color: #dfe0ff;\n color: #000a64;\n box-shadow: 0 3px 1px -2px rgb(0 0 0 / 0.2), 0 2px 2px 0 rgb(0 0 0 / 0.14), 0 1px 5px 0 rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button:active {\n box-shadow: 0 2px 4px -1px rgb(0 0 0 / 0.2), 0 4px 5px 0 rgb(0 0 0 / 0.14), 0 1px 10px 0 rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button:focus {\n box-shadow: 0 5px 5px -3px rgb(0 0 0 / 0.2), 0 8px 10px 1px rgb(0 0 0 / 0.14), 0 3px 14px 2px rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button:hover {\n box-shadow: 0 5px 5px -3px rgb(0 0 0 / 0.2), 0 8px 10px 1px rgb(0 0 0 / 0.14), 0 3px 14px 2px rgb(0 0 0 / 0.12);\n}\n\n.notificare .notificare__push-onboarding__floating-button--start {\n left: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--end {\n right: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--top {\n top: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--bottom {\n bottom: 0\n}\n\n.notificare .notificare__push-onboarding__floating-button__icon {\n fill: #000a64;\n width: 24px;\n height: 24px;\n}\n\n.notificare .notificare__push-onboarding__floating-button-tooltip {\n visibility: hidden;\n position: absolute;\n padding: 12px 24px;\n background-color: #fff;\n color: rgba(0, 0, 0, 0.87);\n border-radius: 8px;\n box-shadow: 0 5px 5px -3px rgb(0 0 0 / 0.2), 0 8px 10px 1px rgb(0 0 0 / 0.14), 0 3px 14px 2px rgb(0 0 0 / 0.12);\n opacity: 0;\n transition: opacity 0.3s;\n font-size: 14px;\n line-height: 20px;\n max-width: 274px;\n width: max-content;\n overflow-wrap: break-word;\n}\n\n.notificare .notificare__push-onboarding__floating-button--start .notificare__push-onboarding__floating-button-tooltip {\n left: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--end .notificare__push-onboarding__floating-button-tooltip {\n right: 0;\n}\n\n.notificare .notificare__push-onboarding__floating-button--top .notificare__push-onboarding__floating-button-tooltip {\n top: calc(100% + 16px);\n}\n\n.notificare .notificare__push-onboarding__floating-button--bottom .notificare__push-onboarding__floating-button-tooltip {\n bottom: calc(100% + 16px);\n}\n\n.notificare .notificare__push-onboarding__floating-button:hover .notificare__push-onboarding__floating-button-tooltip {\n visibility: visible;\n opacity: 1;\n}");const Js=gs({name:us({message:"Application property 'name' should be a string"}).optional(),websitePushConfig:gs({icon:us({message:"Application Website Push config property 'icon' should be a string"}).optional(),launchConfig:gs({applicationName:us({message:"Application Launch config property 'applicationName' should be a string"}).optional(),autoOnboardingOptions:gs({message:us({message:"Auto (dialog) onboarding options property 'message' is required and should be a string"}),cancelButton:us({message:"Auto (dialog) onboarding options property 'cancelButton' is required and should be a string"}),acceptButton:us({message:"Auto (dialog) onboarding options property 'acceptButton' is required and should be a string"})}).optional(),floatingButtonOptions:gs({alignment:gs({horizontal:ws(["start","end"],{errorMap:()=>({message:"Floating button horizontal alignment should be 'start' or 'end'"})}),vertical:ws(["top","bottom"],{errorMap:()=>({message:"Floating button vertical alignment should be 'top' or 'bottom'"})})}),permissionTexts:gs({default:us({message:"Floating button permission texts property 'default' is required and should be a string"}),granted:us({message:"Floating button permission texts property 'granted' is required and should be a string"}),denied:us({message:"Floating button permission texts property 'denied' is required and should be a string"})})}).optional()}).refine((e=>e.autoOnboardingOptions||e.floatingButtonOptions),{message:"Either 'floatingButtonOptions' or 'autoOnboardingOptions' must be present in the launch config options"})})});exports.NotificareInAppMessagePreview=function({inAppMessage:n,locale:i="en-US",translations:r}){const a=jn({locale:i,customTranslations:r,type:"in-app"}),o=t.useMemo((()=>Us.safeParse(n)),[n]);return e.jsxs("div",{className:"notificare",children:["success"===a.status&&e.jsx(Wt,{locale:a.data.locale,defaultLocale:"en-US",messages:a.data.translations,children:o.success?e.jsx(Rs,{inAppMessage:o.data}):e.jsx(Bs,{errors:o.error.errors})}),"error"===a.status&&e.jsx(Wt,{locale:"en-US",messages:gn,children:e.jsx(Cn,{message:a.error.message})})]})},exports.NotificareNotificationPreview=function({notification:n,applicationId:i,showControls:r=!0,variant:a="android-lockscreen",serviceKey:o,googleMapsAPIKey:s,locale:c="en-US",translations:l}){const p=jn({locale:c,customTranslations:l,type:"push"}),d=t.useMemo((()=>Ps.safeParse(n)),[n]);return e.jsxs("div",{className:"notificare",children:["success"===p.status&&e.jsx(Wt,{locale:p.data.locale,defaultLocale:"en-US",messages:p.data.translations,children:e.jsx(An,{serviceKey:o,googleMapsAPIKey:s,children:d.success?e.jsx(Ma,{notification:d.data,applicationId:i,showControls:r,variant:a}):e.jsx(Ms,{errors:d.error.errors})})}),"error"===p.status&&e.jsx(Wt,{locale:"en-US",messages:an,children:e.jsx(Cn,{message:p.error.message})})]})},exports.NotificarePushOnboardingPreview=function({applicationId:n,permissionStatus:i="default",applicationInfo:r,serviceKey:a,locale:o="en-US",translations:s}){const c=jn({locale:o,customTranslations:s,type:"onboarding"}),l=t.useMemo((()=>Js.safeParse(r)),[r]);return e.jsxs("div",{className:"notificare",children:["success"===c.status&&e.jsx(Wt,{locale:c.data.locale,defaultLocale:"en-US",messages:c.data.translations,children:l.success?e.jsx("div",{className:"notificare__push__preview",children:e.jsx(Xs,{applicationId:n,permissionStatus:i,applicationInfo:r,serviceKey:a})}):e.jsx(Ys,{errors:l.error.errors})}),"error"===c.status&&e.jsx(Wt,{locale:"en-US",messages:xn,children:e.jsx(Cn,{message:c.error.message})})]})};
10
10
  //# sourceMappingURL=index.js.map