1"use strict";(globalThis.webpackChunknikon_client=globalThis.webpackChunknikon_client||[]).push([[3077],{99485(e,t,n){n.r(t),n.d(t,{default:()=>s});var a=n(238),r=n(72825),i=n(66665),o=n(59471);const s=({applicationPendingTitle:e,applicationDeclinedBannerText:t,applicationDeclinedTitle:n,applicationDeclinedBody:s,applicationDeclinedReasons:l,applicationAbandonedBannerText:c,applicationAbandonedTitle:d,applicationAbandonedBody:p,orderSummary:u,purchaseEndpointUrl:m,retryCta:h,trackingData:y})=>{const[v,w]=(0,o.useState)(!1),[g,b]=(0,o.useState)(!1),[f,S]=(0,o.useState)(!1),[I,k]=(0,o.useState)(t),[E,O]=(0,o.useState)(n),[P,T]=(0,o.useState)(s),[j,z]=(0,o.useState)(l);return(0,o.useEffect)(()=>{(async()=>{const e=new URLSearchParams(window.location.search).get("status");if(!e)return w(!0),void(window.appInsights&&window.appInsights.trackEvent({name:"NovunaPaymentConfirmationNoStatus"}));const t=["accepted","referred"].includes(e);if((0,i.A)({event:"paymentInfoSubmit",ecommerce:{currency:y?.currencyCode,items:y?.products,value:u?.totalValue},is_valid:t,payment_method:"Novuna"}),["accepted","referred"].includes(e))try{const{data:{redirectionUrl:e}={}}=await(0,r.ZS)(m);if(e){const t=`${window.location.origin}${e}`;n=t,window.location.href=n}}catch(t){console.error({error:t}),window.appInsights&&t instanceof Error&&(window.appInsights.trackException({exception:t}),window.appInsights.trackEvent({name:"NovunaPaymentStatusReceived",properties:{status:e}})),w(!0),b(!0)}else S(!0),"abandoned"===e&&(k(c),O(d),T(p),z([])),window.appInsights&&window.appInsights.trackEvent({name:"NovunaPaymentResultFailed",properties:{status:e,purchaseEndpointUrl:m}});var n})()},[]),React.createElement(a.A,{hasError:v,hasFatalPaymentError:g,failedPayment:f,paymentPendingTitle:e,paymentFailedTitle:E,paymentFailedIntro:P,paymentFailedBannerText:I,paymentRejectedTitle:E,paymentRejectedIntro:P,paymentRejectedItems:j,retryCta:h,orderSummary:u})}},85393(e,t,n){n.d(t,{Zr:()=>d});Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var a=Object.defineProperty,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,s=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l=(e,t)=>{for(var n in t||(t={}))i.call(t,n)&&s(e,n,t[n]);if(r)for(var n of r(t))o.call(t,n)&&s(e,n,t[n]);return e};const c=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>c(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>c(t)(e)}}},d=(e,t)=>(n,a,r)=>{let i=l({getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>l(l({},t),e)},t);(i.blacklist||i.whitelist)&&console.warn(`The ${i.blacklist?"blacklist":"whitelist"} option is deprecated and will be removed in the next version. Please use the 'partialize' option instead.`);let o=!1;const s=new Set,d=new Set;let p;try{p=i.getStorage()}catch(e){}if(!p)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...e)},a,r);p.removeItem||console.warn(`[zustand persist middleware] The given storage for item '${i.name}' does not contain a 'removeItem' method, which will be required in v4.`);const u=c(i.serialize),m=()=>{const e=i.partialize(l({},a()));let t;i.whitelist&&Object.keys(e).forEach(t=>{var n;!(null==(n=i.whitelist)?void 0:n.includes(t))&&delete e[t]}),i.blacklist&&i.blacklist.forEach(t=>delete e[t]);const n=u({state:e,version:i.version}).then(e=>p.setItem(i.name,e)).catch(e=>{t=e});if(t)throw t;return n},h=r.setState;r.setState=(e,t)=>{h(e,t),m()};const y=e((...e)=>{n(...e),m()},a,r);let v;const w=()=>{var e;if(!p)return;o=!1,s.forEach(e=>e(a()));const t=(null==(e=i.onRehydrateStorage)?void 0:e.call(i,a()))||void 0;return c(p.getItem.bind(p))(i.name).then(e=>{if(e)return i.deserialize(e)}).then(e=>{if(e){if("number"!=typeof e.version||e.version===i.version)return e.state;if(i.migrate)return i.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return v=i.merge(e,null!=(t=a())?t:y),n(v,!0),m()}).then(()=>
1{null==t||t(v,void 0),o=!0,d.forEach(e=>e(v))}).catch(e=>{null==t||t(void 0,e)})};return r.persist={setOptions:e=>{i=l(l({},i),e),e.getStorage&&(p=e.getStorage())},clearStorage:()=>{var e;null==(e=null==p?void 0:p.removeItem)||e.call(p,i.name)},rehydrate:()=>w(),hasHydrated:()=>o,onHydrate:e=>(s.add(e),()=>{s.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},w(),v||y}}}]); 2//# sourceMappingURL=NovunaConfirmation-Chunk-c802e198741e4fc41905.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.