@duffel/components 3.1.2--prototype.2 → 3.1.3
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/README.md +4 -0
- package/package.json +1 -1
- package/react-dist/index.js +18 -47
- package/src/custom-elements.ts +0 -4
- package/src/examples/next/README.md +28 -0
- package/src/examples/next/next-env.d.ts +5 -0
- package/src/examples/next/next.config.js +4 -0
- package/src/examples/next/package.json +24 -0
- package/src/examples/next/src/app/DuffelComponents.tsx +40 -0
- package/src/examples/next/src/app/layout.tsx +18 -0
- package/src/examples/next/src/app/page.tsx +9 -0
- package/src/examples/next/tsconfig.json +27 -0
- package/src/examples/react-app/src/index.tsx +1 -1
- package/src/index.ts +0 -2
- package/src/components/ShowData/ShowData.tsx +0 -38
- package/src/components/ShowData/ShowDataCustomElement.tsx +0 -85
- package/src/stories/ShowData.stories.tsx +0 -16
package/react-dist/index.js
CHANGED
|
@@ -1,49 +1,30 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I(M,T){return T={exports:{}},M(T,T.exports),T.exports}var P="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",L=P;function Y(){}function ce(){}ce.resetWarningCache=Y;var X=function(){function M($,Re,ne,Oe,et,ae){if(ae!==L){var ft=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw ft.name="Invariant Violation",ft}}M.isRequired=M;function T(){return M}var N={array:M,bool:M,func:M,number:M,object:M,string:M,symbol:M,any:M,arrayOf:T,element:M,elementType:M,instanceOf:T,node:M,objectOf:T,oneOf:T,oneOfType:T,shape:T,exact:T,checkPropTypes:ce,resetWarningCache:Y};return N.PropTypes=N,N},H=I(function(M){M.exports=X()}),ue=function(T){var N=n.useRef(T);return n.useEffect(function(){N.current=T},[T]),N.current},de=function(T){return T!==null&&s(T)==="object"},Ne=function(T){return de(T)&&typeof T.then=="function"},Me=function(T){return de(T)&&typeof T.elements=="function"&&typeof T.createToken=="function"&&typeof T.createPaymentMethod=="function"&&typeof T.confirmCardPayment=="function"},Te="[object Object]",he=function M(T,N){if(!de(T)||!de(N))return T===N;var $=Array.isArray(T),Re=Array.isArray(N);if($!==Re)return!1;var ne=Object.prototype.toString.call(T)===Te,Oe=Object.prototype.toString.call(N)===Te;if(ne!==Oe)return!1;if(!ne&&!$)return T===N;var et=Object.keys(T),ae=Object.keys(N);if(et.length!==ae.length)return!1;for(var ft={},Dt=0;Dt<et.length;Dt+=1)ft[et[Dt]]=!0;for(var Bt=0;Bt<ae.length;Bt+=1)ft[ae[Bt]]=!0;var Lt=Object.keys(ft);if(Lt.length!==et.length)return!1;var Qr=T,ei=N,kt=function(yr){return M(Qr[yr],ei[yr])};return Lt.every(kt)},_e=function(T,N,$){return de(T)?Object.keys(T).reduce(function(Re,ne){var Oe=!de(N)||!he(T[ne],N[ne]);return $.includes(ne)?(Oe&&console.warn("Unsupported prop change: options.".concat(ne," is not a mutable property.")),Re):Oe?a(a({},Re||{}),{},u({},ne,T[ne])):Re},null):null},it="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",Nt=function(T){if(T===null||Me(T))return T;throw new Error(it)},ot=function(T){if(Ne(T))return{tag:"async",stripePromise:Promise.resolve(T).then(Nt)};var N=Nt(T);return N===null?{tag:"empty"}:{tag:"sync",stripe:N}},Wr=n.createContext(null);Wr.displayName="ElementsContext";var oe=function(T,N){if(!T)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(N," in an <Elements> provider."));return T},ye=n.createContext(null);ye.displayName="CartElementContext";var ze=function(T,N){if(!T)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(N," in an <Elements> provider."));return T},Vr=function(T){var N=T.stripe,$=T.options,Re=T.children,ne=n.useMemo(function(){return ot(N)},[N]),Oe=n.useState(null),et=l(Oe,2),ae=et[0],ft=et[1],Dt=n.useState(null),Bt=l(Dt,2),Lt=Bt[0],Qr=Bt[1],ei=n.useState(function(){return{stripe:ne.tag==="sync"?ne.stripe:null,elements:ne.tag==="sync"?ne.stripe.elements($):null}}),kt=l(ei,2),Ze=kt[0],yr=kt[1];n.useEffect(function(){var Xe=!0,xi=function(Ai){yr(function(Oi){return Oi.stripe?Oi:{stripe:Ai,elements:Ai.elements($)}})};return ne.tag==="async"&&!Ze.stripe?ne.stripePromise.then(function(en){en&&Xe&&xi(en)}):ne.tag==="sync"&&!Ze.stripe&&xi(ne.stripe),function(){Xe=!1}},[ne,Ze,$]);var ti=ue(N);n.useEffect(function(){ti!==null&&ti!==N&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[ti,N]);var Ri=ue($);return n.useEffect(function(){if(Ze.elements){var Xe=_e($,Ri,["clientSecret","fonts"]);Xe&&Ze.elements.update(Xe)}},[$,Ri,Ze.elements]),n.useEffect(function(){var Xe=Ze.stripe;!Xe||!Xe._registerWrapper||!Xe.registerAppInfo||(Xe._registerWrapper({name:"react-stripe-js",version:"2.1.1"}),Xe.registerAppInfo({name:"react-stripe-js",version:"2.1.1",url:"https://stripe.com/docs/stripe-js/react"}))},[Ze.stripe]),n.createElement(Wr.Provider,{value:Ze},n.createElement(ye.Provider,{value:{cart:ae,setCart:ft,cartState:Lt,setCartState:Qr}},Re))};Vr.propTypes={stripe:H.any,options:H.object};var Mt=function(T){var N=n.useContext(Wr);return oe(N,T)},at=function(T){var N=n.useContext(ye);return ze(N,T)},hc=function(){var T=Mt("calls useElements()"),N=T.elements;return N},_c=function(){var T=Mt("calls useStripe()"),N=T.stripe;return N},yc=function(){var T=at("calls useCartElement()"),N=T.cart;return N},hr=function(){var T=at("calls useCartElementState()"),N=T.cartState;return N},qr=function(T){var N=T.children,$=Mt("mounts <ElementsConsumer>");return N($)};qr.propTypes={children:H.func.isRequired};var Ke=function(T,N,$){var Re=!!$,ne=n.useRef($);n.useEffect(function(){ne.current=$},[$]),n.useEffect(function(){if(!Re||!T)return function(){};var Oe=function(){ne.current&&ne.current.apply(ne,arguments)};return T.on(N,Oe),function(){T.off(N,Oe)}},[Re,N,T,ne])},zr=function(T){return T.charAt(0).toUpperCase()+T.slice(1)},Se=function(T,N){var $="".concat(zr(T),"Element"),Re=function(ae){var ft=ae.id,Dt=ae.className,Bt=ae.options,Lt=Bt===void 0?{}:Bt,Qr=ae.onBlur,ei=ae.onFocus,kt=ae.onReady,Ze=ae.onChange,yr=ae.onEscape,ti=ae.onClick,Ri=ae.onLoadError,Xe=ae.onLoaderStart,xi=ae.onNetworksChange,en=ae.onCheckout,Ai=ae.onLineItemClick,Oi=ae.onConfirm,bc=ae.onCancel,Tc=ae.onShippingAddressChange,Rc=ae.onShippingRateChange,xc=Mt("mounts <".concat($,">")),xo=xc.elements,Ac=n.useState(null),Ao=l(Ac,2),Ye=Ao[0],Oc=Ao[1],Cn=n.useRef(null),Oo=n.useRef(null),Sa=at("mounts <".concat($,">")),Io=Sa.setCart,Sr=Sa.setCartState;Ke(Ye,"blur",Qr),Ke(Ye,"focus",ei),Ke(Ye,"escape",yr),Ke(Ye,"click",ti),Ke(Ye,"loaderror",Ri),Ke(Ye,"loaderstart",Xe),Ke(Ye,"networkschange",xi),Ke(Ye,"lineitemclick",Ai),Ke(Ye,"confirm",Oi),Ke(Ye,"cancel",bc),Ke(Ye,"shippingaddresschange",Tc),Ke(Ye,"shippingratechange",Rc);var Ii;T==="cart"?Ii=function(wo){Sr(wo),kt&&kt(wo)}:kt&&(T==="expressCheckout"?Ii=kt:Ii=function(){kt(Ye)}),Ke(Ye,"ready",Ii);var wi=T==="cart"?function(We){Sr(We),Ze&&Ze(We)}:Ze;Ke(Ye,"change",wi);var Ic=T==="cart"?function(We){Sr(We),en&&en(We)}:en;Ke(Ye,"checkout",Ic),n.useLayoutEffect(function(){if(Cn.current===null&&xo&&Oo.current!==null){var We=xo.create(T,Lt);T==="cart"&&Io&&Io(We),Cn.current=We,Oc(We),We.mount(Oo.current)}},[xo,Lt,Io]);var va=ue(Lt);return n.useEffect(function(){if(Cn.current){var We=_e(Lt,va,["paymentRequest"]);We&&Cn.current.update(We)}},[Lt,va]),n.useLayoutEffect(function(){return function(){if(Cn.current&&typeof Cn.current.destroy=="function")try{Cn.current.destroy(),Cn.current=null}catch{}}},[]),n.createElement("div",{id:ft,className:Dt,ref:Oo})},ne=function(ae){Mt("mounts <".concat($,">")),at("mounts <".concat($,">"));var ft=ae.id,Dt=ae.className;return n.createElement("div",{id:ft,className:Dt})},Oe=N?ne:Re;return Oe.propTypes={id:H.string,className:H.string,onChange:H.func,onBlur:H.func,onFocus:H.func,onReady:H.func,onEscape:H.func,onClick:H.func,onLoadError:H.func,onLoaderStart:H.func,onNetworksChange:H.func,onCheckout:H.func,onLineItemClick:H.func,onConfirm:H.func,onCancel:H.func,onShippingAddressChange:H.func,onShippingRateChange:H.func,options:H.object},Oe.displayName=$,Oe.__elementType=T,Oe},Ae=typeof window>"u",Ci=Se("auBankAccount",Ae),bi=Se("card",Ae),_a=Se("cardNumber",Ae),yt=Se("cardExpiry",Ae),Kr=Se("cardCvc",Ae),Sc=Se("fpxBank",Ae),Qt=Se("iban",Ae),ya=Se("idealBank",Ae),vc=Se("p24Bank",Ae),Zr=Se("epsBank",Ae),St=Se("payment",Ae),Xr=Se("expressCheckout",Ae),Ti=Se("paymentRequestButton",Ae),Ec=Se("linkAuthentication",Ae),jr=Se("address",Ae),Cc=Se("shippingAddress",Ae),Jr=Se("cart",Ae),_r=Se("paymentMethodMessaging",Ae),To=Se("affirmMessage",Ae),Ro=Se("afterpayClearpayMessage",Ae);t.AddressElement=jr,t.AffirmMessageElement=To,t.AfterpayClearpayMessageElement=Ro,t.AuBankAccountElement=Ci,t.CardCvcElement=Kr,t.CardElement=bi,t.CardExpiryElement=yt,t.CardNumberElement=_a,t.CartElement=Jr,t.Elements=Vr,t.ElementsConsumer=qr,t.EpsBankElement=Zr,t.ExpressCheckoutElement=Xr,t.FpxBankElement=Sc,t.IbanElement=Qt,t.IdealBankElement=ya,t.LinkAuthenticationElement=Ec,t.P24BankElement=vc,t.PaymentElement=St,t.PaymentMethodMessagingElement=_r,t.PaymentRequestButtonElement=Ti,t.ShippingAddressElement=Cc,t.useCartElement=yc,t.useCartElementState=hr,t.useElements=hc,t.useStripe=_c,Object.defineProperty(t,"__esModule",{value:!0})})});var d_=cs((Eo,ha)=>{(function(){var t,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",u="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",p=500,m="__lodash_placeholder__",h=1,S=2,v=4,I=1,P=2,L=1,Y=2,ce=4,X=8,H=16,ue=32,de=64,Ne=128,Me=256,Te=512,he=30,_e="...",it=800,Nt=16,ot=1,Wr=2,oe=3,ye=1/0,ze=9007199254740991,Vr=17976931348623157e292,Mt=0/0,at=4294967295,hc=at-1,_c=at>>>1,yc=[["ary",Ne],["bind",L],["bindKey",Y],["curry",X],["curryRight",H],["flip",Te],["partial",ue],["partialRight",de],["rearg",Me]],hr="[object Arguments]",qr="[object Array]",Ke="[object AsyncFunction]",zr="[object Boolean]",Se="[object Date]",Ae="[object DOMException]",Ci="[object Error]",bi="[object Function]",_a="[object GeneratorFunction]",yt="[object Map]",Kr="[object Number]",Sc="[object Null]",Qt="[object Object]",ya="[object Promise]",vc="[object Proxy]",Zr="[object RegExp]",St="[object Set]",Xr="[object String]",Ti="[object Symbol]",Ec="[object Undefined]",jr="[object WeakMap]",Cc="[object WeakSet]",Jr="[object ArrayBuffer]",_r="[object DataView]",To="[object Float32Array]",Ro="[object Float64Array]",M="[object Int8Array]",T="[object Int16Array]",N="[object Int32Array]",$="[object Uint8Array]",Re="[object Uint8ClampedArray]",ne="[object Uint16Array]",Oe="[object Uint32Array]",et=/\b__p \+= '';/g,ae=/\b(__p \+=) '' \+/g,ft=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Dt=/&(?:amp|lt|gt|quot|#39);/g,Bt=/[&<>"']/g,Lt=RegExp(Dt.source),Qr=RegExp(Bt.source),ei=/<%-([\s\S]+?)%>/g,kt=/<%([\s\S]+?)%>/g,Ze=/<%=([\s\S]+?)%>/g,yr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ti=/^\w*$/,Ri=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xe=/[\\^$.*+?()[\]{}|]/g,xi=RegExp(Xe.source),en=/^\s+/,Ai=/\s/,Oi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,bc=/\{\n\/\* \[wrapped with (.+)\] \*/,Tc=/,? & /,Rc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xc=/[()=,{}\[\]\/\s]/,xo=/\\(\\)?/g,Ac=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ao=/\w*$/,Ye=/^[-+]0x[0-9a-f]+$/i,Oc=/^0b[01]+$/i,Cn=/^\[object .+?Constructor\]$/,Oo=/^0o[0-7]+$/i,Sa=/^(?:0|[1-9]\d*)$/,Io=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sr=/($^)/,Ii=/['\n\r\u2028\u2029\\]/g,wi="\\ud800-\\udfff",Ic="\\u0300-\\u036f",va="\\ufe20-\\ufe2f",We="\\u20d0-\\u20ff",wo=Ic+va+We,yf="\\u2700-\\u27bf",Sf="a-z\\xdf-\\xf6\\xf8-\\xff",S_="\\xac\\xb1\\xd7\\xf7",v_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",E_="\\u2000-\\u206f",C_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",vf="A-Z\\xc0-\\xd6\\xd8-\\xde",Ef="\\ufe0e\\ufe0f",Cf=S_+v_+E_+C_,wc="['\u2019]",b_="["+wi+"]",bf="["+Cf+"]",Ea="["+wo+"]",Tf="\\d+",T_="["+yf+"]",Rf="["+Sf+"]",xf="[^"+wi+Cf+Tf+yf+Sf+vf+"]",Pc="\\ud83c[\\udffb-\\udfff]",R_="(?:"+Ea+"|"+Pc+")",Af="[^"+wi+"]",Nc="(?:\\ud83c[\\udde6-\\uddff]){2}",Mc="[\\ud800-\\udbff][\\udc00-\\udfff]",Pi="["+vf+"]",Of="\\u200d",If="(?:"+Rf+"|"+xf+")",x_="(?:"+Pi+"|"+xf+")",wf="(?:"+wc+"(?:d|ll|m|re|s|t|ve))?",Pf="(?:"+wc+"(?:D|LL|M|RE|S|T|VE))?",Nf=R_+"?",Mf="["+Ef+"]?",A_="(?:"+Of+"(?:"+[Af,Nc,Mc].join("|")+")"+Mf+Nf+")*",O_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",I_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Df=Mf+Nf+A_,w_="(?:"+[T_,Nc,Mc].join("|")+")"+Df,P_="(?:"+[Af+Ea+"?",Ea,Nc,Mc,b_].join("|")+")",N_=RegExp(wc,"g"),M_=RegExp(Ea,"g"),Dc=RegExp(Pc+"(?="+Pc+")|"+P_+Df,"g"),D_=RegExp([Pi+"?"+Rf+"+"+wf+"(?="+[bf,Pi,"$"].join("|")+")",x_+"+"+Pf+"(?="+[bf,Pi+If,"$"].join("|")+")",Pi+"?"+If+"+"+wf,Pi+"+"+Pf,I_,O_,Tf,w_].join("|"),"g"),B_=RegExp("["+Of+wi+wo+Ef+"]"),L_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,k_=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],F_=-1,Ee={};Ee[To]=Ee[Ro]=Ee[M]=Ee[T]=Ee[N]=Ee[$]=Ee[Re]=Ee[ne]=Ee[Oe]=!0,Ee[hr]=Ee[qr]=Ee[Jr]=Ee[zr]=Ee[_r]=Ee[Se]=Ee[Ci]=Ee[bi]=Ee[yt]=Ee[Kr]=Ee[Qt]=Ee[Zr]=Ee[St]=Ee[Xr]=Ee[jr]=!1;var ve={};ve[hr]=ve[qr]=ve[Jr]=ve[_r]=ve[zr]=ve[Se]=ve[To]=ve[Ro]=ve[M]=ve[T]=ve[N]=ve[yt]=ve[Kr]=ve[Qt]=ve[Zr]=ve[St]=ve[Xr]=ve[Ti]=ve[$]=ve[Re]=ve[ne]=ve[Oe]=!0,ve[Ci]=ve[bi]=ve[jr]=!1;var U_={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},G_={"&":"&","<":"<",">":">",'"':""","'":"'"},H_={"&":"&","<":"<",">":">",""":'"',"'":"'"},$_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Y_=parseFloat,W_=parseInt,Bf=typeof global=="object"&&global&&global.Object===Object&&global,V_=typeof self=="object"&&self&&self.Object===Object&&self,Ve=Bf||V_||Function("return this")(),Bc=typeof Eo=="object"&&Eo&&!Eo.nodeType&&Eo,ni=Bc&&typeof ha=="object"&&ha&&!ha.nodeType&&ha,Lf=ni&&ni.exports===Bc,Lc=Lf&&Bf.process,Ft=function(){try{var E=ni&&ni.require&&ni.require("util").types;return E||Lc&&Lc.binding&&Lc.binding("util")}catch{}}(),kf=Ft&&Ft.isArrayBuffer,Ff=Ft&&Ft.isDate,Uf=Ft&&Ft.isMap,Gf=Ft&&Ft.isRegExp,Hf=Ft&&Ft.isSet,$f=Ft&&Ft.isTypedArray;function vt(E,R,b){switch(b.length){case 0:return E.call(R);case 1:return E.call(R,b[0]);case 2:return E.call(R,b[0],b[1]);case 3:return E.call(R,b[0],b[1],b[2])}return E.apply(R,b)}function q_(E,R,b,B){for(var V=-1,se=E==null?0:E.length;++V<se;){var Ge=E[V];R(B,Ge,b(Ge),E)}return B}function Ut(E,R){for(var b=-1,B=E==null?0:E.length;++b<B&&R(E[b],b,E)!==!1;);return E}function z_(E,R){for(var b=E==null?0:E.length;b--&&R(E[b],b,E)!==!1;);return E}function Yf(E,R){for(var b=-1,B=E==null?0:E.length;++b<B;)if(!R(E[b],b,E))return!1;return!0}function vr(E,R){for(var b=-1,B=E==null?0:E.length,V=0,se=[];++b<B;){var Ge=E[b];R(Ge,b,E)&&(se[V++]=Ge)}return se}function Ca(E,R){var b=E==null?0:E.length;return!!b&&Ni(E,R,0)>-1}function kc(E,R,b){for(var B=-1,V=E==null?0:E.length;++B<V;)if(b(R,E[B]))return!0;return!1}function Ce(E,R){for(var b=-1,B=E==null?0:E.length,V=Array(B);++b<B;)V[b]=R(E[b],b,E);return V}function Er(E,R){for(var b=-1,B=R.length,V=E.length;++b<B;)E[V+b]=R[b];return E}function Fc(E,R,b,B){var V=-1,se=E==null?0:E.length;for(B&&se&&(b=E[++V]);++V<se;)b=R(b,E[V],V,E);return b}function K_(E,R,b,B){var V=E==null?0:E.length;for(B&&V&&(b=E[--V]);V--;)b=R(b,E[V],V,E);return b}function Uc(E,R){for(var b=-1,B=E==null?0:E.length;++b<B;)if(R(E[b],b,E))return!0;return!1}var Z_=Gc("length");function X_(E){return E.split("")}function j_(E){return E.match(Rc)||[]}function Wf(E,R,b){var B;return b(E,function(V,se,Ge){if(R(V,se,Ge))return B=se,!1}),B}function ba(E,R,b,B){for(var V=E.length,se=b+(B?1:-1);B?se--:++se<V;)if(R(E[se],se,E))return se;return-1}function Ni(E,R,b){return R===R?u1(E,R,b):ba(E,Vf,b)}function J_(E,R,b,B){for(var V=b-1,se=E.length;++V<se;)if(B(E[V],R))return V;return-1}function Vf(E){return E!==E}function qf(E,R){var b=E==null?0:E.length;return b?$c(E,R)/b:Mt}function Gc(E){return function(R){return R==null?t:R[E]}}function Hc(E){return function(R){return E==null?t:E[R]}}function zf(E,R,b,B,V){return V(E,function(se,Ge,me){b=B?(B=!1,se):R(b,se,Ge,me)}),b}function Q_(E,R){var b=E.length;for(E.sort(R);b--;)E[b]=E[b].value;return E}function $c(E,R){for(var b,B=-1,V=E.length;++B<V;){var se=R(E[B]);se!==t&&(b=b===t?se:b+se)}return b}function Yc(E,R){for(var b=-1,B=Array(E);++b<E;)B[b]=R(b);return B}function e1(E,R){return Ce(R,function(b){return[b,E[b]]})}function Kf(E){return E&&E.slice(0,Jf(E)+1).replace(en,"")}function Et(E){return function(R){return E(R)}}function Wc(E,R){return Ce(R,function(b){return E[b]})}function Po(E,R){return E.has(R)}function Zf(E,R){for(var b=-1,B=E.length;++b<B&&Ni(R,E[b],0)>-1;);return b}function Xf(E,R){for(var b=E.length;b--&&Ni(R,E[b],0)>-1;);return b}function t1(E,R){for(var b=E.length,B=0;b--;)E[b]===R&&++B;return B}var n1=Hc(U_),r1=Hc(G_);function i1(E){return"\\"+$_[E]}function o1(E,R){return E==null?t:E[R]}function Mi(E){return B_.test(E)}function a1(E){return L_.test(E)}function s1(E){for(var R,b=[];!(R=E.next()).done;)b.push(R.value);return b}function Vc(E){var R=-1,b=Array(E.size);return E.forEach(function(B,V){b[++R]=[V,B]}),b}function jf(E,R){return function(b){return E(R(b))}}function Cr(E,R){for(var b=-1,B=E.length,V=0,se=[];++b<B;){var Ge=E[b];(Ge===R||Ge===m)&&(E[b]=m,se[V++]=b)}return se}function Ta(E){var R=-1,b=Array(E.size);return E.forEach(function(B){b[++R]=B}),b}function c1(E){var R=-1,b=Array(E.size);return E.forEach(function(B){b[++R]=[B,B]}),b}function u1(E,R,b){for(var B=b-1,V=E.length;++B<V;)if(E[B]===R)return B;return-1}function l1(E,R,b){for(var B=b+1;B--;)if(E[B]===R)return B;return B}function Di(E){return Mi(E)?p1(E):Z_(E)}function tn(E){return Mi(E)?d1(E):X_(E)}function Jf(E){for(var R=E.length;R--&&Ai.test(E.charAt(R)););return R}var f1=Hc(H_);function p1(E){for(var R=Dc.lastIndex=0;Dc.test(E);)++R;return R}function d1(E){return E.match(Dc)||[]}function m1(E){return E.match(D_)||[]}var g1=function E(R){R=R==null?Ve:br.defaults(Ve.Object(),R,br.pick(Ve,k_));var b=R.Array,B=R.Date,V=R.Error,se=R.Function,Ge=R.Math,me=R.Object,qc=R.RegExp,h1=R.String,Gt=R.TypeError,Ra=b.prototype,_1=se.prototype,Bi=me.prototype,xa=R["__core-js_shared__"],Aa=_1.toString,fe=Bi.hasOwnProperty,y1=0,Qf=function(){var e=/[^.]+$/.exec(xa&&xa.keys&&xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Oa=Bi.toString,S1=Aa.call(me),v1=Ve._,E1=qc("^"+Aa.call(fe).replace(Xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ia=Lf?R.Buffer:t,Tr=R.Symbol,wa=R.Uint8Array,ep=Ia?Ia.allocUnsafe:t,Pa=jf(me.getPrototypeOf,me),tp=me.create,np=Bi.propertyIsEnumerable,Na=Ra.splice,rp=Tr?Tr.isConcatSpreadable:t,No=Tr?Tr.iterator:t,ri=Tr?Tr.toStringTag:t,Ma=function(){try{var e=ci(me,"defineProperty");return e({},"",{}),e}catch{}}(),C1=R.clearTimeout!==Ve.clearTimeout&&R.clearTimeout,b1=B&&B.now!==Ve.Date.now&&B.now,T1=R.setTimeout!==Ve.setTimeout&&R.setTimeout,Da=Ge.ceil,Ba=Ge.floor,zc=me.getOwnPropertySymbols,R1=Ia?Ia.isBuffer:t,ip=R.isFinite,x1=Ra.join,A1=jf(me.keys,me),He=Ge.max,tt=Ge.min,O1=B.now,I1=R.parseInt,op=Ge.random,w1=Ra.reverse,Kc=ci(R,"DataView"),Mo=ci(R,"Map"),Zc=ci(R,"Promise"),Li=ci(R,"Set"),Do=ci(R,"WeakMap"),Bo=ci(me,"create"),La=Do&&new Do,ki={},P1=ui(Kc),N1=ui(Mo),M1=ui(Zc),D1=ui(Li),B1=ui(Do),ka=Tr?Tr.prototype:t,Lo=ka?ka.valueOf:t,ap=ka?ka.toString:t;function d(e){if(Ie(e)&&!q(e)&&!(e instanceof te)){if(e instanceof Ht)return e;if(fe.call(e,"__wrapped__"))return sd(e)}return new Ht(e)}var Fi=function(){function e(){}return function(r){if(!xe(r))return{};if(tp)return tp(r);e.prototype=r;var o=new e;return e.prototype=t,o}}();function Fa(){}function Ht(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=t}d.templateSettings={escape:ei,evaluate:kt,interpolate:Ze,variable:"",imports:{_:d}},d.prototype=Fa.prototype,d.prototype.constructor=d,Ht.prototype=Fi(Fa.prototype),Ht.prototype.constructor=Ht;function te(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=at,this.__views__=[]}function L1(){var e=new te(this.__wrapped__);return e.__actions__=pt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=pt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=pt(this.__views__),e}function k1(){if(this.__filtered__){var e=new te(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function F1(){var e=this.__wrapped__.value(),r=this.__dir__,o=q(e),c=r<0,f=o?e.length:0,g=Xy(0,f,this.__views__),_=g.start,y=g.end,C=y-_,A=c?y:_-1,O=this.__iteratees__,w=O.length,D=0,k=tt(C,this.__takeCount__);if(!o||!c&&f==C&&k==C)return wp(e,this.__actions__);var U=[];e:for(;C--&&D<k;){A+=r;for(var j=-1,G=e[A];++j<w;){var Q=O[j],re=Q.iteratee,Tt=Q.type,ut=re(G);if(Tt==Wr)G=ut;else if(!ut){if(Tt==ot)continue e;break e}}U[D++]=G}return U}te.prototype=Fi(Fa.prototype),te.prototype.constructor=te;function ii(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function U1(){this.__data__=Bo?Bo(null):{},this.size=0}function G1(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}function H1(e){var r=this.__data__;if(Bo){var o=r[e];return o===l?t:o}return fe.call(r,e)?r[e]:t}function $1(e){var r=this.__data__;return Bo?r[e]!==t:fe.call(r,e)}function Y1(e,r){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Bo&&r===t?l:r,this}ii.prototype.clear=U1,ii.prototype.delete=G1,ii.prototype.get=H1,ii.prototype.has=$1,ii.prototype.set=Y1;function Yn(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function W1(){this.__data__=[],this.size=0}function V1(e){var r=this.__data__,o=Ua(r,e);if(o<0)return!1;var c=r.length-1;return o==c?r.pop():Na.call(r,o,1),--this.size,!0}function q1(e){var r=this.__data__,o=Ua(r,e);return o<0?t:r[o][1]}function z1(e){return Ua(this.__data__,e)>-1}function K1(e,r){var o=this.__data__,c=Ua(o,e);return c<0?(++this.size,o.push([e,r])):o[c][1]=r,this}Yn.prototype.clear=W1,Yn.prototype.delete=V1,Yn.prototype.get=q1,Yn.prototype.has=z1,Yn.prototype.set=K1;function Wn(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function Z1(){this.size=0,this.__data__={hash:new ii,map:new(Mo||Yn),string:new ii}}function X1(e){var r=ja(this,e).delete(e);return this.size-=r?1:0,r}function j1(e){return ja(this,e).get(e)}function J1(e){return ja(this,e).has(e)}function Q1(e,r){var o=ja(this,e),c=o.size;return o.set(e,r),this.size+=o.size==c?0:1,this}Wn.prototype.clear=Z1,Wn.prototype.delete=X1,Wn.prototype.get=j1,Wn.prototype.has=J1,Wn.prototype.set=Q1;function oi(e){var r=-1,o=e==null?0:e.length;for(this.__data__=new Wn;++r<o;)this.add(e[r])}function ey(e){return this.__data__.set(e,l),this}function ty(e){return this.__data__.has(e)}oi.prototype.add=oi.prototype.push=ey,oi.prototype.has=ty;function nn(e){var r=this.__data__=new Yn(e);this.size=r.size}function ny(){this.__data__=new Yn,this.size=0}function ry(e){var r=this.__data__,o=r.delete(e);return this.size=r.size,o}function iy(e){return this.__data__.get(e)}function oy(e){return this.__data__.has(e)}function ay(e,r){var o=this.__data__;if(o instanceof Yn){var c=o.__data__;if(!Mo||c.length<i-1)return c.push([e,r]),this.size=++o.size,this;o=this.__data__=new Wn(c)}return o.set(e,r),this.size=o.size,this}nn.prototype.clear=ny,nn.prototype.delete=ry,nn.prototype.get=iy,nn.prototype.has=oy,nn.prototype.set=ay;function sp(e,r){var o=q(e),c=!o&&li(e),f=!o&&!c&&Ir(e),g=!o&&!c&&!f&&$i(e),_=o||c||f||g,y=_?Yc(e.length,h1):[],C=y.length;for(var A in e)(r||fe.call(e,A))&&!(_&&(A=="length"||f&&(A=="offset"||A=="parent")||g&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||Kn(A,C)))&&y.push(A);return y}function cp(e){var r=e.length;return r?e[au(0,r-1)]:t}function sy(e,r){return Ja(pt(e),ai(r,0,e.length))}function cy(e){return Ja(pt(e))}function Xc(e,r,o){(o!==t&&!rn(e[r],o)||o===t&&!(r in e))&&Vn(e,r,o)}function ko(e,r,o){var c=e[r];(!(fe.call(e,r)&&rn(c,o))||o===t&&!(r in e))&&Vn(e,r,o)}function Ua(e,r){for(var o=e.length;o--;)if(rn(e[o][0],r))return o;return-1}function uy(e,r,o,c){return Rr(e,function(f,g,_){r(c,f,o(f),_)}),c}function up(e,r){return e&&Tn(r,qe(r),e)}function ly(e,r){return e&&Tn(r,mt(r),e)}function Vn(e,r,o){r=="__proto__"&&Ma?Ma(e,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[r]=o}function jc(e,r){for(var o=-1,c=r.length,f=b(c),g=e==null;++o<c;)f[o]=g?t:Pu(e,r[o]);return f}function ai(e,r,o){return e===e&&(o!==t&&(e=e<=o?e:o),r!==t&&(e=e>=r?e:r)),e}function $t(e,r,o,c,f,g){var _,y=r&h,C=r&S,A=r&v;if(o&&(_=f?o(e,c,f,g):o(e)),_!==t)return _;if(!xe(e))return e;var O=q(e);if(O){if(_=Jy(e),!y)return pt(e,_)}else{var w=nt(e),D=w==bi||w==_a;if(Ir(e))return Mp(e,y);if(w==Qt||w==hr||D&&!f){if(_=C||D?{}:Jp(e),!y)return C?Hy(e,ly(_,e)):Gy(e,up(_,e))}else{if(!ve[w])return f?e:{};_=Qy(e,w,y)}}g||(g=new nn);var k=g.get(e);if(k)return k;g.set(e,_),Ad(e)?e.forEach(function(G){_.add($t(G,r,o,G,e,g))}):Rd(e)&&e.forEach(function(G,Q){_.set(Q,$t(G,r,o,Q,e,g))});var U=A?C?_u:hu:C?mt:qe,j=O?t:U(e);return Ut(j||e,function(G,Q){j&&(Q=G,G=e[Q]),ko(_,Q,$t(G,r,o,Q,e,g))}),_}function fy(e){var r=qe(e);return function(o){return lp(o,e,r)}}function lp(e,r,o){var c=o.length;if(e==null)return!c;for(e=me(e);c--;){var f=o[c],g=r[f],_=e[f];if(_===t&&!(f in e)||!g(_))return!1}return!0}function fp(e,r,o){if(typeof e!="function")throw new Gt(s);return Wo(function(){e.apply(t,o)},r)}function Fo(e,r,o,c){var f=-1,g=Ca,_=!0,y=e.length,C=[],A=r.length;if(!y)return C;o&&(r=Ce(r,Et(o))),c?(g=kc,_=!1):r.length>=i&&(g=Po,_=!1,r=new oi(r));e:for(;++f<y;){var O=e[f],w=o==null?O:o(O);if(O=c||O!==0?O:0,_&&w===w){for(var D=A;D--;)if(r[D]===w)continue e;C.push(O)}else g(r,w,c)||C.push(O)}return C}var Rr=Fp(bn),pp=Fp(Qc,!0);function py(e,r){var o=!0;return Rr(e,function(c,f,g){return o=!!r(c,f,g),o}),o}function Ga(e,r,o){for(var c=-1,f=e.length;++c<f;){var g=e[c],_=r(g);if(_!=null&&(y===t?_===_&&!bt(_):o(_,y)))var y=_,C=g}return C}function dy(e,r,o,c){var f=e.length;for(o=z(o),o<0&&(o=-o>f?0:f+o),c=c===t||c>f?f:z(c),c<0&&(c+=f),c=o>c?0:Id(c);o<c;)e[o++]=r;return e}function dp(e,r){var o=[];return Rr(e,function(c,f,g){r(c,f,g)&&o.push(c)}),o}function je(e,r,o,c,f){var g=-1,_=e.length;for(o||(o=tS),f||(f=[]);++g<_;){var y=e[g];r>0&&o(y)?r>1?je(y,r-1,o,c,f):Er(f,y):c||(f[f.length]=y)}return f}var Jc=Up(),mp=Up(!0);function bn(e,r){return e&&Jc(e,r,qe)}function Qc(e,r){return e&&mp(e,r,qe)}function Ha(e,r){return vr(r,function(o){return Zn(e[o])})}function si(e,r){r=Ar(r,e);for(var o=0,c=r.length;e!=null&&o<c;)e=e[Rn(r[o++])];return o&&o==c?e:t}function gp(e,r,o){var c=r(e);return q(e)?c:Er(c,o(e))}function st(e){return e==null?e===t?Ec:Sc:ri&&ri in me(e)?Zy(e):cS(e)}function eu(e,r){return e>r}function my(e,r){return e!=null&&fe.call(e,r)}function gy(e,r){return e!=null&&r in me(e)}function hy(e,r,o){return e>=tt(r,o)&&e<He(r,o)}function tu(e,r,o){for(var c=o?kc:Ca,f=e[0].length,g=e.length,_=g,y=b(g),C=1/0,A=[];_--;){var O=e[_];_&&r&&(O=Ce(O,Et(r))),C=tt(O.length,C),y[_]=!o&&(r||f>=120&&O.length>=120)?new oi(_&&O):t}O=e[0];var w=-1,D=y[0];e:for(;++w<f&&A.length<C;){var k=O[w],U=r?r(k):k;if(k=o||k!==0?k:0,!(D?Po(D,U):c(A,U,o))){for(_=g;--_;){var j=y[_];if(!(j?Po(j,U):c(e[_],U,o)))continue e}D&&D.push(U),A.push(k)}}return A}function _y(e,r,o,c){return bn(e,function(f,g,_){r(c,o(f),g,_)}),c}function Uo(e,r,o){r=Ar(r,e),e=nd(e,r);var c=e==null?e:e[Rn(Wt(r))];return c==null?t:vt(c,e,o)}function hp(e){return Ie(e)&&st(e)==hr}function yy(e){return Ie(e)&&st(e)==Jr}function Sy(e){return Ie(e)&&st(e)==Se}function Go(e,r,o,c,f){return e===r?!0:e==null||r==null||!Ie(e)&&!Ie(r)?e!==e&&r!==r:vy(e,r,o,c,Go,f)}function vy(e,r,o,c,f,g){var _=q(e),y=q(r),C=_?qr:nt(e),A=y?qr:nt(r);C=C==hr?Qt:C,A=A==hr?Qt:A;var O=C==Qt,w=A==Qt,D=C==A;if(D&&Ir(e)){if(!Ir(r))return!1;_=!0,O=!1}if(D&&!O)return g||(g=new nn),_||$i(e)?Zp(e,r,o,c,f,g):zy(e,r,C,o,c,f,g);if(!(o&I)){var k=O&&fe.call(e,"__wrapped__"),U=w&&fe.call(r,"__wrapped__");if(k||U){var j=k?e.value():e,G=U?r.value():r;return g||(g=new nn),f(j,G,o,c,g)}}return D?(g||(g=new nn),Ky(e,r,o,c,f,g)):!1}function Ey(e){return Ie(e)&&nt(e)==yt}function nu(e,r,o,c){var f=o.length,g=f,_=!c;if(e==null)return!g;for(e=me(e);f--;){var y=o[f];if(_&&y[2]?y[1]!==e[y[0]]:!(y[0]in e))return!1}for(;++f<g;){y=o[f];var C=y[0],A=e[C],O=y[1];if(_&&y[2]){if(A===t&&!(C in e))return!1}else{var w=new nn;if(c)var D=c(A,O,C,e,r,w);if(!(D===t?Go(O,A,I|P,c,w):D))return!1}}return!0}function _p(e){if(!xe(e)||rS(e))return!1;var r=Zn(e)?E1:Cn;return r.test(ui(e))}function Cy(e){return Ie(e)&&st(e)==Zr}function by(e){return Ie(e)&&nt(e)==St}function Ty(e){return Ie(e)&&is(e.length)&&!!Ee[st(e)]}function yp(e){return typeof e=="function"?e:e==null?gt:typeof e=="object"?q(e)?Ep(e[0],e[1]):vp(e):Gd(e)}function ru(e){if(!Yo(e))return A1(e);var r=[];for(var o in me(e))fe.call(e,o)&&o!="constructor"&&r.push(o);return r}function Ry(e){if(!xe(e))return sS(e);var r=Yo(e),o=[];for(var c in e)c=="constructor"&&(r||!fe.call(e,c))||o.push(c);return o}function iu(e,r){return e<r}function Sp(e,r){var o=-1,c=dt(e)?b(e.length):[];return Rr(e,function(f,g,_){c[++o]=r(f,g,_)}),c}function vp(e){var r=Su(e);return r.length==1&&r[0][2]?ed(r[0][0],r[0][1]):function(o){return o===e||nu(o,e,r)}}function Ep(e,r){return Eu(e)&&Qp(r)?ed(Rn(e),r):function(o){var c=Pu(o,e);return c===t&&c===r?Nu(o,e):Go(r,c,I|P)}}function $a(e,r,o,c,f){e!==r&&Jc(r,function(g,_){if(f||(f=new nn),xe(g))xy(e,r,_,o,$a,c,f);else{var y=c?c(bu(e,_),g,_+"",e,r,f):t;y===t&&(y=g),Xc(e,_,y)}},mt)}function xy(e,r,o,c,f,g,_){var y=bu(e,o),C=bu(r,o),A=_.get(C);if(A){Xc(e,o,A);return}var O=g?g(y,C,o+"",e,r,_):t,w=O===t;if(w){var D=q(C),k=!D&&Ir(C),U=!D&&!k&&$i(C);O=C,D||k||U?q(y)?O=y:De(y)?O=pt(y):k?(w=!1,O=Mp(C,!0)):U?(w=!1,O=Dp(C,!0)):O=[]:Vo(C)||li(C)?(O=y,li(y)?O=wd(y):(!xe(y)||Zn(y))&&(O=Jp(C))):w=!1}w&&(_.set(C,O),f(O,C,c,g,_),_.delete(C)),Xc(e,o,O)}function Cp(e,r){var o=e.length;if(o)return r+=r<0?o:0,Kn(r,o)?e[r]:t}function bp(e,r,o){r.length?r=Ce(r,function(g){return q(g)?function(_){return si(_,g.length===1?g[0]:g)}:g}):r=[gt];var c=-1;r=Ce(r,Et(F()));var f=Sp(e,function(g,_,y){var C=Ce(r,function(A){return A(g)});return{criteria:C,index:++c,value:g}});return Q_(f,function(g,_){return Uy(g,_,o)})}function Ay(e,r){return Tp(e,r,function(o,c){return Nu(e,c)})}function Tp(e,r,o){for(var c=-1,f=r.length,g={};++c<f;){var _=r[c],y=si(e,_);o(y,_)&&Ho(g,Ar(_,e),y)}return g}function Oy(e){return function(r){return si(r,e)}}function ou(e,r,o,c){var f=c?J_:Ni,g=-1,_=r.length,y=e;for(e===r&&(r=pt(r)),o&&(y=Ce(e,Et(o)));++g<_;)for(var C=0,A=r[g],O=o?o(A):A;(C=f(y,O,C,c))>-1;)y!==e&&Na.call(y,C,1),Na.call(e,C,1);return e}function Rp(e,r){for(var o=e?r.length:0,c=o-1;o--;){var f=r[o];if(o==c||f!==g){var g=f;Kn(f)?Na.call(e,f,1):uu(e,f)}}return e}function au(e,r){return e+Ba(op()*(r-e+1))}function Iy(e,r,o,c){for(var f=-1,g=He(Da((r-e)/(o||1)),0),_=b(g);g--;)_[c?g:++f]=e,e+=o;return _}function su(e,r){var o="";if(!e||r<1||r>ze)return o;do r%2&&(o+=e),r=Ba(r/2),r&&(e+=e);while(r);return o}function J(e,r){return Tu(td(e,r,gt),e+"")}function wy(e){return cp(Yi(e))}function Py(e,r){var o=Yi(e);return Ja(o,ai(r,0,o.length))}function Ho(e,r,o,c){if(!xe(e))return e;r=Ar(r,e);for(var f=-1,g=r.length,_=g-1,y=e;y!=null&&++f<g;){var C=Rn(r[f]),A=o;if(C==="__proto__"||C==="constructor"||C==="prototype")return e;if(f!=_){var O=y[C];A=c?c(O,C,y):t,A===t&&(A=xe(O)?O:Kn(r[f+1])?[]:{})}ko(y,C,A),y=y[C]}return e}var xp=La?function(e,r){return La.set(e,r),e}:gt,Ny=Ma?function(e,r){return Ma(e,"toString",{configurable:!0,enumerable:!1,value:Du(r),writable:!0})}:gt;function My(e){return Ja(Yi(e))}function Yt(e,r,o){var c=-1,f=e.length;r<0&&(r=-r>f?0:f+r),o=o>f?f:o,o<0&&(o+=f),f=r>o?0:o-r>>>0,r>>>=0;for(var g=b(f);++c<f;)g[c]=e[c+r];return g}function Dy(e,r){var o;return Rr(e,function(c,f,g){return o=r(c,f,g),!o}),!!o}function Ya(e,r,o){var c=0,f=e==null?c:e.length;if(typeof r=="number"&&r===r&&f<=_c){for(;c<f;){var g=c+f>>>1,_=e[g];_!==null&&!bt(_)&&(o?_<=r:_<r)?c=g+1:f=g}return f}return cu(e,r,gt,o)}function cu(e,r,o,c){var f=0,g=e==null?0:e.length;if(g===0)return 0;r=o(r);for(var _=r!==r,y=r===null,C=bt(r),A=r===t;f<g;){var O=Ba((f+g)/2),w=o(e[O]),D=w!==t,k=w===null,U=w===w,j=bt(w);if(_)var G=c||U;else A?G=U&&(c||D):y?G=U&&D&&(c||!k):C?G=U&&D&&!k&&(c||!j):k||j?G=!1:G=c?w<=r:w<r;G?f=O+1:g=O}return tt(g,hc)}function Ap(e,r){for(var o=-1,c=e.length,f=0,g=[];++o<c;){var _=e[o],y=r?r(_):_;if(!o||!rn(y,C)){var C=y;g[f++]=_===0?0:_}}return g}function Op(e){return typeof e=="number"?e:bt(e)?Mt:+e}function Ct(e){if(typeof e=="string")return e;if(q(e))return Ce(e,Ct)+"";if(bt(e))return ap?ap.call(e):"";var r=e+"";return r=="0"&&1/e==-ye?"-0":r}function xr(e,r,o){var c=-1,f=Ca,g=e.length,_=!0,y=[],C=y;if(o)_=!1,f=kc;else if(g>=i){var A=r?null:Vy(e);if(A)return Ta(A);_=!1,f=Po,C=new oi}else C=r?[]:y;e:for(;++c<g;){var O=e[c],w=r?r(O):O;if(O=o||O!==0?O:0,_&&w===w){for(var D=C.length;D--;)if(C[D]===w)continue e;r&&C.push(w),y.push(O)}else f(C,w,o)||(C!==y&&C.push(w),y.push(O))}return y}function uu(e,r){return r=Ar(r,e),e=nd(e,r),e==null||delete e[Rn(Wt(r))]}function Ip(e,r,o,c){return Ho(e,r,o(si(e,r)),c)}function Wa(e,r,o,c){for(var f=e.length,g=c?f:-1;(c?g--:++g<f)&&r(e[g],g,e););return o?Yt(e,c?0:g,c?g+1:f):Yt(e,c?g+1:0,c?f:g)}function wp(e,r){var o=e;return o instanceof te&&(o=o.value()),Fc(r,function(c,f){return f.func.apply(f.thisArg,Er([c],f.args))},o)}function lu(e,r,o){var c=e.length;if(c<2)return c?xr(e[0]):[];for(var f=-1,g=b(c);++f<c;)for(var _=e[f],y=-1;++y<c;)y!=f&&(g[f]=Fo(g[f]||_,e[y],r,o));return xr(je(g,1),r,o)}function Pp(e,r,o){for(var c=-1,f=e.length,g=r.length,_={};++c<f;){var y=c<g?r[c]:t;o(_,e[c],y)}return _}function fu(e){return De(e)?e:[]}function pu(e){return typeof e=="function"?e:gt}function Ar(e,r){return q(e)?e:Eu(e,r)?[e]:ad(le(e))}var By=J;function Or(e,r,o){var c=e.length;return o=o===t?c:o,!r&&o>=c?e:Yt(e,r,o)}var Np=C1||function(e){return Ve.clearTimeout(e)};function Mp(e,r){if(r)return e.slice();var o=e.length,c=ep?ep(o):new e.constructor(o);return e.copy(c),c}function du(e){var r=new e.constructor(e.byteLength);return new wa(r).set(new wa(e)),r}function Ly(e,r){var o=r?du(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function ky(e){var r=new e.constructor(e.source,Ao.exec(e));return r.lastIndex=e.lastIndex,r}function Fy(e){return Lo?me(Lo.call(e)):{}}function Dp(e,r){var o=r?du(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function Bp(e,r){if(e!==r){var o=e!==t,c=e===null,f=e===e,g=bt(e),_=r!==t,y=r===null,C=r===r,A=bt(r);if(!y&&!A&&!g&&e>r||g&&_&&C&&!y&&!A||c&&_&&C||!o&&C||!f)return 1;if(!c&&!g&&!A&&e<r||A&&o&&f&&!c&&!g||y&&o&&f||!_&&f||!C)return-1}return 0}function Uy(e,r,o){for(var c=-1,f=e.criteria,g=r.criteria,_=f.length,y=o.length;++c<_;){var C=Bp(f[c],g[c]);if(C){if(c>=y)return C;var A=o[c];return C*(A=="desc"?-1:1)}}return e.index-r.index}function Lp(e,r,o,c){for(var f=-1,g=e.length,_=o.length,y=-1,C=r.length,A=He(g-_,0),O=b(C+A),w=!c;++y<C;)O[y]=r[y];for(;++f<_;)(w||f<g)&&(O[o[f]]=e[f]);for(;A--;)O[y++]=e[f++];return O}function kp(e,r,o,c){for(var f=-1,g=e.length,_=-1,y=o.length,C=-1,A=r.length,O=He(g-y,0),w=b(O+A),D=!c;++f<O;)w[f]=e[f];for(var k=f;++C<A;)w[k+C]=r[C];for(;++_<y;)(D||f<g)&&(w[k+o[_]]=e[f++]);return w}function pt(e,r){var o=-1,c=e.length;for(r||(r=b(c));++o<c;)r[o]=e[o];return r}function Tn(e,r,o,c){var f=!o;o||(o={});for(var g=-1,_=r.length;++g<_;){var y=r[g],C=c?c(o[y],e[y],y,o,e):t;C===t&&(C=e[y]),f?Vn(o,y,C):ko(o,y,C)}return o}function Gy(e,r){return Tn(e,vu(e),r)}function Hy(e,r){return Tn(e,Xp(e),r)}function Va(e,r){return function(o,c){var f=q(o)?q_:uy,g=r?r():{};return f(o,e,F(c,2),g)}}function Ui(e){return J(function(r,o){var c=-1,f=o.length,g=f>1?o[f-1]:t,_=f>2?o[2]:t;for(g=e.length>3&&typeof g=="function"?(f--,g):t,_&&ct(o[0],o[1],_)&&(g=f<3?t:g,f=1),r=me(r);++c<f;){var y=o[c];y&&e(r,y,c,g)}return r})}function Fp(e,r){return function(o,c){if(o==null)return o;if(!dt(o))return e(o,c);for(var f=o.length,g=r?f:-1,_=me(o);(r?g--:++g<f)&&c(_[g],g,_)!==!1;);return o}}function Up(e){return function(r,o,c){for(var f=-1,g=me(r),_=c(r),y=_.length;y--;){var C=_[e?y:++f];if(o(g[C],C,g)===!1)break}return r}}function $y(e,r,o){var c=r&L,f=$o(e);function g(){var _=this&&this!==Ve&&this instanceof g?f:e;return _.apply(c?o:this,arguments)}return g}function Gp(e){return function(r){r=le(r);var o=Mi(r)?tn(r):t,c=o?o[0]:r.charAt(0),f=o?Or(o,1).join(""):r.slice(1);return c[e]()+f}}function Gi(e){return function(r){return Fc(Fd(kd(r).replace(N_,"")),e,"")}}function $o(e){return function(){var r=arguments;switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3]);case 5:return new e(r[0],r[1],r[2],r[3],r[4]);case 6:return new e(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new e(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=Fi(e.prototype),c=e.apply(o,r);return xe(c)?c:o}}function Yy(e,r,o){var c=$o(e);function f(){for(var g=arguments.length,_=b(g),y=g,C=Hi(f);y--;)_[y]=arguments[y];var A=g<3&&_[0]!==C&&_[g-1]!==C?[]:Cr(_,C);if(g-=A.length,g<o)return Vp(e,r,qa,f.placeholder,t,_,A,t,t,o-g);var O=this&&this!==Ve&&this instanceof f?c:e;return vt(O,this,_)}return f}function Hp(e){return function(r,o,c){var f=me(r);if(!dt(r)){var g=F(o,3);r=qe(r),o=function(y){return g(f[y],y,f)}}var _=e(r,o,c);return _>-1?f[g?r[_]:_]:t}}function $p(e){return zn(function(r){var o=r.length,c=o,f=Ht.prototype.thru;for(e&&r.reverse();c--;){var g=r[c];if(typeof g!="function")throw new Gt(s);if(f&&!_&&Xa(g)=="wrapper")var _=new Ht([],!0)}for(c=_?c:o;++c<o;){g=r[c];var y=Xa(g),C=y=="wrapper"?yu(g):t;C&&Cu(C[0])&&C[1]==(Ne|X|ue|Me)&&!C[4].length&&C[9]==1?_=_[Xa(C[0])].apply(_,C[3]):_=g.length==1&&Cu(g)?_[y]():_.thru(g)}return function(){var A=arguments,O=A[0];if(_&&A.length==1&&q(O))return _.plant(O).value();for(var w=0,D=o?r[w].apply(this,A):O;++w<o;)D=r[w].call(this,D);return D}})}function qa(e,r,o,c,f,g,_,y,C,A){var O=r&Ne,w=r&L,D=r&Y,k=r&(X|H),U=r&Te,j=D?t:$o(e);function G(){for(var Q=arguments.length,re=b(Q),Tt=Q;Tt--;)re[Tt]=arguments[Tt];if(k)var ut=Hi(G),Rt=t1(re,ut);if(c&&(re=Lp(re,c,f,k)),g&&(re=kp(re,g,_,k)),Q-=Rt,k&&Q<A){var Be=Cr(re,ut);return Vp(e,r,qa,G.placeholder,o,re,Be,y,C,A-Q)}var on=w?o:this,jn=D?on[e]:e;return Q=re.length,y?re=uS(re,y):U&&Q>1&&re.reverse(),O&&C<Q&&(re.length=C),this&&this!==Ve&&this instanceof G&&(jn=j||$o(jn)),jn.apply(on,re)}return G}function Yp(e,r){return function(o,c){return _y(o,e,r(c),{})}}function za(e,r){return function(o,c){var f;if(o===t&&c===t)return r;if(o!==t&&(f=o),c!==t){if(f===t)return c;typeof o=="string"||typeof c=="string"?(o=Ct(o),c=Ct(c)):(o=Op(o),c=Op(c)),f=e(o,c)}return f}}function mu(e){return zn(function(r){return r=Ce(r,Et(F())),J(function(o){var c=this;return e(r,function(f){return vt(f,c,o)})})})}function Ka(e,r){r=r===t?" ":Ct(r);var o=r.length;if(o<2)return o?su(r,e):r;var c=su(r,Da(e/Di(r)));return Mi(r)?Or(tn(c),0,e).join(""):c.slice(0,e)}function Wy(e,r,o,c){var f=r&L,g=$o(e);function _(){for(var y=-1,C=arguments.length,A=-1,O=c.length,w=b(O+C),D=this&&this!==Ve&&this instanceof _?g:e;++A<O;)w[A]=c[A];for(;C--;)w[A++]=arguments[++y];return vt(D,f?o:this,w)}return _}function Wp(e){return function(r,o,c){return c&&typeof c!="number"&&ct(r,o,c)&&(o=c=t),r=Xn(r),o===t?(o=r,r=0):o=Xn(o),c=c===t?r<o?1:-1:Xn(c),Iy(r,o,c,e)}}function Za(e){return function(r,o){return typeof r=="string"&&typeof o=="string"||(r=Vt(r),o=Vt(o)),e(r,o)}}function Vp(e,r,o,c,f,g,_,y,C,A){var O=r&X,w=O?_:t,D=O?t:_,k=O?g:t,U=O?t:g;r|=O?ue:de,r&=~(O?de:ue),r&ce||(r&=~(L|Y));var j=[e,r,f,k,w,U,D,y,C,A],G=o.apply(t,j);return Cu(e)&&rd(G,j),G.placeholder=c,id(G,e,r)}function gu(e){var r=Ge[e];return function(o,c){if(o=Vt(o),c=c==null?0:tt(z(c),292),c&&ip(o)){var f=(le(o)+"e").split("e"),g=r(f[0]+"e"+(+f[1]+c));return f=(le(g)+"e").split("e"),+(f[0]+"e"+(+f[1]-c))}return r(o)}}var Vy=Li&&1/Ta(new Li([,-0]))[1]==ye?function(e){return new Li(e)}:ku;function qp(e){return function(r){var o=nt(r);return o==yt?Vc(r):o==St?c1(r):e1(r,e(r))}}function qn(e,r,o,c,f,g,_,y){var C=r&Y;if(!C&&typeof e!="function")throw new Gt(s);var A=c?c.length:0;if(A||(r&=~(ue|de),c=f=t),_=_===t?_:He(z(_),0),y=y===t?y:z(y),A-=f?f.length:0,r&de){var O=c,w=f;c=f=t}var D=C?t:yu(e),k=[e,r,o,c,f,O,w,g,_,y];if(D&&aS(k,D),e=k[0],r=k[1],o=k[2],c=k[3],f=k[4],y=k[9]=k[9]===t?C?0:e.length:He(k[9]-A,0),!y&&r&(X|H)&&(r&=~(X|H)),!r||r==L)var U=$y(e,r,o);else r==X||r==H?U=Yy(e,r,y):(r==ue||r==(L|ue))&&!f.length?U=Wy(e,r,o,c):U=qa.apply(t,k);var j=D?xp:rd;return id(j(U,k),e,r)}function zp(e,r,o,c){return e===t||rn(e,Bi[o])&&!fe.call(c,o)?r:e}function Kp(e,r,o,c,f,g){return xe(e)&&xe(r)&&(g.set(r,e),$a(e,r,t,Kp,g),g.delete(r)),e}function qy(e){return Vo(e)?t:e}function Zp(e,r,o,c,f,g){var _=o&I,y=e.length,C=r.length;if(y!=C&&!(_&&C>y))return!1;var A=g.get(e),O=g.get(r);if(A&&O)return A==r&&O==e;var w=-1,D=!0,k=o&P?new oi:t;for(g.set(e,r),g.set(r,e);++w<y;){var U=e[w],j=r[w];if(c)var G=_?c(j,U,w,r,e,g):c(U,j,w,e,r,g);if(G!==t){if(G)continue;D=!1;break}if(k){if(!Uc(r,function(Q,re){if(!Po(k,re)&&(U===Q||f(U,Q,o,c,g)))return k.push(re)})){D=!1;break}}else if(!(U===j||f(U,j,o,c,g))){D=!1;break}}return g.delete(e),g.delete(r),D}function zy(e,r,o,c,f,g,_){switch(o){case _r:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Jr:return!(e.byteLength!=r.byteLength||!g(new wa(e),new wa(r)));case zr:case Se:case Kr:return rn(+e,+r);case Ci:return e.name==r.name&&e.message==r.message;case Zr:case Xr:return e==r+"";case yt:var y=Vc;case St:var C=c&I;if(y||(y=Ta),e.size!=r.size&&!C)return!1;var A=_.get(e);if(A)return A==r;c|=P,_.set(e,r);var O=Zp(y(e),y(r),c,f,g,_);return _.delete(e),O;case Ti:if(Lo)return Lo.call(e)==Lo.call(r)}return!1}function Ky(e,r,o,c,f,g){var _=o&I,y=hu(e),C=y.length,A=hu(r),O=A.length;if(C!=O&&!_)return!1;for(var w=C;w--;){var D=y[w];if(!(_?D in r:fe.call(r,D)))return!1}var k=g.get(e),U=g.get(r);if(k&&U)return k==r&&U==e;var j=!0;g.set(e,r),g.set(r,e);for(var G=_;++w<C;){D=y[w];var Q=e[D],re=r[D];if(c)var Tt=_?c(re,Q,D,r,e,g):c(Q,re,D,e,r,g);if(!(Tt===t?Q===re||f(Q,re,o,c,g):Tt)){j=!1;break}G||(G=D=="constructor")}if(j&&!G){var ut=e.constructor,Rt=r.constructor;ut!=Rt&&"constructor"in e&&"constructor"in r&&!(typeof ut=="function"&&ut instanceof ut&&typeof Rt=="function"&&Rt instanceof Rt)&&(j=!1)}return g.delete(e),g.delete(r),j}function zn(e){return Tu(td(e,t,ld),e+"")}function hu(e){return gp(e,qe,vu)}function _u(e){return gp(e,mt,Xp)}var yu=La?function(e){return La.get(e)}:ku;function Xa(e){for(var r=e.name+"",o=ki[r],c=fe.call(ki,r)?o.length:0;c--;){var f=o[c],g=f.func;if(g==null||g==e)return f.name}return r}function Hi(e){var r=fe.call(d,"placeholder")?d:e;return r.placeholder}function F(){var e=d.iteratee||Bu;return e=e===Bu?yp:e,arguments.length?e(arguments[0],arguments[1]):e}function ja(e,r){var o=e.__data__;return nS(r)?o[typeof r=="string"?"string":"hash"]:o.map}function Su(e){for(var r=qe(e),o=r.length;o--;){var c=r[o],f=e[c];r[o]=[c,f,Qp(f)]}return r}function ci(e,r){var o=o1(e,r);return _p(o)?o:t}function Zy(e){var r=fe.call(e,ri),o=e[ri];try{e[ri]=t;var c=!0}catch{}var f=Oa.call(e);return c&&(r?e[ri]=o:delete e[ri]),f}var vu=zc?function(e){return e==null?[]:(e=me(e),vr(zc(e),function(r){return np.call(e,r)}))}:Fu,Xp=zc?function(e){for(var r=[];e;)Er(r,vu(e)),e=Pa(e);return r}:Fu,nt=st;(Kc&&nt(new Kc(new ArrayBuffer(1)))!=_r||Mo&&nt(new Mo)!=yt||Zc&&nt(Zc.resolve())!=ya||Li&&nt(new Li)!=St||Do&&nt(new Do)!=jr)&&(nt=function(e){var r=st(e),o=r==Qt?e.constructor:t,c=o?ui(o):"";if(c)switch(c){case P1:return _r;case N1:return yt;case M1:return ya;case D1:return St;case B1:return jr}return r});function Xy(e,r,o){for(var c=-1,f=o.length;++c<f;){var g=o[c],_=g.size;switch(g.type){case"drop":e+=_;break;case"dropRight":r-=_;break;case"take":r=tt(r,e+_);break;case"takeRight":e=He(e,r-_);break}}return{start:e,end:r}}function jy(e){var r=e.match(bc);return r?r[1].split(Tc):[]}function jp(e,r,o){r=Ar(r,e);for(var c=-1,f=r.length,g=!1;++c<f;){var _=Rn(r[c]);if(!(g=e!=null&&o(e,_)))break;e=e[_]}return g||++c!=f?g:(f=e==null?0:e.length,!!f&&is(f)&&Kn(_,f)&&(q(e)||li(e)))}function Jy(e){var r=e.length,o=new e.constructor(r);return r&&typeof e[0]=="string"&&fe.call(e,"index")&&(o.index=e.index,o.input=e.input),o}function Jp(e){return typeof e.constructor=="function"&&!Yo(e)?Fi(Pa(e)):{}}function Qy(e,r,o){var c=e.constructor;switch(r){case Jr:return du(e);case zr:case Se:return new c(+e);case _r:return Ly(e,o);case To:case Ro:case M:case T:case N:case $:case Re:case ne:case Oe:return Dp(e,o);case yt:return new c;case Kr:case Xr:return new c(e);case Zr:return ky(e);case St:return new c;case Ti:return Fy(e)}}function eS(e,r){var o=r.length;if(!o)return e;var c=o-1;return r[c]=(o>1?"& ":"")+r[c],r=r.join(o>2?", ":" "),e.replace(Oi,`{
|
|
3
|
-
|
|
4
|
-
`)}function tS(e){return q(e)||li(e)||!!(rp&&e&&e[rp])}function Kn(e,r){var o=typeof e;return r=r??ze,!!r&&(o=="number"||o!="symbol"&&Sa.test(e))&&e>-1&&e%1==0&&e<r}function ct(e,r,o){if(!xe(o))return!1;var c=typeof r;return(c=="number"?dt(o)&&Kn(r,o.length):c=="string"&&r in o)?rn(o[r],e):!1}function Eu(e,r){if(q(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||bt(e)?!0:ti.test(e)||!yr.test(e)||r!=null&&e in me(r)}function nS(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function Cu(e){var r=Xa(e),o=d[r];if(typeof o!="function"||!(r in te.prototype))return!1;if(e===o)return!0;var c=yu(o);return!!c&&e===c[0]}function rS(e){return!!Qf&&Qf in e}var iS=xa?Zn:Uu;function Yo(e){var r=e&&e.constructor,o=typeof r=="function"&&r.prototype||Bi;return e===o}function Qp(e){return e===e&&!xe(e)}function ed(e,r){return function(o){return o==null?!1:o[e]===r&&(r!==t||e in me(o))}}function oS(e){var r=ns(e,function(c){return o.size===p&&o.clear(),c}),o=r.cache;return r}function aS(e,r){var o=e[1],c=r[1],f=o|c,g=f<(L|Y|Ne),_=c==Ne&&o==X||c==Ne&&o==Me&&e[7].length<=r[8]||c==(Ne|Me)&&r[7].length<=r[8]&&o==X;if(!(g||_))return e;c&L&&(e[2]=r[2],f|=o&L?0:ce);var y=r[3];if(y){var C=e[3];e[3]=C?Lp(C,y,r[4]):y,e[4]=C?Cr(e[3],m):r[4]}return y=r[5],y&&(C=e[5],e[5]=C?kp(C,y,r[6]):y,e[6]=C?Cr(e[5],m):r[6]),y=r[7],y&&(e[7]=y),c&Ne&&(e[8]=e[8]==null?r[8]:tt(e[8],r[8])),e[9]==null&&(e[9]=r[9]),e[0]=r[0],e[1]=f,e}function sS(e){var r=[];if(e!=null)for(var o in me(e))r.push(o);return r}function cS(e){return Oa.call(e)}function td(e,r,o){return r=He(r===t?e.length-1:r,0),function(){for(var c=arguments,f=-1,g=He(c.length-r,0),_=b(g);++f<g;)_[f]=c[r+f];f=-1;for(var y=b(r+1);++f<r;)y[f]=c[f];return y[r]=o(_),vt(e,this,y)}}function nd(e,r){return r.length<2?e:si(e,Yt(r,0,-1))}function uS(e,r){for(var o=e.length,c=tt(r.length,o),f=pt(e);c--;){var g=r[c];e[c]=Kn(g,o)?f[g]:t}return e}function bu(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var rd=od(xp),Wo=T1||function(e,r){return Ve.setTimeout(e,r)},Tu=od(Ny);function id(e,r,o){var c=r+"";return Tu(e,eS(c,lS(jy(c),o)))}function od(e){var r=0,o=0;return function(){var c=O1(),f=Nt-(c-o);if(o=c,f>0){if(++r>=it)return arguments[0]}else r=0;return e.apply(t,arguments)}}function Ja(e,r){var o=-1,c=e.length,f=c-1;for(r=r===t?c:r;++o<r;){var g=au(o,f),_=e[g];e[g]=e[o],e[o]=_}return e.length=r,e}var ad=oS(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Ri,function(o,c,f,g){r.push(f?g.replace(xo,"$1"):c||o)}),r});function Rn(e){if(typeof e=="string"||bt(e))return e;var r=e+"";return r=="0"&&1/e==-ye?"-0":r}function ui(e){if(e!=null){try{return Aa.call(e)}catch{}try{return e+""}catch{}}return""}function lS(e,r){return Ut(yc,function(o){var c="_."+o[0];r&o[1]&&!Ca(e,c)&&e.push(c)}),e.sort()}function sd(e){if(e instanceof te)return e.clone();var r=new Ht(e.__wrapped__,e.__chain__);return r.__actions__=pt(e.__actions__),r.__index__=e.__index__,r.__values__=e.__values__,r}function fS(e,r,o){(o?ct(e,r,o):r===t)?r=1:r=He(z(r),0);var c=e==null?0:e.length;if(!c||r<1)return[];for(var f=0,g=0,_=b(Da(c/r));f<c;)_[g++]=Yt(e,f,f+=r);return _}function pS(e){for(var r=-1,o=e==null?0:e.length,c=0,f=[];++r<o;){var g=e[r];g&&(f[c++]=g)}return f}function dS(){var e=arguments.length;if(!e)return[];for(var r=b(e-1),o=arguments[0],c=e;c--;)r[c-1]=arguments[c];return Er(q(o)?pt(o):[o],je(r,1))}var mS=J(function(e,r){return De(e)?Fo(e,je(r,1,De,!0)):[]}),gS=J(function(e,r){var o=Wt(r);return De(o)&&(o=t),De(e)?Fo(e,je(r,1,De,!0),F(o,2)):[]}),hS=J(function(e,r){var o=Wt(r);return De(o)&&(o=t),De(e)?Fo(e,je(r,1,De,!0),t,o):[]});function _S(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===t?1:z(r),Yt(e,r<0?0:r,c)):[]}function yS(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===t?1:z(r),r=c-r,Yt(e,0,r<0?0:r)):[]}function SS(e,r){return e&&e.length?Wa(e,F(r,3),!0,!0):[]}function vS(e,r){return e&&e.length?Wa(e,F(r,3),!0):[]}function ES(e,r,o,c){var f=e==null?0:e.length;return f?(o&&typeof o!="number"&&ct(e,r,o)&&(o=0,c=f),dy(e,r,o,c)):[]}function cd(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var f=o==null?0:z(o);return f<0&&(f=He(c+f,0)),ba(e,F(r,3),f)}function ud(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var f=c-1;return o!==t&&(f=z(o),f=o<0?He(c+f,0):tt(f,c-1)),ba(e,F(r,3),f,!0)}function ld(e){var r=e==null?0:e.length;return r?je(e,1):[]}function CS(e){var r=e==null?0:e.length;return r?je(e,ye):[]}function bS(e,r){var o=e==null?0:e.length;return o?(r=r===t?1:z(r),je(e,r)):[]}function TS(e){for(var r=-1,o=e==null?0:e.length,c={};++r<o;){var f=e[r];c[f[0]]=f[1]}return c}function fd(e){return e&&e.length?e[0]:t}function RS(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var f=o==null?0:z(o);return f<0&&(f=He(c+f,0)),Ni(e,r,f)}function xS(e){var r=e==null?0:e.length;return r?Yt(e,0,-1):[]}var AS=J(function(e){var r=Ce(e,fu);return r.length&&r[0]===e[0]?tu(r):[]}),OS=J(function(e){var r=Wt(e),o=Ce(e,fu);return r===Wt(o)?r=t:o.pop(),o.length&&o[0]===e[0]?tu(o,F(r,2)):[]}),IS=J(function(e){var r=Wt(e),o=Ce(e,fu);return r=typeof r=="function"?r:t,r&&o.pop(),o.length&&o[0]===e[0]?tu(o,t,r):[]});function wS(e,r){return e==null?"":x1.call(e,r)}function Wt(e){var r=e==null?0:e.length;return r?e[r-1]:t}function PS(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var f=c;return o!==t&&(f=z(o),f=f<0?He(c+f,0):tt(f,c-1)),r===r?l1(e,r,f):ba(e,Vf,f,!0)}function NS(e,r){return e&&e.length?Cp(e,z(r)):t}var MS=J(pd);function pd(e,r){return e&&e.length&&r&&r.length?ou(e,r):e}function DS(e,r,o){return e&&e.length&&r&&r.length?ou(e,r,F(o,2)):e}function BS(e,r,o){return e&&e.length&&r&&r.length?ou(e,r,t,o):e}var LS=zn(function(e,r){var o=e==null?0:e.length,c=jc(e,r);return Rp(e,Ce(r,function(f){return Kn(f,o)?+f:f}).sort(Bp)),c});function kS(e,r){var o=[];if(!(e&&e.length))return o;var c=-1,f=[],g=e.length;for(r=F(r,3);++c<g;){var _=e[c];r(_,c,e)&&(o.push(_),f.push(c))}return Rp(e,f),o}function Ru(e){return e==null?e:w1.call(e)}function FS(e,r,o){var c=e==null?0:e.length;return c?(o&&typeof o!="number"&&ct(e,r,o)?(r=0,o=c):(r=r==null?0:z(r),o=o===t?c:z(o)),Yt(e,r,o)):[]}function US(e,r){return Ya(e,r)}function GS(e,r,o){return cu(e,r,F(o,2))}function HS(e,r){var o=e==null?0:e.length;if(o){var c=Ya(e,r);if(c<o&&rn(e[c],r))return c}return-1}function $S(e,r){return Ya(e,r,!0)}function YS(e,r,o){return cu(e,r,F(o,2),!0)}function WS(e,r){var o=e==null?0:e.length;if(o){var c=Ya(e,r,!0)-1;if(rn(e[c],r))return c}return-1}function VS(e){return e&&e.length?Ap(e):[]}function qS(e,r){return e&&e.length?Ap(e,F(r,2)):[]}function zS(e){var r=e==null?0:e.length;return r?Yt(e,1,r):[]}function KS(e,r,o){return e&&e.length?(r=o||r===t?1:z(r),Yt(e,0,r<0?0:r)):[]}function ZS(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===t?1:z(r),r=c-r,Yt(e,r<0?0:r,c)):[]}function XS(e,r){return e&&e.length?Wa(e,F(r,3),!1,!0):[]}function jS(e,r){return e&&e.length?Wa(e,F(r,3)):[]}var JS=J(function(e){return xr(je(e,1,De,!0))}),QS=J(function(e){var r=Wt(e);return De(r)&&(r=t),xr(je(e,1,De,!0),F(r,2))}),e0=J(function(e){var r=Wt(e);return r=typeof r=="function"?r:t,xr(je(e,1,De,!0),t,r)});function t0(e){return e&&e.length?xr(e):[]}function n0(e,r){return e&&e.length?xr(e,F(r,2)):[]}function r0(e,r){return r=typeof r=="function"?r:t,e&&e.length?xr(e,t,r):[]}function xu(e){if(!(e&&e.length))return[];var r=0;return e=vr(e,function(o){if(De(o))return r=He(o.length,r),!0}),Yc(r,function(o){return Ce(e,Gc(o))})}function dd(e,r){if(!(e&&e.length))return[];var o=xu(e);return r==null?o:Ce(o,function(c){return vt(r,t,c)})}var i0=J(function(e,r){return De(e)?Fo(e,r):[]}),o0=J(function(e){return lu(vr(e,De))}),a0=J(function(e){var r=Wt(e);return De(r)&&(r=t),lu(vr(e,De),F(r,2))}),s0=J(function(e){var r=Wt(e);return r=typeof r=="function"?r:t,lu(vr(e,De),t,r)}),c0=J(xu);function u0(e,r){return Pp(e||[],r||[],ko)}function l0(e,r){return Pp(e||[],r||[],Ho)}var f0=J(function(e){var r=e.length,o=r>1?e[r-1]:t;return o=typeof o=="function"?(e.pop(),o):t,dd(e,o)});function md(e){var r=d(e);return r.__chain__=!0,r}function p0(e,r){return r(e),e}function Qa(e,r){return r(e)}var d0=zn(function(e){var r=e.length,o=r?e[0]:0,c=this.__wrapped__,f=function(g){return jc(g,e)};return r>1||this.__actions__.length||!(c instanceof te)||!Kn(o)?this.thru(f):(c=c.slice(o,+o+(r?1:0)),c.__actions__.push({func:Qa,args:[f],thisArg:t}),new Ht(c,this.__chain__).thru(function(g){return r&&!g.length&&g.push(t),g}))});function m0(){return md(this)}function g0(){return new Ht(this.value(),this.__chain__)}function h0(){this.__values__===t&&(this.__values__=Od(this.value()));var e=this.__index__>=this.__values__.length,r=e?t:this.__values__[this.__index__++];return{done:e,value:r}}function _0(){return this}function y0(e){for(var r,o=this;o instanceof Fa;){var c=sd(o);c.__index__=0,c.__values__=t,r?f.__wrapped__=c:r=c;var f=c;o=o.__wrapped__}return f.__wrapped__=e,r}function S0(){var e=this.__wrapped__;if(e instanceof te){var r=e;return this.__actions__.length&&(r=new te(this)),r=r.reverse(),r.__actions__.push({func:Qa,args:[Ru],thisArg:t}),new Ht(r,this.__chain__)}return this.thru(Ru)}function v0(){return wp(this.__wrapped__,this.__actions__)}var E0=Va(function(e,r,o){fe.call(e,o)?++e[o]:Vn(e,o,1)});function C0(e,r,o){var c=q(e)?Yf:py;return o&&ct(e,r,o)&&(r=t),c(e,F(r,3))}function b0(e,r){var o=q(e)?vr:dp;return o(e,F(r,3))}var T0=Hp(cd),R0=Hp(ud);function x0(e,r){return je(es(e,r),1)}function A0(e,r){return je(es(e,r),ye)}function O0(e,r,o){return o=o===t?1:z(o),je(es(e,r),o)}function gd(e,r){var o=q(e)?Ut:Rr;return o(e,F(r,3))}function hd(e,r){var o=q(e)?z_:pp;return o(e,F(r,3))}var I0=Va(function(e,r,o){fe.call(e,o)?e[o].push(r):Vn(e,o,[r])});function w0(e,r,o,c){e=dt(e)?e:Yi(e),o=o&&!c?z(o):0;var f=e.length;return o<0&&(o=He(f+o,0)),os(e)?o<=f&&e.indexOf(r,o)>-1:!!f&&Ni(e,r,o)>-1}var P0=J(function(e,r,o){var c=-1,f=typeof r=="function",g=dt(e)?b(e.length):[];return Rr(e,function(_){g[++c]=f?vt(r,_,o):Uo(_,r,o)}),g}),N0=Va(function(e,r,o){Vn(e,o,r)});function es(e,r){var o=q(e)?Ce:Sp;return o(e,F(r,3))}function M0(e,r,o,c){return e==null?[]:(q(r)||(r=r==null?[]:[r]),o=c?t:o,q(o)||(o=o==null?[]:[o]),bp(e,r,o))}var D0=Va(function(e,r,o){e[o?0:1].push(r)},function(){return[[],[]]});function B0(e,r,o){var c=q(e)?Fc:zf,f=arguments.length<3;return c(e,F(r,4),o,f,Rr)}function L0(e,r,o){var c=q(e)?K_:zf,f=arguments.length<3;return c(e,F(r,4),o,f,pp)}function k0(e,r){var o=q(e)?vr:dp;return o(e,rs(F(r,3)))}function F0(e){var r=q(e)?cp:wy;return r(e)}function U0(e,r,o){(o?ct(e,r,o):r===t)?r=1:r=z(r);var c=q(e)?sy:Py;return c(e,r)}function G0(e){var r=q(e)?cy:My;return r(e)}function H0(e){if(e==null)return 0;if(dt(e))return os(e)?Di(e):e.length;var r=nt(e);return r==yt||r==St?e.size:ru(e).length}function $0(e,r,o){var c=q(e)?Uc:Dy;return o&&ct(e,r,o)&&(r=t),c(e,F(r,3))}var Y0=J(function(e,r){if(e==null)return[];var o=r.length;return o>1&&ct(e,r[0],r[1])?r=[]:o>2&&ct(r[0],r[1],r[2])&&(r=[r[0]]),bp(e,je(r,1),[])}),ts=b1||function(){return Ve.Date.now()};function W0(e,r){if(typeof r!="function")throw new Gt(s);return e=z(e),function(){if(--e<1)return r.apply(this,arguments)}}function _d(e,r,o){return r=o?t:r,r=e&&r==null?e.length:r,qn(e,Ne,t,t,t,t,r)}function yd(e,r){var o;if(typeof r!="function")throw new Gt(s);return e=z(e),function(){return--e>0&&(o=r.apply(this,arguments)),e<=1&&(r=t),o}}var Au=J(function(e,r,o){var c=L;if(o.length){var f=Cr(o,Hi(Au));c|=ue}return qn(e,c,r,o,f)}),Sd=J(function(e,r,o){var c=L|Y;if(o.length){var f=Cr(o,Hi(Sd));c|=ue}return qn(r,c,e,o,f)});function vd(e,r,o){r=o?t:r;var c=qn(e,X,t,t,t,t,t,r);return c.placeholder=vd.placeholder,c}function Ed(e,r,o){r=o?t:r;var c=qn(e,H,t,t,t,t,t,r);return c.placeholder=Ed.placeholder,c}function Cd(e,r,o){var c,f,g,_,y,C,A=0,O=!1,w=!1,D=!0;if(typeof e!="function")throw new Gt(s);r=Vt(r)||0,xe(o)&&(O=!!o.leading,w="maxWait"in o,g=w?He(Vt(o.maxWait)||0,r):g,D="trailing"in o?!!o.trailing:D);function k(Be){var on=c,jn=f;return c=f=t,A=Be,_=e.apply(jn,on),_}function U(Be){return A=Be,y=Wo(Q,r),O?k(Be):_}function j(Be){var on=Be-C,jn=Be-A,Hd=r-on;return w?tt(Hd,g-jn):Hd}function G(Be){var on=Be-C,jn=Be-A;return C===t||on>=r||on<0||w&&jn>=g}function Q(){var Be=ts();if(G(Be))return re(Be);y=Wo(Q,j(Be))}function re(Be){return y=t,D&&c?k(Be):(c=f=t,_)}function Tt(){y!==t&&Np(y),A=0,c=C=f=y=t}function ut(){return y===t?_:re(ts())}function Rt(){var Be=ts(),on=G(Be);if(c=arguments,f=this,C=Be,on){if(y===t)return U(C);if(w)return Np(y),y=Wo(Q,r),k(C)}return y===t&&(y=Wo(Q,r)),_}return Rt.cancel=Tt,Rt.flush=ut,Rt}var V0=J(function(e,r){return fp(e,1,r)}),q0=J(function(e,r,o){return fp(e,Vt(r)||0,o)});function z0(e){return qn(e,Te)}function ns(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new Gt(s);var o=function(){var c=arguments,f=r?r.apply(this,c):c[0],g=o.cache;if(g.has(f))return g.get(f);var _=e.apply(this,c);return o.cache=g.set(f,_)||g,_};return o.cache=new(ns.Cache||Wn),o}ns.Cache=Wn;function rs(e){if(typeof e!="function")throw new Gt(s);return function(){var r=arguments;switch(r.length){case 0:return!e.call(this);case 1:return!e.call(this,r[0]);case 2:return!e.call(this,r[0],r[1]);case 3:return!e.call(this,r[0],r[1],r[2])}return!e.apply(this,r)}}function K0(e){return yd(2,e)}var Z0=By(function(e,r){r=r.length==1&&q(r[0])?Ce(r[0],Et(F())):Ce(je(r,1),Et(F()));var o=r.length;return J(function(c){for(var f=-1,g=tt(c.length,o);++f<g;)c[f]=r[f].call(this,c[f]);return vt(e,this,c)})}),Ou=J(function(e,r){var o=Cr(r,Hi(Ou));return qn(e,ue,t,r,o)}),bd=J(function(e,r){var o=Cr(r,Hi(bd));return qn(e,de,t,r,o)}),X0=zn(function(e,r){return qn(e,Me,t,t,t,r)});function j0(e,r){if(typeof e!="function")throw new Gt(s);return r=r===t?r:z(r),J(e,r)}function J0(e,r){if(typeof e!="function")throw new Gt(s);return r=r==null?0:He(z(r),0),J(function(o){var c=o[r],f=Or(o,0,r);return c&&Er(f,c),vt(e,this,f)})}function Q0(e,r,o){var c=!0,f=!0;if(typeof e!="function")throw new Gt(s);return xe(o)&&(c="leading"in o?!!o.leading:c,f="trailing"in o?!!o.trailing:f),Cd(e,r,{leading:c,maxWait:r,trailing:f})}function ev(e){return _d(e,1)}function tv(e,r){return Ou(pu(r),e)}function nv(){if(!arguments.length)return[];var e=arguments[0];return q(e)?e:[e]}function rv(e){return $t(e,v)}function iv(e,r){return r=typeof r=="function"?r:t,$t(e,v,r)}function ov(e){return $t(e,h|v)}function av(e,r){return r=typeof r=="function"?r:t,$t(e,h|v,r)}function sv(e,r){return r==null||lp(e,r,qe(r))}function rn(e,r){return e===r||e!==e&&r!==r}var cv=Za(eu),uv=Za(function(e,r){return e>=r}),li=hp(function(){return arguments}())?hp:function(e){return Ie(e)&&fe.call(e,"callee")&&!np.call(e,"callee")},q=b.isArray,lv=kf?Et(kf):yy;function dt(e){return e!=null&&is(e.length)&&!Zn(e)}function De(e){return Ie(e)&&dt(e)}function fv(e){return e===!0||e===!1||Ie(e)&&st(e)==zr}var Ir=R1||Uu,pv=Ff?Et(Ff):Sy;function dv(e){return Ie(e)&&e.nodeType===1&&!Vo(e)}function mv(e){if(e==null)return!0;if(dt(e)&&(q(e)||typeof e=="string"||typeof e.splice=="function"||Ir(e)||$i(e)||li(e)))return!e.length;var r=nt(e);if(r==yt||r==St)return!e.size;if(Yo(e))return!ru(e).length;for(var o in e)if(fe.call(e,o))return!1;return!0}function gv(e,r){return Go(e,r)}function hv(e,r,o){o=typeof o=="function"?o:t;var c=o?o(e,r):t;return c===t?Go(e,r,t,o):!!c}function Iu(e){if(!Ie(e))return!1;var r=st(e);return r==Ci||r==Ae||typeof e.message=="string"&&typeof e.name=="string"&&!Vo(e)}function _v(e){return typeof e=="number"&&ip(e)}function Zn(e){if(!xe(e))return!1;var r=st(e);return r==bi||r==_a||r==Ke||r==vc}function Td(e){return typeof e=="number"&&e==z(e)}function is(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ze}function xe(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function Ie(e){return e!=null&&typeof e=="object"}var Rd=Uf?Et(Uf):Ey;function yv(e,r){return e===r||nu(e,r,Su(r))}function Sv(e,r,o){return o=typeof o=="function"?o:t,nu(e,r,Su(r),o)}function vv(e){return xd(e)&&e!=+e}function Ev(e){if(iS(e))throw new V(a);return _p(e)}function Cv(e){return e===null}function bv(e){return e==null}function xd(e){return typeof e=="number"||Ie(e)&&st(e)==Kr}function Vo(e){if(!Ie(e)||st(e)!=Qt)return!1;var r=Pa(e);if(r===null)return!0;var o=fe.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&Aa.call(o)==S1}var wu=Gf?Et(Gf):Cy;function Tv(e){return Td(e)&&e>=-ze&&e<=ze}var Ad=Hf?Et(Hf):by;function os(e){return typeof e=="string"||!q(e)&&Ie(e)&&st(e)==Xr}function bt(e){return typeof e=="symbol"||Ie(e)&&st(e)==Ti}var $i=$f?Et($f):Ty;function Rv(e){return e===t}function xv(e){return Ie(e)&&nt(e)==jr}function Av(e){return Ie(e)&&st(e)==Cc}var Ov=Za(iu),Iv=Za(function(e,r){return e<=r});function Od(e){if(!e)return[];if(dt(e))return os(e)?tn(e):pt(e);if(No&&e[No])return s1(e[No]());var r=nt(e),o=r==yt?Vc:r==St?Ta:Yi;return o(e)}function Xn(e){if(!e)return e===0?e:0;if(e=Vt(e),e===ye||e===-ye){var r=e<0?-1:1;return r*Vr}return e===e?e:0}function z(e){var r=Xn(e),o=r%1;return r===r?o?r-o:r:0}function Id(e){return e?ai(z(e),0,at):0}function Vt(e){if(typeof e=="number")return e;if(bt(e))return Mt;if(xe(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=xe(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=Kf(e);var o=Oc.test(e);return o||Oo.test(e)?W_(e.slice(2),o?2:8):Ye.test(e)?Mt:+e}function wd(e){return Tn(e,mt(e))}function wv(e){return e?ai(z(e),-ze,ze):e===0?e:0}function le(e){return e==null?"":Ct(e)}var Pv=Ui(function(e,r){if(Yo(r)||dt(r)){Tn(r,qe(r),e);return}for(var o in r)fe.call(r,o)&&ko(e,o,r[o])}),Pd=Ui(function(e,r){Tn(r,mt(r),e)}),as=Ui(function(e,r,o,c){Tn(r,mt(r),e,c)}),Nv=Ui(function(e,r,o,c){Tn(r,qe(r),e,c)}),Mv=zn(jc);function Dv(e,r){var o=Fi(e);return r==null?o:up(o,r)}var Bv=J(function(e,r){e=me(e);var o=-1,c=r.length,f=c>2?r[2]:t;for(f&&ct(r[0],r[1],f)&&(c=1);++o<c;)for(var g=r[o],_=mt(g),y=-1,C=_.length;++y<C;){var A=_[y],O=e[A];(O===t||rn(O,Bi[A])&&!fe.call(e,A))&&(e[A]=g[A])}return e}),Lv=J(function(e){return e.push(t,Kp),vt(Nd,t,e)});function kv(e,r){return Wf(e,F(r,3),bn)}function Fv(e,r){return Wf(e,F(r,3),Qc)}function Uv(e,r){return e==null?e:Jc(e,F(r,3),mt)}function Gv(e,r){return e==null?e:mp(e,F(r,3),mt)}function Hv(e,r){return e&&bn(e,F(r,3))}function $v(e,r){return e&&Qc(e,F(r,3))}function Yv(e){return e==null?[]:Ha(e,qe(e))}function Wv(e){return e==null?[]:Ha(e,mt(e))}function Pu(e,r,o){var c=e==null?t:si(e,r);return c===t?o:c}function Vv(e,r){return e!=null&&jp(e,r,my)}function Nu(e,r){return e!=null&&jp(e,r,gy)}var qv=Yp(function(e,r,o){r!=null&&typeof r.toString!="function"&&(r=Oa.call(r)),e[r]=o},Du(gt)),zv=Yp(function(e,r,o){r!=null&&typeof r.toString!="function"&&(r=Oa.call(r)),fe.call(e,r)?e[r].push(o):e[r]=[o]},F),Kv=J(Uo);function qe(e){return dt(e)?sp(e):ru(e)}function mt(e){return dt(e)?sp(e,!0):Ry(e)}function Zv(e,r){var o={};return r=F(r,3),bn(e,function(c,f,g){Vn(o,r(c,f,g),c)}),o}function Xv(e,r){var o={};return r=F(r,3),bn(e,function(c,f,g){Vn(o,f,r(c,f,g))}),o}var jv=Ui(function(e,r,o){$a(e,r,o)}),Nd=Ui(function(e,r,o,c){$a(e,r,o,c)}),Jv=zn(function(e,r){var o={};if(e==null)return o;var c=!1;r=Ce(r,function(g){return g=Ar(g,e),c||(c=g.length>1),g}),Tn(e,_u(e),o),c&&(o=$t(o,h|S|v,qy));for(var f=r.length;f--;)uu(o,r[f]);return o});function Qv(e,r){return Md(e,rs(F(r)))}var eE=zn(function(e,r){return e==null?{}:Ay(e,r)});function Md(e,r){if(e==null)return{};var o=Ce(_u(e),function(c){return[c]});return r=F(r),Tp(e,o,function(c,f){return r(c,f[0])})}function tE(e,r,o){r=Ar(r,e);var c=-1,f=r.length;for(f||(f=1,e=t);++c<f;){var g=e==null?t:e[Rn(r[c])];g===t&&(c=f,g=o),e=Zn(g)?g.call(e):g}return e}function nE(e,r,o){return e==null?e:Ho(e,r,o)}function rE(e,r,o,c){return c=typeof c=="function"?c:t,e==null?e:Ho(e,r,o,c)}var Dd=qp(qe),Bd=qp(mt);function iE(e,r,o){var c=q(e),f=c||Ir(e)||$i(e);if(r=F(r,4),o==null){var g=e&&e.constructor;f?o=c?new g:[]:xe(e)?o=Zn(g)?Fi(Pa(e)):{}:o={}}return(f?Ut:bn)(e,function(_,y,C){return r(o,_,y,C)}),o}function oE(e,r){return e==null?!0:uu(e,r)}function aE(e,r,o){return e==null?e:Ip(e,r,pu(o))}function sE(e,r,o,c){return c=typeof c=="function"?c:t,e==null?e:Ip(e,r,pu(o),c)}function Yi(e){return e==null?[]:Wc(e,qe(e))}function cE(e){return e==null?[]:Wc(e,mt(e))}function uE(e,r,o){return o===t&&(o=r,r=t),o!==t&&(o=Vt(o),o=o===o?o:0),r!==t&&(r=Vt(r),r=r===r?r:0),ai(Vt(e),r,o)}function lE(e,r,o){return r=Xn(r),o===t?(o=r,r=0):o=Xn(o),e=Vt(e),hy(e,r,o)}function fE(e,r,o){if(o&&typeof o!="boolean"&&ct(e,r,o)&&(r=o=t),o===t&&(typeof r=="boolean"?(o=r,r=t):typeof e=="boolean"&&(o=e,e=t)),e===t&&r===t?(e=0,r=1):(e=Xn(e),r===t?(r=e,e=0):r=Xn(r)),e>r){var c=e;e=r,r=c}if(o||e%1||r%1){var f=op();return tt(e+f*(r-e+Y_("1e-"+((f+"").length-1))),r)}return au(e,r)}var pE=Gi(function(e,r,o){return r=r.toLowerCase(),e+(o?Ld(r):r)});function Ld(e){return Mu(le(e).toLowerCase())}function kd(e){return e=le(e),e&&e.replace(Io,n1).replace(M_,"")}function dE(e,r,o){e=le(e),r=Ct(r);var c=e.length;o=o===t?c:ai(z(o),0,c);var f=o;return o-=r.length,o>=0&&e.slice(o,f)==r}function mE(e){return e=le(e),e&&Qr.test(e)?e.replace(Bt,r1):e}function gE(e){return e=le(e),e&&xi.test(e)?e.replace(Xe,"\\$&"):e}var hE=Gi(function(e,r,o){return e+(o?"-":"")+r.toLowerCase()}),_E=Gi(function(e,r,o){return e+(o?" ":"")+r.toLowerCase()}),yE=Gp("toLowerCase");function SE(e,r,o){e=le(e),r=z(r);var c=r?Di(e):0;if(!r||c>=r)return e;var f=(r-c)/2;return Ka(Ba(f),o)+e+Ka(Da(f),o)}function vE(e,r,o){e=le(e),r=z(r);var c=r?Di(e):0;return r&&c<r?e+Ka(r-c,o):e}function EE(e,r,o){e=le(e),r=z(r);var c=r?Di(e):0;return r&&c<r?Ka(r-c,o)+e:e}function CE(e,r,o){return o||r==null?r=0:r&&(r=+r),I1(le(e).replace(en,""),r||0)}function bE(e,r,o){return(o?ct(e,r,o):r===t)?r=1:r=z(r),su(le(e),r)}function TE(){var e=arguments,r=le(e[0]);return e.length<3?r:r.replace(e[1],e[2])}var RE=Gi(function(e,r,o){return e+(o?"_":"")+r.toLowerCase()});function xE(e,r,o){return o&&typeof o!="number"&&ct(e,r,o)&&(r=o=t),o=o===t?at:o>>>0,o?(e=le(e),e&&(typeof r=="string"||r!=null&&!wu(r))&&(r=Ct(r),!r&&Mi(e))?Or(tn(e),0,o):e.split(r,o)):[]}var AE=Gi(function(e,r,o){return e+(o?" ":"")+Mu(r)});function OE(e,r,o){return e=le(e),o=o==null?0:ai(z(o),0,e.length),r=Ct(r),e.slice(o,o+r.length)==r}function IE(e,r,o){var c=d.templateSettings;o&&ct(e,r,o)&&(r=t),e=le(e),r=as({},r,c,zp);var f=as({},r.imports,c.imports,zp),g=qe(f),_=Wc(f,g),y,C,A=0,O=r.interpolate||Sr,w="__p += '",D=qc((r.escape||Sr).source+"|"+O.source+"|"+(O===Ze?Ac:Sr).source+"|"+(r.evaluate||Sr).source+"|$","g"),k="//# sourceURL="+(fe.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++F_+"]")+`
|
|
5
|
-
`;e.replace(D,function(G,Q,re,Tt,ut,Rt){return re||(re=Tt),w+=e.slice(A,Rt).replace(Ii,i1),Q&&(y=!0,w+=`' +
|
|
6
|
-
__e(`+Q+`) +
|
|
7
|
-
'`),ut&&(C=!0,w+=`';
|
|
8
|
-
`+ut+`;
|
|
9
|
-
__p += '`),re&&(w+=`' +
|
|
10
|
-
((__t = (`+re+`)) == null ? '' : __t) +
|
|
11
|
-
'`),A=Rt+G.length,G}),w+=`';
|
|
12
|
-
`;var U=fe.call(r,"variable")&&r.variable;if(!U)w=`with (obj) {
|
|
13
|
-
`+w+`
|
|
14
|
-
}
|
|
15
|
-
`;else if(xc.test(U))throw new V(u);w=(C?w.replace(et,""):w).replace(ae,"$1").replace(ft,"$1;"),w="function("+(U||"obj")+`) {
|
|
16
|
-
`+(U?"":`obj || (obj = {});
|
|
17
|
-
`)+"var __t, __p = ''"+(y?", __e = _.escape":"")+(C?`, __j = Array.prototype.join;
|
|
18
|
-
function print() { __p += __j.call(arguments, '') }
|
|
19
|
-
`:`;
|
|
20
|
-
`)+w+`return __p
|
|
21
|
-
}`;var j=Ud(function(){return se(g,k+"return "+w).apply(t,_)});if(j.source=w,Iu(j))throw j;return j}function wE(e){return le(e).toLowerCase()}function PE(e){return le(e).toUpperCase()}function NE(e,r,o){if(e=le(e),e&&(o||r===t))return Kf(e);if(!e||!(r=Ct(r)))return e;var c=tn(e),f=tn(r),g=Zf(c,f),_=Xf(c,f)+1;return Or(c,g,_).join("")}function ME(e,r,o){if(e=le(e),e&&(o||r===t))return e.slice(0,Jf(e)+1);if(!e||!(r=Ct(r)))return e;var c=tn(e),f=Xf(c,tn(r))+1;return Or(c,0,f).join("")}function DE(e,r,o){if(e=le(e),e&&(o||r===t))return e.replace(en,"");if(!e||!(r=Ct(r)))return e;var c=tn(e),f=Zf(c,tn(r));return Or(c,f).join("")}function BE(e,r){var o=he,c=_e;if(xe(r)){var f="separator"in r?r.separator:f;o="length"in r?z(r.length):o,c="omission"in r?Ct(r.omission):c}e=le(e);var g=e.length;if(Mi(e)){var _=tn(e);g=_.length}if(o>=g)return e;var y=o-Di(c);if(y<1)return c;var C=_?Or(_,0,y).join(""):e.slice(0,y);if(f===t)return C+c;if(_&&(y+=C.length-y),wu(f)){if(e.slice(y).search(f)){var A,O=C;for(f.global||(f=qc(f.source,le(Ao.exec(f))+"g")),f.lastIndex=0;A=f.exec(O);)var w=A.index;C=C.slice(0,w===t?y:w)}}else if(e.indexOf(Ct(f),y)!=y){var D=C.lastIndexOf(f);D>-1&&(C=C.slice(0,D))}return C+c}function LE(e){return e=le(e),e&&Lt.test(e)?e.replace(Dt,f1):e}var kE=Gi(function(e,r,o){return e+(o?" ":"")+r.toUpperCase()}),Mu=Gp("toUpperCase");function Fd(e,r,o){return e=le(e),r=o?t:r,r===t?a1(e)?m1(e):j_(e):e.match(r)||[]}var Ud=J(function(e,r){try{return vt(e,t,r)}catch(o){return Iu(o)?o:new V(o)}}),FE=zn(function(e,r){return Ut(r,function(o){o=Rn(o),Vn(e,o,Au(e[o],e))}),e});function UE(e){var r=e==null?0:e.length,o=F();return e=r?Ce(e,function(c){if(typeof c[1]!="function")throw new Gt(s);return[o(c[0]),c[1]]}):[],J(function(c){for(var f=-1;++f<r;){var g=e[f];if(vt(g[0],this,c))return vt(g[1],this,c)}})}function GE(e){return fy($t(e,h))}function Du(e){return function(){return e}}function HE(e,r){return e==null||e!==e?r:e}var $E=$p(),YE=$p(!0);function gt(e){return e}function Bu(e){return yp(typeof e=="function"?e:$t(e,h))}function WE(e){return vp($t(e,h))}function VE(e,r){return Ep(e,$t(r,h))}var qE=J(function(e,r){return function(o){return Uo(o,e,r)}}),zE=J(function(e,r){return function(o){return Uo(e,o,r)}});function Lu(e,r,o){var c=qe(r),f=Ha(r,c);o==null&&!(xe(r)&&(f.length||!c.length))&&(o=r,r=e,e=this,f=Ha(r,qe(r)));var g=!(xe(o)&&"chain"in o)||!!o.chain,_=Zn(e);return Ut(f,function(y){var C=r[y];e[y]=C,_&&(e.prototype[y]=function(){var A=this.__chain__;if(g||A){var O=e(this.__wrapped__),w=O.__actions__=pt(this.__actions__);return w.push({func:C,args:arguments,thisArg:e}),O.__chain__=A,O}return C.apply(e,Er([this.value()],arguments))})}),e}function KE(){return Ve._===this&&(Ve._=v1),this}function ku(){}function ZE(e){return e=z(e),J(function(r){return Cp(r,e)})}var XE=mu(Ce),jE=mu(Yf),JE=mu(Uc);function Gd(e){return Eu(e)?Gc(Rn(e)):Oy(e)}function QE(e){return function(r){return e==null?t:si(e,r)}}var e2=Wp(),t2=Wp(!0);function Fu(){return[]}function Uu(){return!1}function n2(){return{}}function r2(){return""}function i2(){return!0}function o2(e,r){if(e=z(e),e<1||e>ze)return[];var o=at,c=tt(e,at);r=F(r),e-=at;for(var f=Yc(c,r);++o<e;)r(o);return f}function a2(e){return q(e)?Ce(e,Rn):bt(e)?[e]:pt(ad(le(e)))}function s2(e){var r=++y1;return le(e)+r}var c2=za(function(e,r){return e+r},0),u2=gu("ceil"),l2=za(function(e,r){return e/r},1),f2=gu("floor");function p2(e){return e&&e.length?Ga(e,gt,eu):t}function d2(e,r){return e&&e.length?Ga(e,F(r,2),eu):t}function m2(e){return qf(e,gt)}function g2(e,r){return qf(e,F(r,2))}function h2(e){return e&&e.length?Ga(e,gt,iu):t}function _2(e,r){return e&&e.length?Ga(e,F(r,2),iu):t}var y2=za(function(e,r){return e*r},1),S2=gu("round"),v2=za(function(e,r){return e-r},0);function E2(e){return e&&e.length?$c(e,gt):0}function C2(e,r){return e&&e.length?$c(e,F(r,2)):0}return d.after=W0,d.ary=_d,d.assign=Pv,d.assignIn=Pd,d.assignInWith=as,d.assignWith=Nv,d.at=Mv,d.before=yd,d.bind=Au,d.bindAll=FE,d.bindKey=Sd,d.castArray=nv,d.chain=md,d.chunk=fS,d.compact=pS,d.concat=dS,d.cond=UE,d.conforms=GE,d.constant=Du,d.countBy=E0,d.create=Dv,d.curry=vd,d.curryRight=Ed,d.debounce=Cd,d.defaults=Bv,d.defaultsDeep=Lv,d.defer=V0,d.delay=q0,d.difference=mS,d.differenceBy=gS,d.differenceWith=hS,d.drop=_S,d.dropRight=yS,d.dropRightWhile=SS,d.dropWhile=vS,d.fill=ES,d.filter=b0,d.flatMap=x0,d.flatMapDeep=A0,d.flatMapDepth=O0,d.flatten=ld,d.flattenDeep=CS,d.flattenDepth=bS,d.flip=z0,d.flow=$E,d.flowRight=YE,d.fromPairs=TS,d.functions=Yv,d.functionsIn=Wv,d.groupBy=I0,d.initial=xS,d.intersection=AS,d.intersectionBy=OS,d.intersectionWith=IS,d.invert=qv,d.invertBy=zv,d.invokeMap=P0,d.iteratee=Bu,d.keyBy=N0,d.keys=qe,d.keysIn=mt,d.map=es,d.mapKeys=Zv,d.mapValues=Xv,d.matches=WE,d.matchesProperty=VE,d.memoize=ns,d.merge=jv,d.mergeWith=Nd,d.method=qE,d.methodOf=zE,d.mixin=Lu,d.negate=rs,d.nthArg=ZE,d.omit=Jv,d.omitBy=Qv,d.once=K0,d.orderBy=M0,d.over=XE,d.overArgs=Z0,d.overEvery=jE,d.overSome=JE,d.partial=Ou,d.partialRight=bd,d.partition=D0,d.pick=eE,d.pickBy=Md,d.property=Gd,d.propertyOf=QE,d.pull=MS,d.pullAll=pd,d.pullAllBy=DS,d.pullAllWith=BS,d.pullAt=LS,d.range=e2,d.rangeRight=t2,d.rearg=X0,d.reject=k0,d.remove=kS,d.rest=j0,d.reverse=Ru,d.sampleSize=U0,d.set=nE,d.setWith=rE,d.shuffle=G0,d.slice=FS,d.sortBy=Y0,d.sortedUniq=VS,d.sortedUniqBy=qS,d.split=xE,d.spread=J0,d.tail=zS,d.take=KS,d.takeRight=ZS,d.takeRightWhile=XS,d.takeWhile=jS,d.tap=p0,d.throttle=Q0,d.thru=Qa,d.toArray=Od,d.toPairs=Dd,d.toPairsIn=Bd,d.toPath=a2,d.toPlainObject=wd,d.transform=iE,d.unary=ev,d.union=JS,d.unionBy=QS,d.unionWith=e0,d.uniq=t0,d.uniqBy=n0,d.uniqWith=r0,d.unset=oE,d.unzip=xu,d.unzipWith=dd,d.update=aE,d.updateWith=sE,d.values=Yi,d.valuesIn=cE,d.without=i0,d.words=Fd,d.wrap=tv,d.xor=o0,d.xorBy=a0,d.xorWith=s0,d.zip=c0,d.zipObject=u0,d.zipObjectDeep=l0,d.zipWith=f0,d.entries=Dd,d.entriesIn=Bd,d.extend=Pd,d.extendWith=as,Lu(d,d),d.add=c2,d.attempt=Ud,d.camelCase=pE,d.capitalize=Ld,d.ceil=u2,d.clamp=uE,d.clone=rv,d.cloneDeep=ov,d.cloneDeepWith=av,d.cloneWith=iv,d.conformsTo=sv,d.deburr=kd,d.defaultTo=HE,d.divide=l2,d.endsWith=dE,d.eq=rn,d.escape=mE,d.escapeRegExp=gE,d.every=C0,d.find=T0,d.findIndex=cd,d.findKey=kv,d.findLast=R0,d.findLastIndex=ud,d.findLastKey=Fv,d.floor=f2,d.forEach=gd,d.forEachRight=hd,d.forIn=Uv,d.forInRight=Gv,d.forOwn=Hv,d.forOwnRight=$v,d.get=Pu,d.gt=cv,d.gte=uv,d.has=Vv,d.hasIn=Nu,d.head=fd,d.identity=gt,d.includes=w0,d.indexOf=RS,d.inRange=lE,d.invoke=Kv,d.isArguments=li,d.isArray=q,d.isArrayBuffer=lv,d.isArrayLike=dt,d.isArrayLikeObject=De,d.isBoolean=fv,d.isBuffer=Ir,d.isDate=pv,d.isElement=dv,d.isEmpty=mv,d.isEqual=gv,d.isEqualWith=hv,d.isError=Iu,d.isFinite=_v,d.isFunction=Zn,d.isInteger=Td,d.isLength=is,d.isMap=Rd,d.isMatch=yv,d.isMatchWith=Sv,d.isNaN=vv,d.isNative=Ev,d.isNil=bv,d.isNull=Cv,d.isNumber=xd,d.isObject=xe,d.isObjectLike=Ie,d.isPlainObject=Vo,d.isRegExp=wu,d.isSafeInteger=Tv,d.isSet=Ad,d.isString=os,d.isSymbol=bt,d.isTypedArray=$i,d.isUndefined=Rv,d.isWeakMap=xv,d.isWeakSet=Av,d.join=wS,d.kebabCase=hE,d.last=Wt,d.lastIndexOf=PS,d.lowerCase=_E,d.lowerFirst=yE,d.lt=Ov,d.lte=Iv,d.max=p2,d.maxBy=d2,d.mean=m2,d.meanBy=g2,d.min=h2,d.minBy=_2,d.stubArray=Fu,d.stubFalse=Uu,d.stubObject=n2,d.stubString=r2,d.stubTrue=i2,d.multiply=y2,d.nth=NS,d.noConflict=KE,d.noop=ku,d.now=ts,d.pad=SE,d.padEnd=vE,d.padStart=EE,d.parseInt=CE,d.random=fE,d.reduce=B0,d.reduceRight=L0,d.repeat=bE,d.replace=TE,d.result=tE,d.round=S2,d.runInContext=E,d.sample=F0,d.size=H0,d.snakeCase=RE,d.some=$0,d.sortedIndex=US,d.sortedIndexBy=GS,d.sortedIndexOf=HS,d.sortedLastIndex=$S,d.sortedLastIndexBy=YS,d.sortedLastIndexOf=WS,d.startCase=AE,d.startsWith=OE,d.subtract=v2,d.sum=E2,d.sumBy=C2,d.template=IE,d.times=o2,d.toFinite=Xn,d.toInteger=z,d.toLength=Id,d.toLower=wE,d.toNumber=Vt,d.toSafeInteger=wv,d.toString=le,d.toUpper=PE,d.trim=NE,d.trimEnd=ME,d.trimStart=DE,d.truncate=BE,d.unescape=LE,d.uniqueId=s2,d.upperCase=kE,d.upperFirst=Mu,d.each=gd,d.eachRight=hd,d.first=fd,Lu(d,function(){var e={};return bn(d,function(r,o){fe.call(d.prototype,o)||(e[o]=r)}),e}(),{chain:!1}),d.VERSION=n,Ut(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Ut(["drop","take"],function(e,r){te.prototype[e]=function(o){o=o===t?1:He(z(o),0);var c=this.__filtered__&&!r?new te(this):this.clone();return c.__filtered__?c.__takeCount__=tt(o,c.__takeCount__):c.__views__.push({size:tt(o,at),type:e+(c.__dir__<0?"Right":"")}),c},te.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),Ut(["filter","map","takeWhile"],function(e,r){var o=r+1,c=o==ot||o==oe;te.prototype[e]=function(f){var g=this.clone();return g.__iteratees__.push({iteratee:F(f,3),type:o}),g.__filtered__=g.__filtered__||c,g}}),Ut(["head","last"],function(e,r){var o="take"+(r?"Right":"");te.prototype[e]=function(){return this[o](1).value()[0]}}),Ut(["initial","tail"],function(e,r){var o="drop"+(r?"":"Right");te.prototype[e]=function(){return this.__filtered__?new te(this):this[o](1)}}),te.prototype.compact=function(){return this.filter(gt)},te.prototype.find=function(e){return this.filter(e).head()},te.prototype.findLast=function(e){return this.reverse().find(e)},te.prototype.invokeMap=J(function(e,r){return typeof e=="function"?new te(this):this.map(function(o){return Uo(o,e,r)})}),te.prototype.reject=function(e){return this.filter(rs(F(e)))},te.prototype.slice=function(e,r){e=z(e);var o=this;return o.__filtered__&&(e>0||r<0)?new te(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),r!==t&&(r=z(r),o=r<0?o.dropRight(-r):o.take(r-e)),o)},te.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},te.prototype.toArray=function(){return this.take(at)},bn(te.prototype,function(e,r){var o=/^(?:filter|find|map|reject)|While$/.test(r),c=/^(?:head|last)$/.test(r),f=d[c?"take"+(r=="last"?"Right":""):r],g=c||/^find/.test(r);f&&(d.prototype[r]=function(){var _=this.__wrapped__,y=c?[1]:arguments,C=_ instanceof te,A=y[0],O=C||q(_),w=function(Q){var re=f.apply(d,Er([Q],y));return c&&D?re[0]:re};O&&o&&typeof A=="function"&&A.length!=1&&(C=O=!1);var D=this.__chain__,k=!!this.__actions__.length,U=g&&!D,j=C&&!k;if(!g&&O){_=j?_:new te(this);var G=e.apply(_,y);return G.__actions__.push({func:Qa,args:[w],thisArg:t}),new Ht(G,D)}return U&&j?e.apply(this,y):(G=this.thru(w),U?c?G.value()[0]:G.value():G)})}),Ut(["pop","push","shift","sort","splice","unshift"],function(e){var r=Ra[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var f=arguments;if(c&&!this.__chain__){var g=this.value();return r.apply(q(g)?g:[],f)}return this[o](function(_){return r.apply(q(_)?_:[],f)})}}),bn(te.prototype,function(e,r){var o=d[r];if(o){var c=o.name+"";fe.call(ki,c)||(ki[c]=[]),ki[c].push({name:r,func:o})}}),ki[qa(t,Y).name]=[{name:"wrapper",func:t}],te.prototype.clone=L1,te.prototype.reverse=k1,te.prototype.value=F1,d.prototype.at=d0,d.prototype.chain=m0,d.prototype.commit=g0,d.prototype.next=h0,d.prototype.plant=y0,d.prototype.reverse=S0,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=v0,d.prototype.first=d.prototype.head,No&&(d.prototype[No]=_0),d},br=g1();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ve._=br,define(function(){return br})):ni?((ni.exports=br)._=br,Bc._=br):Ve._=br}).call(Eo)});var g_=cs((Co,m_)=>{"use strict";var m3=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},vi=m3();m_.exports=Co=vi.fetch;vi.fetch&&(Co.default=vi.fetch.bind(vi));Co.Headers=vi.Headers;Co.Request=vi.Request;Co.Response=vi.Response});var C3={};Gu(C3,{CabinClassMap:()=>v3,DuffelAncillaries:()=>ET,DuffelPayments:()=>BT,PassengerTypeMap:()=>E3,PlacesLookup:()=>_3,ShowData:()=>S3});module.exports=O2(C3);var Yd=Object.prototype.toString;function qo(t){switch(Yd.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return qt(t,Error)}}function Wi(t,n){return Yd.call(t)===`[object ${n}]`}function zo(t){return Wi(t,"ErrorEvent")}function us(t){return Wi(t,"DOMError")}function Hu(t){return Wi(t,"DOMException")}function ht(t){return Wi(t,"String")}function Vi(t){return t===null||typeof t!="object"&&typeof t!="function"}function an(t){return Wi(t,"Object")}function qi(t){return typeof Event<"u"&&qt(t,Event)}function $u(t){return typeof Element<"u"&&qt(t,Element)}function Yu(t){return Wi(t,"RegExp")}function fi(t){return!!(t&&t.then&&typeof t.then=="function")}function Wu(t){return an(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Ko(t){return typeof t=="number"&&t!==t}function qt(t,n){try{return t instanceof n}catch{return!1}}function ls(t){return t&&t.Math==Math?t:void 0}var Le=typeof globalThis=="object"&&ls(globalThis)||typeof window=="object"&&ls(window)||typeof self=="object"&&ls(self)||typeof global=="object"&&ls(global)||function(){return this}()||{};function sn(){return Le}function pi(t,n,i){let a=i||Le,s=a.__SENTRY__=a.__SENTRY__||{};return s[t]||(s[t]=n())}var fs=sn(),I2=80;function xn(t,n={}){try{let i=t,a=5,s=[],u=0,l=0,p=" > ",m=p.length,h,S=Array.isArray(n)?n:n.keyAttrs,v=!Array.isArray(n)&&n.maxStringLength||I2;for(;i&&u++<a&&(h=w2(i,S),!(h==="html"||u>1&&l+s.length*m+h.length>=v));)s.push(h),l+=h.length,i=i.parentNode;return s.reverse().join(p)}catch{return"<unknown>"}}function w2(t,n){let i=t,a=[],s,u,l,p,m;if(!i||!i.tagName)return"";a.push(i.tagName.toLowerCase());let h=n&&n.length?n.filter(v=>i.getAttribute(v)).map(v=>[v,i.getAttribute(v)]):null;if(h&&h.length)h.forEach(v=>{a.push(`[${v[0]}="${v[1]}"]`)});else if(i.id&&a.push(`#${i.id}`),s=i.className,s&&ht(s))for(u=s.split(/\s+/),m=0;m<u.length;m++)a.push(`.${u[m]}`);let S=["aria-label","type","name","title","alt"];for(m=0;m<S.length;m++)l=S[m],p=i.getAttribute(l),p&&a.push(`[${l}="${p}"]`);return a.join("")}function Vu(){try{return fs.document.location.href}catch{return""}}function qu(t){return fs.document&&fs.document.querySelector?fs.document.querySelector(t):null}var P2="Sentry Logger ",zi=["debug","info","warn","error","log","assert","trace"];function ps(t){if(!("console"in Le))return t();let n=Le.console,i={};zi.forEach(a=>{let s=n[a]&&n[a].__sentry_original__;a in n&&s&&(i[a]=n[a],n[a]=s)});try{return t()}finally{Object.keys(i).forEach(a=>{n[a]=i[a]})}}function Wd(){let t=!1,n={enable:()=>{t=!0},disable:()=>{t=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?zi.forEach(i=>{n[i]=(...a)=>{t&&ps(()=>{Le.console[i](`${P2}[${i}]:`,...a)})}}):zi.forEach(i=>{n[i]=()=>{}}),n}var x;typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?x=pi("logger",Wd):x=Wd();var N2=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function M2(t){return t==="http"||t==="https"}function An(t,n=!1){let{host:i,path:a,pass:s,port:u,projectId:l,protocol:p,publicKey:m}=t;return`${p}://${m}${n&&s?`:${s}`:""}@${i}${u?`:${u}`:""}/${a&&`${a}/`}${l}`}function Vd(t){let n=N2.exec(t);if(!n){console.error(`Invalid Sentry Dsn: ${t}`);return}let[i,a,s="",u,l="",p]=n.slice(1),m="",h=p,S=h.split("/");if(S.length>1&&(m=S.slice(0,-1).join("/"),h=S.pop()),h){let v=h.match(/^\d+/);v&&(h=v[0])}return qd({host:u,pass:s,path:m,projectId:h,port:l,protocol:i,publicKey:a})}function qd(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function D2(t){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:n,projectId:i,protocol:a}=t;return["protocol","publicKey","host","projectId"].find(l=>t[l]?!1:(x.error(`Invalid Sentry Dsn: ${l} missing`),!0))?!1:i.match(/^\d+$/)?M2(a)?n&&isNaN(parseInt(n,10))?(x.error(`Invalid Sentry Dsn: Invalid port ${n}`),!1):!0:(x.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),!1):(x.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),!1)}function ds(t){let n=typeof t=="string"?Vd(t):qd(t);if(!(!n||!D2(n)))return n}var Je=class extends Error{constructor(n,i="warn"){super(n),this.message=n,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=i}};function wr(t,n=0){return typeof t!="string"||n===0||t.length<=n?t:`${t.slice(0,n)}...`}function ms(t,n){if(!Array.isArray(t))return"";let i=[];for(let a=0;a<t.length;a++){let s=t[a];try{i.push(String(s))}catch{i.push("[value cannot be serialized]")}}return i.join(n)}function zd(t,n,i=!1){return ht(t)?Yu(n)?n.test(t):ht(n)?i?t===n:t.includes(n):!1:!1}function Pr(t,n=[],i=!1){return n.some(a=>zd(t,a,i))}function ke(t,n,i){if(!(n in t))return;let a=t[n],s=i(a);if(typeof s=="function")try{gs(s,a)}catch{}t[n]=s}function Ki(t,n,i){Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0})}function gs(t,n){let i=n.prototype||{};t.prototype=n.prototype=i,Ki(t,"__sentry_original__",n)}function di(t){return t.__sentry_original__}function Ku(t){return Object.keys(t).map(n=>`${encodeURIComponent(n)}=${encodeURIComponent(t[n])}`).join("&")}function hs(t){if(qo(t))return{message:t.message,name:t.name,stack:t.stack,...Zd(t)};if(qi(t)){let n={type:t.type,target:Kd(t.target),currentTarget:Kd(t.currentTarget),...Zd(t)};return typeof CustomEvent<"u"&&qt(t,CustomEvent)&&(n.detail=t.detail),n}else return t}function Kd(t){try{return $u(t)?xn(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function Zd(t){if(typeof t=="object"&&t!==null){let n={};for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}else return{}}function Zu(t,n=40){let i=Object.keys(hs(t));if(i.sort(),!i.length)return"[object has no keys]";if(i[0].length>=n)return wr(i[0],n);for(let a=i.length;a>0;a--){let s=i.slice(0,a).join(", ");if(!(s.length>n))return a===i.length?s:wr(s,n)}return""}function xt(t){return zu(t,new Map)}function zu(t,n){if(an(t)){let i=n.get(t);if(i!==void 0)return i;let a={};n.set(t,a);for(let s of Object.keys(t))typeof t[s]<"u"&&(a[s]=zu(t[s],n));return a}if(Array.isArray(t)){let i=n.get(t);if(i!==void 0)return i;let a=[];return n.set(t,a),t.forEach(s=>{a.push(zu(s,n))}),a}return t}var jd=50,Xd=/\(error: (.*)\)/;function _s(...t){let n=t.sort((i,a)=>i[0]-a[0]).map(i=>i[1]);return(i,a=0)=>{let s=[],u=i.split(`
|
|
22
|
-
`);for(let l=a;l<u.length;l++){let p=u[l];if(p.length>1024)continue;let m=Xd.test(p)?p.replace(Xd,"$1"):p;if(!m.match(/\S*Error: /)){for(let h of n){let S=h(m);if(S){s.push(S);break}}if(s.length>=jd)break}}return Jd(s)}}function ju(t){return Array.isArray(t)?_s(...t):t}function Jd(t){if(!t.length)return[];let n=t.slice(0,jd),i=n[n.length-1].function;i&&/sentryWrapped/.test(i)&&n.pop(),n.reverse();let a=n[n.length-1].function;return a&&/captureMessage|captureException/.test(a)&&n.pop(),n.map(s=>({...s,filename:s.filename||n[n.length-1].filename,function:s.function||"?"}))}var Xu="<anonymous>";function zt(t){try{return!t||typeof t!="function"?Xu:t.name||Xu}catch{return Xu}}var Ju=sn();function ys(){if(!("fetch"in Ju))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Zo(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Qu(){if(!ys())return!1;if(Zo(Ju.fetch))return!0;let t=!1,n=Ju.document;if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i),i.contentWindow&&i.contentWindow.fetch&&(t=Zo(i.contentWindow.fetch)),n.head.removeChild(i)}catch(i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return t}var Ss=sn();function Qd(){let t=Ss.chrome,n=t&&t.app&&t.app.runtime,i="history"in Ss&&!!Ss.history.pushState&&!!Ss.history.replaceState;return!n&&i}var be=sn(),Jn="__sentry_xhr_v2__",Xo={},em={};function B2(t){if(!em[t])switch(em[t]=!0,t){case"console":L2();break;case"dom":Y2();break;case"xhr":F2();break;case"fetch":k2();break;case"history":U2();break;case"error":W2();break;case"unhandledrejection":V2();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("unknown instrumentation type:",t);return}}function Fe(t,n){Xo[t]=Xo[t]||[],Xo[t].push(n),B2(t)}function cn(t,n){if(!(!t||!Xo[t]))for(let i of Xo[t]||[])try{i(n)}catch(a){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error(`Error while triggering instrumentation handler.
|
|
1
|
+
"use strict";var Il=Object.create;var sn=Object.defineProperty;var Al=Object.getOwnPropertyDescriptor;var Ml=Object.getOwnPropertyNames;var Dl=Object.getPrototypeOf,wl=Object.prototype.hasOwnProperty;var ko=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),mi=(t,e)=>{for(var r in e)sn(t,r,{get:e[r],enumerable:!0})},Lo=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ml(e))!wl.call(t,i)&&i!==r&&sn(t,i,{get:()=>e[i],enumerable:!(n=Al(e,i))||n.enumerable});return t};var I=(t,e,r)=>(r=t!=null?Il(Dl(t)):{},Lo(e||!t||!t.__esModule?sn(r,"default",{value:t,enumerable:!0}):r,t)),Bl=t=>Lo(sn({},"__esModule",{value:!0}),t);var we=ko((Ry,qn)=>{(function(){"use strict";var t={}.hasOwnProperty,e="[native code]";function r(){for(var n=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var a=typeof o;if(a==="string"||a==="number")n.push(o);else if(Array.isArray(o)){if(o.length){var s=r.apply(null,o);s&&n.push(s)}}else if(a==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString());continue}for(var c in o)t.call(o,c)&&o[c]&&n.push(c)}}}return n.join(" ")}typeof qn<"u"&&qn.exports?(r.default=r,qn.exports=r):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return r}):window.classNames=r})()});var Wc=ko((ci,Vc)=>{(function(t,e){typeof ci=="object"&&typeof Vc<"u"?e(ci,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],e):(t=t||self,e(t.ReactStripe={},t.React))})(ci,function(t,e){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;function r(g,d){var m=Object.keys(g);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(g);d&&(y=y.filter(function(Y){return Object.getOwnPropertyDescriptor(g,Y).enumerable})),m.push.apply(m,y)}return m}function n(g){for(var d=1;d<arguments.length;d++){var m=arguments[d]!=null?arguments[d]:{};d%2?r(Object(m),!0).forEach(function(y){o(g,y,m[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(m)):r(Object(m)).forEach(function(y){Object.defineProperty(g,y,Object.getOwnPropertyDescriptor(m,y))})}return g}function i(g){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?i=function(d){return typeof d}:i=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},i(g)}function o(g,d,m){return d in g?Object.defineProperty(g,d,{value:m,enumerable:!0,configurable:!0,writable:!0}):g[d]=m,g}function a(g,d){return s(g)||c(g,d)||l(g,d)||u()}function s(g){if(Array.isArray(g))return g}function c(g,d){var m=g&&(typeof Symbol<"u"&&g[Symbol.iterator]||g["@@iterator"]);if(m!=null){var y=[],Y=!0,R=!1,V,te;try{for(m=m.call(g);!(Y=(V=m.next()).done)&&(y.push(V.value),!(d&&y.length===d));Y=!0);}catch(x){R=!0,te=x}finally{try{!Y&&m.return!=null&&m.return()}finally{if(R)throw te}}return y}}function l(g,d){if(g){if(typeof g=="string")return f(g,d);var m=Object.prototype.toString.call(g).slice(8,-1);if(m==="Object"&&g.constructor&&(m=g.constructor.name),m==="Map"||m==="Set")return Array.from(g);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return f(g,d)}}function f(g,d){(d==null||d>g.length)&&(d=g.length);for(var m=0,y=new Array(d);m<d;m++)y[m]=g[m];return y}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(g,d){return d={exports:{}},g(d,d.exports),d.exports}var h="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",T=h;function P(){}function G(){}G.resetWarningCache=P;var H=function(){function g(y,Y,R,V,te,x){if(x!==T){var ue=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw ue.name="Invariant Violation",ue}}g.isRequired=g;function d(){return g}var m={array:g,bool:g,func:g,number:g,object:g,string:g,symbol:g,any:g,arrayOf:d,element:g,elementType:g,instanceOf:d,node:g,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:G,resetWarningCache:P};return m.PropTypes=m,m},C=_(function(g){g.exports=H()}),Ee=function(d){var m=e.useRef(d);return e.useEffect(function(){m.current=d},[d]),m.current},j=function(d){return d!==null&&i(d)==="object"},tt=function(d){return j(d)&&typeof d.then=="function"},ve=function(d){return j(d)&&typeof d.elements=="function"&&typeof d.createToken=="function"&&typeof d.createPaymentMethod=="function"&&typeof d.confirmCardPayment=="function"},Wt="[object Object]",K=function g(d,m){if(!j(d)||!j(m))return d===m;var y=Array.isArray(d),Y=Array.isArray(m);if(y!==Y)return!1;var R=Object.prototype.toString.call(d)===Wt,V=Object.prototype.toString.call(m)===Wt;if(R!==V)return!1;if(!R&&!y)return d===m;var te=Object.keys(d),x=Object.keys(m);if(te.length!==x.length)return!1;for(var ue={},rt=0;rt<te.length;rt+=1)ue[te[rt]]=!0;for(var nt=0;nt<x.length;nt+=1)ue[x[nt]]=!0;var Ue=Object.keys(ue);if(Ue.length!==te.length)return!1;var Or=d,Pr=m,Ge=function(qt){return g(Or[qt],Pr[qt])};return Ue.every(Ge)},X=function(d,m,y){return j(d)?Object.keys(d).reduce(function(Y,R){var V=!j(m)||!K(d[R],m[R]);return y.includes(R)?(V&&console.warn("Unsupported prop change: options.".concat(R," is not a mutable property.")),Y):V?n(n({},Y||{}),{},o({},R,d[R])):Y},null):null},Fe="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",jt=function(d){if(d===null||ve(d))return d;throw new Error(Fe)},Tr=function(d){if(tt(d))return{tag:"async",stripePromise:Promise.resolve(d).then(jt)};var m=jt(d);return m===null?{tag:"empty"}:{tag:"sync",stripe:m}},Qr=e.createContext(null);Qr.displayName="ElementsContext";var D=function(d,m){if(!d)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(m," in an <Elements> provider."));return d},oe=e.createContext(null);oe.displayName="CartElementContext";var Rr=function(d,m){if(!d)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(m," in an <Elements> provider."));return d},xr=function(d){var m=d.stripe,y=d.options,Y=d.children,R=e.useMemo(function(){return Tr(m)},[m]),V=e.useState(null),te=a(V,2),x=te[0],ue=te[1],rt=e.useState(null),nt=a(rt,2),Ue=nt[0],Or=nt[1],Pr=e.useState(function(){return{stripe:R.tag==="sync"?R.stripe:null,elements:R.tag==="sync"?R.stripe.elements(y):null}}),Ge=a(Pr,2),re=Ge[0],qt=Ge[1];e.useEffect(function(){var ae=!0,rn=function(nn){qt(function(on){return on.stripe?on:{stripe:nn,elements:nn.elements(y)}})};return R.tag==="async"&&!re.stripe?R.stripePromise.then(function(kt){kt&&ae&&rn(kt)}):R.tag==="sync"&&!re.stripe&&rn(R.stripe),function(){ae=!1}},[R,re,y]);var Nr=Ee(m);e.useEffect(function(){Nr!==null&&Nr!==m&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[Nr,m]);var tn=Ee(y);return e.useEffect(function(){if(re.elements){var ae=X(y,tn,["clientSecret","fonts"]);ae&&re.elements.update(ae)}},[y,tn,re.elements]),e.useEffect(function(){var ae=re.stripe;!ae||!ae._registerWrapper||!ae.registerAppInfo||(ae._registerWrapper({name:"react-stripe-js",version:"2.1.1"}),ae.registerAppInfo({name:"react-stripe-js",version:"2.1.1",url:"https://stripe.com/docs/stripe-js/react"}))},[re.stripe]),e.createElement(Qr.Provider,{value:re},e.createElement(oe.Provider,{value:{cart:x,setCart:ue,cartState:Ue,setCartState:Or}},Y))};xr.propTypes={stripe:C.any,options:C.object};var Bt=function(d){var m=e.useContext(Qr);return D(m,d)},en=function(d){var m=e.useContext(oe);return Rr(m,d)},Xc=function(){var d=Bt("calls useElements()"),m=d.elements;return m},Jc=function(){var d=Bt("calls useStripe()"),m=d.stripe;return m},Qc=function(){var d=en("calls useCartElement()"),m=d.cart;return m},el=function(){var d=en("calls useCartElementState()"),m=d.cartState;return m},Ao=function(d){var m=d.children,y=Bt("mounts <ElementsConsumer>");return m(y)};Ao.propTypes={children:C.func.isRequired};var J=function(d,m,y){var Y=!!y,R=e.useRef(y);e.useEffect(function(){R.current=y},[y]),e.useEffect(function(){if(!Y||!d)return function(){};var V=function(){R.current&&R.current.apply(R,arguments)};return d.on(m,V),function(){d.off(m,V)}},[Y,m,d,R])},tl=function(d){return d.charAt(0).toUpperCase()+d.slice(1)},w=function(d,m){var y="".concat(tl(d),"Element"),Y=function(x){var ue=x.id,rt=x.className,nt=x.options,Ue=nt===void 0?{}:nt,Or=x.onBlur,Pr=x.onFocus,Ge=x.onReady,re=x.onChange,qt=x.onEscape,Nr=x.onClick,tn=x.onLoadError,ae=x.onLoaderStart,rn=x.onNetworksChange,kt=x.onCheckout,nn=x.onLineItemClick,on=x.onConfirm,bl=x.onCancel,Cl=x.onShippingAddressChange,Tl=x.onShippingRateChange,Rl=Bt("mounts <".concat(y,">")),fi=Rl.elements,xl=e.useState(null),Mo=a(xl,2),q=Mo[0],Ol=Mo[1],Et=e.useRef(null),di=e.useRef(null),Do=en("mounts <".concat(y,">")),ui=Do.setCart,pi=Do.setCartState;J(q,"blur",Or),J(q,"focus",Pr),J(q,"escape",qt),J(q,"click",Nr),J(q,"loaderror",tn),J(q,"loaderstart",ae),J(q,"networkschange",rn),J(q,"lineitemclick",nn),J(q,"confirm",on),J(q,"cancel",bl),J(q,"shippingaddresschange",Cl),J(q,"shippingratechange",Tl);var an;d==="cart"?an=function(Bo){pi(Bo),Ge&&Ge(Bo)}:Ge&&(d==="expressCheckout"?an=Ge:an=function(){Ge(q)}),J(q,"ready",an);var Pl=d==="cart"?function(z){pi(z),re&&re(z)}:re;J(q,"change",Pl);var Nl=d==="cart"?function(z){pi(z),kt&&kt(z)}:kt;J(q,"checkout",Nl),e.useLayoutEffect(function(){if(Et.current===null&&fi&&di.current!==null){var z=fi.create(d,Ue);d==="cart"&&ui&&ui(z),Et.current=z,Ol(z),z.mount(di.current)}},[fi,Ue,ui]);var wo=Ee(Ue);return e.useEffect(function(){if(Et.current){var z=X(Ue,wo,["paymentRequest"]);z&&Et.current.update(z)}},[Ue,wo]),e.useLayoutEffect(function(){return function(){if(Et.current&&typeof Et.current.destroy=="function")try{Et.current.destroy(),Et.current=null}catch{}}},[]),e.createElement("div",{id:ue,className:rt,ref:di})},R=function(x){Bt("mounts <".concat(y,">")),en("mounts <".concat(y,">"));var ue=x.id,rt=x.className;return e.createElement("div",{id:ue,className:rt})},V=m?R:Y;return V.propTypes={id:C.string,className:C.string,onChange:C.func,onBlur:C.func,onFocus:C.func,onReady:C.func,onEscape:C.func,onClick:C.func,onLoadError:C.func,onLoaderStart:C.func,onNetworksChange:C.func,onCheckout:C.func,onLineItemClick:C.func,onConfirm:C.func,onCancel:C.func,onShippingAddressChange:C.func,onShippingRateChange:C.func,options:C.object},V.displayName=y,V.__elementType=d,V},B=typeof window>"u",rl=w("auBankAccount",B),nl=w("card",B),il=w("cardNumber",B),ol=w("cardExpiry",B),al=w("cardCvc",B),sl=w("fpxBank",B),cl=w("iban",B),ll=w("idealBank",B),fl=w("p24Bank",B),dl=w("epsBank",B),ul=w("payment",B),pl=w("expressCheckout",B),ml=w("paymentRequestButton",B),gl=w("linkAuthentication",B),_l=w("address",B),hl=w("shippingAddress",B),yl=w("cart",B),Sl=w("paymentMethodMessaging",B),El=w("affirmMessage",B),vl=w("afterpayClearpayMessage",B);t.AddressElement=_l,t.AffirmMessageElement=El,t.AfterpayClearpayMessageElement=vl,t.AuBankAccountElement=rl,t.CardCvcElement=al,t.CardElement=nl,t.CardExpiryElement=ol,t.CardNumberElement=il,t.CartElement=yl,t.Elements=xr,t.ElementsConsumer=Ao,t.EpsBankElement=dl,t.ExpressCheckoutElement=pl,t.FpxBankElement=sl,t.IbanElement=cl,t.IdealBankElement=ll,t.LinkAuthenticationElement=gl,t.P24BankElement=fl,t.PaymentElement=ul,t.PaymentMethodMessagingElement=Sl,t.PaymentRequestButtonElement=ml,t.ShippingAddressElement=hl,t.useCartElement=Qc,t.useCartElementState=el,t.useElements=Xc,t.useStripe=Jc,Object.defineProperty(t,"__esModule",{value:!0})})});var ju={};mi(ju,{CabinClassMap:()=>Vu,DuffelAncillaries:()=>Nu,DuffelPayments:()=>$u,PassengerTypeMap:()=>Wu});module.exports=Bl(ju);var Fo=Object.prototype.toString;function Ir(t){switch(Fo.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return pe(t,Error)}}function zt(t,e){return Fo.call(t)===`[object ${e}]`}function Ar(t){return zt(t,"ErrorEvent")}function cn(t){return zt(t,"DOMError")}function gi(t){return zt(t,"DOMException")}function ne(t){return zt(t,"String")}function Zt(t){return t===null||typeof t!="object"&&typeof t!="function"}function be(t){return zt(t,"Object")}function Kt(t){return typeof Event<"u"&&pe(t,Event)}function _i(t){return typeof Element<"u"&&pe(t,Element)}function hi(t){return zt(t,"RegExp")}function Lt(t){return!!(t&&t.then&&typeof t.then=="function")}function yi(t){return be(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Mr(t){return typeof t=="number"&&t!==t}function pe(t,e){try{return t instanceof e}catch{return!1}}function ln(t){return t&&t.Math==Math?t:void 0}var k=typeof globalThis=="object"&&ln(globalThis)||typeof window=="object"&&ln(window)||typeof self=="object"&&ln(self)||typeof global=="object"&&ln(global)||function(){return this}()||{};function Ce(){return k}function Ft(t,e,r){let n=r||k,i=n.__SENTRY__=n.__SENTRY__||{};return i[t]||(i[t]=e())}var fn=Ce(),kl=80;function He(t,e={}){try{let r=t,n=5,i=[],o=0,a=0,s=" > ",c=s.length,l,f=Array.isArray(e)?e:e.keyAttrs,u=!Array.isArray(e)&&e.maxStringLength||kl;for(;r&&o++<n&&(l=Ll(r,f),!(l==="html"||o>1&&a+i.length*c+l.length>=u));)i.push(l),a+=l.length,r=r.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function Ll(t,e){let r=t,n=[],i,o,a,s,c;if(!r||!r.tagName)return"";n.push(r.tagName.toLowerCase());let l=e&&e.length?e.filter(u=>r.getAttribute(u)).map(u=>[u,r.getAttribute(u)]):null;if(l&&l.length)l.forEach(u=>{n.push(`[${u[0]}="${u[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),i=r.className,i&&ne(i))for(o=i.split(/\s+/),c=0;c<o.length;c++)n.push(`.${o[c]}`);let f=["aria-label","type","name","title","alt"];for(c=0;c<f.length;c++)a=f[c],s=r.getAttribute(a),s&&n.push(`[${a}="${s}"]`);return n.join("")}function Si(){try{return fn.document.location.href}catch{return""}}function Ei(t){return fn.document&&fn.document.querySelector?fn.document.querySelector(t):null}var Fl="Sentry Logger ",Xt=["debug","info","warn","error","log","assert","trace"];function dn(t){if(!("console"in k))return t();let e=k.console,r={};Xt.forEach(n=>{let i=e[n]&&e[n].__sentry_original__;n in e&&i&&(r[n]=e[n],e[n]=i)});try{return t()}finally{Object.keys(r).forEach(n=>{e[n]=r[n]})}}function Uo(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?Xt.forEach(r=>{e[r]=(...n)=>{t&&dn(()=>{k.console[r](`${Fl}[${r}]:`,...n)})}}):Xt.forEach(r=>{e[r]=()=>{}}),e}var p;typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?p=Ft("logger",Uo):p=Uo();var Ul=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Gl(t){return t==="http"||t==="https"}function Ye(t,e=!1){let{host:r,path:n,pass:i,port:o,projectId:a,protocol:s,publicKey:c}=t;return`${s}://${c}${e&&i?`:${i}`:""}@${r}${o?`:${o}`:""}/${n&&`${n}/`}${a}`}function Go(t){let e=Ul.exec(t);if(!e){console.error(`Invalid Sentry Dsn: ${t}`);return}let[r,n,i="",o,a="",s]=e.slice(1),c="",l=s,f=l.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),l=f.pop()),l){let u=l.match(/^\d+/);u&&(l=u[0])}return Ho({host:o,pass:i,path:c,projectId:l,port:a,protocol:r,publicKey:n})}function Ho(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Hl(t){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:e,projectId:r,protocol:n}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(p.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:r.match(/^\d+$/)?Gl(n)?e&&isNaN(parseInt(e,10))?(p.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(p.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function un(t){let e=typeof t=="string"?Go(t):Ho(t);if(!(!e||!Hl(e)))return e}var W=class extends Error{constructor(e,r="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}};function vt(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function pn(t,e){if(!Array.isArray(t))return"";let r=[];for(let n=0;n<t.length;n++){let i=t[n];try{r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(e)}function Yo(t,e,r=!1){return ne(t)?hi(e)?e.test(t):ne(e)?r?t===e:t.includes(e):!1:!1}function bt(t,e=[],r=!1){return e.some(n=>Yo(t,n,r))}function L(t,e,r){if(!(e in t))return;let n=t[e],i=r(n);if(typeof i=="function")try{mn(i,n)}catch{}t[e]=i}function Jt(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}function mn(t,e){let r=e.prototype||{};t.prototype=e.prototype=r,Jt(t,"__sentry_original__",e)}function Ut(t){return t.__sentry_original__}function bi(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function gn(t){if(Ir(t))return{message:t.message,name:t.name,stack:t.stack,...Vo(t)};if(Kt(t)){let e={type:t.type,target:$o(t.target),currentTarget:$o(t.currentTarget),...Vo(t)};return typeof CustomEvent<"u"&&pe(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function $o(t){try{return _i(t)?He(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function Vo(t){if(typeof t=="object"&&t!==null){let e={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}else return{}}function Ci(t,e=40){let r=Object.keys(gn(t));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=e)return vt(r[0],e);for(let n=r.length;n>0;n--){let i=r.slice(0,n).join(", ");if(!(i.length>e))return n===r.length?i:vt(i,e)}return""}function se(t){return vi(t,new Map)}function vi(t,e){if(be(t)){let r=e.get(t);if(r!==void 0)return r;let n={};e.set(t,n);for(let i of Object.keys(t))typeof t[i]<"u"&&(n[i]=vi(t[i],e));return n}if(Array.isArray(t)){let r=e.get(t);if(r!==void 0)return r;let n=[];return e.set(t,n),t.forEach(i=>{n.push(vi(i,e))}),n}return t}var jo=50,Wo=/\(error: (.*)\)/;function _n(...t){let e=t.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{let i=[],o=r.split(`
|
|
3
|
+
`);for(let a=n;a<o.length;a++){let s=o[a];if(s.length>1024)continue;let c=Wo.test(s)?s.replace(Wo,"$1"):s;if(!c.match(/\S*Error: /)){for(let l of e){let f=l(c);if(f){i.push(f);break}}if(i.length>=jo)break}}return qo(i)}}function Ri(t){return Array.isArray(t)?_n(...t):t}function qo(t){if(!t.length)return[];let e=t.slice(0,jo),r=e[e.length-1].function;r&&/sentryWrapped/.test(r)&&e.pop(),e.reverse();let n=e[e.length-1].function;return n&&/captureMessage|captureException/.test(n)&&e.pop(),e.map(i=>({...i,filename:i.filename||e[e.length-1].filename,function:i.function||"?"}))}var Ti="<anonymous>";function me(t){try{return!t||typeof t!="function"?Ti:t.name||Ti}catch{return Ti}}var xi=Ce();function hn(){if(!("fetch"in xi))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Dr(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Oi(){if(!hn())return!1;if(Dr(xi.fetch))return!0;let t=!1,e=xi.document;if(e&&typeof e.createElement=="function")try{let r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=Dr(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}var yn=Ce();function zo(){let t=yn.chrome,e=t&&t.app&&t.app.runtime,r="history"in yn&&!!yn.history.pushState&&!!yn.history.replaceState;return!e&&r}var N=Ce(),it="__sentry_xhr_v2__",wr={},Zo={};function Yl(t){if(!Zo[t])switch(Zo[t]=!0,t){case"console":$l();break;case"dom":Kl();break;case"xhr":Wl();break;case"fetch":Vl();break;case"history":jl();break;case"error":Xl();break;case"unhandledrejection":Jl();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("unknown instrumentation type:",t);return}}function F(t,e){wr[t]=wr[t]||[],wr[t].push(e),Yl(t)}function Te(t,e){if(!(!t||!wr[t]))for(let r of wr[t]||[])try{r(e)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Error while triggering instrumentation handler.
|
|
23
4
|
Type: ${t}
|
|
24
|
-
Name: ${
|
|
25
|
-
Error:`,a)}}function L2(){"console"in be&&zi.forEach(function(t){t in be.console&&ke(be.console,t,function(n){return function(...i){cn("console",{args:i,level:t}),n&&n.apply(be.console,i)}})})}function k2(){Qu()&&ke(be,"fetch",function(t){return function(...n){let{method:i,url:a}=rm(n),s={args:n,fetchData:{method:i,url:a},startTimestamp:Date.now()};return cn("fetch",{...s}),t.apply(be,n).then(u=>(cn("fetch",{...s,endTimestamp:Date.now(),response:u}),u),u=>{throw cn("fetch",{...s,endTimestamp:Date.now(),error:u}),u})}})}function el(t,n){return!!t&&typeof t=="object"&&!!t[n]}function tm(t){return typeof t=="string"?t:t?el(t,"url")?t.url:t.toString?t.toString():"":""}function rm(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[i,a]=t;return{url:tm(i),method:el(a,"method")?String(a.method).toUpperCase():"GET"}}let n=t[0];return{url:tm(n),method:el(n,"method")?String(n.method).toUpperCase():"GET"}}function F2(){if(!("XMLHttpRequest"in be))return;let t=XMLHttpRequest.prototype;ke(t,"open",function(n){return function(...i){let a=i[1],s=this[Jn]={method:ht(i[0])?i[0].toUpperCase():i[0],url:i[1],request_headers:{}};ht(a)&&s.method==="POST"&&a.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let u=()=>{let l=this[Jn];if(l&&this.readyState===4){try{l.status_code=this.status}catch{}cn("xhr",{args:i,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?ke(this,"onreadystatechange",function(l){return function(...p){return u(),l.apply(this,p)}}):this.addEventListener("readystatechange",u),ke(this,"setRequestHeader",function(l){return function(...p){let[m,h]=p,S=this[Jn];return S&&(S.request_headers[m.toLowerCase()]=h),l.apply(this,p)}}),n.apply(this,i)}}),ke(t,"send",function(n){return function(...i){let a=this[Jn];return a&&i[0]!==void 0&&(a.body=i[0]),cn("xhr",{args:i,startTimestamp:Date.now(),xhr:this}),n.apply(this,i)}})}var vs;function U2(){if(!Qd())return;let t=be.onpopstate;be.onpopstate=function(...i){let a=be.location.href,s=vs;if(vs=a,cn("history",{from:s,to:a}),t)try{return t.apply(this,i)}catch{}};function n(i){return function(...a){let s=a.length>2?a[2]:void 0;if(s){let u=vs,l=String(s);vs=l,cn("history",{from:u,to:l})}return i.apply(this,a)}}ke(be.history,"pushState",n),ke(be.history,"replaceState",n)}var G2=1e3,Es,Cs;function H2(t,n){if(!t||t.type!==n.type)return!0;try{if(t.target!==n.target)return!0}catch{}return!1}function $2(t){if(t.type!=="keypress")return!1;try{let n=t.target;if(!n||!n.tagName)return!0;if(n.tagName==="INPUT"||n.tagName==="TEXTAREA"||n.isContentEditable)return!1}catch{}return!0}function nm(t,n=!1){return i=>{if(!i||Cs===i||$2(i))return;let a=i.type==="keypress"?"input":i.type;Es===void 0?(t({event:i,name:a,global:n}),Cs=i):H2(Cs,i)&&(t({event:i,name:a,global:n}),Cs=i),clearTimeout(Es),Es=be.setTimeout(()=>{Es=void 0},G2)}}function Y2(){if(!("document"in be))return;let t=cn.bind(null,"dom"),n=nm(t,!0);be.document.addEventListener("click",n,!1),be.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach(i=>{let a=be[i]&&be[i].prototype;!a||!a.hasOwnProperty||!a.hasOwnProperty("addEventListener")||(ke(a,"addEventListener",function(s){return function(u,l,p){if(u==="click"||u=="keypress")try{let m=this,h=m.__sentry_instrumentation_handlers__=m.__sentry_instrumentation_handlers__||{},S=h[u]=h[u]||{refCount:0};if(!S.handler){let v=nm(t);S.handler=v,s.call(this,u,v,p)}S.refCount++}catch{}return s.call(this,u,l,p)}}),ke(a,"removeEventListener",function(s){return function(u,l,p){if(u==="click"||u=="keypress")try{let m=this,h=m.__sentry_instrumentation_handlers__||{},S=h[u];S&&(S.refCount--,S.refCount<=0&&(s.call(this,u,S.handler,p),S.handler=void 0,delete h[u]),Object.keys(h).length===0&&delete m.__sentry_instrumentation_handlers__)}catch{}return s.call(this,u,l,p)}}))})}var bs=null;function W2(){bs=be.onerror,be.onerror=function(t,n,i,a,s){return cn("error",{column:a,error:s,line:i,msg:t,url:n}),bs&&!bs.__SENTRY_LOADER__?bs.apply(this,arguments):!1},be.onerror.__SENTRY_INSTRUMENTED__=!0}var Ts=null;function V2(){Ts=be.onunhandledrejection,be.onunhandledrejection=function(t){return cn("unhandledrejection",t),Ts&&!Ts.__SENTRY_LOADER__?Ts.apply(this,arguments):!0},be.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function im(){let t=typeof WeakSet=="function",n=t?new WeakSet:[];function i(s){if(t)return n.has(s)?!0:(n.add(s),!1);for(let u=0;u<n.length;u++)if(n[u]===s)return!0;return n.push(s),!1}function a(s){if(t)n.delete(s);else for(let u=0;u<n.length;u++)if(n[u]===s){n.splice(u,1);break}}return[i,a]}function At(){let t=Le,n=t.crypto||t.msCrypto;if(n&&n.randomUUID)return n.randomUUID().replace(/-/g,"");let i=n&&n.getRandomValues?()=>n.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,a=>(a^(i()&15)>>a/4).toString(16))}function om(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function un(t){let{message:n,event_id:i}=t;if(n)return n;let a=om(t);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||i||"<unknown>":i||"<unknown>"}function Zi(t,n,i){let a=t.exception=t.exception||{},s=a.values=a.values||[],u=s[0]=s[0]||{};u.value||(u.value=n||""),u.type||(u.type=i||"Error")}function Qn(t,n){let i=om(t);if(!i)return;let a={type:"generic",handled:!0},s=i.mechanism;if(i.mechanism={...a,...s,...n},n&&"data"in n){let u={...s&&s.data,...n.data};i.mechanism.data=u}}function Rs(t){if(t&&t.__sentry_captured__)return!0;try{Ki(t,"__sentry_captured__",!0)}catch{}return!1}function jo(t){return Array.isArray(t)?t:[t]}function tl(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function nl(){return"npm"}function am(){return!tl()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function sm(t,n){return t.require(n)}function ln(t,n=100,i=1/0){try{return xs("",t,n,i)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function As(t,n=3,i=100*1024){let a=ln(t,n);return Z2(a)>i?As(t,n-1,i):a}function xs(t,n,i=1/0,a=1/0,s=im()){let[u,l]=s;if(n==null||["number","boolean","string"].includes(typeof n)&&!Ko(n))return n;let p=q2(t,n);if(!p.startsWith("[object "))return p;if(n.__sentry_skip_normalization__)return n;let m=typeof n.__sentry_override_normalization_depth__=="number"?n.__sentry_override_normalization_depth__:i;if(m===0)return p.replace("object ","");if(u(n))return"[Circular ~]";let h=n;if(h&&typeof h.toJSON=="function")try{let P=h.toJSON();return xs("",P,m-1,a,s)}catch{}let S=Array.isArray(n)?[]:{},v=0,I=hs(n);for(let P in I){if(!Object.prototype.hasOwnProperty.call(I,P))continue;if(v>=a){S[P]="[MaxProperties ~]";break}let L=I[P];S[P]=xs(P,L,m-1,a,s),v++}return l(n),S}function q2(t,n){try{if(t==="domain"&&n&&typeof n=="object"&&n._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&n===global)return"[Global]";if(typeof window<"u"&&n===window)return"[Window]";if(typeof document<"u"&&n===document)return"[Document]";if(Wu(n))return"[SyntheticEvent]";if(typeof n=="number"&&n!==n)return"[NaN]";if(typeof n=="function")return`[Function: ${zt(n)}]`;if(typeof n=="symbol")return`[${String(n)}]`;if(typeof n=="bigint")return`[BigInt: ${String(n)}]`;let i=z2(n);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(i){return`**non-serializable** (${i})`}}function z2(t){let n=Object.getPrototypeOf(t);return n?n.constructor.name:"null prototype"}function K2(t){return~-encodeURI(t).split(/%..|./).length}function Z2(t){return K2(JSON.stringify(t))}var er;(function(t){t[t.PENDING=0]="PENDING";let i=1;t[t.RESOLVED=i]="RESOLVED";let a=2;t[t.REJECTED=a]="REJECTED"})(er||(er={}));function _t(t){return new we(n=>{n(t)})}function Nr(t){return new we((n,i)=>{i(t)})}var we=class{__init(){this._state=er.PENDING}__init2(){this._handlers=[]}constructor(n){we.prototype.__init.call(this),we.prototype.__init2.call(this),we.prototype.__init3.call(this),we.prototype.__init4.call(this),we.prototype.__init5.call(this),we.prototype.__init6.call(this);try{n(this._resolve,this._reject)}catch(i){this._reject(i)}}then(n,i){return new we((a,s)=>{this._handlers.push([!1,u=>{if(!n)a(u);else try{a(n(u))}catch(l){s(l)}},u=>{if(!i)s(u);else try{a(i(u))}catch(l){s(l)}}]),this._executeHandlers()})}catch(n){return this.then(i=>i,n)}finally(n){return new we((i,a)=>{let s,u;return this.then(l=>{u=!1,s=l,n&&n()},l=>{u=!0,s=l,n&&n()}).then(()=>{if(u){a(s);return}i(s)})})}__init3(){this._resolve=n=>{this._setResult(er.RESOLVED,n)}}__init4(){this._reject=n=>{this._setResult(er.REJECTED,n)}}__init5(){this._setResult=(n,i)=>{if(this._state===er.PENDING){if(fi(i)){i.then(this._resolve,this._reject);return}this._state=n,this._value=i,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state===er.PENDING)return;let n=this._handlers.slice();this._handlers=[],n.forEach(i=>{i[0]||(this._state===er.RESOLVED&&i[1](this._value),this._state===er.REJECTED&&i[2](this._value),i[0]=!0)})}}};function rl(t){let n=[];function i(){return t===void 0||n.length<t}function a(l){return n.splice(n.indexOf(l),1)[0]}function s(l){if(!i())return Nr(new Je("Not adding Promise because buffer limit was reached."));let p=l();return n.indexOf(p)===-1&&n.push(p),p.then(()=>a(p)).then(null,()=>a(p).then(null,()=>{})),p}function u(l){return new we((p,m)=>{let h=n.length;if(!h)return p(!0);let S=setTimeout(()=>{l&&l>0&&p(!1)},l);n.forEach(v=>{_t(v).then(()=>{--h||(clearTimeout(S),p(!0))},m)})})}return{$:n,add:s,drain:u}}function Jo(t){if(!t)return{};let n=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};let i=n[6]||"",a=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],search:i,hash:a,relative:n[5]+i+a}}var cm=["fatal","error","warning","log","info","debug"];function il(t){return t==="warn"?"warning":cm.includes(t)?t:"log"}var lm=sn(),al={nowSeconds:()=>Date.now()/1e3};function X2(){let{performance:t}=lm;if(!t||!t.now)return;let n=Date.now()-t.now();return{now:()=>t.now(),timeOrigin:n}}function j2(){try{return sm(module,"perf_hooks").performance}catch{return}}var ol=am()?j2():X2(),um=ol===void 0?al:{nowSeconds:()=>(ol.timeOrigin+ol.now())/1e3},tr=al.nowSeconds.bind(al),fn=um.nowSeconds.bind(um);var Qo,pn=(()=>{let{performance:t}=lm;if(!t||!t.now){Qo="none";return}let n=3600*1e3,i=t.now(),a=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+i-a):n,u=s<n,l=t.timing&&t.timing.navigationStart,m=typeof l=="number"?Math.abs(l+i-a):n,h=m<n;return u||h?s<=m?(Qo="timeOrigin",t.timeOrigin):(Qo="navigationStart",l):(Qo="dateNow",a)})();var fm=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ea(t){let n=t.match(fm);if(!t||!n)return;let i;return n[3]==="1"?i=!0:n[3]==="0"&&(i=!1),{traceId:n[1],parentSampled:i,parentSpanId:n[2]}}function On(t,n=[]){return[t,n]}function cl(t,n){let[i,a]=t;return[i,[...a,n]]}function Os(t,n){let i=t[1];for(let a of i){let s=a[0].type;if(n(a,s))return!0}return!1}function sl(t,n){return(n||new TextEncoder).encode(t)}function ul(t,n){let[i,a]=t,s=JSON.stringify(i);function u(l){typeof s=="string"?s=typeof l=="string"?s+l:[sl(s,n),l]:s.push(typeof l=="string"?sl(l,n):l)}for(let l of a){let[p,m]=l;if(u(`
|
|
26
|
-
${JSON.stringify(
|
|
27
|
-
`),typeof m=="string"||m instanceof Uint8Array)u(m);else{let h;try{h=JSON.stringify(m)}catch{h=JSON.stringify(ln(m))}u(h)}}return typeof s=="string"?s:J2(s)}function J2(t){let n=t.reduce((s,u)=>s+u.length,0),i=new Uint8Array(n),a=0;for(let s of t)i.set(s,a),a+=s.length;return i}function ll(t,n){let i=typeof t.data=="string"?sl(t.data,n):t.data;return[xt({type:"attachment",length:i.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),i]}var Q2={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function Is(t){return Q2[t]}function ws(t){if(!t||!t.sdk)return;let{name:n,version:i}=t.sdk;return{name:n,version:i}}function fl(t,n,i,a){let s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...n&&{sdk:n},...!!i&&{dsn:An(a)},...s&&{trace:xt({...s})}}}function pl(t,n,i){let a=[{type:"client_report"},{timestamp:i||tr(),discarded_events:t}];return On(n?{dsn:n}:{},[a])}function pm(t,n=Date.now()){let i=parseInt(`${t}`,10);if(!isNaN(i))return i*1e3;let a=Date.parse(`${t}`);return isNaN(a)?6e4:a-n}function dm(t,n){return t[n]||t.all||0}function dl(t,n,i=Date.now()){return dm(t,n)>i}function ml(t,{statusCode:n,headers:i},a=Date.now()){let s={...t},u=i&&i["x-sentry-rate-limits"],l=i&&i["retry-after"];if(u)for(let p of u.trim().split(",")){let[m,h]=p.split(":",2),S=parseInt(m,10),v=(isNaN(S)?60:S)*1e3;if(!h)s.all=a+v;else for(let I of h.split(";"))s[I]=a+v}else l?s.all=a+pm(l,a):n===429&&(s.all=a+60*1e3);return s}var ta="baggage",gl="sentry-",gm=/^sentry-/,hm=8192;function hl(t){if(!ht(t)&&!Array.isArray(t))return;let n={};if(Array.isArray(t))n=t.reduce((a,s)=>{let u=mm(s);return{...a,...u}},{});else{if(!t)return;n=mm(t)}let i=Object.entries(n).reduce((a,[s,u])=>{if(s.match(gm)){let l=s.slice(gl.length);a[l]=u}return a},{});if(Object.keys(i).length>0)return i}function Ps(t){let n=Object.entries(t).reduce((i,[a,s])=>(s&&(i[`${gl}${a}`]=s),i),{});return eC(n)}function mm(t){return t.split(",").map(n=>n.split("=").map(i=>decodeURIComponent(i.trim()))).reduce((n,[i,a])=>(n[i]=a,n),{})}function eC(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((n,[i,a],s)=>{let u=`${encodeURIComponent(i)}=${encodeURIComponent(a)}`,l=s===0?u:`${n},${u}`;return l.length>hm?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Not adding key: ${i} with val: ${a} to baggage header due to exceeding baggage size limits.`),n):l},"")}var Xi="production";function _m(t){let n=fn(),i={sid:At(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>tC(i)};return t&&nr(i,t),i}function nr(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),!t.did&&!n.did&&(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||fn(),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=n.sid.length===32?n.sid:At()),n.init!==void 0&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),typeof n.started=="number"&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if(typeof n.duration=="number")t.duration=n.duration;else{let i=t.timestamp-t.started;t.duration=i>=0?i:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),typeof n.errors=="number"&&(t.errors=n.errors),n.status&&(t.status=n.status)}function ym(t,n){let i={};n?i={status:n}:t.status==="ok"&&(i={status:"exited"}),nr(t,i)}function tC(t){return xt({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var nC=100,Ot=class{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(n){let i=new Ot;return n&&(i._breadcrumbs=[...n._breadcrumbs],i._tags={...n._tags},i._extra={...n._extra},i._contexts={...n._contexts},i._user=n._user,i._level=n._level,i._span=n._span,i._session=n._session,i._transactionName=n._transactionName,i._fingerprint=n._fingerprint,i._eventProcessors=[...n._eventProcessors],i._requestSession=n._requestSession,i._attachments=[...n._attachments],i._sdkProcessingMetadata={...n._sdkProcessingMetadata}),i}addScopeListener(n){this._scopeListeners.push(n)}addEventProcessor(n){return this._eventProcessors.push(n),this}setUser(n){return this._user=n||{},this._session&&nr(this._session,{user:n}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(n){return this._requestSession=n,this}setTags(n){return this._tags={...this._tags,...n},this._notifyScopeListeners(),this}setTag(n,i){return this._tags={...this._tags,[n]:i},this._notifyScopeListeners(),this}setExtras(n){return this._extra={...this._extra,...n},this._notifyScopeListeners(),this}setExtra(n,i){return this._extra={...this._extra,[n]:i},this._notifyScopeListeners(),this}setFingerprint(n){return this._fingerprint=n,this._notifyScopeListeners(),this}setLevel(n){return this._level=n,this._notifyScopeListeners(),this}setTransactionName(n){return this._transactionName=n,this._notifyScopeListeners(),this}setContext(n,i){return i===null?delete this._contexts[n]:this._contexts[n]=i,this._notifyScopeListeners(),this}setSpan(n){return this._span=n,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let n=this.getSpan();return n&&n.transaction}setSession(n){return n?this._session=n:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(n){if(!n)return this;if(typeof n=="function"){let i=n(this);return i instanceof Ot?i:this}return n instanceof Ot?(this._tags={...this._tags,...n._tags},this._extra={...this._extra,...n._extra},this._contexts={...this._contexts,...n._contexts},n._user&&Object.keys(n._user).length&&(this._user=n._user),n._level&&(this._level=n._level),n._fingerprint&&(this._fingerprint=n._fingerprint),n._requestSession&&(this._requestSession=n._requestSession)):an(n)&&(n=n,this._tags={...this._tags,...n.tags},this._extra={...this._extra,...n.extra},this._contexts={...this._contexts,...n.contexts},n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession)),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._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(n,i){let a=typeof i=="number"?i:nC;if(a<=0)return this;let s={timestamp:tr(),...n};return this._breadcrumbs=[...this._breadcrumbs,s].slice(-a),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(n){return this._attachments.push(n),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(n,i={}){if(this._extra&&Object.keys(this._extra).length&&(n.extra={...this._extra,...n.extra}),this._tags&&Object.keys(this._tags).length&&(n.tags={...this._tags,...n.tags}),this._user&&Object.keys(this._user).length&&(n.user={...this._user,...n.user}),this._contexts&&Object.keys(this._contexts).length&&(n.contexts={...this._contexts,...n.contexts}),this._level&&(n.level=this._level),this._transactionName&&(n.transaction=this._transactionName),this._span){n.contexts={trace:this._span.getTraceContext(),...n.contexts};let a=this._span.transaction;if(a){n.sdkProcessingMetadata={dynamicSamplingContext:a.getDynamicSamplingContext(),...n.sdkProcessingMetadata};let s=a.name;s&&(n.tags={transaction:s,...n.tags})}}return this._applyFingerprint(n),n.breadcrumbs=[...n.breadcrumbs||[],...this._breadcrumbs],n.breadcrumbs=n.breadcrumbs.length>0?n.breadcrumbs:void 0,n.sdkProcessingMetadata={...n.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Sm(),...this._eventProcessors],n,i)}setSDKProcessingMetadata(n){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...n},this}_notifyEventProcessors(n,i,a,s=0){return new we((u,l)=>{let p=n[s];if(i===null||typeof p!="function")u(i);else{let m=p({...i},a);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.id&&m===null&&x.log(`Event processor "${p.id}" dropped event`),fi(m)?m.then(h=>this._notifyEventProcessors(n,h,a,s+1).then(u)).then(null,l):this._notifyEventProcessors(n,m,a,s+1).then(u).then(null,l)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(n=>{n(this)}),this._notifyingListeners=!1)}_applyFingerprint(n){n.fingerprint=n.fingerprint?jo(n.fingerprint):[],this._fingerprint&&(n.fingerprint=n.fingerprint.concat(this._fingerprint)),n.fingerprint&&!n.fingerprint.length&&delete n.fingerprint}};function Sm(){return pi("globalEventProcessors",()=>[])}function Mr(t){Sm().push(t)}var vm=4,rC=100,ji=class{constructor(n,i=new Ot,a=vm){this._version=a,this._stack=[{scope:i}],n&&this.bindClient(n)}isOlderThan(n){return this._version<n}bindClient(n){let i=this.getStackTop();i.client=n,n&&n.setupIntegrations&&n.setupIntegrations()}pushScope(){let n=Ot.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:n}),n}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(n){let i=this.pushScope();try{n(i)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(n,i){let a=this._lastEventId=i&&i.event_id?i.event_id:At(),s=new Error("Sentry syntheticException");return this._withClient((u,l)=>{u.captureException(n,{originalException:n,syntheticException:s,...i,event_id:a},l)}),a}captureMessage(n,i,a){let s=this._lastEventId=a&&a.event_id?a.event_id:At(),u=new Error(n);return this._withClient((l,p)=>{l.captureMessage(n,i,{originalException:n,syntheticException:u,...a,event_id:s},p)}),s}captureEvent(n,i){let a=i&&i.event_id?i.event_id:At();return n.type||(this._lastEventId=a),this._withClient((s,u)=>{s.captureEvent(n,{...i,event_id:a},u)}),a}lastEventId(){return this._lastEventId}addBreadcrumb(n,i){let{scope:a,client:s}=this.getStackTop();if(!s)return;let{beforeBreadcrumb:u=null,maxBreadcrumbs:l=rC}=s.getOptions&&s.getOptions()||{};if(l<=0)return;let m={timestamp:tr(),...n},h=u?ps(()=>u(m,i)):m;h!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",h,i),a.addBreadcrumb(h,l))}setUser(n){this.getScope().setUser(n)}setTags(n){this.getScope().setTags(n)}setExtras(n){this.getScope().setExtras(n)}setTag(n,i){this.getScope().setTag(n,i)}setExtra(n,i){this.getScope().setExtra(n,i)}setContext(n,i){this.getScope().setContext(n,i)}configureScope(n){let{scope:i,client:a}=this.getStackTop();a&&n(i)}run(n){let i=Ns(this);try{n(this)}finally{Ns(i)}}getIntegration(n){let i=this.getClient();if(!i)return null;try{return i.getIntegration(n)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Cannot retrieve integration ${n.id} from the current Hub`),null}}startTransaction(n,i){let a=this._callExtensionMethod("startTransaction",n,i);return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!a&&console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
5
|
+
Name: ${me(r)}
|
|
6
|
+
Error:`,n)}}function $l(){"console"in N&&Xt.forEach(function(t){t in N.console&&L(N.console,t,function(e){return function(...r){Te("console",{args:r,level:t}),e&&e.apply(N.console,r)}})})}function Vl(){Oi()&&L(N,"fetch",function(t){return function(...e){let{method:r,url:n}=Jo(e),i={args:e,fetchData:{method:r,url:n},startTimestamp:Date.now()};return Te("fetch",{...i}),t.apply(N,e).then(o=>(Te("fetch",{...i,endTimestamp:Date.now(),response:o}),o),o=>{throw Te("fetch",{...i,endTimestamp:Date.now(),error:o}),o})}})}function Pi(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Ko(t){return typeof t=="string"?t:t?Pi(t,"url")?t.url:t.toString?t.toString():"":""}function Jo(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[r,n]=t;return{url:Ko(r),method:Pi(n,"method")?String(n.method).toUpperCase():"GET"}}let e=t[0];return{url:Ko(e),method:Pi(e,"method")?String(e.method).toUpperCase():"GET"}}function Wl(){if(!("XMLHttpRequest"in N))return;let t=XMLHttpRequest.prototype;L(t,"open",function(e){return function(...r){let n=r[1],i=this[it]={method:ne(r[0])?r[0].toUpperCase():r[0],url:r[1],request_headers:{}};ne(n)&&i.method==="POST"&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let o=()=>{let a=this[it];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}Te("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?L(this,"onreadystatechange",function(a){return function(...s){return o(),a.apply(this,s)}}):this.addEventListener("readystatechange",o),L(this,"setRequestHeader",function(a){return function(...s){let[c,l]=s,f=this[it];return f&&(f.request_headers[c.toLowerCase()]=l),a.apply(this,s)}}),e.apply(this,r)}}),L(t,"send",function(e){return function(...r){let n=this[it];return n&&r[0]!==void 0&&(n.body=r[0]),Te("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),e.apply(this,r)}})}var Sn;function jl(){if(!zo())return;let t=N.onpopstate;N.onpopstate=function(...r){let n=N.location.href,i=Sn;if(Sn=n,Te("history",{from:i,to:n}),t)try{return t.apply(this,r)}catch{}};function e(r){return function(...n){let i=n.length>2?n[2]:void 0;if(i){let o=Sn,a=String(i);Sn=a,Te("history",{from:o,to:a})}return r.apply(this,n)}}L(N.history,"pushState",e),L(N.history,"replaceState",e)}var ql=1e3,En,vn;function zl(t,e){if(!t||t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch{}return!1}function Zl(t){if(t.type!=="keypress")return!1;try{let e=t.target;if(!e||!e.tagName)return!0;if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)return!1}catch{}return!0}function Xo(t,e=!1){return r=>{if(!r||vn===r||Zl(r))return;let n=r.type==="keypress"?"input":r.type;En===void 0?(t({event:r,name:n,global:e}),vn=r):zl(vn,r)&&(t({event:r,name:n,global:e}),vn=r),clearTimeout(En),En=N.setTimeout(()=>{En=void 0},ql)}}function Kl(){if(!("document"in N))return;let t=Te.bind(null,"dom"),e=Xo(t,!0);N.document.addEventListener("click",e,!1),N.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(r=>{let n=N[r]&&N[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(L(n,"addEventListener",function(i){return function(o,a,s){if(o==="click"||o=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},f=l[o]=l[o]||{refCount:0};if(!f.handler){let u=Xo(t);f.handler=u,i.call(this,o,u,s)}f.refCount++}catch{}return i.call(this,o,a,s)}}),L(n,"removeEventListener",function(i){return function(o,a,s){if(o==="click"||o=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__||{},f=l[o];f&&(f.refCount--,f.refCount<=0&&(i.call(this,o,f.handler,s),f.handler=void 0,delete l[o]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,a,s)}}))})}var bn=null;function Xl(){bn=N.onerror,N.onerror=function(t,e,r,n,i){return Te("error",{column:n,error:i,line:r,msg:t,url:e}),bn&&!bn.__SENTRY_LOADER__?bn.apply(this,arguments):!1},N.onerror.__SENTRY_INSTRUMENTED__=!0}var Cn=null;function Jl(){Cn=N.onunhandledrejection,N.onunhandledrejection=function(t){return Te("unhandledrejection",t),Cn&&!Cn.__SENTRY_LOADER__?Cn.apply(this,arguments):!0},N.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Qo(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function r(i){if(t)return e.has(i)?!0:(e.add(i),!1);for(let o=0;o<e.length;o++)if(e[o]===i)return!0;return e.push(i),!1}function n(i){if(t)e.delete(i);else for(let o=0;o<e.length;o++)if(e[o]===i){e.splice(o,1);break}}return[r,n]}function ce(){let t=k,e=t.crypto||t.msCrypto;if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");let r=e&&e.getRandomValues?()=>e.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function ea(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Re(t){let{message:e,event_id:r}=t;if(e)return e;let n=ea(t);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Qt(t,e,r){let n=t.exception=t.exception||{},i=n.values=n.values||[],o=i[0]=i[0]||{};o.value||(o.value=e||""),o.type||(o.type=r||"Error")}function ot(t,e){let r=ea(t);if(!r)return;let n={type:"generic",handled:!0},i=r.mechanism;if(r.mechanism={...n,...i,...e},e&&"data"in e){let o={...i&&i.data,...e.data};r.mechanism.data=o}}function Tn(t){if(t&&t.__sentry_captured__)return!0;try{Jt(t,"__sentry_captured__",!0)}catch{}return!1}function Br(t){return Array.isArray(t)?t:[t]}function Ni(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Ii(){return"npm"}function ta(){return!Ni()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ra(t,e){return t.require(e)}function xe(t,e=100,r=1/0){try{return Rn("",t,e,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function xn(t,e=3,r=100*1024){let n=xe(t,e);return rf(n)>r?xn(t,e-1,r):n}function Rn(t,e,r=1/0,n=1/0,i=Qo()){let[o,a]=i;if(e==null||["number","boolean","string"].includes(typeof e)&&!Mr(e))return e;let s=Ql(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;let c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:r;if(c===0)return s.replace("object ","");if(o(e))return"[Circular ~]";let l=e;if(l&&typeof l.toJSON=="function")try{let h=l.toJSON();return Rn("",h,c-1,n,i)}catch{}let f=Array.isArray(e)?[]:{},u=0,_=gn(e);for(let h in _){if(!Object.prototype.hasOwnProperty.call(_,h))continue;if(u>=n){f[h]="[MaxProperties ~]";break}let T=_[h];f[h]=Rn(h,T,c-1,n,i),u++}return a(e),f}function Ql(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(yi(e))return"[SyntheticEvent]";if(typeof e=="number"&&e!==e)return"[NaN]";if(typeof e=="function")return`[Function: ${me(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;let r=ef(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function ef(t){let e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function tf(t){return~-encodeURI(t).split(/%..|./).length}function rf(t){return tf(JSON.stringify(t))}var at;(function(t){t[t.PENDING=0]="PENDING";let r=1;t[t.RESOLVED=r]="RESOLVED";let n=2;t[t.REJECTED=n]="REJECTED"})(at||(at={}));function ie(t){return new A(e=>{e(t)})}function Ct(t){return new A((e,r)=>{r(t)})}var A=class{__init(){this._state=at.PENDING}__init2(){this._handlers=[]}constructor(e){A.prototype.__init.call(this),A.prototype.__init2.call(this),A.prototype.__init3.call(this),A.prototype.__init4.call(this),A.prototype.__init5.call(this),A.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(r){this._reject(r)}}then(e,r){return new A((n,i)=>{this._handlers.push([!1,o=>{if(!e)n(o);else try{n(e(o))}catch(a){i(a)}},o=>{if(!r)i(o);else try{n(r(o))}catch(a){i(a)}}]),this._executeHandlers()})}catch(e){return this.then(r=>r,e)}finally(e){return new A((r,n)=>{let i,o;return this.then(a=>{o=!1,i=a,e&&e()},a=>{o=!0,i=a,e&&e()}).then(()=>{if(o){n(i);return}r(i)})})}__init3(){this._resolve=e=>{this._setResult(at.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(at.REJECTED,e)}}__init5(){this._setResult=(e,r)=>{if(this._state===at.PENDING){if(Lt(r)){r.then(this._resolve,this._reject);return}this._state=e,this._value=r,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state===at.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(r=>{r[0]||(this._state===at.RESOLVED&&r[1](this._value),this._state===at.REJECTED&&r[2](this._value),r[0]=!0)})}}};function Ai(t){let e=[];function r(){return t===void 0||e.length<t}function n(a){return e.splice(e.indexOf(a),1)[0]}function i(a){if(!r())return Ct(new W("Not adding Promise because buffer limit was reached."));let s=a();return e.indexOf(s)===-1&&e.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s}function o(a){return new A((s,c)=>{let l=e.length;if(!l)return s(!0);let f=setTimeout(()=>{a&&a>0&&s(!1)},a);e.forEach(u=>{ie(u).then(()=>{--l||(clearTimeout(f),s(!0))},c)})})}return{$:e,add:i,drain:o}}function kr(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:n,relative:e[5]+r+n}}var na=["fatal","error","warning","log","info","debug"];function Mi(t){return t==="warn"?"warning":na.includes(t)?t:"log"}var oa=Ce(),wi={nowSeconds:()=>Date.now()/1e3};function nf(){let{performance:t}=oa;if(!t||!t.now)return;let e=Date.now()-t.now();return{now:()=>t.now(),timeOrigin:e}}function of(){try{return ra(module,"perf_hooks").performance}catch{return}}var Di=ta()?of():nf(),ia=Di===void 0?wi:{nowSeconds:()=>(Di.timeOrigin+Di.now())/1e3},st=wi.nowSeconds.bind(wi),Oe=ia.nowSeconds.bind(ia);var Lr,Pe=(()=>{let{performance:t}=oa;if(!t||!t.now){Lr="none";return}let e=3600*1e3,r=t.now(),n=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+r-n):e,o=i<e,a=t.timing&&t.timing.navigationStart,c=typeof a=="number"?Math.abs(a+r-n):e,l=c<e;return o||l?i<=c?(Lr="timeOrigin",t.timeOrigin):(Lr="navigationStart",a):(Lr="dateNow",n)})();var aa=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Fr(t){let e=t.match(aa);if(!t||!e)return;let r;return e[3]==="1"?r=!0:e[3]==="0"&&(r=!1),{traceId:e[1],parentSampled:r,parentSpanId:e[2]}}function $e(t,e=[]){return[t,e]}function ki(t,e){let[r,n]=t;return[r,[...n,e]]}function On(t,e){let r=t[1];for(let n of r){let i=n[0].type;if(e(n,i))return!0}return!1}function Bi(t,e){return(e||new TextEncoder).encode(t)}function Li(t,e){let[r,n]=t,i=JSON.stringify(r);function o(a){typeof i=="string"?i=typeof a=="string"?i+a:[Bi(i,e),a]:i.push(typeof a=="string"?Bi(a,e):a)}for(let a of n){let[s,c]=a;if(o(`
|
|
7
|
+
${JSON.stringify(s)}
|
|
8
|
+
`),typeof c=="string"||c instanceof Uint8Array)o(c);else{let l;try{l=JSON.stringify(c)}catch{l=JSON.stringify(xe(c))}o(l)}}return typeof i=="string"?i:af(i)}function af(t){let e=t.reduce((i,o)=>i+o.length,0),r=new Uint8Array(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return r}function Fi(t,e){let r=typeof t.data=="string"?Bi(t.data,e):t.data;return[se({type:"attachment",length:r.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),r]}var sf={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function Pn(t){return sf[t]}function Nn(t){if(!t||!t.sdk)return;let{name:e,version:r}=t.sdk;return{name:e,version:r}}function Ui(t,e,r,n){let i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!r&&{dsn:Ye(n)},...i&&{trace:se({...i})}}}function Gi(t,e,r){let n=[{type:"client_report"},{timestamp:r||st(),discarded_events:t}];return $e(e?{dsn:e}:{},[n])}function sa(t,e=Date.now()){let r=parseInt(`${t}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${t}`);return isNaN(n)?6e4:n-e}function ca(t,e){return t[e]||t.all||0}function Hi(t,e,r=Date.now()){return ca(t,e)>r}function Yi(t,{statusCode:e,headers:r},n=Date.now()){let i={...t},o=r&&r["x-sentry-rate-limits"],a=r&&r["retry-after"];if(o)for(let s of o.trim().split(",")){let[c,l]=s.split(":",2),f=parseInt(c,10),u=(isNaN(f)?60:f)*1e3;if(!l)i.all=n+u;else for(let _ of l.split(";"))i[_]=n+u}else a?i.all=n+sa(a,n):e===429&&(i.all=n+60*1e3);return i}var Ur="baggage",$i="sentry-",fa=/^sentry-/,da=8192;function Vi(t){if(!ne(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((n,i)=>{let o=la(i);return{...n,...o}},{});else{if(!t)return;e=la(t)}let r=Object.entries(e).reduce((n,[i,o])=>{if(i.match(fa)){let a=i.slice($i.length);n[a]=o}return n},{});if(Object.keys(r).length>0)return r}function In(t){let e=Object.entries(t).reduce((r,[n,i])=>(i&&(r[`${$i}${n}`]=i),r),{});return cf(e)}function la(t){return t.split(",").map(e=>e.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((e,[r,n])=>(e[r]=n,e),{})}function cf(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[r,n],i)=>{let o=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,a=i===0?o:`${e},${o}`;return a.length>da?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a},"")}var er="production";function ua(t){let e=Oe(),r={sid:ce(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>lf(r)};return t&&ct(r,t),r}function ct(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Oe(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:ce()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let r=t.timestamp-t.started;t.duration=r>=0?r:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function pa(t,e){let r={};e?r={status:e}:t.status==="ok"&&(r={status:"exited"}),ct(t,r)}function lf(t){return se({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var ff=100,le=class{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){let r=new le;return e&&(r._breadcrumbs=[...e._breadcrumbs],r._tags={...e._tags},r._extra={...e._extra},r._contexts={...e._contexts},r._user=e._user,r._level=e._level,r._span=e._span,r._session=e._session,r._transactionName=e._transactionName,r._fingerprint=e._fingerprint,r._eventProcessors=[...e._eventProcessors],r._requestSession=e._requestSession,r._attachments=[...e._attachments],r._sdkProcessingMetadata={...e._sdkProcessingMetadata}),r}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&ct(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,r){return this._tags={...this._tags,[e]:r},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,r){return this._extra={...this._extra,[e]:r},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,r){return r===null?delete this._contexts[e]:this._contexts[e]=r,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let r=e(this);return r instanceof le?r:this}return e instanceof le?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):be(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),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._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,r){let n=typeof r=="number"?r:ff;if(n<=0)return this;let i={timestamp:st(),...e};return this._breadcrumbs=[...this._breadcrumbs,i].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,r={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let n=this._span.transaction;if(n){e.sdkProcessingMetadata={dynamicSamplingContext:n.getDynamicSamplingContext(),...e.sdkProcessingMetadata};let i=n.name;i&&(e.tags={transaction:i,...e.tags})}}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...ma(),...this._eventProcessors],e,r)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,r,n,i=0){return new A((o,a)=>{let s=e[i];if(r===null||typeof s!="function")o(r);else{let c=s({...r},n);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&s.id&&c===null&&p.log(`Event processor "${s.id}" dropped event`),Lt(c)?c.then(l=>this._notifyEventProcessors(e,l,n,i+1).then(o)).then(null,a):this._notifyEventProcessors(e,c,n,i+1).then(o).then(null,a)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Br(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function ma(){return Ft("globalEventProcessors",()=>[])}function Tt(t){ma().push(t)}var ga=4,df=100,tr=class{constructor(e,r=new le,n=ga){this._version=n,this._stack=[{scope:r}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){let r=this.getStackTop();r.client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let e=le.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(e){let r=this.pushScope();try{e(r)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,r){let n=this._lastEventId=r&&r.event_id?r.event_id:ce(),i=new Error("Sentry syntheticException");return this._withClient((o,a)=>{o.captureException(e,{originalException:e,syntheticException:i,...r,event_id:n},a)}),n}captureMessage(e,r,n){let i=this._lastEventId=n&&n.event_id?n.event_id:ce(),o=new Error(e);return this._withClient((a,s)=>{a.captureMessage(e,r,{originalException:e,syntheticException:o,...n,event_id:i},s)}),i}captureEvent(e,r){let n=r&&r.event_id?r.event_id:ce();return e.type||(this._lastEventId=n),this._withClient((i,o)=>{i.captureEvent(e,{...r,event_id:n},o)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,r){let{scope:n,client:i}=this.getStackTop();if(!i)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:a=df}=i.getOptions&&i.getOptions()||{};if(a<=0)return;let c={timestamp:st(),...e},l=o?dn(()=>o(c,r)):c;l!==null&&(i.emit&&i.emit("beforeAddBreadcrumb",l,r),n.addBreadcrumb(l,a))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,r){this.getScope().setTag(e,r)}setExtra(e,r){this.getScope().setExtra(e,r)}setContext(e,r){this.getScope().setContext(e,r)}configureScope(e){let{scope:r,client:n}=this.getStackTop();n&&e(r)}run(e){let r=An(this);try{e(this)}finally{An(r)}}getIntegration(e){let r=this.getClient();if(!r)return null;try{return r.getIntegration(e)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,r){let n=this._callExtensionMethod("startTransaction",e,r);return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!n&&console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
28
9
|
Sentry.addTracingExtensions();
|
|
29
10
|
Sentry.init({...});
|
|
30
|
-
`),a}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(n=!1){if(n)return this.endSession();this._sendSessionUpdate()}endSession(){let i=this.getStackTop().scope,a=i.getSession();a&&ym(a),this._sendSessionUpdate(),i.setSession()}startSession(n){let{scope:i,client:a}=this.getStackTop(),{release:s,environment:u=Xi}=a&&a.getOptions()||{},{userAgent:l}=Le.navigator||{},p=_m({release:s,environment:u,user:i.getUser(),...l&&{userAgent:l},...n}),m=i.getSession&&i.getSession();return m&&m.status==="ok"&&nr(m,{status:"exited"}),this.endSession(),i.setSession(p),p}shouldSendDefaultPii(){let n=this.getClient(),i=n&&n.getOptions();return!!(i&&i.sendDefaultPii)}_sendSessionUpdate(){let{scope:n,client:i}=this.getStackTop(),a=n.getSession();a&&i&&i.captureSession&&i.captureSession(a)}_withClient(n){let{scope:i,client:a}=this.getStackTop();a&&n(a,i)}_callExtensionMethod(n,...i){let s=mi().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[n]=="function")return s.extensions[n].apply(this,i);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Extension method ${n} couldn't be found, doing nothing.`)}};function mi(){return Le.__SENTRY__=Le.__SENTRY__||{extensions:{},hub:void 0},Le}function Ns(t){let n=mi(),i=na(n);return _l(n,t),i}function K(){let t=mi();if(t.__SENTRY__&&t.__SENTRY__.acs){let n=t.__SENTRY__.acs.getCurrentHub();if(n)return n}return iC(t)}function iC(t=mi()){return(!oC(t)||na(t).isOlderThan(vm))&&_l(t,new ji),na(t)}function oC(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function na(t){return pi("hub",()=>new ji,t)}function _l(t,n){if(!t)return!1;let i=t.__SENTRY__=t.__SENTRY__||{};return i.hub=n,!0}function Ji(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let n=K().getClient(),i=t||n&&n.getOptions();return!!i&&(i.enableTracing||"tracesSampleRate"in i||"tracesSampler"in i)}function dn(t){return(t||K()).getScope().getTransaction()}var Em=!1;function Cm(){Em||(Em=!0,Fe("error",yl),Fe("unhandledrejection",yl))}function yl(){let t=dn();if(t){let n="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Transaction: ${n} -> Global error occured`),t.setStatus(n)}}yl.tag="sentry_tracingErrorCallback";var Dr=class{__init(){this.spans=[]}constructor(n=1e3){Dr.prototype.__init.call(this),this._maxlen=n}add(n){this.spans.length>this._maxlen?n.spanRecorder=void 0:this.spans.push(n)}},Kt=class{__init2(){this.traceId=At()}__init3(){this.spanId=At().substring(16)}__init4(){this.startTimestamp=fn()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(n){if(Kt.prototype.__init2.call(this),Kt.prototype.__init3.call(this),Kt.prototype.__init4.call(this),Kt.prototype.__init5.call(this),Kt.prototype.__init6.call(this),Kt.prototype.__init7.call(this),!n)return this;n.traceId&&(this.traceId=n.traceId),n.spanId&&(this.spanId=n.spanId),n.parentSpanId&&(this.parentSpanId=n.parentSpanId),"sampled"in n&&(this.sampled=n.sampled),n.op&&(this.op=n.op),n.description&&(this.description=n.description),n.data&&(this.data=n.data),n.tags&&(this.tags=n.tags),n.status&&(this.status=n.status),n.startTimestamp&&(this.startTimestamp=n.startTimestamp),n.endTimestamp&&(this.endTimestamp=n.endTimestamp),n.instrumenter&&(this.instrumenter=n.instrumenter)}startChild(n){let i=new Kt({...n,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(i.spanRecorder=this.spanRecorder,i.spanRecorder&&i.spanRecorder.add(i),i.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&i.transaction){let a=n&&n.op||"< unknown op >",s=i.transaction.name||"< unknown name >",u=i.transaction.spanId,l=`[Tracing] Starting '${a}' span on transaction '${s}' (${u}).`;i.transaction.metadata.spanMetadata[i.spanId]={logMessage:l},x.log(l)}return i}setTag(n,i){return this.tags={...this.tags,[n]:i},this}setData(n,i){return this.data={...this.data,[n]:i},this}setStatus(n){return this.status=n,this}setHttpStatus(n){this.setTag("http.status_code",String(n));let i=bm(n);return i!=="unknown_error"&&this.setStatus(i),this}isSuccess(){return this.status==="ok"}finish(n){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:i}=this.transaction.metadata.spanMetadata[this.spanId];i&&x.log(i.replace("Starting","Finishing"))}this.endTimestamp=typeof n=="number"?n:fn()}toTraceparent(){let n="";return this.sampled!==void 0&&(n=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${n}`}toContext(){return xt({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(n){return this.data=n.data||{},this.description=n.description,this.endTimestamp=n.endTimestamp,this.op=n.op,this.parentSpanId=n.parentSpanId,this.sampled=n.sampled,this.spanId=n.spanId||this.spanId,this.startTimestamp=n.startTimestamp||this.startTimestamp,this.status=n.status,this.tags=n.tags||{},this.traceId=n.traceId||this.traceId,this}getTraceContext(){return xt({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return xt({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}};function bm(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}var In=class extends Kt{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(n,i){super(n),In.prototype.__init.call(this),In.prototype.__init2.call(this),In.prototype.__init3.call(this),this._hub=i||K(),this._name=n.name||"",this.metadata={source:"custom",...n.metadata,spanMetadata:{}},this._trimEnd=n.trimEnd,this.transaction=this;let a=this.metadata.dynamicSamplingContext;a&&(this._frozenDynamicSamplingContext={...a})}get name(){return this._name}set name(n){this.setName(n)}setName(n,i="custom"){this._name=n,this.metadata.source=i}initSpanRecorder(n=1e3){this.spanRecorder||(this.spanRecorder=new Dr(n)),this.spanRecorder.add(this)}setContext(n,i){i===null?delete this._contexts[n]:this._contexts[n]=i}setMeasurement(n,i,a=""){this._measurements[n]={value:i,unit:a}}setMetadata(n){this.metadata={...this.metadata,...n}}finish(n){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(n);let i=this._hub.getClient();if(i&&i.emit&&i.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),i&&i.recordDroppedEvent("sample_rate","transaction");return}let a=this.spanRecorder?this.spanRecorder.spans.filter(p=>p!==this&&p.endTimestamp):[];this._trimEnd&&a.length>0&&(this.endTimestamp=a.reduce((p,m)=>p.endTimestamp&&m.endTimestamp?p.endTimestamp>m.endTimestamp?p:m:p).endTimestamp);let s=this.metadata,u={contexts:{...this._contexts,trace:this.getTraceContext()},spans:a,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...s,dynamicSamplingContext:this.getDynamicSamplingContext()},...s.source&&{transaction_info:{source:s.source}}};return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),u.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(u)}toContext(){let n=super.toContext();return xt({...n,name:this.name,trimEnd:this._trimEnd})}updateWithContext(n){return super.updateWithContext(n),this.name=n.name||"",this._trimEnd=n.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let n=this._hub||K(),i=n&&n.getClient();if(!i)return{};let{environment:a,release:s}=i.getOptions()||{},{publicKey:u}=i.getDsn()||{},l=this.metadata.sampleRate,p=l!==void 0?l.toString():void 0,{segment:m}=n.getScope().getUser()||{},h=this.metadata.source,S=h&&h!=="url"?this.name:void 0,v=xt({environment:a||Xi,release:s,transaction:S,user_segment:m,public_key:u,trace_id:this.traceId,sample_rate:p});return i.emit&&i.emit("createDsc",v),v}setHub(n){this._hub=n}};var eo={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},aC="finishReason",Qi=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],Sl=class extends Dr{constructor(n,i,a,s){super(s),this._pushActivity=n,this._popActivity=i,this.transactionSpanId=a}add(n){n.spanId!==this.transactionSpanId&&(n.finish=i=>{n.endTimestamp=typeof i=="number"?i:fn(),this._popActivity(n.spanId)},n.endTimestamp===void 0&&this._pushActivity(n.spanId)),super.add(n)}},Zt=class extends In{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=Qi[4]}constructor(n,i,a=eo.idleTimeout,s=eo.finalTimeout,u=eo.heartbeatInterval,l=!1){super(n,i),this._idleHub=i,this._idleTimeout=a,this._finalTimeout=s,this._heartbeatInterval=u,this._onScope=l,Zt.prototype.__init.call(this),Zt.prototype.__init2.call(this),Zt.prototype.__init3.call(this),Zt.prototype.__init4.call(this),Zt.prototype.__init5.call(this),Zt.prototype.__init6.call(this),l&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),i.configureScope(p=>p.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Qi[3],this.finish())},this._finalTimeout)}finish(n=fn()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(aC,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(let i of this._beforeFinishCallbacks)i(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(i=>{if(i.spanId===this.spanId)return!0;i.endTimestamp||(i.endTimestamp=n,i.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(i,void 0,2)));let a=i.startTimestamp<n;return a||(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(i,void 0,2)),a}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] No active IdleTransaction");if(this._onScope){let i=this._idleHub.getScope();i.getTransaction()===this&&i.setSpan(void 0)}return super.finish(n)}registerBeforeFinishCallback(n){this._beforeFinishCallbacks.push(n)}initSpanRecorder(n){if(!this.spanRecorder){let i=s=>{this._finished||this._pushActivity(s)},a=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new Sl(i,a,this.spanId,n),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(n,{restartOnChildSpanChange:i}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=i===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Qi[5],this.finish(n)))}setFinishReason(n){this._finishReason=n}_restartIdleTimeout(n){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=Qi[1],this.finish(n))},this._idleTimeout)}_pushActivity(n){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] pushActivity: ${n}`),this.activities[n]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(n){if(this.activities[n]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] popActivity ${n}`),delete this.activities[n],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let i=fn();this._idleTimeoutCanceledPermanently?(this._finishReason=Qi[5],this.finish(i)):this._restartIdleTimeout(i+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let n=Object.keys(this.activities).join("");n===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=n,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Qi[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function sC(){let n=this.getScope().getSpan();return n?{"sentry-trace":n.toTraceparent()}:{}}function Tm(t,n,i){if(!Ji(n))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let a;return typeof n.tracesSampler=="function"?(a=n.tracesSampler(i),t.setMetadata({sampleRate:Number(a)})):i.parentSampled!==void 0?a=i.parentSampled:typeof n.tracesSampleRate<"u"?(a=n.tracesSampleRate,t.setMetadata({sampleRate:Number(a)})):(a=1,t.setMetadata({sampleRate:a})),cC(a)?a?(t.sampled=Math.random()<a,t.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),t)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Discarding transaction because ${typeof n.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),t.sampled=!1,t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function cC(t){return Ko(t)||!(typeof t=="number"||typeof t=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t<0||t>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function uC(t,n){let i=this.getClient(),a=i&&i.getOptions()||{},s=a.instrumenter||"sentry",u=t.instrumenter||"sentry";s!==u&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error(`A transaction was started with instrumenter=\`${u}\`, but the SDK is configured with the \`${s}\` instrumenter.
|
|
31
|
-
The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),t.sampled=!1);let l=new In(t,this);return l=Tm(l,a,{parentSampled:t.parentSampled,transactionContext:t,...n}),l.sampled&&l.initSpanRecorder(a._experiments&&a._experiments.maxSpans),i&&i.emit&&i.emit("startTransaction",l),l}function Ms(t,n,i,a,s,u,l){let p=t.getClient(),m=p&&p.getOptions()||{},h=new Zt(n,t,i,a,l,s);return h=Tm(h,m,{parentSampled:n.parentSampled,transactionContext:n,...u}),h.sampled&&h.initSpanRecorder(m._experiments&&m._experiments.maxSpans),p&&p.emit&&p.emit("startTransaction",h),h}function Ds(){let t=mi();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=uC),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=sC),Cm())}function to(t,n){return K().captureException(t,{captureContext:n})}function ra(t){K().addBreadcrumb(t)}function Bs(t,n){K().setContext(t,n)}function Ls(t){K().withScope(t)}var lC="7";function fC(t){let n=t.protocol?`${t.protocol}:`:"",i=t.port?`:${t.port}`:"";return`${n}//${t.host}${i}${t.path?`/${t.path}`:""}/api/`}function pC(t){return`${fC(t)}${t.projectId}/envelope/`}function dC(t,n){return Ku({sentry_key:t.publicKey,sentry_version:lC,...n&&{sentry_client:`${n.name}/${n.version}`}})}function Rm(t,n={}){let i=typeof n=="string"?n:n.tunnel,a=typeof n=="string"||!n._metadata?void 0:n._metadata.sdk;return i||`${pC(t)}?${dC(t,a)}`}function mC(t,n){return n&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=[...t.sdk.integrations||[],...n.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...n.packages||[]]),t}function xm(t,n,i,a){let s=ws(i),u={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!a&&{dsn:An(n)}},l="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return On(u,[l])}function Am(t,n,i,a){let s=ws(i),u=t.type&&t.type!=="replay_event"?t.type:"event";mC(t,i&&i.sdk);let l=fl(t,s,a,n);return delete t.sdkProcessingMetadata,On(l,[[{type:u},t]])}var Om=[];function gC(t){let n={};return t.forEach(i=>{let{name:a}=i,s=n[a];s&&!s.isDefaultInstance&&i.isDefaultInstance||(n[a]=i)}),Object.keys(n).map(i=>n[i])}function vl(t){let n=t.defaultIntegrations||[],i=t.integrations;n.forEach(l=>{l.isDefaultInstance=!0});let a;Array.isArray(i)?a=[...n,...i]:typeof i=="function"?a=jo(i(n)):a=n;let s=gC(a),u=hC(s,l=>l.name==="Debug");if(u!==-1){let[l]=s.splice(u,1);s.push(l)}return s}function Im(t){let n={};return t.forEach(i=>{i&&El(i,n)}),n}function El(t,n){n[t.name]=t,Om.indexOf(t.name)===-1&&(t.setupOnce(Mr,K),Om.push(t.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`Integration installed: ${t.name}`))}function hC(t,n){for(let i=0;i<t.length;i++)if(n(t[i])===!0)return i;return-1}function Pm(t,n,i,a){let{normalizeDepth:s=3,normalizeMaxBreadth:u=1e3}=t,l={...n,event_id:n.event_id||i.event_id||At(),timestamp:n.timestamp||tr()},p=i.integrations||t.integrations.map(S=>S.name);_C(l,t),SC(l,p),n.type===void 0&&yC(l,t.stackParser);let m=a;i.captureContext&&(m=Ot.clone(m).update(i.captureContext));let h=_t(l);if(m){if(m.getAttachments){let S=[...i.attachments||[],...m.getAttachments()];S.length&&(i.attachments=S)}h=m.applyToEvent(l,i)}return h.then(S=>typeof s=="number"&&s>0?vC(S,s,u):S)}function _C(t,n){let{environment:i,release:a,dist:s,maxValueLength:u=250}=n;"environment"in t||(t.environment="environment"in n?i:Xi),t.release===void 0&&a!==void 0&&(t.release=a),t.dist===void 0&&s!==void 0&&(t.dist=s),t.message&&(t.message=wr(t.message,u));let l=t.exception&&t.exception.values&&t.exception.values[0];l&&l.value&&(l.value=wr(l.value,u));let p=t.request;p&&p.url&&(p.url=wr(p.url,u))}var wm=new WeakMap;function yC(t,n){let i=Le._sentryDebugIds;if(!i)return;let a,s=wm.get(n);s?a=s:(a=new Map,wm.set(n,a));let u=Object.keys(i).reduce((m,h)=>{let S,v=a.get(h);v?S=v:(S=n(h),a.set(h,S));for(let I=S.length-1;I>=0;I--){let P=S[I];if(P.filename){m[P.filename]=i[h];break}}return m},{}),l=new Set;try{t.exception.values.forEach(m=>{m.stacktrace.frames.forEach(h=>{h.filename&&l.add(h.filename)})})}catch{}t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let p=t.debug_meta.images;l.forEach(m=>{u[m]&&p.push({type:"sourcemap",code_file:m,debug_id:u[m]})})}function SC(t,n){n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}function vC(t,n,i){if(!t)return null;let a={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(s=>({...s,...s.data&&{data:ln(s.data,n,i)}}))},...t.user&&{user:ln(t.user,n,i)},...t.contexts&&{contexts:ln(t.contexts,n,i)},...t.extra&&{extra:ln(t.extra,n,i)}};return t.contexts&&t.contexts.trace&&a.contexts&&(a.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(a.contexts.trace.data=ln(t.contexts.trace.data,n,i))),t.spans&&(a.spans=t.spans.map(s=>(s.data&&(s.data=ln(s.data,n,i)),s))),a}var Nm="Not capturing exception because it's already been captured.",mn=class{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(n){if(mn.prototype.__init.call(this),mn.prototype.__init2.call(this),mn.prototype.__init3.call(this),mn.prototype.__init4.call(this),mn.prototype.__init5.call(this),this._options=n,n.dsn?this._dsn=ds(n.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("No DSN provided, client will not do anything."),this._dsn){let i=Rm(this._dsn,n);this._transport=n.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...n.transportOptions,url:i})}}captureException(n,i,a){if(Rs(n)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(Nm);return}let s=i&&i.event_id;return this._process(this.eventFromException(n,i).then(u=>this._captureEvent(u,i,a)).then(u=>{s=u})),s}captureMessage(n,i,a,s){let u=a&&a.event_id,l=Vi(n)?this.eventFromMessage(String(n),i,a):this.eventFromException(n,a);return this._process(l.then(p=>this._captureEvent(p,a,s)).then(p=>{u=p})),u}captureEvent(n,i,a){if(i&&i.originalException&&Rs(i.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(Nm);return}let s=i&&i.event_id;return this._process(this._captureEvent(n,i,a).then(u=>{s=u})),s}captureSession(n){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("SDK not enabled, will not capture session.");return}typeof n.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Discarded session because of missing or non-string release"):(this.sendSession(n),nr(n,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(n){let i=this._transport;return i?this._isClientDoneProcessing(n).then(a=>i.flush(n).then(s=>a&&s)):_t(!0)}close(n){return this.flush(n).then(i=>(this.getOptions().enabled=!1,i))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Im(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(n){return this._integrations[n]}getIntegration(n){try{return this._integrations[n.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`Cannot retrieve integration ${n.id} from the current Client`),null}}addIntegration(n){El(n,this._integrations)}sendEvent(n,i={}){if(this._dsn){let a=Am(n,this._dsn,this._options._metadata,this._options.tunnel);for(let u of i.attachments||[])a=cl(a,ll(u,this._options.transportOptions&&this._options.transportOptions.textEncoder));let s=this._sendEnvelope(a);s&&s.then(u=>this.emit("afterSendEvent",n,u),null)}}sendSession(n){if(this._dsn){let i=xm(n,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(i)}}recordDroppedEvent(n,i,a){if(this._options.sendClientReports){let s=`${n}:${i}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`Adding outcome: "${s}"`),this._outcomes[s]=this._outcomes[s]+1||1}}on(n,i){this._hooks[n]||(this._hooks[n]=[]),this._hooks[n].push(i)}emit(n,...i){this._hooks[n]&&this._hooks[n].forEach(a=>a(...i))}_updateSessionFromEvent(n,i){let a=!1,s=!1,u=i.exception&&i.exception.values;if(u){s=!0;for(let m of u){let h=m.mechanism;if(h&&h.handled===!1){a=!0;break}}}let l=n.status==="ok";(l&&n.errors===0||l&&a)&&(nr(n,{...a&&{status:"crashed"},errors:n.errors||Number(s||a)}),this.captureSession(n))}_isClientDoneProcessing(n){return new we(i=>{let a=0,s=1,u=setInterval(()=>{this._numProcessing==0?(clearInterval(u),i(!0)):(a+=s,n&&a>=n&&(clearInterval(u),i(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(n,i,a){let s=this.getOptions(),u=Object.keys(this._integrations);return!i.integrations&&u.length>0&&(i.integrations=u),Pm(s,n,i,a)}_captureEvent(n,i={},a){return this._processEvent(n,i,a).then(s=>s.event_id,s=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let u=s;u.logLevel==="log"?x.log(u.message):x.warn(u)}})}_processEvent(n,i,a){let s=this.getOptions(),{sampleRate:u}=s;if(!this._isEnabled())return Nr(new Je("SDK not enabled, will not capture event.","log"));let l=Dm(n),p=Mm(n),m=n.type||"error",h=`before send for type \`${m}\``;if(p&&typeof u=="number"&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",n),Nr(new Je(`Discarding event because it's not included in the random sample (sampling rate = ${u})`,"log"));let S=m==="replay_event"?"replay":m;return this._prepareEvent(n,i,a).then(v=>{if(v===null)throw this.recordDroppedEvent("event_processor",S,n),new Je("An event processor returned `null`, will not send event.","log");if(i.data&&i.data.__sentry__===!0)return v;let P=CC(s,v,i);return EC(P,h)}).then(v=>{if(v===null)throw this.recordDroppedEvent("before_send",S,n),new Je(`${h} returned \`null\`, will not send event.`,"log");let I=a&&a.getSession();!l&&I&&this._updateSessionFromEvent(I,v);let P=v.transaction_info;if(l&&P&&v.transaction!==n.transaction){let L="custom";v.transaction_info={...P,source:L}}return this.sendEvent(v,i),v}).then(null,v=>{throw v instanceof Je?v:(this.captureException(v,{data:{__sentry__:!0},originalException:v}),new Je(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
32
|
-
Reason: ${
|
|
33
|
-
Event: ${
|
|
34
|
-
Event: ${
|
|
35
|
-
Event: ${
|
|
36
|
-
Event: ${
|
|
37
|
-
Url: ${
|
|
38
|
-
Event: ${
|
|
39
|
-
Url: ${ks(t)}`),!0)}function OC(t,n){return t.type||!n||!n.length?!1:NC(t).some(i=>Pr(i,n))}function IC(t,n){if(t.type!=="transaction"||!n||!n.length)return!1;let i=t.transaction;return i?Pr(i,n):!1}function wC(t,n){if(!n||!n.length)return!1;let i=ks(t);return i?Pr(i,n):!1}function PC(t,n){if(!n||!n.length)return!0;let i=ks(t);return i?Pr(i,n):!0}function NC(t){if(t.message)return[t.message];if(t.exception){let{values:n}=t.exception;try{let{type:i="",value:a=""}=n&&n[n.length-1]||{};return[`${a}`,`${i}: ${a}`]}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error(`Cannot extract message for event ${un(t)}`),[]}}return[]}function MC(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function DC(t=[]){for(let n=t.length-1;n>=0;n--){let i=t[n];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}function ks(t){try{let n;try{n=t.exception.values[0].stacktrace.frames}catch{}return n?DC(n):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error(`Cannot extract url for event ${un(t)}`),null}}var ee=Le,bl=0;function Tl(){return bl>0}function WC(){bl++,setTimeout(()=>{bl--})}function Br(t,n={},i){if(typeof t!="function")return t;try{let s=t.__sentry_wrapped__;if(s)return s;if(di(t))return t}catch{return t}let a=function(){let s=Array.prototype.slice.call(arguments);try{i&&typeof i=="function"&&i.apply(this,arguments);let u=s.map(l=>Br(l,n));return t.apply(this,u)}catch(u){throw WC(),Ls(l=>{l.addEventProcessor(p=>(n.mechanism&&(Zi(p,void 0,void 0),Qn(p,n.mechanism)),p.extra={...p.extra,arguments:s},p)),to(u)}),u}};try{for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&(a[s]=t[s])}catch{}gs(a,t),Ki(t,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get(){return t.name}})}catch{}return a}function Al(t,n){let i=Ol(t,n),a={type:n&&n.name,value:KC(n)};return i.length&&(a.stacktrace={frames:i}),a.type===void 0&&a.value===""&&(a.value="Unrecoverable error caught"),a}function VC(t,n,i,a){let u=K().getClient(),l=u&&u.getOptions().normalizeDepth,p={exception:{values:[{type:qi(n)?n.constructor.name:a?"UnhandledRejection":"Error",value:`Non-Error ${a?"promise rejection":"exception"} captured with keys: ${Zu(n)}`}]},extra:{__serialized__:As(n,l)}};if(i){let m=Ol(t,i);m.length&&(p.exception.values[0].stacktrace={frames:m})}return p}function Rl(t,n){return{exception:{values:[Al(t,n)]}}}function Ol(t,n){let i=n.stacktrace||n.stack||"",a=zC(n);try{return t(i,a)}catch{}return[]}var qC=/Minified React error #\d+;/i;function zC(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(qC.test(t.message))return 1}return 0}function KC(t){let n=t&&t.message;return n?n.error&&typeof n.error.message=="string"?n.error.message:n:"No error message"}function km(t,n,i,a){let s=i&&i.syntheticException||void 0,u=Fs(t,n,s,a);return Qn(u),u.level="error",i&&i.event_id&&(u.event_id=i.event_id),_t(u)}function Fm(t,n,i="info",a,s){let u=a&&a.syntheticException||void 0,l=xl(t,n,u,s);return l.level=i,a&&a.event_id&&(l.event_id=a.event_id),_t(l)}function Fs(t,n,i,a,s){let u;if(zo(n)&&n.error)return Rl(t,n.error);if(us(n)||Hu(n)){let l=n;if("stack"in n)u=Rl(t,n);else{let p=l.name||(us(l)?"DOMError":"DOMException"),m=l.message?`${p}: ${l.message}`:p;u=xl(t,m,i,a),Zi(u,m)}return"code"in l&&(u.tags={...u.tags,"DOMException.code":`${l.code}`}),u}return qo(n)?Rl(t,n):an(n)||qi(n)?(u=VC(t,n,i,s),Qn(u,{synthetic:!0}),u):(u=xl(t,n,i,a),Zi(u,`${n}`,void 0),Qn(u,{synthetic:!0}),u)}function xl(t,n,i,a){let s={message:n};if(a&&i){let u=Ol(t,i);u.length&&(s.exception={values:[{value:n,stacktrace:{frames:u}}]})}return s}var Us=1024,Il="Breadcrumbs",Pn=class{static __initStatic(){this.id=Il}__init(){this.name=Pn.id}constructor(n){Pn.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...n}}setupOnce(){this.options.console&&Fe("console",XC),this.options.dom&&Fe("dom",ZC(this.options.dom)),this.options.xhr&&Fe("xhr",jC),this.options.fetch&&Fe("fetch",JC),this.options.history&&Fe("history",QC)}addSentryBreadcrumb(n){this.options.sentry&&K().addBreadcrumb({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:un(n)},{event:n})}};Pn.__initStatic();function ZC(t){function n(i){let a,s=typeof t=="object"?t.serializeAttribute:void 0,u=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;u&&u>Us&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`\`dom.maxStringLength\` cannot exceed ${Us}, but a value of ${u} was configured. Sentry will use ${Us} instead.`),u=Us),typeof s=="string"&&(s=[s]);try{let l=i.event;a=eb(l)?xn(l.target,{keyAttrs:s,maxStringLength:u}):xn(l,{keyAttrs:s,maxStringLength:u})}catch{a="<unknown>"}a.length!==0&&K().addBreadcrumb({category:`ui.${i.name}`,message:a},{event:i.event,name:i.name,global:i.global})}return n}function XC(t){for(let i=0;i<t.args.length;i++)if(t.args[i]==="ref=Ref<"){t.args[i+1]="viewRef";break}let n={category:"console",data:{arguments:t.args,logger:"console"},level:il(t.level),message:ms(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)n.message=`Assertion failed: ${ms(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1);else return;K().addBreadcrumb(n,{input:t.args,level:t.level})}function jC(t){let{startTimestamp:n,endTimestamp:i}=t,a=t.xhr[Jn];if(!n||!i||!a)return;let{method:s,url:u,status_code:l,body:p}=a,m={method:s,url:u,status_code:l},h={xhr:t.xhr,input:p,startTimestamp:n,endTimestamp:i};K().addBreadcrumb({category:"xhr",data:m,type:"http"},h)}function JC(t){let{startTimestamp:n,endTimestamp:i}=t;if(i&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let a=t.fetchData,s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:i};K().addBreadcrumb({category:"fetch",data:a,level:"error",type:"http"},s)}else{let a={...t.fetchData,status_code:t.response&&t.response.status},s={input:t.args,response:t.response,startTimestamp:n,endTimestamp:i};K().addBreadcrumb({category:"fetch",data:a,type:"http"},s)}}function QC(t){let n=t.from,i=t.to,a=Jo(ee.location.href),s=Jo(n),u=Jo(i);s.path||(s=a),a.protocol===u.protocol&&a.host===u.host&&(i=u.relative),a.protocol===s.protocol&&a.host===s.host&&(n=s.relative),K().addBreadcrumb({category:"navigation",data:{from:n,to:i}})}function eb(t){return t&&!!t.target}function Um(t,{metadata:n,tunnel:i,dsn:a}){let s={event_id:t.event_id,sent_at:new Date().toISOString(),...n&&n.sdk&&{sdk:{name:n.sdk.name,version:n.sdk.version}},...!!i&&!!a&&{dsn:An(a)}},u=tb(t);return On(s,[u])}function tb(t){return[{type:"user_report"},t]}var Gs=class extends mn{constructor(n){let i=ee.SENTRY_SDK_SOURCE||nl();n._metadata=n._metadata||{},n._metadata.sdk=n._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${i}:@sentry/browser`,version:ia}],version:ia},super(n),n.sendClientReports&&ee.document&&ee.document.addEventListener("visibilitychange",()=>{ee.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(n,i){return km(this._options.stackParser,n,i,this._options.attachStacktrace)}eventFromMessage(n,i="info",a){return Fm(this._options.stackParser,n,i,a,this._options.attachStacktrace)}sendEvent(n,i){let a=this.getIntegrationById(Il);a&&a.addSentryBreadcrumb&&a.addSentryBreadcrumb(n),super.sendEvent(n,i)}captureUserFeedback(n){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("SDK not enabled, will not capture user feedback.");return}let i=Um(n,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(i)}_prepareEvent(n,i,a){return n.platform=n.platform||"javascript",super._prepareEvent(n,i,a)}_flushOutcomes(){let n=this._clearOutcomes();if(n.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("Sending outcomes:",n);let i=pl(n,this._options.tunnel&&An(this._dsn));this._sendEnvelope(i)}};var oa;function Gm(){if(oa)return oa;if(Zo(ee.fetch))return oa=ee.fetch.bind(ee);let t=ee.document,n=ee.fetch;if(t&&typeof t.createElement=="function")try{let i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i);let a=i.contentWindow;a&&a.fetch&&(n=a.fetch),t.head.removeChild(i)}catch(i){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return oa=n.bind(ee)}function Hm(){oa=void 0}function $m(t,n=Gm()){let i=0,a=0;function s(u){let l=u.body.length;i+=l,a++;let p={body:u.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:i<=6e4&&a<15,...t.fetchOptions};try{return n(t.url,p).then(m=>(i-=l,a--,{statusCode:m.status,headers:{"x-sentry-rate-limits":m.headers.get("X-Sentry-Rate-Limits"),"retry-after":m.headers.get("Retry-After")}}))}catch(m){return Hm(),i-=l,a--,Nr(m)}}return no(t,s)}var nb=4;function Ym(t){function n(i){return new we((a,s)=>{let u=new XMLHttpRequest;u.onerror=s,u.onreadystatechange=()=>{u.readyState===nb&&a({statusCode:u.status,headers:{"x-sentry-rate-limits":u.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":u.getResponseHeader("Retry-After")}})},u.open("POST",t.url);for(let l in t.headers)Object.prototype.hasOwnProperty.call(t.headers,l)&&u.setRequestHeader(l,t.headers[l]);u.send(i.body)})}return no(t,n)}var Hs="?";var rb=30,ib=40,ob=50;function wl(t,n,i,a){let s={filename:t,function:n,in_app:!0};return i!==void 0&&(s.lineno=i),a!==void 0&&(s.colno=a),s}var ab=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,sb=/\((\S*)(?::(\d+))(?::(\d+))\)/,cb=t=>{let n=ab.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let u=sb.exec(n[2]);u&&(n[2]=u[1],n[3]=u[2],n[4]=u[3])}let[a,s]=Vm(n[1]||Hs,n[2]);return wl(s,a,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},ub=[rb,cb],lb=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,fb=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,pb=t=>{let n=lb.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){let u=fb.exec(n[3]);u&&(n[1]=n[1]||"eval",n[3]=u[1],n[4]=u[2],n[5]="")}let a=n[3],s=n[1]||Hs;return[s,a]=Vm(s,a),wl(a,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},db=[ob,pb],mb=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,gb=t=>{let n=mb.exec(t);return n?wl(n[2],n[1]||Hs,+n[3],n[4]?+n[4]:void 0):void 0},hb=[ib,gb];var _b=[ub,db,hb],Wm=_s(..._b),Vm=(t,n)=>{let i=t.indexOf("safari-extension")!==-1,a=t.indexOf("safari-web-extension")!==-1;return i||a?[t.indexOf("@")!==-1?t.split("@")[0]:Hs,i?`safari-extension:${n}`:`safari-web-extension:${n}`]:[t,n]};var It=class{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=It.id}__init2(){this._installFunc={onerror:yb,onunhandledrejection:Sb}}constructor(n){It.prototype.__init.call(this),It.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...n}}setupOnce(){Error.stackTraceLimit=50;let n=this._options;for(let i in n){let a=this._installFunc[i];a&&n[i]&&(Cb(i),a(),this._installFunc[i]=void 0)}}};It.__initStatic();function yb(){Fe("error",t=>{let[n,i,a]=Km();if(!n.getIntegration(It))return;let{msg:s,url:u,line:l,column:p,error:m}=t;if(Tl()||m&&m.__sentry_own_request__)return;let h=m===void 0&&ht(s)?Eb(s,u,l,p):qm(Fs(i,m||s,void 0,a,!1),u,l,p);h.level="error",zm(n,m,h,"onerror")})}function Sb(){Fe("unhandledrejection",t=>{let[n,i,a]=Km();if(!n.getIntegration(It))return;let s=t;try{"reason"in t?s=t.reason:"detail"in t&&"reason"in t.detail&&(s=t.detail.reason)}catch{}if(Tl()||s&&s.__sentry_own_request__)return!0;let u=Vi(s)?vb(s):Fs(i,s,void 0,a,!0);u.level="error",zm(n,s,u,"onunhandledrejection")})}function vb(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Eb(t,n,i,a){let s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,u=zo(t)?t.message:t,l="Error",p=u.match(s);return p&&(l=p[1],u=p[2]),qm({exception:{values:[{type:l,value:u}]}},n,i,a)}function qm(t,n,i,a){let s=t.exception=t.exception||{},u=s.values=s.values||[],l=u[0]=u[0]||{},p=l.stacktrace=l.stacktrace||{},m=p.frames=p.frames||[],h=isNaN(parseInt(a,10))?void 0:a,S=isNaN(parseInt(i,10))?void 0:i,v=ht(n)&&n.length>0?n:Vu();return m.length===0&&m.push({colno:h,filename:v,function:"?",in_app:!0,lineno:S}),t}function Cb(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`Global Handler attached: ${t}`)}function zm(t,n,i,a){Qn(i,{handled:!1,type:a}),t.captureEvent(i,{originalException:n})}function Km(){let t=K(),n=t.getClient(),i=n&&n.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,i.stackParser,i.attachStacktrace]}var bb=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Nn=class{static __initStatic(){this.id="TryCatch"}__init(){this.name=Nn.id}constructor(n){Nn.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...n}}setupOnce(){this._options.setTimeout&&ke(ee,"setTimeout",Zm),this._options.setInterval&&ke(ee,"setInterval",Zm),this._options.requestAnimationFrame&&ke(ee,"requestAnimationFrame",Tb),this._options.XMLHttpRequest&&"XMLHttpRequest"in ee&&ke(XMLHttpRequest.prototype,"send",Rb);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:bb).forEach(xb)}};Nn.__initStatic();function Zm(t){return function(...n){let i=n[0];return n[0]=Br(i,{mechanism:{data:{function:zt(t)},handled:!0,type:"instrument"}}),t.apply(this,n)}}function Tb(t){return function(n){return t.apply(this,[Br(n,{mechanism:{data:{function:"requestAnimationFrame",handler:zt(t)},handled:!0,type:"instrument"}})])}}function Rb(t){return function(...n){let i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in i&&typeof i[s]=="function"&&ke(i,s,function(u){let l={mechanism:{data:{function:s,handler:zt(u)},handled:!0,type:"instrument"}},p=di(u);return p&&(l.mechanism.data.handler=zt(p)),Br(u,l)})}),t.apply(this,n)}}function xb(t){let n=ee,i=n[t]&&n[t].prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(ke(i,"addEventListener",function(a){return function(s,u,l){try{typeof u.handleEvent=="function"&&(u.handleEvent=Br(u.handleEvent,{mechanism:{data:{function:"handleEvent",handler:zt(u),target:t},handled:!0,type:"instrument"}}))}catch{}return a.apply(this,[s,Br(u,{mechanism:{data:{function:"addEventListener",handler:zt(u),target:t},handled:!0,type:"instrument"}}),l])}}),ke(i,"removeEventListener",function(a){return function(s,u,l){let p=u;try{let m=p&&p.__sentry_wrapped__;m&&a.call(this,s,m,l)}catch{}return a.call(this,s,p,l)}}))}var Ab="cause",Ob=5,gn=class{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=gn.id}constructor(n={}){gn.prototype.__init.call(this),this._key=n.key||Ab,this._limit=n.limit||Ob}setupOnce(){let n=K().getClient();n&&Mr((i,a)=>{let s=K().getIntegration(gn);return s?Ib(n.getOptions().stackParser,s._key,s._limit,i,a):i})}};gn.__initStatic();function Ib(t,n,i,a,s){if(!a.exception||!a.exception.values||!s||!qt(s.originalException,Error))return a;let u=Xm(t,i,s.originalException,n);return a.exception.values=[...u,...a.exception.values],a}function Xm(t,n,i,a,s=[]){if(!qt(i[a],Error)||s.length+1>=n)return s;let u=Al(t,i[a]);return Xm(t,n,i[a],a,[u,...s])}var hn=class{constructor(){hn.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=hn.id}setupOnce(){Mr(n=>{if(K().getIntegration(hn)){if(!ee.navigator&&!ee.location&&!ee.document)return n;let i=n.request&&n.request.url||ee.location&&ee.location.href,{referrer:a}=ee.document||{},{userAgent:s}=ee.navigator||{},u={...n.request&&n.request.headers,...a&&{Referer:a},...s&&{"User-Agent":s}},l={...n.request,...i&&{url:i},headers:u};return{...n,request:l}}return n})}};hn.__initStatic();var _n=class{constructor(){_n.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=_n.id}setupOnce(n,i){let a=s=>{if(s.type)return s;let u=i().getIntegration(_n);if(u){try{if(wb(s,u._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return u._previousEvent=s}return u._previousEvent=s}return s};a.id=this.name,n(a)}};_n.__initStatic();function wb(t,n){return n?!!(Pb(t,n)||Nb(t,n)):!1}function Pb(t,n){let i=t.message,a=n.message;return!(!i&&!a||i&&!a||!i&&a||i!==a||!eg(t,n)||!Qm(t,n))}function Nb(t,n){let i=jm(n),a=jm(t);return!(!i||!a||i.type!==a.type||i.value!==a.value||!eg(t,n)||!Qm(t,n))}function Qm(t,n){let i=Jm(t),a=Jm(n);if(!i&&!a)return!0;if(i&&!a||!i&&a||(i=i,a=a,a.length!==i.length))return!1;for(let s=0;s<a.length;s++){let u=a[s],l=i[s];if(u.filename!==l.filename||u.lineno!==l.lineno||u.colno!==l.colno||u.function!==l.function)return!1}return!0}function eg(t,n){let i=t.fingerprint,a=n.fingerprint;if(!i&&!a)return!0;if(i&&!a||!i&&a)return!1;i=i,a=a;try{return i.join("")===a.join("")}catch{return!1}}function jm(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Jm(t){let n=t.exception;if(n)try{return n.values[0].stacktrace.frames}catch{return}}var ng=[new gi.InboundFilters,new gi.FunctionToString,new Nn,new Pn,new It,new gn,new _n,new hn];function Pl(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=ng),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),ee.SENTRY_RELEASE&&ee.SENTRY_RELEASE.id&&(t.release=ee.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);let n={...t,stackParser:ju(t.stackParser||Wm),integrations:vl(t),transport:t.transport||(ys()?$m:Ym)};Cl(Gs,n),t.autoSessionTracking&&Mb()}function tg(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function Mb(){if(typeof ee.document>"u"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let t=K();t.captureSession&&(tg(t),Fe("history",({from:n,to:i})=>{n===void 0||n===i||tg(K())}))}var Nl={};Gu(Nl,{Breadcrumbs:()=>Pn,Dedupe:()=>_n,GlobalHandlers:()=>It,HttpContext:()=>hn,LinkedErrors:()=>gn,TryCatch:()=>Nn});var ie=Le;function rg(){ie&&ie.document?ie.document.addEventListener("visibilitychange",()=>{let t=dn();if(ie.document.hidden&&t){let n="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(n),t.setTag("visibilitychange","document.hidden"),t.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var ro=(t,n,i)=>{let a,s;return u=>{n.value>=0&&(u||i)&&(s=n.value-(a||0),(s||a===void 0)&&(a=n.value,n.delta=s,t(n)))}};var ig=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Db=()=>{let t=ie.performance.timing,n=ie.performance.navigation.type,i={entryType:"navigation",startTime:0,type:n==2?"back_forward":n===1?"reload":"navigate"};for(let a in t)a!=="navigationStart"&&a!=="toJSON"&&(i[a]=Math.max(t[a]-t.navigationStart,0));return i},$s=()=>ie.__WEB_VITALS_POLYFILL__?ie.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Db()):ie.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var Ys=()=>{let t=$s();return t&&t.activationStart||0};var io=(t,n)=>{let i=$s(),a="navigate";return i&&(ie.document.prerendering||Ys()>0?a="prerender":a=i.type.replace(/_/g,"-")),{name:t,value:typeof n>"u"?-1:n,rating:"good",delta:0,entries:[],id:ig(),navigationType:a}};var ir=(t,n,i)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){let a=new PerformanceObserver(s=>{n(s.getEntries())});return a.observe(Object.assign({type:t,buffered:!0},i||{})),a}}catch{}};var Lr=(t,n)=>{let i=a=>{(a.type==="pagehide"||ie.document.visibilityState==="hidden")&&(t(a),n&&(removeEventListener("visibilitychange",i,!0),removeEventListener("pagehide",i,!0)))};addEventListener("visibilitychange",i,!0),addEventListener("pagehide",i,!0)};var og=t=>{let n=io("CLS",0),i,a=0,s=[],u=p=>{p.forEach(m=>{if(!m.hadRecentInput){let h=s[0],S=s[s.length-1];a&&s.length!==0&&m.startTime-S.startTime<1e3&&m.startTime-h.startTime<5e3?(a+=m.value,s.push(m)):(a=m.value,s=[m]),a>n.value&&(n.value=a,n.entries=s,i&&i())}})},l=ir("layout-shift",u);if(l){i=ro(t,n);let p=()=>{u(l.takeRecords()),i(!0)};return Lr(p),p}};var Ws=-1,Bb=()=>ie.document.visibilityState==="hidden"&&!ie.document.prerendering?0:1/0,Lb=()=>{Lr(({timeStamp:t})=>{Ws=t},!0)},oo=()=>(Ws<0&&(Ws=Bb(),Lb()),{get firstHiddenTime(){return Ws}});var ag=t=>{let n=oo(),i=io("FID"),a,s=p=>{p.startTime<n.firstHiddenTime&&(i.value=p.processingStart-p.startTime,i.entries.push(p),a(!0))},u=p=>{p.forEach(s)},l=ir("first-input",u);a=ro(t,i),l&&Lr(()=>{u(l.takeRecords()),l.disconnect()},!0)};var sg={},cg=t=>{let n=oo(),i=io("LCP"),a,s=l=>{let p=l[l.length-1];if(p){let m=Math.max(p.startTime-Ys(),0);m<n.firstHiddenTime&&(i.value=m,i.entries=[p],a())}},u=ir("largest-contentful-paint",s);if(u){a=ro(t,i);let l=()=>{sg[i.id]||(s(u.takeRecords()),u.disconnect(),sg[i.id]=!0,a(!0))};return["keydown","click"].forEach(p=>{addEventListener(p,l,{once:!0,capture:!0})}),Lr(l,!0),l}};function Vs(t){return typeof t=="number"&&isFinite(t)}function hi(t,{startTimestamp:n,...i}){return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...i})}function $e(t){return t/1e3}function lg(){return ie&&ie.addEventListener&&ie.performance}var ug=0,Pe={},Mn,aa;function fg(){let t=lg();if(t&&pn){t.mark&&ie.performance.mark("sentry-tracing-init"),Ub();let n=kb(),i=Fb();return()=>{n&&n(),i&&i()}}return()=>{}}function pg(){ir("longtask",n=>{for(let i of n){let a=dn();if(!a)return;let s=$e(pn+i.startTime),u=$e(i.duration);a.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:s,endTimestamp:s+u})}})}function dg(){ir("event",n=>{for(let i of n){let a=dn();if(!a)return;if(i.name==="click"){let s=$e(pn+i.startTime),u=$e(i.duration);a.startChild({description:xn(i.target),op:`ui.interaction.${i.name}`,startTimestamp:s,endTimestamp:s+u})}}},{durationThreshold:0})}function kb(){return og(t=>{let n=t.entries.pop();n&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding CLS"),Pe.cls={value:t.value,unit:""},aa=n)})}function Fb(){return cg(t=>{let n=t.entries.pop();n&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding LCP"),Pe.lcp={value:t.value,unit:"millisecond"},Mn=n)})}function Ub(){ag(t=>{let n=t.entries.pop();if(!n)return;let i=$e(pn),a=$e(n.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding FID"),Pe.fid={value:t.value,unit:"millisecond"},Pe["mark.fid"]={value:i+a,unit:"second"}})}function mg(t){let n=lg();if(!n||!ie.performance.getEntries||!pn)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Tracing] Adding & adjusting spans using Performance API");let i=$e(pn),a=n.getEntries(),s,u;if(a.slice(ug).forEach(l=>{let p=$e(l.startTime),m=$e(l.duration);if(!(t.op==="navigation"&&i+p<t.startTimestamp))switch(l.entryType){case"navigation":{Hb(t,l,i),s=i+$e(l.responseStart),u=i+$e(l.requestStart);break}case"mark":case"paint":case"measure":{Gb(t,l,p,m,i);let h=oo(),S=l.startTime<h.firstHiddenTime;l.name==="first-paint"&&S&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding FP"),Pe.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&S&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding FCP"),Pe.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{let h=l.name.replace(ie.location.origin,"");Yb(t,l,h,p,m,i);break}}}),ug=Math.max(a.length-1,0),Wb(t),t.op==="pageload"){typeof s=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding TTFB"),Pe.ttfb={value:(s-t.startTimestamp)*1e3,unit:"millisecond"},typeof u=="number"&&u<=s&&(Pe["ttfb.requestTime"]={value:(s-u)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(p=>{if(!Pe[p]||i>=t.startTimestamp)return;let m=Pe[p].value,h=i+$e(m),S=Math.abs((h-t.startTimestamp)*1e3),v=S-m;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Measurements] Normalized ${p} from ${m} to ${S} (${v})`),Pe[p].value=S});let l=Pe["mark.fid"];l&&Pe.fid&&(hi(t,{description:"first input delay",endTimestamp:l.value+$e(Pe.fid.value),op:"ui.action",startTimestamp:l.value}),delete Pe["mark.fid"]),"fcp"in Pe||delete Pe.cls,Object.keys(Pe).forEach(p=>{t.setMeasurement(p,Pe[p].value,Pe[p].unit)}),Vb(t)}Mn=void 0,aa=void 0,Pe={}}function Gb(t,n,i,a,s){let u=s+i,l=u+a;return hi(t,{description:n.name,endTimestamp:l,op:n.entryType,startTimestamp:u}),u}function Hb(t,n,i){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(a=>{qs(t,n,a,i)}),qs(t,n,"secureConnection",i,"TLS/SSL","connectEnd"),qs(t,n,"fetch",i,"cache","domainLookupStart"),qs(t,n,"domainLookup",i,"DNS"),$b(t,n,i)}function qs(t,n,i,a,s,u){let l=u?n[u]:n[`${i}End`],p=n[`${i}Start`];!p||!l||hi(t,{op:"browser",description:s||i,startTimestamp:a+$e(p),endTimestamp:a+$e(l)})}function $b(t,n,i){hi(t,{op:"browser",description:"request",startTimestamp:i+$e(n.requestStart),endTimestamp:i+$e(n.responseEnd)}),hi(t,{op:"browser",description:"response",startTimestamp:i+$e(n.responseStart),endTimestamp:i+$e(n.responseEnd)})}function Yb(t,n,i,a,s,u){if(n.initiatorType==="xmlhttprequest"||n.initiatorType==="fetch")return;let l={};"transferSize"in n&&(l["http.response_transfer_size"]=n.transferSize),"encodedBodySize"in n&&(l["http.response_content_length"]=n.encodedBodySize),"decodedBodySize"in n&&(l["http.decoded_response_content_length"]=n.decodedBodySize),"renderBlockingStatus"in n&&(l["resource.render_blocking_status"]=n.renderBlockingStatus);let p=u+a,m=p+s;hi(t,{description:i,endTimestamp:m,op:n.initiatorType?`resource.${n.initiatorType}`:"resource.other",startTimestamp:p,data:l})}function Wb(t){let n=ie.navigator;if(!n)return;let i=n.connection;i&&(i.effectiveType&&t.setTag("effectiveConnectionType",i.effectiveType),i.type&&t.setTag("connectionType",i.type),Vs(i.rtt)&&(Pe["connection.rtt"]={value:i.rtt,unit:"millisecond"})),Vs(n.deviceMemory)&&t.setTag("deviceMemory",`${n.deviceMemory} GB`),Vs(n.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(n.hardwareConcurrency))}function Vb(t){Mn&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding LCP Data"),Mn.element&&t.setTag("lcp.element",xn(Mn.element)),Mn.id&&t.setTag("lcp.id",Mn.id),Mn.url&&t.setTag("lcp.url",Mn.url.trim().slice(0,200)),t.setTag("lcp.size",Mn.size)),aa&&aa.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding CLS Data"),aa.sources.forEach((n,i)=>t.setTag(`cls.source.${i+1}`,xn(n.node))))}var Ml=["localhost",/^\/(?!\/)/],sa={traceFetch:!0,traceXHR:!0,tracingOrigins:Ml,tracePropagationTargets:Ml};function Dl(t){let{traceFetch:n,traceXHR:i,tracePropagationTargets:a,tracingOrigins:s,shouldCreateSpanForRequest:u}={traceFetch:sa.traceFetch,traceXHR:sa.traceXHR,...t},l=typeof u=="function"?u:h=>!0,p=h=>qb(h,a||s),m={};n&&Fe("fetch",h=>{zb(h,l,p,m)}),i&&Fe("xhr",h=>{Zb(h,l,p,m)})}function qb(t,n){return Pr(t,n||Ml)}function zb(t,n,i,a){if(!Ji()||!(t.fetchData&&n(t.fetchData.url)))return;if(t.endTimestamp){let p=t.fetchData.__span;if(!p)return;let m=a[p];if(m){if(t.response){m.setHttpStatus(t.response.status);let h=t.response&&t.response.headers&&t.response.headers.get("content-length"),S=parseInt(h);S>0&&m.setData("http.response_content_length",S)}else t.error&&m.setStatus("internal_error");m.finish(),delete a[p]}return}let s=K().getScope(),u=s&&s.getSpan(),l=u&&u.transaction;if(u&&l){let{method:p,url:m}=t.fetchData,h=u.startChild({data:{url:m,type:"fetch","http.method":p},description:`${p} ${m}`,op:"http.client"});t.fetchData.__span=h.spanId,a[h.spanId]=h;let S=t.args[0];t.args[1]=t.args[1]||{};let v=t.args[1];i(t.fetchData.url)&&(v.headers=Kb(S,l.getDynamicSamplingContext(),h,v))}}function Kb(t,n,i,a){let s=Ps(n),u=i.toTraceparent(),l=typeof Request<"u"&&qt(t,Request)?t.headers:a.headers;if(l)if(typeof Headers<"u"&&qt(l,Headers)){let p=new Headers(l);return p.append("sentry-trace",u),s&&p.append(ta,s),p}else if(Array.isArray(l)){let p=[...l,["sentry-trace",u]];return s&&p.push([ta,s]),p}else{let p="baggage"in l?l.baggage:void 0,m=[];return Array.isArray(p)?m.push(...p):p&&m.push(p),s&&m.push(s),{...l,"sentry-trace":u,baggage:m.length>0?m.join(","):void 0}}else return{"sentry-trace":u,baggage:s}}function Zb(t,n,i,a){let s=t.xhr,u=s&&s[Jn];if(!Ji()||s&&s.__sentry_own_request__||!(s&&u&&n(u.url)))return;if(t.endTimestamp){let h=s.__sentry_xhr_span_id__;if(!h)return;let S=a[h];S&&(S.setHttpStatus(u.status_code),S.finish(),delete a[h]);return}let l=K().getScope(),p=l&&l.getSpan(),m=p&&p.transaction;if(p&&m){let h=p.startChild({data:{...u.data,type:"xhr","http.method":u.method,url:u.url},description:`${u.method} ${u.url}`,op:"http.client"});if(s.__sentry_xhr_span_id__=h.spanId,a[s.__sentry_xhr_span_id__]=h,s.setRequestHeader&&i(u.url))try{s.setRequestHeader("sentry-trace",h.toTraceparent());let S=m.getDynamicSamplingContext(),v=Ps(S);v&&s.setRequestHeader(ta,v)}catch{}}}function gg(t,n=!0,i=!0){if(!ie||!ie.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("Could not initialize routing instrumentation due to invalid location");return}let a=ie.location.href,s;n&&(s=t({name:ie.location.pathname,startTimestamp:pn?pn/1e3:void 0,op:"pageload",metadata:{source:"url"}})),i&&Fe("history",({to:u,from:l})=>{if(l===void 0&&a&&a.indexOf(u)!==-1){a=void 0;return}l!==u&&(a=void 0,s&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Finishing current transaction with op: ${s.op}`),s.finish()),s=t({name:ie.location.pathname,op:"navigation",metadata:{source:"url"}}))})}var _g="BrowserTracing",Xb={...eo,markBackgroundTransactions:!0,routingInstrumentation:gg,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...sa},kr=class{__init(){this.name=_g}constructor(n){kr.prototype.__init.call(this),Ds(),this.options={...Xb,...n},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),n&&!n.tracePropagationTargets&&n.tracingOrigins&&(this.options.tracePropagationTargets=n.tracingOrigins),this._collectWebVitals=fg(),this.options.enableLongTask&&pg(),this.options._experiments.enableInteractions&&dg()}setupOnce(n,i){this._getCurrentHub=i;let{routingInstrumentation:a,startTransactionOnLocationChange:s,startTransactionOnPageLoad:u,markBackgroundTransactions:l,traceFetch:p,traceXHR:m,tracePropagationTargets:h,shouldCreateSpanForRequest:S,_experiments:v}=this.options;a(I=>{let P=this._createRouteTransaction(I);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(P,I,i),P},u,s),l&&rg(),v.enableInteractions&&this._registerInteractionListener(),Dl({traceFetch:p,traceXHR:m,tracePropagationTargets:h,shouldCreateSpanForRequest:S})}_createRouteTransaction(n){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Did not create ${n.op} transaction because _getCurrentHub is invalid.`);return}let{beforeNavigate:i,idleTimeout:a,finalTimeout:s,heartbeatInterval:u}=this.options,l=n.op==="pageload",p=l?hg("sentry-trace"):null,m=l?hg("baggage"):null,h=p?ea(p):void 0,S=m?hl(m):void 0,v={...n,...h,metadata:{...n.metadata,dynamicSamplingContext:h&&!S?{}:S},trimEnd:!0},I=typeof i=="function"?i(v):v,P=I===void 0?{...v,sampled:!1}:I;P.metadata=P.name!==v.name?{...P.metadata,source:"custom"}:P.metadata,this._latestRouteName=P.name,this._latestRouteSource=P.metadata&&P.metadata.source,P.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Will not send ${P.op} transaction because of beforeNavigate.`),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`[Tracing] Starting ${P.op} transaction on scope`);let L=this._getCurrentHub(),{location:Y}=ie,ce=Ms(L,P,a,s,!0,{location:Y},u);return ce.registerBeforeFinishCallback(X=>{this._collectWebVitals(),mg(X)}),ce}_registerInteractionListener(){let n,i=()=>{let{idleTimeout:a,finalTimeout:s,heartbeatInterval:u}=this.options,l="ui.action.click",p=dn();if(p&&p.op&&["navigation","pageload"].includes(p.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Did not create ${l} transaction because a pageload or navigation transaction is in progress.`);return}if(n&&(n.setFinishReason("interactionInterrupted"),n.finish(),n=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Did not create ${l} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}let m=this._getCurrentHub(),{location:h}=ie,S={name:this._latestRouteName,op:l,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};n=Ms(m,S,a,s,!0,{location:h},u)};["click"].forEach(a=>{addEventListener(a,i,{once:!1,capture:!0})})}};function hg(t){let n=qu(`meta[name=${t}]`);return n?n.getAttribute("content"):null}var yg={};ee.Sentry&&ee.Sentry.Integrations&&(yg=ee.Sentry.Integrations);var W4={...yg,...gi,...Nl};var jb=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};jb.SENTRY_RELEASE={id:"3.1.2--prototype.2"};var Sg=!1;function Jb(){Pl({dsn:"https://903950caba7d4802afe6c1e985ad5ebd@o128085.ingest.sentry.io/4504854496149504",release:"3.1.2--prototype.2",integrations:[new kr],tracesSampleRate:1}),Sg=!0}var Xt=t=>(Sg||Jb(),to(t));var xg=ge(require("react"));var Ll="[Duffel Ancillaries] ",Eg="duffel-ancillaries-logger-state",vg=!1,Qb=t=>{localStorage.setItem(Eg,t.toString())},Cg=()=>localStorage.getItem(Eg)==="true",zs=t=>{Qb(t),t&&!vg&&console.info(Ll,`
|
|
11
|
+
`),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let r=this.getStackTop().scope,n=r.getSession();n&&pa(n),this._sendSessionUpdate(),r.setSession()}startSession(e){let{scope:r,client:n}=this.getStackTop(),{release:i,environment:o=er}=n&&n.getOptions()||{},{userAgent:a}=k.navigator||{},s=ua({release:i,environment:o,user:r.getUser(),...a&&{userAgent:a},...e}),c=r.getSession&&r.getSession();return c&&c.status==="ok"&&ct(c,{status:"exited"}),this.endSession(),r.setSession(s),s}shouldSendDefaultPii(){let e=this.getClient(),r=e&&e.getOptions();return!!(r&&r.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:r}=this.getStackTop(),n=e.getSession();n&&r&&r.captureSession&&r.captureSession(n)}_withClient(e){let{scope:r,client:n}=this.getStackTop();n&&e(n,r)}_callExtensionMethod(e,...r){let i=Gt().__SENTRY__;if(i&&i.extensions&&typeof i.extensions[e]=="function")return i.extensions[e].apply(this,r);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function Gt(){return k.__SENTRY__=k.__SENTRY__||{extensions:{},hub:void 0},k}function An(t){let e=Gt(),r=Gr(e);return Wi(e,t),r}function S(){let t=Gt();if(t.__SENTRY__&&t.__SENTRY__.acs){let e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return uf(t)}function uf(t=Gt()){return(!pf(t)||Gr(t).isOlderThan(ga))&&Wi(t,new tr),Gr(t)}function pf(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Gr(t){return Ft("hub",()=>new tr,t)}function Wi(t,e){if(!t)return!1;let r=t.__SENTRY__=t.__SENTRY__||{};return r.hub=e,!0}function rr(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let e=S().getClient(),r=t||e&&e.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}function Ne(t){return(t||S()).getScope().getTransaction()}var _a=!1;function ha(){_a||(_a=!0,F("error",ji),F("unhandledrejection",ji))}function ji(){let t=Ne();if(t){let e="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}ji.tag="sentry_tracingErrorCallback";var Rt=class{__init(){this.spans=[]}constructor(e=1e3){Rt.prototype.__init.call(this),this._maxlen=e}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}},ge=class{__init2(){this.traceId=ce()}__init3(){this.spanId=ce().substring(16)}__init4(){this.startTimestamp=Oe()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(e){if(ge.prototype.__init2.call(this),ge.prototype.__init3.call(this),ge.prototype.__init4.call(this),ge.prototype.__init5.call(this),ge.prototype.__init6.call(this),ge.prototype.__init7.call(this),!e)return this;e.traceId&&(this.traceId=e.traceId),e.spanId&&(this.spanId=e.spanId),e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.data&&(this.data=e.data),e.tags&&(this.tags=e.tags),e.status&&(this.status=e.status),e.startTimestamp&&(this.startTimestamp=e.startTimestamp),e.endTimestamp&&(this.endTimestamp=e.endTimestamp),e.instrumenter&&(this.instrumenter=e.instrumenter)}startChild(e){let r=new ge({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r),r.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&r.transaction){let n=e&&e.op||"< unknown op >",i=r.transaction.name||"< unknown name >",o=r.transaction.spanId,a=`[Tracing] Starting '${n}' span on transaction '${i}' (${o}).`;r.transaction.metadata.spanMetadata[r.spanId]={logMessage:a},p.log(a)}return r}setTag(e,r){return this.tags={...this.tags,[e]:r},this}setData(e,r){return this.data={...this.data,[e]:r},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e));let r=ya(e);return r!=="unknown_error"&&this.setStatus(r),this}isSuccess(){return this.status==="ok"}finish(e){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:r}=this.transaction.metadata.spanMetadata[this.spanId];r&&p.log(r.replace("Starting","Finishing"))}this.endTimestamp=typeof e=="number"?e:Oe()}toTraceparent(){let e="";return this.sampled!==void 0&&(e=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${e}`}toContext(){return se({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return se({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return se({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}};function ya(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}var Ve=class extends ge{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(e,r){super(e),Ve.prototype.__init.call(this),Ve.prototype.__init2.call(this),Ve.prototype.__init3.call(this),this._hub=r||S(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;let n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,r="custom"){this._name=e,this.metadata.source=r}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new Rt(e)),this.spanRecorder.add(this)}setContext(e,r){r===null?delete this._contexts[e]:this._contexts[e]=r}setMeasurement(e,r,n=""){this._measurements[e]={value:r,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);let r=this._hub.getClient();if(r&&r.emit&&r.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),r&&r.recordDroppedEvent("sample_rate","transaction");return}let n=this.spanRecorder?this.spanRecorder.spans.filter(s=>s!==this&&s.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((s,c)=>s.endTimestamp&&c.endTimestamp?s.endTimestamp>c.endTimestamp?s:c:s).endTimestamp);let i=this.metadata,o={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...i,dynamicSamplingContext:this.getDynamicSamplingContext()},...i.source&&{transaction_info:{source:i.source}}};return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),o.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(o)}toContext(){let e=super.toContext();return se({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let e=this._hub||S(),r=e&&e.getClient();if(!r)return{};let{environment:n,release:i}=r.getOptions()||{},{publicKey:o}=r.getDsn()||{},a=this.metadata.sampleRate,s=a!==void 0?a.toString():void 0,{segment:c}=e.getScope().getUser()||{},l=this.metadata.source,f=l&&l!=="url"?this.name:void 0,u=se({environment:n||er,release:i,transaction:f,user_segment:c,public_key:o,trace_id:this.traceId,sample_rate:s});return r.emit&&r.emit("createDsc",u),u}setHub(e){this._hub=e}};var ir={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},mf="finishReason",nr=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],qi=class extends Rt{constructor(e,r,n,i){super(i),this._pushActivity=e,this._popActivity=r,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=r=>{e.endTimestamp=typeof r=="number"?r:Oe(),this._popActivity(e.spanId)},e.endTimestamp===void 0&&this._pushActivity(e.spanId)),super.add(e)}},_e=class extends Ve{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=nr[4]}constructor(e,r,n=ir.idleTimeout,i=ir.finalTimeout,o=ir.heartbeatInterval,a=!1){super(e,r),this._idleHub=r,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=o,this._onScope=a,_e.prototype.__init.call(this),_e.prototype.__init2.call(this),_e.prototype.__init3.call(this),_e.prototype.__init4.call(this),_e.prototype.__init5.call(this),_e.prototype.__init6.call(this),a&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),r.configureScope(s=>s.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=nr[3],this.finish())},this._finalTimeout)}finish(e=Oe()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(mf,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] finishing IdleTransaction",new Date(e*1e3).toISOString(),this.op);for(let r of this._beforeFinishCallbacks)r(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanId===this.spanId)return!0;r.endTimestamp||(r.endTimestamp=e,r.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));let n=r.startTimestamp<e;return n||(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(r,void 0,2)),n}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] No active IdleTransaction");if(this._onScope){let r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){let r=i=>{this._finished||this._pushActivity(i)},n=i=>{this._finished||this._popActivity(i)};this.spanRecorder=new qi(r,n,this.spanId,e),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:r}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=r===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=nr[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=nr[1],this.finish(e))},this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] popActivity ${e}`),delete this.activities[e],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let r=Oe();this._idleTimeoutCanceledPermanently?(this._finishReason=nr[5],this.finish(r)):this._restartIdleTimeout(r+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=nr[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};function gf(){let e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function Sa(t,e,r){if(!rr(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let n;return typeof e.tracesSampler=="function"?(n=e.tracesSampler(r),t.setMetadata({sampleRate:Number(n)})):r.parentSampled!==void 0?n=r.parentSampled:typeof e.tracesSampleRate<"u"?(n=e.tracesSampleRate,t.setMetadata({sampleRate:Number(n)})):(n=1,t.setMetadata({sampleRate:n})),_f(n)?n?(t.sampled=Math.random()<n,t.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),t)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),t.sampled=!1,t):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function _f(t){return Mr(t)||!(typeof t=="number"||typeof t=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t<0||t>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function hf(t,e){let r=this.getClient(),n=r&&r.getOptions()||{},i=n.instrumenter||"sentry",o=t.instrumenter||"sentry";i!==o&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`A transaction was started with instrumenter=\`${o}\`, but the SDK is configured with the \`${i}\` instrumenter.
|
|
12
|
+
The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),t.sampled=!1);let a=new Ve(t,this);return a=Sa(a,n,{parentSampled:t.parentSampled,transactionContext:t,...e}),a.sampled&&a.initSpanRecorder(n._experiments&&n._experiments.maxSpans),r&&r.emit&&r.emit("startTransaction",a),a}function Mn(t,e,r,n,i,o,a){let s=t.getClient(),c=s&&s.getOptions()||{},l=new _e(e,t,r,n,a,i);return l=Sa(l,c,{parentSampled:e.parentSampled,transactionContext:e,...o}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),s&&s.emit&&s.emit("startTransaction",l),l}function Dn(){let t=Gt();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=hf),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=gf),ha())}function or(t,e){return S().captureException(t,{captureContext:e})}function Hr(t){S().addBreadcrumb(t)}function wn(t,e){S().setContext(t,e)}function Bn(t){S().withScope(t)}var yf="7";function Sf(t){let e=t.protocol?`${t.protocol}:`:"",r=t.port?`:${t.port}`:"";return`${e}//${t.host}${r}${t.path?`/${t.path}`:""}/api/`}function Ef(t){return`${Sf(t)}${t.projectId}/envelope/`}function vf(t,e){return bi({sentry_key:t.publicKey,sentry_version:yf,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Ea(t,e={}){let r=typeof e=="string"?e:e.tunnel,n=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return r||`${Ef(t)}?${vf(t,n)}`}function bf(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function va(t,e,r,n){let i=Nn(r),o={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!n&&{dsn:Ye(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return $e(o,[a])}function ba(t,e,r,n){let i=Nn(r),o=t.type&&t.type!=="replay_event"?t.type:"event";bf(t,r&&r.sdk);let a=Ui(t,i,n,e);return delete t.sdkProcessingMetadata,$e(a,[[{type:o},t]])}var Ca=[];function Cf(t){let e={};return t.forEach(r=>{let{name:n}=r,i=e[n];i&&!i.isDefaultInstance&&r.isDefaultInstance||(e[n]=r)}),Object.keys(e).map(r=>e[r])}function zi(t){let e=t.defaultIntegrations||[],r=t.integrations;e.forEach(a=>{a.isDefaultInstance=!0});let n;Array.isArray(r)?n=[...e,...r]:typeof r=="function"?n=Br(r(e)):n=e;let i=Cf(n),o=Tf(i,a=>a.name==="Debug");if(o!==-1){let[a]=i.splice(o,1);i.push(a)}return i}function Ta(t){let e={};return t.forEach(r=>{r&&Zi(r,e)}),e}function Zi(t,e){e[t.name]=t,Ca.indexOf(t.name)===-1&&(t.setupOnce(Tt,S),Ca.push(t.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Integration installed: ${t.name}`))}function Tf(t,e){for(let r=0;r<t.length;r++)if(e(t[r])===!0)return r;return-1}function xa(t,e,r,n){let{normalizeDepth:i=3,normalizeMaxBreadth:o=1e3}=t,a={...e,event_id:e.event_id||r.event_id||ce(),timestamp:e.timestamp||st()},s=r.integrations||t.integrations.map(f=>f.name);Rf(a,t),Of(a,s),e.type===void 0&&xf(a,t.stackParser);let c=n;r.captureContext&&(c=le.clone(c).update(r.captureContext));let l=ie(a);if(c){if(c.getAttachments){let f=[...r.attachments||[],...c.getAttachments()];f.length&&(r.attachments=f)}l=c.applyToEvent(a,r)}return l.then(f=>typeof i=="number"&&i>0?Pf(f,i,o):f)}function Rf(t,e){let{environment:r,release:n,dist:i,maxValueLength:o=250}=e;"environment"in t||(t.environment="environment"in e?r:er),t.release===void 0&&n!==void 0&&(t.release=n),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=vt(t.message,o));let a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=vt(a.value,o));let s=t.request;s&&s.url&&(s.url=vt(s.url,o))}var Ra=new WeakMap;function xf(t,e){let r=k._sentryDebugIds;if(!r)return;let n,i=Ra.get(e);i?n=i:(n=new Map,Ra.set(e,n));let o=Object.keys(r).reduce((c,l)=>{let f,u=n.get(l);u?f=u:(f=e(l),n.set(l,f));for(let _=f.length-1;_>=0;_--){let h=f[_];if(h.filename){c[h.filename]=r[l];break}}return c},{}),a=new Set;try{t.exception.values.forEach(c=>{c.stacktrace.frames.forEach(l=>{l.filename&&a.add(l.filename)})})}catch{}t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let s=t.debug_meta.images;a.forEach(c=>{o[c]&&s.push({type:"sourcemap",code_file:c,debug_id:o[c]})})}function Of(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Pf(t,e,r){if(!t)return null;let n={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>({...i,...i.data&&{data:xe(i.data,e,r)}}))},...t.user&&{user:xe(t.user,e,r)},...t.contexts&&{contexts:xe(t.contexts,e,r)},...t.extra&&{extra:xe(t.extra,e,r)}};return t.contexts&&t.contexts.trace&&n.contexts&&(n.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(n.contexts.trace.data=xe(t.contexts.trace.data,e,r))),t.spans&&(n.spans=t.spans.map(i=>(i.data&&(i.data=xe(i.data,e,r)),i))),n}var Oa="Not capturing exception because it's already been captured.",Ie=class{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(e){if(Ie.prototype.__init.call(this),Ie.prototype.__init2.call(this),Ie.prototype.__init3.call(this),Ie.prototype.__init4.call(this),Ie.prototype.__init5.call(this),this._options=e,e.dsn?this._dsn=un(e.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("No DSN provided, client will not do anything."),this._dsn){let r=Ea(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}}captureException(e,r,n){if(Tn(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(Oa);return}let i=r&&r.event_id;return this._process(this.eventFromException(e,r).then(o=>this._captureEvent(o,r,n)).then(o=>{i=o})),i}captureMessage(e,r,n,i){let o=n&&n.event_id,a=Zt(e)?this.eventFromMessage(String(e),r,n):this.eventFromException(e,n);return this._process(a.then(s=>this._captureEvent(s,n,i)).then(s=>{o=s})),o}captureEvent(e,r,n){if(r&&r.originalException&&Tn(r.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(Oa);return}let i=r&&r.event_id;return this._process(this._captureEvent(e,r,n).then(o=>{i=o})),i}captureSession(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ct(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let r=this._transport;return r?this._isClientDoneProcessing(e).then(n=>r.flush(e).then(i=>n&&i)):ie(!0)}close(e){return this.flush(e).then(r=>(this.getOptions().enabled=!1,r))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Ta(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){Zi(e,this._integrations)}sendEvent(e,r={}){if(this._dsn){let n=ba(e,this._dsn,this._options._metadata,this._options.tunnel);for(let o of r.attachments||[])n=ki(n,Fi(o,this._options.transportOptions&&this._options.transportOptions.textEncoder));let i=this._sendEnvelope(n);i&&i.then(o=>this.emit("afterSendEvent",e,o),null)}}sendSession(e){if(this._dsn){let r=va(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}}recordDroppedEvent(e,r,n){if(this._options.sendClientReports){let i=`${e}:${r}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Adding outcome: "${i}"`),this._outcomes[i]=this._outcomes[i]+1||1}}on(e,r){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(r)}emit(e,...r){this._hooks[e]&&this._hooks[e].forEach(n=>n(...r))}_updateSessionFromEvent(e,r){let n=!1,i=!1,o=r.exception&&r.exception.values;if(o){i=!0;for(let c of o){let l=c.mechanism;if(l&&l.handled===!1){n=!0;break}}}let a=e.status==="ok";(a&&e.errors===0||a&&n)&&(ct(e,{...n&&{status:"crashed"},errors:e.errors||Number(i||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new A(r=>{let n=0,i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),r(!0)):(n+=i,e&&n>=e&&(clearInterval(o),r(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,r,n){let i=this.getOptions(),o=Object.keys(this._integrations);return!r.integrations&&o.length>0&&(r.integrations=o),xa(i,e,r,n)}_captureEvent(e,r={},n){return this._processEvent(e,r,n).then(i=>i.event_id,i=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let o=i;o.logLevel==="log"?p.log(o.message):p.warn(o)}})}_processEvent(e,r,n){let i=this.getOptions(),{sampleRate:o}=i;if(!this._isEnabled())return Ct(new W("SDK not enabled, will not capture event.","log"));let a=Na(e),s=Pa(e),c=e.type||"error",l=`before send for type \`${c}\``;if(s&&typeof o=="number"&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",e),Ct(new W(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));let f=c==="replay_event"?"replay":c;return this._prepareEvent(e,r,n).then(u=>{if(u===null)throw this.recordDroppedEvent("event_processor",f,e),new W("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return u;let h=If(i,u,r);return Nf(h,l)}).then(u=>{if(u===null)throw this.recordDroppedEvent("before_send",f,e),new W(`${l} returned \`null\`, will not send event.`,"log");let _=n&&n.getSession();!a&&_&&this._updateSessionFromEvent(_,u);let h=u.transaction_info;if(a&&h&&u.transaction!==e.transaction){let T="custom";u.transaction_info={...h,source:T}}return this.sendEvent(u,r),u}).then(null,u=>{throw u instanceof W?u:(this.captureException(u,{data:{__sentry__:!0},originalException:u}),new W(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
13
|
+
Reason: ${u}`))})}_process(e){this._numProcessing++,e.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_sendEnvelope(e){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",e),this._transport.send(e).then(null,r=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Error while sending event:",r)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(r=>{let[n,i]=r.split(":");return{reason:n,category:i,quantity:e[r]}})}};function Nf(t,e){let r=`${e} must return \`null\` or a valid event.`;if(Lt(t))return t.then(n=>{if(!be(n)&&n!==null)throw new W(r);return n},n=>{throw new W(`${e} rejected with ${n}`)});if(!be(t)&&t!==null)throw new W(r);return t}function If(t,e,r){let{beforeSend:n,beforeSendTransaction:i}=t;return Pa(e)&&n?n(e,r):Na(e)&&i?i(e,r):e}function Pa(t){return t.type===void 0}function Na(t){return t.type==="transaction"}function Ki(t,e){e.debug===!0&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?p.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));let r=S();r.getScope().update(e.initialScope);let i=new t(e);r.bindClient(i)}var Af=30;function ar(t,e,r=Ai(t.bufferSize||Af)){let n={},i=a=>r.drain(a);function o(a){let s=[];if(On(a,(u,_)=>{let h=Pn(_);if(Hi(n,h)){let T=Ia(u,_);t.recordDroppedEvent("ratelimit_backoff",h,T)}else s.push(u)}),s.length===0)return ie();let c=$e(a[0],s),l=u=>{On(c,(_,h)=>{let T=Ia(_,h);t.recordDroppedEvent(u,Pn(h),T)})},f=()=>e({body:Li(c,t.textEncoder)}).then(u=>(u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),n=Yi(n,u),u),u=>{throw l("network_error"),u});return r.add(f).then(u=>u,u=>{if(u instanceof W)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error("Skipped sending event because buffer is full."),l("queue_overflow"),ie();throw u})}return o.__sentry__baseTransport__=!0,{send:o,flush:i}}function Ia(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}var Yr="7.54.0";var Ht={};mi(Ht,{FunctionToString:()=>lt,InboundFilters:()=>We});var Aa,lt=class{constructor(){lt.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=lt.id}setupOnce(){Aa=Function.prototype.toString;try{Function.prototype.toString=function(...e){let r=Ut(this)||this;return Aa.apply(r,e)}}catch{}}};lt.__initStatic();var Mf=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Df=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/],We=class{static __initStatic(){this.id="InboundFilters"}__init(){this.name=We.id}constructor(e={}){this._options=e,We.prototype.__init.call(this)}setupOnce(e,r){let n=i=>{let o=r();if(o){let a=o.getIntegration(We);if(a){let s=o.getClient(),c=s?s.getOptions():{},l=wf(a._options,c);return Bf(i,l)?null:i}}return i};n.id=this.name,e(n)}};We.__initStatic();function wf(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Mf],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:Df],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function Bf(t,e){return e.ignoreInternal&&Hf(t)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being internal Sentry Error.
|
|
14
|
+
Event: ${Re(t)}`),!0):kf(t,e.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
15
|
+
Event: ${Re(t)}`),!0):Lf(t,e.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
16
|
+
Event: ${Re(t)}`),!0):Ff(t,e.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
17
|
+
Event: ${Re(t)}.
|
|
18
|
+
Url: ${kn(t)}`),!0):Uf(t,e.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
19
|
+
Event: ${Re(t)}.
|
|
20
|
+
Url: ${kn(t)}`),!0)}function kf(t,e){return t.type||!e||!e.length?!1:Gf(t).some(r=>bt(r,e))}function Lf(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let r=t.transaction;return r?bt(r,e):!1}function Ff(t,e){if(!e||!e.length)return!1;let r=kn(t);return r?bt(r,e):!1}function Uf(t,e){if(!e||!e.length)return!0;let r=kn(t);return r?bt(r,e):!0}function Gf(t){if(t.message)return[t.message];if(t.exception){let{values:e}=t.exception;try{let{type:r="",value:n=""}=e&&e[e.length-1]||{};return[`${n}`,`${r}: ${n}`]}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Cannot extract message for event ${Re(t)}`),[]}}return[]}function Hf(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Yf(t=[]){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function kn(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Yf(e):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.error(`Cannot extract url for event ${Re(t)}`),null}}var v=k,Xi=0;function Ji(){return Xi>0}function Jf(){Xi++,setTimeout(()=>{Xi--})}function xt(t,e={},r){if(typeof t!="function")return t;try{let i=t.__sentry_wrapped__;if(i)return i;if(Ut(t))return t}catch{return t}let n=function(){let i=Array.prototype.slice.call(arguments);try{r&&typeof r=="function"&&r.apply(this,arguments);let o=i.map(a=>xt(a,e));return t.apply(this,o)}catch(o){throw Jf(),Bn(a=>{a.addEventProcessor(s=>(e.mechanism&&(Qt(s,void 0,void 0),ot(s,e.mechanism)),s.extra={...s.extra,arguments:i},s)),or(o)}),o}};try{for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}catch{}mn(n,t),Jt(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return t.name}})}catch{}return n}function to(t,e){let r=ro(t,e),n={type:e&&e.name,value:rd(e)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Qf(t,e,r,n){let o=S().getClient(),a=o&&o.getOptions().normalizeDepth,s={exception:{values:[{type:Kt(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${Ci(e)}`}]},extra:{__serialized__:xn(e,a)}};if(r){let c=ro(t,r);c.length&&(s.exception.values[0].stacktrace={frames:c})}return s}function Qi(t,e){return{exception:{values:[to(t,e)]}}}function ro(t,e){let r=e.stacktrace||e.stack||"",n=td(e);try{return t(r,n)}catch{}return[]}var ed=/Minified React error #\d+;/i;function td(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(ed.test(t.message))return 1}return 0}function rd(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Ma(t,e,r,n){let i=r&&r.syntheticException||void 0,o=Ln(t,e,i,n);return ot(o),o.level="error",r&&r.event_id&&(o.event_id=r.event_id),ie(o)}function Da(t,e,r="info",n,i){let o=n&&n.syntheticException||void 0,a=eo(t,e,o,i);return a.level=r,n&&n.event_id&&(a.event_id=n.event_id),ie(a)}function Ln(t,e,r,n,i){let o;if(Ar(e)&&e.error)return Qi(t,e.error);if(cn(e)||gi(e)){let a=e;if("stack"in e)o=Qi(t,e);else{let s=a.name||(cn(a)?"DOMError":"DOMException"),c=a.message?`${s}: ${a.message}`:s;o=eo(t,c,r,n),Qt(o,c)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return Ir(e)?Qi(t,e):be(e)||Kt(e)?(o=Qf(t,e,r,i),ot(o,{synthetic:!0}),o):(o=eo(t,e,r,n),Qt(o,`${e}`,void 0),ot(o,{synthetic:!0}),o)}function eo(t,e,r,n){let i={message:e};if(n&&r){let o=ro(t,r);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]})}return i}var Fn=1024,no="Breadcrumbs",je=class{static __initStatic(){this.id=no}__init(){this.name=je.id}constructor(e){je.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&F("console",id),this.options.dom&&F("dom",nd(this.options.dom)),this.options.xhr&&F("xhr",od),this.options.fetch&&F("fetch",ad),this.options.history&&F("history",sd)}addSentryBreadcrumb(e){this.options.sentry&&S().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Re(e)},{event:e})}};je.__initStatic();function nd(t){function e(r){let n,i=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>Fn&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`\`dom.maxStringLength\` cannot exceed ${Fn}, but a value of ${o} was configured. Sentry will use ${Fn} instead.`),o=Fn),typeof i=="string"&&(i=[i]);try{let a=r.event;n=cd(a)?He(a.target,{keyAttrs:i,maxStringLength:o}):He(a,{keyAttrs:i,maxStringLength:o})}catch{n="<unknown>"}n.length!==0&&S().addBreadcrumb({category:`ui.${r.name}`,message:n},{event:r.event,name:r.name,global:r.global})}return e}function id(t){for(let r=0;r<t.args.length;r++)if(t.args[r]==="ref=Ref<"){t.args[r+1]="viewRef";break}let e={category:"console",data:{arguments:t.args,logger:"console"},level:Mi(t.level),message:pn(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${pn(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;S().addBreadcrumb(e,{input:t.args,level:t.level})}function od(t){let{startTimestamp:e,endTimestamp:r}=t,n=t.xhr[it];if(!e||!r||!n)return;let{method:i,url:o,status_code:a,body:s}=n,c={method:i,url:o,status_code:a},l={xhr:t.xhr,input:s,startTimestamp:e,endTimestamp:r};S().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function ad(t){let{startTimestamp:e,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let n=t.fetchData,i={data:t.error,input:t.args,startTimestamp:e,endTimestamp:r};S().addBreadcrumb({category:"fetch",data:n,level:"error",type:"http"},i)}else{let n={...t.fetchData,status_code:t.response&&t.response.status},i={input:t.args,response:t.response,startTimestamp:e,endTimestamp:r};S().addBreadcrumb({category:"fetch",data:n,type:"http"},i)}}function sd(t){let e=t.from,r=t.to,n=kr(v.location.href),i=kr(e),o=kr(r);i.path||(i=n),n.protocol===o.protocol&&n.host===o.host&&(r=o.relative),n.protocol===i.protocol&&n.host===i.host&&(e=i.relative),S().addBreadcrumb({category:"navigation",data:{from:e,to:r}})}function cd(t){return t&&!!t.target}function wa(t,{metadata:e,tunnel:r,dsn:n}){let i={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!r&&!!n&&{dsn:Ye(n)}},o=ld(t);return $e(i,[o])}function ld(t){return[{type:"user_report"},t]}var Un=class extends Ie{constructor(e){let r=v.SENTRY_SDK_SOURCE||Ii();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${r}:@sentry/browser`,version:Yr}],version:Yr},super(e),e.sendClientReports&&v.document&&v.document.addEventListener("visibilitychange",()=>{v.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,r){return Ma(this._options.stackParser,e,r,this._options.attachStacktrace)}eventFromMessage(e,r="info",n){return Da(this._options.stackParser,e,r,n,this._options.attachStacktrace)}sendEvent(e,r){let n=this.getIntegrationById(no);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(e),super.sendEvent(e,r)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("SDK not enabled, will not capture user feedback.");return}let r=wa(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(r)}_prepareEvent(e,r,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,r,n)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("Sending outcomes:",e);let r=Gi(e,this._options.tunnel&&Ye(this._dsn));this._sendEnvelope(r)}};var $r;function Ba(){if($r)return $r;if(Dr(v.fetch))return $r=v.fetch.bind(v);let t=v.document,e=v.fetch;if(t&&typeof t.createElement=="function")try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r);let n=r.contentWindow;n&&n.fetch&&(e=n.fetch),t.head.removeChild(r)}catch(r){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return $r=e.bind(v)}function ka(){$r=void 0}function La(t,e=Ba()){let r=0,n=0;function i(o){let a=o.body.length;r+=a,n++;let s={body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:r<=6e4&&n<15,...t.fetchOptions};try{return e(t.url,s).then(c=>(r-=a,n--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return ka(),r-=a,n--,Ct(c)}}return ar(t,i)}var fd=4;function Fa(t){function e(r){return new A((n,i)=>{let o=new XMLHttpRequest;o.onerror=i,o.onreadystatechange=()=>{o.readyState===fd&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",t.url);for(let a in t.headers)Object.prototype.hasOwnProperty.call(t.headers,a)&&o.setRequestHeader(a,t.headers[a]);o.send(r.body)})}return ar(t,e)}var Gn="?";var dd=30,ud=40,pd=50;function io(t,e,r,n){let i={filename:t,function:e,in_app:!0};return r!==void 0&&(i.lineno=r),n!==void 0&&(i.colno=n),i}var md=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gd=/\((\S*)(?::(\d+))(?::(\d+))\)/,_d=t=>{let e=md.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let o=gd.exec(e[2]);o&&(e[2]=o[1],e[3]=o[2],e[4]=o[3])}let[n,i]=Ga(e[1]||Gn,e[2]);return io(i,n,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},hd=[dd,_d],yd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Sd=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ed=t=>{let e=yd.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let o=Sd.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let n=e[3],i=e[1]||Gn;return[i,n]=Ga(i,n),io(n,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},vd=[pd,Ed],bd=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Cd=t=>{let e=bd.exec(t);return e?io(e[2],e[1]||Gn,+e[3],e[4]?+e[4]:void 0):void 0},Td=[ud,Cd];var Rd=[hd,vd,Td],Ua=_n(...Rd),Ga=(t,e)=>{let r=t.indexOf("safari-extension")!==-1,n=t.indexOf("safari-web-extension")!==-1;return r||n?[t.indexOf("@")!==-1?t.split("@")[0]:Gn,r?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var fe=class{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=fe.id}__init2(){this._installFunc={onerror:xd,onunhandledrejection:Od}}constructor(e){fe.prototype.__init.call(this),fe.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let r in e){let n=this._installFunc[r];n&&e[r]&&(Id(r),n(),this._installFunc[r]=void 0)}}};fe.__initStatic();function xd(){F("error",t=>{let[e,r,n]=$a();if(!e.getIntegration(fe))return;let{msg:i,url:o,line:a,column:s,error:c}=t;if(Ji()||c&&c.__sentry_own_request__)return;let l=c===void 0&&ne(i)?Nd(i,o,a,s):Ha(Ln(r,c||i,void 0,n,!1),o,a,s);l.level="error",Ya(e,c,l,"onerror")})}function Od(){F("unhandledrejection",t=>{let[e,r,n]=$a();if(!e.getIntegration(fe))return;let i=t;try{"reason"in t?i=t.reason:"detail"in t&&"reason"in t.detail&&(i=t.detail.reason)}catch{}if(Ji()||i&&i.__sentry_own_request__)return!0;let o=Zt(i)?Pd(i):Ln(r,i,void 0,n,!0);o.level="error",Ya(e,i,o,"onunhandledrejection")})}function Pd(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Nd(t,e,r,n){let i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=Ar(t)?t.message:t,a="Error",s=o.match(i);return s&&(a=s[1],o=s[2]),Ha({exception:{values:[{type:a,value:o}]}},e,r,n)}function Ha(t,e,r,n){let i=t.exception=t.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],l=isNaN(parseInt(n,10))?void 0:n,f=isNaN(parseInt(r,10))?void 0:r,u=ne(e)&&e.length>0?e:Si();return c.length===0&&c.push({colno:l,filename:u,function:"?",in_app:!0,lineno:f}),t}function Id(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`Global Handler attached: ${t}`)}function Ya(t,e,r,n){ot(r,{handled:!1,type:n}),t.captureEvent(r,{originalException:e})}function $a(){let t=S(),e=t.getClient(),r=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,r.stackParser,r.attachStacktrace]}var Ad=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],qe=class{static __initStatic(){this.id="TryCatch"}__init(){this.name=qe.id}constructor(e){qe.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&L(v,"setTimeout",Va),this._options.setInterval&&L(v,"setInterval",Va),this._options.requestAnimationFrame&&L(v,"requestAnimationFrame",Md),this._options.XMLHttpRequest&&"XMLHttpRequest"in v&&L(XMLHttpRequest.prototype,"send",Dd);let e=this._options.eventTarget;e&&(Array.isArray(e)?e:Ad).forEach(wd)}};qe.__initStatic();function Va(t){return function(...e){let r=e[0];return e[0]=xt(r,{mechanism:{data:{function:me(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function Md(t){return function(e){return t.apply(this,[xt(e,{mechanism:{data:{function:"requestAnimationFrame",handler:me(t)},handled:!0,type:"instrument"}})])}}function Dd(t){return function(...e){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in r&&typeof r[i]=="function"&&L(r,i,function(o){let a={mechanism:{data:{function:i,handler:me(o)},handled:!0,type:"instrument"}},s=Ut(o);return s&&(a.mechanism.data.handler=me(s)),xt(o,a)})}),t.apply(this,e)}}function wd(t){let e=v,r=e[t]&&e[t].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(L(r,"addEventListener",function(n){return function(i,o,a){try{typeof o.handleEvent=="function"&&(o.handleEvent=xt(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:me(o),target:t},handled:!0,type:"instrument"}}))}catch{}return n.apply(this,[i,xt(o,{mechanism:{data:{function:"addEventListener",handler:me(o),target:t},handled:!0,type:"instrument"}}),a])}}),L(r,"removeEventListener",function(n){return function(i,o,a){let s=o;try{let c=s&&s.__sentry_wrapped__;c&&n.call(this,i,c,a)}catch{}return n.call(this,i,s,a)}}))}var Bd="cause",kd=5,Ae=class{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Ae.id}constructor(e={}){Ae.prototype.__init.call(this),this._key=e.key||Bd,this._limit=e.limit||kd}setupOnce(){let e=S().getClient();e&&Tt((r,n)=>{let i=S().getIntegration(Ae);return i?Ld(e.getOptions().stackParser,i._key,i._limit,r,n):r})}};Ae.__initStatic();function Ld(t,e,r,n,i){if(!n.exception||!n.exception.values||!i||!pe(i.originalException,Error))return n;let o=Wa(t,r,i.originalException,e);return n.exception.values=[...o,...n.exception.values],n}function Wa(t,e,r,n,i=[]){if(!pe(r[n],Error)||i.length+1>=e)return i;let o=to(t,r[n]);return Wa(t,e,r[n],n,[o,...i])}var Me=class{constructor(){Me.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Me.id}setupOnce(){Tt(e=>{if(S().getIntegration(Me)){if(!v.navigator&&!v.location&&!v.document)return e;let r=e.request&&e.request.url||v.location&&v.location.href,{referrer:n}=v.document||{},{userAgent:i}=v.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...i&&{"User-Agent":i}},a={...e.request,...r&&{url:r},headers:o};return{...e,request:a}}return e})}};Me.__initStatic();var De=class{constructor(){De.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=De.id}setupOnce(e,r){let n=i=>{if(i.type)return i;let o=r().getIntegration(De);if(o){try{if(Fd(i,o._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return o._previousEvent=i}return o._previousEvent=i}return i};n.id=this.name,e(n)}};De.__initStatic();function Fd(t,e){return e?!!(Ud(t,e)||Gd(t,e)):!1}function Ud(t,e){let r=t.message,n=e.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!Za(t,e)||!za(t,e))}function Gd(t,e){let r=ja(e),n=ja(t);return!(!r||!n||r.type!==n.type||r.value!==n.value||!Za(t,e)||!za(t,e))}function za(t,e){let r=qa(t),n=qa(e);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let i=0;i<n.length;i++){let o=n[i],a=r[i];if(o.filename!==a.filename||o.lineno!==a.lineno||o.colno!==a.colno||o.function!==a.function)return!1}return!0}function Za(t,e){let r=t.fingerprint,n=e.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function ja(t){return t.exception&&t.exception.values&&t.exception.values[0]}function qa(t){let e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}var Xa=[new Ht.InboundFilters,new Ht.FunctionToString,new qe,new je,new fe,new Ae,new De,new Me];function oo(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=Xa),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),v.SENTRY_RELEASE&&v.SENTRY_RELEASE.id&&(t.release=v.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);let e={...t,stackParser:Ri(t.stackParser||Ua),integrations:zi(t),transport:t.transport||(hn()?La:Fa)};Ki(Un,e),t.autoSessionTracking&&Hd()}function Ka(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function Hd(){if(typeof v.document>"u"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let t=S();t.captureSession&&(Ka(t),F("history",({from:e,to:r})=>{e===void 0||e===r||Ka(S())}))}var ao={};mi(ao,{Breadcrumbs:()=>je,Dedupe:()=>De,GlobalHandlers:()=>fe,HttpContext:()=>Me,LinkedErrors:()=>Ae,TryCatch:()=>qe});var b=k;function Ja(){b&&b.document?b.document.addEventListener("visibilitychange",()=>{let t=Ne();if(b.document.hidden&&t){let e="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var sr=(t,e,r)=>{let n,i;return o=>{e.value>=0&&(o||r)&&(i=e.value-(n||0),(i||n===void 0)&&(n=e.value,e.delta=i,t(e)))}};var Qa=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Yd=()=>{let t=b.performance.timing,e=b.performance.navigation.type,r={entryType:"navigation",startTime:0,type:e==2?"back_forward":e===1?"reload":"navigate"};for(let n in t)n!=="navigationStart"&&n!=="toJSON"&&(r[n]=Math.max(t[n]-t.navigationStart,0));return r},Hn=()=>b.__WEB_VITALS_POLYFILL__?b.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Yd()):b.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var Yn=()=>{let t=Hn();return t&&t.activationStart||0};var cr=(t,e)=>{let r=Hn(),n="navigate";return r&&(b.document.prerendering||Yn()>0?n="prerender":n=r.type.replace(/_/g,"-")),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:Qa(),navigationType:n}};var ft=(t,e,r)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){let n=new PerformanceObserver(i=>{e(i.getEntries())});return n.observe(Object.assign({type:t,buffered:!0},r||{})),n}}catch{}};var Ot=(t,e)=>{let r=n=>{(n.type==="pagehide"||b.document.visibilityState==="hidden")&&(t(n),e&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)};var es=t=>{let e=cr("CLS",0),r,n=0,i=[],o=s=>{s.forEach(c=>{if(!c.hadRecentInput){let l=i[0],f=i[i.length-1];n&&i.length!==0&&c.startTime-f.startTime<1e3&&c.startTime-l.startTime<5e3?(n+=c.value,i.push(c)):(n=c.value,i=[c]),n>e.value&&(e.value=n,e.entries=i,r&&r())}})},a=ft("layout-shift",o);if(a){r=sr(t,e);let s=()=>{o(a.takeRecords()),r(!0)};return Ot(s),s}};var $n=-1,$d=()=>b.document.visibilityState==="hidden"&&!b.document.prerendering?0:1/0,Vd=()=>{Ot(({timeStamp:t})=>{$n=t},!0)},lr=()=>($n<0&&($n=$d(),Vd()),{get firstHiddenTime(){return $n}});var ts=t=>{let e=lr(),r=cr("FID"),n,i=s=>{s.startTime<e.firstHiddenTime&&(r.value=s.processingStart-s.startTime,r.entries.push(s),n(!0))},o=s=>{s.forEach(i)},a=ft("first-input",o);n=sr(t,r),a&&Ot(()=>{o(a.takeRecords()),a.disconnect()},!0)};var rs={},ns=t=>{let e=lr(),r=cr("LCP"),n,i=a=>{let s=a[a.length-1];if(s){let c=Math.max(s.startTime-Yn(),0);c<e.firstHiddenTime&&(r.value=c,r.entries=[s],n())}},o=ft("largest-contentful-paint",i);if(o){n=sr(t,r);let a=()=>{rs[r.id]||(i(o.takeRecords()),o.disconnect(),rs[r.id]=!0,n(!0))};return["keydown","click"].forEach(s=>{addEventListener(s,a,{once:!0,capture:!0})}),Ot(a,!0),a}};function Vn(t){return typeof t=="number"&&isFinite(t)}function Yt(t,{startTimestamp:e,...r}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...r})}function $(t){return t/1e3}function os(){return b&&b.addEventListener&&b.performance}var is=0,M={},ze,Vr;function as(){let t=os();if(t&&Pe){t.mark&&b.performance.mark("sentry-tracing-init"),qd();let e=Wd(),r=jd();return()=>{e&&e(),r&&r()}}return()=>{}}function ss(){ft("longtask",e=>{for(let r of e){let n=Ne();if(!n)return;let i=$(Pe+r.startTime),o=$(r.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:i,endTimestamp:i+o})}})}function cs(){ft("event",e=>{for(let r of e){let n=Ne();if(!n)return;if(r.name==="click"){let i=$(Pe+r.startTime),o=$(r.duration);n.startChild({description:He(r.target),op:`ui.interaction.${r.name}`,startTimestamp:i,endTimestamp:i+o})}}},{durationThreshold:0})}function Wd(){return es(t=>{let e=t.entries.pop();e&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding CLS"),M.cls={value:t.value,unit:""},Vr=e)})}function jd(){return ns(t=>{let e=t.entries.pop();e&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding LCP"),M.lcp={value:t.value,unit:"millisecond"},ze=e)})}function qd(){ts(t=>{let e=t.entries.pop();if(!e)return;let r=$(Pe),n=$(e.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FID"),M.fid={value:t.value,unit:"millisecond"},M["mark.fid"]={value:r+n,unit:"second"}})}function ls(t){let e=os();if(!e||!b.performance.getEntries||!Pe)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Tracing] Adding & adjusting spans using Performance API");let r=$(Pe),n=e.getEntries(),i,o;if(n.slice(is).forEach(a=>{let s=$(a.startTime),c=$(a.duration);if(!(t.op==="navigation"&&r+s<t.startTimestamp))switch(a.entryType){case"navigation":{Zd(t,a,r),i=r+$(a.responseStart),o=r+$(a.requestStart);break}case"mark":case"paint":case"measure":{zd(t,a,s,c,r);let l=lr(),f=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&f&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FP"),M.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&f&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding FCP"),M.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{let l=a.name.replace(b.location.origin,"");Xd(t,a,l,s,c,r);break}}}),is=Math.max(n.length-1,0),Jd(t),t.op==="pageload"){typeof i=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding TTFB"),M.ttfb={value:(i-t.startTimestamp)*1e3,unit:"millisecond"},typeof o=="number"&&o<=i&&(M["ttfb.requestTime"]={value:(i-o)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(s=>{if(!M[s]||r>=t.startTimestamp)return;let c=M[s].value,l=r+$(c),f=Math.abs((l-t.startTimestamp)*1e3),u=f-c;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Measurements] Normalized ${s} from ${c} to ${f} (${u})`),M[s].value=f});let a=M["mark.fid"];a&&M.fid&&(Yt(t,{description:"first input delay",endTimestamp:a.value+$(M.fid.value),op:"ui.action",startTimestamp:a.value}),delete M["mark.fid"]),"fcp"in M||delete M.cls,Object.keys(M).forEach(s=>{t.setMeasurement(s,M[s].value,M[s].unit)}),Qd(t)}ze=void 0,Vr=void 0,M={}}function zd(t,e,r,n,i){let o=i+r,a=o+n;return Yt(t,{description:e.name,endTimestamp:a,op:e.entryType,startTimestamp:o}),o}function Zd(t,e,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{Wn(t,e,n,r)}),Wn(t,e,"secureConnection",r,"TLS/SSL","connectEnd"),Wn(t,e,"fetch",r,"cache","domainLookupStart"),Wn(t,e,"domainLookup",r,"DNS"),Kd(t,e,r)}function Wn(t,e,r,n,i,o){let a=o?e[o]:e[`${r}End`],s=e[`${r}Start`];!s||!a||Yt(t,{op:"browser",description:i||r,startTimestamp:n+$(s),endTimestamp:n+$(a)})}function Kd(t,e,r){Yt(t,{op:"browser",description:"request",startTimestamp:r+$(e.requestStart),endTimestamp:r+$(e.responseEnd)}),Yt(t,{op:"browser",description:"response",startTimestamp:r+$(e.responseStart),endTimestamp:r+$(e.responseEnd)})}function Xd(t,e,r,n,i,o){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;let a={};"transferSize"in e&&(a["http.response_transfer_size"]=e.transferSize),"encodedBodySize"in e&&(a["http.response_content_length"]=e.encodedBodySize),"decodedBodySize"in e&&(a["http.decoded_response_content_length"]=e.decodedBodySize),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);let s=o+n,c=s+i;Yt(t,{description:r,endTimestamp:c,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:s,data:a})}function Jd(t){let e=b.navigator;if(!e)return;let r=e.connection;r&&(r.effectiveType&&t.setTag("effectiveConnectionType",r.effectiveType),r.type&&t.setTag("connectionType",r.type),Vn(r.rtt)&&(M["connection.rtt"]={value:r.rtt,unit:"millisecond"})),Vn(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),Vn(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}function Qd(t){ze&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding LCP Data"),ze.element&&t.setTag("lcp.element",He(ze.element)),ze.id&&t.setTag("lcp.id",ze.id),ze.url&&t.setTag("lcp.url",ze.url.trim().slice(0,200)),t.setTag("lcp.size",ze.size)),Vr&&Vr.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log("[Measurements] Adding CLS Data"),Vr.sources.forEach((e,r)=>t.setTag(`cls.source.${r+1}`,He(e.node))))}var so=["localhost",/^\/(?!\/)/],Wr={traceFetch:!0,traceXHR:!0,tracingOrigins:so,tracePropagationTargets:so};function co(t){let{traceFetch:e,traceXHR:r,tracePropagationTargets:n,tracingOrigins:i,shouldCreateSpanForRequest:o}={traceFetch:Wr.traceFetch,traceXHR:Wr.traceXHR,...t},a=typeof o=="function"?o:l=>!0,s=l=>eu(l,n||i),c={};e&&F("fetch",l=>{tu(l,a,s,c)}),r&&F("xhr",l=>{nu(l,a,s,c)})}function eu(t,e){return bt(t,e||so)}function tu(t,e,r,n){if(!rr()||!(t.fetchData&&e(t.fetchData.url)))return;if(t.endTimestamp){let s=t.fetchData.__span;if(!s)return;let c=n[s];if(c){if(t.response){c.setHttpStatus(t.response.status);let l=t.response&&t.response.headers&&t.response.headers.get("content-length"),f=parseInt(l);f>0&&c.setData("http.response_content_length",f)}else t.error&&c.setStatus("internal_error");c.finish(),delete n[s]}return}let i=S().getScope(),o=i&&i.getSpan(),a=o&&o.transaction;if(o&&a){let{method:s,url:c}=t.fetchData,l=o.startChild({data:{url:c,type:"fetch","http.method":s},description:`${s} ${c}`,op:"http.client"});t.fetchData.__span=l.spanId,n[l.spanId]=l;let f=t.args[0];t.args[1]=t.args[1]||{};let u=t.args[1];r(t.fetchData.url)&&(u.headers=ru(f,a.getDynamicSamplingContext(),l,u))}}function ru(t,e,r,n){let i=In(e),o=r.toTraceparent(),a=typeof Request<"u"&&pe(t,Request)?t.headers:n.headers;if(a)if(typeof Headers<"u"&&pe(a,Headers)){let s=new Headers(a);return s.append("sentry-trace",o),i&&s.append(Ur,i),s}else if(Array.isArray(a)){let s=[...a,["sentry-trace",o]];return i&&s.push([Ur,i]),s}else{let s="baggage"in a?a.baggage:void 0,c=[];return Array.isArray(s)?c.push(...s):s&&c.push(s),i&&c.push(i),{...a,"sentry-trace":o,baggage:c.length>0?c.join(","):void 0}}else return{"sentry-trace":o,baggage:i}}function nu(t,e,r,n){let i=t.xhr,o=i&&i[it];if(!rr()||i&&i.__sentry_own_request__||!(i&&o&&e(o.url)))return;if(t.endTimestamp){let l=i.__sentry_xhr_span_id__;if(!l)return;let f=n[l];f&&(f.setHttpStatus(o.status_code),f.finish(),delete n[l]);return}let a=S().getScope(),s=a&&a.getSpan(),c=s&&s.transaction;if(s&&c){let l=s.startChild({data:{...o.data,type:"xhr","http.method":o.method,url:o.url},description:`${o.method} ${o.url}`,op:"http.client"});if(i.__sentry_xhr_span_id__=l.spanId,n[i.__sentry_xhr_span_id__]=l,i.setRequestHeader&&r(o.url))try{i.setRequestHeader("sentry-trace",l.toTraceparent());let f=c.getDynamicSamplingContext(),u=In(f);u&&i.setRequestHeader(Ur,u)}catch{}}}function fs(t,e=!0,r=!0){if(!b||!b.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn("Could not initialize routing instrumentation due to invalid location");return}let n=b.location.href,i;e&&(i=t({name:b.location.pathname,startTimestamp:Pe?Pe/1e3:void 0,op:"pageload",metadata:{source:"url"}})),r&&F("history",({to:o,from:a})=>{if(a===void 0&&n&&n.indexOf(o)!==-1){n=void 0;return}a!==o&&(n=void 0,i&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=t({name:b.location.pathname,op:"navigation",metadata:{source:"url"}}))})}var us="BrowserTracing",iu={...ir,markBackgroundTransactions:!0,routingInstrumentation:fs,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...Wr},Pt=class{__init(){this.name=us}constructor(e){Pt.prototype.__init.call(this),Dn(),this.options={...iu,...e},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=as(),this.options.enableLongTask&&ss(),this.options._experiments.enableInteractions&&cs()}setupOnce(e,r){this._getCurrentHub=r;let{routingInstrumentation:n,startTransactionOnLocationChange:i,startTransactionOnPageLoad:o,markBackgroundTransactions:a,traceFetch:s,traceXHR:c,tracePropagationTargets:l,shouldCreateSpanForRequest:f,_experiments:u}=this.options;n(_=>{let h=this._createRouteTransaction(_);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(h,_,r),h},o,i),a&&Ja(),u.enableInteractions&&this._registerInteractionListener(),co({traceFetch:s,traceXHR:c,tracePropagationTargets:l,shouldCreateSpanForRequest:f})}_createRouteTransaction(e){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`);return}let{beforeNavigate:r,idleTimeout:n,finalTimeout:i,heartbeatInterval:o}=this.options,a=e.op==="pageload",s=a?ds("sentry-trace"):null,c=a?ds("baggage"):null,l=s?Fr(s):void 0,f=c?Vi(c):void 0,u={...e,...l,metadata:{...e.metadata,dynamicSamplingContext:l&&!f?{}:f},trimEnd:!0},_=typeof r=="function"?r(u):u,h=_===void 0?{...u,sampled:!1}:_;h.metadata=h.name!==u.name?{...h.metadata,source:"custom"}:h.metadata,this._latestRouteName=h.name,this._latestRouteSource=h.metadata&&h.metadata.source,h.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Will not send ${h.op} transaction because of beforeNavigate.`),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.log(`[Tracing] Starting ${h.op} transaction on scope`);let T=this._getCurrentHub(),{location:P}=b,G=Mn(T,h,n,i,!0,{location:P},o);return G.registerBeforeFinishCallback(H=>{this._collectWebVitals(),ls(H)}),G}_registerInteractionListener(){let e,r=()=>{let{idleTimeout:n,finalTimeout:i,heartbeatInterval:o}=this.options,a="ui.action.click",s=Ne();if(s&&s.op&&["navigation","pageload"].includes(s.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&p.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}let c=this._getCurrentHub(),{location:l}=b,f={name:this._latestRouteName,op:a,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=Mn(c,f,n,i,!0,{location:l},o)};["click"].forEach(n=>{addEventListener(n,r,{once:!1,capture:!0})})}};function ds(t){let e=Ei(`meta[name=${t}]`);return e?e.getAttribute("content"):null}var ps={};v.Sentry&&v.Sentry.Integrations&&(ps=v.Sentry.Integrations);var my={...ps,...Ht,...ao};var ou=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};ou.SENTRY_RELEASE={id:"3.1.3"};var ms=!1;function au(){oo({dsn:"https://903950caba7d4802afe6c1e985ad5ebd@o128085.ingest.sentry.io/4504854496149504",release:"3.1.3",integrations:[new Pt],tracesSampleRate:1}),ms=!0}var he=t=>(ms||au(),or(t));var vs=I(require("react"));var fo="[Duffel Ancillaries] ",_s="duffel-ancillaries-logger-state",gs=!1,su=t=>{localStorage.setItem(_s,t.toString())},hs=()=>localStorage.getItem(_s)==="true",jn=t=>{su(t),t&&!gs&&console.info(fo,`
|
|
40
21
|
|
|
41
22
|
Debug mode is enabled. Information about your setup will be printed to the console.
|
|
42
23
|
|
|
43
24
|
If you do not want to enable debug mode (for example in a production environment), pass "debug: false" when initializing this component.
|
|
44
25
|
|
|
45
26
|
Learn more about the Ancillaries component:
|
|
46
|
-
http://duffel.com/docs/guides/ancillaries-component`),vg=!0},bg=t=>{Cg()?console.info(Ll,t):ra({category:"log",message:t})};function or(t,n){let i=[];Array.isArray(n)?i=n:i=Object.entries(n).map(([a,s])=>({property:a,value:s})),Cg()?(console.groupCollapsed(Ll,t),i.forEach(a=>{console.info(a)}),console.groupEnd()):ra({category:"log.group",message:t,data:n})}var Z=require("react/jsx-runtime"),Tg={add:(0,Z.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),apartment:(0,Z.jsx)("path",{d:"M3.8496 19.9752V7.2744H7.4496V3.6744H15.9504V10.8744H20.1504V19.9752H13.4496V16.3752H10.5504V19.9752H3.8496ZM5.1504 18.6744H7.4496V16.3752H5.1504V18.6744ZM5.1504 14.7744H7.4496V12.4752H5.1504V14.7744ZM5.1504 10.8744H7.4496V8.5752H5.1504V10.8744ZM8.7504 14.7744H11.0496V12.4752H8.7504V14.7744ZM8.7504 10.8744H11.0496V8.5752H8.7504V10.8744ZM8.7504 7.2744H11.0496V4.9752H8.7504V7.2744ZM12.3504 14.7744H14.6496V12.4752H12.3504V14.7744ZM12.3504 10.8744H14.6496V8.5752H12.3504V10.8744ZM12.3504 7.2744H14.6496V4.9752H12.3504V7.2744ZM16.5504 18.6744H18.8496V16.3752H16.5504V18.6744ZM16.5504 14.7744H18.8496V12.4752H16.5504V14.7744Z"}),arrow_forward:(0,Z.jsx)("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"}),arrow_left:(0,Z.jsx)("path",{d:"M9 19L2 12L9 5L10.425 6.4L5.825 11H22V13H5.825L10.4 17.6L9 19Z"}),arrow_right:(0,Z.jsx)("path",{d:"M15 19L13.6 17.6L18.2 13H2V11H18.2L13.6 6.4L15 5L22 12L15 19Z"}),autorenew:(0,Z.jsx)("path",{d:"M5.69728 14.4104C5.49326 13.9833 5.32604 13.5257 5.19562 13.0374C5.06521 12.5492 5 12.0367 5 11.5C5 9.56481 5.69083 7.91679 7.07249 6.55591C8.45416 5.19504 10.147 4.53946 12.1511 4.58918H12.7613L11.0742 2.92359L12.0097 2L15.2869 5.23549L12.0097 8.47099L11.0742 7.54739L12.7613 5.88181H12.1511C10.5021 5.84866 9.11624 6.38632 7.99347 7.49479C6.87069 8.60326 6.30931 9.93833 6.30931 11.5C6.30931 11.8455 6.33804 12.1824 6.3955 12.5106C6.45296 12.8389 6.53915 13.1573 6.65407 13.4658L5.69728 14.4104ZM11.9903 21L8.71309 17.7645L11.9903 14.529L12.9258 15.4526L11.2387 17.1182H11.8489C13.4979 17.1513 14.8838 16.6137 16.0065 15.5052C17.1293 14.3967 17.6907 13.0617 17.6907 11.5C17.6907 11.1545 17.662 10.8176 17.6045 10.4894C17.547 10.1611 17.4609 9.84273 17.3459 9.53421L18.3027 8.58959C18.5067 9.01665 18.674 9.47431 18.8044 9.96256C18.9348 10.4508 19 10.9633 19 11.5C19 13.4186 18.3092 15.0625 16.9275 16.4317C15.5458 17.8008 13.853 18.4605 11.8489 18.4108H11.2387L12.9258 20.0764L11.9903 21Z"}),bassinet:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("path",{d:"M19 12C19 14.1217 18.1571 16.1566 16.6569 17.6569C15.1566 19.1571 13.1217 20 11 20C8.87827 20 6.84344 19.1571 5.34315 17.6569C3.84286 16.1566 3 14.1217 3 12L11 12H19Z"}),(0,Z.jsx)("path",{d:"M16.1347 5.86529L11 11V4C12.0506 4 13.0909 4.20693 14.0615 4.60896C14.8136 4.92052 15.5125 5.34451 16.1347 5.86529ZM16.8602 6.55405L12.4142 11H18.9373C18.8482 10.293 18.6649 9.59962 18.391 8.93853C18.0264 8.05823 17.5077 7.25087 16.8602 6.55405Z"})]}),cabin_bag:(0,Z.jsx)("path",{d:"M7.3077 20.5C6.81058 20.5 6.38502 20.323 6.03102 19.969C5.67701 19.615 5.5 19.1894 5.5 18.6923V8.25007C5.5 7.76417 5.67019 7.35103 6.01057 7.01065C6.35096 6.67027 6.7641 6.50007 7.25 6.50007H9.25V3.6924C9.25 3.43631 9.33622 3.22166 9.50865 3.04842C9.68108 2.87519 9.89773 2.78857 10.1586 2.78857H13.8414C14.1022 2.78857 14.3189 2.87519 14.4913 3.04842C14.6637 3.22166 14.75 3.43631 14.75 3.6924V6.50007H16.6922C17.1894 6.50007 17.6149 6.67708 17.9689 7.0311C18.3229 7.3851 18.5 7.81066 18.5 8.30777V18.6923C18.5 19.1894 18.3229 19.615 17.9689 19.969C17.6149 20.323 17.1894 20.5 16.6922 20.5C16.6922 20.7507 16.6074 20.9608 16.4377 21.1303C16.2681 21.2999 16.0578 21.3846 15.807 21.3846C15.5561 21.3846 15.3461 21.2999 15.1769 21.1303C15.0077 20.9608 14.923 20.7507 14.923 20.5H9.0769C9.0769 20.7513 8.99206 20.9615 8.82237 21.1308C8.65271 21.3 8.44246 21.3846 8.19162 21.3846C7.94079 21.3846 7.73076 21.2999 7.56153 21.1303C7.39231 20.9608 7.3077 20.7507 7.3077 20.5ZM10.4423 6.50007H13.5577V3.98085H10.4423V6.50007ZM7.3077 19H16.6922C16.782 19 16.8557 18.9712 16.9134 18.9135C16.9711 18.8558 17 18.7821 17 18.6923V8.30777C17 8.21802 16.9711 8.1443 16.9134 8.0866C16.8557 8.0289 16.782 8.00005 16.6922 8.00005H7.3077C7.21795 8.00005 7.14423 8.0289 7.08652 8.0866C7.02882 8.1443 6.99997 8.21802 6.99997 8.30777V18.6923C6.99997 18.7821 7.02882 18.8558 7.08652 18.9135C7.14423 18.9712 7.21795 19 7.3077 19ZM8.15382 17.1539C8.15382 17.3261 8.21009 17.4685 8.32262 17.5811C8.43514 17.6937 8.57744 17.75 8.74952 17.75C8.92161 17.75 9.06407 17.6937 9.1769 17.5811C9.28972 17.4685 9.34613 17.3261 9.34613 17.1539V9.8462C9.34613 9.67398 9.28986 9.53157 9.17732 9.41897C9.06481 9.30637 8.92251 9.25007 8.75043 9.25007C8.57834 9.25007 8.43588 9.30637 8.32305 9.41897C8.21023 9.53157 8.15382 9.67398 8.15382 9.8462V17.1539ZM11.4038 17.1539C11.4038 17.3261 11.4601 17.4685 11.5726 17.5811C11.6851 17.6937 11.8274 17.75 11.9995 17.75C12.1716 17.75 12.3141 17.6937 12.4269 17.5811C12.5397 17.4685 12.5961 17.3261 12.5961 17.1539V9.8462C12.5961 9.67398 12.5399 9.53157 12.4273 9.41897C12.3148 9.30637 12.1725 9.25007 12.0004 9.25007C11.8283 9.25007 11.6859 9.30637 11.5731 9.41897C11.4602 9.53157 11.4038 9.67398 11.4038 9.8462V17.1539ZM14.6538 17.1539C14.6538 17.3261 14.7101 17.4685 14.8226 17.5811C14.9351 17.6937 15.0774 17.75 15.2495 17.75C15.4216 17.75 15.5641 17.6937 15.6769 17.5811C15.7897 17.4685 15.8461 17.3261 15.8461 17.1539V9.8462C15.8461 9.67398 15.7899 9.53157 15.6773 9.41897C15.5648 9.30637 15.4225 9.25007 15.2504 9.25007C15.0783 9.25007 14.9359 9.30637 14.823 9.41897C14.7102 9.53157 14.6538 9.67398 14.6538 9.8462V17.1539Z"}),check:(0,Z.jsx)("path",{d:"M10.3333 15.8646L7 12.5313L8.0625 11.4688L10.3333 13.7396L15.9375 8.13544L17 9.19794L10.3333 15.8646Z"}),checked_bag:(0,Z.jsx)("path",{d:"M22 19H2V21H22V19M4 15C4 15.5 4.2 16 4.6 16.4C5 16.8 5.5 17 6 17V6C5.5 6 5 6.2 4.6 6.6C4.2 7 4 7.5 4 8V15M13.5 6H10.5C10.5 5.6 10.6 5.2 10.9 4.9C11.2 4.6 11.5 4.5 12 4.5C12.4 4.5 12.8 4.6 13.1 4.9C13.3 5.2 13.5 5.6 13.5 6M7 6V17H17V6H15C15 5.2 14.7 4.5 14.1 3.9S12.8 3 12 3C11.2 3 10.5 3.3 9.9 3.9C9.3 4.5 9 5.2 9 6H7M18 17C18.5 17 19 16.8 19.4 16.4C19.8 16 20 15.5 20 15V8C20 7.5 19.8 7 19.4 6.6C19 6.2 18.5 6 18 6V17Z"}),chevron:(0,Z.jsx)("path",{d:"M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z"}),close:(0,Z.jsx)("path",{d:"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),closet:(0,Z.jsx)("path",{d:"M12 4C11.0717 4 10.1815 4.36875 9.52513 5.02513C8.86875 5.6815 8.5 6.57174 8.5 7.5H10.5C10.5 7.10218 10.658 6.72064 10.9393 6.43934C11.2206 6.15804 11.6022 6 12 6C12.3978 6 12.7794 6.15804 13.0607 6.43934C13.342 6.72064 13.5 7.10218 13.5 7.5C13.5 7.89782 13.342 8.27936 13.0607 8.56066C12.7794 8.84196 12.3978 9 12 9C11.45 9 11 9.45 11 10V11.75L2.4 18.2C2.23209 18.3259 2.10807 18.5015 2.04549 18.7018C1.98291 18.9022 1.98495 19.1171 2.05132 19.3162C2.11769 19.5153 2.24502 19.6885 2.41529 19.8112C2.58556 19.934 2.79012 20 3 20H21C21.2099 20 21.4144 19.934 21.5847 19.8112C21.755 19.6885 21.8823 19.5153 21.9487 19.3162C22.0151 19.1171 22.0171 18.9022 21.9545 18.7018C21.8919 18.5015 21.7679 18.3259 21.6 18.2L13 11.75V10.85C13.7216 10.6349 14.3546 10.1927 14.805 9.58919C15.2554 8.98569 15.4991 8.25303 15.5 7.5C15.5 6.57174 15.1313 5.6815 14.4749 5.02513C13.8185 4.36875 12.9283 4 12 4ZM12 13.5L18 18H6L12 13.5Z"}),exit_row:(0,Z.jsx)("path",{d:"M20 11H6.83001L9.71001 8.12001C10.1 7.73001 10.1 7.10001 9.71001 6.71001C9.32001 6.32001 8.69001 6.32001 8.30001 6.71001L3.71001 11.3C3.32001 11.69 3.32001 12.32 3.71001 12.71L8.30001 17.3C8.69001 17.69 9.32001 17.69 9.71001 17.3C10.1 16.91 10.1 16.28 9.71001 15.89L6.83001 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11Z"}),exit_row_right:(0,Z.jsx)("path",{d:"M4 11H17.17L14.29 8.12001C13.9 7.73001 13.9 7.10001 14.29 6.71001C14.68 6.32001 15.31 6.32001 15.7 6.71001L20.29 11.3C20.68 11.69 20.68 12.32 20.29 12.71L15.7 17.3C15.31 17.69 14.68 17.69 14.29 17.3C13.9 16.91 13.9 16.28 14.29 15.89L17.17 13H4C3.45 13 3 12.55 3 12C3 11.45 3.45 11 4 11Z"}),expand_content:(0,Z.jsx)("path",{d:"M5 19V13H7V17H11V19H5ZM17 11V7H13V5H19V11H17Z"}),flight_class:(0,Z.jsx)("path",{d:"M14.2596 12.5C13.7737 12.5 13.3606 12.3298 13.0202 11.9894C12.6798 11.649 12.5096 11.2359 12.5096 10.75V6.25C12.5096 5.7641 12.6798 5.35096 13.0202 5.01058C13.3606 4.67019 13.7737 4.5 14.2596 4.5H15.75C16.2359 4.5 16.649 4.67019 16.9894 5.01058C17.3298 5.35096 17.5 5.7641 17.5 6.25V10.75C17.5 11.2359 17.3298 11.649 16.9894 11.9894C16.649 12.3298 16.2359 12.5 15.75 12.5H14.2596ZM14.2596 11H15.75C15.8205 11 15.8798 10.9759 15.9278 10.9279C15.9759 10.8798 16 10.8205 16 10.75V6.25C16 6.17948 15.9759 6.12018 15.9278 6.0721C15.8798 6.02402 15.8205 5.99998 15.75 5.99998H14.2596C14.1891 5.99998 14.1298 6.02402 14.0817 6.0721C14.0336 6.12018 14.0096 6.17948 14.0096 6.25V10.75C14.0096 10.8205 14.0336 10.8798 14.0817 10.9279C14.1298 10.9759 14.1891 11 14.2596 11ZM9.5673 17.5C9.21345 17.5 8.89678 17.398 8.6173 17.1942C8.33782 16.9903 8.14423 16.7198 8.03655 16.3827L5.5 8.02883V4.5H6.99997V7.99998L9.49997 16H17.7596V17.5H9.5673ZM8.25 20.5V19H17.75V20.5H8.25ZM14.2596 5.99998H16H14.0096H14.2596Z"}),flight_takeoff:(0,Z.jsx)("path",{d:"M3.77521 20.1498V18.849H20.0748V20.1498H3.77521ZM5.45041 15.2742L2.94961 11.0994L4.05001 10.8246L5.90041 12.399L10.05 11.2998L6.27481 4.89902L7.72561 4.62422L14.1 10.1994L19.4004 8.77382C19.75 8.67462 20.0832 8.72062 20.4 8.91182C20.7168 9.10382 20.9252 9.37462 21.0252 9.72422C21.1084 10.0746 21.0624 10.4038 20.8872 10.7118C20.7128 11.0198 20.4504 11.2242 20.1 11.325L5.45041 15.2742Z"}),galley:(0,Z.jsx)("path",{d:"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"}),lavatory:(0,Z.jsx)("path",{d:"M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"}),lie_flat_seat:(0,Z.jsx)("path",{d:"M6.16667 12.8333C6.81667 12.8333 7.45834 12.5833 7.95001 12.0833C8.91667 11.0916 8.90001 9.51659 7.91667 8.54992C7.42501 8.07492 6.79167 7.83325 6.16667 7.83325C5.51667 7.83325 4.87501 8.08325 4.38334 8.58325C3.41667 9.57492 3.43334 11.1499 4.41667 12.1166C4.90834 12.5916 5.54167 12.8333 6.16667 12.8333ZM5.57501 9.74992C5.73334 9.59159 5.94167 9.49992 6.16667 9.49992C6.38334 9.49992 6.59167 9.58325 6.75001 9.73325C7.08334 10.0583 7.08334 10.5749 6.76667 10.9083C6.60001 11.0749 6.39167 11.1666 6.16667 11.1666C5.95001 11.1666 5.74167 11.0833 5.58334 10.9333C5.25001 10.5999 5.25001 10.0833 5.57501 9.74992ZM17 7.83325H9.50001V12.8333H20.3333V11.1666C20.3333 9.32492 18.8417 7.83325 17 7.83325ZM11.1667 11.1666V9.49992H17C17.9167 9.49992 18.6667 10.2499 18.6667 11.1666H11.1667ZM3.66667 15.3333H8.66667V16.9999H15.3333V15.3333H20.3333V13.6666H3.66667V15.3333Z"}),minus:(0,Z.jsx)("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"}),no_airplane:(0,Z.jsx)("path",{d:"M14.6674 10.0001V2.66675C14.6674 1.56008 13.7741 0.666748 12.6674 0.666748C11.5607 0.666748 10.6674 1.56008 10.6674 2.66675V7.57341L21.1074 18.0134L25.3341 19.3334V16.6667L14.6674 10.0001ZM1.33407 5.02675L7.9874 11.6801L0.000732422 16.6667V19.3334L10.6674 16.0001V23.3334L8.00073 25.3334V27.3334L12.6674 26.0001L17.3341 27.3334V25.3334L14.6674 23.3334V18.3601L22.3074 26.0001L24.0007 24.3067L3.0274 3.33341L1.33407 5.02675Z"}),no_bag:(0,Z.jsx)("path",{d:"M16.8992 6.12037H14.9392V3.18101C14.9385 2.92148 14.8351 2.67278 14.6516 2.48926C14.4681 2.30574 14.2194 2.20234 13.9599 2.20166H10.0399C9.78034 2.20234 9.53163 2.30574 9.34811 2.48926C9.16459 2.67278 9.06119 2.92148 9.06051 3.18101V6.12037H8.20711L8.34715 6.25804L14.3973 12.0871V9.06102H15.9676V13.6L17.3022 14.8859L18.8592 16.4748V8.08037C18.8579 7.56096 18.6509 7.06322 18.2836 6.69594C17.9164 6.32867 17.4186 6.12173 16.8992 6.12037ZM5.14051 8.09559L3.77173 6.71825L5.00821 5.48945L7.16586 7.6606L13.9581 14.4953L15.8932 16.4426L19.7441 20.3175L20.2279 20.8043L18.9914 22.0331L17.635 20.6683C17.4035 20.7625 17.154 20.8126 16.8992 20.8133C16.904 20.945 16.8822 21.0763 16.8351 21.1993C16.788 21.3224 16.7166 21.4347 16.6251 21.5296C16.5336 21.6244 16.424 21.6999 16.3027 21.7514C16.1814 21.8029 16.051 21.8295 15.9192 21.8295C15.7874 21.8295 15.657 21.8029 15.5357 21.7514C15.4145 21.6999 15.3048 21.6244 15.2133 21.5296C15.1219 21.4347 15.0504 21.3224 15.0034 21.1993C14.9563 21.0763 14.9344 20.945 14.9392 20.8133H9.06051C9.06529 20.945 9.04348 21.0763 8.99638 21.1993C8.94929 21.3224 8.87787 21.4347 8.7864 21.5296C8.69492 21.6244 8.58527 21.6999 8.46399 21.7514C8.34271 21.8029 8.21229 21.8295 8.08051 21.8295C7.94874 21.8295 7.81832 21.8029 7.69703 21.7514C7.57575 21.6999 7.4661 21.6244 7.37463 21.5296C7.28316 21.4347 7.21174 21.3224 7.16464 21.1993C7.11754 21.0763 7.09573 20.945 7.10051 20.8133C6.58222 20.8119 6.08545 20.6059 5.71835 20.24C5.35126 19.8741 5.14357 19.378 5.14051 18.8597V8.09559ZM14.8632 17.8791L14.3973 17.4103V17.8791H14.8632ZM9.596 12.579V17.8791H8.03083V11.004L9.596 12.579ZM10.5302 3.67134H13.4695V6.12295H10.5302V3.67134Z"}),no_seat:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("path",{d:"M25.1667 21.9733L23.4733 23.6667L2.5 2.69333L4.19333 1L7.16667 3.97333L16.5267 13.3333L19.1933 16L24.5 21.3067L25.1667 21.9733Z"}),(0,Z.jsx)("path",{d:"M7.16667 24H3.16667V16H19.1933L24.5 21.3067V24H20.5V20H7.16667V24ZM27.1667 9.33333H23.1667V13.3333H27.1667V9.33333ZM4.5 9.33333H0.5V13.3333H4.5V9.33333ZM20.3333 13.3333H20.5V2.66667C20.5 1.2 19.3 0 17.8333 0H9.83333C9.05784 0 8.3569 0.335483 7.86848 0.868484L20.3333 13.3333ZM16.5267 13.3333L7.16667 3.97333V13.3333H16.5267Z"})]}),north_east:(0,Z.jsx)("path",{d:"M4.69999 19.3C4.51665 19.1167 4.42499 18.8833 4.42499 18.6C4.42499 18.3167 4.51665 18.0833 4.69999 17.9L15.6 7H9.99999C9.71665 7 9.47915 6.90417 9.28749 6.7125C9.09582 6.52083 8.99999 6.28333 8.99999 6C8.99999 5.71667 9.09582 5.47917 9.28749 5.2875C9.47915 5.09583 9.71665 5 9.99999 5H18C18.2833 5 18.5208 5.09583 18.7125 5.2875C18.9042 5.47917 19 5.71667 19 6V14C19 14.2833 18.9042 14.5208 18.7125 14.7125C18.5208 14.9042 18.2833 15 18 15C17.7167 15 17.4792 14.9042 17.2875 14.7125C17.0958 14.5208 17 14.2833 17 14V8.4L6.09999 19.3C5.91665 19.4833 5.68332 19.575 5.39999 19.575C5.11665 19.575 4.88332 19.4833 4.69999 19.3Z"}),seat:(0,Z.jsx)("path",{d:"M7.59 5.41012C6.81 4.63012 6.81 3.36012 7.59 2.58012C8.37 1.80012 9.64 1.80012 10.42 2.58012C11.2 3.36012 11.2 4.63012 10.42 5.41012C9.63 6.20012 8.37 6.20012 7.59 5.41012ZM6 16.0001V8.00012C6 7.45012 5.55 7.00012 5 7.00012C4.45 7.00012 4 7.45012 4 8.00012V16.0001C4 18.7601 6.24 21.0001 9 21.0001H14C14.55 21.0001 15 20.5501 15 20.0001C15 19.4501 14.55 19.0001 14 19.0001H9C7.34 19.0001 6 17.6601 6 16.0001ZM19.28 19.3501L15.51 15.5801C15.14 15.2101 14.63 15.0001 14.1 15.0001H11.5V11.3201C12.59 12.2101 14.16 13.0201 15.7 13.3401C16.37 13.4801 17 12.9801 17 12.3001C17 11.7701 16.61 11.3401 16.08 11.2501C14.66 11.0101 13.2 10.2401 12.33 9.28012L10.93 7.73012C10.74 7.52012 10.5 7.35012 10.24 7.23012C9.95 7.09012 9.62 7.00012 9.28 7.00012H9.25C8.01 7.00012 7 8.01012 7 9.25012V15.0001C7 16.6601 8.34 18.0001 10 18.0001H15.07L17.85 20.7801C18.24 21.1701 18.89 21.1701 19.28 20.7801C19.68 20.3901 19.68 19.7501 19.28 19.3501Z"}),seat_paid_indicator:(0,Z.jsx)("path",{d:"M11.7686 0.731368C12.7766 -0.276576 14.5 0.437294 14.5 1.86274V10.8C14.5 12.5673 13.0673 14 11.3 14H2.36274C0.937294 14 0.223427 12.2766 1.23137 11.2686L11.7686 0.731368Z"}),shield_with_moon:(0,Z.jsx)("path",{d:"M12.525 15.75C13.0814 15.75 13.6269 15.6408 14.1615 15.4222C14.6961 15.2036 15.166 14.8757 15.5711 14.4385C15.6749 14.3244 15.7032 14.2033 15.6557 14.0751C15.6083 13.9469 15.5077 13.8629 15.3538 13.8232C14.7269 13.6783 14.1477 13.4183 13.6163 13.0433C13.0849 12.6683 12.6474 12.1789 12.3038 11.5751C11.9769 11.0046 11.7682 10.393 11.6778 9.74048C11.5874 9.08791 11.6589 8.45458 11.8923 7.84048C11.9525 7.68663 11.9301 7.55586 11.8249 7.44817C11.7198 7.34049 11.5916 7.30332 11.4403 7.33665C10.4442 7.59177 9.65927 8.1142 9.08555 8.90395C8.51185 9.69368 8.225 10.5591 8.225 11.5001C8.225 12.6796 8.64519 13.6828 9.48558 14.5097C10.3259 15.3366 11.3391 15.75 12.525 15.75ZM12 21.4808C9.83716 20.8911 8.04646 19.618 6.62787 17.6616C5.20929 15.7052 4.5 13.518 4.5 11.1001V5.34625L12 2.53857L19.5 5.34625V11.1001C19.5 13.518 18.7907 15.7052 17.3721 17.6616C15.9535 19.618 14.1628 20.8911 12 21.4808ZM12 19.9001C13.7333 19.3501 15.1666 18.2501 16.3 16.6001C17.4333 14.9501 18 13.1167 18 11.1001V6.37507L12 4.1347L5.99997 6.37507V11.1001C5.99997 13.1167 6.56664 14.9501 7.69997 16.6001C8.83331 18.2501 10.2666 19.3501 12 19.9001Z"}),stairs:(0,Z.jsx)("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,8h-2.42v3.33H13v3.33h-2.58 V18H6v-2h2.42v-3.33H11V9.33h2.58V6H18V8z"}),wifi:(0,Z.jsx)("path",{d:"M2.83333 9.50005L4.49999 11.1667C8.64166 7.02505 15.3583 7.02505 19.5 11.1667L21.1667 9.50005C16.1083 4.44172 7.89999 4.44172 2.83333 9.50005ZM9.49999 16.1667L12 18.6667L14.5 16.1667C13.125 14.7834 10.8833 14.7834 9.49999 16.1667ZM6.16666 12.8334L7.83333 14.5C10.1333 12.2 13.8667 12.2 16.1667 14.5L17.8333 12.8334C14.6167 9.61672 9.39166 9.61672 6.16666 12.8334Z"})},eT=t=>t in Tg?Tg[t]:(bg(`The icon "${t}" is missing from ICON_MAP`),null),pe=({name:t,size:n,className:i,viewBox:a,style:s})=>(0,Z.jsx)("svg",{className:i,width:n||24,height:n||24,viewBox:a||"0 0 24 24","aria-label":t,"data-testid":t,style:{display:"block",fill:"currentColor",...s},children:eT(t)});var Rg=ge(yn());var Zs=require("react/jsx-runtime"),tT={primary:"button--primary",outlined:"button--outlined",destructive:"button--destructive"},nT={32:"button--32",40:"button--40",48:"button--48"},Qe=({iconBefore:t,variant:n="primary",size:i=40,children:a,className:s,type:u="button",...l})=>(0,Zs.jsxs)("button",{type:u,className:(0,Rg.default)("button",tT[n],nT[i],s),...l,children:[t&&(0,Zs.jsx)(pe,{className:"duffel-button__icon duffel-button__icon--before",name:t}),a]});var kl=require("react/jsx-runtime"),ao=({style:t,children:n})=>(0,kl.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"dashed 1px var(--GREY-300)",borderRadius:"4px",paddingBlock:"32px",...t},children:(0,kl.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"470px"},children:n})});var _i=require("react/jsx-runtime"),so=class extends xg.default.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){Xt(n)}render(){return this.state.hasError?(0,_i.jsxs)(ao,{children:[(0,_i.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"We ran into an error"}),(0,_i.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Please try reloading. If the problem persists reach out to our support team."}),(0,_i.jsx)("div",{children:(0,_i.jsx)(Qe,{variant:"outlined",iconBefore:"autorenew",onClick:()=>location.reload(),children:"Try again"})})]}):this.props.children}};var yi=require("react/jsx-runtime"),Ag=({height:t,message:n})=>(0,yi.jsxs)(ao,{style:{minHeight:t},children:[(0,yi.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Failed to load extras"}),(0,yi.jsx)("p",{className:"p2--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:n||"Please try reloading. If the problem persists reach out to our support team."}),(0,yi.jsx)("div",{children:(0,yi.jsx)(Qe,{variant:"outlined",onClick:()=>location.reload(),iconBefore:"autorenew",children:"Try again"})})]});var co=t=>t.reduce((n,{id:i,total_amount:a,total_currency:s})=>({[i]:{total_amount:a,total_currency:s},...n}),{});var Fr=(t,n,i)=>{if(!t||n.length===0)return 0;let a=co(t.available_services);return ca(a,n,i)},ca=(t,n,i)=>n.reduce((a,{quantity:s,id:u})=>{let l=a;return u in t?l+=s*+t[u].total_amount:i?l+=s*rT(u,i):Xt(new Error(`The service id (${u}) provided could not be found in neither the offer nor the seat maps.`)),l},0),rT=(t,n)=>{for(let i of n)for(let a of i.cabins)for(let s of a.rows)for(let u of s.sections)for(let l of u.elements)if(l.type==="seat"&&Array.isArray(l.available_services)){let p=l.available_services.find(m=>m.id===t);if(p)return+p.total_amount}return 0};var Og=({baggageSelectedServices:t,seatSelectedServices:n,cfarSelectedServices:i,offer:a,seatMaps:s,passengers:u})=>{let l=[...t,...n,...i],p=+a.total_amount+Fr(a,l,s);return{...a&&{selected_offers:[a.id]},passengers:u,services:iT(l),...a&&{payments:[{type:"balance",amount:`${p}`,currency:a.total_currency}]},type:"instant",metadata:{source:"duffel-ancillaries@3.1.2--prototype.2"}}},iT=t=>Array.isArray(t)?t.filter(({quantity:n})=>n>0).map(({id:n,quantity:i})=>({id:n,quantity:i})):[];var Fl=t=>(n,i)=>{let{rate:a,amount:s}=t;return{amount:n*(1+a)+s,currency:i}},Ul="You cannot supply both markup and priceFormatters for the same service.",Ig=(t,n)=>{let i={};if(n&&(n.bags&&(i.bags=n.bags),n.seats&&(i.seats=n.seats),n.cancel_for_any_reason&&(i.cancel_for_any_reason=n.cancel_for_any_reason)),t){if(t.bags){if(n&&n.bags)throw new Error(Ul);i.bags=Fl(t.bags)}if(t.seats){if(n&&n.seats)throw new Error(Ul);i.seats=Fl(t.seats)}if(t.cancel_for_any_reason){if(n&&n.cancel_for_any_reason)throw new Error(Ul);i.cancel_for_any_reason=Fl(t.cancel_for_any_reason)}}return i};var Xs=t=>t.type==="baggage";var uo=t=>t.type==="cancel_for_any_reason";var oT=(t,n)=>`${t} must all have the same currency, but they have ${n.size} different currencies (${[...n].join(", ")}). Check the price formatters passed into the component's render function.`,wg=(t,n)=>{if(!n)return t;let i=t.available_services,a=new Set,s={baggage:n?.bags,cancel_for_any_reason:n?.cancel_for_any_reason},u=i.map(l=>{let p={...l};if(l.type in s&&s[l.type]){let{total_amount:m,total_currency:h}=l;if(Xs(l)){let{amount:S,currency:v}=s[l.type](+l.total_amount,l.total_currency,l);m=S.toString(),v&&(h=v)}if(uo(l)){let{amount:S,currency:v}=s[l.type](+l.total_amount,l.total_currency,l);m=S.toString(),v&&(h=v)}if(a.add(h),a.size>1)throw new Error(oT(l.type,a));p.total_amount=m,p.total_currency=h}return p});return{...t,available_services:u}};function js(t){return t.type==="seat"}var aT=t=>`Seats must all have the same currency, but they have ${t.size} different currencies (${[...t].join(", ")}). Check the price formatters passed into the component's render function.`,sT=(t,n,i)=>{let a={...t};if(js(a)&&a.available_services.length>0){let s=a.available_services.map(u=>{let l={...u},{amount:p,currency:m}=n(+u.total_amount,u.total_currency,u);if(l.total_amount=p.toString(),m&&(l.total_currency=m,i.add(m),i.size>1))throw new Error(aT(i));return l});a.available_services=s}return a},Pg=(t,n)=>{if(!n)return t;let i=new Set;return t.map(s=>{let u=s.cabins.map(l=>{let p=l.rows.map(m=>{let h=m.sections.map(S=>{let v=S.elements.map(I=>sT(I,n,i));return{...S,elements:v}});return{...m,sections:h}});return{...l,rows:p}});return{...s,cabins:u}})};var Js=t=>{let n=t.split(", ").map(a=>parseInt(a));return(.2126*n[0]+.7152*n[1]+.0722*n[2])/255>.5};var Ng=t=>"selected_offers"in t&&"passengers"in t&&"services"in t&&"payments"in t&&"type"in t&&"metadata"in t;var Mg=t=>t.expires_at&&new Date(t.expires_at)<new Date;var ua=t=>"data"in t&&Array.isArray(t.data.errors),cT="https://api.duffel.com",uT="3.1.2--prototype.2";async function Qs(t,n,i="GET",a){or("Making request to the Duffel API",{path:n,method:i});let s=`${cT}/ancillaries-component/${n}`,u=null;try{u=await fetch(s,{method:i,body:a,headers:{"Duffel-Version":"v1",Authorization:`Bearer ${t}`,"User-Agent":`Duffel/ancillaries-component@${uT}`}})}catch(p){throw or("Failed to make request to the Duffel API",{error:p}),p}let l=await u.json();if(Array.isArray(l.errors))throw or("Request to the Duffel API failed",{operation:`${i} ${s}`,method:i,request_id:l?.meta?.request_id,errors:l.errors,status:u.status}),{...u,data:l};return or("Request to the Duffel succeeded",{request_id:l?.meta?.request_id}),l}var Dg="https://assets.duffel.com/components/3.1.2--prototype.2",Bg=async t=>await(await fetch(Dg+`/fixtures/offers/${t}.json`)).json(),Lg=async t=>await(await fetch(Dg+`/fixtures/seat-maps/${t}.json`)).json();var ec=t=>t.startsWith("fixture_off_");async function kg(t,n){return(await Qs(n,`offers/${t}?return_available_services=true`)).data}async function Fg(t,n,i,a,s){a(!0);let u=ec(t);if(t=u?t.replace("fixture_",""):t,u)return Bg(t).then(l=>{a(!1),s(l)});if(!n)throw new Error("Attempted to retrieve seat maps but the client key is missing.");try{let l=await kg(t,n);s(l)}catch(l){let p="An unknown error occurred while retrieving the offer.";l instanceof Error?(p=l.message,l.message.includes("Load failed")&&(p="The Duffel API is not available. Please try again later.")):ua(l)&&l.status===404&&(p="The offer you are looking for does not exist or has expired."),ua(l)&&l.status>=500&&l.status<600&&Xt(new Error(p)),i(p)}finally{a(!1)}}async function Ug(t,n){return(await Qs(n,`offers/${t}/seat_maps`)).data}async function Gg(t,n,i,a,s){a(!0);let u=ec(t);if(t=u?t.replace("fixture_",""):t,u)return Lg(t).then(l=>{a(!1),s(l)});if(!n)throw new Error("Attemptted to retrieve seat maps but the client key is missing.");try{let l=await Ug(t,n);s(l)}catch(l){let p="An unknown error occurred while retrieving the seat maps.";l instanceof Error?(p=l.message,l.message.includes("Load failed")&&(p="The Duffel API is not available. Please try again later.")):ua(l)&&(p=l.data.errors[0]?.message||"Received an unknown error from the Duffel API."),Xt(new Error(p)),i()}finally{a(!1)}}var Gl=t=>lT(t)&&(Hl(t)||$l(t)||Yl(t)||Wl(t)),lT=t=>"onPayloadReady"in t&&"passengers"in t&&"services"in t,Hl=t=>"offer_id"in t&&t.offer_id.startsWith("fixture_"),$l=t=>"offer_id"in t&&"client_key"in t,Yl=t=>"offer"in t&&"seat_maps"in t,Wl=t=>"offer"in t&&"client_key"in t;var wt=ge(require("react"));var Hg=require("react/jsx-runtime"),lo=()=>(0,Hg.jsx)("span",{className:"textual-loading-indicator","aria-hidden":"true"});var $g=require("react/jsx-runtime"),ar=({backgroundColor:t,color:n,children:i})=>(0,$g.jsx)("div",{style:{backgroundColor:t,color:n,padding:"2px 8px",whiteSpace:"nowrap",borderRadius:"4px",fontWeight:"600",fontSize:"14px",lineHeight:"20px",textAlign:"center"},children:i});var fo=(t,n)=>{if(t.available_services.length===0)throw new Error("No services available");let i=t.available_services.find(a=>a.type===n);if(!i)throw new Error(`No ${n} services available`);return i.total_currency};var Dn=t=>t.reduce((n,{quantity:i})=>n+i,0);var fT={baggage:Xs,cancel_for_any_reason:uo},po=(t,n)=>{let i=fT[n];if(!i)throw new Error(`Unknown service type: ${n}`);return t&&Array.isArray(t.available_services)&&t.available_services.some(a=>i(a)&&a.maximum_quantity>0)};var Ue=(t,n="en-GB",i={})=>a=>{try{let u=new Intl.NumberFormat(n,{style:"currency",currency:t,...i}).format(a);return i&&i.signDisplay&&(i.signDisplay==="always"||i.signDisplay==="exceptZero"&&a!==0)?u.replace(/^([+-])/,"$1 "):u}catch{return`${a} ${t}`}};var Sn=(t,n,i)=>t==1?`${t} ${n}`:`${t} ${i}`;var ah=ge(require("react"));var Yg=ge(yn()),Wg=ge(require("react"));var jt=require("react/jsx-runtime"),mo=({buttonTitle:t,title:n,icon:i,copy:a,onClick:s,children:u,isLoading:l,disabled:p,isSelected:m})=>{let h=Wg.Children.toArray(u).length>0;return(0,jt.jsxs)("button",{title:t,...s&&{onClick:s},disabled:p,className:(0,Yg.default)("ancillary-card",l&&"ancillary-card--loading"),style:{cursor:"pointer",background:"transparent",color:"var(--GREY-900)",border:"solid 1px rgba(226, 226, 232, 1)",display:"flex",rowGap:"4px",padding:"20px",borderRadius:"8px",justifyContent:"space-between",flexWrap:"wrap",flexDirection:"column",width:"100%",boxSizing:"border-box",fontSize:"16px",fontWeight:"400",lineHeight:"24px",letterSpacing:"0em",transition:"border-color 0.3s var(--TRANSITION-CUBIC-BEZIER) background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)"},children:[(0,jt.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",marginBlock:"0",textAlign:"start",marginTop:"2px",columnGap:"12px",width:"100%"},children:[(0,jt.jsx)("div",{children:m?(0,jt.jsx)(pe,{name:"check",className:"ancillary-card__selected-icon"}):(0,jt.jsx)(pe,{name:i})}),(0,jt.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"start",width:"100%"},children:[(0,jt.jsx)("p",{className:"p1--semibold",style:{marginBlock:"0"},children:n}),(0,jt.jsx)("div",{className:"ancillary-card__children",children:h?u:(0,jt.jsx)(pe,{name:"expand_content",className:"ancillary-card__expand-icon"})})]})]}),(0,jt.jsx)("p",{className:"p1--regular",style:{textAlign:"start",color:"var(--GREY-600)",marginLeft:"34px",marginBlock:"0"},children:a})]})};var Vl=t=>{t?document.body.style.overflow="":document.body.style.overflow="hidden"};var qg=ge(yn()),zg=ge(require("react"));var Vg=ge(yn());var ql=require("react/jsx-runtime"),pT={primary:"icon-button--primary",outlined:"icon-button--outlined"},la=({icon:t,variant:n="primary",className:i,...a})=>(0,ql.jsx)("button",{type:"button",className:(0,Vg.default)("icon-button",pT[n],i),...a,children:(0,ql.jsx)(pe,{name:t})});var go=require("react/jsx-runtime"),ho=({children:t,onClose:n,isOpen:i})=>(zg.useEffect(()=>(Vl(!i),()=>Vl(!0)),[i]),(0,go.jsx)("div",{className:(0,qg.default)("modal",i&&"modal--open"),style:{opacity:0},children:(0,go.jsxs)("div",{role:"presentation",className:"modal--content",children:[t,(0,go.jsx)(la,{icon:"close",onClick:n,title:"Close modal",className:"modal--close-button"})]})})),_o=({children:t})=>(0,go.jsx)("div",{className:"modal-body",children:t});var tc=t=>t.reduce((n,i)=>({[i.id]:i,...n}),{});var nc=t=>t.slices.reduce((n,i)=>[...n,...i.segments],new Array);var oc=ge(require("react"));var rc=(t,n,i)=>t?t.given_name&&t.family_name?`${t.given_name} ${t.family_name}`:t.given_name?t.given_name:t.family_name?t.family_name:n?.given_name&&n?.family_name?`${n.given_name} ${n.family_name}`:n?.given_name?n.given_name:n?.family_name?n.family_name:`Passenger ${i}`:`Passenger ${i}`;var Kg=t=>{if(!t)return Xt(new Error("getBaggageServiceDescription was not given any metadata")),null;if(!t.maximum_weight_kg&&!t.maximum_length_cm&&!t.maximum_height_cm&&!t.maximum_depth_cm)return null;let n=t.maximum_length_cm&&t.maximum_height_cm&&t.maximum_depth_cm,i="";n&&(i=` / ${t.maximum_height_cm} x ${t.maximum_length_cm} x ${t.maximum_depth_cm} cm`);let a="";return t.maximum_weight_kg&&(a=`Up to ${t.maximum_weight_kg}kg`),`${a}${i}`};var Zg=(t,n,i,a)=>t.some(s=>s.id===a.id||s.serviceInformation?.type!=="carry_on"&&s.serviceInformation?.type!=="checked"||s.serviceInformation?.segmentId!==n||s.serviceInformation?.passengerId!==i?!1:s.serviceInformation?.type===a.metadata.type);var yo=require("react/jsx-runtime"),Xg=({id:t,min:n,max:i,value:a,onChange:s})=>(0,yo.jsxs)("div",{className:"counter",id:t,children:[(0,yo.jsx)(la,{icon:"minus",title:"Remove one",id:`${t}-minus`,"data-testid":`${t}-minus`,variant:"outlined",disabled:a<=n,onClick:()=>s(Math.max(a-1,n))}),(0,yo.jsx)("div",{className:"counter__count-label",children:a}),(0,yo.jsx)(la,{icon:"add",title:"Add one",id:`${t}-plus`,"data-testid":`${t}-plus`,variant:"outlined",disabled:a>=i,onClick:()=>s(Math.min(a+1,i))})]});var sr=require("react/jsx-runtime"),jg=({segmentId:t,passengerId:n,availableService:i,quantity:a,onQuantityChanged:s,selectedServices:u})=>{let l=i.metadata.type==="carry_on"?"Cabin bag":"Checked bag",p=Ue(i.total_currency)(+i.total_amount),m=Kg(i.metadata),h=Zg(u,t,n,i);return(0,sr.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,sr.jsxs)("div",{children:[(0,sr.jsxs)("p",{style:{margin:0},className:"p2--regular",children:[l,(0,sr.jsx)("span",{style:{marginInline:"4px",color:"var(--GREY-400)"},children:"\u2022"}),(0,sr.jsx)("span",{className:"p2--semibold","data-testid":`price-label--${i.id}--${n}`,children:p})]}),(0,sr.jsx)("p",{style:{margin:0,color:"var(--GREY-600)"},className:"p3--regular",children:m})]}),(0,sr.jsx)(Xg,{id:`counter--${i.id}--${n}`,min:0,value:a,onChange:s,max:h?0:i.maximum_quantity})]})};var Qg=require("react/jsx-runtime"),Jg=({includedBaggage:t})=>{let{carryOnBagsQuantity:n,checkedBagsQuantity:i}=t.reduce((s,{type:u,quantity:l})=>({carryOnBagsQuantity:s.carryOnBagsQuantity+(u==="carry_on"?l:0),checkedBagsQuantity:s.checkedBagsQuantity+(u==="checked"?l:0)}),{carryOnBagsQuantity:0,checkedBagsQuantity:0}),a=new Array;return n>0&&a.push(Sn(n,"cabin bag","cabin bags")),i>0&&a.push(Sn(i,"checked bag","checked bags")),(0,Qg.jsxs)("div",{style:{marginBlock:"8px",padding:"8px 12px",color:" var(--GREEN-300)",backgroundColor:" var(--GREEN-100)",borderRadius:"6px"},className:"p2--regular",children:[a.join(" and ")," included with ticket"]})};var Ur=require("react/jsx-runtime"),eh=({segmentId:t,passengerId:n,passengerName:i,includedBaggage:a,passengerServicesForSegment:s,selectedServices:u,setSelectedServices:l})=>{let p=a.reduce((m,h)=>m+h.quantity,0);return(0,Ur.jsxs)("div",{style:{marginTop:"24px"},children:[(0,Ur.jsx)("h3",{style:{margin:0},className:"p1--semibold",children:i}),p?(0,Ur.jsx)(Jg,{includedBaggage:a}):null,(0,Ur.jsx)("div",{style:{display:"flex",rowGap:"8px",flexDirection:"column"},children:s.map(m=>(0,Ur.jsx)(jg,{passengerId:n,segmentId:t,availableService:m,selectedServices:u,quantity:u.find(({id:h})=>h==m.id)?.quantity||0,onQuantityChanged:h=>dT(h,t,n,i,m,u,l)},m.id))}),s.length===0&&(0,Ur.jsx)("p",{style:{color:"var(--GREY-700)",margin:0},children:"Extra baggage is not available for this passenger on this flight"})]})},dT=(t,n,i,a,s,u,l)=>{let p=u.findIndex(({id:h})=>s.id===h),m=Array.from(u);p<0?m.push({id:s.id,quantity:t,serviceInformation:{segmentId:n,passengerId:i,passengerName:a,total_amount:s.total_amount,total_currency:s.total_currency,...s.metadata}}):m[p].quantity=t,l(m.filter(({quantity:h})=>h!==0))};var zl=require("react/jsx-runtime"),th=({offer:t,segment:n,passengersById:i,selectedServices:a,setSelectedServices:s})=>(0,zl.jsx)(_o,{children:n.passengers.map(({passenger_id:u,baggages:l},p)=>(0,zl.jsx)(eh,{segmentId:n.id,passengerId:u,passengerName:rc(i[u],t.passengers.find(({id:m})=>m===u),p+1),includedBaggage:l,passengerServicesForSegment:t.available_services.filter(({type:m,passenger_ids:h,segment_ids:S})=>m==="baggage"&&h.includes(u)&&S.includes(n.id)),selectedServices:a,setSelectedServices:s},u))});var cr=require("react/jsx-runtime"),nh=({selectedServices:t,servicePrices:n,currency:i,isFirstSegment:a,isLastSegment:s,onNextSegmentButtonClicked:u,onPreviousSegmentButtonClicked:l,onClose:p})=>{let m=Dn(t),h=ca(n,t),S=Ue(i)(h),v=a&&a;return(0,cr.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,cr.jsxs)("div",{className:"flex--space-between",children:[(0,cr.jsxs)("div",{children:["Price for ",Sn(m,"extra bag","extra bags")]}),(0,cr.jsxs)("div",{className:"h3--semibold","data-testid":"baggage-total-amount-label",children:["+ ",S]})]}),(0,cr.jsxs)("div",{style:v?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!v&&(0,cr.jsx)(Qe,{size:48,variant:"outlined",disabled:a,onClick:()=>l(),children:"Back"}),(0,cr.jsx)(Qe,{size:48,"data-testid":"confirm-selection-for-baggage",onClick:()=>s?p():u(),children:s?"Confirm":"Next"})]})]})};var ic=t=>{let n=new Date(t);if(isNaN(n.valueOf()))Xt(new Error(`formatDateString attempted to parse an invalid date string: ${t}`));else return mT(n)},mT=t=>{let{format:n}=new Intl.DateTimeFormat(void 0,{dateStyle:"medium"});return n(t)};var Bn=require("react/jsx-runtime"),rh=({segmentCount:t,currentSegmentIndex:n,currentSegment:i,setCurrentSegmentIndex:a})=>(0,Bn.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,Bn.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((s,u)=>u===n?(0,Bn.jsx)(gT,{},`segment_${u}`):(0,Bn.jsx)(ih,{onClick:()=>a(u)},`segment_${u}`))}),(0,Bn.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginTop:"12px"}:{},children:["Flight to ",i.destination.iata_code,(0,Bn.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:ic(i.departing_at)})]})]}),ih=({onClick:t,style:n})=>(0,Bn.jsx)("button",{onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...n}}),gT=()=>(0,Bn.jsx)(ih,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var So=require("react/jsx-runtime"),oh=({isOpen:t,offer:n,passengers:i,onClose:a,selectedServices:s})=>{let[u,l]=(0,oc.useState)(0),[p,m]=oc.default.useState(s);if(!n)return null;let h=nc(n),S=h[u],v=tc(i),I=co(n.available_services),P=n.base_currency;return po(n,"baggage")&&(P=fo(n,"baggage")),(0,So.jsxs)(ho,{isOpen:t,onClose:()=>a(s),children:[(0,So.jsx)(rh,{segmentCount:h.length,currentSegment:S,currentSegmentIndex:u,setCurrentSegmentIndex:L=>l(L)}),(0,So.jsx)(th,{offer:n,selectedServices:p,passengersById:v,segment:S,setSelectedServices:m}),(0,So.jsx)(nh,{currency:P,selectedServices:p,servicePrices:I,isFirstSegment:u===0,isLastSegment:u+1===h.length,onNextSegmentButtonClicked:()=>l(u+1),onPreviousSegmentButtonClicked:()=>l(u-1),onClose:()=>a(p)})]})};var Ln=require("react/jsx-runtime"),sh=({isLoading:t,offer:n,passengers:i,selectedServices:a,setSelectedServices:s})=>{let[u,l]=ah.default.useState(!1),p=po(n,"baggage"),m=Dn(a),h=m>0,S=Fr(n,a),v=n?.base_currency||"";p&&(v=fo(n,"baggage"));let I=n?Ue(v)(S):"0",P=p&&h?`${Sn(m,"bag","bags")} added for ${I}`:"Add any extra baggage you need for your trip";return(0,Ln.jsxs)(Ln.Fragment,{children:[(0,Ln.jsxs)(mo,{buttonTitle:"Select extra baggage",title:"Extra baggage",copy:P,icon:"cabin_bag",onClick:p?()=>l(!0):null,isLoading:t,disabled:!t&&!p,isSelected:h,children:[t&&(0,Ln.jsxs)(ar,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,Ln.jsx)(lo,{})]}),!t&&!p&&(0,Ln.jsx)(ar,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,Ln.jsx)(oh,{isOpen:!!(u&&n),offer:n,passengers:i,onClose:L=>{let Y=JSON.parse(JSON.stringify(L));s(Y),l(!1)},selectedServices:a})]})};var ph=ge(require("react"));var fa=require("react/jsx-runtime"),ac=({children:t})=>(0,fa.jsxs)("li",{className:"cfar-modal-list-item",children:[(0,fa.jsx)(pe,{name:"check"}),(0,fa.jsx)("p",{children:t})]});var ur=require("react/jsx-runtime"),ch=({offerCurrency:t,service:n})=>(0,ur.jsxs)(_o,{children:[(0,ur.jsxs)("ul",{style:{padding:0},children:[(0,ur.jsx)(ac,{children:"Cancel your trip for any reason"}),(0,ur.jsxs)(ac,{children:["Guaranteed refund of"," ",Ue(t)(+n.metadata.refund_amount)]}),(0,ur.jsx)(ac,{children:"Redeemable up to 24 hours before first flight departure"})]}),(0,ur.jsxs)("a",{href:n.metadata.terms_and_conditions_url,rel:"noopener noreferrer",target:"_blank",className:"p2--regular",style:{color:"var(--GREY-600)"},children:["Terms and conditions",(0,ur.jsx)(pe,{name:"north_east",size:16,style:{display:"inline",verticalAlign:"middle",marginLeft:"4px"}})]})]});var Gr=require("react/jsx-runtime"),uh=({service:t,selectedServices:n,onAddCfarService:i,onRemoveCfarService:a,onClose:s})=>{let u=n.some(({id:p})=>p==t.id),l=Ue(t.total_currency)(+t.total_amount);return(0,Gr.jsxs)("div",{className:"cfar-modal-footer",children:[(0,Gr.jsx)(Qe,{size:48,variant:u?"destructive":"outlined",onClick:u?a:s,children:u?"Remove protection":"Don\u2019t protect trip"}),!u&&(0,Gr.jsxs)(Qe,{size:48,"data-testid":"confirm-selection-for-cfar",onClick:i,children:["Add protection for ",l]}),u&&(0,Gr.jsx)(hT,{})]})},hT=()=>(0,Gr.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",columnGap:"8px",backgroundColor:"var(--GREY-100)",padding:"var(--space-12)",borderRadius:"var(--BUTTON-RADIUS)"},children:[(0,Gr.jsx)(pe,{size:20,name:"shield_with_moon",style:{fill:"var(--SECONDARY, rgb(var(--ACCENT)))"}}),"Your trip is protected"]});var Kl=require("react/jsx-runtime"),lh=()=>(0,Kl.jsx)("div",{style:{padding:"24px 24px 16px"},children:(0,Kl.jsx)("h2",{className:"h3--semibold",style:{marginBlock:0},children:"Cancel for any reason"})});var lr=require("react/jsx-runtime"),fh=({isOpen:t,offerCurrency:n,service:i,onClose:a,selectedServices:s})=>(0,lr.jsxs)(ho,{isOpen:t,onClose:()=>a(s),children:[(0,lr.jsx)(lh,{}),i&&n&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(ch,{service:i,offerCurrency:n}),(0,lr.jsx)(uh,{service:i,selectedServices:s,onAddCfarService:()=>a([{id:i.id,quantity:1,serviceInformation:{type:"cancel_for_any_reason",total_amount:i.total_amount,total_currency:i.total_currency,...i.metadata}}]),onRemoveCfarService:()=>a([]),onClose:()=>a(s)})]})]});var kn=require("react/jsx-runtime"),dh=({isLoading:t,offer:n,selectedServices:i,setSelectedServices:a})=>{let[s,u]=ph.default.useState(!1),l=po(n,"cancel_for_any_reason"),m=Dn(i)>0,h=n?.base_currency||"";l&&(h=fo(n,"cancel_for_any_reason"));let S=Fr(n,i),v=n?Ue(h)(S):"0",I=n?.available_services.find(uo),P=l&&m?`Your trip is protected for ${v}`:"Protect your purchase if you decide to cancel";return(0,kn.jsxs)(kn.Fragment,{children:[(0,kn.jsxs)(mo,{buttonTitle:"Add cancel for any reason",title:"Cancel for any reason",copy:P,icon:"shield_with_moon",onClick:l?()=>u(!0):null,isLoading:t,disabled:!t&&!l,isSelected:m,children:[t&&(0,kn.jsxs)(ar,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,kn.jsx)(lo,{})]}),!t&&!l&&(0,kn.jsx)(ar,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,kn.jsx)(fh,{isOpen:!!(s&&n&&I),offerCurrency:n?.base_currency,service:I,onClose:L=>{u(!1),a(L)},selectedServices:i})]})};var mh=(t,n)=>{for(let i of t)for(let a of i.cabins)for(let s of a.rows)for(let u of s.sections)for(let l of u.elements)if(n(l))return l};var sc=t=>mh(t,i=>i.type==="seat"&&i.available_services.length>0)?.available_services[0]?.total_currency;var zh=ge(require("react"));var gh=t=>t.flatMap(n=>n.passengers.map((i,a)=>({passenger:i,passengerIndex:a,segment:n})));var tf=ge(require("react"));var hh=(t,n)=>n.cabins.filter(i=>i.deck===t);var _h=t=>{let n=new Set;for(let i of t)for(let a of i.rows)for(let s of a.sections)for(let u of s.elements)u.type!=="seat"&&u.type!=="empty"&&n.add(u.type);return n};var yh=(t,n)=>!!(t.wings&&t.wings.first_row_index<=n&&t.wings.last_row_index>=n);var Uh=ge(yn()),Gh=ge(require("react"));var Sh=ge(yn());var Zl=require("react/jsx-runtime"),vh=({value:t,onChange:n,options:i})=>(0,Zl.jsx)("div",{className:"seat-map__tab-select",children:i.map(a=>(0,Zl.jsx)("button",{type:"button",className:(0,Sh.default)("seat-map__tab-select-option",{"seat-map__tab-select-option--selected":a===t}),onClick:()=>t!==a&&n(a),children:a},a))});var Ch=require("react/jsx-runtime"),Eh=({value:t,setValue:n})=>{let i=["Lower deck","Upper deck"];return(0,Ch.jsx)(vh,{options:i,value:i[t],onChange:a=>n(i.indexOf(a))})};var lt=require("react/jsx-runtime"),bh=({symbols:t})=>(0,lt.jsxs)("div",{className:"seat-map__legend",children:[(0,lt.jsxs)("span",{className:"seat-map__legend-item",children:[(0,lt.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--fee-payable","aria-label":"Additional cost for seat",children:(0,lt.jsx)(pe,{name:"seat_paid_indicator",className:"seat-map__legend-seat--fee-payable-indicator",size:12})}),"Additional Cost"]}),(0,lt.jsxs)("span",{className:"seat-map__legend-item",children:[(0,lt.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--included","aria-label":"Included seat"}),"Included"]}),(0,lt.jsxs)("span",{className:"seat-map__legend-item",children:[(0,lt.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--selected","aria-label":"Selected seat"}),"Selected"]}),(0,lt.jsxs)("span",{className:"seat-map__legend-item",children:[(0,lt.jsx)("span",{className:"seat-map__legend-seat","aria-label":"Unavailable seat",children:(0,lt.jsx)(pe,{name:"close",size:14})}),"Unavailable"]}),[...t].map(n=>(0,lt.jsxs)("span",{className:"seat-map__legend-item seat-map__legend-item--symbol",children:[(0,lt.jsx)(pe,{name:n,size:20}),n.split("_")[0]]},n))]});var Th=t=>{let n=Object.values(t.sections).map(i=>i.elements).reduce((i,a)=>i.concat(a),[]).filter(i=>i.type==="seat");return n.length>0?n[0].designator.substring(0,n[0].designator.length-1):null};var Lh=ge(yn()),Jl=ge(require("react"));var Rh=ge(yn());var Xl=require("react/jsx-runtime"),_T=["bassinet","exit_row"],xh=({type:t})=>(0,Xl.jsx)("div",{className:(0,Rh.default)("map-element map-element--amenity",{"map-element--wrapped":!_T.includes(t)}),"aria-label":t.toString(),children:(0,Xl.jsx)(pe,{name:t,size:16})});var Ah=require("react/jsx-runtime"),pa=()=>(0,Ah.jsx)("div",{className:"map-element map-element--empty"});var Oh=ge(yn());var cc=require("react/jsx-runtime"),Ih=({isRight:t})=>(0,cc.jsx)("div",{className:(0,Oh.default)("map-element map-element--exit",{"map-element--exit--right":t}),children:t?(0,cc.jsx)(pe,{name:"exit_row_right"}):(0,cc.jsx)(pe,{name:"exit_row"})});var wh=(t="")=>t.split(" ").map(n=>n[0]).slice(0,2).join("");var Mh=ge(yn());var Hr=require("react/jsx-runtime"),Ph=({seat:t,service:n})=>{let i=n?Ue(n.total_currency)(+n.total_amount):"";return(0,Hr.jsxs)("div",{className:"seat-info",children:[(0,Hr.jsxs)("div",{className:"seat-info__details",children:[(0,Hr.jsx)("strong",{children:t?.designator}),(0,Hr.jsxs)("span",{children:[t?.name||"Seat"," "]}),(0,Hr.jsx)("strong",{children:i})]}),t?.disclosures.map((a,s)=>(0,Hr.jsx)("div",{className:"seat-info__disclosure",children:a},s))]})};var jl=require("react/jsx-runtime"),Nh=({seat:t})=>(0,jl.jsx)("span",{className:"map-element map-element__seat","aria-label":`${t.designator} ${t.name||"Seat"} Unavailable`,children:(0,jl.jsx)(pe,{name:"close",size:14})});var fr=require("react/jsx-runtime"),Dh=({element:t,currentPassengerId:n,currentSegmentId:i,currentPassengerName:a,onSeatToggled:s,selectedServicesMap:u})=>{let l=t.available_services.find(ce=>ce.passenger_id===n);if(!l)return(0,fr.jsx)(Nh,{seat:t});let p=Object.values(u).find(ce=>ce.serviceInformation?.designator===t.designator&&ce.serviceInformation?.segmentId===i),m=p!=null,h=m?wh(p.serviceInformation?.passengerName):t.designator.charAt(t.designator.length-1),S=!isNaN(+l?.total_amount)&&+l?.total_amount!=0,v=!m&&l.passenger_id===n,I=!m||m&&i===p.serviceInformation?.segmentId&&n===p.serviceInformation?.passengerId,P=(0,Mh.default)("map-element","map-element__seat",{"map-element--available":v,"map-element--selected":m,"map-element--actionable":I}),L=Ue(l.total_currency)(+l.total_amount),Y=m&&i===p.serviceInformation?.segmentId&&n===p.serviceInformation?.passengerId;return(0,fr.jsxs)(fr.Fragment,{children:[(0,fr.jsxs)("button",{"data-testid":`seat-${t.designator}`,id:t.designator,className:P,onClick:()=>{I&&s({quantity:m?0:1,id:l.id,serviceInformation:{type:"seat",segmentId:i,passengerId:n,passengerName:a,designator:t.designator,disclosures:t.disclosures,total_amount:l.total_amount,total_currency:l.total_currency}})},"aria-label":`${t.designator} ${t.name||"Seat"} ${L}`,children:[S&&(0,fr.jsx)(pe,{name:"seat_paid_indicator",className:"map-element--fee-payable",size:16}),h]}),Y&&(0,fr.jsx)(Ph,{seat:t,service:l})]})};var $r=require("react/jsx-runtime"),Bh=({element:t,elementIndex:n,sectionIndex:i,onSeatToggled:a,selectedServicesMap:s,currentPassengerId:u,currentSegmentId:l,currentPassengerName:p})=>(0,$r.jsx)($r.Fragment,{children:js(t)?(0,$r.jsx)(Dh,{currentSegmentId:l,currentPassengerId:u,currentPassengerName:p,selectedServicesMap:s,element:t,onSeatToggled:a},n):t.type==="empty"?(0,$r.jsx)(pa,{},n):t.type==="exit_row"?(0,$r.jsx)(Ih,{isRight:i>0},n):(0,$r.jsx)(xh,{type:t.type},n)});var pr=require("react/jsx-runtime"),kh=({row:t,rowNumber:n,hasWings:i,section:a,sectionIndex:s,onSeatToggled:u,selectedServicesMap:l,currentPassengerId:p,currentPassengerName:m,currentSegmentId:h})=>{let S=Object.keys(t.sections).length,v=S===1;return(0,pr.jsxs)(Jl.Fragment,{children:[(0,pr.jsx)("div",{className:(0,Lh.default)("map-section",{"map-section--left":s===0,"map-section--right":v?!1:s===S-1,"map-section--wing":i}),children:a.elements.length>0?a.elements.map((I,P)=>(0,pr.jsx)(Jl.Fragment,{children:(0,pr.jsx)(Bh,{sectionIndex:s,elementIndex:P,element:I,selectedServicesMap:l,onSeatToggled:u,currentPassengerId:p,currentSegmentId:h,currentPassengerName:m})},P)):(0,pr.jsx)(pa,{})}),(s<S-1||v&&s<S)&&(0,pr.jsx)("span",{className:"map-section__aisle",children:n}),v&&s===t.sections.length-1&&(0,pr.jsx)(pa,{})]},s)};var da=require("react/jsx-runtime"),Fh=({row:t,hasWings:n,onSeatToggled:i,selectedServicesMap:a,currentPassengerId:s,currentPassengerName:u,currentSegmentId:l})=>{let p=Th(t);return(0,da.jsx)(da.Fragment,{children:t.sections.map((m,h)=>(0,da.jsx)(kh,{row:t,rowNumber:p,hasWings:n,section:m,sectionIndex:h,selectedServicesMap:a,onSeatToggled:i,currentPassengerId:s,currentPassengerName:u,currentSegmentId:l},h))})};var ma=require("react/jsx-runtime"),Ql=()=>(0,ma.jsxs)(ao,{children:[(0,ma.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Seat selection unavailable"}),(0,ma.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Unfortunately seat selection is not available for this flight. A seat will be allocated by the airline."})]});var Fn=require("react/jsx-runtime"),Hh=({seatMap:t,onSeatToggled:n,selectedServicesMap:i,currentPassengerId:a,currentPassengerName:s,currentSegmentId:u})=>{let[l,p]=Gh.useState(0);if(!t||!t.cabins||!t.cabins.length)return(0,Fn.jsx)(Ql,{});let m=hh(l,t),h=m.length!==t.cabins.length,S=t.cabins.some(I=>I.wings);if(!m||!m.length)return(0,Fn.jsx)(Ql,{});let v=_h(m);return(0,Fn.jsxs)("div",{className:(0,Uh.default)("seat-map",{"seat-map--wings":S}),children:[h&&(0,Fn.jsx)(Eh,{value:l,setValue:I=>{p(I)}}),(0,Fn.jsx)("div",{className:"seat-map__legend-container",children:(0,Fn.jsx)(bh,{symbols:v})}),m.map((I,P)=>(0,Fn.jsx)("div",{className:"seat-map__map-container",style:{"--CABIN-AISLES":I.aisles},children:I.rows.map((L,Y)=>(0,Fn.jsx)(Fh,{row:L,hasWings:yh(I,Y),onSeatToggled:n,selectedServicesMap:i,currentPassengerId:a,currentPassengerName:s,currentSegmentId:u},Y))},`cabin-${P}`))]})};var ef=require("react/jsx-runtime"),$h=t=>(0,ef.jsx)(_o,{children:(0,ef.jsx)(Hh,{...t})});var dr=require("react/jsx-runtime"),Yh=({selectedServices:t,servicePrices:n,currency:i,isFirstSegment:a,isLastSegment:s,onNextSegmentButtonClicked:u,onPreviousSegmentButtonClicked:l,onClose:p,seatMaps:m})=>{let h=Dn(t),S=ca(n,t,m),v=Ue(i)(S),I=a&&s;return(0,dr.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,dr.jsxs)("div",{className:"flex--space-between",children:[(0,dr.jsxs)("div",{children:["Price for ",Sn(h,"seat","seats")]}),(0,dr.jsxs)("div",{className:"h3--semibold",children:["+ ",v]})]}),(0,dr.jsxs)("div",{style:I?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!I&&(0,dr.jsx)(Qe,{size:48,disabled:a,variant:"outlined",onClick:()=>l(),children:"Back"}),(0,dr.jsx)(Qe,{size:48,"data-testid":"confirm-selection-for-seats",onClick:()=>s?p():u(),children:s?"Confirm":"Next"})]})]})};var vn=require("react/jsx-runtime"),Wh=({segmentAndPassengerPermutationsCount:t,currentSegmentAndPassengerPermutationsIndex:n,currentSegment:i,currentPassengerName:a,setCurrentSegmentAndPassengerPermutationsIndex:s})=>(0,vn.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,vn.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((u,l)=>l===n?(0,vn.jsx)(yT,{},`segment_${l}`):(0,vn.jsx)(Vh,{onClick:()=>s(l)},`segment_${l}`))}),(0,vn.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginBlock:"12px 0px"}:{},children:["Flight to ",i.destination.iata_code,(0,vn.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:ic(i.departing_at)})]}),(0,vn.jsx)("p",{className:"h3--semibold",style:{color:"var(--GREY-600)",marginBlock:"0 4px"},children:a})]}),Vh=({onClick:t,style:n})=>(0,vn.jsx)("button",{onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...n}}),yT=()=>(0,vn.jsx)(Vh,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var vo=require("react/jsx-runtime"),qh=({isOpen:t,offer:n,passengers:i,seatMaps:a,selectedServices:s,onClose:u})=>{let[l,p]=tf.default.useState(0),[m,h]=tf.default.useState(s),S=m.reduce((he,_e)=>({...he,[_e.id]:_e}),{});if(!n||!a)return null;let v=nc(n),I=tc(i),P=co(n.available_services),L=gh(v),{passenger:{passenger_id:Y},passengerIndex:ce,segment:{id:X}}=L[l],H=v.find(({id:he})=>he===X),ue=I[Y],de=a.find(he=>he.segment_id===X),Ne=rc(ue,n.passengers[ce],ce+1),Me=he=>{let _e=new Array;for(let it of m){let Nt=it.id===he.id&&he.quantity===0,ot=it.serviceInformation?.segmentId===X&&it.serviceInformation?.passengerId===Y;!Nt&&!ot&&(_e=[..._e,it])}he.quantity>0&&(_e=[..._e,he]),h(_e)},Te=sc(a)??n.total_currency;return(0,vo.jsxs)(ho,{isOpen:t,onClose:()=>u(s),children:[(0,vo.jsx)(Wh,{segmentAndPassengerPermutationsCount:L.length,currentSegment:H,currentPassengerName:Ne,currentSegmentAndPassengerPermutationsIndex:l,setCurrentSegmentAndPassengerPermutationsIndex:p}),(0,vo.jsx)($h,{selectedServicesMap:S,seatMap:de,onSeatToggled:Me,currentPassengerId:Y,currentPassengerName:Ne,currentSegmentId:X}),(0,vo.jsx)(Yh,{seatMaps:a,currency:Te,selectedServices:m,servicePrices:P,isFirstSegment:l===0,isLastSegment:l+1===L.length,onNextSegmentButtonClicked:()=>{p(l+1)},onPreviousSegmentButtonClicked:()=>{p(l-1)},onClose:()=>u(m)})]})};var Un=require("react/jsx-runtime"),Kh=({isLoading:t,offer:n,seatMaps:i,passengers:a,selectedServices:s,setSelectedServices:u})=>{let[l,p]=zh.default.useState(!1),m=Array.isArray(i)&&i.length>0,h=Dn(s),S=h>0,v=Fr(n,s,i),I=n?.base_currency??"";i&&(I=sc(i)??I);let P=n?Ue(I)(v):"0",L=m&&S?`${Sn(h,"seat","seats")} selected for ${P}`:"Specify where on the plane you\u2019d like to sit";return(0,Un.jsxs)(Un.Fragment,{children:[(0,Un.jsxs)(mo,{buttonTitle:"Select seats",title:"Seat selection",copy:L,icon:"flight_class",onClick:m?()=>p(!0):null,isLoading:t,disabled:t&&!m,isSelected:S,children:[t&&(0,Un.jsxs)(ar,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,Un.jsx)(lo,{})]}),!t&&!m&&(0,Un.jsx)(ar,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,Un.jsx)(qh,{isOpen:!!(n&&i&&l),seatMaps:i,offer:n,passengers:a,selectedServices:s,onClose:Y=>{u(Y),p(!1)}})]})};var Jt=require("react/jsx-runtime"),ST="https://assets.duffel.com/components/3.1.2--prototype.2",vT=`${ST}/global.css`,ET=t=>{if(zs(t.debug||!1),or("Properties passed into the component:",t),!Gl(t))throw new Error(`The props (${Object.keys(t)}) passed to DuffelAncillaries are invalid. \`onPayloadReady\`, \`passengers\` and \`services\` are always required. Then, depending on your use case you may have one of the following combinations of required props: \`offer_id\` and \`client_key\`, \`offer\` and \`seat_maps\` or \`offer\` and \`client_key\`.Please refer to the documentation for more information and working examples: https://duffel.com/docs/guides/ancillaries-component`);if(t.services.length===0)throw new Error('You must provide at least one service in the "services" prop. Valid services: ["bags", "seats", "cancel_for_any_reason"]');let n=Hl(t),i=$l(t),a=Yl(t),s=Wl(t),u=t.services.includes("seats")&&!("seat_maps"in t)&&(n||i||s),[l,p]=wt.useState(t.passengers),[m,h]=wt.useState(t.offer),[S,v]=wt.useState(i),[I,P]=wt.useState(a?t.seat_maps:void 0),[L,Y]=wt.useState(u),[ce,X]=wt.useState(null),[H,ue]=wt.useState(new Array),[de,Ne]=wt.useState(new Array),[Me,Te]=wt.useState(new Array),he=Ig(t.markup,t.priceFormatters),_e=oe=>{let ye="This offer has expired.";if(Mg(oe)){X(ye);return}else{let Vr=new Date(oe?.expires_at)?.getTime()-Date.now(),Mt=1e3*60*60*24;Vr<Mt&&setTimeout(()=>X(ye),Vr)}let ze=wg(oe,he);h(ze)},it=oe=>{let ye=Pg(oe,he.seats);P(ye)};if(wt.useEffect(()=>{Bs("props",{"props.services":t.services,"props.passengers.length":t.passengers.length,"props.offer_id":t.offer_id,"props.client_key":t.client_key,"props.offer?.id":t.offer?.id,"props.seat_maps?.[0]?.id":t.seat_maps?.[0]?.id}),(i||n)&&Fg(t.offer_id,n?null:t.client_key,X,v,oe=>{if(_e(oe),oe.passengers.length!==l.length)throw new Error(`The number of passengers given to \`duffel-ancillaries\` (${t.passengers.length}) doesn't match the number of passengers on the given offer (${oe.passengers.length}).`);n&&p(t.passengers.map((ye,ze)=>({...ye,id:oe.passengers[ze].id})))}),u&&Gg(i||n?t.offer_id:t.offer.id,n?null:t.client_key,()=>it([]),Y,it),s&&_e(t.offer),a&&(_e(t.offer),it(t.seat_maps))},[t.offer_id,t.client_key,t.offer?.id,t.seat_maps?.[0]?.id]),wt.useEffect(()=>{if(!m)return;let oe=Og({baggageSelectedServices:H,seatSelectedServices:de,cfarSelectedServices:Me,offer:m,passengers:l,seatMaps:I});if(Ng(oe)){let ye={offer_total_amount:m.total_amount,offer_total_currency:m.total_currency,offer_tax_amount:m.tax_amount,offer_tax_currency:m.tax_currency,baggage_services:H,seat_services:de,cancel_for_any_reason_services:Me};or("Payload ready",{"Order creation payload":oe,"Services metadata":ye}),t.onPayloadReady(oe,ye)}},[H,de,Me]),!Gl(t))return null;let Nt=`${72*t.services.length+32*(t.services.length-1)}px`,ot={display:"flex",width:"100%",flexDirection:"column",rowGap:"12px",...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&Js(t.styles.accentColor)&&{"--SECONDARY":"var(--GREY-900)","--TERTIARY":"var(--GREY-400)"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return or("Component's internal state:",{isOfferLoading:S,isSeatMapLoading:L,baggageSelectedServices:H,seatSelectedServices:de,cfarSelectedServices:Me,offer:m,seatMaps:I,error:ce}),(0,Jt.jsxs)(Jt.Fragment,{children:[(0,Jt.jsx)("link",{rel:"stylesheet",href:vT}),(0,Jt.jsx)("div",{className:"duffel-components",style:ot,children:(0,Jt.jsxs)(so,{children:[ce&&(0,Jt.jsx)(Ag,{height:Nt,message:ce}),!ce&&t.services.map(oe=>{if(oe==="bags")return(0,Jt.jsx)(sh,{isLoading:S,offer:m,passengers:l,selectedServices:H,setSelectedServices:ue},"bags");if(oe==="seats")return(0,Jt.jsx)(Kh,{isLoading:S||L,seatMaps:I,offer:m,passengers:l,selectedServices:de,setSelectedServices:Ne},"seats");if(oe==="cancel_for_any_reason")return(0,Jt.jsx)(dh,{isLoading:S,offer:m,selectedServices:Me,setSelectedServices:Te},"cancel_for_any_reason")})]})})]})};var Yr=ge(Xh());var Jh="https://js.stripe.com/v3",CT=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,jh="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",bT=function(){for(var n=document.querySelectorAll('script[src^="'.concat(Jh,'"]')),i=0;i<n.length;i++){var a=n[i];if(CT.test(a.src))return a}return null},TT=function(n){var i=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"",a=document.createElement("script");a.src="".concat(Jh).concat(i);var s=document.head||document.body;if(!s)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return s.appendChild(a),a},RT=function(n,i){!n||!n._registerWrapper||n._registerWrapper({name:"stripe-js",version:"1.54.0",startTime:i})},lc=null,xT=function(n){return lc!==null||(lc=new Promise(function(i,a){if(typeof window>"u"||typeof document>"u"){i(null);return}if(window.Stripe&&n&&console.warn(jh),window.Stripe){i(window.Stripe);return}try{var s=bT();s&&n?console.warn(jh):s||(s=TT(n)),s.addEventListener("load",function(){window.Stripe?i(window.Stripe):a(new Error("Stripe.js not available"))}),s.addEventListener("error",function(){a(new Error("Failed to load Stripe.js"))})}catch(u){a(u);return}})),lc},AT=function(n,i,a){if(n===null)return null;var s=n.apply(void 0,i);return RT(s,a),s},Qh=Promise.resolve().then(function(){return xT(null)}),e_=!1;Qh.catch(function(t){e_||console.warn(t)});var t_=function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];e_=!0;var s=Date.now();return Qh.then(function(u){return AT(u,i,s)})};var En=ge(require("react"));var rt=require("react/jsx-runtime"),OT="https://assets.duffel.com/components/3.1.2--prototype.2",IT=`${OT}/global.css`,wT="card",PT="3.1.2--prototype.2",NT={color:"var(--GREY-900)",fontFamily:'"-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "sans-serif"',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#ababb4"}},MT={color:"#ef4444",iconColor:"#ef4444"},DT=({styles:t,paymentIntentClientToken:n,onSuccessfulPayment:i,onFailedPayment:a})=>{let[s,u]=En.useState(null),[l,p]=En.useState(!1),[m,h]=En.useState(!1),[S,v]=En.useState(!1),[I,P]=En.useState(""),L=(0,Yr.useStripe)(),Y=(0,Yr.useElements)();return En.useEffect(()=>{if(Y&&!s){let X=Y?.getElement(wT);X&&u(X)}},[Y,s]),En.useEffect(()=>{s&&s.on("change",X=>{let{error:H,complete:ue}=X;H?(h(!0),P(H.message)):h(!1),p(!!ue)})},[s]),n?(0,rt.jsx)("div",{className:"card-payment__container",children:(0,rt.jsxs)("form",{onSubmit:async X=>{if(X.preventDefault(),!(!L||!Y)&&s){v(!0);let H=atob(n),ue=JSON.parse(H),{client_secret:de}=ue,Ne=await L.confirmCardPayment(de,{payment_method:{card:s,metadata:{duffel_components_version:PT||"failed-to-get-version"}}});if(v(!1),Ne.error){let{error:Me}=Ne;a(Me)}else i()}},children:[S&&(0,rt.jsx)("div",{className:"card-payment--in-progress","aria-live":"polite","aria-busy":"true"}),(0,rt.jsx)(Yr.CardElement,{className:"card-details",options:{style:{base:{...NT,...t?.fontFamily&&{fontFamily:t.fontFamily}},invalid:{...MT}}}}),(0,rt.jsx)("div",{className:"card-payment__container--invalid",role:"alert",children:m&&I}),(0,rt.jsx)(Qe,{className:"card-payment__pay-button",type:"submit",disabled:!l||S,"aria-label":"Pay",children:S?"Processing...":"Pay"})]})}):null},BT=t=>{let[n,i]=En.useState(null);zs(t.debug||!1);let a=atob(t.paymentIntentClientToken),s;try{s=JSON.parse(a)}catch{throw new Error("Invalid Duffel payment intent client token provided")}let{publishable_key:u}=s;En.useEffect(()=>{if(!n&&u){let p=t_(u);p&&i(p)}},[n,u]);let l={...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&Js(t.styles.accentColor)&&{"--SECONDARY":"black","--TERTIARY":"grey"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)("link",{rel:"stylesheet",href:IT}),(0,rt.jsx)("div",{className:"duffel-components",style:l,children:(0,rt.jsx)(so,{children:(0,rt.jsx)(Yr.Elements,{stripe:n,children:(0,rt.jsx)(DT,{...t})})})})]})};function mr(t){return Array.isArray?Array.isArray(t):u_(t)==="[object Array]"}var LT=1/0;function kT(t){if(typeof t=="string")return t;let n=t+"";return n=="0"&&1/t==-LT?"-0":n}function FT(t){return t==null?"":kT(t)}function Gn(t){return typeof t=="string"}function s_(t){return typeof t=="number"}function UT(t){return t===!0||t===!1||GT(t)&&u_(t)=="[object Boolean]"}function c_(t){return typeof t=="object"}function GT(t){return c_(t)&&t!==null}function Pt(t){return t!=null}function nf(t){return!t.trim().length}function u_(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var HT="Incorrect 'index' type",$T=t=>`Invalid value for key ${t}`,YT=t=>`Pattern length exceeds max of ${t}.`,WT=t=>`Missing ${t} property in key`,VT=t=>`Property 'weight' in key '${t}' must be a positive integer`,n_=Object.prototype.hasOwnProperty,rf=class{constructor(n){this._keys=[],this._keyMap={};let i=0;n.forEach(a=>{let s=l_(a);i+=s.weight,this._keys.push(s),this._keyMap[s.id]=s,i+=s.weight}),this._keys.forEach(a=>{a.weight/=i})}get(n){return this._keyMap[n]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function l_(t){let n=null,i=null,a=null,s=1,u=null;if(Gn(t)||mr(t))a=t,n=r_(t),i=of(t);else{if(!n_.call(t,"name"))throw new Error(WT("name"));let l=t.name;if(a=l,n_.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(VT(l));n=r_(l),i=of(l),u=t.getFn}return{path:n,id:i,weight:s,src:a,getFn:u}}function r_(t){return mr(t)?t:t.split(".")}function of(t){return mr(t)?t.join("."):t}function qT(t,n){let i=[],a=!1,s=(u,l,p)=>{if(Pt(u))if(!l[p])i.push(u);else{let m=l[p],h=u[m];if(!Pt(h))return;if(p===l.length-1&&(Gn(h)||s_(h)||UT(h)))i.push(FT(h));else if(mr(h)){a=!0;for(let S=0,v=h.length;S<v;S+=1)s(h[S],l,p+1)}else l.length&&s(h,l,p+1)}};return s(t,Gn(n)?n.split("."):n,0),a?i:i[0]}var zT={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},KT={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,n)=>t.score===n.score?t.idx<n.idx?-1:1:t.score<n.score?-1:1},ZT={location:0,threshold:.6,distance:100},XT={useExtendedSearch:!1,getFn:qT,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},W={...KT,...zT,...ZT,...XT},jT=/[^ ]+/g;function JT(t=1,n=3){let i=new Map,a=Math.pow(10,n);return{get(s){let u=s.match(jT).length;if(i.has(u))return i.get(u);let l=1/Math.pow(u,.5*t),p=parseFloat(Math.round(l*a)/a);return i.set(u,p),p},clear(){i.clear()}}}var ga=class{constructor({getFn:n=W.getFn,fieldNormWeight:i=W.fieldNormWeight}={}){this.norm=JT(i,3),this.getFn=n,this.isCreated=!1,this.setIndexRecords()}setSources(n=[]){this.docs=n}setIndexRecords(n=[]){this.records=n}setKeys(n=[]){this.keys=n,this._keysMap={},n.forEach((i,a)=>{this._keysMap[i.id]=a})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Gn(this.docs[0])?this.docs.forEach((n,i)=>{this._addString(n,i)}):this.docs.forEach((n,i)=>{this._addObject(n,i)}),this.norm.clear())}add(n){let i=this.size();Gn(n)?this._addString(n,i):this._addObject(n,i)}removeAt(n){this.records.splice(n,1);for(let i=n,a=this.size();i<a;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(n,i){return n[this._keysMap[i]]}size(){return this.records.length}_addString(n,i){if(!Pt(n)||nf(n))return;let a={v:n,i,n:this.norm.get(n)};this.records.push(a)}_addObject(n,i){let a={i,$:{}};this.keys.forEach((s,u)=>{let l=s.getFn?s.getFn(n):this.getFn(n,s.path);if(Pt(l)){if(mr(l)){let p=[],m=[{nestedArrIndex:-1,value:l}];for(;m.length;){let{nestedArrIndex:h,value:S}=m.pop();if(Pt(S))if(Gn(S)&&!nf(S)){let v={v:S,i:h,n:this.norm.get(S)};p.push(v)}else mr(S)&&S.forEach((v,I)=>{m.push({nestedArrIndex:I,value:v})})}a.$[u]=p}else if(Gn(l)&&!nf(l)){let p={v:l,n:this.norm.get(l)};a.$[u]=p}}}),this.records.push(a)}toJSON(){return{keys:this.keys,records:this.records}}};function f_(t,n,{getFn:i=W.getFn,fieldNormWeight:a=W.fieldNormWeight}={}){let s=new ga({getFn:i,fieldNormWeight:a});return s.setKeys(t.map(l_)),s.setSources(n),s.create(),s}function QT(t,{getFn:n=W.getFn,fieldNormWeight:i=W.fieldNormWeight}={}){let{keys:a,records:s}=t,u=new ga({getFn:n,fieldNormWeight:i});return u.setKeys(a),u.setIndexRecords(s),u}function fc(t,{errors:n=0,currentLocation:i=0,expectedLocation:a=0,distance:s=W.distance,ignoreLocation:u=W.ignoreLocation}={}){let l=n/t.length;if(u)return l;let p=Math.abs(a-i);return s?l+p/s:p?1:l}function e3(t=[],n=W.minMatchCharLength){let i=[],a=-1,s=-1,u=0;for(let l=t.length;u<l;u+=1){let p=t[u];p&&a===-1?a=u:!p&&a!==-1&&(s=u-1,s-a+1>=n&&i.push([a,s]),a=-1)}return t[u-1]&&u-a>=n&&i.push([a,u-1]),i}var Si=32;function t3(t,n,i,{location:a=W.location,distance:s=W.distance,threshold:u=W.threshold,findAllMatches:l=W.findAllMatches,minMatchCharLength:p=W.minMatchCharLength,includeMatches:m=W.includeMatches,ignoreLocation:h=W.ignoreLocation}={}){if(n.length>Si)throw new Error(YT(Si));let S=n.length,v=t.length,I=Math.max(0,Math.min(a,v)),P=u,L=I,Y=p>1||m,ce=Y?Array(v):[],X;for(;(X=t.indexOf(n,L))>-1;){let Te=fc(n,{currentLocation:X,expectedLocation:I,distance:s,ignoreLocation:h});if(P=Math.min(Te,P),L=X+S,Y){let he=0;for(;he<S;)ce[X+he]=1,he+=1}}L=-1;let H=[],ue=1,de=S+v,Ne=1<<S-1;for(let Te=0;Te<S;Te+=1){let he=0,_e=de;for(;he<_e;)fc(n,{errors:Te,currentLocation:I+_e,expectedLocation:I,distance:s,ignoreLocation:h})<=P?he=_e:de=_e,_e=Math.floor((de-he)/2+he);de=_e;let it=Math.max(1,I-_e+1),Nt=l?v:Math.min(I+_e,v)+S,ot=Array(Nt+2);ot[Nt+1]=(1<<Te)-1;for(let oe=Nt;oe>=it;oe-=1){let ye=oe-1,ze=i[t.charAt(ye)];if(Y&&(ce[ye]=+!!ze),ot[oe]=(ot[oe+1]<<1|1)&ze,Te&&(ot[oe]|=(H[oe+1]|H[oe])<<1|1|H[oe+1]),ot[oe]&Ne&&(ue=fc(n,{errors:Te,currentLocation:ye,expectedLocation:I,distance:s,ignoreLocation:h}),ue<=P)){if(P=ue,L=ye,L<=I)break;it=Math.max(1,2*I-L)}}if(fc(n,{errors:Te+1,currentLocation:I,expectedLocation:I,distance:s,ignoreLocation:h})>P)break;H=ot}let Me={isMatch:L>=0,score:Math.max(.001,ue)};if(Y){let Te=e3(ce,p);Te.length?m&&(Me.indices=Te):Me.isMatch=!1}return Me}function n3(t){let n={};for(let i=0,a=t.length;i<a;i+=1){let s=t.charAt(i);n[s]=(n[s]||0)|1<<a-i-1}return n}var pc=class{constructor(n,{location:i=W.location,threshold:a=W.threshold,distance:s=W.distance,includeMatches:u=W.includeMatches,findAllMatches:l=W.findAllMatches,minMatchCharLength:p=W.minMatchCharLength,isCaseSensitive:m=W.isCaseSensitive,ignoreLocation:h=W.ignoreLocation}={}){if(this.options={location:i,threshold:a,distance:s,includeMatches:u,findAllMatches:l,minMatchCharLength:p,isCaseSensitive:m,ignoreLocation:h},this.pattern=m?n:n.toLowerCase(),this.chunks=[],!this.pattern.length)return;let S=(I,P)=>{this.chunks.push({pattern:I,alphabet:n3(I),startIndex:P})},v=this.pattern.length;if(v>Si){let I=0,P=v%Si,L=v-P;for(;I<L;)S(this.pattern.substr(I,Si),I),I+=Si;if(P){let Y=v-Si;S(this.pattern.substr(Y),Y)}}else S(this.pattern,0)}searchIn(n){let{isCaseSensitive:i,includeMatches:a}=this.options;if(i||(n=n.toLowerCase()),this.pattern===n){let L={isMatch:!0,score:0};return a&&(L.indices=[[0,n.length-1]]),L}let{location:s,distance:u,threshold:l,findAllMatches:p,minMatchCharLength:m,ignoreLocation:h}=this.options,S=[],v=0,I=!1;this.chunks.forEach(({pattern:L,alphabet:Y,startIndex:ce})=>{let{isMatch:X,score:H,indices:ue}=t3(n,L,Y,{location:s+ce,distance:u,threshold:l,findAllMatches:p,minMatchCharLength:m,includeMatches:a,ignoreLocation:h});X&&(I=!0),v+=H,X&&ue&&(S=[...S,...ue])});let P={isMatch:I,score:I?v/this.chunks.length:1};return I&&a&&(P.indices=S),P}},Hn=class{constructor(n){this.pattern=n}static isMultiMatch(n){return i_(n,this.multiRegex)}static isSingleMatch(n){return i_(n,this.singleRegex)}search(){}};function i_(t,n){let i=t.match(n);return i?i[1]:null}var af=class extends Hn{constructor(n){super(n)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(n){let i=n===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}},sf=class extends Hn{constructor(n){super(n)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(n){let a=n.indexOf(this.pattern)===-1;return{isMatch:a,score:a?0:1,indices:[0,n.length-1]}}},cf=class extends Hn{constructor(n){super(n)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(n){let i=n.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}},uf=class extends Hn{constructor(n){super(n)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(n){let i=!n.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,n.length-1]}}},lf=class extends Hn{constructor(n){super(n)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(n){let i=n.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[n.length-this.pattern.length,n.length-1]}}},ff=class extends Hn{constructor(n){super(n)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(n){let i=!n.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,n.length-1]}}},dc=class extends Hn{constructor(n,{location:i=W.location,threshold:a=W.threshold,distance:s=W.distance,includeMatches:u=W.includeMatches,findAllMatches:l=W.findAllMatches,minMatchCharLength:p=W.minMatchCharLength,isCaseSensitive:m=W.isCaseSensitive,ignoreLocation:h=W.ignoreLocation}={}){super(n),this._bitapSearch=new pc(n,{location:i,threshold:a,distance:s,includeMatches:u,findAllMatches:l,minMatchCharLength:p,isCaseSensitive:m,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(n){return this._bitapSearch.searchIn(n)}},mc=class extends Hn{constructor(n){super(n)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(n){let i=0,a,s=[],u=this.pattern.length;for(;(a=n.indexOf(this.pattern,i))>-1;)i=a+u,s.push([a,i-1]);let l=!!s.length;return{isMatch:l,score:l?0:1,indices:s}}},pf=[af,mc,cf,uf,ff,lf,sf,dc],o_=pf.length,r3=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,i3="|";function o3(t,n={}){return t.split(i3).map(i=>{let a=i.trim().split(r3).filter(u=>u&&!!u.trim()),s=[];for(let u=0,l=a.length;u<l;u+=1){let p=a[u],m=!1,h=-1;for(;!m&&++h<o_;){let S=pf[h],v=S.isMultiMatch(p);v&&(s.push(new S(v,n)),m=!0)}if(!m)for(h=-1;++h<o_;){let S=pf[h],v=S.isSingleMatch(p);if(v){s.push(new S(v,n));break}}}return s})}var a3=new Set([dc.type,mc.type]),df=class{constructor(n,{isCaseSensitive:i=W.isCaseSensitive,includeMatches:a=W.includeMatches,minMatchCharLength:s=W.minMatchCharLength,ignoreLocation:u=W.ignoreLocation,findAllMatches:l=W.findAllMatches,location:p=W.location,threshold:m=W.threshold,distance:h=W.distance}={}){this.query=null,this.options={isCaseSensitive:i,includeMatches:a,minMatchCharLength:s,findAllMatches:l,ignoreLocation:u,location:p,threshold:m,distance:h},this.pattern=i?n:n.toLowerCase(),this.query=o3(this.pattern,this.options)}static condition(n,i){return i.useExtendedSearch}searchIn(n){let i=this.query;if(!i)return{isMatch:!1,score:1};let{includeMatches:a,isCaseSensitive:s}=this.options;n=s?n:n.toLowerCase();let u=0,l=[],p=0;for(let m=0,h=i.length;m<h;m+=1){let S=i[m];l.length=0,u=0;for(let v=0,I=S.length;v<I;v+=1){let P=S[v],{isMatch:L,indices:Y,score:ce}=P.search(n);if(L){if(u+=1,p+=ce,a){let X=P.constructor.type;a3.has(X)?l=[...l,...Y]:l.push(Y)}}else{p=0,u=0,l.length=0;break}}if(u){let v={isMatch:!0,score:p/u};return a&&(v.indices=l),v}}return{isMatch:!1,score:1}}},mf=[];function s3(...t){mf.push(...t)}function gf(t,n){for(let i=0,a=mf.length;i<a;i+=1){let s=mf[i];if(s.condition(t,n))return new s(t,n)}return new pc(t,n)}var gc={AND:"$and",OR:"$or"},hf={PATH:"$path",PATTERN:"$val"},_f=t=>!!(t[gc.AND]||t[gc.OR]),c3=t=>!!t[hf.PATH],u3=t=>!mr(t)&&c_(t)&&!_f(t),a_=t=>({[gc.AND]:Object.keys(t).map(n=>({[n]:t[n]}))});function p_(t,n,{auto:i=!0}={}){let a=s=>{let u=Object.keys(s),l=c3(s);if(!l&&u.length>1&&!_f(s))return a(a_(s));if(u3(s)){let m=l?s[hf.PATH]:u[0],h=l?s[hf.PATTERN]:s[m];if(!Gn(h))throw new Error($T(m));let S={keyId:of(m),pattern:h};return i&&(S.searcher=gf(h,n)),S}let p={children:[],operator:u[0]};return u.forEach(m=>{let h=s[m];mr(h)&&h.forEach(S=>{p.children.push(a(S))})}),p};return _f(t)||(t=a_(t)),a(t)}function l3(t,{ignoreFieldNorm:n=W.ignoreFieldNorm}){t.forEach(i=>{let a=1;i.matches.forEach(({key:s,norm:u,score:l})=>{let p=s?s.weight:null;a*=Math.pow(l===0&&p?Number.EPSILON:l,(p||1)*(n?1:u))}),i.score=a})}function f3(t,n){let i=t.matches;n.matches=[],Pt(i)&&i.forEach(a=>{if(!Pt(a.indices)||!a.indices.length)return;let{indices:s,value:u}=a,l={indices:s,value:u};a.key&&(l.key=a.key.src),a.idx>-1&&(l.refIndex=a.idx),n.matches.push(l)})}function p3(t,n){n.score=t.score}function d3(t,n,{includeMatches:i=W.includeMatches,includeScore:a=W.includeScore}={}){let s=[];return i&&s.push(f3),a&&s.push(p3),t.map(u=>{let{idx:l}=u,p={item:n[l],refIndex:l};return s.length&&s.forEach(m=>{m(u,p)}),p})}var $n=class{constructor(n,i={},a){this.options={...W,...i},this.options.useExtendedSearch,this._keyStore=new rf(this.options.keys),this.setCollection(n,a)}setCollection(n,i){if(this._docs=n,i&&!(i instanceof ga))throw new Error(HT);this._myIndex=i||f_(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(n){Pt(n)&&(this._docs.push(n),this._myIndex.add(n))}remove(n=()=>!1){let i=[];for(let a=0,s=this._docs.length;a<s;a+=1){let u=this._docs[a];n(u,a)&&(this.removeAt(a),a-=1,s-=1,i.push(u))}return i}removeAt(n){this._docs.splice(n,1),this._myIndex.removeAt(n)}getIndex(){return this._myIndex}search(n,{limit:i=-1}={}){let{includeMatches:a,includeScore:s,shouldSort:u,sortFn:l,ignoreFieldNorm:p}=this.options,m=Gn(n)?Gn(this._docs[0])?this._searchStringList(n):this._searchObjectList(n):this._searchLogical(n);return l3(m,{ignoreFieldNorm:p}),u&&m.sort(l),s_(i)&&i>-1&&(m=m.slice(0,i)),d3(m,this._docs,{includeMatches:a,includeScore:s})}_searchStringList(n){let i=gf(n,this.options),{records:a}=this._myIndex,s=[];return a.forEach(({v:u,i:l,n:p})=>{if(!Pt(u))return;let{isMatch:m,score:h,indices:S}=i.searchIn(u);m&&s.push({item:u,idx:l,matches:[{score:h,value:u,norm:p,indices:S}]})}),s}_searchLogical(n){let i=p_(n,this.options),a=(p,m,h)=>{if(!p.children){let{keyId:v,searcher:I}=p,P=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(m,v),searcher:I});return P&&P.length?[{idx:h,item:m,matches:P}]:[]}let S=[];for(let v=0,I=p.children.length;v<I;v+=1){let P=p.children[v],L=a(P,m,h);if(L.length)S.push(...L);else if(p.operator===gc.AND)return[]}return S},s=this._myIndex.records,u={},l=[];return s.forEach(({$:p,i:m})=>{if(Pt(p)){let h=a(i,p,m);h.length&&(u[m]||(u[m]={idx:m,item:p,matches:[]},l.push(u[m])),h.forEach(({matches:S})=>{u[m].matches.push(...S)}))}}),l}_searchObjectList(n){let i=gf(n,this.options),{keys:a,records:s}=this._myIndex,u=[];return s.forEach(({$:l,i:p})=>{if(!Pt(l))return;let m=[];a.forEach((h,S)=>{m.push(...this._findMatches({key:h,value:l[S],searcher:i}))}),m.length&&u.push({idx:p,item:l,matches:m})}),u}_findMatches({key:n,value:i,searcher:a}){if(!Pt(i))return[];let s=[];if(mr(i))i.forEach(({v:u,i:l,n:p})=>{if(!Pt(u))return;let{isMatch:m,score:h,indices:S}=a.searchIn(u);m&&s.push({score:h,key:n,value:u,idx:l,norm:p,indices:S})});else{let{v:u,n:l}=i,{isMatch:p,score:m,indices:h}=a.searchIn(u);p&&s.push({score:m,key:n,value:u,norm:l,indices:h})}return s}};$n.version="6.6.2";$n.createIndex=f_;$n.parseIndex=QT;$n.config=W;$n.parseQuery=p_;s3(df);var h_=ge(d_()),__=ge(g_()),bo=ge(require("react"));var gr=require("react/jsx-runtime"),g3="https://assets.duffel.com/data/iata-lookup-v2.json",h3=t=>t.map(n=>{let[i,a,s,u,l]=n.split(",");return i==="C"?{type:"city",name:a,iata_code:s}:{type:"airport",name:a,iata_code:s,latitude:u,longitude:l}}),_3=({onPlaceSelected:t,placeholder:n="Lookup city or airport"})=>{let[i,a]=bo.default.useState(!0),[s,u]=bo.default.useState(""),[l,p]=bo.default.useState(new $n([])),[m,h]=bo.default.useState([]),S=(0,h_.debounce)(v=>{h(l.search(v,{limit:10}))},300);return bo.default.useEffect(()=>{(0,__.default)(g3).then(v=>v.json()).then(v=>p(new $n(h3(v),{threshold:.2,keys:["name","iata_code"]})))},[]),(0,gr.jsxs)("div",{className:"places-lookup",children:[(0,gr.jsx)("input",{className:"places-lookup-input",placeholder:n,type:"text",value:s,onChange:v=>{i||a(!0),u(v.target.value),S(v.target.value)}}),i&&s.length>0&&m.length>0&&(0,gr.jsx)("div",{className:"places-lookup-popover",style:{display:"flex",flexDirection:"column"},children:m.map(({item:v},I)=>(0,gr.jsxs)("button",{className:"places-lookup-popover__item",onClick:()=>{a(!1),t(v),u(v.name)},children:[(0,gr.jsxs)("span",{className:"places-lookup-popover__icon-and-name-container",children:[(0,gr.jsx)(pe,{style:{fill:"var(--GREY-400)",marginTop:"-2px"},name:v.type==="airport"?"flight_takeoff":"apartment"}),v.name]})," ",(0,gr.jsx)("span",{style:{color:"var(--GREY-600)",fontSize:"12px"},children:v.iata_code})]},v.iata_code+I))})]})};var y_=ge(require("react"));var Ei=require("react/jsx-runtime");function y3(t){try{JSON.parse(t)}catch{return!1}return!0}var S3=({data:t,onFinished:n})=>{let[i,a]=y_.default.useState("{}"),s=y3(i);return(0,Ei.jsxs)("div",{children:[(0,Ei.jsx)("pre",{children:JSON.stringify(t,null,2)}),(0,Ei.jsx)("textarea",{value:i,onChange:u=>a(u.target.value)}),(0,Ei.jsx)(Qe,{disabled:!s,onClick:()=>n(JSON.parse(i)),children:"Click me to trigger `onFinished` event"}),!s&&(0,Ei.jsx)("p",{style:{color:"tomato"},children:"Invalid JSON"})]})};var v3={economy:"Economy",premium_economy:"Premium Economy",business:"Business",first:"First",any:"Any"},E3={adult:"Adult",child:"Child",infant_without_seat:"Infant"};
|
|
27
|
+
http://duffel.com/docs/guides/ancillaries-component`),gs=!0},ys=t=>{hs()?console.info(fo,t):Hr({category:"log",message:t})};function dt(t,e){let r=[];Array.isArray(e)?r=e:r=Object.entries(e).map(([n,i])=>({property:n,value:i})),hs()?(console.groupCollapsed(fo,t),r.forEach(n=>{console.info(n)}),console.groupEnd()):Hr({category:"log.group",message:t,data:e})}var E=require("react/jsx-runtime"),Ss={add:(0,E.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),apartment:(0,E.jsx)("path",{d:"M3.8496 19.9752V7.2744H7.4496V3.6744H15.9504V10.8744H20.1504V19.9752H13.4496V16.3752H10.5504V19.9752H3.8496ZM5.1504 18.6744H7.4496V16.3752H5.1504V18.6744ZM5.1504 14.7744H7.4496V12.4752H5.1504V14.7744ZM5.1504 10.8744H7.4496V8.5752H5.1504V10.8744ZM8.7504 14.7744H11.0496V12.4752H8.7504V14.7744ZM8.7504 10.8744H11.0496V8.5752H8.7504V10.8744ZM8.7504 7.2744H11.0496V4.9752H8.7504V7.2744ZM12.3504 14.7744H14.6496V12.4752H12.3504V14.7744ZM12.3504 10.8744H14.6496V8.5752H12.3504V10.8744ZM12.3504 7.2744H14.6496V4.9752H12.3504V7.2744ZM16.5504 18.6744H18.8496V16.3752H16.5504V18.6744ZM16.5504 14.7744H18.8496V12.4752H16.5504V14.7744Z"}),arrow_forward:(0,E.jsx)("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"}),arrow_left:(0,E.jsx)("path",{d:"M9 19L2 12L9 5L10.425 6.4L5.825 11H22V13H5.825L10.4 17.6L9 19Z"}),arrow_right:(0,E.jsx)("path",{d:"M15 19L13.6 17.6L18.2 13H2V11H18.2L13.6 6.4L15 5L22 12L15 19Z"}),autorenew:(0,E.jsx)("path",{d:"M5.69728 14.4104C5.49326 13.9833 5.32604 13.5257 5.19562 13.0374C5.06521 12.5492 5 12.0367 5 11.5C5 9.56481 5.69083 7.91679 7.07249 6.55591C8.45416 5.19504 10.147 4.53946 12.1511 4.58918H12.7613L11.0742 2.92359L12.0097 2L15.2869 5.23549L12.0097 8.47099L11.0742 7.54739L12.7613 5.88181H12.1511C10.5021 5.84866 9.11624 6.38632 7.99347 7.49479C6.87069 8.60326 6.30931 9.93833 6.30931 11.5C6.30931 11.8455 6.33804 12.1824 6.3955 12.5106C6.45296 12.8389 6.53915 13.1573 6.65407 13.4658L5.69728 14.4104ZM11.9903 21L8.71309 17.7645L11.9903 14.529L12.9258 15.4526L11.2387 17.1182H11.8489C13.4979 17.1513 14.8838 16.6137 16.0065 15.5052C17.1293 14.3967 17.6907 13.0617 17.6907 11.5C17.6907 11.1545 17.662 10.8176 17.6045 10.4894C17.547 10.1611 17.4609 9.84273 17.3459 9.53421L18.3027 8.58959C18.5067 9.01665 18.674 9.47431 18.8044 9.96256C18.9348 10.4508 19 10.9633 19 11.5C19 13.4186 18.3092 15.0625 16.9275 16.4317C15.5458 17.8008 13.853 18.4605 11.8489 18.4108H11.2387L12.9258 20.0764L11.9903 21Z"}),bassinet:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("path",{d:"M19 12C19 14.1217 18.1571 16.1566 16.6569 17.6569C15.1566 19.1571 13.1217 20 11 20C8.87827 20 6.84344 19.1571 5.34315 17.6569C3.84286 16.1566 3 14.1217 3 12L11 12H19Z"}),(0,E.jsx)("path",{d:"M16.1347 5.86529L11 11V4C12.0506 4 13.0909 4.20693 14.0615 4.60896C14.8136 4.92052 15.5125 5.34451 16.1347 5.86529ZM16.8602 6.55405L12.4142 11H18.9373C18.8482 10.293 18.6649 9.59962 18.391 8.93853C18.0264 8.05823 17.5077 7.25087 16.8602 6.55405Z"})]}),cabin_bag:(0,E.jsx)("path",{d:"M7.3077 20.5C6.81058 20.5 6.38502 20.323 6.03102 19.969C5.67701 19.615 5.5 19.1894 5.5 18.6923V8.25007C5.5 7.76417 5.67019 7.35103 6.01057 7.01065C6.35096 6.67027 6.7641 6.50007 7.25 6.50007H9.25V3.6924C9.25 3.43631 9.33622 3.22166 9.50865 3.04842C9.68108 2.87519 9.89773 2.78857 10.1586 2.78857H13.8414C14.1022 2.78857 14.3189 2.87519 14.4913 3.04842C14.6637 3.22166 14.75 3.43631 14.75 3.6924V6.50007H16.6922C17.1894 6.50007 17.6149 6.67708 17.9689 7.0311C18.3229 7.3851 18.5 7.81066 18.5 8.30777V18.6923C18.5 19.1894 18.3229 19.615 17.9689 19.969C17.6149 20.323 17.1894 20.5 16.6922 20.5C16.6922 20.7507 16.6074 20.9608 16.4377 21.1303C16.2681 21.2999 16.0578 21.3846 15.807 21.3846C15.5561 21.3846 15.3461 21.2999 15.1769 21.1303C15.0077 20.9608 14.923 20.7507 14.923 20.5H9.0769C9.0769 20.7513 8.99206 20.9615 8.82237 21.1308C8.65271 21.3 8.44246 21.3846 8.19162 21.3846C7.94079 21.3846 7.73076 21.2999 7.56153 21.1303C7.39231 20.9608 7.3077 20.7507 7.3077 20.5ZM10.4423 6.50007H13.5577V3.98085H10.4423V6.50007ZM7.3077 19H16.6922C16.782 19 16.8557 18.9712 16.9134 18.9135C16.9711 18.8558 17 18.7821 17 18.6923V8.30777C17 8.21802 16.9711 8.1443 16.9134 8.0866C16.8557 8.0289 16.782 8.00005 16.6922 8.00005H7.3077C7.21795 8.00005 7.14423 8.0289 7.08652 8.0866C7.02882 8.1443 6.99997 8.21802 6.99997 8.30777V18.6923C6.99997 18.7821 7.02882 18.8558 7.08652 18.9135C7.14423 18.9712 7.21795 19 7.3077 19ZM8.15382 17.1539C8.15382 17.3261 8.21009 17.4685 8.32262 17.5811C8.43514 17.6937 8.57744 17.75 8.74952 17.75C8.92161 17.75 9.06407 17.6937 9.1769 17.5811C9.28972 17.4685 9.34613 17.3261 9.34613 17.1539V9.8462C9.34613 9.67398 9.28986 9.53157 9.17732 9.41897C9.06481 9.30637 8.92251 9.25007 8.75043 9.25007C8.57834 9.25007 8.43588 9.30637 8.32305 9.41897C8.21023 9.53157 8.15382 9.67398 8.15382 9.8462V17.1539ZM11.4038 17.1539C11.4038 17.3261 11.4601 17.4685 11.5726 17.5811C11.6851 17.6937 11.8274 17.75 11.9995 17.75C12.1716 17.75 12.3141 17.6937 12.4269 17.5811C12.5397 17.4685 12.5961 17.3261 12.5961 17.1539V9.8462C12.5961 9.67398 12.5399 9.53157 12.4273 9.41897C12.3148 9.30637 12.1725 9.25007 12.0004 9.25007C11.8283 9.25007 11.6859 9.30637 11.5731 9.41897C11.4602 9.53157 11.4038 9.67398 11.4038 9.8462V17.1539ZM14.6538 17.1539C14.6538 17.3261 14.7101 17.4685 14.8226 17.5811C14.9351 17.6937 15.0774 17.75 15.2495 17.75C15.4216 17.75 15.5641 17.6937 15.6769 17.5811C15.7897 17.4685 15.8461 17.3261 15.8461 17.1539V9.8462C15.8461 9.67398 15.7899 9.53157 15.6773 9.41897C15.5648 9.30637 15.4225 9.25007 15.2504 9.25007C15.0783 9.25007 14.9359 9.30637 14.823 9.41897C14.7102 9.53157 14.6538 9.67398 14.6538 9.8462V17.1539Z"}),check:(0,E.jsx)("path",{d:"M10.3333 15.8646L7 12.5313L8.0625 11.4688L10.3333 13.7396L15.9375 8.13544L17 9.19794L10.3333 15.8646Z"}),checked_bag:(0,E.jsx)("path",{d:"M22 19H2V21H22V19M4 15C4 15.5 4.2 16 4.6 16.4C5 16.8 5.5 17 6 17V6C5.5 6 5 6.2 4.6 6.6C4.2 7 4 7.5 4 8V15M13.5 6H10.5C10.5 5.6 10.6 5.2 10.9 4.9C11.2 4.6 11.5 4.5 12 4.5C12.4 4.5 12.8 4.6 13.1 4.9C13.3 5.2 13.5 5.6 13.5 6M7 6V17H17V6H15C15 5.2 14.7 4.5 14.1 3.9S12.8 3 12 3C11.2 3 10.5 3.3 9.9 3.9C9.3 4.5 9 5.2 9 6H7M18 17C18.5 17 19 16.8 19.4 16.4C19.8 16 20 15.5 20 15V8C20 7.5 19.8 7 19.4 6.6C19 6.2 18.5 6 18 6V17Z"}),chevron:(0,E.jsx)("path",{d:"M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z"}),close:(0,E.jsx)("path",{d:"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),closet:(0,E.jsx)("path",{d:"M12 4C11.0717 4 10.1815 4.36875 9.52513 5.02513C8.86875 5.6815 8.5 6.57174 8.5 7.5H10.5C10.5 7.10218 10.658 6.72064 10.9393 6.43934C11.2206 6.15804 11.6022 6 12 6C12.3978 6 12.7794 6.15804 13.0607 6.43934C13.342 6.72064 13.5 7.10218 13.5 7.5C13.5 7.89782 13.342 8.27936 13.0607 8.56066C12.7794 8.84196 12.3978 9 12 9C11.45 9 11 9.45 11 10V11.75L2.4 18.2C2.23209 18.3259 2.10807 18.5015 2.04549 18.7018C1.98291 18.9022 1.98495 19.1171 2.05132 19.3162C2.11769 19.5153 2.24502 19.6885 2.41529 19.8112C2.58556 19.934 2.79012 20 3 20H21C21.2099 20 21.4144 19.934 21.5847 19.8112C21.755 19.6885 21.8823 19.5153 21.9487 19.3162C22.0151 19.1171 22.0171 18.9022 21.9545 18.7018C21.8919 18.5015 21.7679 18.3259 21.6 18.2L13 11.75V10.85C13.7216 10.6349 14.3546 10.1927 14.805 9.58919C15.2554 8.98569 15.4991 8.25303 15.5 7.5C15.5 6.57174 15.1313 5.6815 14.4749 5.02513C13.8185 4.36875 12.9283 4 12 4ZM12 13.5L18 18H6L12 13.5Z"}),exit_row:(0,E.jsx)("path",{d:"M20 11H6.83001L9.71001 8.12001C10.1 7.73001 10.1 7.10001 9.71001 6.71001C9.32001 6.32001 8.69001 6.32001 8.30001 6.71001L3.71001 11.3C3.32001 11.69 3.32001 12.32 3.71001 12.71L8.30001 17.3C8.69001 17.69 9.32001 17.69 9.71001 17.3C10.1 16.91 10.1 16.28 9.71001 15.89L6.83001 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11Z"}),exit_row_right:(0,E.jsx)("path",{d:"M4 11H17.17L14.29 8.12001C13.9 7.73001 13.9 7.10001 14.29 6.71001C14.68 6.32001 15.31 6.32001 15.7 6.71001L20.29 11.3C20.68 11.69 20.68 12.32 20.29 12.71L15.7 17.3C15.31 17.69 14.68 17.69 14.29 17.3C13.9 16.91 13.9 16.28 14.29 15.89L17.17 13H4C3.45 13 3 12.55 3 12C3 11.45 3.45 11 4 11Z"}),expand_content:(0,E.jsx)("path",{d:"M5 19V13H7V17H11V19H5ZM17 11V7H13V5H19V11H17Z"}),flight_class:(0,E.jsx)("path",{d:"M14.2596 12.5C13.7737 12.5 13.3606 12.3298 13.0202 11.9894C12.6798 11.649 12.5096 11.2359 12.5096 10.75V6.25C12.5096 5.7641 12.6798 5.35096 13.0202 5.01058C13.3606 4.67019 13.7737 4.5 14.2596 4.5H15.75C16.2359 4.5 16.649 4.67019 16.9894 5.01058C17.3298 5.35096 17.5 5.7641 17.5 6.25V10.75C17.5 11.2359 17.3298 11.649 16.9894 11.9894C16.649 12.3298 16.2359 12.5 15.75 12.5H14.2596ZM14.2596 11H15.75C15.8205 11 15.8798 10.9759 15.9278 10.9279C15.9759 10.8798 16 10.8205 16 10.75V6.25C16 6.17948 15.9759 6.12018 15.9278 6.0721C15.8798 6.02402 15.8205 5.99998 15.75 5.99998H14.2596C14.1891 5.99998 14.1298 6.02402 14.0817 6.0721C14.0336 6.12018 14.0096 6.17948 14.0096 6.25V10.75C14.0096 10.8205 14.0336 10.8798 14.0817 10.9279C14.1298 10.9759 14.1891 11 14.2596 11ZM9.5673 17.5C9.21345 17.5 8.89678 17.398 8.6173 17.1942C8.33782 16.9903 8.14423 16.7198 8.03655 16.3827L5.5 8.02883V4.5H6.99997V7.99998L9.49997 16H17.7596V17.5H9.5673ZM8.25 20.5V19H17.75V20.5H8.25ZM14.2596 5.99998H16H14.0096H14.2596Z"}),flight_takeoff:(0,E.jsx)("path",{d:"M3.77521 20.1498V18.849H20.0748V20.1498H3.77521ZM5.45041 15.2742L2.94961 11.0994L4.05001 10.8246L5.90041 12.399L10.05 11.2998L6.27481 4.89902L7.72561 4.62422L14.1 10.1994L19.4004 8.77382C19.75 8.67462 20.0832 8.72062 20.4 8.91182C20.7168 9.10382 20.9252 9.37462 21.0252 9.72422C21.1084 10.0746 21.0624 10.4038 20.8872 10.7118C20.7128 11.0198 20.4504 11.2242 20.1 11.325L5.45041 15.2742Z"}),galley:(0,E.jsx)("path",{d:"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"}),lavatory:(0,E.jsx)("path",{d:"M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"}),lie_flat_seat:(0,E.jsx)("path",{d:"M6.16667 12.8333C6.81667 12.8333 7.45834 12.5833 7.95001 12.0833C8.91667 11.0916 8.90001 9.51659 7.91667 8.54992C7.42501 8.07492 6.79167 7.83325 6.16667 7.83325C5.51667 7.83325 4.87501 8.08325 4.38334 8.58325C3.41667 9.57492 3.43334 11.1499 4.41667 12.1166C4.90834 12.5916 5.54167 12.8333 6.16667 12.8333ZM5.57501 9.74992C5.73334 9.59159 5.94167 9.49992 6.16667 9.49992C6.38334 9.49992 6.59167 9.58325 6.75001 9.73325C7.08334 10.0583 7.08334 10.5749 6.76667 10.9083C6.60001 11.0749 6.39167 11.1666 6.16667 11.1666C5.95001 11.1666 5.74167 11.0833 5.58334 10.9333C5.25001 10.5999 5.25001 10.0833 5.57501 9.74992ZM17 7.83325H9.50001V12.8333H20.3333V11.1666C20.3333 9.32492 18.8417 7.83325 17 7.83325ZM11.1667 11.1666V9.49992H17C17.9167 9.49992 18.6667 10.2499 18.6667 11.1666H11.1667ZM3.66667 15.3333H8.66667V16.9999H15.3333V15.3333H20.3333V13.6666H3.66667V15.3333Z"}),minus:(0,E.jsx)("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"}),no_airplane:(0,E.jsx)("path",{d:"M14.6674 10.0001V2.66675C14.6674 1.56008 13.7741 0.666748 12.6674 0.666748C11.5607 0.666748 10.6674 1.56008 10.6674 2.66675V7.57341L21.1074 18.0134L25.3341 19.3334V16.6667L14.6674 10.0001ZM1.33407 5.02675L7.9874 11.6801L0.000732422 16.6667V19.3334L10.6674 16.0001V23.3334L8.00073 25.3334V27.3334L12.6674 26.0001L17.3341 27.3334V25.3334L14.6674 23.3334V18.3601L22.3074 26.0001L24.0007 24.3067L3.0274 3.33341L1.33407 5.02675Z"}),no_bag:(0,E.jsx)("path",{d:"M16.8992 6.12037H14.9392V3.18101C14.9385 2.92148 14.8351 2.67278 14.6516 2.48926C14.4681 2.30574 14.2194 2.20234 13.9599 2.20166H10.0399C9.78034 2.20234 9.53163 2.30574 9.34811 2.48926C9.16459 2.67278 9.06119 2.92148 9.06051 3.18101V6.12037H8.20711L8.34715 6.25804L14.3973 12.0871V9.06102H15.9676V13.6L17.3022 14.8859L18.8592 16.4748V8.08037C18.8579 7.56096 18.6509 7.06322 18.2836 6.69594C17.9164 6.32867 17.4186 6.12173 16.8992 6.12037ZM5.14051 8.09559L3.77173 6.71825L5.00821 5.48945L7.16586 7.6606L13.9581 14.4953L15.8932 16.4426L19.7441 20.3175L20.2279 20.8043L18.9914 22.0331L17.635 20.6683C17.4035 20.7625 17.154 20.8126 16.8992 20.8133C16.904 20.945 16.8822 21.0763 16.8351 21.1993C16.788 21.3224 16.7166 21.4347 16.6251 21.5296C16.5336 21.6244 16.424 21.6999 16.3027 21.7514C16.1814 21.8029 16.051 21.8295 15.9192 21.8295C15.7874 21.8295 15.657 21.8029 15.5357 21.7514C15.4145 21.6999 15.3048 21.6244 15.2133 21.5296C15.1219 21.4347 15.0504 21.3224 15.0034 21.1993C14.9563 21.0763 14.9344 20.945 14.9392 20.8133H9.06051C9.06529 20.945 9.04348 21.0763 8.99638 21.1993C8.94929 21.3224 8.87787 21.4347 8.7864 21.5296C8.69492 21.6244 8.58527 21.6999 8.46399 21.7514C8.34271 21.8029 8.21229 21.8295 8.08051 21.8295C7.94874 21.8295 7.81832 21.8029 7.69703 21.7514C7.57575 21.6999 7.4661 21.6244 7.37463 21.5296C7.28316 21.4347 7.21174 21.3224 7.16464 21.1993C7.11754 21.0763 7.09573 20.945 7.10051 20.8133C6.58222 20.8119 6.08545 20.6059 5.71835 20.24C5.35126 19.8741 5.14357 19.378 5.14051 18.8597V8.09559ZM14.8632 17.8791L14.3973 17.4103V17.8791H14.8632ZM9.596 12.579V17.8791H8.03083V11.004L9.596 12.579ZM10.5302 3.67134H13.4695V6.12295H10.5302V3.67134Z"}),no_seat:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("path",{d:"M25.1667 21.9733L23.4733 23.6667L2.5 2.69333L4.19333 1L7.16667 3.97333L16.5267 13.3333L19.1933 16L24.5 21.3067L25.1667 21.9733Z"}),(0,E.jsx)("path",{d:"M7.16667 24H3.16667V16H19.1933L24.5 21.3067V24H20.5V20H7.16667V24ZM27.1667 9.33333H23.1667V13.3333H27.1667V9.33333ZM4.5 9.33333H0.5V13.3333H4.5V9.33333ZM20.3333 13.3333H20.5V2.66667C20.5 1.2 19.3 0 17.8333 0H9.83333C9.05784 0 8.3569 0.335483 7.86848 0.868484L20.3333 13.3333ZM16.5267 13.3333L7.16667 3.97333V13.3333H16.5267Z"})]}),north_east:(0,E.jsx)("path",{d:"M4.69999 19.3C4.51665 19.1167 4.42499 18.8833 4.42499 18.6C4.42499 18.3167 4.51665 18.0833 4.69999 17.9L15.6 7H9.99999C9.71665 7 9.47915 6.90417 9.28749 6.7125C9.09582 6.52083 8.99999 6.28333 8.99999 6C8.99999 5.71667 9.09582 5.47917 9.28749 5.2875C9.47915 5.09583 9.71665 5 9.99999 5H18C18.2833 5 18.5208 5.09583 18.7125 5.2875C18.9042 5.47917 19 5.71667 19 6V14C19 14.2833 18.9042 14.5208 18.7125 14.7125C18.5208 14.9042 18.2833 15 18 15C17.7167 15 17.4792 14.9042 17.2875 14.7125C17.0958 14.5208 17 14.2833 17 14V8.4L6.09999 19.3C5.91665 19.4833 5.68332 19.575 5.39999 19.575C5.11665 19.575 4.88332 19.4833 4.69999 19.3Z"}),seat:(0,E.jsx)("path",{d:"M7.59 5.41012C6.81 4.63012 6.81 3.36012 7.59 2.58012C8.37 1.80012 9.64 1.80012 10.42 2.58012C11.2 3.36012 11.2 4.63012 10.42 5.41012C9.63 6.20012 8.37 6.20012 7.59 5.41012ZM6 16.0001V8.00012C6 7.45012 5.55 7.00012 5 7.00012C4.45 7.00012 4 7.45012 4 8.00012V16.0001C4 18.7601 6.24 21.0001 9 21.0001H14C14.55 21.0001 15 20.5501 15 20.0001C15 19.4501 14.55 19.0001 14 19.0001H9C7.34 19.0001 6 17.6601 6 16.0001ZM19.28 19.3501L15.51 15.5801C15.14 15.2101 14.63 15.0001 14.1 15.0001H11.5V11.3201C12.59 12.2101 14.16 13.0201 15.7 13.3401C16.37 13.4801 17 12.9801 17 12.3001C17 11.7701 16.61 11.3401 16.08 11.2501C14.66 11.0101 13.2 10.2401 12.33 9.28012L10.93 7.73012C10.74 7.52012 10.5 7.35012 10.24 7.23012C9.95 7.09012 9.62 7.00012 9.28 7.00012H9.25C8.01 7.00012 7 8.01012 7 9.25012V15.0001C7 16.6601 8.34 18.0001 10 18.0001H15.07L17.85 20.7801C18.24 21.1701 18.89 21.1701 19.28 20.7801C19.68 20.3901 19.68 19.7501 19.28 19.3501Z"}),seat_paid_indicator:(0,E.jsx)("path",{d:"M11.7686 0.731368C12.7766 -0.276576 14.5 0.437294 14.5 1.86274V10.8C14.5 12.5673 13.0673 14 11.3 14H2.36274C0.937294 14 0.223427 12.2766 1.23137 11.2686L11.7686 0.731368Z"}),shield_with_moon:(0,E.jsx)("path",{d:"M12.525 15.75C13.0814 15.75 13.6269 15.6408 14.1615 15.4222C14.6961 15.2036 15.166 14.8757 15.5711 14.4385C15.6749 14.3244 15.7032 14.2033 15.6557 14.0751C15.6083 13.9469 15.5077 13.8629 15.3538 13.8232C14.7269 13.6783 14.1477 13.4183 13.6163 13.0433C13.0849 12.6683 12.6474 12.1789 12.3038 11.5751C11.9769 11.0046 11.7682 10.393 11.6778 9.74048C11.5874 9.08791 11.6589 8.45458 11.8923 7.84048C11.9525 7.68663 11.9301 7.55586 11.8249 7.44817C11.7198 7.34049 11.5916 7.30332 11.4403 7.33665C10.4442 7.59177 9.65927 8.1142 9.08555 8.90395C8.51185 9.69368 8.225 10.5591 8.225 11.5001C8.225 12.6796 8.64519 13.6828 9.48558 14.5097C10.3259 15.3366 11.3391 15.75 12.525 15.75ZM12 21.4808C9.83716 20.8911 8.04646 19.618 6.62787 17.6616C5.20929 15.7052 4.5 13.518 4.5 11.1001V5.34625L12 2.53857L19.5 5.34625V11.1001C19.5 13.518 18.7907 15.7052 17.3721 17.6616C15.9535 19.618 14.1628 20.8911 12 21.4808ZM12 19.9001C13.7333 19.3501 15.1666 18.2501 16.3 16.6001C17.4333 14.9501 18 13.1167 18 11.1001V6.37507L12 4.1347L5.99997 6.37507V11.1001C5.99997 13.1167 6.56664 14.9501 7.69997 16.6001C8.83331 18.2501 10.2666 19.3501 12 19.9001Z"}),stairs:(0,E.jsx)("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,8h-2.42v3.33H13v3.33h-2.58 V18H6v-2h2.42v-3.33H11V9.33h2.58V6H18V8z"}),wifi:(0,E.jsx)("path",{d:"M2.83333 9.50005L4.49999 11.1667C8.64166 7.02505 15.3583 7.02505 19.5 11.1667L21.1667 9.50005C16.1083 4.44172 7.89999 4.44172 2.83333 9.50005ZM9.49999 16.1667L12 18.6667L14.5 16.1667C13.125 14.7834 10.8833 14.7834 9.49999 16.1667ZM6.16666 12.8334L7.83333 14.5C10.1333 12.2 13.8667 12.2 16.1667 14.5L17.8333 12.8334C14.6167 9.61672 9.39166 9.61672 6.16666 12.8334Z"})},cu=t=>t in Ss?Ss[t]:(ys(`The icon "${t}" is missing from ICON_MAP`),null),O=({name:t,size:e,className:r,viewBox:n,style:i})=>(0,E.jsx)("svg",{className:r,width:e||24,height:e||24,viewBox:n||"0 0 24 24","aria-label":t,"data-testid":t,style:{display:"block",fill:"currentColor",...i},children:cu(t)});var Es=I(we());var zn=require("react/jsx-runtime"),lu={primary:"button--primary",outlined:"button--outlined",destructive:"button--destructive"},fu={32:"button--32",40:"button--40",48:"button--48"},Q=({iconBefore:t,variant:e="primary",size:r=40,children:n,className:i,type:o="button",...a})=>(0,zn.jsxs)("button",{type:o,className:(0,Es.default)("button",lu[e],fu[r],i),...a,children:[t&&(0,zn.jsx)(O,{className:"duffel-button__icon duffel-button__icon--before",name:t}),n]});var uo=require("react/jsx-runtime"),fr=({style:t,children:e})=>(0,uo.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"dashed 1px var(--GREY-300)",borderRadius:"4px",paddingBlock:"32px",...t},children:(0,uo.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"470px"},children:e})});var $t=require("react/jsx-runtime"),dr=class extends vs.default.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){he(e)}render(){return this.state.hasError?(0,$t.jsxs)(fr,{children:[(0,$t.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"We ran into an error"}),(0,$t.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Please try reloading. If the problem persists reach out to our support team."}),(0,$t.jsx)("div",{children:(0,$t.jsx)(Q,{variant:"outlined",iconBefore:"autorenew",onClick:()=>location.reload(),children:"Try again"})})]}):this.props.children}};var Vt=require("react/jsx-runtime"),bs=({height:t,message:e})=>(0,Vt.jsxs)(fr,{style:{minHeight:t},children:[(0,Vt.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Failed to load extras"}),(0,Vt.jsx)("p",{className:"p2--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:e||"Please try reloading. If the problem persists reach out to our support team."}),(0,Vt.jsx)("div",{children:(0,Vt.jsx)(Q,{variant:"outlined",onClick:()=>location.reload(),iconBefore:"autorenew",children:"Try again"})})]});var ur=t=>t.reduce((e,{id:r,total_amount:n,total_currency:i})=>({[r]:{total_amount:n,total_currency:i},...e}),{});var Nt=(t,e,r)=>{if(!t||e.length===0)return 0;let n=ur(t.available_services);return jr(n,e,r)},jr=(t,e,r)=>e.reduce((n,{quantity:i,id:o})=>{let a=n;return o in t?a+=i*+t[o].total_amount:r?a+=i*du(o,r):he(new Error(`The service id (${o}) provided could not be found in neither the offer nor the seat maps.`)),a},0),du=(t,e)=>{for(let r of e)for(let n of r.cabins)for(let i of n.rows)for(let o of i.sections)for(let a of o.elements)if(a.type==="seat"&&Array.isArray(a.available_services)){let s=a.available_services.find(c=>c.id===t);if(s)return+s.total_amount}return 0};var Cs=({baggageSelectedServices:t,seatSelectedServices:e,cfarSelectedServices:r,offer:n,seatMaps:i,passengers:o})=>{let a=[...t,...e,...r],s=+n.total_amount+Nt(n,a,i);return{...n&&{selected_offers:[n.id]},passengers:o,services:uu(a),...n&&{payments:[{type:"balance",amount:`${s}`,currency:n.total_currency}]},type:"instant",metadata:{source:"duffel-ancillaries@3.1.3"}}},uu=t=>Array.isArray(t)?t.filter(({quantity:e})=>e>0).map(({id:e,quantity:r})=>({id:e,quantity:r})):[];var po=t=>(e,r)=>{let{rate:n,amount:i}=t;return{amount:e*(1+n)+i,currency:r}},mo="You cannot supply both markup and priceFormatters for the same service.",Ts=(t,e)=>{let r={};if(e&&(e.bags&&(r.bags=e.bags),e.seats&&(r.seats=e.seats),e.cancel_for_any_reason&&(r.cancel_for_any_reason=e.cancel_for_any_reason)),t){if(t.bags){if(e&&e.bags)throw new Error(mo);r.bags=po(t.bags)}if(t.seats){if(e&&e.seats)throw new Error(mo);r.seats=po(t.seats)}if(t.cancel_for_any_reason){if(e&&e.cancel_for_any_reason)throw new Error(mo);r.cancel_for_any_reason=po(t.cancel_for_any_reason)}}return r};var Zn=t=>t.type==="baggage";var pr=t=>t.type==="cancel_for_any_reason";var pu=(t,e)=>`${t} must all have the same currency, but they have ${e.size} different currencies (${[...e].join(", ")}). Check the price formatters passed into the component's render function.`,Rs=(t,e)=>{if(!e)return t;let r=t.available_services,n=new Set,i={baggage:e?.bags,cancel_for_any_reason:e?.cancel_for_any_reason},o=r.map(a=>{let s={...a};if(a.type in i&&i[a.type]){let{total_amount:c,total_currency:l}=a;if(Zn(a)){let{amount:f,currency:u}=i[a.type](+a.total_amount,a.total_currency,a);c=f.toString(),u&&(l=u)}if(pr(a)){let{amount:f,currency:u}=i[a.type](+a.total_amount,a.total_currency,a);c=f.toString(),u&&(l=u)}if(n.add(l),n.size>1)throw new Error(pu(a.type,n));s.total_amount=c,s.total_currency=l}return s});return{...t,available_services:o}};function Kn(t){return t.type==="seat"}var mu=t=>`Seats must all have the same currency, but they have ${t.size} different currencies (${[...t].join(", ")}). Check the price formatters passed into the component's render function.`,gu=(t,e,r)=>{let n={...t};if(Kn(n)&&n.available_services.length>0){let i=n.available_services.map(o=>{let a={...o},{amount:s,currency:c}=e(+o.total_amount,o.total_currency,o);if(a.total_amount=s.toString(),c&&(a.total_currency=c,r.add(c),r.size>1))throw new Error(mu(r));return a});n.available_services=i}return n},xs=(t,e)=>{if(!e)return t;let r=new Set;return t.map(i=>{let o=i.cabins.map(a=>{let s=a.rows.map(c=>{let l=c.sections.map(f=>{let u=f.elements.map(_=>gu(_,e,r));return{...f,elements:u}});return{...c,sections:l}});return{...a,rows:s}});return{...i,cabins:o}})};var Xn=t=>{let e=t.split(", ").map(n=>parseInt(n));return(.2126*e[0]+.7152*e[1]+.0722*e[2])/255>.5};var Os=t=>"selected_offers"in t&&"passengers"in t&&"services"in t&&"payments"in t&&"type"in t&&"metadata"in t;var Ps=t=>t.expires_at&&new Date(t.expires_at)<new Date;var qr=t=>"data"in t&&Array.isArray(t.data.errors),_u="https://api.duffel.com",hu="3.1.3";async function Jn(t,e,r="GET",n){dt("Making request to the Duffel API",{path:e,method:r});let i=`${_u}/ancillaries-component/${e}`,o=null;try{o=await fetch(i,{method:r,body:n,headers:{"Duffel-Version":"v1",Authorization:`Bearer ${t}`,"User-Agent":`Duffel/ancillaries-component@${hu}`}})}catch(s){throw dt("Failed to make request to the Duffel API",{error:s}),s}let a=await o.json();if(Array.isArray(a.errors))throw dt("Request to the Duffel API failed",{operation:`${r} ${i}`,method:r,request_id:a?.meta?.request_id,errors:a.errors,status:o.status}),{...o,data:a};return dt("Request to the Duffel succeeded",{request_id:a?.meta?.request_id}),a}var Ns="https://assets.duffel.com/components/3.1.3",Is=async t=>await(await fetch(Ns+`/fixtures/offers/${t}.json`)).json(),As=async t=>await(await fetch(Ns+`/fixtures/seat-maps/${t}.json`)).json();var Qn=t=>t.startsWith("fixture_off_");async function Ms(t,e){return(await Jn(e,`offers/${t}?return_available_services=true`)).data}async function Ds(t,e,r,n,i){n(!0);let o=Qn(t);if(t=o?t.replace("fixture_",""):t,o)return Is(t).then(a=>{n(!1),i(a)});if(!e)throw new Error("Attempted to retrieve seat maps but the client key is missing.");try{let a=await Ms(t,e);i(a)}catch(a){let s="An unknown error occurred while retrieving the offer.";a instanceof Error?(s=a.message,a.message.includes("Load failed")&&(s="The Duffel API is not available. Please try again later.")):qr(a)&&a.status===404&&(s="The offer you are looking for does not exist or has expired."),qr(a)&&a.status>=500&&a.status<600&&he(new Error(s)),r(s)}finally{n(!1)}}async function ws(t,e){return(await Jn(e,`offers/${t}/seat_maps`)).data}async function Bs(t,e,r,n,i){n(!0);let o=Qn(t);if(t=o?t.replace("fixture_",""):t,o)return As(t).then(a=>{n(!1),i(a)});if(!e)throw new Error("Attemptted to retrieve seat maps but the client key is missing.");try{let a=await ws(t,e);i(a)}catch(a){let s="An unknown error occurred while retrieving the seat maps.";a instanceof Error?(s=a.message,a.message.includes("Load failed")&&(s="The Duffel API is not available. Please try again later.")):qr(a)&&(s=a.data.errors[0]?.message||"Received an unknown error from the Duffel API."),he(new Error(s)),r()}finally{n(!1)}}var go=t=>yu(t)&&(_o(t)||ho(t)||yo(t)||So(t)),yu=t=>"onPayloadReady"in t&&"passengers"in t&&"services"in t,_o=t=>"offer_id"in t&&t.offer_id.startsWith("fixture_"),ho=t=>"offer_id"in t&&"client_key"in t,yo=t=>"offer"in t&&"seat_maps"in t,So=t=>"offer"in t&&"client_key"in t;var de=I(require("react"));var ks=require("react/jsx-runtime"),mr=()=>(0,ks.jsx)("span",{className:"textual-loading-indicator","aria-hidden":"true"});var Ls=require("react/jsx-runtime"),ut=({backgroundColor:t,color:e,children:r})=>(0,Ls.jsx)("div",{style:{backgroundColor:t,color:e,padding:"2px 8px",whiteSpace:"nowrap",borderRadius:"4px",fontWeight:"600",fontSize:"14px",lineHeight:"20px",textAlign:"center"},children:r});var gr=(t,e)=>{if(t.available_services.length===0)throw new Error("No services available");let r=t.available_services.find(n=>n.type===e);if(!r)throw new Error(`No ${e} services available`);return r.total_currency};var Ze=t=>t.reduce((e,{quantity:r})=>e+r,0);var Su={baggage:Zn,cancel_for_any_reason:pr},_r=(t,e)=>{let r=Su[e];if(!r)throw new Error(`Unknown service type: ${e}`);return t&&Array.isArray(t.available_services)&&t.available_services.some(n=>r(n)&&n.maximum_quantity>0)};var U=(t,e="en-GB",r={})=>n=>{try{let o=new Intl.NumberFormat(e,{style:"currency",currency:t,...r}).format(n);return r&&r.signDisplay&&(r.signDisplay==="always"||r.signDisplay==="exceptZero"&&n!==0)?o.replace(/^([+-])/,"$1 "):o}catch{return`${n} ${t}`}};var Be=(t,e,r)=>t==1?`${t} ${e}`:`${t} ${r}`;var tc=I(require("react"));var Fs=I(we()),Us=I(require("react"));var ye=require("react/jsx-runtime"),hr=({buttonTitle:t,title:e,icon:r,copy:n,onClick:i,children:o,isLoading:a,disabled:s,isSelected:c})=>{let l=Us.Children.toArray(o).length>0;return(0,ye.jsxs)("button",{title:t,...i&&{onClick:i},disabled:s,className:(0,Fs.default)("ancillary-card",a&&"ancillary-card--loading"),style:{cursor:"pointer",background:"transparent",color:"var(--GREY-900)",border:"solid 1px rgba(226, 226, 232, 1)",display:"flex",rowGap:"4px",padding:"20px",borderRadius:"8px",justifyContent:"space-between",flexWrap:"wrap",flexDirection:"column",width:"100%",boxSizing:"border-box",fontSize:"16px",fontWeight:"400",lineHeight:"24px",letterSpacing:"0em",transition:"border-color 0.3s var(--TRANSITION-CUBIC-BEZIER) background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)"},children:[(0,ye.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",marginBlock:"0",textAlign:"start",marginTop:"2px",columnGap:"12px",width:"100%"},children:[(0,ye.jsx)("div",{children:c?(0,ye.jsx)(O,{name:"check",className:"ancillary-card__selected-icon"}):(0,ye.jsx)(O,{name:r})}),(0,ye.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"start",width:"100%"},children:[(0,ye.jsx)("p",{className:"p1--semibold",style:{marginBlock:"0"},children:e}),(0,ye.jsx)("div",{className:"ancillary-card__children",children:l?o:(0,ye.jsx)(O,{name:"expand_content",className:"ancillary-card__expand-icon"})})]})]}),(0,ye.jsx)("p",{className:"p1--regular",style:{textAlign:"start",color:"var(--GREY-600)",marginLeft:"34px",marginBlock:"0"},children:n})]})};var Eo=t=>{t?document.body.style.overflow="":document.body.style.overflow="hidden"};var Hs=I(we()),Ys=I(require("react"));var Gs=I(we());var vo=require("react/jsx-runtime"),Eu={primary:"icon-button--primary",outlined:"icon-button--outlined"},zr=({icon:t,variant:e="primary",className:r,...n})=>(0,vo.jsx)("button",{type:"button",className:(0,Gs.default)("icon-button",Eu[e],r),...n,children:(0,vo.jsx)(O,{name:t})});var yr=require("react/jsx-runtime"),Sr=({children:t,onClose:e,isOpen:r})=>(Ys.useEffect(()=>(Eo(!r),()=>Eo(!0)),[r]),(0,yr.jsx)("div",{className:(0,Hs.default)("modal",r&&"modal--open"),style:{opacity:0},children:(0,yr.jsxs)("div",{role:"presentation",className:"modal--content",children:[t,(0,yr.jsx)(zr,{icon:"close",onClick:e,title:"Close modal",className:"modal--close-button"})]})})),Er=({children:t})=>(0,yr.jsx)("div",{className:"modal-body",children:t});var ei=t=>t.reduce((e,r)=>({[r.id]:r,...e}),{});var ti=t=>t.slices.reduce((e,r)=>[...e,...r.segments],new Array);var ii=I(require("react"));var ri=(t,e,r)=>t?t.given_name&&t.family_name?`${t.given_name} ${t.family_name}`:t.given_name?t.given_name:t.family_name?t.family_name:e?.given_name&&e?.family_name?`${e.given_name} ${e.family_name}`:e?.given_name?e.given_name:e?.family_name?e.family_name:`Passenger ${r}`:`Passenger ${r}`;var $s=t=>{if(!t)return he(new Error("getBaggageServiceDescription was not given any metadata")),null;if(!t.maximum_weight_kg&&!t.maximum_length_cm&&!t.maximum_height_cm&&!t.maximum_depth_cm)return null;let e=t.maximum_length_cm&&t.maximum_height_cm&&t.maximum_depth_cm,r="";e&&(r=` / ${t.maximum_height_cm} x ${t.maximum_length_cm} x ${t.maximum_depth_cm} cm`);let n="";return t.maximum_weight_kg&&(n=`Up to ${t.maximum_weight_kg}kg`),`${n}${r}`};var Vs=(t,e,r,n)=>t.some(i=>i.id===n.id||i.serviceInformation?.type!=="carry_on"&&i.serviceInformation?.type!=="checked"||i.serviceInformation?.segmentId!==e||i.serviceInformation?.passengerId!==r?!1:i.serviceInformation?.type===n.metadata.type);var vr=require("react/jsx-runtime"),Ws=({id:t,min:e,max:r,value:n,onChange:i})=>(0,vr.jsxs)("div",{className:"counter",id:t,children:[(0,vr.jsx)(zr,{icon:"minus",title:"Remove one",id:`${t}-minus`,"data-testid":`${t}-minus`,variant:"outlined",disabled:n<=e,onClick:()=>i(Math.max(n-1,e))}),(0,vr.jsx)("div",{className:"counter__count-label",children:n}),(0,vr.jsx)(zr,{icon:"add",title:"Add one",id:`${t}-plus`,"data-testid":`${t}-plus`,variant:"outlined",disabled:n>=r,onClick:()=>i(Math.min(n+1,r))})]});var pt=require("react/jsx-runtime"),js=({segmentId:t,passengerId:e,availableService:r,quantity:n,onQuantityChanged:i,selectedServices:o})=>{let a=r.metadata.type==="carry_on"?"Cabin bag":"Checked bag",s=U(r.total_currency)(+r.total_amount),c=$s(r.metadata),l=Vs(o,t,e,r);return(0,pt.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,pt.jsxs)("div",{children:[(0,pt.jsxs)("p",{style:{margin:0},className:"p2--regular",children:[a,(0,pt.jsx)("span",{style:{marginInline:"4px",color:"var(--GREY-400)"},children:"\u2022"}),(0,pt.jsx)("span",{className:"p2--semibold","data-testid":`price-label--${r.id}--${e}`,children:s})]}),(0,pt.jsx)("p",{style:{margin:0,color:"var(--GREY-600)"},className:"p3--regular",children:c})]}),(0,pt.jsx)(Ws,{id:`counter--${r.id}--${e}`,min:0,value:n,onChange:i,max:l?0:r.maximum_quantity})]})};var zs=require("react/jsx-runtime"),qs=({includedBaggage:t})=>{let{carryOnBagsQuantity:e,checkedBagsQuantity:r}=t.reduce((i,{type:o,quantity:a})=>({carryOnBagsQuantity:i.carryOnBagsQuantity+(o==="carry_on"?a:0),checkedBagsQuantity:i.checkedBagsQuantity+(o==="checked"?a:0)}),{carryOnBagsQuantity:0,checkedBagsQuantity:0}),n=new Array;return e>0&&n.push(Be(e,"cabin bag","cabin bags")),r>0&&n.push(Be(r,"checked bag","checked bags")),(0,zs.jsxs)("div",{style:{marginBlock:"8px",padding:"8px 12px",color:" var(--GREEN-300)",backgroundColor:" var(--GREEN-100)",borderRadius:"6px"},className:"p2--regular",children:[n.join(" and ")," included with ticket"]})};var It=require("react/jsx-runtime"),Zs=({segmentId:t,passengerId:e,passengerName:r,includedBaggage:n,passengerServicesForSegment:i,selectedServices:o,setSelectedServices:a})=>{let s=n.reduce((c,l)=>c+l.quantity,0);return(0,It.jsxs)("div",{style:{marginTop:"24px"},children:[(0,It.jsx)("h3",{style:{margin:0},className:"p1--semibold",children:r}),s?(0,It.jsx)(qs,{includedBaggage:n}):null,(0,It.jsx)("div",{style:{display:"flex",rowGap:"8px",flexDirection:"column"},children:i.map(c=>(0,It.jsx)(js,{passengerId:e,segmentId:t,availableService:c,selectedServices:o,quantity:o.find(({id:l})=>l==c.id)?.quantity||0,onQuantityChanged:l=>vu(l,t,e,r,c,o,a)},c.id))}),i.length===0&&(0,It.jsx)("p",{style:{color:"var(--GREY-700)",margin:0},children:"Extra baggage is not available for this passenger on this flight"})]})},vu=(t,e,r,n,i,o,a)=>{let s=o.findIndex(({id:l})=>i.id===l),c=Array.from(o);s<0?c.push({id:i.id,quantity:t,serviceInformation:{segmentId:e,passengerId:r,passengerName:n,total_amount:i.total_amount,total_currency:i.total_currency,...i.metadata}}):c[s].quantity=t,a(c.filter(({quantity:l})=>l!==0))};var bo=require("react/jsx-runtime"),Ks=({offer:t,segment:e,passengersById:r,selectedServices:n,setSelectedServices:i})=>(0,bo.jsx)(Er,{children:e.passengers.map(({passenger_id:o,baggages:a},s)=>(0,bo.jsx)(Zs,{segmentId:e.id,passengerId:o,passengerName:ri(r[o],t.passengers.find(({id:c})=>c===o),s+1),includedBaggage:a,passengerServicesForSegment:t.available_services.filter(({type:c,passenger_ids:l,segment_ids:f})=>c==="baggage"&&l.includes(o)&&f.includes(e.id)),selectedServices:n,setSelectedServices:i},o))});var mt=require("react/jsx-runtime"),Xs=({selectedServices:t,servicePrices:e,currency:r,isFirstSegment:n,isLastSegment:i,onNextSegmentButtonClicked:o,onPreviousSegmentButtonClicked:a,onClose:s})=>{let c=Ze(t),l=jr(e,t),f=U(r)(l),u=n&&n;return(0,mt.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,mt.jsxs)("div",{className:"flex--space-between",children:[(0,mt.jsxs)("div",{children:["Price for ",Be(c,"extra bag","extra bags")]}),(0,mt.jsxs)("div",{className:"h3--semibold","data-testid":"baggage-total-amount-label",children:["+ ",f]})]}),(0,mt.jsxs)("div",{style:u?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!u&&(0,mt.jsx)(Q,{size:48,variant:"outlined",disabled:n,onClick:()=>a(),children:"Back"}),(0,mt.jsx)(Q,{size:48,"data-testid":"confirm-selection-for-baggage",onClick:()=>i?s():o(),children:i?"Confirm":"Next"})]})]})};var ni=t=>{let e=new Date(t);if(isNaN(e.valueOf()))he(new Error(`formatDateString attempted to parse an invalid date string: ${t}`));else return bu(e)},bu=t=>{let{format:e}=new Intl.DateTimeFormat(void 0,{dateStyle:"medium"});return e(t)};var Ke=require("react/jsx-runtime"),Js=({segmentCount:t,currentSegmentIndex:e,currentSegment:r,setCurrentSegmentIndex:n})=>(0,Ke.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,Ke.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((i,o)=>o===e?(0,Ke.jsx)(Cu,{},`segment_${o}`):(0,Ke.jsx)(Qs,{onClick:()=>n(o)},`segment_${o}`))}),(0,Ke.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginTop:"12px"}:{},children:["Flight to ",r.destination.iata_code,(0,Ke.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:ni(r.departing_at)})]})]}),Qs=({onClick:t,style:e})=>(0,Ke.jsx)("button",{onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...e}}),Cu=()=>(0,Ke.jsx)(Qs,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var br=require("react/jsx-runtime"),ec=({isOpen:t,offer:e,passengers:r,onClose:n,selectedServices:i})=>{let[o,a]=(0,ii.useState)(0),[s,c]=ii.default.useState(i);if(!e)return null;let l=ti(e),f=l[o],u=ei(r),_=ur(e.available_services),h=e.base_currency;return _r(e,"baggage")&&(h=gr(e,"baggage")),(0,br.jsxs)(Sr,{isOpen:t,onClose:()=>n(i),children:[(0,br.jsx)(Js,{segmentCount:l.length,currentSegment:f,currentSegmentIndex:o,setCurrentSegmentIndex:T=>a(T)}),(0,br.jsx)(Ks,{offer:e,selectedServices:s,passengersById:u,segment:f,setSelectedServices:c}),(0,br.jsx)(Xs,{currency:h,selectedServices:s,servicePrices:_,isFirstSegment:o===0,isLastSegment:o+1===l.length,onNextSegmentButtonClicked:()=>a(o+1),onPreviousSegmentButtonClicked:()=>a(o-1),onClose:()=>n(s)})]})};var Xe=require("react/jsx-runtime"),rc=({isLoading:t,offer:e,passengers:r,selectedServices:n,setSelectedServices:i})=>{let[o,a]=tc.default.useState(!1),s=_r(e,"baggage"),c=Ze(n),l=c>0,f=Nt(e,n),u=e?.base_currency||"";s&&(u=gr(e,"baggage"));let _=e?U(u)(f):"0",h=s&&l?`${Be(c,"bag","bags")} added for ${_}`:"Add any extra baggage you need for your trip";return(0,Xe.jsxs)(Xe.Fragment,{children:[(0,Xe.jsxs)(hr,{buttonTitle:"Select extra baggage",title:"Extra baggage",copy:h,icon:"cabin_bag",onClick:s?()=>a(!0):null,isLoading:t,disabled:!t&&!s,isSelected:l,children:[t&&(0,Xe.jsxs)(ut,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,Xe.jsx)(mr,{})]}),!t&&!s&&(0,Xe.jsx)(ut,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,Xe.jsx)(ec,{isOpen:!!(o&&e),offer:e,passengers:r,onClose:T=>{let P=JSON.parse(JSON.stringify(T));i(P),a(!1)},selectedServices:n})]})};var sc=I(require("react"));var Zr=require("react/jsx-runtime"),oi=({children:t})=>(0,Zr.jsxs)("li",{className:"cfar-modal-list-item",children:[(0,Zr.jsx)(O,{name:"check"}),(0,Zr.jsx)("p",{children:t})]});var gt=require("react/jsx-runtime"),nc=({offerCurrency:t,service:e})=>(0,gt.jsxs)(Er,{children:[(0,gt.jsxs)("ul",{style:{padding:0},children:[(0,gt.jsx)(oi,{children:"Cancel your trip for any reason"}),(0,gt.jsxs)(oi,{children:["Guaranteed refund of"," ",U(t)(+e.metadata.refund_amount)]}),(0,gt.jsx)(oi,{children:"Redeemable up to 24 hours before first flight departure"})]}),(0,gt.jsxs)("a",{href:e.metadata.terms_and_conditions_url,rel:"noopener noreferrer",target:"_blank",className:"p2--regular",style:{color:"var(--GREY-600)"},children:["Terms and conditions",(0,gt.jsx)(O,{name:"north_east",size:16,style:{display:"inline",verticalAlign:"middle",marginLeft:"4px"}})]})]});var At=require("react/jsx-runtime"),ic=({service:t,selectedServices:e,onAddCfarService:r,onRemoveCfarService:n,onClose:i})=>{let o=e.some(({id:s})=>s==t.id),a=U(t.total_currency)(+t.total_amount);return(0,At.jsxs)("div",{className:"cfar-modal-footer",children:[(0,At.jsx)(Q,{size:48,variant:o?"destructive":"outlined",onClick:o?n:i,children:o?"Remove protection":"Don\u2019t protect trip"}),!o&&(0,At.jsxs)(Q,{size:48,"data-testid":"confirm-selection-for-cfar",onClick:r,children:["Add protection for ",a]}),o&&(0,At.jsx)(Tu,{})]})},Tu=()=>(0,At.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",columnGap:"8px",backgroundColor:"var(--GREY-100)",padding:"var(--space-12)",borderRadius:"var(--BUTTON-RADIUS)"},children:[(0,At.jsx)(O,{size:20,name:"shield_with_moon",style:{fill:"var(--SECONDARY, rgb(var(--ACCENT)))"}}),"Your trip is protected"]});var Co=require("react/jsx-runtime"),oc=()=>(0,Co.jsx)("div",{style:{padding:"24px 24px 16px"},children:(0,Co.jsx)("h2",{className:"h3--semibold",style:{marginBlock:0},children:"Cancel for any reason"})});var _t=require("react/jsx-runtime"),ac=({isOpen:t,offerCurrency:e,service:r,onClose:n,selectedServices:i})=>(0,_t.jsxs)(Sr,{isOpen:t,onClose:()=>n(i),children:[(0,_t.jsx)(oc,{}),r&&e&&(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)(nc,{service:r,offerCurrency:e}),(0,_t.jsx)(ic,{service:r,selectedServices:i,onAddCfarService:()=>n([{id:r.id,quantity:1,serviceInformation:{type:"cancel_for_any_reason",total_amount:r.total_amount,total_currency:r.total_currency,...r.metadata}}]),onRemoveCfarService:()=>n([]),onClose:()=>n(i)})]})]});var Je=require("react/jsx-runtime"),cc=({isLoading:t,offer:e,selectedServices:r,setSelectedServices:n})=>{let[i,o]=sc.default.useState(!1),a=_r(e,"cancel_for_any_reason"),c=Ze(r)>0,l=e?.base_currency||"";a&&(l=gr(e,"cancel_for_any_reason"));let f=Nt(e,r),u=e?U(l)(f):"0",_=e?.available_services.find(pr),h=a&&c?`Your trip is protected for ${u}`:"Protect your purchase if you decide to cancel";return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)(hr,{buttonTitle:"Add cancel for any reason",title:"Cancel for any reason",copy:h,icon:"shield_with_moon",onClick:a?()=>o(!0):null,isLoading:t,disabled:!t&&!a,isSelected:c,children:[t&&(0,Je.jsxs)(ut,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,Je.jsx)(mr,{})]}),!t&&!a&&(0,Je.jsx)(ut,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,Je.jsx)(ac,{isOpen:!!(i&&e&&_),offerCurrency:e?.base_currency,service:_,onClose:T=>{o(!1),n(T)},selectedServices:r})]})};var lc=(t,e)=>{for(let r of t)for(let n of r.cabins)for(let i of n.rows)for(let o of i.sections)for(let a of o.elements)if(e(a))return a};var ai=t=>lc(t,r=>r.type==="seat"&&r.available_services.length>0)?.available_services[0]?.total_currency;var Yc=I(require("react"));var fc=t=>t.flatMap(e=>e.passengers.map((r,n)=>({passenger:r,passengerIndex:n,segment:e})));var Io=I(require("react"));var dc=(t,e)=>e.cabins.filter(r=>r.deck===t);var uc=t=>{let e=new Set;for(let r of t)for(let n of r.rows)for(let i of n.sections)for(let o of i.elements)o.type!=="seat"&&o.type!=="empty"&&e.add(o.type);return e};var pc=(t,e)=>!!(t.wings&&t.wings.first_row_index<=e&&t.wings.last_row_index>=e);var wc=I(we()),Bc=I(require("react"));var mc=I(we());var To=require("react/jsx-runtime"),gc=({value:t,onChange:e,options:r})=>(0,To.jsx)("div",{className:"seat-map__tab-select",children:r.map(n=>(0,To.jsx)("button",{type:"button",className:(0,mc.default)("seat-map__tab-select-option",{"seat-map__tab-select-option--selected":n===t}),onClick:()=>t!==n&&e(n),children:n},n))});var hc=require("react/jsx-runtime"),_c=({value:t,setValue:e})=>{let r=["Lower deck","Upper deck"];return(0,hc.jsx)(gc,{options:r,value:r[t],onChange:n=>e(r.indexOf(n))})};var ee=require("react/jsx-runtime"),yc=({symbols:t})=>(0,ee.jsxs)("div",{className:"seat-map__legend",children:[(0,ee.jsxs)("span",{className:"seat-map__legend-item",children:[(0,ee.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--fee-payable","aria-label":"Additional cost for seat",children:(0,ee.jsx)(O,{name:"seat_paid_indicator",className:"seat-map__legend-seat--fee-payable-indicator",size:12})}),"Additional Cost"]}),(0,ee.jsxs)("span",{className:"seat-map__legend-item",children:[(0,ee.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--included","aria-label":"Included seat"}),"Included"]}),(0,ee.jsxs)("span",{className:"seat-map__legend-item",children:[(0,ee.jsx)("span",{className:"seat-map__legend-seat seat-map__legend-seat--selected","aria-label":"Selected seat"}),"Selected"]}),(0,ee.jsxs)("span",{className:"seat-map__legend-item",children:[(0,ee.jsx)("span",{className:"seat-map__legend-seat","aria-label":"Unavailable seat",children:(0,ee.jsx)(O,{name:"close",size:14})}),"Unavailable"]}),[...t].map(e=>(0,ee.jsxs)("span",{className:"seat-map__legend-item seat-map__legend-item--symbol",children:[(0,ee.jsx)(O,{name:e,size:20}),e.split("_")[0]]},e))]});var Sc=t=>{let e=Object.values(t.sections).map(r=>r.elements).reduce((r,n)=>r.concat(n),[]).filter(r=>r.type==="seat");return e.length>0?e[0].designator.substring(0,e[0].designator.length-1):null};var Ac=I(we()),Oo=I(require("react"));var Ec=I(we());var Ro=require("react/jsx-runtime"),Ru=["bassinet","exit_row"],vc=({type:t})=>(0,Ro.jsx)("div",{className:(0,Ec.default)("map-element map-element--amenity",{"map-element--wrapped":!Ru.includes(t)}),"aria-label":t.toString(),children:(0,Ro.jsx)(O,{name:t,size:16})});var bc=require("react/jsx-runtime"),Kr=()=>(0,bc.jsx)("div",{className:"map-element map-element--empty"});var Cc=I(we());var si=require("react/jsx-runtime"),Tc=({isRight:t})=>(0,si.jsx)("div",{className:(0,Cc.default)("map-element map-element--exit",{"map-element--exit--right":t}),children:t?(0,si.jsx)(O,{name:"exit_row_right"}):(0,si.jsx)(O,{name:"exit_row"})});var Rc=(t="")=>t.split(" ").map(e=>e[0]).slice(0,2).join("");var Pc=I(we());var Mt=require("react/jsx-runtime"),xc=({seat:t,service:e})=>{let r=e?U(e.total_currency)(+e.total_amount):"";return(0,Mt.jsxs)("div",{className:"seat-info",children:[(0,Mt.jsxs)("div",{className:"seat-info__details",children:[(0,Mt.jsx)("strong",{children:t?.designator}),(0,Mt.jsxs)("span",{children:[t?.name||"Seat"," "]}),(0,Mt.jsx)("strong",{children:r})]}),t?.disclosures.map((n,i)=>(0,Mt.jsx)("div",{className:"seat-info__disclosure",children:n},i))]})};var xo=require("react/jsx-runtime"),Oc=({seat:t})=>(0,xo.jsx)("span",{className:"map-element map-element__seat","aria-label":`${t.designator} ${t.name||"Seat"} Unavailable`,children:(0,xo.jsx)(O,{name:"close",size:14})});var ht=require("react/jsx-runtime"),Nc=({element:t,currentPassengerId:e,currentSegmentId:r,currentPassengerName:n,onSeatToggled:i,selectedServicesMap:o})=>{let a=t.available_services.find(G=>G.passenger_id===e);if(!a)return(0,ht.jsx)(Oc,{seat:t});let s=Object.values(o).find(G=>G.serviceInformation?.designator===t.designator&&G.serviceInformation?.segmentId===r),c=s!=null,l=c?Rc(s.serviceInformation?.passengerName):t.designator.charAt(t.designator.length-1),f=!isNaN(+a?.total_amount)&&+a?.total_amount!=0,u=!c&&a.passenger_id===e,_=!c||c&&r===s.serviceInformation?.segmentId&&e===s.serviceInformation?.passengerId,h=(0,Pc.default)("map-element","map-element__seat",{"map-element--available":u,"map-element--selected":c,"map-element--actionable":_}),T=U(a.total_currency)(+a.total_amount),P=c&&r===s.serviceInformation?.segmentId&&e===s.serviceInformation?.passengerId;return(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsxs)("button",{"data-testid":`seat-${t.designator}`,id:t.designator,className:h,onClick:()=>{_&&i({quantity:c?0:1,id:a.id,serviceInformation:{type:"seat",segmentId:r,passengerId:e,passengerName:n,designator:t.designator,disclosures:t.disclosures,total_amount:a.total_amount,total_currency:a.total_currency}})},"aria-label":`${t.designator} ${t.name||"Seat"} ${T}`,children:[f&&(0,ht.jsx)(O,{name:"seat_paid_indicator",className:"map-element--fee-payable",size:16}),l]}),P&&(0,ht.jsx)(xc,{seat:t,service:a})]})};var Dt=require("react/jsx-runtime"),Ic=({element:t,elementIndex:e,sectionIndex:r,onSeatToggled:n,selectedServicesMap:i,currentPassengerId:o,currentSegmentId:a,currentPassengerName:s})=>(0,Dt.jsx)(Dt.Fragment,{children:Kn(t)?(0,Dt.jsx)(Nc,{currentSegmentId:a,currentPassengerId:o,currentPassengerName:s,selectedServicesMap:i,element:t,onSeatToggled:n},e):t.type==="empty"?(0,Dt.jsx)(Kr,{},e):t.type==="exit_row"?(0,Dt.jsx)(Tc,{isRight:r>0},e):(0,Dt.jsx)(vc,{type:t.type},e)});var yt=require("react/jsx-runtime"),Mc=({row:t,rowNumber:e,hasWings:r,section:n,sectionIndex:i,onSeatToggled:o,selectedServicesMap:a,currentPassengerId:s,currentPassengerName:c,currentSegmentId:l})=>{let f=Object.keys(t.sections).length,u=f===1;return(0,yt.jsxs)(Oo.Fragment,{children:[(0,yt.jsx)("div",{className:(0,Ac.default)("map-section",{"map-section--left":i===0,"map-section--right":u?!1:i===f-1,"map-section--wing":r}),children:n.elements.length>0?n.elements.map((_,h)=>(0,yt.jsx)(Oo.Fragment,{children:(0,yt.jsx)(Ic,{sectionIndex:i,elementIndex:h,element:_,selectedServicesMap:a,onSeatToggled:o,currentPassengerId:s,currentSegmentId:l,currentPassengerName:c})},h)):(0,yt.jsx)(Kr,{})}),(i<f-1||u&&i<f)&&(0,yt.jsx)("span",{className:"map-section__aisle",children:e}),u&&i===t.sections.length-1&&(0,yt.jsx)(Kr,{})]},i)};var Xr=require("react/jsx-runtime"),Dc=({row:t,hasWings:e,onSeatToggled:r,selectedServicesMap:n,currentPassengerId:i,currentPassengerName:o,currentSegmentId:a})=>{let s=Sc(t);return(0,Xr.jsx)(Xr.Fragment,{children:t.sections.map((c,l)=>(0,Xr.jsx)(Mc,{row:t,rowNumber:s,hasWings:e,section:c,sectionIndex:l,selectedServicesMap:n,onSeatToggled:r,currentPassengerId:i,currentPassengerName:o,currentSegmentId:a},l))})};var Jr=require("react/jsx-runtime"),Po=()=>(0,Jr.jsxs)(fr,{children:[(0,Jr.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Seat selection unavailable"}),(0,Jr.jsx)("p",{className:"p1--regular",style:{color:"var(--GREY-600)",marginBlock:"12px",textAlign:"center"},children:"Unfortunately seat selection is not available for this flight. A seat will be allocated by the airline."})]});var Qe=require("react/jsx-runtime"),kc=({seatMap:t,onSeatToggled:e,selectedServicesMap:r,currentPassengerId:n,currentPassengerName:i,currentSegmentId:o})=>{let[a,s]=Bc.useState(0);if(!t||!t.cabins||!t.cabins.length)return(0,Qe.jsx)(Po,{});let c=dc(a,t),l=c.length!==t.cabins.length,f=t.cabins.some(_=>_.wings);if(!c||!c.length)return(0,Qe.jsx)(Po,{});let u=uc(c);return(0,Qe.jsxs)("div",{className:(0,wc.default)("seat-map",{"seat-map--wings":f}),children:[l&&(0,Qe.jsx)(_c,{value:a,setValue:_=>{s(_)}}),(0,Qe.jsx)("div",{className:"seat-map__legend-container",children:(0,Qe.jsx)(yc,{symbols:u})}),c.map((_,h)=>(0,Qe.jsx)("div",{className:"seat-map__map-container",style:{"--CABIN-AISLES":_.aisles},children:_.rows.map((T,P)=>(0,Qe.jsx)(Dc,{row:T,hasWings:pc(_,P),onSeatToggled:e,selectedServicesMap:r,currentPassengerId:n,currentPassengerName:i,currentSegmentId:o},P))},`cabin-${h}`))]})};var No=require("react/jsx-runtime"),Lc=t=>(0,No.jsx)(Er,{children:(0,No.jsx)(kc,{...t})});var St=require("react/jsx-runtime"),Fc=({selectedServices:t,servicePrices:e,currency:r,isFirstSegment:n,isLastSegment:i,onNextSegmentButtonClicked:o,onPreviousSegmentButtonClicked:a,onClose:s,seatMaps:c})=>{let l=Ze(t),f=jr(e,t,c),u=U(r)(f),_=n&&i;return(0,St.jsxs)("div",{style:{padding:"16px 24px 24px"},children:[(0,St.jsxs)("div",{className:"flex--space-between",children:[(0,St.jsxs)("div",{children:["Price for ",Be(l,"seat","seats")]}),(0,St.jsxs)("div",{className:"h3--semibold",children:["+ ",u]})]}),(0,St.jsxs)("div",{style:_?{marginTop:"16px",display:"grid"}:{marginTop:"16px",display:"grid",columnGap:"12px",gridTemplateColumns:"repeat(2, 1fr)"},children:[!_&&(0,St.jsx)(Q,{size:48,disabled:n,variant:"outlined",onClick:()=>a(),children:"Back"}),(0,St.jsx)(Q,{size:48,"data-testid":"confirm-selection-for-seats",onClick:()=>i?s():o(),children:i?"Confirm":"Next"})]})]})};var ke=require("react/jsx-runtime"),Uc=({segmentAndPassengerPermutationsCount:t,currentSegmentAndPassengerPermutationsIndex:e,currentSegment:r,currentPassengerName:n,setCurrentSegmentAndPassengerPermutationsIndex:i})=>(0,ke.jsxs)("div",{style:{padding:"24px 24px 16px"},children:[t>1&&(0,ke.jsx)("div",{style:{display:"flex",columnGap:"4px"},children:Array(t).fill(0).map((o,a)=>a===e?(0,ke.jsx)(xu,{},`segment_${a}`):(0,ke.jsx)(Gc,{onClick:()=>i(a)},`segment_${a}`))}),(0,ke.jsxs)("h2",{className:"h3--semibold",style:t>1?{marginBlock:"12px 0px"}:{},children:["Flight to ",r.destination.iata_code,(0,ke.jsx)("span",{className:"p2--regular",style:{color:"var(--GREY-600)",marginLeft:"8px"},children:ni(r.departing_at)})]}),(0,ke.jsx)("p",{className:"h3--semibold",style:{color:"var(--GREY-600)",marginBlock:"0 4px"},children:n})]}),Gc=({onClick:t,style:e})=>(0,ke.jsx)("button",{onClick:t,style:{border:"none",width:"4px",height:"4px",padding:"0",borderRadius:"4px",backgroundColor:"var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)))",transition:"background-color 0.3s var(--TRANSITION-CUBIC-BEZIER)",...e}}),xu=()=>(0,ke.jsx)(Gc,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var Cr=require("react/jsx-runtime"),Hc=({isOpen:t,offer:e,passengers:r,seatMaps:n,selectedServices:i,onClose:o})=>{let[a,s]=Io.default.useState(0),[c,l]=Io.default.useState(i),f=c.reduce((K,X)=>({...K,[X.id]:X}),{});if(!e||!n)return null;let u=ti(e),_=ei(r),h=ur(e.available_services),T=fc(u),{passenger:{passenger_id:P},passengerIndex:G,segment:{id:H}}=T[a],C=u.find(({id:K})=>K===H),Ee=_[P],j=n.find(K=>K.segment_id===H),tt=ri(Ee,e.passengers[G],G+1),ve=K=>{let X=new Array;for(let Fe of c){let jt=Fe.id===K.id&&K.quantity===0,Tr=Fe.serviceInformation?.segmentId===H&&Fe.serviceInformation?.passengerId===P;!jt&&!Tr&&(X=[...X,Fe])}K.quantity>0&&(X=[...X,K]),l(X)},Wt=ai(n)??e.total_currency;return(0,Cr.jsxs)(Sr,{isOpen:t,onClose:()=>o(i),children:[(0,Cr.jsx)(Uc,{segmentAndPassengerPermutationsCount:T.length,currentSegment:C,currentPassengerName:tt,currentSegmentAndPassengerPermutationsIndex:a,setCurrentSegmentAndPassengerPermutationsIndex:s}),(0,Cr.jsx)(Lc,{selectedServicesMap:f,seatMap:j,onSeatToggled:ve,currentPassengerId:P,currentPassengerName:tt,currentSegmentId:H}),(0,Cr.jsx)(Fc,{seatMaps:n,currency:Wt,selectedServices:c,servicePrices:h,isFirstSegment:a===0,isLastSegment:a+1===T.length,onNextSegmentButtonClicked:()=>{s(a+1)},onPreviousSegmentButtonClicked:()=>{s(a-1)},onClose:()=>o(c)})]})};var et=require("react/jsx-runtime"),$c=({isLoading:t,offer:e,seatMaps:r,passengers:n,selectedServices:i,setSelectedServices:o})=>{let[a,s]=Yc.default.useState(!1),c=Array.isArray(r)&&r.length>0,l=Ze(i),f=l>0,u=Nt(e,i,r),_=e?.base_currency??"";r&&(_=ai(r)??_);let h=e?U(_)(u):"0",T=c&&f?`${Be(l,"seat","seats")} selected for ${h}`:"Specify where on the plane you\u2019d like to sit";return(0,et.jsxs)(et.Fragment,{children:[(0,et.jsxs)(hr,{buttonTitle:"Select seats",title:"Seat selection",copy:T,icon:"flight_class",onClick:c?()=>s(!0):null,isLoading:t,disabled:t&&!c,isSelected:f,children:[t&&(0,et.jsxs)(ut,{color:"var(--GREY-900)",backgroundColor:"var(--GREY-100)",children:["Loading",(0,et.jsx)(mr,{})]}),!t&&!c&&(0,et.jsx)(ut,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,et.jsx)(Hc,{isOpen:!!(e&&r&&a),seatMaps:r,offer:e,passengers:n,selectedServices:i,onClose:P=>{o(P),s(!1)}})]})};var Se=require("react/jsx-runtime"),Ou="https://assets.duffel.com/components/3.1.3",Pu=`${Ou}/global.css`,Nu=t=>{if(jn(t.debug||!1),dt("Properties passed into the component:",t),!go(t))throw new Error(`The props (${Object.keys(t)}) passed to DuffelAncillaries are invalid. \`onPayloadReady\`, \`passengers\` and \`services\` are always required. Then, depending on your use case you may have one of the following combinations of required props: \`offer_id\` and \`client_key\`, \`offer\` and \`seat_maps\` or \`offer\` and \`client_key\`.Please refer to the documentation for more information and working examples: https://duffel.com/docs/guides/ancillaries-component`);if(t.services.length===0)throw new Error('You must provide at least one service in the "services" prop. Valid services: ["bags", "seats", "cancel_for_any_reason"]');let e=_o(t),r=ho(t),n=yo(t),i=So(t),o=t.services.includes("seats")&&!("seat_maps"in t)&&(e||r||i),[a,s]=de.useState(t.passengers),[c,l]=de.useState(t.offer),[f,u]=de.useState(r),[_,h]=de.useState(n?t.seat_maps:void 0),[T,P]=de.useState(o),[G,H]=de.useState(null),[C,Ee]=de.useState(new Array),[j,tt]=de.useState(new Array),[ve,Wt]=de.useState(new Array),K=Ts(t.markup,t.priceFormatters),X=D=>{let oe="This offer has expired.";if(Ps(D)){H(oe);return}else{let xr=new Date(D?.expires_at)?.getTime()-Date.now(),Bt=1e3*60*60*24;xr<Bt&&setTimeout(()=>H(oe),xr)}let Rr=Rs(D,K);l(Rr)},Fe=D=>{let oe=xs(D,K.seats);h(oe)};if(de.useEffect(()=>{wn("props",{"props.services":t.services,"props.passengers.length":t.passengers.length,"props.offer_id":t.offer_id,"props.client_key":t.client_key,"props.offer?.id":t.offer?.id,"props.seat_maps?.[0]?.id":t.seat_maps?.[0]?.id}),(r||e)&&Ds(t.offer_id,e?null:t.client_key,H,u,D=>{if(X(D),D.passengers.length!==a.length)throw new Error(`The number of passengers given to \`duffel-ancillaries\` (${t.passengers.length}) doesn't match the number of passengers on the given offer (${D.passengers.length}).`);e&&s(t.passengers.map((oe,Rr)=>({...oe,id:D.passengers[Rr].id})))}),o&&Bs(r||e?t.offer_id:t.offer.id,e?null:t.client_key,()=>Fe([]),P,Fe),i&&X(t.offer),n&&(X(t.offer),Fe(t.seat_maps))},[t.offer_id,t.client_key,t.offer?.id,t.seat_maps?.[0]?.id]),de.useEffect(()=>{if(!c)return;let D=Cs({baggageSelectedServices:C,seatSelectedServices:j,cfarSelectedServices:ve,offer:c,passengers:a,seatMaps:_});if(Os(D)){let oe={offer_total_amount:c.total_amount,offer_total_currency:c.total_currency,offer_tax_amount:c.tax_amount,offer_tax_currency:c.tax_currency,baggage_services:C,seat_services:j,cancel_for_any_reason_services:ve};dt("Payload ready",{"Order creation payload":D,"Services metadata":oe}),t.onPayloadReady(D,oe)}},[C,j,ve]),!go(t))return null;let jt=`${72*t.services.length+32*(t.services.length-1)}px`,Tr={display:"flex",width:"100%",flexDirection:"column",rowGap:"12px",...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&Xn(t.styles.accentColor)&&{"--SECONDARY":"var(--GREY-900)","--TERTIARY":"var(--GREY-400)"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return dt("Component's internal state:",{isOfferLoading:f,isSeatMapLoading:T,baggageSelectedServices:C,seatSelectedServices:j,cfarSelectedServices:ve,offer:c,seatMaps:_,error:G}),(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)("link",{rel:"stylesheet",href:Pu}),(0,Se.jsx)("div",{className:"duffel-components",style:Tr,children:(0,Se.jsxs)(dr,{children:[G&&(0,Se.jsx)(bs,{height:jt,message:G}),!G&&t.services.map(D=>{if(D==="bags")return(0,Se.jsx)(rc,{isLoading:f,offer:c,passengers:a,selectedServices:C,setSelectedServices:Ee},"bags");if(D==="seats")return(0,Se.jsx)($c,{isLoading:f||T,seatMaps:_,offer:c,passengers:a,selectedServices:j,setSelectedServices:tt},"seats");if(D==="cancel_for_any_reason")return(0,Se.jsx)(cc,{isLoading:f,offer:c,selectedServices:ve,setSelectedServices:Wt},"cancel_for_any_reason")})]})})]})};var wt=I(Wc());var qc="https://js.stripe.com/v3",Iu=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,jc="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Au=function(){for(var e=document.querySelectorAll('script[src^="'.concat(qc,'"]')),r=0;r<e.length;r++){var n=e[r];if(Iu.test(n.src))return n}return null},Mu=function(e){var r=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(qc).concat(r);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(n),n},Du=function(e,r){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"1.54.0",startTime:r})},li=null,wu=function(e){return li!==null||(li=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&e&&console.warn(jc),window.Stripe){r(window.Stripe);return}try{var i=Au();i&&e?console.warn(jc):i||(i=Mu(e)),i.addEventListener("load",function(){window.Stripe?r(window.Stripe):n(new Error("Stripe.js not available"))}),i.addEventListener("error",function(){n(new Error("Failed to load Stripe.js"))})}catch(o){n(o);return}})),li},Bu=function(e,r,n){if(e===null)return null;var i=e.apply(void 0,r);return Du(i,n),i},zc=Promise.resolve().then(function(){return wu(null)}),Zc=!1;zc.catch(function(t){Zc||console.warn(t)});var Kc=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];Zc=!0;var i=Date.now();return zc.then(function(o){return Bu(o,r,i)})};var Le=I(require("react"));var Z=require("react/jsx-runtime"),ku="https://assets.duffel.com/components/3.1.3",Lu=`${ku}/global.css`,Fu="card",Uu="3.1.3",Gu={color:"var(--GREY-900)",fontFamily:'"-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "sans-serif"',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#ababb4"}},Hu={color:"#ef4444",iconColor:"#ef4444"},Yu=({styles:t,paymentIntentClientToken:e,onSuccessfulPayment:r,onFailedPayment:n})=>{let[i,o]=Le.useState(null),[a,s]=Le.useState(!1),[c,l]=Le.useState(!1),[f,u]=Le.useState(!1),[_,h]=Le.useState(""),T=(0,wt.useStripe)(),P=(0,wt.useElements)();return Le.useEffect(()=>{if(P&&!i){let H=P?.getElement(Fu);H&&o(H)}},[P,i]),Le.useEffect(()=>{i&&i.on("change",H=>{let{error:C,complete:Ee}=H;C?(l(!0),h(C.message)):l(!1),s(!!Ee)})},[i]),e?(0,Z.jsx)("div",{className:"card-payment__container",children:(0,Z.jsxs)("form",{onSubmit:async H=>{if(H.preventDefault(),!(!T||!P)&&i){u(!0);let C=atob(e),Ee=JSON.parse(C),{client_secret:j}=Ee,tt=await T.confirmCardPayment(j,{payment_method:{card:i,metadata:{duffel_components_version:Uu||"failed-to-get-version"}}});if(u(!1),tt.error){let{error:ve}=tt;n(ve)}else r()}},children:[f&&(0,Z.jsx)("div",{className:"card-payment--in-progress","aria-live":"polite","aria-busy":"true"}),(0,Z.jsx)(wt.CardElement,{className:"card-details",options:{style:{base:{...Gu,...t?.fontFamily&&{fontFamily:t.fontFamily}},invalid:{...Hu}}}}),(0,Z.jsx)("div",{className:"card-payment__container--invalid",role:"alert",children:c&&_}),(0,Z.jsx)(Q,{className:"card-payment__pay-button",type:"submit",disabled:!a||f,"aria-label":"Pay",children:f?"Processing...":"Pay"})]})}):null},$u=t=>{let[e,r]=Le.useState(null);jn(t.debug||!1);let n=atob(t.paymentIntentClientToken),i;try{i=JSON.parse(n)}catch{throw new Error("Invalid Duffel payment intent client token provided")}let{publishable_key:o}=i;Le.useEffect(()=>{if(!e&&o){let s=Kc(o);s&&r(s)}},[e,o]);let a={...t.styles?.accentColor&&{"--ACCENT":t.styles.accentColor},...t.styles?.accentColor&&Xn(t.styles.accentColor)&&{"--SECONDARY":"black","--TERTIARY":"grey"},...t.styles?.fontFamily&&{"--FONT-FAMILY":t.styles.fontFamily},...t.styles?.buttonCornerRadius&&{"--BUTTON-RADIUS":t.styles.buttonCornerRadius}};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("link",{rel:"stylesheet",href:Lu}),(0,Z.jsx)("div",{className:"duffel-components",style:a,children:(0,Z.jsx)(dr,{children:(0,Z.jsx)(wt.Elements,{stripe:e,children:(0,Z.jsx)(Yu,{...t})})})})]})};var Vu={economy:"Economy",premium_economy:"Premium Economy",business:"Business",first:"First",any:"Any"},Wu={adult:"Adult",child:"Child",infant_without_seat:"Infant"};
|
|
47
28
|
/*! Bundled license information:
|
|
48
29
|
|
|
49
30
|
classnames/index.js:
|
|
@@ -52,15 +33,5 @@ classnames/index.js:
|
|
|
52
33
|
Licensed under the MIT License (MIT), see
|
|
53
34
|
http://jedwatson.github.io/classnames
|
|
54
35
|
*)
|
|
55
|
-
|
|
56
|
-
lodash/lodash.js:
|
|
57
|
-
(**
|
|
58
|
-
* @license
|
|
59
|
-
* Lodash <https://lodash.com/>
|
|
60
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
61
|
-
* Released under MIT license <https://lodash.com/license>
|
|
62
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
63
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
64
|
-
*)
|
|
65
36
|
*/
|
|
66
37
|
//# sourceMappingURL=index.js.map
|