bukazu-portal-react 4.0.0 → 4.0.1
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/build/portal.es.js +4 -4
- package/build/portal.website.js +2 -2
- package/package.json +1 -1
package/build/portal.es.js
CHANGED
|
@@ -16,12 +16,12 @@ return d("ul",{className:"radioList",children:e.map(e=>{const t="string"==typeof
|
|
|
16
16
|
return h("li",{className:"bu-list-item "+(a?"bu-disabled":""),children:[/* @__PURE__ */d("input",{name:r.id,type:"radio",id:t,value:t,disabled:a,onBlur:s,onChange:s}),/* @__PURE__ */d("label",{htmlFor:t,children:n})]},t)})})}function _({value:e,onChange:t,field:n}){const r=e&&""!==e?e:"";/* @__PURE__ */
|
|
17
17
|
return d("input",{type:"date",id:n.id,name:n.id,value:r,onChange:e=>{t(n.id,e.target.value)}})}function y({PortalSite:e,field:t,value:n,onChange:r}){/* @__PURE__ */
|
|
18
18
|
return d("input",{value:n,type:"number",min:"0",max:"persons_min"===t.id?e.max_persons:e[t.id],onBlur:e=>{r(t.id,e.currentTarget.value)}})}var v=["persons_min","persons_max","bedrooms_min","bathrooms_min","weekprice_max"],b=["select","list","radio","number","date"];function w({PortalSite:e,field:t,filters:n,value:r,onFilterChange:o}){let s=[];var i;t.options?s=t.options:void 0!==t.max?s="weekprice_max"===t.id?function(e){let t=Math.ceil(e/100);return Array.from({length:t+1},(e,t)=>100*t)}(t.max):(i=t.max,Array.from({length:i+1},(e,t)=>t)):["countries","cities","regions"].includes(t.id)&&(s=e[t.id]||[]);const a=!b.includes(t.type)&&v.includes(t.id)?"select":t.type;return"select"===a?/* @__PURE__ */d(m,{options:s,field:t,filters:n,value:r,onChange:o}):"list"===a?/* @__PURE__ */d(f,{options:s,field:t,filters:n,value:r,onChange:o}):"radio"===a?/* @__PURE__ */d(g,{options:s,field:t,filters:n,onChange:o}):"number"===a?/* @__PURE__ */d(y,{PortalSite:e,field:t,value:r,onChange:o}):"date"===a?/* @__PURE__ */d(_,{field:t,value:r,onChange:o}):/* @__PURE__ */d("input",{value:r,onBlur:e=>{o(t.id,e.target.value)}})}var x=()=>/* @__PURE__ */d("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 100",enableBackground:"new 0 0 100 100",xmlSpace:"preserve",height:"16px",children:/* @__PURE__ */d("path",{fill:"#000000",stroke:"2",d:"M77,53.752c0,0.012,0,0.022,0,0.034c0,14.92-12.019,27.058-26.938,27.058 c-14.92,0-26.948-12.138-26.948-27.058C23.114,38.961,35,26.889,50,26.738v4.942c0,2.84,2.54,2.913,3.947,1.647l10.354-7.714 c0,0,1.128-0.942,1.128-1.979c0-1.089-1.147-1.979-1.147-1.979L53.95,13.941C52.543,12.675,50,12.749,50,15.588v5.149 c-18,0.151-32.826,14.915-32.826,33.048c0,18.229,14.686,33.058,32.914,33.058C68.314,86.844,83,72.015,83,53.786 c0-0.012,0-0.022,0-0.034c0,0,0-3.375-3.037-3.375C77.109,50.376,77,53.752,77,53.752z"})}),k={next:"Next",previous:"Previous",view_details:"View details",price:"Price",calculate:"Next",currency:"Currency",book:"Book",booked:"Booked",booking:"Booking",last_minute_discount:"Last minute discount",discount:"Discount",option:"Option",choose_for_option:"Make a short reservation for this period ",included_in_price:"including",rent_price:"Rental price",extra_costs_included:"Extra costs included",optional_costs:"Extra options",price_after_discount:"Rental price incl. discount",booking_from_til:"Booking dates",total:"Total",stay_details:"Travel group",babies:"Babies",babies_from:"(up to the age of {babies})",adults:"Adults",adults_from:"(from the age of {age})","camper_spot.arrival_date":"Arrival date","camper_spot.departure_date":"Departure date","camper_spot.arrival":"Arrival","camper_spot.departure":"Departure","camping_place.arrival_date":"Arrival date","camping_place.departure_date":"Departure date","camping_place.arrival":"Arrival","camping_place.departure":"Departure","bnb.arrival_date":"Arrival date","bnb.departure_date":"Departure date","bnb.arrival":"Arrival","bnb.departure":"Departure","hotelroom.arrival_date":"Arrival date","hotelroom.departure_date":"Departure date","hotelroom.arrival":"Arrival","hotelroom.departure":"Departure",children:"Children",children_from:"(from {from} to {til} years inclusive)","house.arrival_date":"Arrival date","house.departure_date":"Departure date","house.arrival":"Arrival","house.departure":"Departure","group_accommodation.arrival_date":"Arrival date","group_accommodation.departure_date":"Departure date","group_accommodation.arrival":"Arrival","group_accommodation.departure":"Departure","tent.arrival_date":"Arrival date","tent.departure_date":"Departure date","tent.arrival":"Arrival","tent.departure":"Departure",extra_costs_bookable:"Extra options",costs_on_site:"Additional costs on the spot:",insurances:"Insurances",at_least_1_adult:"Choose at least 1 adult.",max_persons_reached:"Too many people have been selected.",personal_details:"Your information",required:"This field is required.",cancel_insurance_all_risk:"All Risk",cancel_insurance_normal:"Standard",none:"None",cancel_insurance:"Cancellation insurance",insurance_costs:"Insurance Costs",choose:"Choose",yes:"Yes",booking_details:"Booking details",based_on_one_person:"Based on {persons} persons",return_to_calendar:"Back to calendar",close:"Close",cancel_insurance_normal_long:"Short-term Cancellation Insurance ",cancel_insurance_normal_desc:"If you booked a wonderful holiday, cancellation insurance should not be missing! Your booked holiday cannot continue, or you have to go home unexpectedly halfway through the holiday due to, for example, a severe illness. The cancellation insurance of RecreatieVerzekeringen is ideal because it applies before departure and during your holiday.",cancel_insurance_more_insured:"More are insured than you think.",cancel_insurance_more_insured_desc:"Did you know that you can rely on cancellation insurance during pregnancy, a new job, or divorce? Many people expect cancellation insurance to be valid only in the event of illness or death.",cancel_insurance_important:"Important",cancel_insurance_important_message:"For optimal cancellation insurance coverage, you must take it out within seven days after booking the holiday.",cancel_insurance_for_whom:"For whom?",cancel_insurance_for_whom_explain:"This insurance is for a maximum of 4 families or 9 travel companions (no family members).",cancel_insurance_questions:"Frequently Asked Questions",cancel_insurance_questions_explain_1:"Click ",cancel_insurance_questions_explain_link:"here",cancel_insurance_questions_explain_2:" to find the Frequently Asked Questions.",show_terms:"Show conditions",terms:"Terms",remark:"Remark","9persons_9addresses":"The Insurance will pay for up to 9 persons, who live at 9 different addresses,",or:"or","9persons_4addresses":"The insurance pays out for an unlimited number of people who live at a maximum of 4 different addresses.",poliscosts:"Policy fee",poliscosts_are:"The cost for an insurance policy is a one-time charge of € 6,95. No matter if you have one or two insuran",youwillrecieve:"You will receive the insurance terms separate from you booking confirmation per email. The insurance starts as soon as the (first) payment has been made.",thank_you_for_your_request:"Thank you very much for your request.",we_sent_confirmation_check_email:"A copy of your request has been sent to your e-mail address. If you have not received any mail from us, it may be that it is in your spam box.",something_went_wrong_please_try_again:"Oops, something went wrong, please try again later.",persons:"persons",bedrooms:"bedrooms",minimum_week_price:"min. weekly price",no_results:"No results",agree_with:"Clicking 'Book' creates a payment obligation when my booking is accepted. I agree to the ",option_is_free:"An option is free of charge and without obligation.",discount_reason:"Reason discount.",results:"results",bathrooms:"bathrooms",you_need_to_give_reason:"You must indicate a valid discount reason","camper.arrival_date":"Start date","camper.departure_date":"End date","camper.arrival":"Start date","camper.departure":"End date","boat.arrival_date":"Start date","boat.departure_date":"End date","boat.arrival":"Start date","boat.departure":"End date","caravan.arrival_date":"Arrival date","caravan.departure_date":"Departure date","caravan.arrival":"Arrival","caravan.departure":"Departure",filters:"Filters",comply_insurance_card:"I agree that the cancellation insurance insurance card will be digitally issued to me. I receive this card with my booking confirmation.","house.you_picked_arrival_date":"Your arrival date is","house.pick_your_departure_in_the_calendar":"Select a departure date","house.you_picked_departure_date":"Your departure date is","house.pick_your_arrivaldate_in_the_calendar":"Choose an arrival date","group_accommodation.you_picked_arrival_date":"Your arrival date is","group_accommodation.pick_your_departure_in_the_calendar":"Select a departure date","group_accommodation.you_picked_departure_date":"Your departure date is","group_accommodation.pick_your_arrivaldate_in_the_calendar":"Choose an arrival date","tent.you_picked_arrival_date":"Your arrival date is","tent.pick_your_departure_in_the_calendar":"Select a departure date","tent.you_picked_departure_date":"Your departure date is","tent.pick_your_arrivaldate_in_the_calendar":"Choose an arrival date","camper.you_picked_arrival_date":"Your pickup date is","camper.pick_your_departure_in_the_calendar":"Select a return date","camper.you_picked_departure_date":"Your return date is","camper.pick_your_arrivaldate_in_the_calendar":"Choose a pickup date","boat.you_picked_arrival_date":"Your pickup date is","boat.pick_your_departure_in_the_calendar":"Select a return date","boat.you_picked_departure_date":"Your return date is","boat.pick_your_arrivaldate_in_the_calendar":"Choose a pickup date","bnb.you_picked_arrival_date":"Your arrival date is","bnb.pick_your_departure_in_the_calendar":"Select a departure date","bnb.you_picked_departure_date":"Your departure date is","bnb.pick_your_arrivaldate_in_the_calendar":"Choose an arrival date","caravan.you_picked_arrival_date":"Your pickup date is","caravan.pick_your_departure_in_the_calendar":"Select a return date","caravan.you_picked_departure_date":"Your return date is","caravan.pick_your_arrivaldate_in_the_calendar":"Choose a pickup date","camper_spot.you_picked_arrival_date":"Your arrival date is","camper_spot.pick_your_departure_in_the_calendar":"Select a departure date","camper_spot.you_picked_departure_date":"Your departure date is","camper_spot.pick_your_arrivaldate_in_the_calendar":"Choose an arrival date","camping_place.you_picked_arrival_date":"Your arrival date is","camping_place.pick_your_departure_in_the_calendar":"Select a departure date","camping_place.you_picked_departure_date":"Your departure date is","camping_place.pick_your_arrivaldate_in_the_calendar":"Choose an arrival date","hotelroom.you_picked_arrival_date":"Your arrival date is","hotelroom.pick_your_departure_in_the_calendar":"Select a departure date","hotelroom.you_picked_departure_date":"Your departure date is","hotelroom.pick_your_arrivaldate_in_the_calendar":"Choose an arrival date","house_boat.you_picked_arrival_date":"Your pickup date is","house_boat.pick_your_departure_in_the_calendar":"Select a return date","house_boat.you_picked_departure_date":"Your return date is","house_boat.pick_your_arrivaldate_in_the_calendar":"Choose a pickup date",no:"No",no_house_found:"No object found for this combination of PortalCode and ObjectCode",insurance_company_needs_date_of_birth:"A date of birth is required for taking out insurance","extra_fields.date_of_birth":"Date of birth",no_discount_code_found:"No discount found with entered code",discount_code:"Discount code",minimum_nights:"At least {minimum} nights",can_only_take_insurance_in_de_be_nl:"You can only take out insurance if you live in the Netherlands, Germany or Belgium.",price_from:"Price from",reviews:"Reviews",load_more_reviews:"Load more reviews",review_response_label:"Response from host",reviews_note_link:"BUKAZU Booking System maintains independent reviews. These reviews are collected after guests stay in the accommodation. There is verification of the combination of booking number and email address."},S=["en","nl","de","fr","es","it"];function C(e){return function(e){return S.includes(e)}(e)?e:"en"}new TextEncoder;function E(e,t,n){let r=t;const o=r+n,s=[];let i="";for(;r<o;){const t=e[r++];if(128&t)if(192==(224&t)){const n=63&e[r++];s.push((31&t)<<6|n)}else if(224==(240&t)){const n=63&e[r++],o=63&e[r++];s.push((31&t)<<12|n<<6|o)}else if(240==(248&t)){let n=(7&t)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++];n>65535&&(n-=65536,s.push(n>>>10&1023|55296),n=56320|1023&n),s.push(n)}else s.push(t);else s.push(t);s.length>=4096&&(i+=String.fromCharCode(...s),s.length=0)}return s.length>0&&(i+=String.fromCharCode(...s)),i}var T=new TextDecoder;function N(e,t,n){return n>200?function(e,t,n){const r=e.subarray(t,t+n);return T.decode(r)}(e,t,n):E(e,t,n)}var R=class{type;data;constructor(e,t){this.type=e,this.data=t}},A=class e extends Error{constructor(t){super(t);const n=Object.create(e.prototype);Object.setPrototypeOf(this,n),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:e.name})}};function D(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}function P({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=17179869183){if(0===t&&e<=4294967295){const t=/* @__PURE__ */new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e),t}{const n=e/4294967296,r=4294967295&e,o=/* @__PURE__ */new Uint8Array(8),s=new DataView(o.buffer);return s.setUint32(0,t<<2|3&n),s.setUint32(4,r),o}}{const n=/* @__PURE__ */new Uint8Array(12),r=new DataView(n.buffer);return r.setUint32(0,t),function(e,t,n){const r=Math.floor(n/4294967296),o=n;e.setUint32(t,r),e.setUint32(t+4,o)}(r,4,e),n}}var $={type:-1,encode:function(e){return e instanceof Date?P(function(e){const t=e.getTime(),n=Math.floor(t/1e3),r=1e6*(t-1e3*n),o=Math.floor(r/1e9);return{sec:n+o,nsec:r-1e9*o}}(e)):null},decode:function(e){const t=function(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{const e=t.getUint32(0);return{sec:4294967296*(3&e)+t.getUint32(4),nsec:e>>>2}}case 12:return{sec:D(t,4),nsec:t.getUint32(0)};default:throw new A(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}(e);/* @__PURE__ */
|
|
19
|
-
return new Date(1e3*t.sec+t.nsec/1e6)}},L=class e{static defaultCodec=new e;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register($)}register({type:e,encode:t,decode:n}){if(e>=0)this.encoders[e]=t,this.decoders[e]=n;else{const r=-1-e;this.builtInEncoders[r]=t,this.builtInDecoders[r]=n}}tryToEncode(e,t){for(let n=0;n<this.builtInEncoders.length;n++){const r=this.builtInEncoders[n];if(null!=r){const o=r(e,t);if(null!=o){return new R(-1-n,o)}}}for(let n=0;n<this.encoders.length;n++){const r=this.encoders[n];if(null!=r){const o=r(e,t);if(null!=o)return new R(n,o)}}return e instanceof R?e:null}decode(e,t,n){const r=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return r?r(e,t,n):new R(t,e)}};function j(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):function(e){return e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer}(e)?new Uint8Array(e):Uint8Array.from(e)}function U(e){return`${e<0?"-":""}0x${Math.abs(e).toString(16).padStart(2,"0")}`}var O="array",I="map_key",M="map_value",q=e=>{if("string"==typeof e||"number"==typeof e)return e;throw new A("The type of key must be string or number but "+typeof e)},B=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){const t=this.getUninitializedStateFromPool();t.type=O,t.position=0,t.size=e,t.array=new Array(e)}pushMapState(e){const t=this.getUninitializedStateFromPool();t.type=I,t.readCount=0,t.size=e,t.map={}}getUninitializedStateFromPool(){return this.stackHeadPosition++,this.stackHeadPosition===this.stack.length&&this.stack.push({type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null}),this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===O){const t=e;t.size=0,t.array=void 0,t.position=0,t.type=void 0}if(e.type===I||e.type===M){const t=e;t.size=0,t.map=void 0,t.readCount=0,t.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},F=/* @__PURE__ */new DataView(/* @__PURE__ */new ArrayBuffer(0)),z=new Uint8Array(F.buffer);try{F.getInt8(0)}catch(
|
|
20
|
-
return new RangeError(`Extra ${t.byteLength-n} of ${t.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);const t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t}finally{this.entered=!1}}*decodeMulti(e){if(this.entered)yield*this.clone().decodeMulti(e);else try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let t,n=!1;for await(const i of e){if(n)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(i);try{t=this.doDecodeSync(),n=!0}catch(
|
|
19
|
+
return new Date(1e3*t.sec+t.nsec/1e6)}},L=class e{static defaultCodec=new e;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register($)}register({type:e,encode:t,decode:n}){if(e>=0)this.encoders[e]=t,this.decoders[e]=n;else{const r=-1-e;this.builtInEncoders[r]=t,this.builtInDecoders[r]=n}}tryToEncode(e,t){for(let n=0;n<this.builtInEncoders.length;n++){const r=this.builtInEncoders[n];if(null!=r){const o=r(e,t);if(null!=o){return new R(-1-n,o)}}}for(let n=0;n<this.encoders.length;n++){const r=this.encoders[n];if(null!=r){const o=r(e,t);if(null!=o)return new R(n,o)}}return e instanceof R?e:null}decode(e,t,n){const r=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return r?r(e,t,n):new R(t,e)}};function j(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):function(e){return e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer}(e)?new Uint8Array(e):Uint8Array.from(e)}function U(e){return`${e<0?"-":""}0x${Math.abs(e).toString(16).padStart(2,"0")}`}var O="array",I="map_key",M="map_value",q=e=>{if("string"==typeof e||"number"==typeof e)return e;throw new A("The type of key must be string or number but "+typeof e)},B=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){const t=this.getUninitializedStateFromPool();t.type=O,t.position=0,t.size=e,t.array=new Array(e)}pushMapState(e){const t=this.getUninitializedStateFromPool();t.type=I,t.readCount=0,t.size=e,t.map={}}getUninitializedStateFromPool(){return this.stackHeadPosition++,this.stackHeadPosition===this.stack.length&&this.stack.push({type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null}),this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===O){const t=e;t.size=0,t.array=void 0,t.position=0,t.type=void 0}if(e.type===I||e.type===M){const t=e;t.size=0,t.map=void 0,t.readCount=0,t.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},F=/* @__PURE__ */new DataView(/* @__PURE__ */new ArrayBuffer(0)),z=new Uint8Array(F.buffer);try{F.getInt8(0)}catch(el){if(!(el instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var H=/* @__PURE__ */new RangeError("Insufficient data"),Y=new class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=16,t=16){this.maxKeyLength=e,this.maxLengthPerKey=t,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,t,n){const r=this.caches[n-1];e:for(const o of r){const r=o.bytes;for(let o=0;o<n;o++)if(r[o]!==e[t+o])continue e;return o.str}return null}store(e,t){const n=this.caches[e.length-1],r={bytes:e,str:t};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=r:n.push(r)}decode(e,t,n){const r=this.find(e,t,n);if(null!=r)return this.hit++,r;this.miss++;const o=E(e,t,n),s=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(s,o),o}},W=class e{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=F;bytes=z;headByte=-1;stack=new B;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??L.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=void 0!==e?.keyDecoder?e.keyDecoder:Y,this.mapKeyConverter=e?.mapKeyConverter??q}clone(){return new e({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=-1,this.stack.reset()}setBuffer(e){const t=j(e);this.bytes=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.pos=0}appendBuffer(e){if(-1!==this.headByte||this.hasRemaining(1)){const t=this.bytes.subarray(this.pos),n=j(e),r=new Uint8Array(t.length+n.length);r.set(t),r.set(n,t.length),this.setBuffer(r)}else this.setBuffer(e)}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){const{view:t,pos:n}=this;/* @__PURE__ */
|
|
20
|
+
return new RangeError(`Extra ${t.byteLength-n} of ${t.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);const t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t}finally{this.entered=!1}}*decodeMulti(e){if(this.entered)yield*this.clone().decodeMulti(e);else try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let t,n=!1;for await(const i of e){if(n)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(i);try{t=this.doDecodeSync(),n=!0}catch(el){if(!(el instanceof RangeError))throw el}this.totalPos+=this.pos}if(n){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return t}const{headByte:r,pos:o,totalPos:s}=this;throw new RangeError(`Insufficient data in parsing ${U(r)} at ${s} (${o} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,t){if(this.entered)yield*this.clone().decodeMultiAsync(e,t);else try{this.entered=!0;let n=t,r=-1;for await(const o of e){if(t&&0===r)throw this.createExtraByteError(this.totalPos);this.appendBuffer(o),n&&(r=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),0!==--r;);}catch(el){if(!(el instanceof RangeError))throw el}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){const e=this.readHeadByte();let t;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){const n=e-128;if(0!==n){this.pushMapState(n),this.complete();continue e}t={}}else if(e<160){const n=e-144;if(0!==n){this.pushArrayState(n),this.complete();continue e}t=[]}else{const n=e-160;t=this.decodeString(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.useBigInt64?this.readU64AsBigInt():this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.useBigInt64?this.readI64AsBigInt():this.readI64();else if(217===e){const e=this.lookU8();t=this.decodeString(e,1)}else if(218===e){const e=this.lookU16();t=this.decodeString(e,2)}else if(219===e){const e=this.lookU32();t=this.decodeString(e,4)}else if(220===e){const e=this.readU16();if(0!==e){this.pushArrayState(e),this.complete();continue e}t=[]}else if(221===e){const e=this.readU32();if(0!==e){this.pushArrayState(e),this.complete();continue e}t=[]}else if(222===e){const e=this.readU16();if(0!==e){this.pushMapState(e),this.complete();continue e}t={}}else if(223===e){const e=this.readU32();if(0!==e){this.pushMapState(e),this.complete();continue e}t={}}else if(196===e){const e=this.lookU8();t=this.decodeBinary(e,1)}else if(197===e){const e=this.lookU16();t=this.decodeBinary(e,2)}else if(198===e){const e=this.lookU32();t=this.decodeBinary(e,4)}else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e){const e=this.lookU8();t=this.decodeExtension(e,1)}else if(200===e){const e=this.lookU16();t=this.decodeExtension(e,2)}else{if(201!==e)throw new A(`Unrecognized type byte: ${U(e)}`);{const e=this.lookU32();t=this.decodeExtension(e,4)}}this.complete();const n=this.stack;for(;n.length>0;){const e=n.top();if(e.type===O){if(e.array[e.position]=t,e.position++,e.position!==e.size)continue e;t=e.array,n.release(e)}else{if(e.type===I){if("__proto__"===t)throw new A("The key __proto__ is not allowed");e.key=this.mapKeyConverter(t),e.type=M;continue e}if(e.map[e.key]=t,e.readCount++,e.readCount!==e.size){e.key=null,e.type=I;continue e}t=e.map,n.release(e)}}return t}}readHeadByte(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=-1}readArraySize(){const e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new A(`Unrecognized array type byte: ${U(e)}`)}}pushMapState(e){if(e>this.maxMapLength)throw new A(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new A(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,t){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,t):this.decodeBinary(e,t)}decodeUtf8String(e,t){if(e>this.maxStrLength)throw new A(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+t+e)throw H;const n=this.pos+t;let r;return r=this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?this.keyDecoder.decode(this.bytes,n,e):N(this.bytes,n,e),this.pos+=t+e,r}stateIsMapKey(){return this.stack.length>0&&this.stack.top().type===I}decodeBinary(e,t){if(e>this.maxBinLength)throw new A(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+t))throw H;const n=this.pos+t,r=this.bytes.subarray(n,n+e);return this.pos+=t+e,r}decodeExtension(e,t){if(e>this.maxExtLength)throw new A(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);const n=this.view.getInt8(this.pos+t),r=this.decodeBinary(e,t+1);return this.extensionCodec.decode(r,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){const e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){const e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){const e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){const e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){const e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){const e=(t=this.view,n=this.pos,4294967296*t.getUint32(n)+t.getUint32(n+4));var t,n;return this.pos+=8,e}readI64(){const e=D(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){const e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){const e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){const e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){const e=this.view.getFloat64(this.pos);return this.pos+=8,e}};async function J(e,t){let n;try{n=await fetch(e)}catch{throw new Error(t)}if(!n.ok)throw new Error(t);const r=new Uint8Array(await n.arrayBuffer());return o=r,new W(s).decode(o);var o,s}var K=/* @__PURE__ */new Map([["en",k]]),V=/* @__PURE__ */new Map,X={en:async()=>(await(import("./en-CP3JnJUl.js"))).default,nl:async()=>(await(import("./nl-CqMfYfPi.js"))).default,de:async()=>(await(import("./de-zZuaMj2f.js"))).default,fr:async()=>(await(import("./fr-B7seGjv1.js"))).default,es:async()=>(await(import("./es-5q9bGyu3.js"))).default,it:async()=>(await(import("./it-Y2cIBDth.js"))).default};async function G(e){const t=C(e),n=K.get(t);if(n)return n;const r=V.get(t);if(r)return r;const o=async function(e){return J(await X[e](),`Failed to load translations for locale "${e}"`)}(t).then(e=>(K.set(t,e),e)).catch(()=>K.get("en")??{}).finally(()=>{V.delete(t)});return V.set(t,o),o}function Q(e,t){const n=C("undefined"!=typeof window&&window.__localeId__||"en"),r=K.get(n)??K.get("en")??{};K.has(n)||G(n);let o=r[e]||e;return t&&Object.entries(t).forEach(([e,t])=>{o=o.replace(new RegExp(`\\{${e}\\}`,"g"),String(t))}),o}function Z(e,t){const n="undefined"!=typeof window&&window.__localeId__||"en";return new Intl.NumberFormat(n,t).format(e)}function ee({filters:e,onFilterChange:t,PortalSite:n,options:r}){function o(n,r){const o={...e};o[n]=r,t(o)}const[s,i]=u(!1),a=r.searchFields??[];let c=r.filtersForm.fixed_mobile?"fixed-mobile":null,p=r.filtersForm.show??1?`filters filters-${r.filtersForm.location}`:"filters-hidden",f=s&&"showOnMobile";/* @__PURE__ */
|
|
21
21
|
return h(l,{children:[/* @__PURE__ */d("button",{className:`filters-button ${c}`,onClick:()=>i(!s),children:Q("filters")}),/* @__PURE__ */h("div",{className:`${p} ${c} ${f}`,children:[/* @__PURE__ */d("button",{onClick:()=>{t({})},className:"filters-reload",children:/* @__PURE__ */d(x,{})}),a.map(t=>/* @__PURE__ */h("div",{className:"bu-field",id:t.id,children:[/* @__PURE__ */d("label",{style:{width:"100%",display:"block"},htmlFor:t.id,children:t.label}),/* @__PURE__ */d(w,{field:t,PortalSite:n,filters:e,value:e[t.id]??"",onFilterChange:o})]},t.id))]})]})}function te(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ne(e){return"number"==typeof e?Number.isInteger(e):"string"==typeof e&&/^-?\d+$/.test(e)}function re({result:e,options:t,currency:n}){const r=[t.show_city&&`<span>${te(e.city)}, </span>`,t.show_region&&`<span>${te(e.province)}, </span>`,t.show_country&&`<span>${te(e.country_name)}</span>`].filter(Boolean).join(""),o=[t.show_persons&&`<div>${te(e.persons)} ${te(Q("persons"))}</div>`,t.show_bedrooms&&`<div>${te(e.bedrooms)} ${te(Q("bedrooms"))}</div>`,t.show_bathrooms&&`<div>${te(e.bathrooms)} ${te(Q("bathrooms"))}</div>`].filter(Boolean).join(""),s=t.show_rating&&e.rating?`<div class="result-rating bu_card"><div class="result-rating-inner">${te(e.rating.toFixed(1))}</div></div>`:"",i=t.show_price?e.booking_price?`<div class="result-price">${te(Q("price_from"))}<span class="price">${te(Z(e.booking_price.total_price,{style:"currency",currency:e.booking_price.currency,minimumFractionDigits:0,maximumFractionDigits:0}))}</span></div>`:`<div class="result-price">${te(Q("minimum_week_price"))}<span class="price">${te(Z(e.minimum_week_price,{style:"currency",currency:n??"EUR",minimumFractionDigits:0,maximumFractionDigits:0}))}</span></div>`:"";return`\n <a class="bukazu-result bu_card"${e.house_url?` href="${te(e.house_url)}"`:""}>\n <div class="bukazu-result-inner">\n <div class="image-holder">\n <img${e.image_url?` src="${te(e.image_url)}"`:""} alt="${te(e.name)}" />\n </div>\n <div class="result">\n <div class="result-title">${te(e.name)}</div>\n <div class="result-place">${r}</div>\n <div class="result-description">${e.description}</div>\n <div class="result-details">${o}</div>\n ${s}\n ${i}\n <div class="result-button">${te(Q("view_details"))}</div>\n </div>\n </div>\n </a>\n `}G("en");function oe({onPageChange:e,totalCount:t,activePage:n,limit:r}){const o=r>0?Math.ceil(t/r):0,s=function(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t);let n=Math.max(1,e-Math.floor(2.5)),r=n+5-1;r>=t-1&&(r=t-2,n=r-5+1);const o=[0];n>1&&o.push("...");for(let s=n;s<=r;s++)o.push(s);return r<t-2&&o.push("..."),o.push(t-1),o}(n,o);/* @__PURE__ */
|
|
22
22
|
return h("div",{className:"bu-paginator",children:[/* @__PURE__ */h("div",{children:[t," ",Q("results")]}),o>1&&/* @__PURE__ */h("ul",{className:"bu-pagination",children:[
|
|
23
23
|
/* @__PURE__ */d("li",{className:0===n?"disabled":"",children:/* @__PURE__ */d("button",{disabled:0===n,onClick:()=>e(n-1),"aria-label":Q("previous"),children:"<"})}),s.map((t,r)=>"..."===t?/* @__PURE__ */d("li",{children:/* @__PURE__ */d("span",{"aria-label":"More pages",children:"..."})},`break-${r}`):/* @__PURE__ */d("li",{className:t===n?"selected":"",children:/* @__PURE__ */d("button",{"data-page-button":!0,onClick:()=>e(t),"aria-current":t===n?"page":void 0,children:t+1})},t)),
|
|
24
|
-
/* @__PURE__ */d("li",{className:n===o-1?"disabled":"",children:/* @__PURE__ */d("button",{disabled:n===o-1,onClick:()=>e(n+1),"aria-label":Q("next"),children:">"})})]})]})}var se="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ie=globalThis,ae="10.72.0";function ce(){return ue(ie),ie}function ue(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||"10.72.0",t[ae]=t["10.72.0"]||{}}function le(e,t,n=ie){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[ae]=r["10.72.0"]||{};return o[e]||(o[e]=t())}var de=["debug","info","warn","error","log","assert","trace"],he={};function pe(e){if(!("console"in ie))return e();const t=ie.console,n={},r=Object.keys(he);r.forEach(e=>{const r=he[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function fe(){return ge().enabled}function me(e,...t){se&&fe()&&pe(()=>{ie.console[e](`Sentry Logger [${e}]:`,...t)})}function ge(){return se?le("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var _e={enable:function(){ge().enabled=!0},disable:function(){ge().enabled=!1},isEnabled:fe,log:function(...e){me("log",...e)},warn:function(...e){me("warn",...e)},error:function(...e){me("error",...e)}},ye=/\(error: (.*)\)/,ve=/captureMessage|captureException/;function be(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],s=e.split("\n");for(let i=n;i<s.length;i++){let e=s[i];e.length>1024&&(e=e.slice(0,1024));const n=ye.test(e)?e.replace(ye,"$1"):e;if(!n.includes("Error: ")){for(const e of t){const t=e(n);if(t){o.push(t);break}}if(o.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(we(t).function||"")&&t.pop();t.reverse(),ve.test(we(t).function||"")&&(t.pop(),ve.test(we(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||we(t).filename,function:e.function||"?"}))}(o.slice(r))}}function we(e){return e[e.length-1]||{}}var xe="<anonymous>";function ke(e){try{return e&&"function"==typeof e&&e.name||xe}catch{return xe}}function Se(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var Ce={},Ee={};function Te(e,t){return Ce[e]=Ce[e]||[],Ce[e].push(t),()=>{const n=Ce[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function Ne(e,t){if(!Ee[e]){Ee[e]=!0;try{t()}catch(Zu){se&&_e.error(`Error while instrumenting ${e}`,Zu)}}}function Re(e,t){const n=e&&Ce[e];if(n)for(const r of n)try{r(t)}catch(Zu){se&&_e.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ke(r)}\nError:`,Zu)}}var Ae=null;function De(){Ae=ie.onerror,ie.onerror=function(e,t,n,r,o){return Re("error",{column:r,error:o,line:n,msg:e,url:t}),!!Ae&&Ae.apply(this,arguments)},ie.onerror.__SENTRY_INSTRUMENTED__=!0}var Pe=null;function $e(){Pe=ie.onunhandledrejection,ie.onunhandledrejection=function(e){return Re("unhandledrejection",e),!Pe||Pe.apply(this,arguments)},ie.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var Le,je=Object.prototype.toString;function Ue(e){switch(je.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Je(e,Error)}}function Oe(e,t){return je.call(e)===`[object ${t}]`}function Ie(e){return Oe(e,"ErrorEvent")}function Me(e){return Oe(e,"DOMError")}function qe(e){return Oe(e,"String")}function Be(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Fe(e){return null===e||Be(e)||"object"!=typeof e&&"function"!=typeof e}function ze(e){return Oe(e,"Object")}function He(e){return"object"==typeof e&&null!==e}function Ye(e){return"undefined"!=typeof Event&&Je(e,Event)}function We(e){return Boolean(e?.then&&"function"==typeof e.then)}function Je(e,t){try{return e instanceof t}catch{return!1}}function Ke(e){return"undefined"!=typeof Request&&Je(e,Request)}function Ve(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const o=n(r);"function"==typeof o&&Ge(o,r);try{e[t]=o}catch{se&&_e.log(`Failed to replace method "${t}" in object`,e)}}function Xe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{se&&_e.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Ge(e,t){try{e.prototype=t.prototype=t.prototype||{},Xe(e,"__sentry_original__",t)}catch{}}function Qe(e){return e.__sentry_original__}function Ze(e){if(Ue(e))return{message:e.message,name:e.name,stack:e.stack,...et(e)};if(Ye(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...et(e)}}return e}function et(e){return He(e)?Object.fromEntries(Object.entries(e)):{}}function tt(e){if(void 0!==Le)return Le?Le(e):e();const t=/* @__PURE__ */Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=ie;return t in n&&"function"==typeof n[t]?(Le=n[t])(e):(Le=null,e())}function nt(){return tt(()=>Math.random())}function rt(){return tt(()=>Date.now())}var ot,st,it=/* @__PURE__ */Symbol.for("sentry.skipNormalization"),at=/* @__PURE__ */Symbol.for("sentry.overrideNormalizationDepth");function ct(e,t=100,n=1/0){try{return lt("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function ut(e,t=3,n=102400){const r=ct(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?ut(e,t-1,n):r;var o}function lt(e,t,n=1/0,r=1/0,o=function(){const e=/* @__PURE__ */new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=dt(e,t);if(!a.startsWith("[object "))return a;if(function(e){return Boolean(e[it])}(t))return t;const c=function(e){const t=e[at];return"number"==typeof t?t:void 0}(t),u=void 0!==c?c:n;if(0===u)return a.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return lt("",l.toJSON(),u-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let h=0;const p=Ze(t);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(h>=r){d[f]="[MaxProperties ~]";break}const e=p[f];d[f]=lt(f,e,u-1,r,o),h++}return i(t),d}function dt(e,t){try{if(ot){const e=ot(t);if(e)return e}return"undefined"!=typeof global&&t===global?"[Global]":"number"!=typeof t||Number.isFinite(t)?"function"==typeof t?`[Function: ${ke(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:`[object ${function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t)}]`:`[${t}]`}catch(n){return`**non-serializable** (${n})`}}function ht(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function pt(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];Fe(t)?n.push(String(t)):t instanceof Error?n.push(t.message?`${t.name}: ${t.message}`:t.name):n.push(dt(0,t))}return n.join(t)}function ft(e,t,n=!1){return!!qe(e)&&(Oe(t,"RegExp")?t.test(e):qe(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function mt(e,t=[],n=!1){for(const r of t)if(ft(e,r,n))return!0;return!1}function gt(e=function(){const e=ie;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return tt(()=>e.randomUUID()).replace(/-/g,"")}catch{}return st||(st="10000000100040008000100000000000"),st.replace(/[018]/g,e=>(e^(16*nt()&15)>>e/4).toString(16))}function _t(e){return e.exception?.values?.[0]}function yt(e){const{message:t,event_id:n}=e;if(t)return t;const r=_t(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function vt(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function bt(e,t){const n=_t(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function wt(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{Xe(e,"__sentry_captured__",!0)}catch{}return!1}var xt;function kt(){return rt()/1e3}function St(){return(xt??(xt=function(){const{performance:e}=ie;if(!e?.now||!e.timeOrigin)return kt;const t=e.timeOrigin;return()=>(t+tt(()=>e.now()))/1e3}()))()}function Ct(e){const t=St(),n={sid:gt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:/* @__PURE__ */new Date(1e3*e.started).toISOString(),timestamp:/* @__PURE__ */new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}(n)};return e&&Et(n,e),n}function Et(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||St(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:gt()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Tt(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=Tt(r[o],t[o],n-1));return r}function Nt(){return gt()}function Rt(){return gt().substring(16)}function At(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}var Dt="_sentrySpan";function Pt(e,t){t?Xe(e,Dt,function(e){try{const t=ie.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(t)):delete e[Dt]}function $t(e){return At(e[Dt])}var Lt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Nt(),sampleRand:nt()}}clone(){const t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Pt(t,$t(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Et(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},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,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,{tags:r,attributes:o,extra:s,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:l,conversationId:d}=(n instanceof e?n.getScopeData():ze(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),l&&(this._propagationContext=l),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Pt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Nt(),sampleRand:nt()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:kt(),...e,message:e.message?ht(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:$t(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Tt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||gt();if(!this._client)return se&&_e.warn("No client configured on scope - will not capture exception!"),n;const r=/* @__PURE__ */new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n?.event_id||gt();if(!this._client)return se&&_e.warn("No client configured on scope - will not capture message!"),r;const o=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=e.event_id||t?.event_id||gt();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(se&&_e.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}};var jt=e=>e instanceof Promise&&!e[Ut],Ut=/* @__PURE__ */Symbol("chained PromiseLike"),Ot=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const o=e[r];"function"==typeof o?Object.defineProperty(t,r,{value:(...t)=>o.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=o}return n&&Object.assign(t,{[Ut]:!0}),t},It=class{constructor(e,t){let n,r;n=e||new Lt,r=t||new Lt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(Zu){throw this._popScope(),Zu}return We(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return jt(r)&&jt(e)?r:Ot(e,r)})(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function Mt(){const e=ue(ce());return e.stack=e.stack||new It(le("defaultCurrentScope",()=>new Lt),le("defaultIsolationScope",()=>new Lt))}function qt(e){return Mt().withScope(e)}function Bt(e,t){const n=Mt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ft(e){return Mt().withScope(()=>e(Mt().getIsolationScope()))}function zt(e){const t=ue(e);return t.acs?t.acs:{withIsolationScope:Ft,withScope:qt,withSetScope:Bt,withSetIsolationScope:(e,t)=>Ft(t),getCurrentScope:()=>Mt().getScope(),getIsolationScope:()=>Mt().getIsolationScope()}}function Ht(e,t){const{value:n,unit:r}="object"==typeof(o=e)&&null!=o&&!Array.isArray(o)&&Object.keys(o).includes("value")?e:{value:e,unit:void 0};var o;const s=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),i=r&&"string"==typeof r?{unit:r}:{};if(s)return{...s,...i};if(!t||"skip-undefined"===t&&void 0===n)return;let a="";try{a=JSON.stringify(n)??""}catch{}return{value:a,type:"string",...i}}function Yt(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const e=Ht(o,t);e&&(n[r]=e)}return n}function Wt(){return zt(ce()).getCurrentScope()}function Jt(){return zt(ce()).getIsolationScope()}function Kt(){return Wt().getClient()}function Vt(e){const t=void 0;const{traceId:n,parentSpanId:r,propagationSpanId:o}=e.getPropagationContext(),s={trace_id:n,span_id:o||Rt()};return r&&(s.parent_span_id=r),s}var Xt="sentry.op";function Gt(e){const t=e;return{scope:t._sentryScope,isolationScope:At(t._sentryIsolationScope)}}function Qt(e){const t=function(e){if(!e||!qe(e)&&!Array.isArray(e))return;return Array.isArray(e)?e.reduce((e,t)=>{const n=Zt(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Zt(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith("sentry-")){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function Zt(e){return e.split(",").map(e=>{const t=e.indexOf("=");return-1===t?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var en=/^o(\d+)\./,tn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function nn(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}function rn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function on(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){return e.match(en)?.[1]}(n)),r}function sn(e){const t="string"==typeof e?function(e){const t=tn.exec(e);if(!t)return void pe(()=>{});const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return rn({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}(e):rn(e);if(t&&function(e){if(!se)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(_e.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(_e.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(_e.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(_e.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}var an=!1;function cn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:hn(e).parent_span_id,s=Gt(e).scope;return{parent_span_id:o,span_id:r?s?.getPropagationContext().propagationSpanId||Rt():t,trace_id:n}}function un(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:o})=>({span_id:e,trace_id:t,sampled:1===n,attributes:o,...r})):void 0}function ln(e){return"number"==typeof e?dn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?dn(e.getTime()):St()}function dn(e){return e>9999999999?e/1e3:e}function hn(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:pn(e),start_timestamp:ln(o),timestamp:ln(i)||void 0,status:fn(a),op:r[Xt],origin:r["sentry.origin"],links:un(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function pn(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function fn(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}var mn=function(e){return e._sentryRootSpan||e};function gn(){an||(pe(()=>{}),an=!0)}function _n(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||Kt()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function yn(e){_e.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function vn(e,t){if(!t?.length)return!1;for(const n of t){if(xn(n)){if(e.description&&ft(e.description,n))return se&&yn(e),!0;continue}const t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;const r=!n.name||e.description&&ft(e.description,n.name),o=!n.op||e.op&&ft(e.op,n.op),s=!n.attributes||Object.entries(n.attributes).every(([t,n])=>bn(e.attributes?.[t],n));if(r&&o&&s)return se&&yn(e),!0}return!1}function bn(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?ft(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function wn(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function xn(e){return"string"==typeof e||e instanceof RegExp}var kn=/* @__PURE__ */Symbol.for("sentry.nonRecordingSpan");var Sn="production";function Cn(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||"production",release:n.release,public_key:r,trace_id:e,org_id:on(t)};return t.emit("createDsc",o),o}function En(e,t){const n=t.getPropagationContext();return n.dsc||Cn(n.traceId,e)}function Tn(e){const t=Kt();if(!t)return{};const n=mn(e),r=hn(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o["sentry.sample_rate"]??o["sentry.previous_trace_sample_rate"];function a(e){return"number"!=typeof i&&"string"!=typeof i||(e.sample_rate=`${i}`),e}const c=n._frozenDsc;if(c)return a(c);const u=function(e){return!!e&&!0===e[kn]}(n),l=u&&"ignored"===n.dropReason;if(u&&(!_n(t.getOptions())||l)){const e=Gt(n).scope;if(e){const n={...En(t,e)};return l&&(n.sampled="false"),a(n)}}const d=s?.get("sentry.dsc"),h=d&&Qt(d);if(h)return a(h);const p=Cn(e.spanContext().traceId,t),f=o["sentry.source"]??o["sentry.segment.name.source"],m=r.description;return"url"!==f&&m&&(p.transaction=m),_n()&&(p.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=s?.get("sentry.sample_rand")??Gt(n).scope?.getPropagationContext().sampleRand.toString()),a(p),t.emit("createDsc",p,n),p}function Nn(e,t=[]){return[e,t]}function Rn(e,t){const[n,r]=e;return[n,[...r,t]]}function An(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function Dn(e){const t=ue(ie);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Pn(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[Dn(r),e]:r.push("string"==typeof e?Dn(e):e)}for(const s of n){const[e,t]=s;if(o(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)o(t);else{let e;try{e=JSON.stringify(t)}catch{e=JSON.stringify(ct(t))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}(r)}function $n(e){const t="string"==typeof e.data?Dn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Ln={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function jn(e){return function(e){return e in Ln}(e)?Ln[e]:e}function Un(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function On(e,t,n,r){const o=Un(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const i=function(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(rt()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:nn(r)},...o&&{trace:o}}}(e,o,r,t);return delete e.sdkProcessingMetadata,Nn(i,[[{type:s},e]])}function In(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(o).length&&(e.user={...o,...e.user});Object.keys(s).length&&(e.contexts={...s,...e.contexts});i&&(e.level=i);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:cn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Tn(t),...e.sdkProcessingMetadata};const n=mn(t),r=hn(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}function Mn(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:d,attachments:h,propagationContext:p,transactionName:f,span:m}=t;qn(e,"extra",n),qn(e,"tags",r),qn(e,"attributes",o),qn(e,"user",s),qn(e,"contexts",i),e.sdkProcessingMetadata=Tt(e.sdkProcessingMetadata,c,2),a&&(e.level=a),f&&(e.transactionName=f),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),h.length&&(e.attachments=[...e.attachments,...h]),e.propagationContext={...e.propagationContext,...p}}function qn(e,t,n){e[t]=Tt(e[t],n,1)}function Bn(e,t){const n=le("globalScope",()=>new Lt).getScopeData();return e&&Mn(n,e.getScopeData()),t&&Mn(n,t.getScopeData()),n}var Fn="url.full";function zn(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function Hn(e){return new Xn(t=>{t(e)})}function Yn(e){return new Xn((t,n)=>{n(e)})}var Wn,Jn,Kn,Vn,Xn=class e{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(Zu){r(Zu)}else e(n)},t=>{if(n)try{e(n(t))}catch(Zu){r(Zu)}else r(t)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,o;return this.then(e=>{o=!1,r=e,t&&t()},e=>{o=!0,r=e,t&&t()}).then(()=>{o?n(r):e(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(We(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(Zu){r(Zu)}}};function Gn(e,t,n,r=0){try{const o=Qn(t,n,e,r);return We(o)?o:Hn(o)}catch(o){return Yn(o)}}function Qn(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return se&&null===s&&_e.log(`Event processor "${o.id||"?"}" dropped event`),We(s)?s.then(e=>Qn(e,t,n,r+1)):Qn(s,t,n,r+1)}function Zn(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||gt(),timestamp:t.timestamp||kt()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||"production",!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=ht(i.url,s));s&&e.exception?.values?.forEach(e=>{e.value&&(e.value=ht(e.value,s))})}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=ie._sentryDebugIds,n=ie._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Vn&&r.length===Jn&&o.length===Kn)return Vn;Jn=r.length,Kn=o.length,Vn={},Wn||(Wn={});const s=(t,n)=>{for(const r of t){const t=n[r],o=Wn?.[r];if(o&&Vn&&t)Vn[o[0]]=t,Wn&&(Wn[r]=[o[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const o=n[e]?.filename;if(o&&Vn&&Wn){Vn[o]=t,Wn[r]=[o,t];break}}}}};return t&&s(r,t),n&&s(o,n),Vn}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(c,e.stackParser);const l=function(e,t){if(!t)return e;const n=e?e.clone():new Lt;return n.update(t),n}(r,n.captureContext);n.mechanism&&bt(c,n.mechanism);const d=o?o.getEventProcessors():[],h=Bn(s,l),p=[...n.attachments||[],...h.attachments];p.length&&(n.attachments=p),In(c,h);const f=[...d,...h.eventProcessors];return(n.data&&!0===n.data.__sentry__?Hn(c):Gn(f,c,n)).then(e=>(e&&function(e){const t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:ct(e.data,t,n)}}))},...e.user&&{user:ct(e.user,t,n)},...e.contexts&&{contexts:ct(e.contexts,t,n)},...e.extra&&{extra:ct(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ct(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:ct(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=ct(e.contexts.flags,3,n));return r}(e,i,a):e))}function er(e){if(e)return function(e){return e instanceof Lt||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>tr.includes(e))}(e)?{captureContext:e}:e}var tr=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function nr(e,t){return Wt().captureException(e,er(t))}function rr(e,t){return Wt().captureEvent(e,t)}function or(e,t){Jt().setTag(e,t)}function sr(e){const t=Jt(),{user:n}=Bn(t,Wt()),{userAgent:r}=ie.navigator||{},o=Ct({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return"ok"===s?.status&&Et(s,{status:"exited"}),ir(),t.setSession(o),o}function ir(){const e=Jt(),t=Wt().getSession()||e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),Et(e,n)}(t),ar(),e.setSession()}function ar(){const e=Jt(),t=Kt(),n=e.getSession();n&&t&&t.captureSession(n)}function cr(e=!1){e?ir():ar()}function ur(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function lr(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}var dr=[];function hr(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function pr(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function fr(e,t,n){if(n[t.name])se&&_e.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,dr.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),dr.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}["processSpan","processSegmentSpan"].forEach(n=>{const r=t[n];"function"==typeof r&&e.on(n,n=>r.call(t,n,e))}),se&&_e.log(`Integration installed: ${t.name}`)}}function mr(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function gr(){return"undefined"!=typeof window&&(!mr()||"renderer"===ie.process?.type)}function _r(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...gr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function yr(e,t){const n=t??function(e){return vr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=nn(r)),Nn(s,[_r(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);vr().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function vr(){return le("clientToLogBufferMap",()=>/* @__PURE__ */new WeakMap)}function br(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...gr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function wr(e,t){const n=t??function(e){return xr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=nn(r)),Nn(s,[br(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);xr().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function xr(){return le("clientToMetricBufferMap",()=>/* @__PURE__ */new WeakMap)}function kr(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links};return n=t,{...n,attributes:Yt(n.attributes),links:n.links?.map(e=>({...e,attributes:Yt(e.attributes)}))};var n}var Sr=/* @__PURE__ */Symbol.for("SentryBufferFullError");function Cr(e=100){const t=/* @__PURE__ */new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.size<e))return Yn(Sr);const o=r();return t.add(o),o.then(()=>n(o),()=>n(o)),o},drain:function(e){if(!t.size)return Hn(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>ur(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function Er(e,{statusCode:t,headers:n},r=rt()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[e,t,,,n]=a.split(":",5),s=parseInt(e,10),i=1e3*(isNaN(s)?60:s);if(t)for(const a of t.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(o[a]=r+i);else o.all=r+i}else i?o.all=r+function(e,t=rt()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(i,r):429===t&&(o.all=r+6e4);return o}function Tr(e,t,n=Cr(e.bufferSize||64)){let r={};return{send:function(o){const s=[];if(An(o,(t,n)=>{const o=jn(n);!function(e,t,n=rt()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,o)?s.push(t):e.recordDroppedEvent("ratelimit_backoff",o)}),0===s.length)return Promise.resolve({});const i=Nn(o[0],s),a=t=>{!function(e,t){return An(e,(e,n)=>t.includes(n))}(i,["client_report"])?An(i,(n,r)=>{e.recordDroppedEvent(t,jn(r))}):se&&_e.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>t({body:Pn(i)}).then(e=>413===e.statusCode?(se&&_e.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),a("send_error"),e):(se&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&_e.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Er(r,e),e),e=>{throw a("network_error"),se&&_e.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===Sr)return se&&_e.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}function Nr(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}var Rr=["forwarded","-ip","remote-","via","-user"];var Ar={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function Dr(e){const t=null!=e.dataCollection?Ar:!0===e.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Rr},httpHeaders:{request:{deny:Rr},response:{deny:Rr}},httpBodies:[],urlQueryParams:{deny:Rr},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7};const n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var Pr="Not capturing exception because it's already been captured.",$r="Discarded session because of missing or non-string release",Lr=/* @__PURE__ */Symbol.for("SentryInternalError"),jr=/* @__PURE__ */Symbol.for("SentryDoNotSendEventError");function Ur(e){return{message:e,[Lr]:!0}}function Or(e){return{message:e,[jr]:!0}}function Ir(e){return He(e)&&Lr in e}function Mr(e){return He(e)&&jr in e}function qr(e,t,n,r,o){let s,i=0,a=!1;e.on(n,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,t=>{if(i+=r(t),i>=8e5)o(e);else if(!a){const t=e.getOptions()._flushInterval??5e3;t>0&&(a=!0,s=ur(setTimeout(()=>{o(e)},t)))}}),e.on("flush",()=>{o(e)})}var Br=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Cr(e.transportOptions?.bufferSize??64),this._dataCollection=Dr(e),e.dsn?this._dsn=sn(e.dsn):se&&_e.warn("No DSN provided, client will not send events."),this._dsn){const t=lr(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs??!0,this._options.enableLogs&&qr(this,"afterCaptureLog","flushLogs",Wr,yr),(this._options.enableMetrics??this._options._experiments?.enableMetrics??1)&&qr(this,"afterCaptureMetric","flushMetrics",Yr,wr)}captureException(e,t,n){const r=gt();if(wt(e))return se&&_e.log(Pr),r;const o={event_id:r,...t};return this._process(()=>this.eventFromException(e,o).then(e=>this._captureEvent(e,o,n)).then(e=>e),"error"),o.event_id}captureMessage(e,t,n,r){const o={event_id:gt(),...n},s=Be(e)?e:String(e),i=Fe(e),a=i?this.eventFromMessage(s,t,o):this.eventFromException(e,o);return this._process(()=>a.then(e=>this._captureEvent(e,o,r)),i?"unknown":"error"),o.event_id}captureEvent(e,t,n){const r=gt();if(t?.originalException&&wt(t.originalException))return se&&_e.log(Pr),r;const o={event_id:r,...t},s=e.sdkProcessingMetadata||{},i=s.capturedSpanScope,a=s.capturedSpanIsolationScope,c=Fr(e.type);return this._process(()=>this._captureEvent(e,o,i||n,a),c),o.event_id}captureSession(e){this.sendSession(e),Et(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),fr(this,e,this._integrations),t||pr(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!1===t.getOptions().streamGenAiSpans||function(e){return"stream"===e.getOptions().traceLifecycle}(t))return;const n=[],r=[];for(const s of e.spans)s.op?.startsWith("gen_ai.")?n.push(kr(s)):r.push(s);if(0===n.length)return;e.spans=r;const o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...gr()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}(e,this);let r=On(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of t.attachments||[])r=Rn(r,$n(o));n&&(r=Rn(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=Sn}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(se&&_e.warn($r));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(se&&_e.warn($r));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const o=Un(n);return Nn({sent_at:new Date(rt()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:nn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;se&&_e.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||/* @__PURE__ */new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(t){return se&&_e.error("Error while sending envelope:",t),{}}return se&&_e.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&fr(e,t,n)}),n}(this,e),pr(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0,n=!1;for(const e of o)if(!1===e.mechanism?.handled){n=!0;break}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Et(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),s=this.getIntegrationNames();return!t.integrations&&s.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Zn(o,e,t,n,this,r).then(e=>(null===e||(this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...Vt(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:En(this,n),...e.sdkProcessingMetadata}),e))}_captureEvent(e,t={},n=Wt(),r=Jt()){return se&&zr(e)&&_e.log(`Captured error event \`${Nr(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{se&&(Mr(e)?_e.log(e.message):Ir(e)?_e.warn(e.message):_e.warn(e))})}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:s}=o,i=Hr(e),a=zr(e),c=`before send for type \`${e.type||"error"}\``,u=void 0===s?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(s),l=Fr(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",l),Or("An event processor returned `null`, will not send event.");return!0===t.data?.__sentry__?e:function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(We(e))return e.then(e=>{if(!ze(e)&&null!==e)throw Ur(n);return e},e=>{throw Ur(`${t} rejected with ${e}`)});if(!ze(e)&&null!==e)throw Ur(n);return e}(function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,ignoreSpans:i}=t,a=(c=t.beforeSendSpan,!(c&&"function"==typeof c&&"_streamed"in c&&c._streamed)&&t.beforeSendSpan);var c;let u=n;if(zr(u)&&o)return o(u,r);if(Hr(u)){if(a||i){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.["sentry.profile_id"],exclusive_time:i?.["sentry.exclusive_time"],measurements:e.measurements,is_segment:!0}}(u);if(i?.length&&vn({description:t.description,op:t.op,attributes:t.data},i))return null;if(a){const e=a(t);e?u=Tt(n,{type:"transaction",timestamp:(l=e).timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,data:{...l.data,...l.profile_id&&{"sentry.profile_id":l.profile_id},...l.exclusive_time&&{"sentry.exclusive_time":l.exclusive_time}}}},measurements:l.measurements}):gn()}if(u.spans){const t=[],n=u.spans;for(const e of n)if(i?.length&&vn({description:e.description,op:e.op,attributes:e.data},i))wn(n,e);else if(a){const n=a(e);n?t.push(n):(gn(),t.push(e))}else t.push(e);const r=u.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),u.spans=t}}if(s){if(u.spans){const e=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return s(u,r)}}var l;return u}(this,o,e,t),c)}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",l),i){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw Or(`${c} returned \`null\`, will not send event.`)}const d=n.getSession()||r.getSession();if(a&&d&&this._updateSessionFromEvent(d,o),a&&"number"==typeof u&&nt()>u)throw this.recordDroppedEvent("sample_rate","error"),Or(`Discarding event because it's not included in the random sample (sampling rate = ${s})`);if(i){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const h=o.transaction_info;if(i&&h&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...h,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(Mr(e)||Ir(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),Ur(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Sr&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){se&&_e.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(se&&_e.log("No outcomes to send"));if(!this._dsn)return void(se&&_e.log("No dsn provided, will not send outcomes"));se&&_e.log("Sending outcomes:",e);const t=(n=e,Nn((r=this._options.tunnel&&nn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||kt(),discarded_events:n}]]));var n,r,o;this.sendEnvelope(t)}};function Fr(e){return"replay_event"===e?"replay":e||"error"}function zr(e){return void 0===e.type}function Hr(e){return"transaction"===e.type}function Yr(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+Jr(e.attributes)}function Wr(e){let t=0;return e.message&&(t+=2*e.message.length),t+Jr(e.attributes)}function Jr(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Kr(e[0]):Fe(e)?t+=Kr(e):t+=100}),t}function Kr(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function Vr(e,t){!0===t.debug&&(se?_e.enable():pe(()=>{})),Wt().update(t.initialScope);const n=new e(t);return function(e){Wt().setClient(e)}(n),n.init(),n}function Xr(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Gr(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}var Qr=100;function Zr(e,t){const n=Kt(),r=Jt();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Qr}=n.getOptions();if(s<=0)return;const i={timestamp:kt(),...e},a=o?pe(()=>o(i,t)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}var eo=/* @__PURE__ */new WeakMap,to=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Qe(this);let r;try{eo.has(Kt())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){eo.set(e,!0)}}),no=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],ro=(e={})=>{let t;return{name:"EventFilters",setup(n){t=so(e,n.getOptions())},processEvent:(n,r,o)=>(t||(t=so(e,o.getOptions())),function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&mt(n,t)}(e,t.ignoreTransactions))return se&&_e.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${yt(e)}`),!0}else{if(function(e,t){return!!t?.length&&Nr(e).some(e=>mt(e,t))}(e,t.ignoreErrors))return se&&_e.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${yt(e)}`),!0;if(function(e){return!!e.exception?.values?.length&&(!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e))return se&&_e.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${yt(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=io(e);return!!n&&mt(n,t)}(e,t.denyUrls))return se&&_e.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${yt(e)}.\nUrl: ${io(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=io(e);return!n||mt(n,t)}(e,t.allowUrls))return se&&_e.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${yt(e)}.\nUrl: ${io(e)}`),!0}return!1}(n,t)?null:n)}},oo=(e={})=>({...ro(e),name:"InboundFilters"});function so(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:no],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function io(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch{return se&&_e.error(`Cannot extract url for event ${yt(e)}`),null}}function ao(e,t,n,r,o,s){if(!o.exception?.values||!s||!Ue(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=co(e,t,r,s.originalException,n,o.exception.values,i,0))}function co(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Ue(r[o])){lo(i,a,r);const s=e(t,r[o]),u=c.length;ho(s,o,u,a),c=co(e,t,n,r[o],o,[s,...c],s,u)}return uo(r)&&r.errors.forEach((s,u)=>{if(Ue(s)){lo(i,a,r);const l=e(t,s),d=c.length;ho(l,`errors[${u}]`,d,a),c=co(e,t,n,s,o,[l,...c],l,d)}}),c}function uo(e){return Array.isArray(e.errors)}function lo(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...uo(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ho(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function po(e){return function(e){return Ue(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var fo=/* @__PURE__ */new Set([]);var mo=/* @__PURE__ */new Set;function go(){"console"in ie&&de.forEach(function(e){!mo.has(e)&&e in ie.console&&(mo.add(e),Ve(ie.console,e,function(t){return he[e]=t,function(...t){const n=t[0],r=he[e],o=fo.size&&"string"==typeof n&&mt(n,fo);o||Re("console",{args:t,level:e}),(!o||se&&_e.isEnabled())&&r?.apply(ie.console,t)}}))})}function _o(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var yo=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){return!!t&&(!!function(e,t){const n=e.message,r=t.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!bo(e,t)&&!!vo(e,t))))}(e,t)||!!function(e,t){const n=wo(t),r=wo(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!bo(e,t)&&!!vo(e,t)))}(e,t))}(t,e))return se&&_e.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function vo(e,t){let n=Se(e),r=Se(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const e=r[o],t=n[o];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function bo(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function wo(e){return e.exception?.values?.[0]}var xo=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=Wt().getScopeData(),n=Jt().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:o}=hn(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!o?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}});function ko(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}var So=ie;function Co(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Eo(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in So))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(Co(So.fetch))return!0;let e=!1;const t=So.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Co(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){se&&_e.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function To(e,t){const n="fetch",r=Te(n,e);return Ne(n,()=>function(e,t=!1){if(t&&!Eo())return;Ve(ie,"fetch",function(t){return function(...n){const r=/* @__PURE__ */new Error,{method:o,url:s}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Ro(t),method:No(n,"method")?String(n.method).toUpperCase():Ke(t)&&No(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:Ro(t),method:No(t,"method")?String(t.method).toUpperCase():"GET"}}(n),i={args:n,fetchData:{method:o,url:s},startTimestamp:1e3*St(),virtualError:r,headers:Ao(n)};return e||Re("fetch",{...i}),t.apply(ie,n).then(async t=>(e?e(t):Re("fetch",{...i,endTimestamp:1e3*St(),response:t}),t),e=>{Re("fetch",{...i,endTimestamp:1e3*St(),error:e}),Ue(e)&&void 0===e.stack&&(e.stack=r.stack,Xe(e,"framesToPop",1));const t=Kt()?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==t&&Ue(e)&&"TypeError"===e.name&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const n=new URL(i.fetchData.url).host;"always"===t?e.message=`${e.message} (${n})`:Xe(e,"__sentry_fetch_url_host__",n)}catch{}throw e})}})}(void 0,t)),r}function No(e,t){return He(e)&&!!e[t]}function Ro(e){return"string"==typeof e?e:e?No(e,"url")?e.url:e.toString?e.toString():"":""}function Ao(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(Ke(t))return new Headers(t.headers)}catch{}}var Do=ie;function Po(){try{return Do.document.location.href}catch{return""}}var $o=ie,Lo=0;function jo(){return Lo>0}function Uo(e,t={}){if("function"!=typeof e)return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const t=e.__sentry_wrapped__;return"function"==typeof t?t:e}if(Qe(e))return e}catch{return e}const n=function(...n){ie._sentryWrappedDepth=(ie._sentryWrappedDepth||0)+1;try{const r=n.map(e=>Uo(e,t));return e.apply(this,r)}catch(r){throw Lo++,setTimeout(()=>{Lo--}),function(...e){const t=zt(ce());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(e=>{e.addEventProcessor(e=>(t.mechanism&&(vt(e,void 0,void 0),bt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),nr(r)}),r}finally{ie._sentryWrappedDepth=(ie._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Ge(n,e),Xe(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function Oo(){const e=Po(),{referrer:t}=$o.document||{},{userAgent:n}=$o.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function Io(e,t){const n=Bo(e,t),r={type:Ho(t),value:Yo(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Mo(e,t,n,r){const o=Kt()?.getOptions().normalizeDepth,s=(i=t,Object.values(i).find(Ue));var i;const a={__serialized__:ut(t,o)};if(s)return{exception:{values:[Io(e,s)]},extra:a};const c={exception:{values:[{type:Ye(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ko(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=Bo(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function qo(e,t){return{exception:{values:[Io(e,t)]}}}function Bo(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&Fo.test(e.message)?1:0}(t),o=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(n,r,o)}catch{}return[]}var Fo=/Minified React error #\d+;/i;function zo(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function Ho(e){const t=e?.name;return!t&&zo(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Yo(e){const t=e?.message;return zo(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?po(t.error):po(e):"No error message"}function Wo(e,t,n,r,o){let s;if(Ie(t)&&t.error)return qo(e,t.error);if(Me(t)||Oe(t,"DOMException")){const o=t;if("stack"in t){s=qo(e,t);const o=s.exception?.values?.[0];if(r&&n&&o&&!o.stacktrace){const t=Bo(e,n);t.length&&(o.stacktrace={frames:t},bt(s,{synthetic:!0}))}}else{const t=o.name||(Me(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Jo(e,i,n,r),vt(s,i)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return Ue(t)?qo(e,t):ze(t)||Ye(t)?(s=Mo(e,t,n,o),bt(s,{synthetic:!0}),s):(s=Jo(e,t,n,r),vt(s,`${t}`,void 0),bt(s,{synthetic:!0}),s)}function Jo(e,t,n,r){const o={};if(r&&n){const r=Bo(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),bt(o,{synthetic:!0})}if(Be(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function Ko(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(Ze(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return Ie(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ye(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}var Vo=class extends Br{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:$o.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n;!function(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:ae})),o.version=ae)}(t,"browser",["browser"],$o.SENTRY_SDK_SOURCE||"npm"),super(t);const{userInfo:r}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:r?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:o}=this._options;$o.document&&$o.document.addEventListener("visibilitychange",()=>{"hidden"===$o.document.visibilityState&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",Gr)}eventFromException(e,t){return function(e,t,n,r){const o=Wo(e,t,n?.syntheticException||void 0,r);return bt(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Hn(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const s=Jo(e,t,r?.syntheticException||void 0,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Hn(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}};var Xo="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Go=ie;function Qo(e,t,n){Go.document&&Go.addEventListener(e,t,n)}function Zo(e,t,n){Go.document&&Go.removeEventListener(e,t,n)}var es={};try{"undefined"!=typeof Node&&(es.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(es.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,es.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,es.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,es.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(es.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function ts(e,t,n){const r=es[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return"function"==typeof o?o.call(e,n):o}function ns(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=3;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<r&&(u=rs(n,l),!("html"===u||s>1&&i+o.length*c+u.length>=d));)o.push(u),i+=u.length,n=ts(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function rs(e,t){const n=[],r=ts(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=ts(e,"dataset");if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());const o=t?.length?t.filter(t=>ts(e,"getAttribute",t)).map(t=>[t,ts(e,"getAttribute",t)]):null;if(o?.length)o.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=ts(e,"id");t&&n.push(`#${t}`);const r=ts(e,"className");if(r&&qe(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const s of["aria-label","type","name","title","alt"]){const t=ts(e,"getAttribute",s);t&&n.push(`[${s}="${t}"]`)}return n.join("")}var os,ss,is,as;function cs(){if(!Go.document)return;const e=Re.bind(null,"dom"),t=us(e,!0);Go.document.addEventListener("click",t,!1),Go.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Go[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Ve(n,"addEventListener",function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=us(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch{}return t.call(this,n,r,o)}}),Ve(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function us(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;Xe(n,"_sentryCaptured",!0),r&&!r._sentryId&&Xe(r,"_sentryId",gt());const o="keypress"===n.type?"input":n.type;(function(e){if(e.type!==ss)return!1;try{if(!e.target||e.target._sentryId!==is)return!1}catch{}return!0})(n)||(e({event:n,name:o,global:t}),ss=n.type,is=r?r._sentryId:void 0),clearTimeout(os),os=Go.setTimeout(()=>{is=void 0,ss=void 0},1e3)}}function ls(e){const t="history";Te(t,e),Ne(t,ds)}function ds(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=as,o=function(e){try{return new URL(e,Go.location.origin).toString()}catch{return e}}(String(n));if(as=o,r===o)return e.apply(this,t);Re("history",{from:r,to:o})}return e.apply(this,t)}}Go.addEventListener("popstate",()=>{const e=Go.location.href,t=as;as=e,t!==e&&Re("history",{from:t,to:e})}),"history"in So&&So.history&&(Ve(Go.history,"pushState",e),Ve(Go.history,"replaceState",e))}var hs={};var ps="__sentry_xhr_v3__";function fs(){if(!Go.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=/* @__PURE__ */new Error,o=1e3*St(),s=qe(n[0])?n[0].toUpperCase():void 0,i=function(e){if(qe(e))return e;try{return e.toString()}catch{}}(n[1]);if(!s||!i)return e.apply(t,n);t[ps]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[ps];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}Re("xhr",{endTimestamp:1e3*St(),startTimestamp:o,xhr:t,virtualError:r}),t.removeEventListener("readystatechange",a)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,s=t[ps];return s&&qe(r)&&qe(o)&&(s.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[ps];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return Re("xhr",{startTimestamp:1e3*St(),xhr:t}),e.apply(t,n)}})}function ms(e,t=function(e){const t=hs[e];if(t)return t;let n=Go[e];if(Co(n))return hs[e]=n.bind(Go);const r=Go.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(Zu){Xo&&_e.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,Zu)}return n?hs[e]=n.bind(Go):n}("fetch")){let n=0,r=0;return Tr(e,async function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,i);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(Zu){throw hs["fetch"]=void 0,Zu}finally{n-=s,r--}},Cr(e.bufferSize||40))}var gs="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function _s(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}var ys=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,vs=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,bs=/\((\S*)(?::(\d+))(?::(\d+))\)/,ws=/at (.+?) ?\(data:(.+?),/,xs=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ks=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ss=be(...[[30,e=>{const t=e.match(ws);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=ys.exec(e);if(n){const[,e,t,r]=n;return _s(e,"?",+t,+r)}const r=vs.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=bs.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Cs(r[1]||"?",r[2]);return _s(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=xs.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ks.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||"?";return[n,e]=Cs(n,e),_s(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Cs=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Es=1024,Ts=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console",n=Te(t,e);Ne(t,go)}(function(e){return function(t){if(Kt()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:_o(t.level),message:pt(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${pt(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Zr(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(Kt()!==e)return;let r,o,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>Es&&(gs&&_e.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=Es),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ns(t,{keyAttrs:s,maxStringLength:i}),o=function(e,t=5){if(!Do.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),Zr(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),Te("dom",n),Ne("dom",cs)),t.xhr&&function(e){Te("xhr",e),Ne("xhr",fs)}(function(e){return function(t){if(Kt()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[ps];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,u={method:s,url:i,status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:ko(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),Zr(d,l)}}(e)),t.fetch&&To(function(e){return function(t){if(Kt()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),Zr(s,o)}else{const o=t.response,s={...t.fetchData,status_code:o?.status},i={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:ko(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,i),Zr(a,i)}}}(e)),t.history&&ls(function(e){return function(t){if(Kt()!==e)return;let n=t.from,r=t.to;const o=Xr($o.location.href);let s=n?Xr(n):void 0;const i=Xr(r);s?.path||(s=o),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),Zr({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Kt()===e&&Zr({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:yt(t)},{event:t})}}(e))}}};var Ns="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),Rs=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&Ve($o,"setTimeout",As),t.setInterval&&Ve($o,"setInterval",As),t.requestAnimationFrame&&Ve($o,"requestAnimationFrame",Ds),t.XMLHttpRequest&&"XMLHttpRequest"in $o&&Ve(XMLHttpRequest.prototype,"send",Ps);const e=t.eventTarget;e&&(Array.isArray(e)?e:Ns).forEach(e=>function(e,t){const n=$o[e]?.prototype;if(!n?.hasOwnProperty?.("addEventListener"))return;Ve(n,"addEventListener",function(n){return function(r,o,s){try{"function"==typeof o.handleEvent&&(o.handleEvent=Uo(o.handleEvent,{mechanism:{data:{handler:ke(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,o),n.apply(this,[r,Uo(o,{mechanism:{data:{handler:ke(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),s])}}),Ve(n,"removeEventListener",function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}}catch{}return e.call(this,t,n,r)}})}(e,t))}}};function As(e){return function(...t){const n=t[0];return t[0]=Uo(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ke(e)}`}}),e.apply(this,t)}}function Ds(e){return function(t){return e.apply(this,[Uo(t,{mechanism:{data:{handler:ke(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Ps(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Ve(n,e,function(t){const n={mechanism:{data:{handler:ke(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Qe(t);return r&&(n.mechanism.data.handler=ke(r)),Uo(t,n)})}),e.apply(this,t)}}var $s=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===$o.document)return void(gs&&_e.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));sr({ignoreDuration:!0});let e=!1;(e=>{const t=Go.requestIdleCallback||Go.setTimeout;"hidden"===Go.document?.visibilityState?e():(Qo("visibilitychange",e=(e=>{let t=!1;return()=>{t||(e(),t=!0)}})(e),{once:!0,capture:!0}),Qo("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Zo("visibilitychange",e,{capture:!0}),Zo("pagehide",e,{capture:!0})}))})(()=>{e||(cr(),e=!0)});const n=Jt();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&cr())}),"route"===t&&ls(({from:t,to:n})=>{t!==n&&(sr({ignoreDuration:!0}),cr(),e=!0)})}}},Ls=()=>({name:"CultureContext",preprocessEvent(e){const t=js();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=js();t&&zn(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function js(){try{const e=$o.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Us=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){!function(e){const t="error";Te(t,e),Ne(t,De)}(t=>{const{stackParser:n,attachStacktrace:r}=Is();if(Kt()!==e||jo())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=function(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];0===c.length&&c.push({colno:r,lineno:n,filename:Ms(t)??Po(),function:"?",in_app:!0});return e}(Wo(n,c||o,void 0,r,!1),s,i,a);u.level="error",rr(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Os("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";Te(t,e),Ne(t,$e)}(t=>{const{stackParser:n,attachStacktrace:r}=Is();if(Kt()!==e||jo())return;const o=function(e){if(Fe(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),s=Fe(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:Wo(n,o,void 0,r,!0);s.level="error",rr(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Os("onunhandledrejection"))}}};function Os(e){gs&&_e.log(`Global Handler attached: ${e}`)}function Is(){return Kt()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Ms(e){if(qe(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&-1!==s){const t=e.slice(s+1);i=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}(e,!1)}>`:e}var qs=()=>({name:"HttpContext",preprocessEvent(e){if(!$o.navigator&&!$o.location&&!$o.document)return;const t=Oo(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){const t=e.attributes?.[Xt];if(!$o.navigator&&!$o.location&&!$o.document)return;const n=Oo();zn(e,{[Fn]:"http.client"!==t?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),Bs=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){ao(Io,o.getOptions().stackParser,n,t,e,r)}}},Fs=/^HTML(\w*)Element$/;function zs(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(e);if(Fs.test(t))return`[HTMLElement: ${ns(e)}]`}}function Hs(){return!!function(){if(void 0===$o.window)return!1;const e=$o;if(e.nw)return!1;if(!(e.chrome||e.browser)?.runtime?.id)return!1;const t=Po();return!($o===$o.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}()&&(gs&&pe(()=>{}),!0)}function Ys(e={}){const t=!e.skipBrowserExtensionCheck&&Hs();let n=null==e.defaultIntegrations?[oo(),to(),xo(),Rs(),Ts(),Us(),Bs(),yo(),qs(),Ls(),$s()]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(o=e.stackParser||Ss,Array.isArray(o)?be(...o):o),integrations:hr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||ms};var o;return ot=zs,Vr(Vo,r)}function Ws(e){const t="undefined"!=typeof window?window.location.href:void 0;or("portal_code",e.portalCode),or("object_code",e.objectCode??""),or("locale",e.locale??""),function(e,t){Jt().setContext(e,t)}("bukazu",{portal_code:e.portalCode,object_code:e.objectCode??null,locale:e.locale??null,url:t??null})}function Js(e){nr(e)}function Ks(e){!function(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;Wt().captureMessage(e,n,r)}(e,"error")}var Vs=/* @__PURE__ */new WeakSet;function Xs(e){return function(e){return"messages"in e&&Array.isArray(e.messages)&&e.messages.every(e=>"string"==typeof e)}(e)?e.messages:[e.message]}function Gs(e){const t=Xs(e.errors);return"object"!=typeof e.errors||null===e.errors||Vs.has(e.errors)||(Vs.add(e.errors),Js(new Error(t.join("\n")))),/* @__PURE__ */h("div",{className:"bukazu-error-message",children:[/* @__PURE__ */d("h2",{children:Q("something_went_wrong_please_try_again")}),/* @__PURE__ */d("ul",{children:t.map(e=>/* @__PURE__ */d("li",{children:e},e))})]})}var Qs=["en","nl","de","fr","es","it"];function Zs(e){if(!e)return"en";const t=e.split(/[-_]/)[0].toLowerCase();return function(e){return Qs.includes(e)}(t)?t:"en"}var ei=e=>"[object Object]"===Object.prototype.toString.call(e),ti=n({locale:"nl",portalCode:"",objectCode:"",apiUrl:"https://api.bukazu.com"}),ni="bukazuCurrency";function ri(e){const t="string"==typeof e?.default&&""!==e.default?e.default:"EUR",n=Array.isArray(e?.allowed)?e.allowed.filter(e=>"string"==typeof e&&""!==e):[];return{multi_currency:e?.multi_currency??!1,default:t,allowed:[.../* @__PURE__ */new Set([...n,t])]}}var oi=n({currency:void 0,setCurrency:()=>{},allowed:[],multiCurrency:!1});function si({currencies:e,children:t}){const n=i(()=>ri(e),[e]),[o,s]=u(()=>{const e=function(){try{return window.localStorage.getItem(ni)}catch{return null}}();return e&&n.allowed.includes(e)?e:n.default}),a=r(e=>{n.allowed.includes(e)&&(!function(e){try{window.localStorage.setItem(ni,e)}catch{}}(e),s(e))},[n]),c=n.multi_currency&&n.allowed.length>1,l=i(()=>({currency:c?o:void 0,setCurrency:a,allowed:n.allowed,multiCurrency:c}),[c,n.allowed,o,a]);/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */d("li",{className:n===o-1?"disabled":"",children:/* @__PURE__ */d("button",{disabled:n===o-1,onClick:()=>e(n+1),"aria-label":Q("next"),children:">"})})]})]})}var se="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ie=globalThis,ae="10.72.0";function ce(){return ue(ie),ie}function ue(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||"10.72.0",t[ae]=t["10.72.0"]||{}}function le(e,t,n=ie){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[ae]=r["10.72.0"]||{};return o[e]||(o[e]=t())}var de=["debug","info","warn","error","log","assert","trace"],he={};function pe(e){if(!("console"in ie))return e();const t=ie.console,n={},r=Object.keys(he);r.forEach(e=>{const r=he[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function fe(){return ge().enabled}function me(e,...t){se&&fe()&&pe(()=>{ie.console[e](`Sentry Logger [${e}]:`,...t)})}function ge(){return se?le("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var _e={enable:function(){ge().enabled=!0},disable:function(){ge().enabled=!1},isEnabled:fe,log:function(...e){me("log",...e)},warn:function(...e){me("warn",...e)},error:function(...e){me("error",...e)}},ye=/\(error: (.*)\)/,ve=/captureMessage|captureException/;function be(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],s=e.split("\n");for(let i=n;i<s.length;i++){let e=s[i];e.length>1024&&(e=e.slice(0,1024));const n=ye.test(e)?e.replace(ye,"$1"):e;if(!n.includes("Error: ")){for(const e of t){const t=e(n);if(t){o.push(t);break}}if(o.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(we(t).function||"")&&t.pop();t.reverse(),ve.test(we(t).function||"")&&(t.pop(),ve.test(we(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||we(t).filename,function:e.function||"?"}))}(o.slice(r))}}function we(e){return e[e.length-1]||{}}var xe="<anonymous>";function ke(e){try{return e&&"function"==typeof e&&e.name||xe}catch{return xe}}function Se(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var Ce={},Ee={};function Te(e,t){return Ce[e]=Ce[e]||[],Ce[e].push(t),()=>{const n=Ce[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function Ne(e,t){if(!Ee[e]){Ee[e]=!0;try{t()}catch(el){se&&_e.error(`Error while instrumenting ${e}`,el)}}}function Re(e,t){const n=e&&Ce[e];if(n)for(const r of n)try{r(t)}catch(el){se&&_e.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ke(r)}\nError:`,el)}}var Ae=null;function De(){Ae=ie.onerror,ie.onerror=function(e,t,n,r,o){return Re("error",{column:r,error:o,line:n,msg:e,url:t}),!!Ae&&Ae.apply(this,arguments)},ie.onerror.__SENTRY_INSTRUMENTED__=!0}var Pe=null;function $e(){Pe=ie.onunhandledrejection,ie.onunhandledrejection=function(e){return Re("unhandledrejection",e),!Pe||Pe.apply(this,arguments)},ie.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var Le,je=Object.prototype.toString;function Ue(e){switch(je.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Je(e,Error)}}function Oe(e,t){return je.call(e)===`[object ${t}]`}function Ie(e){return Oe(e,"ErrorEvent")}function Me(e){return Oe(e,"DOMError")}function qe(e){return Oe(e,"String")}function Be(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Fe(e){return null===e||Be(e)||"object"!=typeof e&&"function"!=typeof e}function ze(e){return Oe(e,"Object")}function He(e){return"object"==typeof e&&null!==e}function Ye(e){return"undefined"!=typeof Event&&Je(e,Event)}function We(e){return Boolean(e?.then&&"function"==typeof e.then)}function Je(e,t){try{return e instanceof t}catch{return!1}}function Ke(e){return"undefined"!=typeof Request&&Je(e,Request)}function Ve(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const o=n(r);"function"==typeof o&&Ge(o,r);try{e[t]=o}catch{se&&_e.log(`Failed to replace method "${t}" in object`,e)}}function Xe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{se&&_e.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Ge(e,t){try{e.prototype=t.prototype=t.prototype||{},Xe(e,"__sentry_original__",t)}catch{}}function Qe(e){return e.__sentry_original__}function Ze(e){if(Ue(e))return{message:e.message,name:e.name,stack:e.stack,...et(e)};if(Ye(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...et(e)}}return e}function et(e){return He(e)?Object.fromEntries(Object.entries(e)):{}}function tt(e){if(void 0!==Le)return Le?Le(e):e();const t=/* @__PURE__ */Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=ie;return t in n&&"function"==typeof n[t]?(Le=n[t])(e):(Le=null,e())}function nt(){return tt(()=>Math.random())}function rt(){return tt(()=>Date.now())}var ot,st,it=/* @__PURE__ */Symbol.for("sentry.skipNormalization"),at=/* @__PURE__ */Symbol.for("sentry.overrideNormalizationDepth");function ct(e,t=100,n=1/0){try{return lt("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function ut(e,t=3,n=102400){const r=ct(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?ut(e,t-1,n):r;var o}function lt(e,t,n=1/0,r=1/0,o=function(){const e=/* @__PURE__ */new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=dt(e,t);if(!a.startsWith("[object "))return a;if(function(e){return Boolean(e[it])}(t))return t;const c=function(e){const t=e[at];return"number"==typeof t?t:void 0}(t),u=void 0!==c?c:n;if(0===u)return a.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return lt("",l.toJSON(),u-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let h=0;const p=Ze(t);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(h>=r){d[f]="[MaxProperties ~]";break}const e=p[f];d[f]=lt(f,e,u-1,r,o),h++}return i(t),d}function dt(e,t){try{if(ot){const e=ot(t);if(e)return e}return"undefined"!=typeof global&&t===global?"[Global]":"number"!=typeof t||Number.isFinite(t)?"function"==typeof t?`[Function: ${ke(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:`[object ${function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t)}]`:`[${t}]`}catch(n){return`**non-serializable** (${n})`}}function ht(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function pt(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];Fe(t)?n.push(String(t)):t instanceof Error?n.push(t.message?`${t.name}: ${t.message}`:t.name):n.push(dt(0,t))}return n.join(t)}function ft(e,t,n=!1){return!!qe(e)&&(Oe(t,"RegExp")?t.test(e):qe(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function mt(e,t=[],n=!1){for(const r of t)if(ft(e,r,n))return!0;return!1}function gt(e=function(){const e=ie;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return tt(()=>e.randomUUID()).replace(/-/g,"")}catch{}return st||(st="10000000100040008000100000000000"),st.replace(/[018]/g,e=>(e^(16*nt()&15)>>e/4).toString(16))}function _t(e){return e.exception?.values?.[0]}function yt(e){const{message:t,event_id:n}=e;if(t)return t;const r=_t(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function vt(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function bt(e,t){const n=_t(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function wt(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{Xe(e,"__sentry_captured__",!0)}catch{}return!1}var xt;function kt(){return rt()/1e3}function St(){return(xt??(xt=function(){const{performance:e}=ie;if(!e?.now||!e.timeOrigin)return kt;const t=e.timeOrigin;return()=>(t+tt(()=>e.now()))/1e3}()))()}function Ct(e){const t=St(),n={sid:gt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:/* @__PURE__ */new Date(1e3*e.started).toISOString(),timestamp:/* @__PURE__ */new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}(n)};return e&&Et(n,e),n}function Et(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||St(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:gt()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Tt(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=Tt(r[o],t[o],n-1));return r}function Nt(){return gt()}function Rt(){return gt().substring(16)}function At(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}var Dt="_sentrySpan";function Pt(e,t){t?Xe(e,Dt,function(e){try{const t=ie.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(t)):delete e[Dt]}function $t(e){return At(e[Dt])}var Lt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Nt(),sampleRand:nt()}}clone(){const t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Pt(t,$t(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Et(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},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,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,{tags:r,attributes:o,extra:s,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:l,conversationId:d}=(n instanceof e?n.getScopeData():ze(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),l&&(this._propagationContext=l),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Pt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Nt(),sampleRand:nt()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:kt(),...e,message:e.message?ht(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:$t(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Tt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||gt();if(!this._client)return se&&_e.warn("No client configured on scope - will not capture exception!"),n;const r=/* @__PURE__ */new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n?.event_id||gt();if(!this._client)return se&&_e.warn("No client configured on scope - will not capture message!"),r;const o=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=e.event_id||t?.event_id||gt();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(se&&_e.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}};var jt=e=>e instanceof Promise&&!e[Ut],Ut=/* @__PURE__ */Symbol("chained PromiseLike"),Ot=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const o=e[r];"function"==typeof o?Object.defineProperty(t,r,{value:(...t)=>o.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=o}return n&&Object.assign(t,{[Ut]:!0}),t},It=class{constructor(e,t){let n,r;n=e||new Lt,r=t||new Lt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(el){throw this._popScope(),el}return We(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return jt(r)&&jt(e)?r:Ot(e,r)})(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function Mt(){const e=ue(ce());return e.stack=e.stack||new It(le("defaultCurrentScope",()=>new Lt),le("defaultIsolationScope",()=>new Lt))}function qt(e){return Mt().withScope(e)}function Bt(e,t){const n=Mt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ft(e){return Mt().withScope(()=>e(Mt().getIsolationScope()))}function zt(e){const t=ue(e);return t.acs?t.acs:{withIsolationScope:Ft,withScope:qt,withSetScope:Bt,withSetIsolationScope:(e,t)=>Ft(t),getCurrentScope:()=>Mt().getScope(),getIsolationScope:()=>Mt().getIsolationScope()}}function Ht(e,t){const{value:n,unit:r}="object"==typeof(o=e)&&null!=o&&!Array.isArray(o)&&Object.keys(o).includes("value")?e:{value:e,unit:void 0};var o;const s=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),i=r&&"string"==typeof r?{unit:r}:{};if(s)return{...s,...i};if(!t||"skip-undefined"===t&&void 0===n)return;let a="";try{a=JSON.stringify(n)??""}catch{}return{value:a,type:"string",...i}}function Yt(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const e=Ht(o,t);e&&(n[r]=e)}return n}function Wt(){return zt(ce()).getCurrentScope()}function Jt(){return zt(ce()).getIsolationScope()}function Kt(){return Wt().getClient()}function Vt(e){const t=void 0;const{traceId:n,parentSpanId:r,propagationSpanId:o}=e.getPropagationContext(),s={trace_id:n,span_id:o||Rt()};return r&&(s.parent_span_id=r),s}var Xt="sentry.op";function Gt(e){const t=e;return{scope:t._sentryScope,isolationScope:At(t._sentryIsolationScope)}}function Qt(e){const t=function(e){if(!e||!qe(e)&&!Array.isArray(e))return;return Array.isArray(e)?e.reduce((e,t)=>{const n=Zt(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Zt(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith("sentry-")){e[t.slice(7)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function Zt(e){return e.split(",").map(e=>{const t=e.indexOf("=");return-1===t?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var en=/^o(\d+)\./,tn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function nn(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}function rn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function on(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){return e.match(en)?.[1]}(n)),r}function sn(e){const t="string"==typeof e?function(e){const t=tn.exec(e);if(!t)return void pe(()=>{});const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return rn({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}(e):rn(e);if(t&&function(e){if(!se)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(_e.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(_e.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(_e.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(_e.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}var an=!1;function cn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:hn(e).parent_span_id,s=Gt(e).scope;return{parent_span_id:o,span_id:r?s?.getPropagationContext().propagationSpanId||Rt():t,trace_id:n}}function un(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:o})=>({span_id:e,trace_id:t,sampled:1===n,attributes:o,...r})):void 0}function ln(e){return"number"==typeof e?dn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?dn(e.getTime()):St()}function dn(e){return e>9999999999?e/1e3:e}function hn(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:pn(e),start_timestamp:ln(o),timestamp:ln(i)||void 0,status:fn(a),op:r[Xt],origin:r["sentry.origin"],links:un(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function pn(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function fn(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}var mn=function(e){return e._sentryRootSpan||e};function gn(){an||(pe(()=>{}),an=!0)}function _n(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||Kt()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function yn(e){_e.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function vn(e,t){if(!t?.length)return!1;for(const n of t){if(xn(n)){if(e.description&&ft(e.description,n))return se&&yn(e),!0;continue}const t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;const r=!n.name||e.description&&ft(e.description,n.name),o=!n.op||e.op&&ft(e.op,n.op),s=!n.attributes||Object.entries(n.attributes).every(([t,n])=>bn(e.attributes?.[t],n));if(r&&o&&s)return se&&yn(e),!0}return!1}function bn(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?ft(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function wn(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function xn(e){return"string"==typeof e||e instanceof RegExp}var kn=/* @__PURE__ */Symbol.for("sentry.nonRecordingSpan");var Sn="production";function Cn(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||"production",release:n.release,public_key:r,trace_id:e,org_id:on(t)};return t.emit("createDsc",o),o}function En(e,t){const n=t.getPropagationContext();return n.dsc||Cn(n.traceId,e)}function Tn(e){const t=Kt();if(!t)return{};const n=mn(e),r=hn(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o["sentry.sample_rate"]??o["sentry.previous_trace_sample_rate"];function a(e){return"number"!=typeof i&&"string"!=typeof i||(e.sample_rate=`${i}`),e}const c=n._frozenDsc;if(c)return a(c);const u=function(e){return!!e&&!0===e[kn]}(n),l=u&&"ignored"===n.dropReason;if(u&&(!_n(t.getOptions())||l)){const e=Gt(n).scope;if(e){const n={...En(t,e)};return l&&(n.sampled="false"),a(n)}}const d=s?.get("sentry.dsc"),h=d&&Qt(d);if(h)return a(h);const p=Cn(e.spanContext().traceId,t),f=o["sentry.source"]??o["sentry.segment.name.source"],m=r.description;return"url"!==f&&m&&(p.transaction=m),_n()&&(p.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=s?.get("sentry.sample_rand")??Gt(n).scope?.getPropagationContext().sampleRand.toString()),a(p),t.emit("createDsc",p,n),p}function Nn(e,t=[]){return[e,t]}function Rn(e,t){const[n,r]=e;return[n,[...r,t]]}function An(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function Dn(e){const t=ue(ie);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Pn(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[Dn(r),e]:r.push("string"==typeof e?Dn(e):e)}for(const s of n){const[e,t]=s;if(o(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)o(t);else{let e;try{e=JSON.stringify(t)}catch{e=JSON.stringify(ct(t))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}(r)}function $n(e){const t="string"==typeof e.data?Dn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Ln={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function jn(e){return function(e){return e in Ln}(e)?Ln[e]:e}function Un(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function On(e,t,n,r){const o=Un(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const i=function(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(rt()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:nn(r)},...o&&{trace:o}}}(e,o,r,t);return delete e.sdkProcessingMetadata,Nn(i,[[{type:s},e]])}function In(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(o).length&&(e.user={...o,...e.user});Object.keys(s).length&&(e.contexts={...s,...e.contexts});i&&(e.level=i);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:cn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Tn(t),...e.sdkProcessingMetadata};const n=mn(t),r=hn(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}function Mn(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:d,attachments:h,propagationContext:p,transactionName:f,span:m}=t;qn(e,"extra",n),qn(e,"tags",r),qn(e,"attributes",o),qn(e,"user",s),qn(e,"contexts",i),e.sdkProcessingMetadata=Tt(e.sdkProcessingMetadata,c,2),a&&(e.level=a),f&&(e.transactionName=f),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),h.length&&(e.attachments=[...e.attachments,...h]),e.propagationContext={...e.propagationContext,...p}}function qn(e,t,n){e[t]=Tt(e[t],n,1)}function Bn(e,t){const n=le("globalScope",()=>new Lt).getScopeData();return e&&Mn(n,e.getScopeData()),t&&Mn(n,t.getScopeData()),n}var Fn="url.full";function zn(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function Hn(e){return new Xn(t=>{t(e)})}function Yn(e){return new Xn((t,n)=>{n(e)})}var Wn,Jn,Kn,Vn,Xn=class e{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(el){r(el)}else e(n)},t=>{if(n)try{e(n(t))}catch(el){r(el)}else r(t)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,o;return this.then(e=>{o=!1,r=e,t&&t()},e=>{o=!0,r=e,t&&t()}).then(()=>{o?n(r):e(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(We(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(el){r(el)}}};function Gn(e,t,n,r=0){try{const o=Qn(t,n,e,r);return We(o)?o:Hn(o)}catch(o){return Yn(o)}}function Qn(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return se&&null===s&&_e.log(`Event processor "${o.id||"?"}" dropped event`),We(s)?s.then(e=>Qn(e,t,n,r+1)):Qn(s,t,n,r+1)}function Zn(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||gt(),timestamp:t.timestamp||kt()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||"production",!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=ht(i.url,s));s&&e.exception?.values?.forEach(e=>{e.value&&(e.value=ht(e.value,s))})}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=ie._sentryDebugIds,n=ie._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Vn&&r.length===Jn&&o.length===Kn)return Vn;Jn=r.length,Kn=o.length,Vn={},Wn||(Wn={});const s=(t,n)=>{for(const r of t){const t=n[r],o=Wn?.[r];if(o&&Vn&&t)Vn[o[0]]=t,Wn&&(Wn[r]=[o[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const o=n[e]?.filename;if(o&&Vn&&Wn){Vn[o]=t,Wn[r]=[o,t];break}}}}};return t&&s(r,t),n&&s(o,n),Vn}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(c,e.stackParser);const l=function(e,t){if(!t)return e;const n=e?e.clone():new Lt;return n.update(t),n}(r,n.captureContext);n.mechanism&&bt(c,n.mechanism);const d=o?o.getEventProcessors():[],h=Bn(s,l),p=[...n.attachments||[],...h.attachments];p.length&&(n.attachments=p),In(c,h);const f=[...d,...h.eventProcessors];return(n.data&&!0===n.data.__sentry__?Hn(c):Gn(f,c,n)).then(e=>(e&&function(e){const t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:ct(e.data,t,n)}}))},...e.user&&{user:ct(e.user,t,n)},...e.contexts&&{contexts:ct(e.contexts,t,n)},...e.extra&&{extra:ct(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ct(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:ct(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=ct(e.contexts.flags,3,n));return r}(e,i,a):e))}function er(e){if(e)return function(e){return e instanceof Lt||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>tr.includes(e))}(e)?{captureContext:e}:e}var tr=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function nr(e,t){return Wt().captureException(e,er(t))}function rr(e,t){return Wt().captureEvent(e,t)}function or(e,t){Jt().setTag(e,t)}function sr(e){const t=Jt(),{user:n}=Bn(t,Wt()),{userAgent:r}=ie.navigator||{},o=Ct({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return"ok"===s?.status&&Et(s,{status:"exited"}),ir(),t.setSession(o),o}function ir(){const e=Jt(),t=Wt().getSession()||e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),Et(e,n)}(t),ar(),e.setSession()}function ar(){const e=Jt(),t=Kt(),n=e.getSession();n&&t&&t.captureSession(n)}function cr(e=!1){e?ir():ar()}function ur(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function lr(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}var dr=[];function hr(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function pr(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function fr(e,t,n){if(n[t.name])se&&_e.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,dr.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),dr.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}["processSpan","processSegmentSpan"].forEach(n=>{const r=t[n];"function"==typeof r&&e.on(n,n=>r.call(t,n,e))}),se&&_e.log(`Integration installed: ${t.name}`)}}function mr(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function gr(){return"undefined"!=typeof window&&(!mr()||"renderer"===ie.process?.type)}function _r(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...gr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function yr(e,t){const n=t??function(e){return vr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=nn(r)),Nn(s,[_r(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);vr().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function vr(){return le("clientToLogBufferMap",()=>/* @__PURE__ */new WeakMap)}function br(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...gr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function wr(e,t){const n=t??function(e){return xr().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=nn(r)),Nn(s,[br(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);xr().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function xr(){return le("clientToMetricBufferMap",()=>/* @__PURE__ */new WeakMap)}function kr(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links};return n=t,{...n,attributes:Yt(n.attributes),links:n.links?.map(e=>({...e,attributes:Yt(e.attributes)}))};var n}var Sr=/* @__PURE__ */Symbol.for("SentryBufferFullError");function Cr(e=100){const t=/* @__PURE__ */new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.size<e))return Yn(Sr);const o=r();return t.add(o),o.then(()=>n(o),()=>n(o)),o},drain:function(e){if(!t.size)return Hn(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>ur(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function Er(e,{statusCode:t,headers:n},r=rt()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[e,t,,,n]=a.split(":",5),s=parseInt(e,10),i=1e3*(isNaN(s)?60:s);if(t)for(const a of t.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(o[a]=r+i);else o.all=r+i}else i?o.all=r+function(e,t=rt()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(i,r):429===t&&(o.all=r+6e4);return o}function Tr(e,t,n=Cr(e.bufferSize||64)){let r={};return{send:function(o){const s=[];if(An(o,(t,n)=>{const o=jn(n);!function(e,t,n=rt()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,o)?s.push(t):e.recordDroppedEvent("ratelimit_backoff",o)}),0===s.length)return Promise.resolve({});const i=Nn(o[0],s),a=t=>{!function(e,t){return An(e,(e,n)=>t.includes(n))}(i,["client_report"])?An(i,(n,r)=>{e.recordDroppedEvent(t,jn(r))}):se&&_e.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>t({body:Pn(i)}).then(e=>413===e.statusCode?(se&&_e.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),a("send_error"),e):(se&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&_e.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Er(r,e),e),e=>{throw a("network_error"),se&&_e.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===Sr)return se&&_e.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}function Nr(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}var Rr=["forwarded","-ip","remote-","via","-user"];var Ar={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function Dr(e){const t=null!=e.dataCollection?Ar:!0===e.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Rr},httpHeaders:{request:{deny:Rr},response:{deny:Rr}},httpBodies:[],urlQueryParams:{deny:Rr},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7};const n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var Pr="Not capturing exception because it's already been captured.",$r="Discarded session because of missing or non-string release",Lr=/* @__PURE__ */Symbol.for("SentryInternalError"),jr=/* @__PURE__ */Symbol.for("SentryDoNotSendEventError");function Ur(e){return{message:e,[Lr]:!0}}function Or(e){return{message:e,[jr]:!0}}function Ir(e){return He(e)&&Lr in e}function Mr(e){return He(e)&&jr in e}function qr(e,t,n,r,o){let s,i=0,a=!1;e.on(n,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,t=>{if(i+=r(t),i>=8e5)o(e);else if(!a){const t=e.getOptions()._flushInterval??5e3;t>0&&(a=!0,s=ur(setTimeout(()=>{o(e)},t)))}}),e.on("flush",()=>{o(e)})}var Br=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Cr(e.transportOptions?.bufferSize??64),this._dataCollection=Dr(e),e.dsn?this._dsn=sn(e.dsn):se&&_e.warn("No DSN provided, client will not send events."),this._dsn){const t=lr(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs??!0,this._options.enableLogs&&qr(this,"afterCaptureLog","flushLogs",Wr,yr),(this._options.enableMetrics??this._options._experiments?.enableMetrics??1)&&qr(this,"afterCaptureMetric","flushMetrics",Yr,wr)}captureException(e,t,n){const r=gt();if(wt(e))return se&&_e.log(Pr),r;const o={event_id:r,...t};return this._process(()=>this.eventFromException(e,o).then(e=>this._captureEvent(e,o,n)).then(e=>e),"error"),o.event_id}captureMessage(e,t,n,r){const o={event_id:gt(),...n},s=Be(e)?e:String(e),i=Fe(e),a=i?this.eventFromMessage(s,t,o):this.eventFromException(e,o);return this._process(()=>a.then(e=>this._captureEvent(e,o,r)),i?"unknown":"error"),o.event_id}captureEvent(e,t,n){const r=gt();if(t?.originalException&&wt(t.originalException))return se&&_e.log(Pr),r;const o={event_id:r,...t},s=e.sdkProcessingMetadata||{},i=s.capturedSpanScope,a=s.capturedSpanIsolationScope,c=Fr(e.type);return this._process(()=>this._captureEvent(e,o,i||n,a),c),o.event_id}captureSession(e){this.sendSession(e),Et(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),fr(this,e,this._integrations),t||pr(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!1===t.getOptions().streamGenAiSpans||function(e){return"stream"===e.getOptions().traceLifecycle}(t))return;const n=[],r=[];for(const s of e.spans)s.op?.startsWith("gen_ai.")?n.push(kr(s)):r.push(s);if(0===n.length)return;e.spans=r;const o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...gr()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}(e,this);let r=On(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of t.attachments||[])r=Rn(r,$n(o));n&&(r=Rn(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=Sn}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(se&&_e.warn($r));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(se&&_e.warn($r));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const o=Un(n);return Nn({sent_at:new Date(rt()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:nn(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;se&&_e.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||/* @__PURE__ */new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(t){return se&&_e.error("Error while sending envelope:",t),{}}return se&&_e.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&fr(e,t,n)}),n}(this,e),pr(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0,n=!1;for(const e of o)if(!1===e.mechanism?.handled){n=!0;break}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Et(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),s=this.getIntegrationNames();return!t.integrations&&s.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Zn(o,e,t,n,this,r).then(e=>(null===e||(this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...Vt(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:En(this,n),...e.sdkProcessingMetadata}),e))}_captureEvent(e,t={},n=Wt(),r=Jt()){return se&&zr(e)&&_e.log(`Captured error event \`${Nr(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{se&&(Mr(e)?_e.log(e.message):Ir(e)?_e.warn(e.message):_e.warn(e))})}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:s}=o,i=Hr(e),a=zr(e),c=`before send for type \`${e.type||"error"}\``,u=void 0===s?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(s),l=Fr(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",l),Or("An event processor returned `null`, will not send event.");return!0===t.data?.__sentry__?e:function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(We(e))return e.then(e=>{if(!ze(e)&&null!==e)throw Ur(n);return e},e=>{throw Ur(`${t} rejected with ${e}`)});if(!ze(e)&&null!==e)throw Ur(n);return e}(function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,ignoreSpans:i}=t,a=(c=t.beforeSendSpan,!(c&&"function"==typeof c&&"_streamed"in c&&c._streamed)&&t.beforeSendSpan);var c;let u=n;if(zr(u)&&o)return o(u,r);if(Hr(u)){if(a||i){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.["sentry.profile_id"],exclusive_time:i?.["sentry.exclusive_time"],measurements:e.measurements,is_segment:!0}}(u);if(i?.length&&vn({description:t.description,op:t.op,attributes:t.data},i))return null;if(a){const e=a(t);e?u=Tt(n,{type:"transaction",timestamp:(l=e).timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,data:{...l.data,...l.profile_id&&{"sentry.profile_id":l.profile_id},...l.exclusive_time&&{"sentry.exclusive_time":l.exclusive_time}}}},measurements:l.measurements}):gn()}if(u.spans){const t=[],n=u.spans;for(const e of n)if(i?.length&&vn({description:e.description,op:e.op,attributes:e.data},i))wn(n,e);else if(a){const n=a(e);n?t.push(n):(gn(),t.push(e))}else t.push(e);const r=u.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),u.spans=t}}if(s){if(u.spans){const e=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return s(u,r)}}var l;return u}(this,o,e,t),c)}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",l),i){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw Or(`${c} returned \`null\`, will not send event.`)}const d=n.getSession()||r.getSession();if(a&&d&&this._updateSessionFromEvent(d,o),a&&"number"==typeof u&&nt()>u)throw this.recordDroppedEvent("sample_rate","error"),Or(`Discarding event because it's not included in the random sample (sampling rate = ${s})`);if(i){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const h=o.transaction_info;if(i&&h&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...h,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(Mr(e)||Ir(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),Ur(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Sr&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){se&&_e.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(se&&_e.log("No outcomes to send"));if(!this._dsn)return void(se&&_e.log("No dsn provided, will not send outcomes"));se&&_e.log("Sending outcomes:",e);const t=(n=e,Nn((r=this._options.tunnel&&nn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||kt(),discarded_events:n}]]));var n,r,o;this.sendEnvelope(t)}};function Fr(e){return"replay_event"===e?"replay":e||"error"}function zr(e){return void 0===e.type}function Hr(e){return"transaction"===e.type}function Yr(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+Jr(e.attributes)}function Wr(e){let t=0;return e.message&&(t+=2*e.message.length),t+Jr(e.attributes)}function Jr(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Kr(e[0]):Fe(e)?t+=Kr(e):t+=100}),t}function Kr(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function Vr(e,t){!0===t.debug&&(se?_e.enable():pe(()=>{})),Wt().update(t.initialScope);const n=new e(t);return function(e){Wt().setClient(e)}(n),n.init(),n}function Xr(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Gr(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}var Qr=100;function Zr(e,t){const n=Kt(),r=Jt();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Qr}=n.getOptions();if(s<=0)return;const i={timestamp:kt(),...e},a=o?pe(()=>o(i,t)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}var eo=/* @__PURE__ */new WeakMap,to=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Qe(this);let r;try{eo.has(Kt())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){eo.set(e,!0)}}),no=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],ro=(e={})=>{let t;return{name:"EventFilters",setup(n){t=so(e,n.getOptions())},processEvent:(n,r,o)=>(t||(t=so(e,o.getOptions())),function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&mt(n,t)}(e,t.ignoreTransactions))return se&&_e.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${yt(e)}`),!0}else{if(function(e,t){return!!t?.length&&Nr(e).some(e=>mt(e,t))}(e,t.ignoreErrors))return se&&_e.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${yt(e)}`),!0;if(function(e){return!!e.exception?.values?.length&&(!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e))return se&&_e.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${yt(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=io(e);return!!n&&mt(n,t)}(e,t.denyUrls))return se&&_e.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${yt(e)}.\nUrl: ${io(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=io(e);return!n||mt(n,t)}(e,t.allowUrls))return se&&_e.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${yt(e)}.\nUrl: ${io(e)}`),!0}return!1}(n,t)?null:n)}},oo=(e={})=>({...ro(e),name:"InboundFilters"});function so(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:no],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function io(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch{return se&&_e.error(`Cannot extract url for event ${yt(e)}`),null}}function ao(e,t,n,r,o,s){if(!o.exception?.values||!s||!Ue(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=co(e,t,r,s.originalException,n,o.exception.values,i,0))}function co(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Ue(r[o])){lo(i,a,r);const s=e(t,r[o]),u=c.length;ho(s,o,u,a),c=co(e,t,n,r[o],o,[s,...c],s,u)}return uo(r)&&r.errors.forEach((s,u)=>{if(Ue(s)){lo(i,a,r);const l=e(t,s),d=c.length;ho(l,`errors[${u}]`,d,a),c=co(e,t,n,s,o,[l,...c],l,d)}}),c}function uo(e){return Array.isArray(e.errors)}function lo(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...uo(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ho(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function po(e){return function(e){return Ue(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var fo=/* @__PURE__ */new Set([]);var mo=/* @__PURE__ */new Set;function go(){"console"in ie&&de.forEach(function(e){!mo.has(e)&&e in ie.console&&(mo.add(e),Ve(ie.console,e,function(t){return he[e]=t,function(...t){const n=t[0],r=he[e],o=fo.size&&"string"==typeof n&&mt(n,fo);o||Re("console",{args:t,level:e}),(!o||se&&_e.isEnabled())&&r?.apply(ie.console,t)}}))})}function _o(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var yo=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){return!!t&&(!!function(e,t){const n=e.message,r=t.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!bo(e,t)&&!!vo(e,t))))}(e,t)||!!function(e,t){const n=wo(t),r=wo(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!bo(e,t)&&!!vo(e,t)))}(e,t))}(t,e))return se&&_e.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function vo(e,t){let n=Se(e),r=Se(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const e=r[o],t=n[o];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function bo(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function wo(e){return e.exception?.values?.[0]}var xo=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=Wt().getScopeData(),n=Jt().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:o}=hn(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!o?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}});function ko(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}var So=ie;function Co(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Eo(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in So))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(Co(So.fetch))return!0;let e=!1;const t=So.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Co(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){se&&_e.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function To(e,t){const n="fetch",r=Te(n,e);return Ne(n,()=>function(e,t=!1){if(t&&!Eo())return;Ve(ie,"fetch",function(t){return function(...n){const r=/* @__PURE__ */new Error,{method:o,url:s}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Ro(t),method:No(n,"method")?String(n.method).toUpperCase():Ke(t)&&No(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:Ro(t),method:No(t,"method")?String(t.method).toUpperCase():"GET"}}(n),i={args:n,fetchData:{method:o,url:s},startTimestamp:1e3*St(),virtualError:r,headers:Ao(n)};return e||Re("fetch",{...i}),t.apply(ie,n).then(async t=>(e?e(t):Re("fetch",{...i,endTimestamp:1e3*St(),response:t}),t),e=>{Re("fetch",{...i,endTimestamp:1e3*St(),error:e}),Ue(e)&&void 0===e.stack&&(e.stack=r.stack,Xe(e,"framesToPop",1));const t=Kt()?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==t&&Ue(e)&&"TypeError"===e.name&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const n=new URL(i.fetchData.url).host;"always"===t?e.message=`${e.message} (${n})`:Xe(e,"__sentry_fetch_url_host__",n)}catch{}throw e})}})}(void 0,t)),r}function No(e,t){return He(e)&&!!e[t]}function Ro(e){return"string"==typeof e?e:e?No(e,"url")?e.url:e.toString?e.toString():"":""}function Ao(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(Ke(t))return new Headers(t.headers)}catch{}}var Do=ie;function Po(){try{return Do.document.location.href}catch{return""}}var $o=ie,Lo=0;function jo(){return Lo>0}function Uo(e,t={}){if("function"!=typeof e)return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const t=e.__sentry_wrapped__;return"function"==typeof t?t:e}if(Qe(e))return e}catch{return e}const n=function(...n){ie._sentryWrappedDepth=(ie._sentryWrappedDepth||0)+1;try{const r=n.map(e=>Uo(e,t));return e.apply(this,r)}catch(r){throw Lo++,setTimeout(()=>{Lo--}),function(...e){const t=zt(ce());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(e=>{e.addEventProcessor(e=>(t.mechanism&&(vt(e,void 0,void 0),bt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),nr(r)}),r}finally{ie._sentryWrappedDepth=(ie._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Ge(n,e),Xe(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function Oo(){const e=Po(),{referrer:t}=$o.document||{},{userAgent:n}=$o.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function Io(e,t){const n=Bo(e,t),r={type:Ho(t),value:Yo(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Mo(e,t,n,r){const o=Kt()?.getOptions().normalizeDepth,s=(i=t,Object.values(i).find(Ue));var i;const a={__serialized__:ut(t,o)};if(s)return{exception:{values:[Io(e,s)]},extra:a};const c={exception:{values:[{type:Ye(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ko(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=Bo(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function qo(e,t){return{exception:{values:[Io(e,t)]}}}function Bo(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&Fo.test(e.message)?1:0}(t),o=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(n,r,o)}catch{}return[]}var Fo=/Minified React error #\d+;/i;function zo(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function Ho(e){const t=e?.name;return!t&&zo(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Yo(e){const t=e?.message;return zo(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?po(t.error):po(e):"No error message"}function Wo(e,t,n,r,o){let s;if(Ie(t)&&t.error)return qo(e,t.error);if(Me(t)||Oe(t,"DOMException")){const o=t;if("stack"in t){s=qo(e,t);const o=s.exception?.values?.[0];if(r&&n&&o&&!o.stacktrace){const t=Bo(e,n);t.length&&(o.stacktrace={frames:t},bt(s,{synthetic:!0}))}}else{const t=o.name||(Me(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Jo(e,i,n,r),vt(s,i)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return Ue(t)?qo(e,t):ze(t)||Ye(t)?(s=Mo(e,t,n,o),bt(s,{synthetic:!0}),s):(s=Jo(e,t,n,r),vt(s,`${t}`,void 0),bt(s,{synthetic:!0}),s)}function Jo(e,t,n,r){const o={};if(r&&n){const r=Bo(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),bt(o,{synthetic:!0})}if(Be(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function Ko(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(Ze(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return Ie(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ye(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}var Vo=class extends Br{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:$o.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n;!function(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:ae})),o.version=ae)}(t,"browser",["browser"],$o.SENTRY_SDK_SOURCE||"npm"),super(t);const{userInfo:r}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:r?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:o}=this._options;$o.document&&$o.document.addEventListener("visibilitychange",()=>{"hidden"===$o.document.visibilityState&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",Gr)}eventFromException(e,t){return function(e,t,n,r){const o=Wo(e,t,n?.syntheticException||void 0,r);return bt(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Hn(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const s=Jo(e,t,r?.syntheticException||void 0,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Hn(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}};var Xo="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Go=ie;function Qo(e,t,n){Go.document&&Go.addEventListener(e,t,n)}function Zo(e,t,n){Go.document&&Go.removeEventListener(e,t,n)}var es={};try{"undefined"!=typeof Node&&(es.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(es.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,es.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,es.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,es.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(es.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function ts(e,t,n){const r=es[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return"function"==typeof o?o.call(e,n):o}function ns(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=3;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<r&&(u=rs(n,l),!("html"===u||s>1&&i+o.length*c+u.length>=d));)o.push(u),i+=u.length,n=ts(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function rs(e,t){const n=[],r=ts(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=ts(e,"dataset");if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());const o=t?.length?t.filter(t=>ts(e,"getAttribute",t)).map(t=>[t,ts(e,"getAttribute",t)]):null;if(o?.length)o.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=ts(e,"id");t&&n.push(`#${t}`);const r=ts(e,"className");if(r&&qe(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const s of["aria-label","type","name","title","alt"]){const t=ts(e,"getAttribute",s);t&&n.push(`[${s}="${t}"]`)}return n.join("")}var os,ss,is,as;function cs(){if(!Go.document)return;const e=Re.bind(null,"dom"),t=us(e,!0);Go.document.addEventListener("click",t,!1),Go.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Go[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Ve(n,"addEventListener",function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=us(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch{}return t.call(this,n,r,o)}}),Ve(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function us(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;Xe(n,"_sentryCaptured",!0),r&&!r._sentryId&&Xe(r,"_sentryId",gt());const o="keypress"===n.type?"input":n.type;(function(e){if(e.type!==ss)return!1;try{if(!e.target||e.target._sentryId!==is)return!1}catch{}return!0})(n)||(e({event:n,name:o,global:t}),ss=n.type,is=r?r._sentryId:void 0),clearTimeout(os),os=Go.setTimeout(()=>{is=void 0,ss=void 0},1e3)}}function ls(e){const t="history";Te(t,e),Ne(t,ds)}function ds(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=as,o=function(e){try{return new URL(e,Go.location.origin).toString()}catch{return e}}(String(n));if(as=o,r===o)return e.apply(this,t);Re("history",{from:r,to:o})}return e.apply(this,t)}}Go.addEventListener("popstate",()=>{const e=Go.location.href,t=as;as=e,t!==e&&Re("history",{from:t,to:e})}),"history"in So&&So.history&&(Ve(Go.history,"pushState",e),Ve(Go.history,"replaceState",e))}var hs={};var ps="__sentry_xhr_v3__";function fs(){if(!Go.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=/* @__PURE__ */new Error,o=1e3*St(),s=qe(n[0])?n[0].toUpperCase():void 0,i=function(e){if(qe(e))return e;try{return e.toString()}catch{}}(n[1]);if(!s||!i)return e.apply(t,n);t[ps]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[ps];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}Re("xhr",{endTimestamp:1e3*St(),startTimestamp:o,xhr:t,virtualError:r}),t.removeEventListener("readystatechange",a)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,s=t[ps];return s&&qe(r)&&qe(o)&&(s.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[ps];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return Re("xhr",{startTimestamp:1e3*St(),xhr:t}),e.apply(t,n)}})}function ms(e,t=function(e){const t=hs[e];if(t)return t;let n=Go[e];if(Co(n))return hs[e]=n.bind(Go);const r=Go.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(el){Xo&&_e.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,el)}return n?hs[e]=n.bind(Go):n}("fetch")){let n=0,r=0;return Tr(e,async function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,i);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(el){throw hs["fetch"]=void 0,el}finally{n-=s,r--}},Cr(e.bufferSize||40))}var gs="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function _s(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}var ys=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,vs=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,bs=/\((\S*)(?::(\d+))(?::(\d+))\)/,ws=/at (.+?) ?\(data:(.+?),/,xs=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ks=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ss=be(...[[30,e=>{const t=e.match(ws);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=ys.exec(e);if(n){const[,e,t,r]=n;return _s(e,"?",+t,+r)}const r=vs.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=bs.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Cs(r[1]||"?",r[2]);return _s(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=xs.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ks.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||"?";return[n,e]=Cs(n,e),_s(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Cs=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Es=1024,Ts=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console",n=Te(t,e);Ne(t,go)}(function(e){return function(t){if(Kt()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:_o(t.level),message:pt(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${pt(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Zr(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(Kt()!==e)return;let r,o,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>Es&&(gs&&_e.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=Es),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ns(t,{keyAttrs:s,maxStringLength:i}),o=function(e,t=5){if(!Do.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),Zr(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),Te("dom",n),Ne("dom",cs)),t.xhr&&function(e){Te("xhr",e),Ne("xhr",fs)}(function(e){return function(t){if(Kt()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[ps];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,u={method:s,url:i,status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:ko(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),Zr(d,l)}}(e)),t.fetch&&To(function(e){return function(t){if(Kt()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),Zr(s,o)}else{const o=t.response,s={...t.fetchData,status_code:o?.status},i={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:ko(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,i),Zr(a,i)}}}(e)),t.history&&ls(function(e){return function(t){if(Kt()!==e)return;let n=t.from,r=t.to;const o=Xr($o.location.href);let s=n?Xr(n):void 0;const i=Xr(r);s?.path||(s=o),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),Zr({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Kt()===e&&Zr({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:yt(t)},{event:t})}}(e))}}};var Ns="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),Rs=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&Ve($o,"setTimeout",As),t.setInterval&&Ve($o,"setInterval",As),t.requestAnimationFrame&&Ve($o,"requestAnimationFrame",Ds),t.XMLHttpRequest&&"XMLHttpRequest"in $o&&Ve(XMLHttpRequest.prototype,"send",Ps);const e=t.eventTarget;e&&(Array.isArray(e)?e:Ns).forEach(e=>function(e,t){const n=$o[e]?.prototype;if(!n?.hasOwnProperty?.("addEventListener"))return;Ve(n,"addEventListener",function(n){return function(r,o,s){try{"function"==typeof o.handleEvent&&(o.handleEvent=Uo(o.handleEvent,{mechanism:{data:{handler:ke(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,o),n.apply(this,[r,Uo(o,{mechanism:{data:{handler:ke(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),s])}}),Ve(n,"removeEventListener",function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}}catch{}return e.call(this,t,n,r)}})}(e,t))}}};function As(e){return function(...t){const n=t[0];return t[0]=Uo(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ke(e)}`}}),e.apply(this,t)}}function Ds(e){return function(t){return e.apply(this,[Uo(t,{mechanism:{data:{handler:ke(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Ps(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Ve(n,e,function(t){const n={mechanism:{data:{handler:ke(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Qe(t);return r&&(n.mechanism.data.handler=ke(r)),Uo(t,n)})}),e.apply(this,t)}}var $s=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===$o.document)return void(gs&&_e.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));sr({ignoreDuration:!0});let e=!1;(e=>{const t=Go.requestIdleCallback||Go.setTimeout;"hidden"===Go.document?.visibilityState?e():(Qo("visibilitychange",e=(e=>{let t=!1;return()=>{t||(e(),t=!0)}})(e),{once:!0,capture:!0}),Qo("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Zo("visibilitychange",e,{capture:!0}),Zo("pagehide",e,{capture:!0})}))})(()=>{e||(cr(),e=!0)});const n=Jt();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&cr())}),"route"===t&&ls(({from:t,to:n})=>{t!==n&&(sr({ignoreDuration:!0}),cr(),e=!0)})}}},Ls=()=>({name:"CultureContext",preprocessEvent(e){const t=js();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=js();t&&zn(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function js(){try{const e=$o.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Us=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){!function(e){const t="error";Te(t,e),Ne(t,De)}(t=>{const{stackParser:n,attachStacktrace:r}=Is();if(Kt()!==e||jo())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=function(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];0===c.length&&c.push({colno:r,lineno:n,filename:Ms(t)??Po(),function:"?",in_app:!0});return e}(Wo(n,c||o,void 0,r,!1),s,i,a);u.level="error",rr(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Os("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";Te(t,e),Ne(t,$e)}(t=>{const{stackParser:n,attachStacktrace:r}=Is();if(Kt()!==e||jo())return;const o=function(e){if(Fe(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),s=Fe(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:Wo(n,o,void 0,r,!0);s.level="error",rr(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Os("onunhandledrejection"))}}};function Os(e){gs&&_e.log(`Global Handler attached: ${e}`)}function Is(){return Kt()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Ms(e){if(qe(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&-1!==s){const t=e.slice(s+1);i=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}(e,!1)}>`:e}var qs=()=>({name:"HttpContext",preprocessEvent(e){if(!$o.navigator&&!$o.location&&!$o.document)return;const t=Oo(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){const t=e.attributes?.[Xt];if(!$o.navigator&&!$o.location&&!$o.document)return;const n=Oo();zn(e,{[Fn]:"http.client"!==t?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),Bs=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){ao(Io,o.getOptions().stackParser,n,t,e,r)}}},Fs=/^HTML(\w*)Element$/;function zs(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(e);if(Fs.test(t))return`[HTMLElement: ${ns(e)}]`}}function Hs(){return!!function(){if(void 0===$o.window)return!1;const e=$o;if(e.nw)return!1;if(!(e.chrome||e.browser)?.runtime?.id)return!1;const t=Po();return!($o===$o.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}()&&(gs&&pe(()=>{}),!0)}function Ys(e={}){const t=!e.skipBrowserExtensionCheck&&Hs();let n=null==e.defaultIntegrations?[oo(),to(),xo(),Rs(),Ts(),Us(),Bs(),yo(),qs(),Ls(),$s()]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(o=e.stackParser||Ss,Array.isArray(o)?be(...o):o),integrations:hr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||ms};var o;return ot=zs,Vr(Vo,r)}function Ws(e){const t="undefined"!=typeof window?window.location.href:void 0;or("portal_code",e.portalCode),or("object_code",e.objectCode??""),or("locale",e.locale??""),function(e,t){Jt().setContext(e,t)}("bukazu",{portal_code:e.portalCode,object_code:e.objectCode??null,locale:e.locale??null,url:t??null})}function Js(e){nr(e)}function Ks(e){!function(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;Wt().captureMessage(e,n,r)}(e,"error")}var Vs=/* @__PURE__ */new WeakSet;function Xs(e){return function(e){return"messages"in e&&Array.isArray(e.messages)&&e.messages.every(e=>"string"==typeof e)}(e)?e.messages:[e.message]}function Gs(e){const t=Xs(e.errors);return"object"!=typeof e.errors||null===e.errors||Vs.has(e.errors)||(Vs.add(e.errors),Js(new Error(t.join("\n")))),/* @__PURE__ */h("div",{className:"bukazu-error-message",children:[/* @__PURE__ */d("h2",{children:Q("something_went_wrong_please_try_again")}),/* @__PURE__ */d("ul",{children:t.map(e=>/* @__PURE__ */d("li",{children:e},e))})]})}var Qs=["en","nl","de","fr","es","it"];function Zs(e){if(!e)return"en";const t=e.split(/[-_]/)[0].toLowerCase();return function(e){return Qs.includes(e)}(t)?t:"en"}var ei=e=>"[object Object]"===Object.prototype.toString.call(e),ti=n({locale:"nl",portalCode:"",objectCode:"",apiUrl:"https://api.bukazu.com"}),ni="bukazuCurrency";function ri(e){const t="string"==typeof e?.default&&""!==e.default?e.default:"EUR",n=Array.isArray(e?.allowed)?e.allowed.filter(e=>"string"==typeof e&&""!==e):[];return{multi_currency:e?.multi_currency??!1,default:t,allowed:[.../* @__PURE__ */new Set([...n,t])]}}var oi=n({currency:void 0,setCurrency:()=>{},allowed:[],multiCurrency:!1});function si({currencies:e,children:t}){const n=i(()=>ri(e),[e]),[o,s]=u(()=>{const e=function(){try{return window.localStorage.getItem(ni)}catch{return null}}();return e&&n.allowed.includes(e)?e:n.default}),a=r(e=>{n.allowed.includes(e)&&(!function(e){try{window.localStorage.setItem(ni,e)}catch{}}(e),s(e))},[n]),c=n.multi_currency&&n.allowed.length>1,l=i(()=>({currency:c?o:void 0,setCurrency:a,allowed:n.allowed,multiCurrency:c}),[c,n.allowed,o,a]);/* @__PURE__ */
|
|
25
25
|
return d(oi.Provider,{value:l,children:t})}function ii(){return o(oi)}function ai(){const{currency:e,setCurrency:t,allowed:n,multiCurrency:r}=ii();return!r||n.length<=1?null:/* @__PURE__ */h("div",{className:"bu-currency-selector",children:[/* @__PURE__ */d("label",{htmlFor:"bu-currency",children:Q("currency")}),/* @__PURE__ */d("select",{id:"bu-currency",value:e,onChange:e=>{t(e.target.value)},children:n.map(e=>/* @__PURE__ */d("option",{value:e,children:e},e))})]})}var ci=class extends Error{name="KyError";get isKyError(){return!0}},ui=class extends ci{name="HTTPError";response;request;options;data;constructor(e,t,n){const r=`${e.status||0===e.status?e.status:""} ${e.statusText??""}`.trim();super(`Request failed with ${r?`status code ${r}`:"an unknown error"}: ${t.method} ${t.url}`),this.response=e,this.request=t,this.options=n}},li=class extends ci{name="NetworkError";request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}},di=class extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}},hi=class extends ci{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new di(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},pi=class extends Error{name="SchemaValidationError";issues;constructor(e){super("Response schema validation failed"),this.issues=e}},fi=class extends ci{name="TimeoutError";request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}},mi=(()=>{let e=!1,t=!1;const n="function"==typeof globalThis.ReadableStream,r="function"==typeof globalThis.Request;if(n&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(o){if(o instanceof Error&&"unsupported BodyInit type"===o.message)return!1;throw o}return e&&!t})(),gi="function"==typeof globalThis.AbortController,_i="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,yi="function"==typeof globalThis.ReadableStream,vi="function"==typeof globalThis.FormData,bi=["get","post","put","patch","head","delete","query"],wi={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},xi=2147483647,ki=Symbol("stop"),Si=class{options;constructor(e){this.options=e}},Ci=e=>new Si(e),Ei={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Ti={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Ni=new TextEncoder,Ri=(e,t,n)=>{let r,o=0;return e.pipeThrough(new TransformStream({transform(e,s){if(s.enqueue(e),r){o+=r.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),n?.({percent:e,totalBytes:Math.max(t,o),transferredBytes:o},r)}r=e},flush(){const e=r??/* @__PURE__ */new Uint8Array;o+=e.byteLength,n?.({percent:1,totalBytes:Math.max(t,o),transferredBytes:o},e)}}))},Ai=(e,t,n)=>{if(!e.body)return e;const r=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[n,r]of e)t+=40,t+=Ni.encode(`Content-Disposition: form-data; name="${n}"`).byteLength,t+="string"==typeof r?Ni.encode(r).byteLength:r.size;return t}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:"string"==typeof e?Ni.encode(e).byteLength:e instanceof URLSearchParams?Ni.encode(e.toString()).byteLength:0})(n??e.body);return new Request(e,{duplex:"half",body:Ri(e.body,r,t)})},Di=e=>null!==e&&"object"==typeof e,Pi=Symbol("replaceOption"),$i=e=>Di(e)&&!0===e[Pi]?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},Li=(...e)=>{for(const t of e)if((!Di(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return Hi({},...e)},ji=(e={},t={})=>{const n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(const[s,i]of o.entries())r&&"undefined"===i||void 0===i?n.delete(s):n.set(s,i);return n},Ui=e=>{if(!Di(e)||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},Oi=e=>{if(e instanceof URLSearchParams){const t=new URLSearchParams(e),n=e[Bi];return n&&(t[Bi]=new Set(n)),t}return e instanceof globalThis.Headers?new globalThis.Headers(e):Array.isArray(e)?[...e]:Ui(e)?{...e}:e},Ii=(e,t)=>{return Ui(e)&&Ui(t)?(n={...e,...t},Object.fromEntries(Object.entries(n).filter(e=>void 0!==e[1]))):ji(e,t);var n};function Mi(e,t,n){return Object.hasOwn(t,n)&&void 0===t[n]?[]:Hi(e[n]??[],t[n]??[])}var qi=(e={},t={})=>({init:Mi(e,t,"init"),beforeRequest:Mi(e,t,"beforeRequest"),beforeRetry:Mi(e,t,"beforeRetry"),beforeError:Mi(e,t,"beforeError"),afterResponse:Mi(e,t,"afterResponse")}),Bi=Symbol("deletedParameters"),Fi=(e,t)=>{const n=new URLSearchParams,r=/* @__PURE__ */new Set;for(const o of[e,t])if(void 0!==o)if(o instanceof URLSearchParams){for(const[t,s]of o.entries())n.append(t,s),r.delete(t);const e=o[Bi];if(e)for(const t of e)n.delete(t),r.add(t)}else if(Array.isArray(o))for(const e of o){if(!Array.isArray(e)||2!==e.length)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");n.append(String(e[0]),String(e[1])),r.delete(String(e[0]))}else if(Di(o))for(const[e,t]of Object.entries(o))void 0===t?(n.delete(e),r.add(e)):(n.append(e,String(t)),r.delete(e));else{const e=new URLSearchParams(o);for(const[t,o]of e.entries())n.append(t,o),r.delete(t)}return r.size>0&&(n[Bi]=r),n},zi=(e,...t)=>{let n,r={},o={},s={};const i=[];for(const a of t)if(Array.isArray(a))Array.isArray(r)||(r=[]),r=[...r,...a];else if(Di(a)){for(let[t,o]of Object.entries(a)){const s=$i(o),{isReplace:a}=s;o=s.value;const c=e&&"signal"===t;if(c&&(a||void 0===o)&&(i.length=0),c&&o instanceof globalThis.AbortSignal)i.push(o);else if("context"!==t)"searchParams"!==t?(e&&"retry"===t&&Di(o)&&!a&&"number"==typeof r[t]&&(r={...r,[t]:{limit:r[t]}}),Di(o)&&!a&&t in r&&(o=zi(!1,r[t],o)),r={...r,[t]:o}):n=null==o?void 0:a||void 0===n?o:Fi(n,o);else{if(null!=o&&(!Di(o)||Array.isArray(o)))throw new TypeError("The `context` option must be an object");r={...r,context:null==o?{}:a?{...o}:{...r.context,...o}}}}if(Di(a.hooks)){const{value:e,isReplace:t}=$i(a.hooks);s=qi(t?{}:s,e),r.hooks=s}if(Di(a.headers)){const{value:e,isReplace:t}=$i(a.headers);o=t?Oi(e):Ii(o,e),r.headers=o}}return void 0!==n&&(r.searchParams=n),i.length>0&&(1===i.length?r.signal=i[0]:r.signal=_i?AbortSignal.any(i):i.at(-1)),r},Hi=(...e)=>zi(!0,...e),Yi=e=>bi.includes(e)?e.toUpperCase():e,Wi={limit:2,methods:["get","put","head","delete","options","trace","query"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},Ji=()=>({...Wi,methods:[...Wi.methods],statusCodes:[...Wi.statusCodes],afterStatusCodes:[...Wi.afterStatusCodes]}),Ki=e=>{if(void 0===e)return Wi.limit;if("number"!=typeof e||!Number.isInteger(e)||e<0)throw new TypeError("`retry.limit` must be a finite, non-negative integer");return e},Vi=(e={})=>{if("number"==typeof e)return{...Ji(),limit:Ki(e)};if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError("`retry` must be a number or an object");const t=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),n=Ki(t.limit);if(void 0!==t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(void 0!==t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");if(void 0!==t.afterStatusCodes&&!Array.isArray(t.afterStatusCodes))throw new Error("retry.afterStatusCodes must be an array");return void 0!==t.methods&&(t.methods=t.methods.map(e=>e.toLowerCase())),void 0!==t.statusCodes&&(t.statusCodes=[...t.statusCodes]),void 0!==t.afterStatusCodes&&(t.afterStatusCodes=[...t.afterStatusCodes]),{...Ji(),...t,limit:n}};async function Xi(e,{signal:t}){return new Promise((n,r)=>{function o(){clearTimeout(s),r(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const s=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e)})}var Gi=Object.prototype.toString,Qi=/* @__PURE__ */new Set(["network error","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function Zi(e){if(!e||(t=e,"[object Error]"!==Gi.call(t))||"TypeError"!==e.name||"string"!=typeof e.message)return!1;var t;const{message:n,stack:r}=e;return"Load failed"===n||n.startsWith("Load failed (")&&n.endsWith(")")?void 0===r||"__sentry_captured__"in e:!!n.startsWith("error sending request for url")||(!!("Failed to fetch"===n||n.startsWith("Failed to fetch (")&&n.endsWith(")"))||Qi.has(n))}var ea=(e,t)=>e instanceof t||e?.name===t.name;var ta=Date.parse("2024-01-01"),na=/^\d+$/,ra=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],oa=/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{2}):(\d{2}):(\d{2}) GMT$/,sa=/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{2}):(\d{2}):(\d{2}) GMT$/,ia=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{2}| \d) (\d{2}:\d{2}:\d{2}) (\d{4})$/,aa=({year:e,month:t,day:n,hours:r,minutes:o,seconds:s})=>{const i=ra.indexOf(t),a=Number(n),c=Number(r),u=Number(o),l=Number(s);if(-1===i||c>23||u>59||l>60)return;const d=Math.min(l,59),h=new Date(Date.UTC(e,i,a,c,u,d));h.setUTCFullYear(e);const p=h.getTime();return h.getUTCFullYear()===e&&h.getUTCMonth()===i&&h.getUTCDate()===a&&h.getUTCHours()===c&&h.getUTCMinutes()===u&&h.getUTCSeconds()===d?60===l?p+1e3:p:void 0},ca=(e,t)=>e[t],ua=({value:e,allowTimestamp:t})=>{if(na.test(e)){let n=1e3*Number(e);return t&&n>=ta&&(n-=Date.now()),Math.max(0,n)}const n=(e=>{const t=oa.exec(e);if(t)return aa({year:Number(ca(t,3)),month:ca(t,2),day:ca(t,1),hours:ca(t,4),minutes:ca(t,5),seconds:ca(t,6)});const n=sa.exec(e);if(n){const e=/* @__PURE__ */new Date,t=Number(ca(n,3)),r=100*Math.floor(e.getUTCFullYear()/100)+t,o=Date.UTC(e.getUTCFullYear()+50,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());let s;for(const i of[r-100,r,r+100]){const e=aa({year:i,month:ca(n,2),day:ca(n,1),hours:ca(n,4),minutes:ca(n,5),seconds:ca(n,6)});void 0!==e&&e<=o&&(s=e)}return s}const r=ia.exec(e);if(r){const[e,t,n]=ca(r,4).split(":");return aa({year:Number(ca(r,5)),month:ca(r,2),day:ca(r,3).trim(),hours:e,minutes:t,seconds:n})}})(e);if(void 0===n)return;const r=n-Date.now();return Number.isFinite(r)?Math.max(0,r):void 0},la=Symbol("timedOutResponseData"),da=Symbol("timedOutOperation"),ha="The `schema` argument must follow the Standard Schema specification",pa=Object.prototype.toString,fa=/^[\0-\u0020]+/g,ma=/[\t\n\r]/g,ga=/^[a-z][\d+.a-z-]*:/i,_a=/^https?:(?!\/\/)/i,ya=e=>e instanceof globalThis.Request||"[object Request]"===pa.call(e),va=e=>e instanceof globalThis.Response||"[object Response]"===pa.call(e);function ba(e){const t={...e,json:Oi(e.json),context:Oi(e.context),headers:Oi(e.headers),searchParams:(n=e.searchParams,Array.isArray(n)?n.map(e=>[...e]):Oi(n))};var n;return void 0!==e.retry&&(t.retry=(e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t={...e};return Array.isArray(t.methods)&&(t.methods=[...t.methods]),Array.isArray(t.statusCodes)&&(t.statusCodes=[...t.statusCodes]),Array.isArray(t.afterStatusCodes)&&(t.afterStatusCodes=[...t.afterStatusCodes]),t})(e.retry)),t}var wa=async(e,t)=>{if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError(ha);const n=t["~standard"];if("object"!=typeof n||null===n||"function"!=typeof n.validate)throw new TypeError(ha);const r=await n.validate(e);if(r.issues)throw new pi(r.issues);return r.value},xa=class e{static create(t,n){const r=n.hooks?.init??[],o=r.length>0?ba(n):n;for(const e of r)e(o);const s=new e(t,o),i=async()=>{if("number"==typeof s.#e.timeout&&s.#e.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");if("number"==typeof s.#e.totalTimeout&&s.#e.totalTimeout>2147483647)throw new RangeError("The `totalTimeout` option cannot be greater than 2147483647");await Promise.resolve();const e=await s.#t();void 0!==e&&(s.#n=Vi(s.#e.retry).limit);let t=e??await s.#r(async()=>s.#o()),n=void 0!==e||s.#s();for(;;){if(void 0===t)return t;if(va(t))try{t=await s.#i(t)}catch(r){if(!(r instanceof hi))throw r;const e=await s.#a(r,async()=>s.#o());if(void 0===e)return e;t=e,n=s.#s();continue}const e=t;if(!e.ok&&"opaque"!==e.type&&("function"==typeof s.#e.throwHttpErrors?s.#e.throwHttpErrors(e.status):s.#e.throwHttpErrors)){const r=new ui(e,s.#c(e),s.#u()),o=r;if(r.data=await s.#l(e),n)throw o;const i=await s.#a(r,async()=>s.#o());if(void 0===i)return i;t=i,n=s.#s();continue}break}if(!va(t))return t;if(s.#d(t),s.#e.onDownloadProgress){if("function"!=typeof s.#e.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!yi)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const e=t.clone();return s.#h(t),((e,t)=>{if(!e.body)return e;const n={status:e.status,statusText:e.statusText,headers:e.headers};if(204===e.status)return new Response(null,n);const r=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(Ri(e.body,r,t),n)})(e,s.#e.onDownloadProgress)}return t},a=(async()=>{try{return await i()}catch(e){await s.#p(e)}finally{const e=s.#f;s.#m(e?.body??void 0),s.request!==e&&s.#m(s.request.body??void 0)}})();for(const[e,c]of Object.entries(wi))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(a[e]=async t=>{s.request.headers.set("accept",s.request.headers.get("accept")||c);const n=await a;if("json"!==e)return s.#g(async()=>n[e](),n);const r=await s.#g(async()=>n.text(),n),i=s.#c(n),u=await s.#_(async()=>{const e=o.parseJson?await o.parseJson(r,{request:i,response:n}):""===r&&void 0!==t?void 0:JSON.parse(r);return void 0===t?e:wa(e,t)});return u===da&&await s.#p(new fi(i)),u});return a}static#y(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#v;#b=0;#n;#w;#e;#f;#x;#k=/* @__PURE__ */new WeakSet;#S;#C;#E=!1;#T=/* @__PURE__ */new WeakMap;constructor(t,n={}){if(this.#w=t,Object.hasOwn(n,"prefixUrl"))throw new Error("The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl");if(this.#e={...n,headers:ji(this.#w.headers,n.headers),hooks:qi({},n.hooks),method:Yi(n.method??this.#w.method??"GET"),prefix:String(n.prefix||""),retry:Vi(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,totalTimeout:n.totalTimeout??!1,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}},this.#n=this.#e.retry.limit,"string"!=typeof this.#w&&!(this.#w instanceof URL||this.#w instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if("string"==typeof this.#w){if(this.#e.prefix){const e=this.#e.prefix.replace(/\/+$/,""),t=this.#w.replace(/^\/+/,"");this.#w=`${e}/${t}`}if(this.#e.baseUrl){const e=(e=>e.replaceAll(fa,"").replaceAll(ma,""))(this.#w);if(_a.test(e))throw new TypeError("`input` url protocol must be followed by `//` when using `baseUrl`");(e=>ga.test(e))(e)||(this.#w=new URL(this.#w,new Request(this.#e.baseUrl).url))}}gi&&_i&&(this.#x=this.#e.signal??this.#w.signal,this.#v=new globalThis.AbortController,this.#e.signal=this.#N()),mi&&(this.#e.duplex="half"),void 0!==this.#e.json&&(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set("content-type",this.#e.headers.get("content-type")??"application/json"));const r=n.headers&&new globalThis.Headers(n.headers).has("content-type");if(this.#w instanceof globalThis.Request&&(vi&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!r&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#w,this.#e),void 0!==(o=this.#e.searchParams)&&(Array.isArray(o)?o.length>0:o instanceof URLSearchParams?o.size>0||Boolean(o[Bi]?.size):"object"==typeof o?Object.keys(o).length>0:"string"==typeof o?o.trim().length>0:Boolean(o))){const t=new URL(this.request.url),n=this.#e.searchParams?.[Bi];if(n)for(const e of n)t.searchParams.delete(e);if("string"==typeof this.#e.searchParams){const e=this.#e.searchParams.replace(/^\?/,"");""!==e&&(t.search=t.search?`${t.search}&${e}`:`?${e}`)}else{const n=new URLSearchParams(e.#y(this.#e.searchParams));for(const[e,r]of n.entries())t.searchParams.append(e,r)}if(this.#e.searchParams&&"object"==typeof this.#e.searchParams&&!Array.isArray(this.#e.searchParams)&&!(this.#e.searchParams instanceof URLSearchParams))for(const[e,r]of Object.entries(this.#e.searchParams))void 0===r&&t.searchParams.delete(e);this.request=new globalThis.Request(t,this.#e)}var o;if(this.#e.onUploadProgress&&"function"!=typeof this.#e.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");this.#C="number"==typeof this.#e.totalTimeout?this.#R():void 0}#A(e){const t=e.delay(this.#b+1);let n=t;return!0===e.jitter?n=Math.random()*t:"function"==typeof e.jitter&&(n=e.jitter(t),(!Number.isFinite(n)||n<0)&&(n=t)),Math.min(e.backoffLimit,n)}async#D(e){const t=Vi(this.#e.retry);if(this.#b>=Math.min(t.limit,this.#n))throw e;const n=e instanceof Error?e:new di(e);if(n instanceof hi)return n.customDelay??this.#A(t);if(!t.methods.includes(this.request.method.toLowerCase()))throw e;const{shouldRetry:r}=t;if(void 0!==r){const o=await this.#_(async()=>r({error:n,retryCount:this.#b+1}));if(o===da)throw new fi(this.request);if(!1===o)throw e;if(!0===o)return this.#A(t)}if(function(e){return ea(e,fi)}(e)){if(!t.retryOnTimeout)throw e;return this.#A(t)}if(function(e){return ea(e,ui)}(e)){if(!t.statusCodes.includes(e.response.status))throw e;const n=(e=>{const t=e.get("Retry-After");if(null!==t)return{value:t,allowTimestamp:!1};const n=e.get("RateLimit-Reset");if(null!==n)return{value:n,allowTimestamp:!0};const r=e.get("X-RateLimit-Retry-After");if(null!==r)return{value:r,allowTimestamp:!1};const o=e.get("X-RateLimit-Reset")??e.get("X-Rate-Limit-Reset");return null!==o?{value:o,allowTimestamp:!0}:void 0})(e.response.headers);if(n&&t.afterStatusCodes.includes(e.response.status)){const e=ua(n);return void 0===e?this.#A(t):Math.min(t.maxRetryAfter,e)}if(413===e.response.status)throw e;return this.#A(t)}if(!function(e){return ea(e,li)}(e))throw e;return this.#A(t)}#d(e){const t=this.#c(e);return this.#e.parseJson&&(e.json=async()=>{const n=await e.text();return this.#e.parseJson(n,{request:t,response:e})}),e}async#p(e){if(!(e instanceof Error))throw e;if(this.#k.has(e))throw e;let t=e;for(const n of this.#e.hooks.beforeError){const e=await n({request:this.request,options:this.#u(),error:t,retryCount:this.#b});e instanceof Error&&(t=e)}throw t}async#l(e){const t=this.#P(),n=await this.#$(e,t.milliseconds);if(n===la){if(t.fromTotalTimeout)throw new fi(this.request);return void this.#L()}if(!n)return;if(!this.#j(e.headers.get("content-type")??""))return n;const r=this.#P(),o=await this.#U(n,e,r.milliseconds,this.#c(e));if(o!==la)return o;if(r.fromTotalTimeout)throw new fi(this.request);this.#L()}#P(){const e=!1===this.#e.timeout?1e4:this.#e.timeout,t=this.#O();if(void 0===t)return{milliseconds:e,fromTotalTimeout:!1};if(t<=0)throw new fi(this.request);return{milliseconds:Math.min(e,t),fromTotalTimeout:t<=e}}#I(){const e=this.#O();if(void 0!==e){if(e<=0)throw new fi(this.request);return!1===this.#e.timeout?e:Math.min(this.#e.timeout,e)}return!1===this.#e.timeout?void 0:this.#e.timeout}async#g(e,t){let n;try{n=this.#I()}catch(s){await this.#p(s)}const r=e();if(void 0===n)return r;const o=await Promise.race([r,new Promise(e=>{const t=setTimeout(()=>{e(la)},n);r.finally(()=>{clearTimeout(t)}).catch(()=>{})})]);return o===la&&(this.#v?.abort(),await this.#p(new fi(this.#c(t)))),o}async#_(e){const t=this.#O();if(void 0===t)return e();if(t<=0)return this.#v?.abort(),da;let n;try{const r=new Promise(e=>{n=setTimeout(()=>{e(da)},t)}),o=Promise.resolve().then(e).then(e=>({status:"fulfilled",value:e})).catch(e=>({status:"rejected",error:e})),s=await Promise.race([o,r]),i=this.#O();if(s===da||void 0!==i&&i<=0)return this.#v?.abort(),s===da?o.then(e=>{"fulfilled"===e.status&&this.#M(e.value)}):"fulfilled"===s.status&&this.#M(s.value),da;if("rejected"===s.status)throw s.error;return s.value}finally{clearTimeout(n)}}#j(e){const t=(e.split(";",1)[0]??"").trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(t)}async#$(e,t){const{body:n}=e;if(!n)try{return await e.text()}catch{return}let r;try{r=n.getReader()}catch{return}const o=(e=>{const t=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(e),n=t?.[1]??t?.[2];if(n)try{return new TextDecoder(n)}catch{}return new TextDecoder})(e.headers.get("content-type")??""),s=[];let i=0;const a=(async()=>{try{for(;;){const{done:e,value:t}=await r.read();if(e)break;if(i+=t.byteLength,i>10485760)return void r.cancel().catch(()=>{});s.push(o.decode(t,{stream:!0}))}}catch{return}return s.push(o.decode()),s.join("")})(),c=new Promise(e=>{const n=setTimeout(()=>{e(la)},t);a.finally(()=>{clearTimeout(n)})}),u=await Promise.race([a,c]);return u===la&&r.cancel().catch(()=>{}),u}async#U(e,t,n,r){let o;try{return await Promise.race([Promise.resolve().then(()=>this.#e.parseJson?this.#e.parseJson(e,{request:r,response:t}):JSON.parse(e)),new Promise(e=>{o=setTimeout(()=>{e(la)},n)})])}catch{return}finally{clearTimeout(o)}}#m(e){e&&e.cancel().catch(()=>{})}#h(e){this.#m(e.body??void 0)}#M(e){va(e)?this.#h(e):ya(e)&&this.#m(e.body??void 0)}#N(){return this.#x?AbortSignal.any([this.#x,this.#v.signal]):this.#v.signal}#L(){const e=this.#O();if(void 0!==e&&e<=0)throw new fi(this.request)}async#t(){for(const e of this.#e.hooks.beforeRequest){const t=await this.#_(async()=>e({request:this.request,options:this.#u(),retryCount:0}));if(t===da)throw new fi(this.request);if(ya(t))this.#q(t);else if(va(t))return t}}async#i(e){const t=this.#c(e);for(const r of this.#e.hooks.afterResponse){const o=this.#B(e.clone(),t);let s;this.#d(o);try{if(s=await this.#_(async()=>r({request:this.request,options:this.#u(),response:o,retryCount:this.#b})),s===da)throw new fi(this.request)}catch(n){throw o!==e&&this.#h(o),this.#h(e),n}if(s instanceof Si)throw o!==e&&this.#h(o),this.#h(e),new hi(s.options);const i=va(s)?this.#B(s,t):e;o!==e&&o!==i&&o.body!==i.body&&this.#h(o),e!==i&&e.body!==i.body&&this.#h(e),e=i}return e}async#r(e){try{return await e()}catch(t){return this.#a(t,e)}}async#a(e,t){this.#E=!1;const n=Math.min(await this.#D(e),xi),r={signal:this.#x},o=this.#O();if(void 0!==o){if(o<=0)throw new fi(this.request);if(n>=o)throw await Xi(o,r),new fi(this.request)}if(await Xi(n,r),this.#L(),e instanceof hi&&e.customRequest){const t=new globalThis.Request(e.customRequest,this.#e.signal?{signal:this.#e.signal}:void 0);this.#q(t)}for(const i of this.#e.hooks.beforeRetry){let t;try{t=await this.#_(async()=>i({request:this.request,options:this.#u(),error:e,retryCount:this.#b+1}))}catch(s){throw s instanceof Error&&s!==e&&this.#k.add(s),s}if(t===da)throw new fi(this.request);if(ya(t)){this.#q(t);break}if(va(t))return this.#E=!0,this.#b++,t;if(t===ki)return}return this.#L(),this.#b++,this.#r(t)}#s(){const e=this.#E;return this.#E=!1,e}async#o(){this.#v?.signal.aborted&&(this.#v=new globalThis.AbortController,this.#e.signal=this.#N(),this.request=new globalThis.Request(this.request,{signal:this.#e.signal}));const e=(e=>{const t={};for(const n in e)Object.hasOwn(e,n)&&(n in Ti||n in Ei||(t[n]=e[n]));return t})(this.#e);this.#n=Vi(this.#e.retry).limit;const t=this.#n>0?this.request.clone():void 0,n=this.#F(this.request,this.#e.body??void 0);this.#f=n,t&&(this.request=t);try{const t=this.#O();if(void 0!==t&&t<=0)throw new fi(this.request);const r=!1===this.#e.timeout?t:void 0===t?this.#e.timeout:Math.min(this.#e.timeout,t),o=void 0===r?await this.#e.fetch(n,e):await async function(e,t,n,r){return new Promise((o,s)=>{const i=setTimeout(()=>{n&&n.abort(),s(new fi(e))},r.timeout);r.fetch(e,t).then(o).catch(s).then(()=>{clearTimeout(i)})})}(n,e,this.#v,{timeout:r,fetch:this.#e.fetch});return this.#B(o,n)}catch(r){if(Zi(r))throw new li(this.request,{cause:r});throw r}}#O(){if(void 0===this.#C)return;const e=this.#R()-this.#C;return Math.max(0,this.#e.totalTimeout-e)}#R(){return globalThis.performance?.now()??Date.now()}#u(){if(!this.#S){const{hooks:e,json:t,parseJson:n,stringifyJson:r,searchParams:o,timeout:s,totalTimeout:i,throwHttpErrors:a,fetch:c,...u}=this.#e;this.#S=Object.freeze(u)}return this.#S}#q(e){this.#S=void 0,this.request=e}#c(e){return this.#T.get(e)??this.request}#B(e,t){return this.#T.set(e,t),e}#F(e,t){return this.#e.onUploadProgress&&e.body&&mi?Ai(e,this.#e.onUploadProgress,t??this.#e.body??void 0):e}},ka=e=>{const t=(t,n)=>xa.create(t,Li(e,n));for(const n of bi)t[n]=(t,r)=>xa.create(t,Li(e,r,{method:n}));return t.create=e=>ka(Li(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),ka(Li(e,t))),t.stop=ki,t.retry=Ci,t},Sa=ka(),Ca=/* @__PURE__ */new Map,Ea=Sa.create({retry:{limit:3,methods:["get","put","head","delete","options","trace"],statusCodes:[408,429,500,502,503,504]},headers:{Accept:"application/json"},hooks:{beforeRequest:[({request:e})=>{if("GET"!==e.method)return;const t=Ca.get(e.url);t&&(t.etag&&e.headers.set("If-None-Match",t.etag),t.lastModified&&e.headers.set("If-Modified-Since",t.lastModified))}],afterResponse:[async({request:e,response:t})=>{if("GET"!==e.method)return t;if(304===t.status){const t=Ca.get(e.url);if(t)return new Response(t.body,{status:200,headers:{"Content-Type":"application/json"}})}if(t.ok){const n=t.headers.get("ETag")??void 0,r=t.headers.get("Last-Modified")??void 0;if(void 0!==n||void 0!==r){const o=await t.clone().text();Ca.set(e.url,{etag:n,lastModified:r,body:o})}}return t}]}});async function Ta({apiUrl:e,locale:t,portalCode:n,params:r,signal:o}){const s=function({apiUrl:e,portalCode:t,params:n}){const r=new URL("/portal_api/v1/accommodations",new URL(e).origin);return r.search=new URLSearchParams({portal_code:t,...n}).toString(),r.toString()}({apiUrl:e,portalCode:n,params:r});try{return await Ea.get(s,{headers:{locale:t},signal:o}).json()}catch(i){if(i instanceof ui)throw new Error(`Search request failed (${i.response.status})`);throw i}}var Na={en:"en-GB",nl:"nl-NL",de:"de-DE",fr:"fr-FR",it:"it-IT",es:"es-ES"};var Ra=/* @__PURE__ */new Map;function Aa(e,t){const n=function(){const e="undefined"!=typeof window?window.__localeId__:void 0;return(e&&Na[e])??"en-GB"}(),r=`${n}:${JSON.stringify(t)}`;let o=Ra.get(r);return o||(o=new Intl.DateTimeFormat(n,t),Ra.set(r,o)),o.format(e)}function Da(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function Pa(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function $a(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function La(e,t){return $a(e,-t)}function ja(e,t){const n=new Date(e),r=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(r,o)),n}function Ua(e,t){return function(e,t){const n=new Date(e),r=n.getMonth(),o=n.getDate();n.setDate(1),n.setFullYear(n.getFullYear()+t),n.setMonth(r);const s=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(o,s)),n}(e,-t)}function Oa(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function Ia(e){return new Date(e.getFullYear(),e.getMonth(),1)}function Ma(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function qa(e){const t=Oa(e);return t.setDate(t.getDate()-t.getDay()),t}function Ba(e){const t=Oa(e);return t.setDate(t.getDate()+(6-t.getDay())),t}function Fa(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function za(e,t){return e.getTime()>t.getTime()}function Ha(e,t){return e.getTime()<t.getTime()}function Ya(e,t){const n=Oa(e).getTime(),r=Oa(t).getTime();return Math.round((n-r)/864e5)}var Wa={month:"long",year:"numeric"},Ja={weekday:"long",day:"2-digit",month:"long",year:"numeric"},Ka={year:"numeric",month:"long",day:"numeric"};function Va(e){return Aa(Da(e.slice(0,10)),Ka)}function Xa(e,t,n){const r=Number(n);r&&(e[t]=String(r))}function Ga(e,{limit:t,skip:n,currency:r}){const o={limit:String(t),skip:String(n)};r&&(o.currency=r),e.countries&&(o.country_id=String(e.countries)),e.regions&&(o.region_id=String(e.regions)),e.cities&&(o.city_id=String(e.cities)),e.extra_search&&(o.extra_search=e.extra_search),Xa(o,"persons_min",e.persons_min),Xa(o,"persons_max",e.persons_max),Xa(o,"bedrooms_min",e.bedrooms_min),Xa(o,"bathrooms_min",e.bathrooms_min),Xa(o,"weekprice_max",e.weekprice_max);const s=function(e){const t=Object.entries(e).filter(([e,t])=>/^category_\d+$/.test(e)&&t).map(([,e])=>Number(e));return[...new Set([...e.properties||[],...t].map(Number).filter(Number.isFinite))].sort((e,t)=>e-t)}(e);return s.length>0&&(o.properties=s.join(",")),e.arrival_date&&(o.arrival_date=e.arrival_date,e.departure_date?(o.starts_at=e.arrival_date,o.ends_at=e.departure_date,Xa(o,"no_nights_min",Ya(Da(e.departure_date),Da(e.arrival_date)))):o.no_nights_min="1"),o}function Qa({filters:e,PortalSite:t,limit:n,skip:r,onPageChange:a,activePage:c}){const{portalCode:l,apiUrl:f,locale:m}=o(ti),{currency:g}=ii(),[_,y]=u({status:"loading"}),v=JSON.stringify(Ga(e,{limit:n,skip:r,currency:g})),b=i(()=>JSON.parse(v),[v]);if(s(()=>{const e=new AbortController;return y({status:"loading"}),Ta({apiUrl:f,locale:m,portalCode:l,params:b,signal:e.signal}).then(t=>{e.signal.aborted||y({status:"ready",response:t})}).catch(t=>{e.signal.aborted||y({status:"error",error:t instanceof Error?t:/* @__PURE__ */new Error("A search request failed")})}),()=>{e.abort()}},[f,m,l,b]),"loading"===_.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(p,{})});if("error"===_.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(Gs,{errors:_.error})});const{items:w,meta:x}=_.response,k=/* @__PURE__ */d(oe,{totalCount:x.total_count,activePage:c,limit:n,onPageChange:a});/* @__PURE__ */
|
|
26
26
|
return h("div",{id:"results",className:t.options.filtersForm.mode,children:[
|
|
27
27
|
/* @__PURE__ */d(ai,{}),k,0===w.length?/* @__PURE__ */d("div",{className:"bu-noresults",children:Q("no_results")}):null,w.map(e=>/* @__PURE__ */d("div",{style:{display:"contents"},dangerouslySetInnerHTML:{__html:re({result:e,options:t.options.filtersForm,currency:x.currency??g})}},e.id)),k]})}var Za=["countries","regions","cities","arrival_date","departure_date","persons_min","persons_max","bedrooms_min","bathrooms_min","weekprice_max","extra_search"];async function ec(e){const t=tc("bu_portal_session"),n={...e,url:window.location.href,session_identifier:t};!function(e,t,n){const r=/* @__PURE__ */new Date;r.setTime(r.getTime()+24*n*60*60*1e3);let o="expires="+r.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"}("bu_portal_session",await Ea.post("https://api.bukazu.com/tracking",{json:n}).text(),14)}function tc(e){let t=e+"=",n=decodeURIComponent(document.cookie).split(";");for(let r=0;r<n.length;r++){let e=n[r];for(;" "==e.charAt(0);)e=e.substring(1);if(0==e.indexOf(t))return e.substring(t.length,e.length)}return""}var nc=class extends t{constructor(e){super(e);let t=Number(this.props.options.filtersForm.no_results);const n=(this.props.options.filtersForm.prefill_filters_from_url??1)&&"undefined"!=typeof window?function(e){const t=new URLSearchParams(e),n={};return t.forEach((e,t)=>{if(e){if("properties"===t){const t=e.split(",").map(e=>e.trim()).filter(Boolean);return void(t.length>0&&(n.properties=t))}(Za.includes(t)||/^category_\d+$/.test(t))&&(n[t]=e)}}),n}(window.location.search):{};this.hasUrlFilters=Object.keys(n).length>0,this.state={filters:{...this.props.filters||{},...n},activePage:1,limit:t,skip:0},this.onFilterChange=this.onFilterChange.bind(this),this.pageChange=this.pageChange.bind(this)}componentDidMount(){if(this.hasUrlFilters)return;let e=localStorage.getItem("bukazuFilters"),t=localStorage.getItem("bukazuActivePage");e&&this.setState({filters:JSON.parse(e)}),t&&this.pageChange(parseInt(t)||0)}onFilterChange(e){let t=e;this.setState({filters:t}),localStorage.setItem("bukazuFilters",JSON.stringify(t)),this.pageChange(0)}pageChange(e){const{limit:t}=this.state;let n=e*t;localStorage.setItem("bukazuActivePage",e.toString()),this.setState({activePage:e,skip:n})}render(){const{filters:e,activePage:t,limit:n,skip:r}=this.state,{options:o,PortalSite:s,locale:i}=this.props;return ec({portal_code:s.portal_code,interaction_type:"search_view",locale:i}),/* @__PURE__ */h("div",{id:"search-page",className:"right"===o.filtersForm.location?"bu-reverse":"top"===o.filtersForm.location?"bu-column":"",children:[/* @__PURE__ */d(ee,{PortalSite:s,filters:e,onFilterChange:this.onFilterChange,options:o}),/* @__PURE__ */d(Qa,{PortalSite:s,filters:e,activePage:t,onPageChange:this.pageChange,skip:r,limit:n})]})}},rc=class extends Error{constructor(e,t,n){super(t.join("\n")||`Booking request failed (${e})`),this.name="CreateBookingError",this.status=e,this.messages=t.length>0?t:[this.message],n&&(this.fieldErrors=n)}};async function oc({apiUrl:e,locale:t,payload:n}){const r=function({apiUrl:e}){return new URL("/portal_api/v1/accommodations/bookings",new URL(e).origin).toString()}({apiUrl:e});try{return await Ea.post(r,{json:n,headers:{locale:t}}).json()}catch(o){if(o instanceof ui)throw await async function(e){const t=e.response.status;let n={};try{n=await e.response.json()}catch{return new rc(t,[])}const r=n.error?[n.error]:[];return new rc(t,r,n.errors)}(o);throw o}}var sc=["first_name","preposition","last_name","company_name","email","phone","phone_mobile","address","house_number","zipcode","city","iban","bic","holder","comment","discount_code","discount_reason","currency"];function ic(e){if("string"!=typeof e)return;const t=e.trim();return""===t?void 0:t}function ac(e){const t={};for(const[n,r]of Object.entries(e??{})){const e=Number(r);Number.isFinite(e)&&e>0&&(t[n]=e)}return t}function cc({values:e,objectCode:t,portalCode:n,locale:r,sessionIdentifier:o}){const s={portal_code:n,object_code:t,starts_at:e.arrivalDate.date,ends_at:e.departureDate.date,is_option:"true"===e.is_option,language:r,country:e.country.toUpperCase(),adults:Number(e.adults)||0,children:Number(e.children)||0,babies:Number(e.babies)||0,discount:Number(e.discount)||0,cancel_insurance:Number(e.cancel_insurance)||0,costs:ac(e.costs)},i=function(e){const t={};for(const[n,r]of Object.entries(e??{})){const e=ic(r);void 0!==e&&(t[n]=e)}return Object.keys(t).length>0?t:void 0}(e.extra_fields);i&&(s.extra_fields=i),o&&(s.session_identifier=o);for(const a of sc){const t=ic(e[a]);void 0!==t&&(s[a]=t)}return s}function uc({children:e,buttonText:t,show:n=!1,onClose:r}){const[o,i]=u(n),a=c(null);s(()=>{const e=a.current;e&&(o?e.showModal():e.close())},[o]);const p=()=>{i(!1),r?.()};/* @__PURE__ */
|
|
@@ -162,4 +162,4 @@ return d(t?hu:Du,{portalSite:e})}function $u({portalSite:e}){/* @__PURE__ */
|
|
|
162
162
|
return d(xc,{children:/* @__PURE__ */d(Pu,{portalSite:e})})}async function Lu({portalCode:e,objectCode:t,apiUrl:n="",after:r}){const o=new URLSearchParams({portal_code:e,object_code:t});r&&o.set("after",r);const s=`${n?new URL(n).origin:""}/portal_api/v1/accommodations/reviews?${o.toString()}`;try{const e=await Ea.get(s).json();return{house:{id:"",name:e.house.name,rating:Number(e.house.rating),scoreAmount:Number(e.house.score_amount),reviews:e.items.map(e=>({id:"",name:e.name,review:e.review,score:Number(e.score),createdAt:e.created_at,sourceName:e.source_name??"",reviewResponses:e.review_responses??[],reviewCriteria:(e.review_criteria??[]).map(e=>({id:0,name:e.name,score:Number(e.score)}))}))},pageInfo:e.page_info}}catch(i){if(i instanceof ui)throw new Error(`Reviews request failed (${i.response.status})`);throw i}}function ju(e){return e>7?"best":e>6?"good":e>4?"medium":"low"}function Uu(e){return{color:ju(e),formatted:e%1==0?String(e):e.toFixed(1)}}function Ou(e,t){const n=document.createElement("div");return e&&(n.className=e),t&&(n.textContent=t),n}function Iu(e){const t=Ou("bu_reviews bup-16"),n=Ou("bu_reviews__overview bup-16 bu_card"),r=Ou("bu_score");if(e.rating){const t=Uu(e.rating),n=Ou(`bu_score__rating bu_card ${t.color}`);n.textContent=t.formatted,r.appendChild(n)}const o=Ou("bu_reviews__overview__number",`${e.scoreAmount} ${Q("reviews")}`);return n.appendChild(r),n.appendChild(o),t.appendChild(n),e.reviews.forEach(e=>{const n=function(e){const t=Uu(e.score);return{id:e.id,name:e.name,createdAt:e.createdAt,review:e.review,color:t.color,formatted:t.formatted,sourceName:e.sourceName,reviewResponses:e.reviewResponses,criteria:e.reviewCriteria.map(e=>{const t=Uu(e.score);return{id:e.id,name:e.name,score:e.score,color:t.color,formatted:t.formatted}})}}(e),r=Ou("bu_single_review bup-16 bu_card"),o=Ou("bu_review_summary"),s=Ou("bu_score");if(e.score){const e=Ou(`bu_score__rating bu_card ${n.color}`,n.formatted);s.appendChild(e)}const i=Ou("bu_review_summary__date_name"),a=Ou(void 0,`${Va(n.createdAt)}, `),c=Ou("bu_review_summary__name",n.name);if(i.appendChild(a),i.appendChild(c),o.appendChild(s),o.appendChild(i),n.sourceName){const e=Ou("bu_review_summary__source",n.sourceName);o.appendChild(e)}if(r.appendChild(o),n.review){const e=document.createElement("blockquote");e.className="bu_review",e.textContent=n.review,r.appendChild(e)}if(n.criteria.length>0){const e=Ou("bu_criteria");n.criteria.forEach(t=>{const n=Ou("bu_score");if(t.score){const e=Ou(`bu_score__rating bu_card ${t.color}`,t.formatted);n.appendChild(e)}n.appendChild(Ou(void 0,t.name)),e.appendChild(n)}),r.appendChild(e)}if(n.reviewResponses?.length>0){const e=Ou("bu_review_responses");n.reviewResponses.forEach(t=>{const n=Ou("bu_review_response"),r=Ou("bu_review_response__label",Q("review_response_label")),o=Ou("bu_review_response__header"),s=Va(t.created_at);o.appendChild(Ou("bu_review_response__sender",t.sender)),o.appendChild(Ou("bu_review_response__date",s));const i=document.createElement("p");i.className="bu_review_response__message",i.textContent=t.message,n.appendChild(r),n.appendChild(o),n.appendChild(i),e.appendChild(n)}),r.appendChild(e)}t.appendChild(r)}),t}function Mu({house:e}){const t=c(null);return s(()=>{var n,r;if(t.current)return n=t.current,r=()=>Iu(e),n.replaceChildren(r()),()=>{n.replaceChildren()}},[e]),/* @__PURE__ */d("div",{ref:t})}function qu({objectCode:e,portalCode:t,apiUrl:n}){const[r,o]=u({status:"loading"}),i=c(!0);if(s(()=>(i.current=!0,()=>{i.current=!1}),[]),s(()=>{let r=!0;return o({status:"loading"}),Lu({portalCode:t,objectCode:e,apiUrl:n}).then(({house:e,pageInfo:t})=>{r&&o({status:"ready",house:e,endCursor:t.end_cursor,hasNextPage:t.has_next_page})}).catch(e=>{r&&o({status:"error",error:e instanceof Error?e:new Error(String(e))})}),()=>{r=!1}},[t,e,n]),"loading"===r.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(p,{})});if("error"===r.status)/* @__PURE__ */return d("div",{className:"bukazu-error-message","data-testid":"error",children:/* @__PURE__ */d("h2",{children:Q("something_went_wrong_please_try_again")})});const a=r.house,f="ready"===r.status&&r.hasNextPage,m="loading_more"===r.status;/* @__PURE__ */
|
|
163
163
|
return h(l,{children:[
|
|
164
164
|
/* @__PURE__ */d(Mu,{house:a}),m&&/* @__PURE__ */d("div",{children:/* @__PURE__ */d(p,{})}),!m&&f&&/* @__PURE__ */d("button",{type:"button",className:"bu_load_more",onClick:function(){if("ready"!==r.status||!r.hasNextPage)return;const s=r.house,a=r.endCursor;o({status:"loading_more",house:s,endCursor:a}),Lu({portalCode:t,objectCode:e,apiUrl:n,after:a??void 0}).then(({house:e,pageInfo:t})=>{i.current&&o({status:"ready",house:{...s,reviews:[...s.reviews,...e.reviews]},endCursor:t.end_cursor,hasNextPage:t.has_next_page})}).catch(e=>{i.current&&o({status:"error",error:e instanceof Error?e:new Error(String(e))})})},children:Q("load_more_reviews")}),
|
|
165
|
-
/* @__PURE__ */d("div",{className:"bu_reviews__note",children:/* @__PURE__ */d("a",{href:"https://www.bukazu.com",target:"_blank",rel:"noopener noreferrer",children:Q("reviews_note_link")})})]})}var Bu={nl:{url:"http://bukazu.com/veiligheid",label:"Beveiligd en mogelijk gemaakt door BUKAZU"},en:{url:"http://bukazu.com/en/security",label:"Secured and made possible by BUKAZU"},de:{url:"http://bukazu.com/de/sicherheit",label:"Gesichert und ermöglicht durch BUKAZU"},fr:{url:"http://bukazu.com/fr/securite",label:"Sécurisé et rendu possible par BUKAZU"},es:{url:"http://bukazu.com/es/seguridad",label:"Asegurado y hecho posible por BUKAZU"},it:{url:"http://bukazu.com/it/sicurezza",label:"Protetto e reso possibile da BUKAZU"}};function Fu(e){const{url:t,label:n}=Object.prototype.hasOwnProperty.call(Bu,e)?Bu[e]:Bu.en;return`<div class="bu-safe-booking"><a href="${t}" class="bu-safe-booking-link"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" width="16px" height="16px" class="bu-safe-booking-icon"><path d="M75.98,41.62h-2.47L73.5,29.31C73.49,15.9,62.58,4.99,49.17,5C35.76,5.01,24.85,15.92,24.86,29.33l0.02,12.31H24 c-4.61,0.01-8.35,3.75-8.34,8.36v36.65c0,4.61,3.75,8.35,8.36,8.35L76,94.97c4.61,0,8.35-3.74,8.34-8.35V49.96 C84.34,45.35,80.59,41.62,75.98,41.62z M33.84,41.64l-0.02-12.31c0-8.47,6.88-15.36,15.35-15.37c8.47,0,15.36,6.89,15.36,15.35 l0.02,12.31L33.84,41.64z" /></svg>${n}</a></div>`}var zu=class extends e.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){Js(e)}render(){return this.state.hasError?/* @__PURE__ */d("h1",{children:"Something went wrong."}):this.props.children}};function Hu(e,t,n){const r=new URL(`/portal_api/v1/config/${t}`,new URL(e).origin);return r.search=new URLSearchParams({portal_code:n}).toString(),r.toString()}async function Yu(e,t){try{return await Ea.get(e,{headers:{locale:t}}).json()}catch(n){if(n instanceof ui)throw new Error(`Portal settings request failed (${n.response.status})`);throw n}}function Wu({apiUrl:e,locale:t,portalCode:n}){return Yu(function({apiUrl:e,portalCode:t}){return Hu(e,"settings",t)}({apiUrl:e,portalCode:n}),t)}function Ju({apiUrl:e,locale:t,portalCode:n}){return Yu(function({apiUrl:e,portalCode:t}){return Hu(e,"booking-fields",t)}({apiUrl:e,portalCode:n}),t)}function Ku({apiUrl:e,locale:t,portalCode:n}){return Yu(function({apiUrl:e,portalCode:t}){return Hu(e,"filter-fields",t)}({apiUrl:e,portalCode:n}),t)}function Vu(e,t){const n=`_${t}`,r=e??{},o={};return Object.keys(r).forEach(e=>{e.endsWith(n)&&(o[e.slice(0,-n.length)]=r[e])}),o}async function
|
|
165
|
+
/* @__PURE__ */d("div",{className:"bu_reviews__note",children:/* @__PURE__ */d("a",{href:"https://www.bukazu.com",target:"_blank",rel:"noopener noreferrer",children:Q("reviews_note_link")})})]})}var Bu={nl:{url:"http://bukazu.com/veiligheid",label:"Beveiligd en mogelijk gemaakt door BUKAZU"},en:{url:"http://bukazu.com/en/security",label:"Secured and made possible by BUKAZU"},de:{url:"http://bukazu.com/de/sicherheit",label:"Gesichert und ermöglicht durch BUKAZU"},fr:{url:"http://bukazu.com/fr/securite",label:"Sécurisé et rendu possible par BUKAZU"},es:{url:"http://bukazu.com/es/seguridad",label:"Asegurado y hecho posible por BUKAZU"},it:{url:"http://bukazu.com/it/sicurezza",label:"Protetto e reso possibile da BUKAZU"}};function Fu(e){const{url:t,label:n}=Object.prototype.hasOwnProperty.call(Bu,e)?Bu[e]:Bu.en;return`<div class="bu-safe-booking"><a href="${t}" class="bu-safe-booking-link"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve" width="16px" height="16px" class="bu-safe-booking-icon"><path d="M75.98,41.62h-2.47L73.5,29.31C73.49,15.9,62.58,4.99,49.17,5C35.76,5.01,24.85,15.92,24.86,29.33l0.02,12.31H24 c-4.61,0.01-8.35,3.75-8.34,8.36v36.65c0,4.61,3.75,8.35,8.36,8.35L76,94.97c4.61,0,8.35-3.74,8.34-8.35V49.96 C84.34,45.35,80.59,41.62,75.98,41.62z M33.84,41.64l-0.02-12.31c0-8.47,6.88-15.36,15.35-15.37c8.47,0,15.36,6.89,15.36,15.35 l0.02,12.31L33.84,41.64z" /></svg>${n}</a></div>`}var zu=class extends e.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){Js(e)}render(){return this.state.hasError?/* @__PURE__ */d("h1",{children:"Something went wrong."}):this.props.children}};function Hu(e,t,n){const r=new URL(`/portal_api/v1/config/${t}`,new URL(e).origin);return r.search=new URLSearchParams({portal_code:n}).toString(),r.toString()}async function Yu(e,t){try{return await Ea.get(e,{headers:{locale:t}}).json()}catch(n){if(n instanceof ui)throw new Error(`Portal settings request failed (${n.response.status})`);throw n}}function Wu({apiUrl:e,locale:t,portalCode:n}){return Yu(function({apiUrl:e,portalCode:t}){return Hu(e,"settings",t)}({apiUrl:e,portalCode:n}),t)}function Ju({apiUrl:e,locale:t,portalCode:n}){return Yu(function({apiUrl:e,portalCode:t}){return Hu(e,"booking-fields",t)}({apiUrl:e,portalCode:n}),t)}function Ku({apiUrl:e,locale:t,portalCode:n}){return Yu(function({apiUrl:e,portalCode:t}){return Hu(e,"filter-fields",t)}({apiUrl:e,portalCode:n}),t)}function Vu(e,t){const n=`_${t}`,r=e??{},o={};return Object.keys(r).forEach(e=>{e.endsWith(n)&&(o[e.slice(0,-n.length)]=r[e])}),o}function Xu(e){const{results_amount:t,no_results:n,...r}=e,o=Number(t??n);return{...r,no_results:Number.isFinite(o)&&o>0?o:20}}async function Gu({portalCode:e,isSearchPage:t,isBookingPage:n,apiUrl:r,locale:o}){const s=Wu({apiUrl:r,locale:o,portalCode:e}),i=t?Ku({apiUrl:r,locale:o,portalCode:e}):Promise.resolve(void 0),a=n?Ju({apiUrl:r,locale:o,portalCode:e}):Promise.resolve(void 0),[c,u,l]=await Promise.all([s,i,a]);if(!c)throw new Error("Portal site data is missing");return function({settings:e,filterFields:t,bookingFields:n,locale:r}){const o=(n??[]??[]).map(e=>({id:e.id,label:e.label,field_type:e.field_type,type:e.field_type,options:e.field_options,required:e.required,placeholder:e.placeholder})),s=(c=t??[],(c??[]).map(e=>({id:e.id,type:e.field_type,label:e.label,...void 0!==e.max&&{max:e.max},...void 0!==e.options&&{options:e.options}}))),i=e.colors,a={filtersForm:Xu(e.filters_form),bookingFields:o,searchFields:void 0!==t?s:void 0,bookingForm:{},colors:i};var c;return{name:e.name,portal_code:e.portal_code,options:a,colorsConfiguration:i,currencies:ri(e.currencies),bookingFormConfiguration:e.booking_form,booking_fields:o,max_persons:0,max_bedrooms:0,max_bathrooms:0,max_weekprice:0,...Vu(e.labels,r)}}({settings:c,filterFields:u,bookingFields:l,locale:o})}function Qu({pageType:e,locale:t,filters:n={}}){const{portalCode:r,objectCode:i,apiUrl:a,locale:c}=o(ti),[l,f]=u({status:"loading"}),m=!i,g=!!i&&"reviews"!==e;if(s(()=>{let e=!0;f({status:"loading"});const t=G(c);return Gu({portalCode:r,isSearchPage:m,isBookingPage:g,apiUrl:a,locale:c}).then(async n=>{await t,e&&f({status:"ready",portalSite:n})}).catch(async n=>{if(await t,!e)return;const r=n instanceof Error?n:/* @__PURE__ */new Error("A portal settings request failed");f({status:"error",error:r})}),()=>{e=!1}},[r,m,g,a,c]),"loading"===l.status)/* @__PURE__ */return d(p,{});if("error"===l.status)/* @__PURE__ */return d(Gs,{errors:l.error});const _=l.portalSite;let y=_.options;const v=_.colorsConfiguration,b=document.documentElement;let w;return b.style.setProperty("--bukazu-discount",v.discount),b.style.setProperty("--bukazu-cell",v.cell),b.style.setProperty("--bukazu-arrival",v.arrival),b.style.setProperty("--bukazu-booked",v.booked),b.style.setProperty("--bukazu-departure",v.departure),b.style.setProperty("--bukazu-button",v.button),b.style.setProperty("--bukazu-button_cta",v.button_cta),w=i&&null!==i&&"reviews"!==e?/* @__PURE__ */h(zu,{children:[/* @__PURE__ */d($u,{portalSite:_}),/* @__PURE__ */d("div",{dangerouslySetInnerHTML:{__html:Fu(t)}})]}):i&&null!==i&&"reviews"===e?/* @__PURE__ */d(qu,{objectCode:i,portalCode:r,apiUrl:a}):/* @__PURE__ */d(nc,{PortalSite:_,locale:t,options:y,filters:n}),/* @__PURE__ */d(si,{currencies:_.currencies,children:w})}function Zu({portalCode:e,objectCode:t,pageType:n,locale:r,filters:o,api_url:i="https://api.bukazu.com",sentryDsn:a}){const c=Zs(r);s(()=>{var n;a&&(n=a,void 0===Kt()&&Ys({dsn:n,integrations:e=>e.filter(e=>"GlobalHandlers"!==e.name)})),Ws({portalCode:e,objectCode:t,locale:c})},[a,e,t,c]),s(()=>{window.__localeId__=c,async function(){}()},[c]);const u=function({portalCode:e,pageType:t,locale:n,filters:r}){let o=[];if(!e){let e="No portal code is specified, so portal is not working";o.push(e)}if(t&&"reviews"!==t){let e=`'${t}' is not a valid page`;o.push(e)}n&&(Zs(n),n.toLowerCase().split(/[-_]/)[0]);r&&ei(r);const i=JSON.stringify(o);return s(()=>{o.forEach(e=>Ks(e))},[i]),0!==o.length&&/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("h2",{children:"Something went wrong please try again "}),/* @__PURE__ */d("ul",{children:o.map(e=>/* @__PURE__ */d("li",{children:e},e))})]})}({portalCode:e,pageType:n,locale:c,filters:o});return u||/* @__PURE__ */d(ti.Provider,{value:{portalCode:e,objectCode:t,locale:c,apiUrl:i},children:/* @__PURE__ */d("div",{className:"bu-portal",children:/* @__PURE__ */d(Qu,{pageType:n,locale:c,filters:o})})})}export{Zu as default};
|