@duffel/components 3.1.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/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- package/.tool-versions +1 -1
- package/README.md +4 -0
- package/package.json +1 -1
- package/react-dist/index.js +18 -47
- 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 -1
- package/react-dist/components/DuffelAncillaries/Card.d.ts +0 -14
- package/react-dist/components/DuffelAncillaries/Counter.d.ts +0 -10
- package/react-dist/components/DuffelAncillaries/DuffelAncillaries.d.ts +0 -3
- package/react-dist/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +0 -14
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +0 -9
- package/react-dist/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +0 -7
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +0 -10
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +0 -7
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +0 -4
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +0 -2
- package/react-dist/components/DuffelAncillaries/seats/Amenity.d.ts +0 -6
- package/react-dist/components/DuffelAncillaries/seats/DeckSelect.d.ts +0 -15
- package/react-dist/components/DuffelAncillaries/seats/Element.d.ts +0 -15
- package/react-dist/components/DuffelAncillaries/seats/EmptyElement.d.ts +0 -2
- package/react-dist/components/DuffelAncillaries/seats/ExitElement.d.ts +0 -6
- package/react-dist/components/DuffelAncillaries/seats/Legend.d.ts +0 -12
- package/react-dist/components/DuffelAncillaries/seats/Row.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/RowSection.d.ts +0 -17
- package/react-dist/components/DuffelAncillaries/seats/SeatElement.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/SeatInfo.d.ts +0 -7
- package/react-dist/components/DuffelAncillaries/seats/SeatMap.d.ts +0 -12
- package/react-dist/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +0 -2
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +0 -4
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +0 -16
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +0 -10
- package/react-dist/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +0 -5
- package/react-dist/components/DuffelPayments/DuffelPayments.d.ts +0 -11
- package/react-dist/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +0 -14
- package/react-dist/components/PlacesLookup/PlacesLookup.d.ts +0 -20
- package/react-dist/components/shared/AnimatedLoaderEllipsis.d.ts +0 -2
- package/react-dist/components/shared/Button.d.ts +0 -23
- package/react-dist/components/shared/ErrorBoundary.d.ts +0 -13
- package/react-dist/components/shared/FetchOfferErrorState.d.ts +0 -5
- package/react-dist/components/shared/Icon.d.ts +0 -46
- package/react-dist/components/shared/IconButton.d.ts +0 -16
- package/react-dist/components/shared/Modal.d.ts +0 -11
- package/react-dist/components/shared/NonIdealState.d.ts +0 -4
- package/react-dist/components/shared/Stamp.d.ts +0 -7
- package/react-dist/components/shared/Tabs.d.ts +0 -16
- package/react-dist/custom-elements.d.ts +0 -6
- package/react-dist/custom-elements.js +0 -37
- package/react-dist/custom-elements.js.map +0 -7
- package/react-dist/index.d.ts +0 -8
- package/react-dist/index.js.map +0 -7
- package/react-dist/lib/captureErrorInSentry.d.ts +0 -1
- package/react-dist/lib/compileCreateOrderPayload.d.ts +0 -14
- package/react-dist/lib/createPriceFormatters.d.ts +0 -12
- package/react-dist/lib/fetchFromDuffelAPI.d.ts +0 -8
- package/react-dist/lib/fetchFromFixtures.d.ts +0 -4
- package/react-dist/lib/formatAvailableServices.d.ts +0 -12
- package/react-dist/lib/formatDate.d.ts +0 -2
- package/react-dist/lib/formatSeatMaps.d.ts +0 -4
- package/react-dist/lib/getBaggageServiceDescription.d.ts +0 -2
- package/react-dist/lib/getCabinsForSegmentAndDeck.d.ts +0 -2
- package/react-dist/lib/getCurrencyForSeatMaps.d.ts +0 -10
- package/react-dist/lib/getCurrencyForServices.d.ts +0 -11
- package/react-dist/lib/getFirstSeatElementMatchingCriteria.d.ts +0 -3
- package/react-dist/lib/getPassengerBySegmentList.d.ts +0 -6
- package/react-dist/lib/getPassengerInitials.d.ts +0 -1
- package/react-dist/lib/getPassengerMapById.d.ts +0 -3
- package/react-dist/lib/getPassengerName.d.ts +0 -3
- package/react-dist/lib/getRowNumber.d.ts +0 -2
- package/react-dist/lib/getSegmentList.d.ts +0 -2
- package/react-dist/lib/getServicePriceMapById.d.ts +0 -3
- package/react-dist/lib/getSymbols.d.ts +0 -2
- package/react-dist/lib/getTotalAmountForServices.d.ts +0 -6
- package/react-dist/lib/getTotalQuantity.d.ts +0 -2
- package/react-dist/lib/hasHighLuminance.d.ts +0 -1
- package/react-dist/lib/hasService.d.ts +0 -2
- package/react-dist/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +0 -3
- package/react-dist/lib/hasWings.d.ts +0 -2
- package/react-dist/lib/isBaggageService.d.ts +0 -2
- package/react-dist/lib/isCancelForAnyReasonService.d.ts +0 -2
- package/react-dist/lib/isFixtureOfferId.d.ts +0 -2
- package/react-dist/lib/isPayloadComplete.d.ts +0 -2
- package/react-dist/lib/isSeatElement.d.ts +0 -2
- package/react-dist/lib/logging.d.ts +0 -46
- package/react-dist/lib/moneyStringFormatter.d.ts +0 -8
- package/react-dist/lib/offerIsExpired.d.ts +0 -2
- package/react-dist/lib/retrieveOffer.d.ts +0 -2
- package/react-dist/lib/retrieveOfferFromDuffelAPI.d.ts +0 -1
- package/react-dist/lib/retrieveSeatMaps.d.ts +0 -2
- package/react-dist/lib/retrieveSeatMapsFromDuffelAPI.d.ts +0 -1
- package/react-dist/lib/setBodyScrollability.d.ts +0 -1
- package/react-dist/lib/validateProps.d.ts +0 -7
- package/react-dist/lib/withPlural.d.ts +0 -1
- package/react-dist/types/Aircraft.d.ts +0 -14
- package/react-dist/types/Airline.d.ts +0 -14
- package/react-dist/types/Airport.d.ts +0 -44
- package/react-dist/types/City.d.ts +0 -18
- package/react-dist/types/CreateOrderPayload.d.ts +0 -72
- package/react-dist/types/CurrencyConversion.d.ts +0 -10
- package/react-dist/types/DuffelAncillariesProps.d.ts +0 -70
- package/react-dist/types/Offer.d.ts +0 -711
- package/react-dist/types/Order.d.ts +0 -8
- package/react-dist/types/Place.d.ts +0 -8
- package/react-dist/types/SeatMap.d.ts +0 -190
- package/react-dist/types/index.d.ts +0 -11
- package/src/examples/just-typescript/yarn.lock +0 -154
- package/src/examples/payments-just-typescript/yarn.lock +0 -154
- package/src/examples/react-app/yarn.lock +0 -219
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,Qe,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]",ge=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 Qe=Object.keys(T),ae=Object.keys(N);if(Qe.length!==ae.length)return!1;for(var ft={},Dt=0;Dt<Qe.length;Dt+=1)ft[Qe[Dt]]=!0;for(var Bt=0;Bt<ae.length;Bt+=1)ft[ae[Bt]]=!0;var Lt=Object.keys(ft);if(Lt.length!==Qe.length)return!1;var Qr=T,ei=N,kt=function(yr){return M(Qr[yr],ei[yr])};return Lt.every(kt)},he=function(T,N,$){return de(T)?Object.keys(T).reduce(function(Re,ne){var Oe=!de(N)||!ge(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},rt="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(rt)},it=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},_e=n.createContext(null);_e.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 it(N)},[N]),Oe=n.useState(null),Qe=l(Oe,2),ae=Qe[0],ft=Qe[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,Ri=function(xi){yr(function(Ai){return Ai.stripe?Ai:{stripe:xi,elements:xi.elements($)}})};return ne.tag==="async"&&!Ze.stripe?ne.stripePromise.then(function(en){en&&Xe&&Ri(en)}):ne.tag==="sync"&&!Ze.stripe&&Ri(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 Ti=ue($);return n.useEffect(function(){if(Ze.elements){var Xe=he($,Ti,["clientSecret","fonts"]);Xe&&Ze.elements.update(Xe)}},[$,Ti,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(_e.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)},ot=function(T){var N=n.useContext(_e);return ze(N,T)},gc=function(){var T=Mt("calls useElements()"),N=T.elements;return N},hc=function(){var T=Mt("calls useStripe()"),N=T.stripe;return N},_c=function(){var T=ot("calls useCartElement()"),N=T.cart;return N},hr=function(){var T=ot("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)},ye=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,Ti=ae.onLoadError,Xe=ae.onLoaderStart,Ri=ae.onNetworksChange,en=ae.onCheckout,xi=ae.onLineItemClick,Ai=ae.onConfirm,Cc=ae.onCancel,bc=ae.onShippingAddressChange,Tc=ae.onShippingRateChange,Rc=Mt("mounts <".concat($,">")),Ro=Rc.elements,xc=n.useState(null),xo=l(xc,2),Ye=xo[0],Ac=xo[1],Cn=n.useRef(null),Ao=n.useRef(null),ya=ot("mounts <".concat($,">")),Oo=ya.setCart,Sr=ya.setCartState;Ke(Ye,"blur",Qr),Ke(Ye,"focus",ei),Ke(Ye,"escape",yr),Ke(Ye,"click",ti),Ke(Ye,"loaderror",Ti),Ke(Ye,"loaderstart",Xe),Ke(Ye,"networkschange",Ri),Ke(Ye,"lineitemclick",xi),Ke(Ye,"confirm",Ai),Ke(Ye,"cancel",Cc),Ke(Ye,"shippingaddresschange",bc),Ke(Ye,"shippingratechange",Tc);var Oi;T==="cart"?Oi=function(Io){Sr(Io),kt&&kt(Io)}:kt&&(T==="expressCheckout"?Oi=kt:Oi=function(){kt(Ye)}),Ke(Ye,"ready",Oi);var Ii=T==="cart"?function(We){Sr(We),Ze&&Ze(We)}:Ze;Ke(Ye,"change",Ii);var Oc=T==="cart"?function(We){Sr(We),en&&en(We)}:en;Ke(Ye,"checkout",Oc),n.useLayoutEffect(function(){if(Cn.current===null&&Ro&&Ao.current!==null){var We=Ro.create(T,Lt);T==="cart"&&Oo&&Oo(We),Cn.current=We,Ac(We),We.mount(Ao.current)}},[Ro,Lt,Oo]);var Sa=ue(Lt);return n.useEffect(function(){if(Cn.current){var We=he(Lt,Sa,["paymentRequest"]);We&&Cn.current.update(We)}},[Lt,Sa]),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:Ao})},ne=function(ae){Mt("mounts <".concat($,">")),ot("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",Ei=ye("auBankAccount",Ae),Ci=ye("card",Ae),ha=ye("cardNumber",Ae),yt=ye("cardExpiry",Ae),Kr=ye("cardCvc",Ae),yc=ye("fpxBank",Ae),Qt=ye("iban",Ae),_a=ye("idealBank",Ae),Sc=ye("p24Bank",Ae),Zr=ye("epsBank",Ae),St=ye("payment",Ae),Xr=ye("expressCheckout",Ae),bi=ye("paymentRequestButton",Ae),vc=ye("linkAuthentication",Ae),jr=ye("address",Ae),Ec=ye("shippingAddress",Ae),Jr=ye("cart",Ae),_r=ye("paymentMethodMessaging",Ae),bo=ye("affirmMessage",Ae),To=ye("afterpayClearpayMessage",Ae);t.AddressElement=jr,t.AffirmMessageElement=bo,t.AfterpayClearpayMessageElement=To,t.AuBankAccountElement=Ei,t.CardCvcElement=Kr,t.CardElement=Ci,t.CardExpiryElement=yt,t.CardNumberElement=ha,t.CartElement=Jr,t.Elements=Vr,t.ElementsConsumer=qr,t.EpsBankElement=Zr,t.ExpressCheckoutElement=Xr,t.FpxBankElement=yc,t.IbanElement=Qt,t.IdealBankElement=_a,t.LinkAuthenticationElement=vc,t.P24BankElement=Sc,t.PaymentElement=St,t.PaymentMethodMessagingElement=_r,t.PaymentRequestButtonElement=bi,t.ShippingAddressElement=Ec,t.useCartElement=_c,t.useCartElementState=hr,t.useElements=gc,t.useStripe=hc,Object.defineProperty(t,"__esModule",{value:!0})})});var p_=ss((vo,ga)=>{(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,ge=30,he="...",rt=800,Nt=16,it=1,Wr=2,oe=3,_e=1/0,ze=9007199254740991,Vr=17976931348623157e292,Mt=0/0,ot=4294967295,gc=ot-1,hc=ot>>>1,_c=[["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]",ye="[object Date]",Ae="[object DOMException]",Ei="[object Error]",Ci="[object Function]",ha="[object GeneratorFunction]",yt="[object Map]",Kr="[object Number]",yc="[object Null]",Qt="[object Object]",_a="[object Promise]",Sc="[object Proxy]",Zr="[object RegExp]",St="[object Set]",Xr="[object String]",bi="[object Symbol]",vc="[object Undefined]",jr="[object WeakMap]",Ec="[object WeakSet]",Jr="[object ArrayBuffer]",_r="[object DataView]",bo="[object Float32Array]",To="[object Float64Array]",M="[object Int8Array]",T="[object Int16Array]",N="[object Int32Array]",$="[object Uint8Array]",Re="[object Uint8ClampedArray]",ne="[object Uint16Array]",Oe="[object Uint32Array]",Qe=/\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*$/,Ti=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xe=/[\\^$.*+?()[\]{}|]/g,Ri=RegExp(Xe.source),en=/^\s+/,xi=/\s/,Ai=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Cc=/\{\n\/\* \[wrapped with (.+)\] \*/,bc=/,? & /,Tc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Rc=/[()=,{}\[\]\/\s]/,Ro=/\\(\\)?/g,xc=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,xo=/\w*$/,Ye=/^[-+]0x[0-9a-f]+$/i,Ac=/^0b[01]+$/i,Cn=/^\[object .+?Constructor\]$/,Ao=/^0o[0-7]+$/i,ya=/^(?:0|[1-9]\d*)$/,Oo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sr=/($^)/,Oi=/['\n\r\u2028\u2029\\]/g,Ii="\\ud800-\\udfff",Oc="\\u0300-\\u036f",Sa="\\ufe20-\\ufe2f",We="\\u20d0-\\u20ff",Io=Oc+Sa+We,_f="\\u2700-\\u27bf",yf="a-z\\xdf-\\xf6\\xf8-\\xff",__="\\xac\\xb1\\xd7\\xf7",y_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",S_="\\u2000-\\u206f",v_=" \\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",Sf="A-Z\\xc0-\\xd6\\xd8-\\xde",vf="\\ufe0e\\ufe0f",Ef=__+y_+S_+v_,Ic="['\u2019]",E_="["+Ii+"]",Cf="["+Ef+"]",va="["+Io+"]",bf="\\d+",C_="["+_f+"]",Tf="["+yf+"]",Rf="[^"+Ii+Ef+bf+_f+yf+Sf+"]",wc="\\ud83c[\\udffb-\\udfff]",b_="(?:"+va+"|"+wc+")",xf="[^"+Ii+"]",Pc="(?:\\ud83c[\\udde6-\\uddff]){2}",Nc="[\\ud800-\\udbff][\\udc00-\\udfff]",wi="["+Sf+"]",Af="\\u200d",Of="(?:"+Tf+"|"+Rf+")",T_="(?:"+wi+"|"+Rf+")",If="(?:"+Ic+"(?:d|ll|m|re|s|t|ve))?",wf="(?:"+Ic+"(?:D|LL|M|RE|S|T|VE))?",Pf=b_+"?",Nf="["+vf+"]?",R_="(?:"+Af+"(?:"+[xf,Pc,Nc].join("|")+")"+Nf+Pf+")*",x_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",A_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Mf=Nf+Pf+R_,O_="(?:"+[C_,Pc,Nc].join("|")+")"+Mf,I_="(?:"+[xf+va+"?",va,Pc,Nc,E_].join("|")+")",w_=RegExp(Ic,"g"),P_=RegExp(va,"g"),Mc=RegExp(wc+"(?="+wc+")|"+I_+Mf,"g"),N_=RegExp([wi+"?"+Tf+"+"+If+"(?="+[Cf,wi,"$"].join("|")+")",T_+"+"+wf+"(?="+[Cf,wi+Of,"$"].join("|")+")",wi+"?"+Of+"+"+If,wi+"+"+wf,A_,x_,bf,O_].join("|"),"g"),M_=RegExp("["+Af+Ii+Io+vf+"]"),D_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,B_=["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"],L_=-1,Ee={};Ee[bo]=Ee[To]=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[ye]=Ee[Ei]=Ee[Ci]=Ee[yt]=Ee[Kr]=Ee[Qt]=Ee[Zr]=Ee[St]=Ee[Xr]=Ee[jr]=!1;var Se={};Se[hr]=Se[qr]=Se[Jr]=Se[_r]=Se[zr]=Se[ye]=Se[bo]=Se[To]=Se[M]=Se[T]=Se[N]=Se[yt]=Se[Kr]=Se[Qt]=Se[Zr]=Se[St]=Se[Xr]=Se[bi]=Se[$]=Se[Re]=Se[ne]=Se[Oe]=!0,Se[Ei]=Se[Ci]=Se[jr]=!1;var k_={\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"},F_={"&":"&","<":"<",">":">",'"':""","'":"'"},U_={"&":"&","<":"<",">":">",""":'"',"'":"'"},G_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},H_=parseFloat,$_=parseInt,Df=typeof global=="object"&&global&&global.Object===Object&&global,Y_=typeof self=="object"&&self&&self.Object===Object&&self,Ve=Df||Y_||Function("return this")(),Dc=typeof vo=="object"&&vo&&!vo.nodeType&&vo,ni=Dc&&typeof ga=="object"&&ga&&!ga.nodeType&&ga,Bf=ni&&ni.exports===Dc,Bc=Bf&&Df.process,Ft=function(){try{var E=ni&&ni.require&&ni.require("util").types;return E||Bc&&Bc.binding&&Bc.binding("util")}catch{}}(),Lf=Ft&&Ft.isArrayBuffer,kf=Ft&&Ft.isDate,Ff=Ft&&Ft.isMap,Uf=Ft&&Ft.isRegExp,Gf=Ft&&Ft.isSet,Hf=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 W_(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 V_(E,R){for(var b=E==null?0:E.length;b--&&R(E[b],b,E)!==!1;);return E}function $f(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 Ea(E,R){var b=E==null?0:E.length;return!!b&&Pi(E,R,0)>-1}function Lc(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 kc(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 q_(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 Fc(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_=Uc("length");function K_(E){return E.split("")}function Z_(E){return E.match(Tc)||[]}function Yf(E,R,b){var B;return b(E,function(V,se,Ge){if(R(V,se,Ge))return B=se,!1}),B}function Ca(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 Pi(E,R,b){return R===R?s1(E,R,b):Ca(E,Wf,b)}function X_(E,R,b,B){for(var V=b-1,se=E.length;++V<se;)if(B(E[V],R))return V;return-1}function Wf(E){return E!==E}function Vf(E,R){var b=E==null?0:E.length;return b?Hc(E,R)/b:Mt}function Uc(E){return function(R){return R==null?t:R[E]}}function Gc(E){return function(R){return E==null?t:E[R]}}function qf(E,R,b,B,V){return V(E,function(se,Ge,me){b=B?(B=!1,se):R(b,se,Ge,me)}),b}function j_(E,R){var b=E.length;for(E.sort(R);b--;)E[b]=E[b].value;return E}function Hc(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 $c(E,R){for(var b=-1,B=Array(E);++b<E;)B[b]=R(b);return B}function J_(E,R){return Ce(R,function(b){return[b,E[b]]})}function zf(E){return E&&E.slice(0,jf(E)+1).replace(en,"")}function Et(E){return function(R){return E(R)}}function Yc(E,R){return Ce(R,function(b){return E[b]})}function wo(E,R){return E.has(R)}function Kf(E,R){for(var b=-1,B=E.length;++b<B&&Pi(R,E[b],0)>-1;);return b}function Zf(E,R){for(var b=E.length;b--&&Pi(R,E[b],0)>-1;);return b}function Q_(E,R){for(var b=E.length,B=0;b--;)E[b]===R&&++B;return B}var e1=Gc(k_),t1=Gc(F_);function n1(E){return"\\"+G_[E]}function r1(E,R){return E==null?t:E[R]}function Ni(E){return M_.test(E)}function i1(E){return D_.test(E)}function o1(E){for(var R,b=[];!(R=E.next()).done;)b.push(R.value);return b}function Wc(E){var R=-1,b=Array(E.size);return E.forEach(function(B,V){b[++R]=[V,B]}),b}function Xf(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 ba(E){var R=-1,b=Array(E.size);return E.forEach(function(B){b[++R]=B}),b}function a1(E){var R=-1,b=Array(E.size);return E.forEach(function(B){b[++R]=[B,B]}),b}function s1(E,R,b){for(var B=b-1,V=E.length;++B<V;)if(E[B]===R)return B;return-1}function c1(E,R,b){for(var B=b+1;B--;)if(E[B]===R)return B;return B}function Mi(E){return Ni(E)?l1(E):z_(E)}function tn(E){return Ni(E)?f1(E):K_(E)}function jf(E){for(var R=E.length;R--&&xi.test(E.charAt(R)););return R}var u1=Gc(U_);function l1(E){for(var R=Mc.lastIndex=0;Mc.test(E);)++R;return R}function f1(E){return E.match(Mc)||[]}function p1(E){return E.match(N_)||[]}var d1=function E(R){R=R==null?Ve:br.defaults(Ve.Object(),R,br.pick(Ve,B_));var b=R.Array,B=R.Date,V=R.Error,se=R.Function,Ge=R.Math,me=R.Object,Vc=R.RegExp,m1=R.String,Gt=R.TypeError,Ta=b.prototype,g1=se.prototype,Di=me.prototype,Ra=R["__core-js_shared__"],xa=g1.toString,fe=Di.hasOwnProperty,h1=0,Jf=function(){var e=/[^.]+$/.exec(Ra&&Ra.keys&&Ra.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Aa=Di.toString,_1=xa.call(me),y1=Ve._,S1=Vc("^"+xa.call(fe).replace(Xe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oa=Bf?R.Buffer:t,Tr=R.Symbol,Ia=R.Uint8Array,Qf=Oa?Oa.allocUnsafe:t,wa=Xf(me.getPrototypeOf,me),ep=me.create,tp=Di.propertyIsEnumerable,Pa=Ta.splice,np=Tr?Tr.isConcatSpreadable:t,Po=Tr?Tr.iterator:t,ri=Tr?Tr.toStringTag:t,Na=function(){try{var e=ci(me,"defineProperty");return e({},"",{}),e}catch{}}(),v1=R.clearTimeout!==Ve.clearTimeout&&R.clearTimeout,E1=B&&B.now!==Ve.Date.now&&B.now,C1=R.setTimeout!==Ve.setTimeout&&R.setTimeout,Ma=Ge.ceil,Da=Ge.floor,qc=me.getOwnPropertySymbols,b1=Oa?Oa.isBuffer:t,rp=R.isFinite,T1=Ta.join,R1=Xf(me.keys,me),He=Ge.max,et=Ge.min,x1=B.now,A1=R.parseInt,ip=Ge.random,O1=Ta.reverse,zc=ci(R,"DataView"),No=ci(R,"Map"),Kc=ci(R,"Promise"),Bi=ci(R,"Set"),Mo=ci(R,"WeakMap"),Do=ci(me,"create"),Ba=Mo&&new Mo,Li={},I1=ui(zc),w1=ui(No),P1=ui(Kc),N1=ui(Bi),M1=ui(Mo),La=Tr?Tr.prototype:t,Bo=La?La.valueOf:t,op=La?La.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 ad(e)}return new Ht(e)}var ki=function(){function e(){}return function(r){if(!xe(r))return{};if(ep)return ep(r);e.prototype=r;var o=new e;return e.prototype=t,o}}();function ka(){}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=ka.prototype,d.prototype.constructor=d,Ht.prototype=ki(ka.prototype),Ht.prototype.constructor=Ht;function te(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ot,this.__views__=[]}function D1(){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 B1(){if(this.__filtered__){var e=new te(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function L1(){var e=this.__wrapped__.value(),r=this.__dir__,o=q(e),c=r<0,f=o?e.length:0,g=Ky(0,f,this.__views__),_=g.start,y=g.end,C=y-_,A=c?y:_-1,O=this.__iteratees__,w=O.length,D=0,k=et(C,this.__takeCount__);if(!o||!c&&f==C&&k==C)return Ip(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,ct=re(G);if(Tt==Wr)G=ct;else if(!ct){if(Tt==it)continue e;break e}}U[D++]=G}return U}te.prototype=ki(ka.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 k1(){this.__data__=Do?Do(null):{},this.size=0}function F1(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}function U1(e){var r=this.__data__;if(Do){var o=r[e];return o===l?t:o}return fe.call(r,e)?r[e]:t}function G1(e){var r=this.__data__;return Do?r[e]!==t:fe.call(r,e)}function H1(e,r){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Do&&r===t?l:r,this}ii.prototype.clear=k1,ii.prototype.delete=F1,ii.prototype.get=U1,ii.prototype.has=G1,ii.prototype.set=H1;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 $1(){this.__data__=[],this.size=0}function Y1(e){var r=this.__data__,o=Fa(r,e);if(o<0)return!1;var c=r.length-1;return o==c?r.pop():Pa.call(r,o,1),--this.size,!0}function W1(e){var r=this.__data__,o=Fa(r,e);return o<0?t:r[o][1]}function V1(e){return Fa(this.__data__,e)>-1}function q1(e,r){var o=this.__data__,c=Fa(o,e);return c<0?(++this.size,o.push([e,r])):o[c][1]=r,this}Yn.prototype.clear=$1,Yn.prototype.delete=Y1,Yn.prototype.get=W1,Yn.prototype.has=V1,Yn.prototype.set=q1;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(No||Yn),string:new ii}}function K1(e){var r=Xa(this,e).delete(e);return this.size-=r?1:0,r}function Z1(e){return Xa(this,e).get(e)}function X1(e){return Xa(this,e).has(e)}function j1(e,r){var o=Xa(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=K1,Wn.prototype.get=Z1,Wn.prototype.has=X1,Wn.prototype.set=j1;function oi(e){var r=-1,o=e==null?0:e.length;for(this.__data__=new Wn;++r<o;)this.add(e[r])}function J1(e){return this.__data__.set(e,l),this}function Q1(e){return this.__data__.has(e)}oi.prototype.add=oi.prototype.push=J1,oi.prototype.has=Q1;function nn(e){var r=this.__data__=new Yn(e);this.size=r.size}function ey(){this.__data__=new Yn,this.size=0}function ty(e){var r=this.__data__,o=r.delete(e);return this.size=r.size,o}function ny(e){return this.__data__.get(e)}function ry(e){return this.__data__.has(e)}function iy(e,r){var o=this.__data__;if(o instanceof Yn){var c=o.__data__;if(!No||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=ey,nn.prototype.delete=ty,nn.prototype.get=ny,nn.prototype.has=ry,nn.prototype.set=iy;function ap(e,r){var o=q(e),c=!o&&li(e),f=!o&&!c&&Ir(e),g=!o&&!c&&!f&&Hi(e),_=o||c||f||g,y=_?$c(e.length,m1):[],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 sp(e){var r=e.length;return r?e[ou(0,r-1)]:t}function oy(e,r){return ja(pt(e),ai(r,0,e.length))}function ay(e){return ja(pt(e))}function Zc(e,r,o){(o!==t&&!rn(e[r],o)||o===t&&!(r in e))&&Vn(e,r,o)}function Lo(e,r,o){var c=e[r];(!(fe.call(e,r)&&rn(c,o))||o===t&&!(r in e))&&Vn(e,r,o)}function Fa(e,r){for(var o=e.length;o--;)if(rn(e[o][0],r))return o;return-1}function sy(e,r,o,c){return Rr(e,function(f,g,_){r(c,f,o(f),_)}),c}function cp(e,r){return e&&Tn(r,qe(r),e)}function cy(e,r){return e&&Tn(r,mt(r),e)}function Vn(e,r,o){r=="__proto__"&&Na?Na(e,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[r]=o}function Xc(e,r){for(var o=-1,c=r.length,f=b(c),g=e==null;++o<c;)f[o]=g?t:wu(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(_=Xy(e),!y)return pt(e,_)}else{var w=tt(e),D=w==Ci||w==ha;if(Ir(e))return Np(e,y);if(w==Qt||w==hr||D&&!f){if(_=C||D?{}:jp(e),!y)return C?Uy(e,cy(_,e)):Fy(e,cp(_,e))}else{if(!Se[w])return f?e:{};_=jy(e,w,y)}}g||(g=new nn);var k=g.get(e);if(k)return k;g.set(e,_),xd(e)?e.forEach(function(G){_.add($t(G,r,o,G,e,g))}):Td(e)&&e.forEach(function(G,Q){_.set(Q,$t(G,r,o,Q,e,g))});var U=A?C?hu:gu:C?mt:qe,j=O?t:U(e);return Ut(j||e,function(G,Q){j&&(Q=G,G=e[Q]),Lo(_,Q,$t(G,r,o,Q,e,g))}),_}function uy(e){var r=qe(e);return function(o){return up(o,e,r)}}function up(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 lp(e,r,o){if(typeof e!="function")throw new Gt(s);return Yo(function(){e.apply(t,o)},r)}function ko(e,r,o,c){var f=-1,g=Ea,_=!0,y=e.length,C=[],A=r.length;if(!y)return C;o&&(r=Ce(r,Et(o))),c?(g=Lc,_=!1):r.length>=i&&(g=wo,_=!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=kp(bn),fp=kp(Jc,!0);function ly(e,r){var o=!0;return Rr(e,function(c,f,g){return o=!!r(c,f,g),o}),o}function Ua(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 fy(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:Od(c);o<c;)e[o++]=r;return e}function pp(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=Qy),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=Fp(),dp=Fp(!0);function bn(e,r){return e&&jc(e,r,qe)}function Jc(e,r){return e&&dp(e,r,qe)}function Ga(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 mp(e,r,o){var c=r(e);return q(e)?c:Er(c,o(e))}function at(e){return e==null?e===t?vc:yc:ri&&ri in me(e)?zy(e):aS(e)}function Qc(e,r){return e>r}function py(e,r){return e!=null&&fe.call(e,r)}function dy(e,r){return e!=null&&r in me(e)}function my(e,r,o){return e>=et(r,o)&&e<He(r,o)}function eu(e,r,o){for(var c=o?Lc:Ea,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=et(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?wo(D,U):c(A,U,o))){for(_=g;--_;){var j=y[_];if(!(j?wo(j,U):c(e[_],U,o)))continue e}D&&D.push(U),A.push(k)}}return A}function gy(e,r,o,c){return bn(e,function(f,g,_){r(c,o(f),g,_)}),c}function Fo(e,r,o){r=Ar(r,e),e=td(e,r);var c=e==null?e:e[Rn(Wt(r))];return c==null?t:vt(c,e,o)}function gp(e){return Ie(e)&&at(e)==hr}function hy(e){return Ie(e)&&at(e)==Jr}function _y(e){return Ie(e)&&at(e)==ye}function Uo(e,r,o,c,f){return e===r?!0:e==null||r==null||!Ie(e)&&!Ie(r)?e!==e&&r!==r:yy(e,r,o,c,Uo,f)}function yy(e,r,o,c,f,g){var _=q(e),y=q(r),C=_?qr:tt(e),A=y?qr:tt(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),_||Hi(e)?Kp(e,r,o,c,f,g):Vy(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),qy(e,r,o,c,f,g)):!1}function Sy(e){return Ie(e)&&tt(e)==yt}function tu(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?Uo(O,A,I|P,c,w):D))return!1}}return!0}function hp(e){if(!xe(e)||tS(e))return!1;var r=Zn(e)?S1:Cn;return r.test(ui(e))}function vy(e){return Ie(e)&&at(e)==Zr}function Ey(e){return Ie(e)&&tt(e)==St}function Cy(e){return Ie(e)&&rs(e.length)&&!!Ee[at(e)]}function _p(e){return typeof e=="function"?e:e==null?gt:typeof e=="object"?q(e)?vp(e[0],e[1]):Sp(e):Ud(e)}function nu(e){if(!$o(e))return R1(e);var r=[];for(var o in me(e))fe.call(e,o)&&o!="constructor"&&r.push(o);return r}function by(e){if(!xe(e))return oS(e);var r=$o(e),o=[];for(var c in e)c=="constructor"&&(r||!fe.call(e,c))||o.push(c);return o}function ru(e,r){return e<r}function yp(e,r){var o=-1,c=dt(e)?b(e.length):[];return Rr(e,function(f,g,_){c[++o]=r(f,g,_)}),c}function Sp(e){var r=yu(e);return r.length==1&&r[0][2]?Qp(r[0][0],r[0][1]):function(o){return o===e||tu(o,e,r)}}function vp(e,r){return vu(e)&&Jp(r)?Qp(Rn(e),r):function(o){var c=wu(o,e);return c===t&&c===r?Pu(o,e):Uo(r,c,I|P)}}function Ha(e,r,o,c,f){e!==r&&jc(r,function(g,_){if(f||(f=new nn),xe(g))Ty(e,r,_,o,Ha,c,f);else{var y=c?c(Cu(e,_),g,_+"",e,r,f):t;y===t&&(y=g),Zc(e,_,y)}},mt)}function Ty(e,r,o,c,f,g,_){var y=Cu(e,o),C=Cu(r,o),A=_.get(C);if(A){Zc(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&&Hi(C);O=C,D||k||U?q(y)?O=y:De(y)?O=pt(y):k?(w=!1,O=Np(C,!0)):U?(w=!1,O=Mp(C,!0)):O=[]:Wo(C)||li(C)?(O=y,li(y)?O=Id(y):(!xe(y)||Zn(y))&&(O=jp(C))):w=!1}w&&(_.set(C,O),f(O,C,c,g,_),_.delete(C)),Zc(e,o,O)}function Ep(e,r){var o=e.length;if(o)return r+=r<0?o:0,Kn(r,o)?e[r]:t}function Cp(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=yp(e,function(g,_,y){var C=Ce(r,function(A){return A(g)});return{criteria:C,index:++c,value:g}});return j_(f,function(g,_){return ky(g,_,o)})}function Ry(e,r){return bp(e,r,function(o,c){return Pu(e,c)})}function bp(e,r,o){for(var c=-1,f=r.length,g={};++c<f;){var _=r[c],y=si(e,_);o(y,_)&&Go(g,Ar(_,e),y)}return g}function xy(e){return function(r){return si(r,e)}}function iu(e,r,o,c){var f=c?X_:Pi,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&&Pa.call(y,C,1),Pa.call(e,C,1);return e}function Tp(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)?Pa.call(e,f,1):cu(e,f)}}return e}function ou(e,r){return e+Da(ip()*(r-e+1))}function Ay(e,r,o,c){for(var f=-1,g=He(Ma((r-e)/(o||1)),0),_=b(g);g--;)_[c?g:++f]=e,e+=o;return _}function au(e,r){var o="";if(!e||r<1||r>ze)return o;do r%2&&(o+=e),r=Da(r/2),r&&(e+=e);while(r);return o}function J(e,r){return bu(ed(e,r,gt),e+"")}function Oy(e){return sp($i(e))}function Iy(e,r){var o=$i(e);return ja(o,ai(r,0,o.length))}function Go(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])?[]:{})}Lo(y,C,A),y=y[C]}return e}var Rp=Ba?function(e,r){return Ba.set(e,r),e}:gt,wy=Na?function(e,r){return Na(e,"toString",{configurable:!0,enumerable:!1,value:Mu(r),writable:!0})}:gt;function Py(e){return ja($i(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 Ny(e,r){var o;return Rr(e,function(c,f,g){return o=r(c,f,g),!o}),!!o}function $a(e,r,o){var c=0,f=e==null?c:e.length;if(typeof r=="number"&&r===r&&f<=hc){for(;c<f;){var g=c+f>>>1,_=e[g];_!==null&&!bt(_)&&(o?_<=r:_<r)?c=g+1:f=g}return f}return su(e,r,gt,o)}function su(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=Da((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 et(g,gc)}function xp(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 Ap(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 op?op.call(e):"";var r=e+"";return r=="0"&&1/e==-_e?"-0":r}function xr(e,r,o){var c=-1,f=Ea,g=e.length,_=!0,y=[],C=y;if(o)_=!1,f=Lc;else if(g>=i){var A=r?null:Yy(e);if(A)return ba(A);_=!1,f=wo,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 cu(e,r){return r=Ar(r,e),e=td(e,r),e==null||delete e[Rn(Wt(r))]}function Op(e,r,o,c){return Go(e,r,o(si(e,r)),c)}function Ya(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 Ip(e,r){var o=e;return o instanceof te&&(o=o.value()),kc(r,function(c,f){return f.func.apply(f.thisArg,Er([c],f.args))},o)}function uu(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]=ko(g[f]||_,e[y],r,o));return xr(je(g,1),r,o)}function wp(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 lu(e){return De(e)?e:[]}function fu(e){return typeof e=="function"?e:gt}function Ar(e,r){return q(e)?e:vu(e,r)?[e]:od(le(e))}var My=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 Pp=v1||function(e){return Ve.clearTimeout(e)};function Np(e,r){if(r)return e.slice();var o=e.length,c=Qf?Qf(o):new e.constructor(o);return e.copy(c),c}function pu(e){var r=new e.constructor(e.byteLength);return new Ia(r).set(new Ia(e)),r}function Dy(e,r){var o=r?pu(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function By(e){var r=new e.constructor(e.source,xo.exec(e));return r.lastIndex=e.lastIndex,r}function Ly(e){return Bo?me(Bo.call(e)):{}}function Mp(e,r){var o=r?pu(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function Dp(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 ky(e,r,o){for(var c=-1,f=e.criteria,g=r.criteria,_=f.length,y=o.length;++c<_;){var C=Dp(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 Bp(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 Lp(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):Lo(o,y,C)}return o}function Fy(e,r){return Tn(e,Su(e),r)}function Uy(e,r){return Tn(e,Zp(e),r)}function Wa(e,r){return function(o,c){var f=q(o)?W_:sy,g=r?r():{};return f(o,e,F(c,2),g)}}function Fi(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,_&&st(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 kp(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 Fp(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 Gy(e,r,o){var c=r&L,f=Ho(e);function g(){var _=this&&this!==Ve&&this instanceof g?f:e;return _.apply(c?o:this,arguments)}return g}function Up(e){return function(r){r=le(r);var o=Ni(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 Ui(e){return function(r){return kc(kd(Ld(r).replace(w_,"")),e,"")}}function Ho(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=ki(e.prototype),c=e.apply(o,r);return xe(c)?c:o}}function Hy(e,r,o){var c=Ho(e);function f(){for(var g=arguments.length,_=b(g),y=g,C=Gi(f);y--;)_[y]=arguments[y];var A=g<3&&_[0]!==C&&_[g-1]!==C?[]:Cr(_,C);if(g-=A.length,g<o)return Wp(e,r,Va,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 Gp(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 Hp(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&&!_&&Za(g)=="wrapper")var _=new Ht([],!0)}for(c=_?c:o;++c<o;){g=r[c];var y=Za(g),C=y=="wrapper"?_u(g):t;C&&Eu(C[0])&&C[1]==(Ne|X|ue|Me)&&!C[4].length&&C[9]==1?_=_[Za(C[0])].apply(_,C[3]):_=g.length==1&&Eu(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 Va(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:Ho(e);function G(){for(var Q=arguments.length,re=b(Q),Tt=Q;Tt--;)re[Tt]=arguments[Tt];if(k)var ct=Gi(G),Rt=Q_(re,ct);if(c&&(re=Bp(re,c,f,k)),g&&(re=Lp(re,g,_,k)),Q-=Rt,k&&Q<A){var Be=Cr(re,ct);return Wp(e,r,Va,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=sS(re,y):U&&Q>1&&re.reverse(),O&&C<Q&&(re.length=C),this&&this!==Ve&&this instanceof G&&(jn=j||Ho(jn)),jn.apply(on,re)}return G}function $p(e,r){return function(o,c){return gy(o,e,r(c),{})}}function qa(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=Ap(o),c=Ap(c)),f=e(o,c)}return f}}function du(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 za(e,r){r=r===t?" ":Ct(r);var o=r.length;if(o<2)return o?au(r,e):r;var c=au(r,Ma(e/Mi(r)));return Ni(r)?Or(tn(c),0,e).join(""):c.slice(0,e)}function $y(e,r,o,c){var f=r&L,g=Ho(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 Yp(e){return function(r,o,c){return c&&typeof c!="number"&&st(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),Ay(r,o,c,e)}}function Ka(e){return function(r,o){return typeof r=="string"&&typeof o=="string"||(r=Vt(r),o=Vt(o)),e(r,o)}}function Wp(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 Eu(e)&&nd(G,j),G.placeholder=c,rd(G,e,r)}function mu(e){var r=Ge[e];return function(o,c){if(o=Vt(o),c=c==null?0:et(z(c),292),c&&rp(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 Yy=Bi&&1/ba(new Bi([,-0]))[1]==_e?function(e){return new Bi(e)}:Lu;function Vp(e){return function(r){var o=tt(r);return o==yt?Wc(r):o==St?a1(r):J_(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:_u(e),k=[e,r,o,c,f,O,w,g,_,y];if(D&&iS(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=Gy(e,r,o);else r==X||r==H?U=Hy(e,r,y):(r==ue||r==(L|ue))&&!f.length?U=$y(e,r,o,c):U=Va.apply(t,k);var j=D?Rp:nd;return rd(j(U,k),e,r)}function qp(e,r,o,c){return e===t||rn(e,Di[o])&&!fe.call(c,o)?r:e}function zp(e,r,o,c,f,g){return xe(e)&&xe(r)&&(g.set(r,e),Ha(e,r,t,zp,g),g.delete(r)),e}function Wy(e){return Wo(e)?t:e}function Kp(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(!Fc(r,function(Q,re){if(!wo(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 Vy(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 Ia(e),new Ia(r)));case zr:case ye:case Kr:return rn(+e,+r);case Ei:return e.name==r.name&&e.message==r.message;case Zr:case Xr:return e==r+"";case yt:var y=Wc;case St:var C=c&I;if(y||(y=ba),e.size!=r.size&&!C)return!1;var A=_.get(e);if(A)return A==r;c|=P,_.set(e,r);var O=Kp(y(e),y(r),c,f,g,_);return _.delete(e),O;case bi:if(Bo)return Bo.call(e)==Bo.call(r)}return!1}function qy(e,r,o,c,f,g){var _=o&I,y=gu(e),C=y.length,A=gu(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 ct=e.constructor,Rt=r.constructor;ct!=Rt&&"constructor"in e&&"constructor"in r&&!(typeof ct=="function"&&ct instanceof ct&&typeof Rt=="function"&&Rt instanceof Rt)&&(j=!1)}return g.delete(e),g.delete(r),j}function zn(e){return bu(ed(e,t,ud),e+"")}function gu(e){return mp(e,qe,Su)}function hu(e){return mp(e,mt,Zp)}var _u=Ba?function(e){return Ba.get(e)}:Lu;function Za(e){for(var r=e.name+"",o=Li[r],c=fe.call(Li,r)?o.length:0;c--;){var f=o[c],g=f.func;if(g==null||g==e)return f.name}return r}function Gi(e){var r=fe.call(d,"placeholder")?d:e;return r.placeholder}function F(){var e=d.iteratee||Du;return e=e===Du?_p:e,arguments.length?e(arguments[0],arguments[1]):e}function Xa(e,r){var o=e.__data__;return eS(r)?o[typeof r=="string"?"string":"hash"]:o.map}function yu(e){for(var r=qe(e),o=r.length;o--;){var c=r[o],f=e[c];r[o]=[c,f,Jp(f)]}return r}function ci(e,r){var o=r1(e,r);return hp(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=Aa.call(e);return c&&(r?e[ri]=o:delete e[ri]),f}var Su=qc?function(e){return e==null?[]:(e=me(e),vr(qc(e),function(r){return tp.call(e,r)}))}:ku,Zp=qc?function(e){for(var r=[];e;)Er(r,Su(e)),e=wa(e);return r}:ku,tt=at;(zc&&tt(new zc(new ArrayBuffer(1)))!=_r||No&&tt(new No)!=yt||Kc&&tt(Kc.resolve())!=_a||Bi&&tt(new Bi)!=St||Mo&&tt(new Mo)!=jr)&&(tt=function(e){var r=at(e),o=r==Qt?e.constructor:t,c=o?ui(o):"";if(c)switch(c){case I1:return _r;case w1:return yt;case P1:return _a;case N1:return St;case M1:return jr}return r});function Ky(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=et(r,e+_);break;case"takeRight":e=He(e,r-_);break}}return{start:e,end:r}}function Zy(e){var r=e.match(Cc);return r?r[1].split(bc):[]}function Xp(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&&rs(f)&&Kn(_,f)&&(q(e)||li(e)))}function Xy(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"&&!$o(e)?ki(wa(e)):{}}function jy(e,r,o){var c=e.constructor;switch(r){case Jr:return pu(e);case zr:case ye:return new c(+e);case _r:return Dy(e,o);case bo:case To:case M:case T:case N:case $:case Re:case ne:case Oe:return Mp(e,o);case yt:return new c;case Kr:case Xr:return new c(e);case Zr:return By(e);case St:return new c;case bi:return Ly(e)}}function Jy(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(Ai,`{
|
|
3
|
-
|
|
4
|
-
`)}function Qy(e){return q(e)||li(e)||!!(np&&e&&e[np])}function Kn(e,r){var o=typeof e;return r=r??ze,!!r&&(o=="number"||o!="symbol"&&ya.test(e))&&e>-1&&e%1==0&&e<r}function st(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 vu(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 eS(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function Eu(e){var r=Za(e),o=d[r];if(typeof o!="function"||!(r in te.prototype))return!1;if(e===o)return!0;var c=_u(o);return!!c&&e===c[0]}function tS(e){return!!Jf&&Jf in e}var nS=Ra?Zn:Fu;function $o(e){var r=e&&e.constructor,o=typeof r=="function"&&r.prototype||Di;return e===o}function Jp(e){return e===e&&!xe(e)}function Qp(e,r){return function(o){return o==null?!1:o[e]===r&&(r!==t||e in me(o))}}function rS(e){var r=ts(e,function(c){return o.size===p&&o.clear(),c}),o=r.cache;return r}function iS(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?Bp(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?Lp(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]:et(e[8],r[8])),e[9]==null&&(e[9]=r[9]),e[0]=r[0],e[1]=f,e}function oS(e){var r=[];if(e!=null)for(var o in me(e))r.push(o);return r}function aS(e){return Aa.call(e)}function ed(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 td(e,r){return r.length<2?e:si(e,Yt(r,0,-1))}function sS(e,r){for(var o=e.length,c=et(r.length,o),f=pt(e);c--;){var g=r[c];e[c]=Kn(g,o)?f[g]:t}return e}function Cu(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var nd=id(Rp),Yo=C1||function(e,r){return Ve.setTimeout(e,r)},bu=id(wy);function rd(e,r,o){var c=r+"";return bu(e,Jy(c,cS(Zy(c),o)))}function id(e){var r=0,o=0;return function(){var c=x1(),f=Nt-(c-o);if(o=c,f>0){if(++r>=rt)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=ou(o,f),_=e[g];e[g]=e[o],e[o]=_}return e.length=r,e}var od=rS(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Ti,function(o,c,f,g){r.push(f?g.replace(Ro,"$1"):c||o)}),r});function Rn(e){if(typeof e=="string"||bt(e))return e;var r=e+"";return r=="0"&&1/e==-_e?"-0":r}function ui(e){if(e!=null){try{return xa.call(e)}catch{}try{return e+""}catch{}}return""}function cS(e,r){return Ut(_c,function(o){var c="_."+o[0];r&o[1]&&!Ea(e,c)&&e.push(c)}),e.sort()}function ad(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 uS(e,r,o){(o?st(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(Ma(c/r));f<c;)_[g++]=Yt(e,f,f+=r);return _}function lS(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 fS(){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 pS=J(function(e,r){return De(e)?ko(e,je(r,1,De,!0)):[]}),dS=J(function(e,r){var o=Wt(r);return De(o)&&(o=t),De(e)?ko(e,je(r,1,De,!0),F(o,2)):[]}),mS=J(function(e,r){var o=Wt(r);return De(o)&&(o=t),De(e)?ko(e,je(r,1,De,!0),t,o):[]});function gS(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 hS(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 _S(e,r){return e&&e.length?Ya(e,F(r,3),!0,!0):[]}function yS(e,r){return e&&e.length?Ya(e,F(r,3),!0):[]}function SS(e,r,o,c){var f=e==null?0:e.length;return f?(o&&typeof o!="number"&&st(e,r,o)&&(o=0,c=f),fy(e,r,o,c)):[]}function sd(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)),Ca(e,F(r,3),f)}function cd(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):et(f,c-1)),Ca(e,F(r,3),f,!0)}function ud(e){var r=e==null?0:e.length;return r?je(e,1):[]}function vS(e){var r=e==null?0:e.length;return r?je(e,_e):[]}function ES(e,r){var o=e==null?0:e.length;return o?(r=r===t?1:z(r),je(e,r)):[]}function CS(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 ld(e){return e&&e.length?e[0]:t}function bS(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)),Pi(e,r,f)}function TS(e){var r=e==null?0:e.length;return r?Yt(e,0,-1):[]}var RS=J(function(e){var r=Ce(e,lu);return r.length&&r[0]===e[0]?eu(r):[]}),xS=J(function(e){var r=Wt(e),o=Ce(e,lu);return r===Wt(o)?r=t:o.pop(),o.length&&o[0]===e[0]?eu(o,F(r,2)):[]}),AS=J(function(e){var r=Wt(e),o=Ce(e,lu);return r=typeof r=="function"?r:t,r&&o.pop(),o.length&&o[0]===e[0]?eu(o,t,r):[]});function OS(e,r){return e==null?"":T1.call(e,r)}function Wt(e){var r=e==null?0:e.length;return r?e[r-1]:t}function IS(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):et(f,c-1)),r===r?c1(e,r,f):Ca(e,Wf,f,!0)}function wS(e,r){return e&&e.length?Ep(e,z(r)):t}var PS=J(fd);function fd(e,r){return e&&e.length&&r&&r.length?iu(e,r):e}function NS(e,r,o){return e&&e.length&&r&&r.length?iu(e,r,F(o,2)):e}function MS(e,r,o){return e&&e.length&&r&&r.length?iu(e,r,t,o):e}var DS=zn(function(e,r){var o=e==null?0:e.length,c=Xc(e,r);return Tp(e,Ce(r,function(f){return Kn(f,o)?+f:f}).sort(Dp)),c});function BS(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 Tp(e,f),o}function Tu(e){return e==null?e:O1.call(e)}function LS(e,r,o){var c=e==null?0:e.length;return c?(o&&typeof o!="number"&&st(e,r,o)?(r=0,o=c):(r=r==null?0:z(r),o=o===t?c:z(o)),Yt(e,r,o)):[]}function kS(e,r){return $a(e,r)}function FS(e,r,o){return su(e,r,F(o,2))}function US(e,r){var o=e==null?0:e.length;if(o){var c=$a(e,r);if(c<o&&rn(e[c],r))return c}return-1}function GS(e,r){return $a(e,r,!0)}function HS(e,r,o){return su(e,r,F(o,2),!0)}function $S(e,r){var o=e==null?0:e.length;if(o){var c=$a(e,r,!0)-1;if(rn(e[c],r))return c}return-1}function YS(e){return e&&e.length?xp(e):[]}function WS(e,r){return e&&e.length?xp(e,F(r,2)):[]}function VS(e){var r=e==null?0:e.length;return r?Yt(e,1,r):[]}function qS(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 KS(e,r){return e&&e.length?Ya(e,F(r,3),!1,!0):[]}function ZS(e,r){return e&&e.length?Ya(e,F(r,3)):[]}var XS=J(function(e){return xr(je(e,1,De,!0))}),jS=J(function(e){var r=Wt(e);return De(r)&&(r=t),xr(je(e,1,De,!0),F(r,2))}),JS=J(function(e){var r=Wt(e);return r=typeof r=="function"?r:t,xr(je(e,1,De,!0),t,r)});function QS(e){return e&&e.length?xr(e):[]}function e0(e,r){return e&&e.length?xr(e,F(r,2)):[]}function t0(e,r){return r=typeof r=="function"?r:t,e&&e.length?xr(e,t,r):[]}function Ru(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}),$c(r,function(o){return Ce(e,Uc(o))})}function pd(e,r){if(!(e&&e.length))return[];var o=Ru(e);return r==null?o:Ce(o,function(c){return vt(r,t,c)})}var n0=J(function(e,r){return De(e)?ko(e,r):[]}),r0=J(function(e){return uu(vr(e,De))}),i0=J(function(e){var r=Wt(e);return De(r)&&(r=t),uu(vr(e,De),F(r,2))}),o0=J(function(e){var r=Wt(e);return r=typeof r=="function"?r:t,uu(vr(e,De),t,r)}),a0=J(Ru);function s0(e,r){return wp(e||[],r||[],Lo)}function c0(e,r){return wp(e||[],r||[],Go)}var u0=J(function(e){var r=e.length,o=r>1?e[r-1]:t;return o=typeof o=="function"?(e.pop(),o):t,pd(e,o)});function dd(e){var r=d(e);return r.__chain__=!0,r}function l0(e,r){return r(e),e}function Ja(e,r){return r(e)}var f0=zn(function(e){var r=e.length,o=r?e[0]:0,c=this.__wrapped__,f=function(g){return Xc(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:Ja,args:[f],thisArg:t}),new Ht(c,this.__chain__).thru(function(g){return r&&!g.length&&g.push(t),g}))});function p0(){return dd(this)}function d0(){return new Ht(this.value(),this.__chain__)}function m0(){this.__values__===t&&(this.__values__=Ad(this.value()));var e=this.__index__>=this.__values__.length,r=e?t:this.__values__[this.__index__++];return{done:e,value:r}}function g0(){return this}function h0(e){for(var r,o=this;o instanceof ka;){var c=ad(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 _0(){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:Ja,args:[Tu],thisArg:t}),new Ht(r,this.__chain__)}return this.thru(Tu)}function y0(){return Ip(this.__wrapped__,this.__actions__)}var S0=Wa(function(e,r,o){fe.call(e,o)?++e[o]:Vn(e,o,1)});function v0(e,r,o){var c=q(e)?$f:ly;return o&&st(e,r,o)&&(r=t),c(e,F(r,3))}function E0(e,r){var o=q(e)?vr:pp;return o(e,F(r,3))}var C0=Gp(sd),b0=Gp(cd);function T0(e,r){return je(Qa(e,r),1)}function R0(e,r){return je(Qa(e,r),_e)}function x0(e,r,o){return o=o===t?1:z(o),je(Qa(e,r),o)}function md(e,r){var o=q(e)?Ut:Rr;return o(e,F(r,3))}function gd(e,r){var o=q(e)?V_:fp;return o(e,F(r,3))}var A0=Wa(function(e,r,o){fe.call(e,o)?e[o].push(r):Vn(e,o,[r])});function O0(e,r,o,c){e=dt(e)?e:$i(e),o=o&&!c?z(o):0;var f=e.length;return o<0&&(o=He(f+o,0)),is(e)?o<=f&&e.indexOf(r,o)>-1:!!f&&Pi(e,r,o)>-1}var I0=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):Fo(_,r,o)}),g}),w0=Wa(function(e,r,o){Vn(e,o,r)});function Qa(e,r){var o=q(e)?Ce:yp;return o(e,F(r,3))}function P0(e,r,o,c){return e==null?[]:(q(r)||(r=r==null?[]:[r]),o=c?t:o,q(o)||(o=o==null?[]:[o]),Cp(e,r,o))}var N0=Wa(function(e,r,o){e[o?0:1].push(r)},function(){return[[],[]]});function M0(e,r,o){var c=q(e)?kc:qf,f=arguments.length<3;return c(e,F(r,4),o,f,Rr)}function D0(e,r,o){var c=q(e)?q_:qf,f=arguments.length<3;return c(e,F(r,4),o,f,fp)}function B0(e,r){var o=q(e)?vr:pp;return o(e,ns(F(r,3)))}function L0(e){var r=q(e)?sp:Oy;return r(e)}function k0(e,r,o){(o?st(e,r,o):r===t)?r=1:r=z(r);var c=q(e)?oy:Iy;return c(e,r)}function F0(e){var r=q(e)?ay:Py;return r(e)}function U0(e){if(e==null)return 0;if(dt(e))return is(e)?Mi(e):e.length;var r=tt(e);return r==yt||r==St?e.size:nu(e).length}function G0(e,r,o){var c=q(e)?Fc:Ny;return o&&st(e,r,o)&&(r=t),c(e,F(r,3))}var H0=J(function(e,r){if(e==null)return[];var o=r.length;return o>1&&st(e,r[0],r[1])?r=[]:o>2&&st(r[0],r[1],r[2])&&(r=[r[0]]),Cp(e,je(r,1),[])}),es=E1||function(){return Ve.Date.now()};function $0(e,r){if(typeof r!="function")throw new Gt(s);return e=z(e),function(){if(--e<1)return r.apply(this,arguments)}}function hd(e,r,o){return r=o?t:r,r=e&&r==null?e.length:r,qn(e,Ne,t,t,t,t,r)}function _d(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 xu=J(function(e,r,o){var c=L;if(o.length){var f=Cr(o,Gi(xu));c|=ue}return qn(e,c,r,o,f)}),yd=J(function(e,r,o){var c=L|Y;if(o.length){var f=Cr(o,Gi(yd));c|=ue}return qn(r,c,e,o,f)});function Sd(e,r,o){r=o?t:r;var c=qn(e,X,t,t,t,t,t,r);return c.placeholder=Sd.placeholder,c}function vd(e,r,o){r=o?t:r;var c=qn(e,H,t,t,t,t,t,r);return c.placeholder=vd.placeholder,c}function Ed(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=Yo(Q,r),O?k(Be):_}function j(Be){var on=Be-C,jn=Be-A,Gd=r-on;return w?et(Gd,g-jn):Gd}function G(Be){var on=Be-C,jn=Be-A;return C===t||on>=r||on<0||w&&jn>=g}function Q(){var Be=es();if(G(Be))return re(Be);y=Yo(Q,j(Be))}function re(Be){return y=t,D&&c?k(Be):(c=f=t,_)}function Tt(){y!==t&&Pp(y),A=0,c=C=f=y=t}function ct(){return y===t?_:re(es())}function Rt(){var Be=es(),on=G(Be);if(c=arguments,f=this,C=Be,on){if(y===t)return U(C);if(w)return Pp(y),y=Yo(Q,r),k(C)}return y===t&&(y=Yo(Q,r)),_}return Rt.cancel=Tt,Rt.flush=ct,Rt}var Y0=J(function(e,r){return lp(e,1,r)}),W0=J(function(e,r,o){return lp(e,Vt(r)||0,o)});function V0(e){return qn(e,Te)}function ts(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(ts.Cache||Wn),o}ts.Cache=Wn;function ns(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 q0(e){return _d(2,e)}var z0=My(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=et(c.length,o);++f<g;)c[f]=r[f].call(this,c[f]);return vt(e,this,c)})}),Au=J(function(e,r){var o=Cr(r,Gi(Au));return qn(e,ue,t,r,o)}),Cd=J(function(e,r){var o=Cr(r,Gi(Cd));return qn(e,de,t,r,o)}),K0=zn(function(e,r){return qn(e,Me,t,t,t,r)});function Z0(e,r){if(typeof e!="function")throw new Gt(s);return r=r===t?r:z(r),J(e,r)}function X0(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 j0(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),Ed(e,r,{leading:c,maxWait:r,trailing:f})}function J0(e){return hd(e,1)}function Q0(e,r){return Au(fu(r),e)}function ev(){if(!arguments.length)return[];var e=arguments[0];return q(e)?e:[e]}function tv(e){return $t(e,v)}function nv(e,r){return r=typeof r=="function"?r:t,$t(e,v,r)}function rv(e){return $t(e,h|v)}function iv(e,r){return r=typeof r=="function"?r:t,$t(e,h|v,r)}function ov(e,r){return r==null||up(e,r,qe(r))}function rn(e,r){return e===r||e!==e&&r!==r}var av=Ka(Qc),sv=Ka(function(e,r){return e>=r}),li=gp(function(){return arguments}())?gp:function(e){return Ie(e)&&fe.call(e,"callee")&&!tp.call(e,"callee")},q=b.isArray,cv=Lf?Et(Lf):hy;function dt(e){return e!=null&&rs(e.length)&&!Zn(e)}function De(e){return Ie(e)&&dt(e)}function uv(e){return e===!0||e===!1||Ie(e)&&at(e)==zr}var Ir=b1||Fu,lv=kf?Et(kf):_y;function fv(e){return Ie(e)&&e.nodeType===1&&!Wo(e)}function pv(e){if(e==null)return!0;if(dt(e)&&(q(e)||typeof e=="string"||typeof e.splice=="function"||Ir(e)||Hi(e)||li(e)))return!e.length;var r=tt(e);if(r==yt||r==St)return!e.size;if($o(e))return!nu(e).length;for(var o in e)if(fe.call(e,o))return!1;return!0}function dv(e,r){return Uo(e,r)}function mv(e,r,o){o=typeof o=="function"?o:t;var c=o?o(e,r):t;return c===t?Uo(e,r,t,o):!!c}function Ou(e){if(!Ie(e))return!1;var r=at(e);return r==Ei||r==Ae||typeof e.message=="string"&&typeof e.name=="string"&&!Wo(e)}function gv(e){return typeof e=="number"&&rp(e)}function Zn(e){if(!xe(e))return!1;var r=at(e);return r==Ci||r==ha||r==Ke||r==Sc}function bd(e){return typeof e=="number"&&e==z(e)}function rs(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 Td=Ff?Et(Ff):Sy;function hv(e,r){return e===r||tu(e,r,yu(r))}function _v(e,r,o){return o=typeof o=="function"?o:t,tu(e,r,yu(r),o)}function yv(e){return Rd(e)&&e!=+e}function Sv(e){if(nS(e))throw new V(a);return hp(e)}function vv(e){return e===null}function Ev(e){return e==null}function Rd(e){return typeof e=="number"||Ie(e)&&at(e)==Kr}function Wo(e){if(!Ie(e)||at(e)!=Qt)return!1;var r=wa(e);if(r===null)return!0;var o=fe.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&xa.call(o)==_1}var Iu=Uf?Et(Uf):vy;function Cv(e){return bd(e)&&e>=-ze&&e<=ze}var xd=Gf?Et(Gf):Ey;function is(e){return typeof e=="string"||!q(e)&&Ie(e)&&at(e)==Xr}function bt(e){return typeof e=="symbol"||Ie(e)&&at(e)==bi}var Hi=Hf?Et(Hf):Cy;function bv(e){return e===t}function Tv(e){return Ie(e)&&tt(e)==jr}function Rv(e){return Ie(e)&&at(e)==Ec}var xv=Ka(ru),Av=Ka(function(e,r){return e<=r});function Ad(e){if(!e)return[];if(dt(e))return is(e)?tn(e):pt(e);if(Po&&e[Po])return o1(e[Po]());var r=tt(e),o=r==yt?Wc:r==St?ba:$i;return o(e)}function Xn(e){if(!e)return e===0?e:0;if(e=Vt(e),e===_e||e===-_e){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 Od(e){return e?ai(z(e),0,ot):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=zf(e);var o=Ac.test(e);return o||Ao.test(e)?$_(e.slice(2),o?2:8):Ye.test(e)?Mt:+e}function Id(e){return Tn(e,mt(e))}function Ov(e){return e?ai(z(e),-ze,ze):e===0?e:0}function le(e){return e==null?"":Ct(e)}var Iv=Fi(function(e,r){if($o(r)||dt(r)){Tn(r,qe(r),e);return}for(var o in r)fe.call(r,o)&&Lo(e,o,r[o])}),wd=Fi(function(e,r){Tn(r,mt(r),e)}),os=Fi(function(e,r,o,c){Tn(r,mt(r),e,c)}),wv=Fi(function(e,r,o,c){Tn(r,qe(r),e,c)}),Pv=zn(Xc);function Nv(e,r){var o=ki(e);return r==null?o:cp(o,r)}var Mv=J(function(e,r){e=me(e);var o=-1,c=r.length,f=c>2?r[2]:t;for(f&&st(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,Di[A])&&!fe.call(e,A))&&(e[A]=g[A])}return e}),Dv=J(function(e){return e.push(t,zp),vt(Pd,t,e)});function Bv(e,r){return Yf(e,F(r,3),bn)}function Lv(e,r){return Yf(e,F(r,3),Jc)}function kv(e,r){return e==null?e:jc(e,F(r,3),mt)}function Fv(e,r){return e==null?e:dp(e,F(r,3),mt)}function Uv(e,r){return e&&bn(e,F(r,3))}function Gv(e,r){return e&&Jc(e,F(r,3))}function Hv(e){return e==null?[]:Ga(e,qe(e))}function $v(e){return e==null?[]:Ga(e,mt(e))}function wu(e,r,o){var c=e==null?t:si(e,r);return c===t?o:c}function Yv(e,r){return e!=null&&Xp(e,r,py)}function Pu(e,r){return e!=null&&Xp(e,r,dy)}var Wv=$p(function(e,r,o){r!=null&&typeof r.toString!="function"&&(r=Aa.call(r)),e[r]=o},Mu(gt)),Vv=$p(function(e,r,o){r!=null&&typeof r.toString!="function"&&(r=Aa.call(r)),fe.call(e,r)?e[r].push(o):e[r]=[o]},F),qv=J(Fo);function qe(e){return dt(e)?ap(e):nu(e)}function mt(e){return dt(e)?ap(e,!0):by(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 Kv(e,r){var o={};return r=F(r,3),bn(e,function(c,f,g){Vn(o,f,r(c,f,g))}),o}var Zv=Fi(function(e,r,o){Ha(e,r,o)}),Pd=Fi(function(e,r,o,c){Ha(e,r,o,c)}),Xv=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,hu(e),o),c&&(o=$t(o,h|S|v,Wy));for(var f=r.length;f--;)cu(o,r[f]);return o});function jv(e,r){return Nd(e,ns(F(r)))}var Jv=zn(function(e,r){return e==null?{}:Ry(e,r)});function Nd(e,r){if(e==null)return{};var o=Ce(hu(e),function(c){return[c]});return r=F(r),bp(e,o,function(c,f){return r(c,f[0])})}function Qv(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 eE(e,r,o){return e==null?e:Go(e,r,o)}function tE(e,r,o,c){return c=typeof c=="function"?c:t,e==null?e:Go(e,r,o,c)}var Md=Vp(qe),Dd=Vp(mt);function nE(e,r,o){var c=q(e),f=c||Ir(e)||Hi(e);if(r=F(r,4),o==null){var g=e&&e.constructor;f?o=c?new g:[]:xe(e)?o=Zn(g)?ki(wa(e)):{}:o={}}return(f?Ut:bn)(e,function(_,y,C){return r(o,_,y,C)}),o}function rE(e,r){return e==null?!0:cu(e,r)}function iE(e,r,o){return e==null?e:Op(e,r,fu(o))}function oE(e,r,o,c){return c=typeof c=="function"?c:t,e==null?e:Op(e,r,fu(o),c)}function $i(e){return e==null?[]:Yc(e,qe(e))}function aE(e){return e==null?[]:Yc(e,mt(e))}function sE(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 cE(e,r,o){return r=Xn(r),o===t?(o=r,r=0):o=Xn(o),e=Vt(e),my(e,r,o)}function uE(e,r,o){if(o&&typeof o!="boolean"&&st(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=ip();return et(e+f*(r-e+H_("1e-"+((f+"").length-1))),r)}return ou(e,r)}var lE=Ui(function(e,r,o){return r=r.toLowerCase(),e+(o?Bd(r):r)});function Bd(e){return Nu(le(e).toLowerCase())}function Ld(e){return e=le(e),e&&e.replace(Oo,e1).replace(P_,"")}function fE(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 pE(e){return e=le(e),e&&Qr.test(e)?e.replace(Bt,t1):e}function dE(e){return e=le(e),e&&Ri.test(e)?e.replace(Xe,"\\$&"):e}var mE=Ui(function(e,r,o){return e+(o?"-":"")+r.toLowerCase()}),gE=Ui(function(e,r,o){return e+(o?" ":"")+r.toLowerCase()}),hE=Up("toLowerCase");function _E(e,r,o){e=le(e),r=z(r);var c=r?Mi(e):0;if(!r||c>=r)return e;var f=(r-c)/2;return za(Da(f),o)+e+za(Ma(f),o)}function yE(e,r,o){e=le(e),r=z(r);var c=r?Mi(e):0;return r&&c<r?e+za(r-c,o):e}function SE(e,r,o){e=le(e),r=z(r);var c=r?Mi(e):0;return r&&c<r?za(r-c,o)+e:e}function vE(e,r,o){return o||r==null?r=0:r&&(r=+r),A1(le(e).replace(en,""),r||0)}function EE(e,r,o){return(o?st(e,r,o):r===t)?r=1:r=z(r),au(le(e),r)}function CE(){var e=arguments,r=le(e[0]);return e.length<3?r:r.replace(e[1],e[2])}var bE=Ui(function(e,r,o){return e+(o?"_":"")+r.toLowerCase()});function TE(e,r,o){return o&&typeof o!="number"&&st(e,r,o)&&(r=o=t),o=o===t?ot:o>>>0,o?(e=le(e),e&&(typeof r=="string"||r!=null&&!Iu(r))&&(r=Ct(r),!r&&Ni(e))?Or(tn(e),0,o):e.split(r,o)):[]}var RE=Ui(function(e,r,o){return e+(o?" ":"")+Nu(r)});function xE(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 AE(e,r,o){var c=d.templateSettings;o&&st(e,r,o)&&(r=t),e=le(e),r=os({},r,c,qp);var f=os({},r.imports,c.imports,qp),g=qe(f),_=Yc(f,g),y,C,A=0,O=r.interpolate||Sr,w="__p += '",D=Vc((r.escape||Sr).source+"|"+O.source+"|"+(O===Ze?xc:Sr).source+"|"+(r.evaluate||Sr).source+"|$","g"),k="//# sourceURL="+(fe.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++L_+"]")+`
|
|
5
|
-
`;e.replace(D,function(G,Q,re,Tt,ct,Rt){return re||(re=Tt),w+=e.slice(A,Rt).replace(Oi,n1),Q&&(y=!0,w+=`' +
|
|
6
|
-
__e(`+Q+`) +
|
|
7
|
-
'`),ct&&(C=!0,w+=`';
|
|
8
|
-
`+ct+`;
|
|
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(Rc.test(U))throw new V(u);w=(C?w.replace(Qe,""):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=Fd(function(){return se(g,k+"return "+w).apply(t,_)});if(j.source=w,Ou(j))throw j;return j}function OE(e){return le(e).toLowerCase()}function IE(e){return le(e).toUpperCase()}function wE(e,r,o){if(e=le(e),e&&(o||r===t))return zf(e);if(!e||!(r=Ct(r)))return e;var c=tn(e),f=tn(r),g=Kf(c,f),_=Zf(c,f)+1;return Or(c,g,_).join("")}function PE(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=Zf(c,tn(r))+1;return Or(c,0,f).join("")}function NE(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=Kf(c,tn(r));return Or(c,f).join("")}function ME(e,r){var o=ge,c=he;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(Ni(e)){var _=tn(e);g=_.length}if(o>=g)return e;var y=o-Mi(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),Iu(f)){if(e.slice(y).search(f)){var A,O=C;for(f.global||(f=Vc(f.source,le(xo.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 DE(e){return e=le(e),e&&Lt.test(e)?e.replace(Dt,u1):e}var BE=Ui(function(e,r,o){return e+(o?" ":"")+r.toUpperCase()}),Nu=Up("toUpperCase");function kd(e,r,o){return e=le(e),r=o?t:r,r===t?i1(e)?p1(e):Z_(e):e.match(r)||[]}var Fd=J(function(e,r){try{return vt(e,t,r)}catch(o){return Ou(o)?o:new V(o)}}),LE=zn(function(e,r){return Ut(r,function(o){o=Rn(o),Vn(e,o,xu(e[o],e))}),e});function kE(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 FE(e){return uy($t(e,h))}function Mu(e){return function(){return e}}function UE(e,r){return e==null||e!==e?r:e}var GE=Hp(),HE=Hp(!0);function gt(e){return e}function Du(e){return _p(typeof e=="function"?e:$t(e,h))}function $E(e){return Sp($t(e,h))}function YE(e,r){return vp(e,$t(r,h))}var WE=J(function(e,r){return function(o){return Fo(o,e,r)}}),VE=J(function(e,r){return function(o){return Fo(e,o,r)}});function Bu(e,r,o){var c=qe(r),f=Ga(r,c);o==null&&!(xe(r)&&(f.length||!c.length))&&(o=r,r=e,e=this,f=Ga(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 qE(){return Ve._===this&&(Ve._=y1),this}function Lu(){}function zE(e){return e=z(e),J(function(r){return Ep(r,e)})}var KE=du(Ce),ZE=du($f),XE=du(Fc);function Ud(e){return vu(e)?Uc(Rn(e)):xy(e)}function jE(e){return function(r){return e==null?t:si(e,r)}}var JE=Yp(),QE=Yp(!0);function ku(){return[]}function Fu(){return!1}function e2(){return{}}function t2(){return""}function n2(){return!0}function r2(e,r){if(e=z(e),e<1||e>ze)return[];var o=ot,c=et(e,ot);r=F(r),e-=ot;for(var f=$c(c,r);++o<e;)r(o);return f}function i2(e){return q(e)?Ce(e,Rn):bt(e)?[e]:pt(od(le(e)))}function o2(e){var r=++h1;return le(e)+r}var a2=qa(function(e,r){return e+r},0),s2=mu("ceil"),c2=qa(function(e,r){return e/r},1),u2=mu("floor");function l2(e){return e&&e.length?Ua(e,gt,Qc):t}function f2(e,r){return e&&e.length?Ua(e,F(r,2),Qc):t}function p2(e){return Vf(e,gt)}function d2(e,r){return Vf(e,F(r,2))}function m2(e){return e&&e.length?Ua(e,gt,ru):t}function g2(e,r){return e&&e.length?Ua(e,F(r,2),ru):t}var h2=qa(function(e,r){return e*r},1),_2=mu("round"),y2=qa(function(e,r){return e-r},0);function S2(e){return e&&e.length?Hc(e,gt):0}function v2(e,r){return e&&e.length?Hc(e,F(r,2)):0}return d.after=$0,d.ary=hd,d.assign=Iv,d.assignIn=wd,d.assignInWith=os,d.assignWith=wv,d.at=Pv,d.before=_d,d.bind=xu,d.bindAll=LE,d.bindKey=yd,d.castArray=ev,d.chain=dd,d.chunk=uS,d.compact=lS,d.concat=fS,d.cond=kE,d.conforms=FE,d.constant=Mu,d.countBy=S0,d.create=Nv,d.curry=Sd,d.curryRight=vd,d.debounce=Ed,d.defaults=Mv,d.defaultsDeep=Dv,d.defer=Y0,d.delay=W0,d.difference=pS,d.differenceBy=dS,d.differenceWith=mS,d.drop=gS,d.dropRight=hS,d.dropRightWhile=_S,d.dropWhile=yS,d.fill=SS,d.filter=E0,d.flatMap=T0,d.flatMapDeep=R0,d.flatMapDepth=x0,d.flatten=ud,d.flattenDeep=vS,d.flattenDepth=ES,d.flip=V0,d.flow=GE,d.flowRight=HE,d.fromPairs=CS,d.functions=Hv,d.functionsIn=$v,d.groupBy=A0,d.initial=TS,d.intersection=RS,d.intersectionBy=xS,d.intersectionWith=AS,d.invert=Wv,d.invertBy=Vv,d.invokeMap=I0,d.iteratee=Du,d.keyBy=w0,d.keys=qe,d.keysIn=mt,d.map=Qa,d.mapKeys=zv,d.mapValues=Kv,d.matches=$E,d.matchesProperty=YE,d.memoize=ts,d.merge=Zv,d.mergeWith=Pd,d.method=WE,d.methodOf=VE,d.mixin=Bu,d.negate=ns,d.nthArg=zE,d.omit=Xv,d.omitBy=jv,d.once=q0,d.orderBy=P0,d.over=KE,d.overArgs=z0,d.overEvery=ZE,d.overSome=XE,d.partial=Au,d.partialRight=Cd,d.partition=N0,d.pick=Jv,d.pickBy=Nd,d.property=Ud,d.propertyOf=jE,d.pull=PS,d.pullAll=fd,d.pullAllBy=NS,d.pullAllWith=MS,d.pullAt=DS,d.range=JE,d.rangeRight=QE,d.rearg=K0,d.reject=B0,d.remove=BS,d.rest=Z0,d.reverse=Tu,d.sampleSize=k0,d.set=eE,d.setWith=tE,d.shuffle=F0,d.slice=LS,d.sortBy=H0,d.sortedUniq=YS,d.sortedUniqBy=WS,d.split=TE,d.spread=X0,d.tail=VS,d.take=qS,d.takeRight=zS,d.takeRightWhile=KS,d.takeWhile=ZS,d.tap=l0,d.throttle=j0,d.thru=Ja,d.toArray=Ad,d.toPairs=Md,d.toPairsIn=Dd,d.toPath=i2,d.toPlainObject=Id,d.transform=nE,d.unary=J0,d.union=XS,d.unionBy=jS,d.unionWith=JS,d.uniq=QS,d.uniqBy=e0,d.uniqWith=t0,d.unset=rE,d.unzip=Ru,d.unzipWith=pd,d.update=iE,d.updateWith=oE,d.values=$i,d.valuesIn=aE,d.without=n0,d.words=kd,d.wrap=Q0,d.xor=r0,d.xorBy=i0,d.xorWith=o0,d.zip=a0,d.zipObject=s0,d.zipObjectDeep=c0,d.zipWith=u0,d.entries=Md,d.entriesIn=Dd,d.extend=wd,d.extendWith=os,Bu(d,d),d.add=a2,d.attempt=Fd,d.camelCase=lE,d.capitalize=Bd,d.ceil=s2,d.clamp=sE,d.clone=tv,d.cloneDeep=rv,d.cloneDeepWith=iv,d.cloneWith=nv,d.conformsTo=ov,d.deburr=Ld,d.defaultTo=UE,d.divide=c2,d.endsWith=fE,d.eq=rn,d.escape=pE,d.escapeRegExp=dE,d.every=v0,d.find=C0,d.findIndex=sd,d.findKey=Bv,d.findLast=b0,d.findLastIndex=cd,d.findLastKey=Lv,d.floor=u2,d.forEach=md,d.forEachRight=gd,d.forIn=kv,d.forInRight=Fv,d.forOwn=Uv,d.forOwnRight=Gv,d.get=wu,d.gt=av,d.gte=sv,d.has=Yv,d.hasIn=Pu,d.head=ld,d.identity=gt,d.includes=O0,d.indexOf=bS,d.inRange=cE,d.invoke=qv,d.isArguments=li,d.isArray=q,d.isArrayBuffer=cv,d.isArrayLike=dt,d.isArrayLikeObject=De,d.isBoolean=uv,d.isBuffer=Ir,d.isDate=lv,d.isElement=fv,d.isEmpty=pv,d.isEqual=dv,d.isEqualWith=mv,d.isError=Ou,d.isFinite=gv,d.isFunction=Zn,d.isInteger=bd,d.isLength=rs,d.isMap=Td,d.isMatch=hv,d.isMatchWith=_v,d.isNaN=yv,d.isNative=Sv,d.isNil=Ev,d.isNull=vv,d.isNumber=Rd,d.isObject=xe,d.isObjectLike=Ie,d.isPlainObject=Wo,d.isRegExp=Iu,d.isSafeInteger=Cv,d.isSet=xd,d.isString=is,d.isSymbol=bt,d.isTypedArray=Hi,d.isUndefined=bv,d.isWeakMap=Tv,d.isWeakSet=Rv,d.join=OS,d.kebabCase=mE,d.last=Wt,d.lastIndexOf=IS,d.lowerCase=gE,d.lowerFirst=hE,d.lt=xv,d.lte=Av,d.max=l2,d.maxBy=f2,d.mean=p2,d.meanBy=d2,d.min=m2,d.minBy=g2,d.stubArray=ku,d.stubFalse=Fu,d.stubObject=e2,d.stubString=t2,d.stubTrue=n2,d.multiply=h2,d.nth=wS,d.noConflict=qE,d.noop=Lu,d.now=es,d.pad=_E,d.padEnd=yE,d.padStart=SE,d.parseInt=vE,d.random=uE,d.reduce=M0,d.reduceRight=D0,d.repeat=EE,d.replace=CE,d.result=Qv,d.round=_2,d.runInContext=E,d.sample=L0,d.size=U0,d.snakeCase=bE,d.some=G0,d.sortedIndex=kS,d.sortedIndexBy=FS,d.sortedIndexOf=US,d.sortedLastIndex=GS,d.sortedLastIndexBy=HS,d.sortedLastIndexOf=$S,d.startCase=RE,d.startsWith=xE,d.subtract=y2,d.sum=S2,d.sumBy=v2,d.template=AE,d.times=r2,d.toFinite=Xn,d.toInteger=z,d.toLength=Od,d.toLower=OE,d.toNumber=Vt,d.toSafeInteger=Ov,d.toString=le,d.toUpper=IE,d.trim=wE,d.trimEnd=PE,d.trimStart=NE,d.truncate=ME,d.unescape=DE,d.uniqueId=o2,d.upperCase=BE,d.upperFirst=Nu,d.each=md,d.eachRight=gd,d.first=ld,Bu(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__=et(o,c.__takeCount__):c.__views__.push({size:et(o,ot),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==it||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 Fo(o,e,r)})}),te.prototype.reject=function(e){return this.filter(ns(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(ot)},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:Ja,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=Ta[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(Li,c)||(Li[c]=[]),Li[c].push({name:r,func:o})}}),Li[Va(t,Y).name]=[{name:"wrapper",func:t}],te.prototype.clone=D1,te.prototype.reverse=B1,te.prototype.value=L1,d.prototype.at=f0,d.prototype.chain=p0,d.prototype.commit=d0,d.prototype.next=m0,d.prototype.plant=h0,d.prototype.reverse=_0,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=y0,d.prototype.first=d.prototype.head,Po&&(d.prototype[Po]=g0),d},br=d1();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ve._=br,define(function(){return br})):ni?((ni.exports=br)._=br,Dc._=br):Ve._=br}).call(vo)});var m_=ss((Eo,d_)=>{"use strict";var p3=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=p3();d_.exports=Eo=vi.fetch;vi.fetch&&(Eo.default=vi.fetch.bind(vi));Eo.Headers=vi.Headers;Eo.Request=vi.Request;Eo.Response=vi.Response});var y3={};Uu(y3,{CabinClassMap:()=>h3,DuffelAncillaries:()=>ST,DuffelPayments:()=>MT,PassengerTypeMap:()=>_3,PlacesLookup:()=>g3});module.exports=x2(y3);var $d=Object.prototype.toString;function Vo(t){switch($d.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return qt(t,Error)}}function Yi(t,n){return $d.call(t)===`[object ${n}]`}function qo(t){return Yi(t,"ErrorEvent")}function cs(t){return Yi(t,"DOMError")}function Gu(t){return Yi(t,"DOMException")}function ht(t){return Yi(t,"String")}function Wi(t){return t===null||typeof t!="object"&&typeof t!="function"}function an(t){return Yi(t,"Object")}function Vi(t){return typeof Event<"u"&&qt(t,Event)}function Hu(t){return typeof Element<"u"&&qt(t,Element)}function $u(t){return Yi(t,"RegExp")}function fi(t){return!!(t&&t.then&&typeof t.then=="function")}function Yu(t){return an(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function zo(t){return typeof t=="number"&&t!==t}function qt(t,n){try{return t instanceof n}catch{return!1}}function us(t){return t&&t.Math==Math?t:void 0}var Le=typeof globalThis=="object"&&us(globalThis)||typeof window=="object"&&us(window)||typeof self=="object"&&us(self)||typeof global=="object"&&us(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 ls=sn(),A2=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||A2;for(;i&&u++<a&&(h=O2(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 O2(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 Wu(){try{return ls.document.location.href}catch{return""}}function Vu(t){return ls.document&&ls.document.querySelector?ls.document.querySelector(t):null}var I2="Sentry Logger ",qi=["debug","info","warn","error","log","assert","trace"];function fs(t){if(!("console"in Le))return t();let n=Le.console,i={};qi.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 Yd(){let t=!1,n={enable:()=>{t=!0},disable:()=>{t=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?qi.forEach(i=>{n[i]=(...a)=>{t&&fs(()=>{Le.console[i](`${I2}[${i}]:`,...a)})}}):qi.forEach(i=>{n[i]=()=>{}}),n}var x;typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?x=pi("logger",Yd):x=Yd();var w2=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function P2(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 Wd(t){let n=w2.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 Vd({host:u,pass:s,path:m,projectId:h,port:l,protocol:i,publicKey:a})}function Vd(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function N2(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+$/)?P2(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 ps(t){let n=typeof t=="string"?Wd(t):Vd(t);if(!(!n||!N2(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 ds(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 qd(t,n,i=!1){return ht(t)?$u(n)?n.test(t):ht(n)?i?t===n:t.includes(n):!1:!1}function Pr(t,n=[],i=!1){return n.some(a=>qd(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{ms(s,a)}catch{}t[n]=s}function zi(t,n,i){Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0})}function ms(t,n){let i=n.prototype||{};t.prototype=n.prototype=i,zi(t,"__sentry_original__",n)}function di(t){return t.__sentry_original__}function zu(t){return Object.keys(t).map(n=>`${encodeURIComponent(n)}=${encodeURIComponent(t[n])}`).join("&")}function gs(t){if(Vo(t))return{message:t.message,name:t.name,stack:t.stack,...Kd(t)};if(Vi(t)){let n={type:t.type,target:zd(t.target),currentTarget:zd(t.currentTarget),...Kd(t)};return typeof CustomEvent<"u"&&qt(t,CustomEvent)&&(n.detail=t.detail),n}else return t}function zd(t){try{return Hu(t)?xn(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function Kd(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 Ku(t,n=40){let i=Object.keys(gs(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 qu(t,new Map)}function qu(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]=qu(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(qu(s,n))}),a}return t}var Xd=50,Zd=/\(error: (.*)\)/;function hs(...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=Zd.test(p)?p.replace(Zd,"$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>=Xd)break}}return jd(s)}}function Xu(t){return Array.isArray(t)?hs(...t):t}function jd(t){if(!t.length)return[];let n=t.slice(0,Xd),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 Zu="<anonymous>";function zt(t){try{return!t||typeof t!="function"?Zu:t.name||Zu}catch{return Zu}}var ju=sn();function _s(){if(!("fetch"in ju))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Ko(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Ju(){if(!_s())return!1;if(Ko(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=Ko(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 ys=sn();function Jd(){let t=ys.chrome,n=t&&t.app&&t.app.runtime,i="history"in ys&&!!ys.history.pushState&&!!ys.history.replaceState;return!n&&i}var be=sn(),Jn="__sentry_xhr_v2__",Zo={},Qd={};function M2(t){if(!Qd[t])switch(Qd[t]=!0,t){case"console":D2();break;case"dom":H2();break;case"xhr":L2();break;case"fetch":B2();break;case"history":k2();break;case"error":$2();break;case"unhandledrejection":Y2();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("unknown instrumentation type:",t);return}}function Fe(t,n){Zo[t]=Zo[t]||[],Zo[t].push(n),M2(t)}function cn(t,n){if(!(!t||!Zo[t]))for(let i of Zo[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 D2(){"console"in be&&qi.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 B2(){Ju()&&ke(be,"fetch",function(t){return function(...n){let{method:i,url:a}=nm(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 Qu(t,n){return!!t&&typeof t=="object"&&!!t[n]}function em(t){return typeof t=="string"?t:t?Qu(t,"url")?t.url:t.toString?t.toString():"":""}function nm(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){let[i,a]=t;return{url:em(i),method:Qu(a,"method")?String(a.method).toUpperCase():"GET"}}let n=t[0];return{url:em(n),method:Qu(n,"method")?String(n.method).toUpperCase():"GET"}}function L2(){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 Ss;function k2(){if(!Jd())return;let t=be.onpopstate;be.onpopstate=function(...i){let a=be.location.href,s=Ss;if(Ss=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=Ss,l=String(s);Ss=l,cn("history",{from:u,to:l})}return i.apply(this,a)}}ke(be.history,"pushState",n),ke(be.history,"replaceState",n)}var F2=1e3,vs,Es;function U2(t,n){if(!t||t.type!==n.type)return!0;try{if(t.target!==n.target)return!0}catch{}return!1}function G2(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 tm(t,n=!1){return i=>{if(!i||Es===i||G2(i))return;let a=i.type==="keypress"?"input":i.type;vs===void 0?(t({event:i,name:a,global:n}),Es=i):U2(Es,i)&&(t({event:i,name:a,global:n}),Es=i),clearTimeout(vs),vs=be.setTimeout(()=>{vs=void 0},F2)}}function H2(){if(!("document"in be))return;let t=cn.bind(null,"dom"),n=tm(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=tm(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 Cs=null;function $2(){Cs=be.onerror,be.onerror=function(t,n,i,a,s){return cn("error",{column:a,error:s,line:i,msg:t,url:n}),Cs&&!Cs.__SENTRY_LOADER__?Cs.apply(this,arguments):!1},be.onerror.__SENTRY_INSTRUMENTED__=!0}var bs=null;function Y2(){bs=be.onunhandledrejection,be.onunhandledrejection=function(t){return cn("unhandledrejection",t),bs&&!bs.__SENTRY_LOADER__?bs.apply(this,arguments):!0},be.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function rm(){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 im(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=im(t);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||i||"<unknown>":i||"<unknown>"}function Ki(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=im(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 Ts(t){if(t&&t.__sentry_captured__)return!0;try{zi(t,"__sentry_captured__",!0)}catch{}return!1}function Xo(t){return Array.isArray(t)?t:[t]}function el(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function tl(){return"npm"}function om(){return!el()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function am(t,n){return t.require(n)}function ln(t,n=100,i=1/0){try{return Rs("",t,n,i)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function xs(t,n=3,i=100*1024){let a=ln(t,n);return z2(a)>i?xs(t,n-1,i):a}function Rs(t,n,i=1/0,a=1/0,s=rm()){let[u,l]=s;if(n==null||["number","boolean","string"].includes(typeof n)&&!zo(n))return n;let p=W2(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 Rs("",P,m-1,a,s)}catch{}let S=Array.isArray(n)?[]:{},v=0,I=gs(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]=Rs(P,L,m-1,a,s),v++}return l(n),S}function W2(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(Yu(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=V2(n);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(i){return`**non-serializable** (${i})`}}function V2(t){let n=Object.getPrototypeOf(t);return n?n.constructor.name:"null prototype"}function q2(t){return~-encodeURI(t).split(/%..|./).length}function z2(t){return q2(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 nl(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 sm=["fatal","error","warning","log","info","debug"];function rl(t){return t==="warn"?"warning":sm.includes(t)?t:"log"}var um=sn(),ol={nowSeconds:()=>Date.now()/1e3};function K2(){let{performance:t}=um;if(!t||!t.now)return;let n=Date.now()-t.now();return{now:()=>t.now(),timeOrigin:n}}function Z2(){try{return am(module,"perf_hooks").performance}catch{return}}var il=om()?Z2():K2(),cm=il===void 0?ol:{nowSeconds:()=>(il.timeOrigin+il.now())/1e3},tr=ol.nowSeconds.bind(ol),fn=cm.nowSeconds.bind(cm);var Jo,pn=(()=>{let{performance:t}=um;if(!t||!t.now){Jo="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?(Jo="timeOrigin",t.timeOrigin):(Jo="navigationStart",l):(Jo="dateNow",a)})();var lm=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Qo(t){let n=t.match(lm);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 sl(t,n){let[i,a]=t;return[i,[...a,n]]}function As(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 al(t,n){return(n||new TextEncoder).encode(t)}function cl(t,n){let[i,a]=t,s=JSON.stringify(i);function u(l){typeof s=="string"?s=typeof l=="string"?s+l:[al(s,n),l]:s.push(typeof l=="string"?al(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:X2(s)}function X2(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 ul(t,n){let i=typeof t.data=="string"?al(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 j2={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 Os(t){return j2[t]}function Is(t){if(!t||!t.sdk)return;let{name:n,version:i}=t.sdk;return{name:n,version:i}}function ll(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 fl(t,n,i){let a=[{type:"client_report"},{timestamp:i||tr(),discarded_events:t}];return On(n?{dsn:n}:{},[a])}function fm(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 pm(t,n){return t[n]||t.all||0}function pl(t,n,i=Date.now()){return pm(t,n)>i}function dl(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+fm(l,a):n===429&&(s.all=a+60*1e3);return s}var ea="baggage",ml="sentry-",mm=/^sentry-/,gm=8192;function gl(t){if(!ht(t)&&!Array.isArray(t))return;let n={};if(Array.isArray(t))n=t.reduce((a,s)=>{let u=dm(s);return{...a,...u}},{});else{if(!t)return;n=dm(t)}let i=Object.entries(n).reduce((a,[s,u])=>{if(s.match(mm)){let l=s.slice(ml.length);a[l]=u}return a},{});if(Object.keys(i).length>0)return i}function ws(t){let n=Object.entries(t).reduce((i,[a,s])=>(s&&(i[`${ml}${a}`]=s),i),{});return J2(n)}function dm(t){return t.split(",").map(n=>n.split("=").map(i=>decodeURIComponent(i.trim()))).reduce((n,[i,a])=>(n[i]=a,n),{})}function J2(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>gm?((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 Zi="production";function hm(t){let n=fn(),i={sid:At(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Q2(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 _m(t,n){let i={};n?i={status:n}:t.status==="ok"&&(i={status:"exited"}),nr(t,i)}function Q2(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 eC=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:eC;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([...ym(),...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?Xo(n.fingerprint):[],this._fingerprint&&(n.fingerprint=n.fingerprint.concat(this._fingerprint)),n.fingerprint&&!n.fingerprint.length&&delete n.fingerprint}};function ym(){return pi("globalEventProcessors",()=>[])}function Mr(t){ym().push(t)}var Sm=4,tC=100,Xi=class{constructor(n,i=new Ot,a=Sm){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=tC}=s.getOptions&&s.getOptions()||{};if(l<=0)return;let m={timestamp:tr(),...n},h=u?fs(()=>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=Ps(this);try{n(this)}finally{Ps(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&&_m(a),this._sendSessionUpdate(),i.setSession()}startSession(n){let{scope:i,client:a}=this.getStackTop(),{release:s,environment:u=Zi}=a&&a.getOptions()||{},{userAgent:l}=Le.navigator||{},p=hm({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 Ps(t){let n=mi(),i=ta(n);return hl(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 nC(t)}function nC(t=mi()){return(!rC(t)||ta(t).isOlderThan(Sm))&&hl(t,new Xi),ta(t)}function rC(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function ta(t){return pi("hub",()=>new Xi,t)}function hl(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 vm=!1;function Em(){vm||(vm=!0,Fe("error",_l),Fe("unhandledrejection",_l))}function _l(){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)}}_l.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=Cm(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 Cm(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||Zi,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 Qi={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},iC="finishReason",Ji=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],yl=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=Ji[4]}constructor(n,i,a=Qi.idleTimeout,s=Qi.finalTimeout,u=Qi.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=Ji[3],this.finish())},this._finalTimeout)}finish(n=fn()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(iC,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 yl(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=Ji[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=Ji[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=Ji[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=Ji[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 oC(){let n=this.getScope().getSpan();return n?{"sentry-trace":n.toTraceparent()}:{}}function bm(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})),aC(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 aC(t){return zo(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 sC(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=bm(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 Ns(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=bm(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 Ms(){let t=mi();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=sC),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=oC),Em())}function eo(t,n){return K().captureException(t,{captureContext:n})}function na(t){K().addBreadcrumb(t)}function Ds(t,n){K().setContext(t,n)}function Bs(t){K().withScope(t)}var cC="7";function uC(t){let n=t.protocol?`${t.protocol}:`:"",i=t.port?`:${t.port}`:"";return`${n}//${t.host}${i}${t.path?`/${t.path}`:""}/api/`}function lC(t){return`${uC(t)}${t.projectId}/envelope/`}function fC(t,n){return zu({sentry_key:t.publicKey,sentry_version:cC,...n&&{sentry_client:`${n.name}/${n.version}`}})}function Tm(t,n={}){let i=typeof n=="string"?n:n.tunnel,a=typeof n=="string"||!n._metadata?void 0:n._metadata.sdk;return i||`${lC(t)}?${fC(t,a)}`}function pC(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 Rm(t,n,i,a){let s=Is(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 xm(t,n,i,a){let s=Is(i),u=t.type&&t.type!=="replay_event"?t.type:"event";pC(t,i&&i.sdk);let l=ll(t,s,a,n);return delete t.sdkProcessingMetadata,On(l,[[{type:u},t]])}var Am=[];function dC(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 Sl(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=Xo(i(n)):a=n;let s=dC(a),u=mC(s,l=>l.name==="Debug");if(u!==-1){let[l]=s.splice(u,1);s.push(l)}return s}function Om(t){let n={};return t.forEach(i=>{i&&vl(i,n)}),n}function vl(t,n){n[t.name]=t,Am.indexOf(t.name)===-1&&(t.setupOnce(Mr,K),Am.push(t.name),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`Integration installed: ${t.name}`))}function mC(t,n){for(let i=0;i<t.length;i++)if(n(t[i])===!0)return i;return-1}function wm(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);gC(l,t),_C(l,p),n.type===void 0&&hC(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?yC(S,s,u):S)}function gC(t,n){let{environment:i,release:a,dist:s,maxValueLength:u=250}=n;"environment"in t||(t.environment="environment"in n?i:Zi),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 Im=new WeakMap;function hC(t,n){let i=Le._sentryDebugIds;if(!i)return;let a,s=Im.get(n);s?a=s:(a=new Map,Im.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 _C(t,n){n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}function yC(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 Pm="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=ps(n.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn("No DSN provided, client will not do anything."),this._dsn){let i=Tm(this._dsn,n);this._transport=n.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...n.transportOptions,url:i})}}captureException(n,i,a){if(Ts(n)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(Pm);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=Wi(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&&Ts(i.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(Pm);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=Om(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){vl(n,this._integrations)}sendEvent(n,i={}){if(this._dsn){let a=xm(n,this._dsn,this._options._metadata,this._options.tunnel);for(let u of i.attachments||[])a=sl(a,ul(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=Rm(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),wm(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=Mm(n),p=Nm(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=vC(s,v,i);return SC(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: ${Ls(t)}`),!0)}function xC(t,n){return t.type||!n||!n.length?!1:wC(t).some(i=>Pr(i,n))}function AC(t,n){if(t.type!=="transaction"||!n||!n.length)return!1;let i=t.transaction;return i?Pr(i,n):!1}function OC(t,n){if(!n||!n.length)return!1;let i=Ls(t);return i?Pr(i,n):!1}function IC(t,n){if(!n||!n.length)return!0;let i=Ls(t);return i?Pr(i,n):!0}function wC(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 PC(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function NC(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 Ls(t){try{let n;try{n=t.exception.values[0].stacktrace.frames}catch{}return n?NC(n):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.error(`Cannot extract url for event ${un(t)}`),null}}var ee=Le,Cl=0;function bl(){return Cl>0}function $C(){Cl++,setTimeout(()=>{Cl--})}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 $C(),Bs(l=>{l.addEventProcessor(p=>(n.mechanism&&(Ki(p,void 0,void 0),Qn(p,n.mechanism)),p.extra={...p.extra,arguments:s},p)),eo(u)}),u}};try{for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&(a[s]=t[s])}catch{}ms(a,t),zi(t,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get(){return t.name}})}catch{}return a}function xl(t,n){let i=Al(t,n),a={type:n&&n.name,value:qC(n)};return i.length&&(a.stacktrace={frames:i}),a.type===void 0&&a.value===""&&(a.value="Unrecoverable error caught"),a}function YC(t,n,i,a){let u=K().getClient(),l=u&&u.getOptions().normalizeDepth,p={exception:{values:[{type:Vi(n)?n.constructor.name:a?"UnhandledRejection":"Error",value:`Non-Error ${a?"promise rejection":"exception"} captured with keys: ${Ku(n)}`}]},extra:{__serialized__:xs(n,l)}};if(i){let m=Al(t,i);m.length&&(p.exception.values[0].stacktrace={frames:m})}return p}function Tl(t,n){return{exception:{values:[xl(t,n)]}}}function Al(t,n){let i=n.stacktrace||n.stack||"",a=VC(n);try{return t(i,a)}catch{}return[]}var WC=/Minified React error #\d+;/i;function VC(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(WC.test(t.message))return 1}return 0}function qC(t){let n=t&&t.message;return n?n.error&&typeof n.error.message=="string"?n.error.message:n:"No error message"}function Lm(t,n,i,a){let s=i&&i.syntheticException||void 0,u=ks(t,n,s,a);return Qn(u),u.level="error",i&&i.event_id&&(u.event_id=i.event_id),_t(u)}function km(t,n,i="info",a,s){let u=a&&a.syntheticException||void 0,l=Rl(t,n,u,s);return l.level=i,a&&a.event_id&&(l.event_id=a.event_id),_t(l)}function ks(t,n,i,a,s){let u;if(qo(n)&&n.error)return Tl(t,n.error);if(cs(n)||Gu(n)){let l=n;if("stack"in n)u=Tl(t,n);else{let p=l.name||(cs(l)?"DOMError":"DOMException"),m=l.message?`${p}: ${l.message}`:p;u=Rl(t,m,i,a),Ki(u,m)}return"code"in l&&(u.tags={...u.tags,"DOMException.code":`${l.code}`}),u}return Vo(n)?Tl(t,n):an(n)||Vi(n)?(u=YC(t,n,i,s),Qn(u,{synthetic:!0}),u):(u=Rl(t,n,i,a),Ki(u,`${n}`,void 0),Qn(u,{synthetic:!0}),u)}function Rl(t,n,i,a){let s={message:n};if(a&&i){let u=Al(t,i);u.length&&(s.exception={values:[{value:n,stacktrace:{frames:u}}]})}return s}var Fs=1024,Ol="Breadcrumbs",Pn=class{static __initStatic(){this.id=Ol}__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",KC),this.options.dom&&Fe("dom",zC(this.options.dom)),this.options.xhr&&Fe("xhr",ZC),this.options.fetch&&Fe("fetch",XC),this.options.history&&Fe("history",jC)}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>Fs&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.warn(`\`dom.maxStringLength\` cannot exceed ${Fs}, but a value of ${u} was configured. Sentry will use ${Fs} instead.`),u=Fs),typeof s=="string"&&(s=[s]);try{let l=i.event;a=JC(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 KC(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:rl(t.level),message:ds(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)n.message=`Assertion failed: ${ds(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 ZC(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 XC(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 jC(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 JC(t){return t&&!!t.target}function Fm(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=QC(t);return On(s,[u])}function QC(t){return[{type:"user_report"},t]}var Us=class extends mn{constructor(n){let i=ee.SENTRY_SDK_SOURCE||tl();n._metadata=n._metadata||{},n._metadata.sdk=n._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${i}:@sentry/browser`,version:ra}],version:ra},super(n),n.sendClientReports&&ee.document&&ee.document.addEventListener("visibilitychange",()=>{ee.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(n,i){return Lm(this._options.stackParser,n,i,this._options.attachStacktrace)}eventFromMessage(n,i="info",a){return km(this._options.stackParser,n,i,a,this._options.attachStacktrace)}sendEvent(n,i){let a=this.getIntegrationById(Ol);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=Fm(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=fl(n,this._options.tunnel&&An(this._dsn));this._sendEnvelope(i)}};var ia;function Um(){if(ia)return ia;if(Ko(ee.fetch))return ia=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 ia=n.bind(ee)}function Gm(){ia=void 0}function Hm(t,n=Um()){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 Gm(),i-=l,a--,Nr(m)}}return to(t,s)}var eb=4;function $m(t){function n(i){return new we((a,s)=>{let u=new XMLHttpRequest;u.onerror=s,u.onreadystatechange=()=>{u.readyState===eb&&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 to(t,n)}var Gs="?";var tb=30,nb=40,rb=50;function Il(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 ib=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ob=/\((\S*)(?::(\d+))(?::(\d+))\)/,ab=t=>{let n=ib.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){let u=ob.exec(n[2]);u&&(n[2]=u[1],n[3]=u[2],n[4]=u[3])}let[a,s]=Wm(n[1]||Gs,n[2]);return Il(s,a,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},sb=[tb,ab],cb=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ub=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,lb=t=>{let n=cb.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){let u=ub.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]||Gs;return[s,a]=Wm(s,a),Il(a,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},fb=[rb,lb],pb=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,db=t=>{let n=pb.exec(t);return n?Il(n[2],n[1]||Gs,+n[3],n[4]?+n[4]:void 0):void 0},mb=[nb,db];var gb=[sb,fb,mb],Ym=hs(...gb),Wm=(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]:Gs,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:hb,onunhandledrejection:_b}}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]&&(vb(i),a(),this._installFunc[i]=void 0)}}};It.__initStatic();function hb(){Fe("error",t=>{let[n,i,a]=zm();if(!n.getIntegration(It))return;let{msg:s,url:u,line:l,column:p,error:m}=t;if(bl()||m&&m.__sentry_own_request__)return;let h=m===void 0&&ht(s)?Sb(s,u,l,p):Vm(ks(i,m||s,void 0,a,!1),u,l,p);h.level="error",qm(n,m,h,"onerror")})}function _b(){Fe("unhandledrejection",t=>{let[n,i,a]=zm();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(bl()||s&&s.__sentry_own_request__)return!0;let u=Wi(s)?yb(s):ks(i,s,void 0,a,!0);u.level="error",qm(n,s,u,"onunhandledrejection")})}function yb(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Sb(t,n,i,a){let s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,u=qo(t)?t.message:t,l="Error",p=u.match(s);return p&&(l=p[1],u=p[2]),Vm({exception:{values:[{type:l,value:u}]}},n,i,a)}function Vm(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:Wu();return m.length===0&&m.push({colno:h,filename:v,function:"?",in_app:!0,lineno:S}),t}function vb(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log(`Global Handler attached: ${t}`)}function qm(t,n,i,a){Qn(i,{handled:!1,type:a}),t.captureEvent(i,{originalException:n})}function zm(){let t=K(),n=t.getClient(),i=n&&n.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,i.stackParser,i.attachStacktrace]}var Eb=["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",Km),this._options.setInterval&&ke(ee,"setInterval",Km),this._options.requestAnimationFrame&&ke(ee,"requestAnimationFrame",Cb),this._options.XMLHttpRequest&&"XMLHttpRequest"in ee&&ke(XMLHttpRequest.prototype,"send",bb);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:Eb).forEach(Tb)}};Nn.__initStatic();function Km(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 Cb(t){return function(n){return t.apply(this,[Br(n,{mechanism:{data:{function:"requestAnimationFrame",handler:zt(t)},handled:!0,type:"instrument"}})])}}function bb(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 Tb(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 Rb="cause",xb=5,gn=class{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=gn.id}constructor(n={}){gn.prototype.__init.call(this),this._key=n.key||Rb,this._limit=n.limit||xb}setupOnce(){let n=K().getClient();n&&Mr((i,a)=>{let s=K().getIntegration(gn);return s?Ab(n.getOptions().stackParser,s._key,s._limit,i,a):i})}};gn.__initStatic();function Ab(t,n,i,a,s){if(!a.exception||!a.exception.values||!s||!qt(s.originalException,Error))return a;let u=Zm(t,i,s.originalException,n);return a.exception.values=[...u,...a.exception.values],a}function Zm(t,n,i,a,s=[]){if(!qt(i[a],Error)||s.length+1>=n)return s;let u=xl(t,i[a]);return Zm(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(Ob(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 Ob(t,n){return n?!!(Ib(t,n)||wb(t,n)):!1}function Ib(t,n){let i=t.message,a=n.message;return!(!i&&!a||i&&!a||!i&&a||i!==a||!Qm(t,n)||!Jm(t,n))}function wb(t,n){let i=Xm(n),a=Xm(t);return!(!i||!a||i.type!==a.type||i.value!==a.value||!Qm(t,n)||!Jm(t,n))}function Jm(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 Qm(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 Xm(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 tg=[new gi.InboundFilters,new gi.FunctionToString,new Nn,new Pn,new It,new gn,new _n,new hn];function wl(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=tg),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:Xu(t.stackParser||Ym),integrations:Sl(t),transport:t.transport||(_s()?Hm:$m)};El(Us,n),t.autoSessionTracking&&Pb()}function eg(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function Pb(){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&&(eg(t),Fe("history",({from:n,to:i})=>{n===void 0||n===i||eg(K())}))}var Pl={};Uu(Pl,{Breadcrumbs:()=>Pn,Dedupe:()=>_n,GlobalHandlers:()=>It,HttpContext:()=>hn,LinkedErrors:()=>gn,TryCatch:()=>Nn});var ie=Le;function ng(){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 no=(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 rg=()=>`v3-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Nb=()=>{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},Hs=()=>ie.__WEB_VITALS_POLYFILL__?ie.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Nb()):ie.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];var $s=()=>{let t=Hs();return t&&t.activationStart||0};var ro=(t,n)=>{let i=Hs(),a="navigate";return i&&(ie.document.prerendering||$s()>0?a="prerender":a=i.type.replace(/_/g,"-")),{name:t,value:typeof n>"u"?-1:n,rating:"good",delta:0,entries:[],id:rg(),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 ig=t=>{let n=ro("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=no(t,n);let p=()=>{u(l.takeRecords()),i(!0)};return Lr(p),p}};var Ys=-1,Mb=()=>ie.document.visibilityState==="hidden"&&!ie.document.prerendering?0:1/0,Db=()=>{Lr(({timeStamp:t})=>{Ys=t},!0)},io=()=>(Ys<0&&(Ys=Mb(),Db()),{get firstHiddenTime(){return Ys}});var og=t=>{let n=io(),i=ro("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=no(t,i),l&&Lr(()=>{u(l.takeRecords()),l.disconnect()},!0)};var ag={},sg=t=>{let n=io(),i=ro("LCP"),a,s=l=>{let p=l[l.length-1];if(p){let m=Math.max(p.startTime-$s(),0);m<n.firstHiddenTime&&(i.value=m,i.entries=[p],a())}},u=ir("largest-contentful-paint",s);if(u){a=no(t,i);let l=()=>{ag[i.id]||(s(u.takeRecords()),u.disconnect(),ag[i.id]=!0,a(!0))};return["keydown","click"].forEach(p=>{addEventListener(p,l,{once:!0,capture:!0})}),Lr(l,!0),l}};function Ws(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 ug(){return ie&&ie.addEventListener&&ie.performance}var cg=0,Pe={},Mn,oa;function lg(){let t=ug();if(t&&pn){t.mark&&ie.performance.mark("sentry-tracing-init"),kb();let n=Bb(),i=Lb();return()=>{n&&n(),i&&i()}}return()=>{}}function fg(){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 pg(){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 Bb(){return ig(t=>{let n=t.entries.pop();n&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding CLS"),Pe.cls={value:t.value,unit:""},oa=n)})}function Lb(){return sg(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 kb(){og(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 dg(t){let n=ug();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(cg).forEach(l=>{let p=$e(l.startTime),m=$e(l.duration);if(!(t.op==="navigation"&&i+p<t.startTimestamp))switch(l.entryType){case"navigation":{Ub(t,l,i),s=i+$e(l.responseStart),u=i+$e(l.requestStart);break}case"mark":case"paint":case"measure":{Fb(t,l,p,m,i);let h=io(),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,"");Hb(t,l,h,p,m,i);break}}}),cg=Math.max(a.length-1,0),$b(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)}),Yb(t)}Mn=void 0,oa=void 0,Pe={}}function Fb(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 Ub(t,n,i){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(a=>{Vs(t,n,a,i)}),Vs(t,n,"secureConnection",i,"TLS/SSL","connectEnd"),Vs(t,n,"fetch",i,"cache","domainLookupStart"),Vs(t,n,"domainLookup",i,"DNS"),Gb(t,n,i)}function Vs(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 Gb(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 Hb(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 $b(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),Ws(i.rtt)&&(Pe["connection.rtt"]={value:i.rtt,unit:"millisecond"})),Ws(n.deviceMemory)&&t.setTag("deviceMemory",`${n.deviceMemory} GB`),Ws(n.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(n.hardwareConcurrency))}function Yb(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)),oa&&oa.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&x.log("[Measurements] Adding CLS Data"),oa.sources.forEach((n,i)=>t.setTag(`cls.source.${i+1}`,xn(n.node))))}var Nl=["localhost",/^\/(?!\/)/],aa={traceFetch:!0,traceXHR:!0,tracingOrigins:Nl,tracePropagationTargets:Nl};function Ml(t){let{traceFetch:n,traceXHR:i,tracePropagationTargets:a,tracingOrigins:s,shouldCreateSpanForRequest:u}={traceFetch:aa.traceFetch,traceXHR:aa.traceXHR,...t},l=typeof u=="function"?u:h=>!0,p=h=>Wb(h,a||s),m={};n&&Fe("fetch",h=>{Vb(h,l,p,m)}),i&&Fe("xhr",h=>{zb(h,l,p,m)})}function Wb(t,n){return Pr(t,n||Nl)}function Vb(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=qb(S,l.getDynamicSamplingContext(),h,v))}}function qb(t,n,i,a){let s=ws(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(ea,s),p}else if(Array.isArray(l)){let p=[...l,["sentry-trace",u]];return s&&p.push([ea,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=ws(S);v&&s.setRequestHeader(ea,v)}catch{}}}function mg(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 hg="BrowserTracing",Kb={...Qi,markBackgroundTransactions:!0,routingInstrumentation:mg,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...aa},kr=class{__init(){this.name=hg}constructor(n){kr.prototype.__init.call(this),Ms(),this.options={...Kb,...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=lg(),this.options.enableLongTask&&fg(),this.options._experiments.enableInteractions&&pg()}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&&ng(),v.enableInteractions&&this._registerInteractionListener(),Ml({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?gg("sentry-trace"):null,m=l?gg("baggage"):null,h=p?Qo(p):void 0,S=m?gl(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=Ns(L,P,a,s,!0,{location:Y},u);return ce.registerBeforeFinishCallback(X=>{this._collectWebVitals(),dg(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=Ns(m,S,a,s,!0,{location:h},u)};["click"].forEach(a=>{addEventListener(a,i,{once:!1,capture:!0})})}};function gg(t){let n=Vu(`meta[name=${t}]`);return n?n.getAttribute("content"):null}var _g={};ee.Sentry&&ee.Sentry.Integrations&&(_g=ee.Sentry.Integrations);var G4={..._g,...gi,...Pl};var Zb=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Zb.SENTRY_RELEASE={id:"3.1.2"};var yg=!1;function Xb(){wl({dsn:"https://903950caba7d4802afe6c1e985ad5ebd@o128085.ingest.sentry.io/4504854496149504",release:"3.1.2",integrations:[new kr],tracesSampleRate:1}),yg=!0}var Xt=t=>(yg||Xb(),eo(t));var Rg=ve(require("react"));var Bl="[Duffel Ancillaries] ",vg="duffel-ancillaries-logger-state",Sg=!1,jb=t=>{localStorage.setItem(vg,t.toString())},Eg=()=>localStorage.getItem(vg)==="true",qs=t=>{jb(t),t&&!Sg&&console.info(Bl,`
|
|
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`),Sg=!0},Cg=t=>{Eg()?console.info(Bl,t):na({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})),Eg()?(console.groupCollapsed(Bl,t),i.forEach(a=>{console.info(a)}),console.groupEnd()):na({category:"log.group",message:t,data:n})}var Z=require("react/jsx-runtime"),bg={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"})},Jb=t=>t in bg?bg[t]:(Cg(`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:Jb(t)});var Tg=ve(yn());var Ks=require("react/jsx-runtime"),Qb={primary:"button--primary",outlined:"button--outlined",destructive:"button--destructive"},eT={32:"button--32",40:"button--40",48:"button--48"},ut=({iconBefore:t,variant:n="primary",size:i=40,children:a,className:s,type:u="button",...l})=>(0,Ks.jsxs)("button",{type:u,className:(0,Tg.default)("button",Qb[n],eT[i],s),...l,children:[t&&(0,Ks.jsx)(pe,{className:"duffel-button__icon duffel-button__icon--before",name:t}),a]});var Ll=require("react/jsx-runtime"),oo=({style:t,children:n})=>(0,Ll.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",border:"dashed 1px var(--GREY-300)",borderRadius:"4px",paddingBlock:"32px",...t},children:(0,Ll.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"470px"},children:n})});var _i=require("react/jsx-runtime"),ao=class extends Rg.default.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){Xt(n)}render(){return this.state.hasError?(0,_i.jsxs)(oo,{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)(ut,{variant:"outlined",iconBefore:"autorenew",onClick:()=>location.reload(),children:"Try again"})})]}):this.props.children}};var yi=require("react/jsx-runtime"),xg=({height:t,message:n})=>(0,yi.jsxs)(oo,{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)(ut,{variant:"outlined",onClick:()=>location.reload(),iconBefore:"autorenew",children:"Try again"})})]});var so=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=so(t.available_services);return sa(a,n,i)},sa=(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*tT(u,i):Xt(new Error(`The service id (${u}) provided could not be found in neither the offer nor the seat maps.`)),l},0),tT=(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 Ag=({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:nT(l),...a&&{payments:[{type:"balance",amount:`${p}`,currency:a.total_currency}]},type:"instant",metadata:{source:"duffel-ancillaries@3.1.2"}}},nT=t=>Array.isArray(t)?t.filter(({quantity:n})=>n>0).map(({id:n,quantity:i})=>({id:n,quantity:i})):[];var kl=t=>(n,i)=>{let{rate:a,amount:s}=t;return{amount:n*(1+a)+s,currency:i}},Fl="You cannot supply both markup and priceFormatters for the same service.",Og=(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(Fl);i.bags=kl(t.bags)}if(t.seats){if(n&&n.seats)throw new Error(Fl);i.seats=kl(t.seats)}if(t.cancel_for_any_reason){if(n&&n.cancel_for_any_reason)throw new Error(Fl);i.cancel_for_any_reason=kl(t.cancel_for_any_reason)}}return i};var Zs=t=>t.type==="baggage";var co=t=>t.type==="cancel_for_any_reason";var rT=(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.`,Ig=(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(Zs(l)){let{amount:S,currency:v}=s[l.type](+l.total_amount,l.total_currency,l);m=S.toString(),v&&(h=v)}if(co(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(rT(l.type,a));p.total_amount=m,p.total_currency=h}return p});return{...t,available_services:u}};function Xs(t){return t.type==="seat"}var iT=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.`,oT=(t,n,i)=>{let a={...t};if(Xs(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(iT(i));return l});a.available_services=s}return a},wg=(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=>oT(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 Pg=t=>"selected_offers"in t&&"passengers"in t&&"services"in t&&"payments"in t&&"type"in t&&"metadata"in t;var Ng=t=>t.expires_at&&new Date(t.expires_at)<new Date;var ca=t=>"data"in t&&Array.isArray(t.data.errors),aT="https://api.duffel.com",sT="3.1.2";async function Js(t,n,i="GET",a){or("Making request to the Duffel API",{path:n,method:i});let s=`${aT}/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@${sT}`}})}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 Mg="https://assets.duffel.com/components/3.1.2",Dg=async t=>await(await fetch(Mg+`/fixtures/offers/${t}.json`)).json(),Bg=async t=>await(await fetch(Mg+`/fixtures/seat-maps/${t}.json`)).json();var Qs=t=>t.startsWith("fixture_off_");async function Lg(t,n){return(await Js(n,`offers/${t}?return_available_services=true`)).data}async function kg(t,n,i,a,s){a(!0);let u=Qs(t);if(t=u?t.replace("fixture_",""):t,u)return Dg(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 Lg(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.")):ca(l)&&l.status===404&&(p="The offer you are looking for does not exist or has expired."),ca(l)&&l.status>=500&&l.status<600&&Xt(new Error(p)),i(p)}finally{a(!1)}}async function Fg(t,n){return(await Js(n,`offers/${t}/seat_maps`)).data}async function Ug(t,n,i,a,s){a(!0);let u=Qs(t);if(t=u?t.replace("fixture_",""):t,u)return Bg(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 Fg(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.")):ca(l)&&(p=l.data.errors[0]?.message||"Received an unknown error from the Duffel API."),Xt(new Error(p)),i()}finally{a(!1)}}var Ul=t=>cT(t)&&(Gl(t)||Hl(t)||$l(t)||Yl(t)),cT=t=>"onPayloadReady"in t&&"passengers"in t&&"services"in t,Gl=t=>"offer_id"in t&&t.offer_id.startsWith("fixture_"),Hl=t=>"offer_id"in t&&"client_key"in t,$l=t=>"offer"in t&&"seat_maps"in t,Yl=t=>"offer"in t&&"client_key"in t;var wt=ve(require("react"));var Gg=require("react/jsx-runtime"),uo=()=>(0,Gg.jsx)("span",{className:"textual-loading-indicator","aria-hidden":"true"});var Hg=require("react/jsx-runtime"),ar=({backgroundColor:t,color:n,children:i})=>(0,Hg.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 lo=(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 uT={baggage:Zs,cancel_for_any_reason:co},fo=(t,n)=>{let i=uT[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 oh=ve(require("react"));var $g=ve(yn()),Yg=ve(require("react"));var jt=require("react/jsx-runtime"),po=({buttonTitle:t,title:n,icon:i,copy:a,onClick:s,children:u,isLoading:l,disabled:p,isSelected:m})=>{let h=Yg.Children.toArray(u).length>0;return(0,jt.jsxs)("button",{title:t,...s&&{onClick:s},disabled:p,className:(0,$g.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 Wl=t=>{t?document.body.style.overflow="":document.body.style.overflow="hidden"};var Vg=ve(yn()),qg=ve(require("react"));var Wg=ve(yn());var Vl=require("react/jsx-runtime"),lT={primary:"icon-button--primary",outlined:"icon-button--outlined"},ua=({icon:t,variant:n="primary",className:i,...a})=>(0,Vl.jsx)("button",{type:"button",className:(0,Wg.default)("icon-button",lT[n],i),...a,children:(0,Vl.jsx)(pe,{name:t})});var mo=require("react/jsx-runtime"),go=({children:t,onClose:n,isOpen:i})=>(qg.useEffect(()=>(Wl(!i),()=>Wl(!0)),[i]),(0,mo.jsx)("div",{className:(0,Vg.default)("modal",i&&"modal--open"),style:{opacity:0},children:(0,mo.jsxs)("div",{role:"presentation",className:"modal--content",children:[t,(0,mo.jsx)(ua,{icon:"close",onClick:n,title:"Close modal",className:"modal--close-button"})]})})),ho=({children:t})=>(0,mo.jsx)("div",{className:"modal-body",children:t});var ec=t=>t.reduce((n,i)=>({[i.id]:i,...n}),{});var tc=t=>t.slices.reduce((n,i)=>[...n,...i.segments],new Array);var ic=ve(require("react"));var nc=(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 zg=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 Kg=(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 _o=require("react/jsx-runtime"),Zg=({id:t,min:n,max:i,value:a,onChange:s})=>(0,_o.jsxs)("div",{className:"counter",id:t,children:[(0,_o.jsx)(ua,{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,_o.jsx)("div",{className:"counter__count-label",children:a}),(0,_o.jsx)(ua,{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"),Xg=({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=zg(i.metadata),h=Kg(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)(Zg,{id:`counter--${i.id}--${n}`,min:0,value:a,onChange:s,max:h?0:i.maximum_quantity})]})};var Jg=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,Jg.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"),Qg=({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)(Xg,{passengerId:n,segmentId:t,availableService:m,selectedServices:u,quantity:u.find(({id:h})=>h==m.id)?.quantity||0,onQuantityChanged:h=>fT(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"})]})},fT=(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 ql=require("react/jsx-runtime"),eh=({offer:t,segment:n,passengersById:i,selectedServices:a,setSelectedServices:s})=>(0,ql.jsx)(ho,{children:n.passengers.map(({passenger_id:u,baggages:l},p)=>(0,ql.jsx)(Qg,{segmentId:n.id,passengerId:u,passengerName:nc(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"),th=({selectedServices:t,servicePrices:n,currency:i,isFirstSegment:a,isLastSegment:s,onNextSegmentButtonClicked:u,onPreviousSegmentButtonClicked:l,onClose:p})=>{let m=Dn(t),h=sa(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)(ut,{size:48,variant:"outlined",disabled:a,onClick:()=>l(),children:"Back"}),(0,cr.jsx)(ut,{size:48,"data-testid":"confirm-selection-for-baggage",onClick:()=>s?p():u(),children:s?"Confirm":"Next"})]})]})};var rc=t=>{let n=new Date(t);if(isNaN(n.valueOf()))Xt(new Error(`formatDateString attempted to parse an invalid date string: ${t}`));else return pT(n)},pT=t=>{let{format:n}=new Intl.DateTimeFormat(void 0,{dateStyle:"medium"});return n(t)};var Bn=require("react/jsx-runtime"),nh=({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)(dT,{},`segment_${u}`):(0,Bn.jsx)(rh,{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:rc(i.departing_at)})]})]}),rh=({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}}),dT=()=>(0,Bn.jsx)(rh,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var yo=require("react/jsx-runtime"),ih=({isOpen:t,offer:n,passengers:i,onClose:a,selectedServices:s})=>{let[u,l]=(0,ic.useState)(0),[p,m]=ic.default.useState(s);if(!n)return null;let h=tc(n),S=h[u],v=ec(i),I=so(n.available_services),P=n.base_currency;return fo(n,"baggage")&&(P=lo(n,"baggage")),(0,yo.jsxs)(go,{isOpen:t,onClose:()=>a(s),children:[(0,yo.jsx)(nh,{segmentCount:h.length,currentSegment:S,currentSegmentIndex:u,setCurrentSegmentIndex:L=>l(L)}),(0,yo.jsx)(eh,{offer:n,selectedServices:p,passengersById:v,segment:S,setSelectedServices:m}),(0,yo.jsx)(th,{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"),ah=({isLoading:t,offer:n,passengers:i,selectedServices:a,setSelectedServices:s})=>{let[u,l]=oh.default.useState(!1),p=fo(n,"baggage"),m=Dn(a),h=m>0,S=Fr(n,a),v=n?.base_currency||"";p&&(v=lo(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)(po,{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)(uo,{})]}),!t&&!p&&(0,Ln.jsx)(ar,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,Ln.jsx)(ih,{isOpen:!!(u&&n),offer:n,passengers:i,onClose:L=>{let Y=JSON.parse(JSON.stringify(L));s(Y),l(!1)},selectedServices:a})]})};var fh=ve(require("react"));var la=require("react/jsx-runtime"),oc=({children:t})=>(0,la.jsxs)("li",{className:"cfar-modal-list-item",children:[(0,la.jsx)(pe,{name:"check"}),(0,la.jsx)("p",{children:t})]});var ur=require("react/jsx-runtime"),sh=({offerCurrency:t,service:n})=>(0,ur.jsxs)(ho,{children:[(0,ur.jsxs)("ul",{style:{padding:0},children:[(0,ur.jsx)(oc,{children:"Cancel your trip for any reason"}),(0,ur.jsxs)(oc,{children:["Guaranteed refund of"," ",Ue(t)(+n.metadata.refund_amount)]}),(0,ur.jsx)(oc,{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"),ch=({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)(ut,{size:48,variant:u?"destructive":"outlined",onClick:u?a:s,children:u?"Remove protection":"Don\u2019t protect trip"}),!u&&(0,Gr.jsxs)(ut,{size:48,"data-testid":"confirm-selection-for-cfar",onClick:i,children:["Add protection for ",l]}),u&&(0,Gr.jsx)(mT,{})]})},mT=()=>(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 zl=require("react/jsx-runtime"),uh=()=>(0,zl.jsx)("div",{style:{padding:"24px 24px 16px"},children:(0,zl.jsx)("h2",{className:"h3--semibold",style:{marginBlock:0},children:"Cancel for any reason"})});var lr=require("react/jsx-runtime"),lh=({isOpen:t,offerCurrency:n,service:i,onClose:a,selectedServices:s})=>(0,lr.jsxs)(go,{isOpen:t,onClose:()=>a(s),children:[(0,lr.jsx)(uh,{}),i&&n&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(sh,{service:i,offerCurrency:n}),(0,lr.jsx)(ch,{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"),ph=({isLoading:t,offer:n,selectedServices:i,setSelectedServices:a})=>{let[s,u]=fh.default.useState(!1),l=fo(n,"cancel_for_any_reason"),m=Dn(i)>0,h=n?.base_currency||"";l&&(h=lo(n,"cancel_for_any_reason"));let S=Fr(n,i),v=n?Ue(h)(S):"0",I=n?.available_services.find(co),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)(po,{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)(uo,{})]}),!t&&!l&&(0,kn.jsx)(ar,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,kn.jsx)(lh,{isOpen:!!(s&&n&&I),offerCurrency:n?.base_currency,service:I,onClose:L=>{u(!1),a(L)},selectedServices:i})]})};var dh=(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 ac=t=>dh(t,i=>i.type==="seat"&&i.available_services.length>0)?.available_services[0]?.total_currency;var qh=ve(require("react"));var mh=t=>t.flatMap(n=>n.passengers.map((i,a)=>({passenger:i,passengerIndex:a,segment:n})));var ef=ve(require("react"));var gh=(t,n)=>n.cabins.filter(i=>i.deck===t);var hh=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 _h=(t,n)=>!!(t.wings&&t.wings.first_row_index<=n&&t.wings.last_row_index>=n);var Fh=ve(yn()),Uh=ve(require("react"));var yh=ve(yn());var Kl=require("react/jsx-runtime"),Sh=({value:t,onChange:n,options:i})=>(0,Kl.jsx)("div",{className:"seat-map__tab-select",children:i.map(a=>(0,Kl.jsx)("button",{type:"button",className:(0,yh.default)("seat-map__tab-select-option",{"seat-map__tab-select-option--selected":a===t}),onClick:()=>t!==a&&n(a),children:a},a))});var Eh=require("react/jsx-runtime"),vh=({value:t,setValue:n})=>{let i=["Lower deck","Upper deck"];return(0,Eh.jsx)(Sh,{options:i,value:i[t],onChange:a=>n(i.indexOf(a))})};var lt=require("react/jsx-runtime"),Ch=({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 bh=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 Bh=ve(yn()),jl=ve(require("react"));var Th=ve(yn());var Zl=require("react/jsx-runtime"),gT=["bassinet","exit_row"],Rh=({type:t})=>(0,Zl.jsx)("div",{className:(0,Th.default)("map-element map-element--amenity",{"map-element--wrapped":!gT.includes(t)}),"aria-label":t.toString(),children:(0,Zl.jsx)(pe,{name:t,size:16})});var xh=require("react/jsx-runtime"),fa=()=>(0,xh.jsx)("div",{className:"map-element map-element--empty"});var Ah=ve(yn());var sc=require("react/jsx-runtime"),Oh=({isRight:t})=>(0,sc.jsx)("div",{className:(0,Ah.default)("map-element map-element--exit",{"map-element--exit--right":t}),children:t?(0,sc.jsx)(pe,{name:"exit_row_right"}):(0,sc.jsx)(pe,{name:"exit_row"})});var Ih=(t="")=>t.split(" ").map(n=>n[0]).slice(0,2).join("");var Nh=ve(yn());var Hr=require("react/jsx-runtime"),wh=({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 Xl=require("react/jsx-runtime"),Ph=({seat:t})=>(0,Xl.jsx)("span",{className:"map-element map-element__seat","aria-label":`${t.designator} ${t.name||"Seat"} Unavailable`,children:(0,Xl.jsx)(pe,{name:"close",size:14})});var fr=require("react/jsx-runtime"),Mh=({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)(Ph,{seat:t});let p=Object.values(u).find(ce=>ce.serviceInformation?.designator===t.designator&&ce.serviceInformation?.segmentId===i),m=p!=null,h=m?Ih(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,Nh.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)(wh,{seat:t,service:l})]})};var $r=require("react/jsx-runtime"),Dh=({element:t,elementIndex:n,sectionIndex:i,onSeatToggled:a,selectedServicesMap:s,currentPassengerId:u,currentSegmentId:l,currentPassengerName:p})=>(0,$r.jsx)($r.Fragment,{children:Xs(t)?(0,$r.jsx)(Mh,{currentSegmentId:l,currentPassengerId:u,currentPassengerName:p,selectedServicesMap:s,element:t,onSeatToggled:a},n):t.type==="empty"?(0,$r.jsx)(fa,{},n):t.type==="exit_row"?(0,$r.jsx)(Oh,{isRight:i>0},n):(0,$r.jsx)(Rh,{type:t.type},n)});var pr=require("react/jsx-runtime"),Lh=({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,Bh.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)(Dh,{sectionIndex:s,elementIndex:P,element:I,selectedServicesMap:l,onSeatToggled:u,currentPassengerId:p,currentSegmentId:h,currentPassengerName:m})},P)):(0,pr.jsx)(fa,{})}),(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)(fa,{})]},s)};var pa=require("react/jsx-runtime"),kh=({row:t,hasWings:n,onSeatToggled:i,selectedServicesMap:a,currentPassengerId:s,currentPassengerName:u,currentSegmentId:l})=>{let p=bh(t);return(0,pa.jsx)(pa.Fragment,{children:t.sections.map((m,h)=>(0,pa.jsx)(Lh,{row:t,rowNumber:p,hasWings:n,section:m,sectionIndex:h,selectedServicesMap:a,onSeatToggled:i,currentPassengerId:s,currentPassengerName:u,currentSegmentId:l},h))})};var da=require("react/jsx-runtime"),Jl=()=>(0,da.jsxs)(oo,{children:[(0,da.jsx)("p",{style:{marginBlock:"0"},className:"p1--semibold",children:"Seat selection unavailable"}),(0,da.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"),Gh=({seatMap:t,onSeatToggled:n,selectedServicesMap:i,currentPassengerId:a,currentPassengerName:s,currentSegmentId:u})=>{let[l,p]=Uh.useState(0);if(!t||!t.cabins||!t.cabins.length)return(0,Fn.jsx)(Jl,{});let m=gh(l,t),h=m.length!==t.cabins.length,S=t.cabins.some(I=>I.wings);if(!m||!m.length)return(0,Fn.jsx)(Jl,{});let v=hh(m);return(0,Fn.jsxs)("div",{className:(0,Fh.default)("seat-map",{"seat-map--wings":S}),children:[h&&(0,Fn.jsx)(vh,{value:l,setValue:I=>{p(I)}}),(0,Fn.jsx)("div",{className:"seat-map__legend-container",children:(0,Fn.jsx)(Ch,{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)(kh,{row:L,hasWings:_h(I,Y),onSeatToggled:n,selectedServicesMap:i,currentPassengerId:a,currentPassengerName:s,currentSegmentId:u},Y))},`cabin-${P}`))]})};var Ql=require("react/jsx-runtime"),Hh=t=>(0,Ql.jsx)(ho,{children:(0,Ql.jsx)(Gh,{...t})});var dr=require("react/jsx-runtime"),$h=({selectedServices:t,servicePrices:n,currency:i,isFirstSegment:a,isLastSegment:s,onNextSegmentButtonClicked:u,onPreviousSegmentButtonClicked:l,onClose:p,seatMaps:m})=>{let h=Dn(t),S=sa(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)(ut,{size:48,disabled:a,variant:"outlined",onClick:()=>l(),children:"Back"}),(0,dr.jsx)(ut,{size:48,"data-testid":"confirm-selection-for-seats",onClick:()=>s?p():u(),children:s?"Confirm":"Next"})]})]})};var vn=require("react/jsx-runtime"),Yh=({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)(hT,{},`segment_${l}`):(0,vn.jsx)(Wh,{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:rc(i.departing_at)})]}),(0,vn.jsx)("p",{className:"h3--semibold",style:{color:"var(--GREY-600)",marginBlock:"0 4px"},children:a})]}),Wh=({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}}),hT=()=>(0,vn.jsx)(Wh,{onClick:void 0,style:{backgroundColor:"var(--SECONDARY, rgb(var(--ACCENT)))"}});var So=require("react/jsx-runtime"),Vh=({isOpen:t,offer:n,passengers:i,seatMaps:a,selectedServices:s,onClose:u})=>{let[l,p]=ef.default.useState(0),[m,h]=ef.default.useState(s),S=m.reduce((ge,he)=>({...ge,[he.id]:he}),{});if(!n||!a)return null;let v=tc(n),I=ec(i),P=so(n.available_services),L=mh(v),{passenger:{passenger_id:Y},passengerIndex:ce,segment:{id:X}}=L[l],H=v.find(({id:ge})=>ge===X),ue=I[Y],de=a.find(ge=>ge.segment_id===X),Ne=nc(ue,n.passengers[ce],ce+1),Me=ge=>{let he=new Array;for(let rt of m){let Nt=rt.id===ge.id&&ge.quantity===0,it=rt.serviceInformation?.segmentId===X&&rt.serviceInformation?.passengerId===Y;!Nt&&!it&&(he=[...he,rt])}ge.quantity>0&&(he=[...he,ge]),h(he)},Te=ac(a)??n.total_currency;return(0,So.jsxs)(go,{isOpen:t,onClose:()=>u(s),children:[(0,So.jsx)(Yh,{segmentAndPassengerPermutationsCount:L.length,currentSegment:H,currentPassengerName:Ne,currentSegmentAndPassengerPermutationsIndex:l,setCurrentSegmentAndPassengerPermutationsIndex:p}),(0,So.jsx)(Hh,{selectedServicesMap:S,seatMap:de,onSeatToggled:Me,currentPassengerId:Y,currentPassengerName:Ne,currentSegmentId:X}),(0,So.jsx)($h,{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"),zh=({isLoading:t,offer:n,seatMaps:i,passengers:a,selectedServices:s,setSelectedServices:u})=>{let[l,p]=qh.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=ac(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)(po,{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)(uo,{})]}),!t&&!m&&(0,Un.jsx)(ar,{color:"var(--GREY-700)",backgroundColor:"var(--GREY-200)",children:"Not available"})]}),(0,Un.jsx)(Vh,{isOpen:!!(n&&i&&l),seatMaps:i,offer:n,passengers:a,selectedServices:s,onClose:Y=>{u(Y),p(!1)}})]})};var Jt=require("react/jsx-runtime"),_T="https://assets.duffel.com/components/3.1.2",yT=`${_T}/global.css`,ST=t=>{if(qs(t.debug||!1),or("Properties passed into the component:",t),!Ul(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=Gl(t),i=Hl(t),a=$l(t),s=Yl(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),ge=Og(t.markup,t.priceFormatters),he=oe=>{let _e="This offer has expired.";if(Ng(oe)){X(_e);return}else{let Vr=new Date(oe?.expires_at)?.getTime()-Date.now(),Mt=1e3*60*60*24;Vr<Mt&&setTimeout(()=>X(_e),Vr)}let ze=Ig(oe,ge);h(ze)},rt=oe=>{let _e=wg(oe,ge.seats);P(_e)};if(wt.useEffect(()=>{Ds("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)&&kg(t.offer_id,n?null:t.client_key,X,v,oe=>{if(he(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((_e,ze)=>({..._e,id:oe.passengers[ze].id})))}),u&&Ug(i||n?t.offer_id:t.offer.id,n?null:t.client_key,()=>rt([]),Y,rt),s&&he(t.offer),a&&(he(t.offer),rt(t.seat_maps))},[t.offer_id,t.client_key,t.offer?.id,t.seat_maps?.[0]?.id]),wt.useEffect(()=>{if(!m)return;let oe=Ag({baggageSelectedServices:H,seatSelectedServices:de,cfarSelectedServices:Me,offer:m,passengers:l,seatMaps:I});if(Pg(oe)){let _e={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":_e}),t.onPayloadReady(oe,_e)}},[H,de,Me]),!Ul(t))return null;let Nt=`${72*t.services.length+32*(t.services.length-1)}px`,it={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:yT}),(0,Jt.jsx)("div",{className:"duffel-components",style:it,children:(0,Jt.jsxs)(ao,{children:[ce&&(0,Jt.jsx)(xg,{height:Nt,message:ce}),!ce&&t.services.map(oe=>{if(oe==="bags")return(0,Jt.jsx)(ah,{isLoading:S,offer:m,passengers:l,selectedServices:H,setSelectedServices:ue},"bags");if(oe==="seats")return(0,Jt.jsx)(zh,{isLoading:S||L,seatMaps:I,offer:m,passengers:l,selectedServices:de,setSelectedServices:Ne},"seats");if(oe==="cancel_for_any_reason")return(0,Jt.jsx)(ph,{isLoading:S,offer:m,selectedServices:Me,setSelectedServices:Te},"cancel_for_any_reason")})]})})]})};var Yr=ve(Zh());var jh="https://js.stripe.com/v3",vT=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Xh="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",ET=function(){for(var n=document.querySelectorAll('script[src^="'.concat(jh,'"]')),i=0;i<n.length;i++){var a=n[i];if(vT.test(a.src))return a}return null},CT=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},bT=function(n,i){!n||!n._registerWrapper||n._registerWrapper({name:"stripe-js",version:"1.54.0",startTime:i})},uc=null,TT=function(n){return uc!==null||(uc=new Promise(function(i,a){if(typeof window>"u"||typeof document>"u"){i(null);return}if(window.Stripe&&n&&console.warn(Xh),window.Stripe){i(window.Stripe);return}try{var s=ET();s&&n?console.warn(Xh):s||(s=CT(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}})),uc},RT=function(n,i,a){if(n===null)return null;var s=n.apply(void 0,i);return bT(s,a),s},Jh=Promise.resolve().then(function(){return TT(null)}),Qh=!1;Jh.catch(function(t){Qh||console.warn(t)});var e_=function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];Qh=!0;var s=Date.now();return Jh.then(function(u){return RT(u,i,s)})};var En=ve(require("react"));var nt=require("react/jsx-runtime"),xT="https://assets.duffel.com/components/3.1.2",AT=`${xT}/global.css`,OT="card",IT="3.1.2",wT={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"}},PT={color:"#ef4444",iconColor:"#ef4444"},NT=({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(OT);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,nt.jsx)("div",{className:"card-payment__container",children:(0,nt.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:IT||"failed-to-get-version"}}});if(v(!1),Ne.error){let{error:Me}=Ne;a(Me)}else i()}},children:[S&&(0,nt.jsx)("div",{className:"card-payment--in-progress","aria-live":"polite","aria-busy":"true"}),(0,nt.jsx)(Yr.CardElement,{className:"card-details",options:{style:{base:{...wT,...t?.fontFamily&&{fontFamily:t.fontFamily}},invalid:{...PT}}}}),(0,nt.jsx)("div",{className:"card-payment__container--invalid",role:"alert",children:m&&I}),(0,nt.jsx)(ut,{className:"card-payment__pay-button",type:"submit",disabled:!l||S,"aria-label":"Pay",children:S?"Processing...":"Pay"})]})}):null},MT=t=>{let[n,i]=En.useState(null);qs(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=e_(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,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)("link",{rel:"stylesheet",href:AT}),(0,nt.jsx)("div",{className:"duffel-components",style:l,children:(0,nt.jsx)(ao,{children:(0,nt.jsx)(Yr.Elements,{stripe:n,children:(0,nt.jsx)(NT,{...t})})})})]})};function mr(t){return Array.isArray?Array.isArray(t):c_(t)==="[object Array]"}var DT=1/0;function BT(t){if(typeof t=="string")return t;let n=t+"";return n=="0"&&1/t==-DT?"-0":n}function LT(t){return t==null?"":BT(t)}function Gn(t){return typeof t=="string"}function a_(t){return typeof t=="number"}function kT(t){return t===!0||t===!1||FT(t)&&c_(t)=="[object Boolean]"}function s_(t){return typeof t=="object"}function FT(t){return s_(t)&&t!==null}function Pt(t){return t!=null}function tf(t){return!t.trim().length}function c_(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var UT="Incorrect 'index' type",GT=t=>`Invalid value for key ${t}`,HT=t=>`Pattern length exceeds max of ${t}.`,$T=t=>`Missing ${t} property in key`,YT=t=>`Property 'weight' in key '${t}' must be a positive integer`,t_=Object.prototype.hasOwnProperty,nf=class{constructor(n){this._keys=[],this._keyMap={};let i=0;n.forEach(a=>{let s=u_(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 u_(t){let n=null,i=null,a=null,s=1,u=null;if(Gn(t)||mr(t))a=t,n=n_(t),i=rf(t);else{if(!t_.call(t,"name"))throw new Error($T("name"));let l=t.name;if(a=l,t_.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(YT(l));n=n_(l),i=rf(l),u=t.getFn}return{path:n,id:i,weight:s,src:a,getFn:u}}function n_(t){return mr(t)?t:t.split(".")}function rf(t){return mr(t)?t.join("."):t}function WT(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)||a_(h)||kT(h)))i.push(LT(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 VT={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},qT={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},KT={useExtendedSearch:!1,getFn:WT,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},W={...qT,...VT,...zT,...KT},ZT=/[^ ]+/g;function XT(t=1,n=3){let i=new Map,a=Math.pow(10,n);return{get(s){let u=s.match(ZT).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 ma=class{constructor({getFn:n=W.getFn,fieldNormWeight:i=W.fieldNormWeight}={}){this.norm=XT(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)||tf(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)&&!tf(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)&&!tf(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 l_(t,n,{getFn:i=W.getFn,fieldNormWeight:a=W.fieldNormWeight}={}){let s=new ma({getFn:i,fieldNormWeight:a});return s.setKeys(t.map(u_)),s.setSources(n),s.create(),s}function jT(t,{getFn:n=W.getFn,fieldNormWeight:i=W.fieldNormWeight}={}){let{keys:a,records:s}=t,u=new ma({getFn:n,fieldNormWeight:i});return u.setKeys(a),u.setIndexRecords(s),u}function lc(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 JT(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 QT(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(HT(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=lc(n,{currentLocation:X,expectedLocation:I,distance:s,ignoreLocation:h});if(P=Math.min(Te,P),L=X+S,Y){let ge=0;for(;ge<S;)ce[X+ge]=1,ge+=1}}L=-1;let H=[],ue=1,de=S+v,Ne=1<<S-1;for(let Te=0;Te<S;Te+=1){let ge=0,he=de;for(;ge<he;)lc(n,{errors:Te,currentLocation:I+he,expectedLocation:I,distance:s,ignoreLocation:h})<=P?ge=he:de=he,he=Math.floor((de-ge)/2+ge);de=he;let rt=Math.max(1,I-he+1),Nt=l?v:Math.min(I+he,v)+S,it=Array(Nt+2);it[Nt+1]=(1<<Te)-1;for(let oe=Nt;oe>=rt;oe-=1){let _e=oe-1,ze=i[t.charAt(_e)];if(Y&&(ce[_e]=+!!ze),it[oe]=(it[oe+1]<<1|1)&ze,Te&&(it[oe]|=(H[oe+1]|H[oe])<<1|1|H[oe+1]),it[oe]&Ne&&(ue=lc(n,{errors:Te,currentLocation:_e,expectedLocation:I,distance:s,ignoreLocation:h}),ue<=P)){if(P=ue,L=_e,L<=I)break;rt=Math.max(1,2*I-L)}}if(lc(n,{errors:Te+1,currentLocation:I,expectedLocation:I,distance:s,ignoreLocation:h})>P)break;H=it}let Me={isMatch:L>=0,score:Math.max(.001,ue)};if(Y){let Te=JT(ce,p);Te.length?m&&(Me.indices=Te):Me.isMatch=!1}return Me}function e3(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 fc=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:e3(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}=QT(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 r_(n,this.multiRegex)}static isSingleMatch(n){return r_(n,this.singleRegex)}search(){}};function r_(t,n){let i=t.match(n);return i?i[1]:null}var of=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]}}},af=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]}}},sf=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]}}},cf=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]}}},uf=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]}}},lf=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]}}},pc=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 fc(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)}},dc=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}}},ff=[of,dc,sf,cf,lf,uf,af,pc],i_=ff.length,t3=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,n3="|";function r3(t,n={}){return t.split(n3).map(i=>{let a=i.trim().split(t3).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<i_;){let S=ff[h],v=S.isMultiMatch(p);v&&(s.push(new S(v,n)),m=!0)}if(!m)for(h=-1;++h<i_;){let S=ff[h],v=S.isSingleMatch(p);if(v){s.push(new S(v,n));break}}}return s})}var i3=new Set([pc.type,dc.type]),pf=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=r3(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;i3.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}}},df=[];function o3(...t){df.push(...t)}function mf(t,n){for(let i=0,a=df.length;i<a;i+=1){let s=df[i];if(s.condition(t,n))return new s(t,n)}return new fc(t,n)}var mc={AND:"$and",OR:"$or"},gf={PATH:"$path",PATTERN:"$val"},hf=t=>!!(t[mc.AND]||t[mc.OR]),a3=t=>!!t[gf.PATH],s3=t=>!mr(t)&&s_(t)&&!hf(t),o_=t=>({[mc.AND]:Object.keys(t).map(n=>({[n]:t[n]}))});function f_(t,n,{auto:i=!0}={}){let a=s=>{let u=Object.keys(s),l=a3(s);if(!l&&u.length>1&&!hf(s))return a(o_(s));if(s3(s)){let m=l?s[gf.PATH]:u[0],h=l?s[gf.PATTERN]:s[m];if(!Gn(h))throw new Error(GT(m));let S={keyId:rf(m),pattern:h};return i&&(S.searcher=mf(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 hf(t)||(t=o_(t)),a(t)}function c3(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 u3(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 l3(t,n){n.score=t.score}function f3(t,n,{includeMatches:i=W.includeMatches,includeScore:a=W.includeScore}={}){let s=[];return i&&s.push(u3),a&&s.push(l3),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 nf(this.options.keys),this.setCollection(n,a)}setCollection(n,i){if(this._docs=n,i&&!(i instanceof ma))throw new Error(UT);this._myIndex=i||l_(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 c3(m,{ignoreFieldNorm:p}),u&&m.sort(l),a_(i)&&i>-1&&(m=m.slice(0,i)),f3(m,this._docs,{includeMatches:a,includeScore:s})}_searchStringList(n){let i=mf(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=f_(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===mc.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=mf(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=l_;$n.parseIndex=jT;$n.config=W;$n.parseQuery=f_;o3(pf);var g_=ve(p_()),h_=ve(m_()),Co=ve(require("react"));var gr=require("react/jsx-runtime"),d3="https://assets.duffel.com/data/iata-lookup-v2.json",m3=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}}),g3=({onPlaceSelected:t,placeholder:n="Lookup city or airport"})=>{let[i,a]=Co.default.useState(!0),[s,u]=Co.default.useState(""),[l,p]=Co.default.useState(new $n([])),[m,h]=Co.default.useState([]),S=(0,g_.debounce)(v=>{h(l.search(v,{limit:10}))},300);return Co.default.useEffect(()=>{(0,h_.default)(d3).then(v=>v.json()).then(v=>p(new $n(m3(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 h3={economy:"Economy",premium_economy:"Premium Economy",business:"Business",first:"First",any:"Any"},_3={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
|