choco-one-click-payment 1.1.51 → 1.1.52
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/index.esm.js +3 -3
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5276,7 +5276,7 @@ function Bi(e) {
|
|
|
5276
5276
|
transport: ui,
|
|
5277
5277
|
stackParser: vi,
|
|
5278
5278
|
integrations: [],
|
|
5279
|
-
release: "1.1.
|
|
5279
|
+
release: "1.1.52",
|
|
5280
5280
|
environment: e.environment || "production"
|
|
5281
5281
|
}), n = new ce();
|
|
5282
5282
|
n.setClient(t), n.setTags(e), t.init(), wt = n;
|
|
@@ -5750,7 +5750,7 @@ function zi(e) {
|
|
|
5750
5750
|
loading: e.loading,
|
|
5751
5751
|
showFreedomBtn: !e.config.isFridge && e.config.onFreedomLink !== null,
|
|
5752
5752
|
freedomAmountFormatted: $(
|
|
5753
|
-
Math.round(l * 0.
|
|
5753
|
+
Math.round(l * 0.94),
|
|
5754
5754
|
e.config.locale,
|
|
5755
5755
|
e.config.currency
|
|
5756
5756
|
),
|
|
@@ -5824,7 +5824,7 @@ function Je(e) {
|
|
|
5824
5824
|
t.textContent = P, t.setAttribute("aria-label", P);
|
|
5825
5825
|
}
|
|
5826
5826
|
const y = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-freedom-card-btn");
|
|
5827
|
-
if (y && (y.textContent = `от ${$(Math.round(c * 0.
|
|
5827
|
+
if (y && (y.textContent = `от ${$(Math.round(c * 0.94), e.config.locale, e.config.currency)} по карте Freedom`), r && (r.textContent = `${e.t("total")} ${u}`), !l) {
|
|
5828
5828
|
o == null || o.remove();
|
|
5829
5829
|
return;
|
|
5830
5830
|
}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
`);for(let u=r;u<c.length;u++){const l=c[u];if(l.length>1024)continue;const h=un.test(l)?l.replace(un,"$1"):l;if(!h.match(/\S*Error: /)){for(const y of t){const m=y(h);if(m){i.push(m);break}}if(i.length>=cn+o)break}}return qr(i.slice(o))}}function qr(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Ke(t).function||"")&&t.pop(),t.reverse(),ln.test(Ke(t).function||"")&&(t.pop(),ln.test(Ke(t).function||"")&&t.pop()),t.slice(0,cn).map(n=>({...n,filename:n.filename||Ke(t).filename,function:n.function||ye}))}function Ke(e){return e[e.length-1]||{}}const yt="<anonymous>";function zr(e){try{return!e||typeof e!="function"?yt:e.name||yt}catch{return yt}}function mt(){return Ct(j),j}function Ct(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ae,t[Ae]=t[Ae]||{}}const An=Object.prototype.toString;function dn(e){switch(An.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ye(e,Error)}}function _e(e,t){return An.call(e)===`[object ${t}]`}function fn(e){return _e(e,"ErrorEvent")}function hn(e){return _e(e,"DOMError")}function Kr(e){return _e(e,"DOMException")}function pn(e){return _e(e,"String")}function bt(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Gr(e){return e===null||bt(e)||typeof e!="object"&&typeof e!="function"}function me(e){return _e(e,"Object")}function Ge(e){return typeof Event<"u"&&Ye(e,Event)}function Wr(e){return typeof Element<"u"&&Ye(e,Element)}function We(e){return!!(e&&e.then&&typeof e.then=="function")}function Yr(e){return me(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ye(e,t){try{return e instanceof t}catch{return!1}}function Vr(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const Zr=j,$r=80;function eo(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let i=0,c=0;const u=" > ",l=u.length;let h;const y=Array.isArray(t)?t:t.keyAttrs,m=!Array.isArray(t)&&t.maxStringLength||$r;for(;n&&i++<r&&(h=to(n,y),!(h==="html"||i>1&&c+o.length*l+h.length>=m));)o.push(h),c+=h.length,n=n.parentNode;return o.reverse().join(u)}catch{return"<unknown>"}}function to(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Zr.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=t&&t.length?t.filter(c=>n.getAttribute(c)).map(c=>[c,n.getAttribute(c)]):null;if(o&&o.length)o.forEach(c=>{r.push(`[${c[0]}="${c[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const c=n.className;if(c&&pn(c)){const u=c.split(/\s+/);for(const l of u)r.push(`.${l}`)}}const i=["aria-label","type","name","title","alt"];for(const c of i){const u=n.getAttribute(c);u&&r.push(`[${c}="${u}"]`)}return r.join("")}function Qe(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function gn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{gt&&N.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function yn(e){if(dn(e))return{message:e.message,name:e.name,stack:e.stack,...Cn(e)};if(Ge(e)){const t={type:e.type,target:mn(e.target),currentTarget:mn(e.currentTarget),...Cn(e)};return typeof CustomEvent<"u"&&Ye(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function mn(e){try{return Wr(e)?eo(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Cn(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function no(e,t=40){const n=Object.keys(yn(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Qe(r,t);for(let o=n.length;o>0;o--){const i=n.slice(0,o).join(", ");if(!(i.length>t))return o===n.length?i:Qe(i,t)}return""}function Y(e){return Et(e,new Map)}function Et(e,t){if(ro(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const o of Object.getOwnPropertyNames(e))typeof e[o]<"u"&&(r[o]=Et(e[o],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(o=>{r.push(Et(o,t))}),r}return e}function ro(e){if(!me(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const bn=1e3;function Ve(){return Date.now()/bn}function oo(){const{performance:e}=j;if(!e||!e.now)return Ve;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/bn}const En=oo();(()=>{const{performance:e}=j;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=o<t,c=e.timing&&e.timing.navigationStart,l=typeof c=="number"?Math.abs(c+n-r):t,h=l<t;return i||h?o<=l?e.timeOrigin:c:r})();function ee(){const e=j,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function so(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function vn(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function ke(e,t){const n=so(e);if(!n)return;const r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){const i={...o&&o.data,...t.data};n.mechanism.data=i}}function In(e){if(io(e))return!0;try{gn(e,"__sentry_captured__",!0)}catch{}return!1}function io(e){try{return e.__sentry_captured__}catch{}}var ne;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(ne||(ne={}));function de(e){return new W(t=>{t(e)})}function Ze(e){return new W((t,n)=>{n(e)})}class W{constructor(t){W.prototype.__init.call(this),W.prototype.__init2.call(this),W.prototype.__init3.call(this),W.prototype.__init4.call(this),this._state=ne.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new W((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(c){o(c)}},i=>{if(!n)o(i);else try{r(n(i))}catch(c){o(c)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new W((n,r)=>{let o,i;return this.then(c=>{i=!1,o=c,t&&t()},c=>{i=!0,o=c,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}__init(){this._resolve=t=>{this._setResult(ne.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(ne.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===ne.PENDING){if(We(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===ne.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===ne.RESOLVED&&n[1](this._value),this._state===ne.REJECTED&&n[2](this._value),n[0]=!0)})}}}function vt(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||En(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ee()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Bn(){return ee()}function It(){return ee().substring(16)}function $e(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const r={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=$e(r[o],t[o],n-1));return r}const Bt="_sentrySpan";function Sn(e,t){t?gn(e,Bt,t):delete e[Bt]}function _n(e){return e[Bt]}const ao=100;class St{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Bn(),spanId:It()}}clone(){const t=new St;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Sn(t,_n(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&vt(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,o]=n instanceof ae?[n.getScopeData(),n.getRequestSession()]:me(n)?[t,t.requestSession]:[],{tags:i,extra:c,user:u,contexts:l,level:h,fingerprint:y=[],propagationContext:m}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...c},this._contexts={...this._contexts,...l},u&&Object.keys(u).length&&(this._user=u),h&&(this._level=h),y.length&&(this._fingerprint=y),m&&(this._propagationContext=m),o&&(this._requestSession=o),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Sn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Bn()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:ao;if(r<=0)return this;const o={timestamp:Ve(),...t};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:_n(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=$e(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:It(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:ee();if(!this._client)return N.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r&&r.event_id?r.event_id:ee();if(!this._client)return N.warn("No client configured on scope - will not capture message!"),o;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o},this),o}captureEvent(t,n){const r=n&&n.event_id?n.event_id:ee();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(N.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const ae=St;function co(){return qe("defaultCurrentScope",()=>new ae)}function uo(){return qe("defaultIsolationScope",()=>new ae)}class lo{constructor(t,n){let r;t?r=t:r=new ae;let o;n?o=n:o=new ae,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(o){throw this._popScope(),o}return We(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Ce(){const e=mt(),t=Ct(e);return t.stack=t.stack||new lo(co(),uo())}function Ao(e){return Ce().withScope(e)}function fo(e,t){const n=Ce();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Qn(e){return Ce().withScope(()=>e(Ce().getIsolationScope()))}function ho(){return{withIsolationScope:Qn,withScope:Ao,withSetScope:fo,withSetIsolationScope:(e,t)=>Qn(t),getCurrentScope:()=>Ce().getScope(),getIsolationScope:()=>Ce().getIsolationScope()}}function kn(e){const t=Ct(e);return t.acs?t.acs:ho()}function Pn(){const e=mt();return kn(e).getCurrentScope()}function po(){const e=mt();return kn(e).getIsolationScope()}function go(){return qe("globalScope",()=>new ae)}function _t(){return Pn().getClient()}function yo(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:o}=t;return Y({trace_id:n,span_id:r,parent_span_id:o})}const mo="_sentryMetrics";function Co(e){const t=e[mo];if(!t)return;const n={};for(const[,[r,o]]of t)(n[r]||(n[r]=[])).push(Y(o));return n}const bo="sentry.source",Eo="sentry.sample_rate",vo="sentry.op",Io="sentry.origin",Bo=0,So=1,_o="sentry-",Qo=/^sentry-/;function ko(e){const t=Po(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,i])=>{if(o.match(Qo)){const c=o.slice(_o.length);r[c]=i}return r},{});if(Object.keys(n).length>0)return n}function Po(e){if(!(!e||!pn(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=wn(n);return Object.entries(r).forEach(([o,i])=>{t[o]=i}),t},{}):wn(e)}function wn(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}const wo=1;let Tn=!1;function To(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Qt(e).parent_span_id,i=r?It():t;return Y({parent_span_id:o,span_id:i,trace_id:n})}function Ln(e){return typeof e=="number"?Rn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Rn(e.getTime()):En()}function Rn(e){return e>9999999999?e/1e3:e}function Qt(e){if(Ro(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(Lo(e)){const{attributes:r,startTime:o,name:i,endTime:c,parentSpanId:u,status:l}=e;return Y({span_id:t,trace_id:n,data:r,description:i,parent_span_id:u,start_timestamp:Ln(o),timestamp:Ln(c)||void 0,status:No(l),op:r[vo],origin:r[Io],_metrics_summary:Co(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Lo(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Ro(e){return typeof e.getSpanJSON=="function"}function Oo(e){const{traceFlags:t}=e.spanContext();return t===wo}function No(e){if(!(!e||e.code===Bo))return e.code===So?"ok":e.message||"unknown_error"}const Do="_sentryRootSpan";function On(e){return e[Do]||e}function Mo(){Tn||(ze(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),Tn=!0)}function xo(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=_t(),n=t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}const Nn="production",Uo="_frozenDsc";function Dn(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o=Y({environment:n.environment||Nn,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",o),o}function Fo(e,t){const n=t.getPropagationContext();return n.dsc||Dn(n.traceId,e)}function Xo(e){const t=_t();if(!t)return{};const n=On(e),r=n[Uo];if(r)return r;const o=n.spanContext().traceState,i=o&&o.get("sentry.dsc"),c=i&&ko(i);if(c)return c;const u=Dn(e.spanContext().traceId,t),l=Qt(n),h=l.data||{},y=h[Eo];y!=null&&(u.sample_rate=`${y}`);const m=h[bo],b=l.description;return m!=="url"&&b&&(u.transaction=b),xo()&&(u.sampled=String(Oo(n))),t.emit("createDsc",u,n),u}function Ho(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){U&&N.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}const jo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Jo(e){return e==="http"||e==="https"}function et(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:c,protocol:u,publicKey:l}=e;return`${u}://${l}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${c}`}function qo(e){const t=jo.exec(e);if(!t){ze(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",i="",c="",u=""]=t.slice(1);let l="",h=u;const y=h.split("/");if(y.length>1&&(l=y.slice(0,-1).join("/"),h=y.pop()),h){const m=h.match(/^\d+/);m&&(h=m[0])}return Mn({host:i,pass:o,path:l,projectId:h,port:c,protocol:n,publicKey:r})}function Mn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function zo(e){if(!gt)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(c=>e[c]?!1:(N.error(`Invalid Sentry Dsn: ${c} missing`),!0))?!1:n.match(/^\d+$/)?Jo(r)?t&&isNaN(parseInt(t,10))?(N.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(N.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(N.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ko(e){const t=typeof e=="string"?qo(e):Mn(e);if(!(!t||!zo(t)))return t}function Go(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(o){if(e)return t.has(o)?!0:(t.add(o),!1);for(let i=0;i<t.length;i++)if(t[i]===o)return!0;return t.push(o),!1}function r(o){if(e)t.delete(o);else for(let i=0;i<t.length;i++)if(t[i]===o){t.splice(i,1);break}}return[n,r]}function re(e,t=100,n=1/0){try{return kt("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function xn(e,t=3,n=100*1024){const r=re(e,t);return Zo(r)>n?xn(e,t-1,n):r}function kt(e,t,n=1/0,r=1/0,o=Go()){const[i,c]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const u=Wo(e,t);if(!u.startsWith("[object "))return u;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return u.replace("object ","");if(i(t))return"[Circular ~]";const h=t;if(h&&typeof h.toJSON=="function")try{const I=h.toJSON();return kt("",I,l-1,r,o)}catch{}const y=Array.isArray(t)?[]:{};let m=0;const b=yn(t);for(const I in b){if(!Object.prototype.hasOwnProperty.call(b,I))continue;if(m>=r){y[I]="[MaxProperties ~]";break}const B=b[I];y[I]=kt(I,B,l-1,r,o),m++}return c(t),y}function Wo(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Vr(t))return"[VueViewModel]";if(Yr(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${zr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Yo(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Yo(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Vo(e){return~-encodeURI(e).split(/%..|./).length}function Zo(e){return Vo(JSON.stringify(e))}function Pe(e,t=[]){return[e,t]}function $o(e,t){const[n,r]=e;return[n,[...r,t]]}function Un(e,t){const n=e[1];for(const r of n){const o=r[0].type;if(t(r,o))return!0}return!1}function Pt(e){return j.__SENTRY__&&j.__SENTRY__.encodePolyfill?j.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function es(e){const[t,n]=e;let r=JSON.stringify(t);function o(i){typeof r=="string"?r=typeof i=="string"?r+i:[Pt(r),i]:r.push(typeof i=="string"?Pt(i):i)}for(const i of n){const[c,u]=i;if(o(`
|
|
6
6
|
${JSON.stringify(c)}
|
|
7
7
|
`),typeof u=="string"||u instanceof Uint8Array)o(u);else{let l;try{l=JSON.stringify(u)}catch{l=JSON.stringify(re(u))}o(l)}}return typeof r=="string"?r:ts(r)}function ts(e){const t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function ns(e){const t=typeof e.data=="string"?Pt(e.data):e.data;return[Y({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const rs={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Fn(e){return rs[e]}function Xn(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function os(e,t,n,r){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:et(r)},...o&&{trace:Y({...o})}}}function ss(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function is(e,t,n,r){const o=Xn(n),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:et(t)}},c="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Pe(i,[c])}function as(e,t,n,r){const o=Xn(n),i=e.type&&e.type!=="replay_event"?e.type:"event";ss(e,n&&n.sdk);const c=os(e,o,r,t);return delete e.sdkProcessingMetadata,Pe(c,[[{type:i},e]])}function wt(e,t,n,r=0){return new W((o,i)=>{const c=e[r];if(t===null||typeof c!="function")o(t);else{const u=c({...t},n);U&&c.id&&u===null&&N.log(`Event processor "${c.id}" dropped event`),We(u)?u.then(l=>wt(e,l,n,r+1).then(o)).then(null,i):wt(e,u,n,r+1).then(o).then(null,i)}})}let tt,Hn,nt;function cs(e){const t=j._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return nt&&n.length===Hn||(Hn=n.length,nt=n.reduce((r,o)=>{tt||(tt={});const i=tt[o];if(i)r[i[0]]=i[1];else{const c=e(o);for(let u=c.length-1;u>=0;u--){const l=c[u],h=l&&l.filename,y=t[o];if(h&&y){r[h]=y,tt[o]=[h,y];break}}}return r},{})),nt}function us(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;ls(e,t),r&&fs(e,r),hs(e,n),As(e,o),ds(e,i)}function jn(e,t){const{extra:n,tags:r,user:o,contexts:i,level:c,sdkProcessingMetadata:u,breadcrumbs:l,fingerprint:h,eventProcessors:y,attachments:m,propagationContext:b,transactionName:I,span:B}=t;rt(e,"extra",n),rt(e,"tags",r),rt(e,"user",o),rt(e,"contexts",i),e.sdkProcessingMetadata=$e(e.sdkProcessingMetadata,u,2),c&&(e.level=c),I&&(e.transactionName=I),B&&(e.span=B),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),h.length&&(e.fingerprint=[...e.fingerprint,...h]),y.length&&(e.eventProcessors=[...e.eventProcessors,...y]),m.length&&(e.attachments=[...e.attachments,...m]),e.propagationContext={...e.propagationContext,...b}}function rt(e,t,n){e[t]=$e(e[t],n,1)}function ls(e,t){const{extra:n,tags:r,user:o,contexts:i,level:c,transactionName:u}=t,l=Y(n);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const h=Y(r);h&&Object.keys(h).length&&(e.tags={...h,...e.tags});const y=Y(o);y&&Object.keys(y).length&&(e.user={...y,...e.user});const m=Y(i);m&&Object.keys(m).length&&(e.contexts={...m,...e.contexts}),c&&(e.level=c),u&&e.type!=="transaction"&&(e.transaction=u)}function As(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ds(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function fs(e,t){e.contexts={trace:To(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Xo(t),...e.sdkProcessingMetadata};const n=On(t),r=Qt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function hs(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function ps(e,t,n,r,o,i){const{normalizeDepth:c=3,normalizeMaxBreadth:u=1e3}=e,l={...t,event_id:t.event_id||n.event_id||ee(),timestamp:t.timestamp||Ve()},h=n.integrations||e.integrations.map(S=>S.name);gs(l,e),Cs(l,h),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&ys(l,e.stackParser);const y=Es(r,n.captureContext);n.mechanism&&ke(l,n.mechanism);const m=o?o.getEventProcessors():[],b=go().getScopeData();if(i){const S=i.getScopeData();jn(b,S)}if(y){const S=y.getScopeData();jn(b,S)}const I=[...n.attachments||[],...b.attachments];I.length&&(n.attachments=I),us(l,b);const B=[...m,...b.eventProcessors];return wt(B,l,n).then(S=>(S&&ms(S),typeof c=="number"&&c>0?bs(S,c,u):S))}function gs(e,t){const{environment:n,release:r,dist:o,maxValueLength:i=250}=t;e.environment=e.environment||n||Nn,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o),e.message&&(e.message=Qe(e.message,i));const c=e.exception&&e.exception.values&&e.exception.values[0];c&&c.value&&(c.value=Qe(c.value,i));const u=e.request;u&&u.url&&(u.url=Qe(u.url,i))}function ys(e,t){const n=cs(t);try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(o=>{n&&o.filename&&(o.debug_id=n[o.filename])})})}catch{}}function ms(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function Cs(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function bs(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:re(o.data,t,n)}}))},...e.user&&{user:re(e.user,t,n)},...e.contexts&&{contexts:re(e.contexts,t,n)},...e.extra&&{extra:re(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=re(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:re(o.data,t,n)}}))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=re(e.contexts.flags,3,n)),r}function Es(e,t){if(!t)return e;const n=e?e.clone():new ae;return n.update(t),n}const vs="7";function Is(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Bs(e){return`${Is(e)}${e.projectId}/envelope/`}function Ss(e,t){const n={sentry_version:vs};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function _s(e,t,n){return t||`${Bs(e)}?${Ss(e,n)}`}const Jn=[];function Qs(e,t){const n={};return t.forEach(r=>{r&&zn(e,r,n)}),n}function qn(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function zn(e,t,n){if(n[t.name]){U&&N.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Jn.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Jn.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>r(o,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((i,c)=>r(i,c,e),{id:t.name});e.addEventProcessor(o)}U&&N.log(`Integration installed: ${t.name}`)}function ks(e,t,n){const r=[{type:"client_report"},{timestamp:Ve(),discarded_events:e}];return Pe(t?{dsn:t}:{},[r])}class V extends Error{constructor(t,n="warn"){super(t),this.message=t,this.logLevel=n}}const Kn="Not capturing exception because it's already been captured.";class Ps{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Ko(t.dsn):U&&N.warn("No DSN provided, client will not send events."),this._dsn){const o=_s(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:o})}const r=["enableTracing","tracesSampleRate","tracesSampler"].find(o=>o in t&&t[o]==null);r&&ze(()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(t,n,r){const o=ee();if(In(t))return U&&N.log(Kn),o;const i={event_id:o,...n};return this._process(this.eventFromException(t,i).then(c=>this._captureEvent(c,i,r))),i.event_id}captureMessage(t,n,r,o){const i={event_id:ee(),...r},c=bt(t)?t:String(t),u=Gr(t)?this.eventFromMessage(c,n,i):this.eventFromException(t,i);return this._process(u.then(l=>this._captureEvent(l,i,o))),i.event_id}captureEvent(t,n,r){const o=ee();if(n&&n.originalException&&In(n.originalException))return U&&N.log(Kn),o;const i={event_id:o,...n},u=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,u||r)),i.event_id}captureSession(t){typeof t.release!="string"?U&&N.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),vt(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(o=>r&&o))):de(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];zn(this,t,this._integrations),n||qn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=as(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=$o(r,ns(i));const o=this.sendEnvelope(r);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=is(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const o=typeof r=="number"?r:1,i=`${t}:${n}`;U&&N.log(`Recording outcome: "${i}"${o>1?` (${o} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+o}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const o=r.indexOf(n);o>-1&&r.splice(o,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(U&&N.error("Error while sending envelope:",n),n)):(U&&N.error("Transport disabled"),de({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Qs(this,t),qn(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1;const i=n.exception&&n.exception.values;if(i){o=!0;for(const l of i){const h=l.mechanism;if(h&&h.handled===!1){r=!0;break}}}const c=t.status==="ok";(c&&t.errors===0||c&&r)&&(vt(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new W(n=>{let r=0;const o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=o,t&&r>=t&&(clearInterval(i),n(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r=Pn(),o=po()){const i=this.getOptions(),c=Object.keys(this._integrations);return!n.integrations&&c.length>0&&(n.integrations=c),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),ps(i,t,n,r,this,o).then(u=>{if(u===null)return u;u.contexts={trace:yo(r),...u.contexts};const l=Fo(this,r);return u.sdkProcessingMetadata={dynamicSamplingContext:l,...u.sdkProcessingMetadata},u})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(o=>o.event_id,o=>{U&&(o instanceof V&&o.logLevel==="log"?N.log(o.message):N.warn(o))})}_processEvent(t,n,r){const o=this.getOptions(),{sampleRate:i}=o,c=Wn(t),u=Gn(t),l=t.type||"error",h=`before send for type \`${l}\``,y=typeof i>"u"?void 0:Ho(i);if(u&&typeof y=="number"&&Math.random()>y)return this.recordDroppedEvent("sample_rate","error",t),Ze(new V(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const m=l==="replay_event"?"replay":l,I=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,I).then(B=>{if(B===null)throw this.recordDroppedEvent("event_processor",m,t),new V("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return B;const S=Ts(this,o,B,n);return ws(S,h)}).then(B=>{if(B===null){if(this.recordDroppedEvent("before_send",m,t),c){const k=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",k)}throw new V(`${h} returned \`null\`, will not send event.`,"log")}const Q=r&&r.getSession();if(!c&&Q&&this._updateSessionFromEvent(Q,B),c){const P=B.sdkProcessingMetadata&&B.sdkProcessingMetadata.spanCountBeforeProcessing||0,k=B.spans?B.spans.length:0,R=P-k;R>0&&this.recordDroppedEvent("before_send","span",R)}const S=B.transaction_info;if(c&&S&&B.transaction!==t.transaction){const P="custom";B.transaction_info={...S,source:P}}return this.sendEvent(B,n),B}).then(null,B=>{throw B instanceof V?B:(this.captureException(B,{data:{__sentry__:!0},originalException:B}),new V(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
8
|
-
Reason: ${B}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){U&&N.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){U&&N.log("No outcomes to send");return}if(!this._dsn){U&&N.log("No dsn provided, will not send outcomes");return}U&&N.log("Sending outcomes:",t);const n=ks(t,this._options.tunnel&&et(this._dsn));this.sendEnvelope(n)}}function ws(e,t){const n=`${t} must return \`null\` or a valid event.`;if(We(e))return e.then(r=>{if(!me(r)&&r!==null)throw new V(n);return r},r=>{throw new V(`${t} rejected with ${r}`)});if(!me(e)&&e!==null)throw new V(n);return e}function Ts(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:c}=t;if(Gn(n)&&o)return o(n,r);if(Wn(n)){if(n.spans&&c){const u=[];for(const l of n.spans){const h=c(l);h?u.push(h):(Mo(),e.recordDroppedEvent("before_send","span"))}n.spans=u}if(i){if(n.spans){const u=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return i(n,r)}}return n}function Gn(e){return e.type===void 0}function Wn(e){return e.type==="transaction"}function Ls(e){const t=[];function n(){return e===void 0||t.length<e}function r(c){return t.splice(t.indexOf(c),1)[0]||Promise.resolve(void 0)}function o(c){if(!n())return Ze(new V("Not adding Promise because buffer limit was reached."));const u=c();return t.indexOf(u)===-1&&t.push(u),u.then(()=>r(u)).then(null,()=>r(u).then(null,()=>{})),u}function i(c){return new W((u,l)=>{let h=t.length;if(!h)return u(!0);const y=setTimeout(()=>{c&&c>0&&u(!1)},c);t.forEach(m=>{de(m).then(()=>{--h||(clearTimeout(y),u(!0))},l)})})}return{$:t,add:o,drain:i}}const Rs=60*1e3;function Os(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Rs:r-t}function Ns(e,t){return e[t]||e.all||0}function Ds(e,t,n=Date.now()){return Ns(e,t)>n}function Ms(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},i=n&&n["x-sentry-rate-limits"],c=n&&n["retry-after"];if(i)for(const u of i.trim().split(",")){const[l,h,,,y]=u.split(":",5),m=parseInt(l,10),b=(isNaN(m)?60:m)*1e3;if(!h)o.all=r+b;else for(const I of h.split(";"))I==="metric_bucket"?(!y||y.split(";").includes("custom"))&&(o[I]=r+b):o[I]=r+b}else c?o.all=r+Os(c,r):t===429&&(o.all=r+60*1e3);return o}const xs=64;function Us(e,t,n=Ls(e.bufferSize||xs)){let r={};const o=c=>n.drain(c);function i(c){const u=[];if(Un(c,(m,b)=>{const I=Fn(b);if(Ds(r,I)){const B=Yn(m,b);e.recordDroppedEvent("ratelimit_backoff",I,B)}else u.push(m)}),u.length===0)return de({});const l=Pe(c[0],u),h=m=>{Un(l,(b,I)=>{const B=Yn(b,I);e.recordDroppedEvent(m,Fn(I),B)})},y=()=>t({body:es(l)}).then(m=>(m.statusCode!==void 0&&(m.statusCode<200||m.statusCode>=300)&&U&&N.warn(`Sentry responded with status code ${m.statusCode} to sent event.`),r=Ms(r,m),m),m=>{throw h("network_error"),m});return n.add(y).then(m=>m,m=>{if(m instanceof V)return U&&N.error("Skipped sending event because buffer is full."),h("queue_overflow"),de({});throw m})}return{send:i,flush:o}}function Yn(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Fs(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Ae})),version:Ae}),e._metadata=o}function Xs(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Hs(){return"npm"}const ot=j,js=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Vn(e,t){const n=Lt(e,t),r={type:Gs(t),value:Ws(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Js(e,t,n,r){const o=_t(),i=o&&o.getOptions().normalizeDepth,c=ti(t),u={__serialized__:xn(t,i)};if(c)return{exception:{values:[Vn(e,c)]},extra:u};const l={exception:{values:[{type:Ge(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:$s(t,{isUnhandledRejection:r})}]},extra:u};if(n){const h=Lt(e,n);h.length&&(l.exception.values[0].stacktrace={frames:h})}return l}function Tt(e,t){return{exception:{values:[Vn(e,t)]}}}function Lt(e,t){const n=t.stacktrace||t.stack||"",r=zs(t),o=Ks(t);try{return e(n,r,o)}catch{}return[]}const qs=/Minified React error #\d+;/i;function zs(e){return e&&qs.test(e.message)?1:0}function Ks(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Zn(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Gs(e){const t=e&&e.name;return!t&&Zn(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Ws(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:Zn(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function Ys(e,t,n,r){const o=n&&n.syntheticException||void 0,i=Zs(e,t,o,r);return ke(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),de(i)}function Vs(e,t,n="info",r,o){const i=r&&r.syntheticException||void 0,c=Rt(e,t,i,o);return c.level=n,r&&r.event_id&&(c.event_id=r.event_id),de(c)}function Zs(e,t,n,r,o){let i;if(fn(t)&&t.error)return Tt(e,t.error);if(hn(t)||Kr(t)){const c=t;if("stack"in t)i=Tt(e,t);else{const u=c.name||(hn(c)?"DOMError":"DOMException"),l=c.message?`${u}: ${c.message}`:u;i=Rt(e,l,n,r),vn(i,l)}return"code"in c&&(i.tags={...i.tags,"DOMException.code":`${c.code}`}),i}return dn(t)?Tt(e,t):me(t)||Ge(t)?(i=Js(e,t,n,o),ke(i,{synthetic:!0}),i):(i=Rt(e,t,n,r),vn(i,`${t}`),ke(i,{synthetic:!0}),i)}function Rt(e,t,n,r){const o={};if(r&&n){const i=Lt(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),ke(o,{synthetic:!0})}if(bt(t)){const{__sentry_template_string__:i,__sentry_template_values__:c}=t;return o.logentry={message:i,params:c},o}return o.message=t,o}function $s(e,{isUnhandledRejection:t}){const n=no(e),r="exception";return fn(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ge(e)?`Event \`${ei(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function ei(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ti(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function ni(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:et(r)}},i=ri(e);return Pe(o,[i])}function ri(e){return[{type:"user_report"},e]}class oi extends Ps{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=ot.SENTRY_SDK_SOURCE||Hs();Fs(n,"browser",["browser"],r),super(n),n.sendClientReports&&ot.document&&ot.document.addEventListener("visibilitychange",()=>{ot.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Ys(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Vs(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){js&&N.warn("SDK not enabled, will not capture user feedback.");return}const n=ni(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const si=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,st=j,it={};function ii(e){const t=it[e];if(t)return t;let n=st[e];if(Xs(n))return it[e]=n.bind(st);const r=st.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch(o){si&&N.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(it[e]=n.bind(st))}function $n(e){it[e]=void 0}function ai(e,t=ii("fetch")){let n=0,r=0;function o(i){const c=i.body.length;n+=c,r++;const u={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return $n("fetch"),Ze("No fetch implementation available");try{return t(e.url,u).then(l=>(n-=c,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return $n("fetch"),n-=c,r--,Ze(l)}}return Us(e,o)}const ci=30,ui=50;function Ot(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?ye:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const li=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ai=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,di=/\((\S*)(?::(\d+))(?::(\d+))\)/,fi=[ci,e=>{const t=li.exec(e);if(t){const[,r,o,i]=t;return Ot(r,ye,+o,+i)}const n=Ai.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const c=di.exec(n[2]);c&&(n[2]=c[1],n[3]=c[2],n[4]=c[3])}const[o,i]=er(n[1]||ye,n[2]);return Ot(i,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],hi=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,pi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gi=Jr(...[fi,[ui,e=>{const t=hi.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=pi.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||ye;return[o,r]=er(o,r),Ot(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),er=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ye,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},yi="https://bbed26c9265c425abb56ff9d3728183e@sentry.chocodev.kz/302";let Nt=null;function mi(e){const t=new oi({dsn:yi,transport:ai,stackParser:gi,integrations:[],release:"1.1.51",environment:e.environment||"production"}),n=new ae;n.setClient(t),n.setTags(e),t.init(),Nt=n}function oe(e,t){Nt&&Nt.captureException(e,t?{captureContext:{extra:t}}:void 0)}function at(e,t){ht("webPayToken",e),t&&ht("webPayRefreshToken",t)}function tr(){Xe("webPayToken"),Xe("webPayRefreshToken")}async function Ci(e){const t=en("webPayRefreshToken");if(t&&e.config.clientId)try{const n=await Or(e.apiUrl,e.config.clientId,t);at(n.access_token,n.refresh_token),e.accessToken=n.access_token;return}catch{Xe("webPayRefreshToken")}if(!e.config.clientId){e.config.onError({attributes:{message:e.t("errorMissingTrackClient")}});return}if(!e.config.trackId&&typeof e.config.onRequestNewTrackId=="function"&&(e.config.trackId=await e.config.onRequestNewTrackId()),!e.config.trackId){e.config.onError({attributes:{message:e.t("errorMissingTrackClient")}});return}try{const n=await tn(e.apiUrl,e.config.clientId,e.config.trackId);at(n.access_token,n.refresh_token),e.accessToken=n.access_token}catch(n){if(typeof e.config.onRequestNewTrackId=="function"){e.config.trackId=await e.config.onRequestNewTrackId();const r=await tn(e.apiUrl,e.config.clientId,e.config.trackId);at(r.access_token,r.refresh_token),e.accessToken=r.access_token}else throw n}}const bi={kaspi_pay:`<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8
|
+
Reason: ${B}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){U&&N.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){U&&N.log("No outcomes to send");return}if(!this._dsn){U&&N.log("No dsn provided, will not send outcomes");return}U&&N.log("Sending outcomes:",t);const n=ks(t,this._options.tunnel&&et(this._dsn));this.sendEnvelope(n)}}function ws(e,t){const n=`${t} must return \`null\` or a valid event.`;if(We(e))return e.then(r=>{if(!me(r)&&r!==null)throw new V(n);return r},r=>{throw new V(`${t} rejected with ${r}`)});if(!me(e)&&e!==null)throw new V(n);return e}function Ts(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:c}=t;if(Gn(n)&&o)return o(n,r);if(Wn(n)){if(n.spans&&c){const u=[];for(const l of n.spans){const h=c(l);h?u.push(h):(Mo(),e.recordDroppedEvent("before_send","span"))}n.spans=u}if(i){if(n.spans){const u=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return i(n,r)}}return n}function Gn(e){return e.type===void 0}function Wn(e){return e.type==="transaction"}function Ls(e){const t=[];function n(){return e===void 0||t.length<e}function r(c){return t.splice(t.indexOf(c),1)[0]||Promise.resolve(void 0)}function o(c){if(!n())return Ze(new V("Not adding Promise because buffer limit was reached."));const u=c();return t.indexOf(u)===-1&&t.push(u),u.then(()=>r(u)).then(null,()=>r(u).then(null,()=>{})),u}function i(c){return new W((u,l)=>{let h=t.length;if(!h)return u(!0);const y=setTimeout(()=>{c&&c>0&&u(!1)},c);t.forEach(m=>{de(m).then(()=>{--h||(clearTimeout(y),u(!0))},l)})})}return{$:t,add:o,drain:i}}const Rs=60*1e3;function Os(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Rs:r-t}function Ns(e,t){return e[t]||e.all||0}function Ds(e,t,n=Date.now()){return Ns(e,t)>n}function Ms(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},i=n&&n["x-sentry-rate-limits"],c=n&&n["retry-after"];if(i)for(const u of i.trim().split(",")){const[l,h,,,y]=u.split(":",5),m=parseInt(l,10),b=(isNaN(m)?60:m)*1e3;if(!h)o.all=r+b;else for(const I of h.split(";"))I==="metric_bucket"?(!y||y.split(";").includes("custom"))&&(o[I]=r+b):o[I]=r+b}else c?o.all=r+Os(c,r):t===429&&(o.all=r+60*1e3);return o}const xs=64;function Us(e,t,n=Ls(e.bufferSize||xs)){let r={};const o=c=>n.drain(c);function i(c){const u=[];if(Un(c,(m,b)=>{const I=Fn(b);if(Ds(r,I)){const B=Yn(m,b);e.recordDroppedEvent("ratelimit_backoff",I,B)}else u.push(m)}),u.length===0)return de({});const l=Pe(c[0],u),h=m=>{Un(l,(b,I)=>{const B=Yn(b,I);e.recordDroppedEvent(m,Fn(I),B)})},y=()=>t({body:es(l)}).then(m=>(m.statusCode!==void 0&&(m.statusCode<200||m.statusCode>=300)&&U&&N.warn(`Sentry responded with status code ${m.statusCode} to sent event.`),r=Ms(r,m),m),m=>{throw h("network_error"),m});return n.add(y).then(m=>m,m=>{if(m instanceof V)return U&&N.error("Skipped sending event because buffer is full."),h("queue_overflow"),de({});throw m})}return{send:i,flush:o}}function Yn(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function Fs(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Ae})),version:Ae}),e._metadata=o}function Xs(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Hs(){return"npm"}const ot=j,js=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Vn(e,t){const n=Lt(e,t),r={type:Gs(t),value:Ws(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Js(e,t,n,r){const o=_t(),i=o&&o.getOptions().normalizeDepth,c=ti(t),u={__serialized__:xn(t,i)};if(c)return{exception:{values:[Vn(e,c)]},extra:u};const l={exception:{values:[{type:Ge(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:$s(t,{isUnhandledRejection:r})}]},extra:u};if(n){const h=Lt(e,n);h.length&&(l.exception.values[0].stacktrace={frames:h})}return l}function Tt(e,t){return{exception:{values:[Vn(e,t)]}}}function Lt(e,t){const n=t.stacktrace||t.stack||"",r=zs(t),o=Ks(t);try{return e(n,r,o)}catch{}return[]}const qs=/Minified React error #\d+;/i;function zs(e){return e&&qs.test(e.message)?1:0}function Ks(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Zn(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Gs(e){const t=e&&e.name;return!t&&Zn(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Ws(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:Zn(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function Ys(e,t,n,r){const o=n&&n.syntheticException||void 0,i=Zs(e,t,o,r);return ke(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),de(i)}function Vs(e,t,n="info",r,o){const i=r&&r.syntheticException||void 0,c=Rt(e,t,i,o);return c.level=n,r&&r.event_id&&(c.event_id=r.event_id),de(c)}function Zs(e,t,n,r,o){let i;if(fn(t)&&t.error)return Tt(e,t.error);if(hn(t)||Kr(t)){const c=t;if("stack"in t)i=Tt(e,t);else{const u=c.name||(hn(c)?"DOMError":"DOMException"),l=c.message?`${u}: ${c.message}`:u;i=Rt(e,l,n,r),vn(i,l)}return"code"in c&&(i.tags={...i.tags,"DOMException.code":`${c.code}`}),i}return dn(t)?Tt(e,t):me(t)||Ge(t)?(i=Js(e,t,n,o),ke(i,{synthetic:!0}),i):(i=Rt(e,t,n,r),vn(i,`${t}`),ke(i,{synthetic:!0}),i)}function Rt(e,t,n,r){const o={};if(r&&n){const i=Lt(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),ke(o,{synthetic:!0})}if(bt(t)){const{__sentry_template_string__:i,__sentry_template_values__:c}=t;return o.logentry={message:i,params:c},o}return o.message=t,o}function $s(e,{isUnhandledRejection:t}){const n=no(e),r="exception";return fn(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ge(e)?`Event \`${ei(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function ei(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ti(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function ni(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:et(r)}},i=ri(e);return Pe(o,[i])}function ri(e){return[{type:"user_report"},e]}class oi extends Ps{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=ot.SENTRY_SDK_SOURCE||Hs();Fs(n,"browser",["browser"],r),super(n),n.sendClientReports&&ot.document&&ot.document.addEventListener("visibilitychange",()=>{ot.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Ys(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Vs(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){js&&N.warn("SDK not enabled, will not capture user feedback.");return}const n=ni(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const si=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,st=j,it={};function ii(e){const t=it[e];if(t)return t;let n=st[e];if(Xs(n))return it[e]=n.bind(st);const r=st.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch(o){si&&N.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(it[e]=n.bind(st))}function $n(e){it[e]=void 0}function ai(e,t=ii("fetch")){let n=0,r=0;function o(i){const c=i.body.length;n+=c,r++;const u={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return $n("fetch"),Ze("No fetch implementation available");try{return t(e.url,u).then(l=>(n-=c,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return $n("fetch"),n-=c,r--,Ze(l)}}return Us(e,o)}const ci=30,ui=50;function Ot(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?ye:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const li=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ai=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,di=/\((\S*)(?::(\d+))(?::(\d+))\)/,fi=[ci,e=>{const t=li.exec(e);if(t){const[,r,o,i]=t;return Ot(r,ye,+o,+i)}const n=Ai.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const c=di.exec(n[2]);c&&(n[2]=c[1],n[3]=c[2],n[4]=c[3])}const[o,i]=er(n[1]||ye,n[2]);return Ot(i,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],hi=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,pi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gi=Jr(...[fi,[ui,e=>{const t=hi.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=pi.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||ye;return[o,r]=er(o,r),Ot(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),er=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:ye,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},yi="https://bbed26c9265c425abb56ff9d3728183e@sentry.chocodev.kz/302";let Nt=null;function mi(e){const t=new oi({dsn:yi,transport:ai,stackParser:gi,integrations:[],release:"1.1.52",environment:e.environment||"production"}),n=new ae;n.setClient(t),n.setTags(e),t.init(),Nt=n}function oe(e,t){Nt&&Nt.captureException(e,t?{captureContext:{extra:t}}:void 0)}function at(e,t){ht("webPayToken",e),t&&ht("webPayRefreshToken",t)}function tr(){Xe("webPayToken"),Xe("webPayRefreshToken")}async function Ci(e){const t=en("webPayRefreshToken");if(t&&e.config.clientId)try{const n=await Or(e.apiUrl,e.config.clientId,t);at(n.access_token,n.refresh_token),e.accessToken=n.access_token;return}catch{Xe("webPayRefreshToken")}if(!e.config.clientId){e.config.onError({attributes:{message:e.t("errorMissingTrackClient")}});return}if(!e.config.trackId&&typeof e.config.onRequestNewTrackId=="function"&&(e.config.trackId=await e.config.onRequestNewTrackId()),!e.config.trackId){e.config.onError({attributes:{message:e.t("errorMissingTrackClient")}});return}try{const n=await tn(e.apiUrl,e.config.clientId,e.config.trackId);at(n.access_token,n.refresh_token),e.accessToken=n.access_token}catch(n){if(typeof e.config.onRequestNewTrackId=="function"){e.config.trackId=await e.config.onRequestNewTrackId();const r=await tn(e.apiUrl,e.config.clientId,e.config.trackId);at(r.access_token,r.refresh_token),e.accessToken=r.access_token}else throw n}}const bi={kaspi_pay:`<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9
9
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.89711 8.50443C10.4185 8.72365 10.6242 9.56386 10.7471 10.3459L10.7816 10.5699L10.8557 11.0301C11.0006 11.9088 11.303 13.7327 11.303 14.6845C11.303 14.9224 11.2806 15.105 11.2396 15.2053C11.1713 15.3599 10.9724 15.5082 10.6978 15.6319C10.0332 15.7846 9.33863 15.8671 8.62315 15.8671C8.54739 15.8671 8.47285 15.8637 8.39805 15.8616C8.10889 15.785 7.89156 15.657 7.77649 15.4821C7.42905 14.9542 7.40812 13.7781 7.40116 12.4037L7.40037 12.2443L7.39755 11.8324C7.38623 10.3774 7.37651 9.1229 7.94288 8.67272C8.16223 8.49957 8.47392 8.44225 8.89711 8.50443ZM5.58009 11.6722C5.90978 11.6548 6.12181 13.1684 6.16441 14.3162C6.19427 15.1152 6.10438 15.4439 5.96084 15.5619C5.79833 15.5113 5.63864 15.4565 5.48128 15.397C5.3763 15.219 5.29607 14.9389 5.2451 14.5721C5.08947 13.4193 5.22466 11.6925 5.58009 11.6722ZM13.8455 13.934C13.825 14.0391 13.796 14.1204 13.7602 14.1889C13.4783 14.4 13.1821 14.5938 12.872 14.7682C12.7733 14.7837 12.6856 14.7729 12.6427 14.7053C12.2318 14.0314 12.0775 11.9173 12.4752 11.7333C12.9936 11.4995 13.9224 13.5685 13.8455 13.934ZM8.50042 0C13.1296 0 16.8941 3.42166 16.9979 7.67934L17 7.82651V7.89454C16.9915 9.81778 16.2332 11.5773 14.9839 12.9392C14.9386 12.918 14.8559 12.8486 14.7062 12.6395C14.5512 12.4293 13.2148 10.5096 13.2148 8.30946C13.2148 7.87768 13.8816 7.20318 14.4717 6.61114C14.9128 6.16562 15.3306 5.74539 15.4845 5.4151C15.6804 4.98892 15.5433 4.69134 15.3265 4.59047C15.1302 4.50082 14.8355 4.56621 14.6287 4.90904C14.2893 5.46389 14.1805 5.56758 13.6855 5.93882C13.1984 6.30986 12.424 6.68338 12.424 6.19988C12.424 5.93882 12.8553 5.34757 13.0684 4.93314C13.286 4.51408 13.0515 4.21072 12.6022 4.21072C11.7198 4.21072 11.1341 5.2598 11.1341 5.62326C11.1341 5.98642 11.3229 6.03813 11.3229 6.46104C11.3229 6.88713 10.3548 7.4398 9.44281 7.4398C8.56481 7.4398 8.05566 7.27394 7.8447 6.80665L7.81777 6.74105L7.75678 6.57266C7.54046 5.98255 7.38528 5.55458 7.11514 5.10733C6.9717 4.87081 6.75038 4.70684 6.55897 4.56257C6.30881 4.38121 6.17902 4.21421 6.15193 4.08967C6.12696 3.96611 6.11352 3.73326 6.54117 3.19648C6.96793 2.66277 7.02775 2.25958 6.81418 2.05153C6.73678 1.97752 6.60482 1.93011 6.43535 1.93011C6.13562 1.93011 5.71912 2.07834 5.2899 2.48551C4.62267 3.12364 5.00146 3.72951 5.00146 3.99548C5.00146 4.26127 4.87922 4.41162 4.47882 4.77323C4.07547 5.13644 3.93627 5.44783 3.89014 6.69935C3.87247 7.3442 3.75079 7.71539 3.64156 8.04453C3.54718 8.33302 3.46038 8.60425 3.45569 8.99611C3.44822 9.43038 3.52566 9.71023 3.61604 10.0331C3.70477 10.3316 3.79902 10.6736 3.8594 11.2456C3.95544 12.1312 3.92205 12.8792 3.74744 13.6437L3.70084 13.8353L3.68995 13.8903C3.65419 14.0247 3.61168 14.1879 3.55423 14.249C1.4029 12.8228 0 10.4936 0 7.86072C0 3.51974 3.80561 0 8.50042 0Z" fill="#F14635"/>
|
|
10
10
|
</svg>
|
|
11
11
|
`,new_card:`<svg width="21" height="12" viewBox="0 0 21 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -297,7 +297,7 @@ Reason: ${B}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessi
|
|
|
297
297
|
<div class="choco-widget-bottom-bar-prerender">
|
|
298
298
|
<div class="choco-widget-payment-loading"></div>
|
|
299
299
|
</div>
|
|
300
|
-
`}function wi(e,t,n,r={}){return nr(e,t,n,r)}function Ti(e){return ct(e)}function Li(e){if(typeof document>"u")return{mountTarget:null,isEmbedded:!1};const t=e.config.containerSelector;if(t){const n=document.querySelector(t);if(n instanceof HTMLElement)return{mountTarget:n,isEmbedded:!0}}return{mountTarget:document.body,isEmbedded:!1}}function rr(e){if(typeof document>"u")return!1;e.container||(e.container=document.createElement("div"),e.container.id="choco-one-click-widget",e.container.className="choco-one-click-widget");const{mountTarget:t,isEmbedded:n}=Li(e);return t?(e.container.parentElement!==t&&t.appendChild(e.container),e.container.classList.toggle("choco-one-click-widget--embedded",n),!0):!1}function Ri(e){rr(e)&&(e.container.style.setProperty("--choco-widget-accent-color",e.config.color),e.container.innerHTML=Pi())}function Oi(e){var y,m,b,I,B;if(e._destroyed||!rr(e))return;e.container.style.setProperty("--choco-widget-accent-color",e.config.color),e.container.classList.remove("choco-one-click-widget--visible");const t=e.getAvailablePaymentMethods(),n=(y=e.checkoutContext)==null?void 0:y.data,r=e.config.currency||"KZT",o=(I=(b=(m=n==null?void 0:n.balance)==null?void 0:m.data)==null?void 0:b.money)==null?void 0:I[r],i=!e.config.disableUseBalance&&o>0?Z(o,e.config.locale,e.config.currency):null,c=(B=n==null?void 0:n.cashback)==null?void 0:B.data,u=(c==null?void 0:c.cashbackAmount)>0?Z(c.cashbackAmount,e.config.locale,e.config.currency):null,l=e._getPayableAmount(),h=l<e.config.amount;e.container.innerHTML=ki({amountFormatted:Z(l,e.config.locale,e.config.currency),originalAmountFormatted:Z(e.config.amount,e.config.locale,e.config.currency),showOriginalAmount:h,paymentMethod:e.selectedPaymentMethod,methods:t,selectedMethod:e.selectedPaymentMethod,balanceFormatted:i,useBalance:e.useBalance,bonuses:e.config.bonuses,useBonuses:e.useBonuses,coupon:e.selectedCoupon,useCoupon:e.useCoupon,couponDisabled:e._isCouponDisabled(),cashbackFormatted:u,disabled:e.disabled,paymentMethodDisabled:e.paymentMethodDisabled,loading:e.loading,showFreedomBtn:!e.config.isFridge&&e.config.onFreedomLink!==null,freedomAmountFormatted:Z(Math.round(l*.
|
|
300
|
+
`}function wi(e,t,n,r={}){return nr(e,t,n,r)}function Ti(e){return ct(e)}function Li(e){if(typeof document>"u")return{mountTarget:null,isEmbedded:!1};const t=e.config.containerSelector;if(t){const n=document.querySelector(t);if(n instanceof HTMLElement)return{mountTarget:n,isEmbedded:!0}}return{mountTarget:document.body,isEmbedded:!1}}function rr(e){if(typeof document>"u")return!1;e.container||(e.container=document.createElement("div"),e.container.id="choco-one-click-widget",e.container.className="choco-one-click-widget");const{mountTarget:t,isEmbedded:n}=Li(e);return t?(e.container.parentElement!==t&&t.appendChild(e.container),e.container.classList.toggle("choco-one-click-widget--embedded",n),!0):!1}function Ri(e){rr(e)&&(e.container.style.setProperty("--choco-widget-accent-color",e.config.color),e.container.innerHTML=Pi())}function Oi(e){var y,m,b,I,B;if(e._destroyed||!rr(e))return;e.container.style.setProperty("--choco-widget-accent-color",e.config.color),e.container.classList.remove("choco-one-click-widget--visible");const t=e.getAvailablePaymentMethods(),n=(y=e.checkoutContext)==null?void 0:y.data,r=e.config.currency||"KZT",o=(I=(b=(m=n==null?void 0:n.balance)==null?void 0:m.data)==null?void 0:b.money)==null?void 0:I[r],i=!e.config.disableUseBalance&&o>0?Z(o,e.config.locale,e.config.currency):null,c=(B=n==null?void 0:n.cashback)==null?void 0:B.data,u=(c==null?void 0:c.cashbackAmount)>0?Z(c.cashbackAmount,e.config.locale,e.config.currency):null,l=e._getPayableAmount(),h=l<e.config.amount;e.container.innerHTML=ki({amountFormatted:Z(l,e.config.locale,e.config.currency),originalAmountFormatted:Z(e.config.amount,e.config.locale,e.config.currency),showOriginalAmount:h,paymentMethod:e.selectedPaymentMethod,methods:t,selectedMethod:e.selectedPaymentMethod,balanceFormatted:i,useBalance:e.useBalance,bonuses:e.config.bonuses,useBonuses:e.useBonuses,coupon:e.selectedCoupon,useCoupon:e.useCoupon,couponDisabled:e._isCouponDisabled(),cashbackFormatted:u,disabled:e.disabled,paymentMethodDisabled:e.paymentMethodDisabled,loading:e.loading,showFreedomBtn:!e.config.isFridge&&e.config.onFreedomLink!==null,freedomAmountFormatted:Z(Math.round(l*.94),e.config.locale,e.config.currency),t:(Q,S)=>e.t(Q,S),currency:r}),e._attachEventListeners(),e.isOpen=!0,e._emitUserEvent("one_click_pay_cta_rendered",{terminal_id:e.config.terminalId,project_id:e.config.projectId??e.config.clientId}),e._emitUserEvent("one_click_pay_method_resolved",{payment_method:e._getPaymentMethodForUserEvent()}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var Q;e._destroyed||(Q=e.container)==null||Q.classList.add("choco-one-click-widget--visible")})})}function we(e){var r;const t=(r=e.container)==null?void 0:r.querySelector(".choco-widget-payment-methods");if(!t)return;const n=e.getAvailablePaymentMethods();t.innerHTML=wi(n,e.selectedPaymentMethod,o=>e.t(o),{editMode:e.isPaymentSheetEditMode}),t.querySelectorAll("[data-action='delete-card']").forEach(o=>{o.addEventListener("click",i=>{i.stopPropagation();const c=JSON.parse(o.getAttribute("data-method")||"{}");Ui(e,c)})}),t.querySelectorAll("[data-action='select-method']").forEach(o=>{o.addEventListener("click",i=>{const c=JSON.parse(i.currentTarget.getAttribute("data-method")||"{}");cr(e,c)})})}function or(e){var o,i,c;const t=(o=e.container)==null?void 0:o.querySelector(".choco-widget-payment-method"),n=(i=e.container)==null?void 0:i.querySelector(".choco-widget-method-name"),r=(c=e.container)==null?void 0:c.querySelector(".choco-widget-method-icon-wrapper");t&&e.selectedPaymentMethod&&(t.className=`choco-widget-payment-method ${e.selectedPaymentMethod.type}`),n&&e.selectedPaymentMethod&&(n.className=`choco-widget-method-name ${e.selectedPaymentMethod.type}`,n.textContent=e.selectedPaymentMethod.label),r&&e.selectedPaymentMethod&&(r.className=`choco-widget-method-icon-wrapper ${e.selectedPaymentMethod.type}`,r.innerHTML=Ti(e.selectedPaymentMethod)),sr(e)}function ut(e){var m,b,I,B,Q,S;const t=(m=e.container)==null?void 0:m.querySelector(".choco-widget-pay-button"),n=(b=e.container)==null?void 0:b.querySelector(".choco-widget-google-pay-amount"),r=(I=e.container)==null?void 0:I.querySelector(".choco-widget-google-pay-amount-label");let o=(B=e.container)==null?void 0:B.querySelector(".choco-widget-google-pay-amount-value"),i=(Q=e.container)==null?void 0:Q.querySelector(".choco-widget-google-pay-amount-value-number");const c=e._getPayableAmount(),u=Z(c,e.config.locale,e.config.currency),l=c<e.config.amount,h=Z(e.config.amount,e.config.locale,e.config.currency);if(t){const P=e.paymentMethodDisabled?e.t("login"):`${e.t("pay")} ${u}`;t.textContent=P,t.setAttribute("aria-label",P)}const y=(S=e.container)==null?void 0:S.querySelector(".choco-widget-freedom-card-btn");if(y&&(y.textContent=`от ${Z(Math.round(c*.94),e.config.locale,e.config.currency)} по карте Freedom`),r&&(r.textContent=`${e.t("total")} ${u}`),!l){o==null||o.remove();return}!o&&n&&(o=document.createElement("div"),o.className="choco-widget-google-pay-amount-value",o.innerHTML=`${e.t("instead")} <span class="choco-widget-google-pay-amount-value-number"></span>`,n.appendChild(o),i=o.querySelector(".choco-widget-google-pay-amount-value-number")),i?i.textContent=h:o&&(o.textContent=`${e.t("instead")} ${h}`)}function sr(e){var l,h,y,m,b,I,B,Q,S,P;const t=((l=e.selectedPaymentMethod)==null?void 0:l.type)==="google_pay",n=((h=e.selectedPaymentMethod)==null?void 0:h.type)==="apple_pay",r=t||n,o=(y=e.container)==null?void 0:y.querySelector(".choco-widget-pay-button"),i=(m=e.container)==null?void 0:m.querySelector(".choco-widget-google-pay-amount"),c=(b=e.container)==null?void 0:b.querySelector(".choco-widget-google-pay-row"),u=(I=e.container)==null?void 0:I.querySelector(".choco-widget-apple-pay-row");if(o==null||o.classList.toggle("choco-widget-pay-button--hidden",r),i==null||i.classList.toggle("choco-widget-google-pay-amount--hidden",!r),c==null||c.classList.toggle("choco-widget-google-pay-row--hidden",!t),u==null||u.classList.toggle("choco-widget-apple-pay-row--hidden",!n),t){Ni(e);const k=(B=e.container)==null?void 0:B.querySelector('[data-action="apple-pay-button-slot"]');k&&(k.innerHTML="")}else if(n){e._googlePayButtonRenderVersion+=1;const k=(Q=e.container)==null?void 0:Q.querySelector('[data-action="google-pay-button-slot"]');k&&(k.innerHTML=""),Di(e)}else{e._googlePayButtonRenderVersion+=1;const k=(S=e.container)==null?void 0:S.querySelector('[data-action="google-pay-button-slot"]'),R=(P=e.container)==null?void 0:P.querySelector('[data-action="apple-pay-button-slot"]');k&&(k.innerHTML=""),R&&(R.innerHTML="")}ut(e),ce(e)}async function Ni(e){var c,u,l,h,y;const t=(c=e.container)==null?void 0:c.querySelector('[data-action="google-pay-button-slot"]');if(!t||(t.innerHTML="",((u=e.selectedPaymentMethod)==null?void 0:u.type)!=="google_pay"))return;const n=++e._googlePayButtonRenderVersion;try{await e._loadGooglePaySdk()}catch{e.config.onError({attributes:{message:e.t("errorGooglePayUnsupported")}});return}if(n!==e._googlePayButtonRenderVersion)return;if(!((y=(h=(l=window.google)==null?void 0:l.payments)==null?void 0:h.api)!=null&&y.PaymentsClient)){e.config.onError({attributes:{message:e.t("errorGooglePayUnsupported")}});return}const r=e.config.environment==="production",i=new window.google.payments.api.PaymentsClient({environment:r?"PRODUCTION":"TEST"}).createButton({onClick:()=>e.handlePayment(),buttonType:"pay",buttonColor:"black",buttonLocale:e.config.locale||"ru",buttonSizeMode:"fill"});i.classList.add("choco-widget-google-pay-button"),i.style.setProperty("width","100%","important"),i.style.setProperty("height","52px","important"),i.style.setProperty("min-height","52px","important"),i.style.setProperty("border-radius","12px","important"),i.style.setProperty("font-size","16px","important"),i.style.setProperty("font-weight","bold","important"),i.querySelectorAll("*").forEach(m=>{m.style.setProperty("border-radius","12px","important"),m.style.setProperty("font-weight","bold","important"),m.style.setProperty("font-size","16px","important")}),t.appendChild(i),ce(e)}function Di(e){var i,c;const t=(i=e.container)==null?void 0:i.querySelector('[data-action="apple-pay-button-slot"]');if(!t||(t.innerHTML="",((c=e.selectedPaymentMethod)==null?void 0:c.type)!=="apple_pay"))return;const n=document.createElement("div");n.className="choco-widget-apple-pay-button-wrapper";const r=document.createElement("button");r.type="button",r.className="choco-widget-apple-pay-button choco-widget-apple-pay-button--native",r.setAttribute("aria-label","Оплатить с Apple Pay"),r.style.setProperty("width","100%","important"),r.style.setProperty("height","52px","important"),r.style.setProperty("min-height","52px","important"),r.style.setProperty("border-radius","12px","important"),r.style.setProperty("-webkit-appearance","-apple-pay-button"),r.style.setProperty("-apple-pay-button-type","buy"),r.style.setProperty("-apple-pay-button-style","black"),r.addEventListener("click",()=>e.handlePayment());const o=document.createElement("div");o.className="choco-widget-apple-pay-button-overlay",o.setAttribute("aria-hidden","true"),o.innerHTML=`
|
|
301
301
|
<span class="choco-widget-apple-pay-button-text">Оплатить с</span>
|
|
302
302
|
<span class="choco-widget-apple-pay-button-icon">
|
|
303
303
|
<svg width="52" height="24" viewBox="0 0 52 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|