PageSourceSearch

https://www.monsterlegendsgame.com/_next/static/chunks/9849.215d629951d00d1c.js

js monsterlegendsgame.com collected 2026-10-02 15:47:31 UTC 9,235 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9849],{39849:(e,r,t)=>{t.r(r),t.d(r,{CodaCardElement:()=>v});var o=t(49717),n=t(13217),c=t(94872),a=t(24968),l=t(73505),i=t(60038),d=t(75645),u=t(36544);function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function m(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?s(Object(t),!0).forEach(function(r){(0,o.A)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}async function f(e){let r=new AbortController,t=setTimeout(()=>r.abort(),3e4);try{return await (0,u.Yv)(m(m({},e),{},{signal:r.signal}))}catch(e){if(e instanceof Error&&"AbortError"===e.name)throw console.error("CodaCard","settlement check timed out after ".concat(3e4,"ms")),Error(c.J.settlementTimeout);throw e}finally{clearTimeout(t)}}let p=e=>new Promise(r=>{setTimeout(r,e)});async function C(e){let r,t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{maxDurationMs:n=45e3,initialIntervalMs:c=500,maxIntervalMs:a=5e3,sleep:l=p,now:i=()=>performance.now()}=o,d=i()+n,u=c,s=0;for(;;){s+=1;try{let o=await f(e);if(r=o,t=void 0,"PENDING"!==o.status)return{verdict:o,attempts:s,timedOut:!1}}catch(e){t=e,console.error("CodaCard","poll #".concat(s," failed, will retry until deadline"),e)}if(i()+u>=d){if(!r)throw t;return{verdict:r,attempts:s,timedOut:!0}}await l(u),u=Math.min(2*u,a)}}var g=t(30469);function h(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function b(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?h(Object(t),!0).forEach(function(r){(0,o.A)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}let y=new Set(["settled","declined","unresolved"]),v=(0,n.forwardRef)((e,r)=>{let t,{clientSecret:o,withCardHolderEmail:u=!1,prefillEmail:s,sdkVersionOverride:m,locale:f,verifyArgs:p,onReady:h,onValidityChange:v,onProcessingChange:w,onComplete:O,onError:P}=e,E=(0,n.useId)(),k=(0,n.useMemo)(()=>"coda-card-".concat(E),[E]),j=(0,n.useRef)(null),S=(0,n.useRef)(null),_=(0,n.useRef)(void 0),T=(0,n.useRef)(0),x=(t=(0,n.use)(i.Wl),(0,n.useMemo)(()=>({fontFamily:"inherit",fontSize:"16px",fontWeight:"400",borderRadius:"8px",verticalSpacing:t["input.spacing.vertical"],horizontalSpacing:t["input.spacing.horizontal"],fieldBackgroundColor:t["input.main.background.color"],fieldTextColor:t["input.main.text.color"],fieldBorderColor:t["
1input.main.border.color"],fieldPlaceholderColor:t["input.placeholder.text.color"],fieldLabelColor:t["input.label.text.color"],fieldFocusBorderColor:t["input.focus.border.color"],titleColor:t["global.main.text.color"],backgroundColor:t["global.main.background.color"],checkBoxActiveBackgroundColor:t["input.focus.border.color"],checkBoxDeActiveBackgroundColor:t["input.main.background.color"],checkMarkColor:t["global.main.background.color"],checkBoxBorderWidth:"1px"}),[t])),D=(0,n.useRef)(x);(0,n.useEffect)(()=>{D.current=x});let{0:J,1:R}=(0,n.useState)(!1),{0:A,1:F}=(0,n.useState)("loading"),{0:I,1:N}=(0,n.useState)(!1),{0:B,1:M}=(0,n.useState)({}),L=(0,n.useRef)({onReady:h,onValidityChange:v,onProcessingChange:w,onComplete:O,onError:P,verifyArgs:p,phase:A});(0,n.useEffect)(()=>{L.current={onReady:h,onValidityChange:v,onProcessingChange:w,onComplete:O,onError:P,verifyArgs:p,phase:A}});let G=(0,n.useCallback)(()=>{console.error("CodaCard","no response within ".concat(45e3,"ms")),F("unresolved"),M({error:c.J.submitTimeout}),L.current.onProcessingChange(!1),L.current.onError(c.J.submitTimeout,l.v.timed_out)},[]),W=(0,n.useCallback)(()=>{let e=Math.min(45e3,T.current+9e4-performance.now());(clearTimeout(_.current),e<=0)?G():_.current=setTimeout(G,e)},[G]);(0,n.useImperativeHandle)(r,()=>({submit:()=>{let e=S.current;return!!e&&(!0!==e.isReady?(e.submit(),!1):(T.current=performance.now(),W(),e.submit(),!0))}}),[W]);let z=(0,n.useCallback)((e,r)=>{let t=!1,o=!1;e.on("validCardSubmitted",()=>{r()&&W()}),e.on("invalidCardSubmitted",()=>{r()&&(clearTimeout(_.current),L.current.onProcessingChange(!1))});let n=async()=>{let e=L.current.verifyArgs;if(!e){console.error("CodaCard","no txnId — cannot verify settlement"),F("declined"),M({error:c.J.settlementNoTxnId}),L.current.onProcessingChange(!1),L.current.onError(c.J.settlementNoTxnId,l.v.processing_error);return}try{let{verdict:o,attempts:n,timedOut:i}=await C(e);if(!r())return;if(L.current.onProcessingChange(!1),"SUCCESS"===o.status){F("settled"),L.current.onComplete();return}if("FAILED"===o.status){var t;F("declined"),M({error:c.J.declined(o.result_code),resultCode:o.result_code}),L.current.onError(c.J.declined(o.result_code),null!=(t=(0,a.P)(o.result_code))?t:l.v.generic_decline,{resultCode:o.result_code,resultDesc:o.result_desc});return}console.error("CodaCard","still PENDING after ".concat(n," polls (timedOut=").concat(i,")")),F("unresolved"),M({error:c.J.settlementStillPending,resultCode:o.result_code}),L.current.onError(c.J.settlementStillPending,l.v.timed_out,{resultCode:o.result_code,resultDesc:o.result_desc})}catch(e){if(console.error("CodaCard","settlement check failed",e),!r())return;F("unresolved"),M({error:e instanceof Error?e.message:c.J.settlementCheckFailed}),L.current.onProcessingChange(!1),L.current.onError(e instanceof Error?e.message:c.J.settlementCheckFailed,l.v.processing_error)}};e.on("userLoaded",()=>{r()&&(R(!0),F("ready"),L.current.onReady(!0))}),e.on("readyStateChange",e=>{r()&&L.current.onValidityChange(!0===e)}),e.on("processingCard",(e,a)=>{if(r()){if(clearTimeout(_.current),!0===e){if(F("verifying"),t){o=!0;return}n().catch(()=>{});return}L.current.onProcessingChange(!1),F("declined"),M({error:"string"==typeof a&&a?a:c.J.processingCardFailed}),console.error("CodaCard","processingCard — failed",{errorMessage:a}),L.current.onError("string"==typeof a&&a?a:c.J.processingCardFailed,l.v.generic_decline)}}),e.on("shopperActionRequired",e=>{r()&&(clearTimeout(_.current),!0===e&&(t=!0,N(!0),L.current.onProcessingChange(!0)))}),e.on("shopperActionAborted",()=>{r()&&(t=!1,o=!1,clearTimeout(_.current),N(!1),F("declined"),M({error:c.J.cardCancelled}),L.current.onProcessingChange(!1),L.current.onError(c.J.cardCancelled,l.v.generic_decline))}),e.on("shopperActionCompleted",()=>{r()&&(t=!1,N(!1),o&&(o=!1,n().catch(()=>{})))})},[W]),K=(0,n.useCallback)(()=>{"loading"===L.current.phase&&(console.error("CodaCard","no userLoaded within ".concat(15e3,"ms")),F("declined"),M({error:c.J.cardFormReadyTimeout}),L.current.onReady(!1))},[]),H=(0,n.useCallback)(e=>{console.error("CodaCard","init error",e),F("declined"),L.current.onReady(!1),L.current.onError(e instanceof Error?e.message:c.J.cardFormLoadFailed)},[]);return(0,n.useEffect)(()=>{let e=!0,r=()=>e;!async function(){try{let t=await (0,d.Sd)(m);if(!e||!j.current)return;let n=t().components({clientSecret:o,appearance:{customStyle:D.current}}).create("charge",b(b({withCardHolderEmail:u},u&&s?{prefillEmail:s}:{}),f?{locale:f}:{}));S.current=n,z(n,r),j.current&&(j.current.id=k,n.mount("#".concat(k)))}catch(r){if(!e)return;H(r)}}();let t=setTimeout(()=>{e&&K()},15e3);return()=>{clearTimeout(t),clearTimeout(_.current),e=!1,function(e){if("function"==typeof(null==e?void 0:e.unmount))try{e.unmount()}catch(e){console.error("CodaCard","unmount failed",e)}}(S.current),S.current=null}},[o,u,s,m,f,k,z,H,K]),(0,g.jsx)("div",{ref:j,className:"w-full","data-cod
1a-phase":A,"data-coda-locale":f,"data-coda-txn-id":null==p?void 0:p.txnId,"data-coda-challenge":I&&!y.has(A)?"open":void 0,"data-coda-error":B.error,"data-coda-result-code":B.resultCode,style:{minHeight:J?void 0:"220px"}})});v.displayName="CodaCardElement"},75645:(e,r,t)=>{t.d(r,{F1:()=>a,Sd:()=>c});let o=new Map;function n(e){let{src:r,getGlobal:t,name:n}=e,c=o.get(r);if(c)return c;let a=t();if(a){let e=Promise.resolve(a);return o.set(r,e),e}let l=new Promise((e,c)=>{let a=document.createElement("script");a.src=r,a.async=!0,a.onload=()=>{let l=t();l?e(l):(o.delete(r),a.remove(),c(Error("".concat(n," loaded but did not define its global"))))},a.onerror=()=>{o.delete(r),a.remove(),c(Error("Failed to load ".concat(n)))},document.head.appendChild(a)});return o.set(r,l),l}function c(e){var r;return n({src:(r=l(e,"8.10.0"),"https://js.codapayments.com/".concat(r,"/coda-card.min.js")),getGlobal:()=>window.CodaCard,name:"Coda Card SDK"})}function a(e){var r;return n({src:(r=l(e,"1.7.0"),"https://hosted-component.codapayments.com/".concat(r,"/hosted-component.min.js")),getGlobal:()=>window.CodaComponent,name:"Coda Wallet SDK"})}function l(e,r){return e?/^\d+\.\d+\.\d+$/.test(e)?e:(console.error('Ignoring malformed Coda SDK version override: "'.concat(e,'"')),r):r}}}]);

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.