bukazu-portal-react 4.1.0 → 4.2.0
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 +89 -90
- package/build/portal.website.js +2 -2
- package/package.json +2 -2
package/build/portal.es.js
CHANGED
|
@@ -15,17 +15,16 @@ return d("div",{className:"bu-chips",role:"group","aria-labelledby":i,"aria-labe
|
|
|
15
15
|
return d("button",{type:"button",className:"bu-chip "+(i?"bu-disabled":""),"data-value":n,"aria-pressed":o===n,disabled:i,onClick:()=>(e=>{r(t.id,o===e?null:e)})(n),children:e.name},n)})})}function m({options:e,field:t,filters:n,value:r,onChange:o}){const i=e=>{o(t.id,e.currentTarget.value)},s=n.countries,a=Array.isArray(n.regions)?n.regions:[n.regions].filter(e=>String(e).trim());if(e&&["countries","cities","regions"].includes(t.id)){const n=e;/* @__PURE__ */
|
|
16
16
|
return h("select",{id:t.id,name:t.id,onBlur:i,onChange:i,value:r,children:[/* @__PURE__ */d("option",{value:""}),n.map(e=>{let n=!1;return["cities","regions"].includes(t.id)&&(s&&!s.includes(e.country_id)&&(n=!0),"cities"===t.id&&(!1!=!a.length||a.includes(e.region)||(n=!0))),/* @__PURE__ */d("option",{value:e.id,id:e.region,disabled:n,hidden:n,children:e.name},e.id)})]})}/* @__PURE__ */return h("select",{id:t.id,name:t.id,onBlur:i,onChange:i,value:r,children:[/* @__PURE__ */d("option",{value:""}),e.map(e=>"object"==typeof e?/* @__PURE__ */d("option",{value:e.id,children:e.name},e.id):/* @__PURE__ */d("option",{value:e,children:e},e))]})}function g({options:e,filters:t,onChange:n,field:r,labelledBy:o}){const i=t.countries,s=e=>{n(r.id,e.currentTarget.value)};/* @__PURE__ */
|
|
17
17
|
return d("ul",{className:"radioList",role:"radiogroup","aria-labelledby":o,"aria-label":o?void 0:r.label??r.id,children:e.map(e=>{const t="string"==typeof e?e:e.id,n="string"==typeof e?e:e.name,o="string"==typeof e?void 0:e.country_id,a=!(!i||!o)&&!i.includes(o);/* @__PURE__ */
|
|
18
|
-
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&&""
|
|
19
|
-
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__ */
|
|
20
|
-
return d("input",{id:t.id,name:t.id,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"],w=["select","number","date","text"];function x(e){return b.includes(e.type)?e.type:v.includes(e.id)?"select":"text"}function k(e){return w.includes(x(e))}var S=["countries","cities","regions"];function C(e,t){if(e.options)return e.options;if(void 0!==e.max)return"weekprice_max"===e.id?function(e){let t=Math.ceil(e/100);return Array.from({length:t+1},(e,t)=>100*t)}(e.max):(n=e.max,Array.from({length:n+1},(e,t)=>t));var n;if(S.includes(e.id)){const n=t[e.id];return Array.isArray(n)?n:[]}return[]}function E({PortalSite:e,field:t,filters:n,value:r,onFilterChange:o,options:i,labelId:s}){const a=i??C(t,e),c=x(t);return"select"===c?/* @__PURE__ */d(m,{options:a,field:t,filters:n,value:r,onChange:o}):"list"===c?/* @__PURE__ */d(f,{options:a,field:t,filters:n,value:r,onChange:o,labelledBy:s}):"radio"===c?/* @__PURE__ */d(g,{options:a,field:t,filters:n,onChange:o,labelledBy:s}):"number"===c?/* @__PURE__ */d(y,{PortalSite:e,field:t,value:r,onChange:o}):"date"===c?/* @__PURE__ */d(_,{field:t,value:r,onChange:o}):/* @__PURE__ */d("input",{id:t.id,name:t.id,type:"text",defaultValue:r,onBlur:e=>{o(t.id,e.target.value)}})}var N={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.",no_prices_available_for_period:"No prices are available for the selected period.",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.",active_filters:"Active filters ({count})",clear_all:"Clear all",remove_filter:"Remove {filter}",view_mode:"View",grid_view:"Grid view",list_view:"List view",show_results:"Show results"},T=["en","nl","de","fr","es","it"];function R(e){return function(e){return T.includes(e)}(e)?e:"en"}new TextEncoder;function A(e,t,n){let r=t;const o=r+n,i=[];let s="";for(;r<o;){const t=e[r++];if(128&t)if(192==(224&t)){const n=63&e[r++];i.push((31&t)<<6|n)}else if(224==(240&t)){const n=63&e[r++],o=63&e[r++];i.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,i.push(n>>>10&1023|55296),n=56320|1023&n),i.push(n)}else i.push(t);else i.push(t);i.length>=4096&&(s+=String.fromCharCode(...i),i.length=0)}return i.length>0&&(s+=String.fromCharCode(...i)),s}var $=new TextDecoder;function P(e,t,n){return n>200?function(e,t,n){const r=e.subarray(t,t+n);return $.decode(r)}(e,t,n):A(e,t,n)}var D=class{type;data;constructor(e,t){this.type=e,this.data=t}},L=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 j(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}function U({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),i=new DataView(o.buffer);return i.setUint32(0,t<<2|3&n),i.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 M={type:-1,encode:function(e){return e instanceof Date?U(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:j(t,4),nsec:t.getUint32(0)};default:throw new L(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}(e);/* @__PURE__ */
|
|
21
|
-
return new
|
|
22
|
-
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 s of e){if(n)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(s);try{t=this.doDecodeSync(),n=!0}catch(ed){if(!(ed instanceof RangeError))throw ed}this.totalPos+=this.pos}if(n){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return t}const{headByte:r,pos:o,totalPos:i}=this;throw new RangeError(`Insufficient data in parsing ${q(r)} at ${i} (${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(ed){if(!(ed instanceof RangeError))throw ed}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 L(`Unrecognized type byte: ${q(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===B){if(e.array[e.position]=t,e.position++,e.position!==e.size)continue e;t=e.array,n.release(e)}else{if(e.type===F){if("__proto__"===t)throw new L("The key __proto__ is not allowed");e.key=this.mapKeyConverter(t),e.type=z;continue e}if(e.map[e.key]=t,e.readCount++,e.readCount!==e.size){e.key=null,e.type=F;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 L(`Unrecognized array type byte: ${q(e)}`)}}pushMapState(e){if(e>this.maxMapLength)throw new L(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new L(`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 L(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+t+e)throw V;const n=this.pos+t;let r;return r=this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?this.keyDecoder.decode(this.bytes,n,e):P(this.bytes,n,e),this.pos+=t+e,r}stateIsMapKey(){return this.stack.length>0&&this.stack.top().type===F}decodeBinary(e,t){if(e>this.maxBinLength)throw new L(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+t))throw V;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 L(`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=j(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 X(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 G(i).decode(o);var o,i}var Q=/* @__PURE__ */new Map([["en",N]]),Z=/* @__PURE__ */new Map,ee={en:async()=>(await(import("./en-OC6xPyPa.js"))).default,nl:async()=>(await(import("./nl-CHsVPRQk.js"))).default,de:async()=>(await(import("./de-DFLve7VR.js"))).default,fr:async()=>(await(import("./fr-D7NJkc7d.js"))).default,es:async()=>(await(import("./es-CSWz839L.js"))).default,it:async()=>(await(import("./it-BRZbP3bC.js"))).default};async function te(e){const t=R(e),n=Q.get(t);if(n)return n;const r=Z.get(t);if(r)return r;const o=async function(e){return X(await ee[e](),`Failed to load translations for locale "${e}"`)}(t).then(e=>(Q.set(t,e),e)).catch(()=>Q.get("en")??{}).finally(()=>{Z.delete(t)});return Z.set(t,o),o}function ne(e,t){const n=R("undefined"!=typeof window&&window.__localeId__||"en"),r=Q.get(n)??Q.get("en")??{};Q.has(n)||te(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 re(e,t){const n="undefined"!=typeof window&&window.__localeId__||"en";return new Intl.NumberFormat(n,t).format(e)}te("en");var oe=({size:e=14})=>/* @__PURE__ */d("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:/* @__PURE__ */d("path",{d:"M5 5l10 10M15 5L5 15"})});function ie({items:e,onRemove:t,onClear:n}){return 0===e.length?null:/* @__PURE__ */h("div",{className:"bu-active-filters",children:[/* @__PURE__ */h("div",{className:"bu-active-filters-header",children:[/* @__PURE__ */d("span",{children:ne("active_filters",{count:e.length})}),/* @__PURE__ */d("button",{type:"button",className:"bu-link-button",onClick:n,children:ne("clear_all")})]}),/* @__PURE__ */d("div",{className:"bu-pills",children:e.map(e=>/* @__PURE__ */h("button",{type:"button",className:"bu-pill","data-filter-key":e.key,"aria-label":ne("remove_filter",{filter:e.text}),onClick:()=>t(e.key),children:[/* @__PURE__ */d("span",{children:e.text}),/* @__PURE__ */d("span",{className:"bu-pill-remove",children:/* @__PURE__ */d(oe,{})})]},e.key))})]})}var se=({size:e=20})=>/* @__PURE__ */h("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:[
|
|
18
|
+
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??"",[o,s]=u(r);function a(){o!==r&&t(n.id,o)}return i(()=>{s(r)},[r]),/* @__PURE__ */d("input",{type:"date",id:n.id,name:n.id,value:o,onChange:e=>s(e.target.value),onBlur:a,onKeyDown:e=>{"Enter"===e.key&&a()}})}function y({PortalSite:e,field:t,value:n,onChange:r}){/* @__PURE__ */
|
|
19
|
+
return d("input",{id:t.id,name:t.id,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 b=["persons_min","persons_max","bedrooms_min","bathrooms_min","weekprice_max"],v=["select","list","radio","number","date"],w=["select","number","date","text"];function x(e){return v.includes(e.type)?e.type:b.includes(e.id)?"select":"text"}function k(e){return w.includes(x(e))}var S=["countries","cities","regions"];function C(e,t){if(e.options)return e.options;if(void 0!==e.max)return"weekprice_max"===e.id?function(e){let t=Math.ceil(e/100);return Array.from({length:t+1},(e,t)=>100*t)}(e.max):(n=e.max,Array.from({length:n+1},(e,t)=>t));var n;if(S.includes(e.id)){const n=t[e.id];return Array.isArray(n)?n:[]}return[]}function E({PortalSite:e,field:t,filters:n,value:r,onFilterChange:o,options:i,labelId:s}){const a=i??C(t,e),c=x(t);return"select"===c?/* @__PURE__ */d(m,{options:a,field:t,filters:n,value:r,onChange:o}):"list"===c?/* @__PURE__ */d(f,{options:a,field:t,filters:n,value:r,onChange:o,labelledBy:s}):"radio"===c?/* @__PURE__ */d(g,{options:a,field:t,filters:n,onChange:o,labelledBy:s}):"number"===c?/* @__PURE__ */d(y,{PortalSite:e,field:t,value:r,onChange:o}):"date"===c?/* @__PURE__ */d(_,{field:t,value:r,onChange:o}):/* @__PURE__ */d("input",{id:t.id,name:t.id,type:"text",defaultValue:r,onBlur:e=>{o(t.id,e.target.value)}})}var T={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.",no_prices_available_for_period:"No prices are available for the selected period.",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.",active_filters:"Active filters ({count})",clear_all:"Clear all",remove_filter:"Remove {filter}",view_mode:"View",grid_view:"Grid view",list_view:"List view",show_results:"Show results"},N=["en","nl","de","fr","es","it"];function R(e){return function(e){return N.includes(e)}(e)?e:"en"}new TextEncoder;function A(e,t,n){let r=t;const o=r+n,i=[];let s="";for(;r<o;){const t=e[r++];if(128&t)if(192==(224&t)){const n=63&e[r++];i.push((31&t)<<6|n)}else if(224==(240&t)){const n=63&e[r++],o=63&e[r++];i.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,i.push(n>>>10&1023|55296),n=56320|1023&n),i.push(n)}else i.push(t);else i.push(t);i.length>=4096&&(s+=String.fromCharCode(...i),i.length=0)}return i.length>0&&(s+=String.fromCharCode(...i)),s}var $=new TextDecoder;function P(e,t,n){return n>200?function(e,t,n){const r=e.subarray(t,t+n);return $.decode(r)}(e,t,n):A(e,t,n)}var I=class{type;data;constructor(e,t){this.type=e,this.data=t}},D=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 j(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}function L({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),i=new DataView(o.buffer);return i.setUint32(0,t<<2|3&n),i.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 O={type:-1,encode:function(e){return e instanceof Date?L(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:j(t,4),nsec:t.getUint32(0)};default:throw new D(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}(e);/* @__PURE__ */
|
|
20
|
+
return new Date(1e3*t.sec+t.nsec/1e6)}},U=class e{static defaultCodec=new e;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(O)}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 I(-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 I(n,o)}}return e instanceof I?e:null}decode(e,t,n){const r=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return r?r(e,t,n):new I(t,e)}};function M(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 q(e){return`${e<0?"-":""}0x${Math.abs(e).toString(16).padStart(2,"0")}`}var B="array",F="map_key",z="map_value",H=e=>{if("string"==typeof e||"number"==typeof e)return e;throw new D("The type of key must be string or number but "+typeof e)},Y=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){const t=this.getUninitializedStateFromPool();t.type=B,t.position=0,t.size=e,t.array=new Array(e)}pushMapState(e){const t=this.getUninitializedStateFromPool();t.type=F,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===B){const t=e;t.size=0,t.array=void 0,t.position=0,t.type=void 0}if(e.type===F||e.type===z){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}},W=/* @__PURE__ */new DataView(/* @__PURE__ */new ArrayBuffer(0)),J=new Uint8Array(W.buffer);try{W.getInt8(0)}catch(Rd){if(!(Rd 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 V=/* @__PURE__ */new RangeError("Insufficient data"),K=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=A(e,t,n),i=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(i,o),o}},G=class e{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=W;bytes=J;headByte=-1;stack=new Y;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??U.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:K,this.mapKeyConverter=e?.mapKeyConverter??H}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=M(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=M(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__ */
|
|
21
|
+
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 s of e){if(n)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(s);try{t=this.doDecodeSync(),n=!0}catch(Rd){if(!(Rd instanceof RangeError))throw Rd}this.totalPos+=this.pos}if(n){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return t}const{headByte:r,pos:o,totalPos:i}=this;throw new RangeError(`Insufficient data in parsing ${q(r)} at ${i} (${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(Rd){if(!(Rd instanceof RangeError))throw Rd}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 D(`Unrecognized type byte: ${q(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===B){if(e.array[e.position]=t,e.position++,e.position!==e.size)continue e;t=e.array,n.release(e)}else{if(e.type===F){if("__proto__"===t)throw new D("The key __proto__ is not allowed");e.key=this.mapKeyConverter(t),e.type=z;continue e}if(e.map[e.key]=t,e.readCount++,e.readCount!==e.size){e.key=null,e.type=F;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 D(`Unrecognized array type byte: ${q(e)}`)}}pushMapState(e){if(e>this.maxMapLength)throw new D(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new D(`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 D(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+t+e)throw V;const n=this.pos+t;let r;return r=this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?this.keyDecoder.decode(this.bytes,n,e):P(this.bytes,n,e),this.pos+=t+e,r}stateIsMapKey(){return this.stack.length>0&&this.stack.top().type===F}decodeBinary(e,t){if(e>this.maxBinLength)throw new D(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+t))throw V;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 D(`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=j(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 X(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 G(i).decode(o);var o,i}var Q=/* @__PURE__ */new Map([["en",T]]),Z=/* @__PURE__ */new Map,ee={en:async()=>(await(import("./en-OC6xPyPa.js"))).default,nl:async()=>(await(import("./nl-CHsVPRQk.js"))).default,de:async()=>(await(import("./de-DFLve7VR.js"))).default,fr:async()=>(await(import("./fr-D7NJkc7d.js"))).default,es:async()=>(await(import("./es-CSWz839L.js"))).default,it:async()=>(await(import("./it-BRZbP3bC.js"))).default};async function te(e){const t=R(e),n=Q.get(t);if(n)return n;const r=Z.get(t);if(r)return r;const o=async function(e){return X(await ee[e](),`Failed to load translations for locale "${e}"`)}(t).then(e=>(Q.set(t,e),e)).catch(()=>Q.get("en")??{}).finally(()=>{Z.delete(t)});return Z.set(t,o),o}function ne(e,t){const n=R("undefined"!=typeof window&&window.__localeId__||"en"),r=Q.get(n)??Q.get("en")??{};Q.has(n)||te(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 re(e,t){const n="undefined"!=typeof window&&window.__localeId__||"en";return new Intl.NumberFormat(n,t).format(e)}te("en");var oe=({size:e=14})=>/* @__PURE__ */d("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:/* @__PURE__ */d("path",{d:"M5 5l10 10M15 5L5 15"})});function ie({items:e,onRemove:t,onClear:n}){return 0===e.length?null:/* @__PURE__ */h("div",{className:"bu-active-filters",children:[/* @__PURE__ */h("div",{className:"bu-active-filters-header",children:[/* @__PURE__ */d("span",{children:ne("active_filters",{count:e.length})}),/* @__PURE__ */d("button",{type:"button",className:"bu-link-button",onClick:n,children:ne("clear_all")})]}),/* @__PURE__ */d("div",{className:"bu-pills",children:e.map(e=>/* @__PURE__ */h("button",{type:"button",className:"bu-pill","data-filter-key":e.key,"aria-label":ne("remove_filter",{filter:e.text}),onClick:()=>t(e.key),children:[/* @__PURE__ */d("span",{children:e.text}),/* @__PURE__ */d("span",{className:"bu-pill-remove",children:/* @__PURE__ */d(oe,{})})]},e.key))})]})}var se=({size:e=20})=>/* @__PURE__ */h("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:[
|
|
23
22
|
/* @__PURE__ */d("path",{d:"M3 6h9M15 6h2M3 14h3M9 14h8"}),
|
|
24
23
|
/* @__PURE__ */d("circle",{cx:"13",cy:"6",r:"2"}),
|
|
25
|
-
/* @__PURE__ */d("circle",{cx:"7",cy:"14",r:"2"})]}),ae={en:"en-GB",nl:"nl-NL",de:"de-DE",fr:"fr-FR",it:"it-IT",es:"es-ES"};var ce=/* @__PURE__ */new Map;function ue(e,t){const n=function(){const e="undefined"!=typeof window?window.__localeId__:void 0;return(e&&ae[e])??"en-GB"}(),r=`${n}:${JSON.stringify(t)}`;let o=ce.get(r);return o||(o=new Intl.DateTimeFormat(n,t),ce.set(r,o)),o.format(e)}function le(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function de(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function he(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function pe(e,t){return he(e,-t)}function fe(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 me(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 i=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(o,i)),n}(e,-t)}function ge(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function _e(e){return new Date(e.getFullYear(),e.getMonth(),1)}function ye(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function
|
|
24
|
+
/* @__PURE__ */d("circle",{cx:"7",cy:"14",r:"2"})]}),ae={en:"en-GB",nl:"nl-NL",de:"de-DE",fr:"fr-FR",it:"it-IT",es:"es-ES"};var ce=/* @__PURE__ */new Map;function ue(e,t){const n=function(){const e="undefined"!=typeof window?window.__localeId__:void 0;return(e&&ae[e])??"en-GB"}(),r=`${n}:${JSON.stringify(t)}`;let o=ce.get(r);return o||(o=new Intl.DateTimeFormat(n,t),ce.set(r,o)),o.format(e)}function le(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function de(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function he(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function pe(e,t){return he(e,-t)}function fe(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 me(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 i=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(o,i)),n}(e,-t)}function ge(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function _e(e){return new Date(e.getFullYear(),e.getMonth(),1)}function ye(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function be(e){const t=ge(e);return t.setDate(t.getDate()-t.getDay()),t}function ve(e){const t=ge(e);return t.setDate(t.getDate()+(6-t.getDay())),t}function we(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function xe(e,t){return e.getTime()>t.getTime()}function ke(e,t){return e.getTime()<t.getTime()}function Se(e,t){const n=ge(e).getTime(),r=ge(t).getTime();return Math.round((n-r)/864e5)}var Ce={month:"long",year:"numeric"},Ee={weekday:"long",day:"2-digit",month:"long",year:"numeric"},Te={year:"numeric",month:"long",day:"numeric"};function Ne(e){return ue(le(e.slice(0,10)),Te)}var Re={day:"numeric",month:"short",year:"numeric"};function Ae(e){return null!=e&&("string"==typeof e?""!==e.trim():!Array.isArray(e)||e.length>0)}function $e(e,t){const n={...e};return delete n[t],n}function Pe(e,t){return(Array.isArray(t)?t:[t]).map(t=>function(e){return"date"===e.type||e.id.endsWith("_date")}(e)&&"string"==typeof t?function(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?ue(le(e),Re):e}(t):function(e,t){const n=String(t);for(const r of e.options)if("object"==typeof r){if(String(r.id)===n)return r.name}else if(String(r)===n)return String(r);return null}(e,t)??String(t)).join(", ")}var Ie=["countries","regions","cities"];function De(e,t){return String(e)===String(t)}function je(e,t){return Array.isArray(e)?e.some(e=>De(e,t)):De(e,t)}function Le(e,t){for(const n of e??[])if("object"==typeof n&&De(n.id,t))return n;return null}function Oe(e,t,n,r){let o=Ae(n)?{...e,[t]:n}:$e(e,t);if(!function(e){return Ie.includes(e)}(t))return o;const i=Ie.indexOf(t);if(!Ae(n)){for(const e of Ie.slice(i+1))o=$e(o,e);return o}const s=o;if("cities"===t){const e=Le(r.get("cities"),n);void 0!==e?.region&&null!==e.region&&(s.regions=String(e.region)),void 0!==e?.country_id&&null!==e.country_id&&(s.countries=String(e.country_id))}else if("regions"===t){const e=Le(r.get("regions"),n);void 0!==e?.country_id&&null!==e.country_id&&(s.countries=String(e.country_id))}const a=Le(r.get("regions"),s.regions);Ae(s.regions)&&void 0!==a?.country_id&&Ae(s.countries)&&!je(s.countries,a.country_id)&&(o=$e(o,"regions"));const c=Le(r.get("cities"),s.cities),u=o;if(Ae(u.cities)&&c){const e=void 0!==c.country_id&&Ae(u.countries)&&!je(u.countries,c.country_id),t=void 0!==c.region&&Ae(u.regions)&&!je(u.regions,c.region);(e||t)&&(o=$e(o,"cities"))}return o}var Ue="bu-filters-panel";function Me({filters:e,onFilterChange:t,PortalSite:n,options:r}){const[o,i]=u(!1),s=r.searchFields??[],a=s.map(e=>({...e,options:C(e,n)})),c=new Map(a.map(e=>[e.id,e.options])),p=function(e,t){const n=e;return t.filter(e=>Ae(n[e.id])).map(e=>{const t=e.label??e.id,r=Pe(e,n[e.id]);return{key:e.id,label:t,value:r,text:`${t}: ${r}`}})}(e,a),f=e,m=s.filter(e=>!Ae(f[e.id]));function g(n,r){t(Oe(e,n,r,c))}const _=Boolean(r.filtersForm.fixed_mobile),y=[r.filtersForm.show??!0?`filters filters-${r.filtersForm.location}`:"filters-hidden",_?"bu-filters-sheet":"",o?"showOnMobile":""].filter(Boolean).join(" "),b=p.length>0?/* @__PURE__ */d("span",{className:"bu-badge",children:p.length}):null;/* @__PURE__ */
|
|
26
25
|
return h(l,{children:[
|
|
27
|
-
/* @__PURE__ */h("button",{type:"button",className:_?"bu-filters-fab":"filters-button","aria-expanded":o,"aria-controls":
|
|
28
|
-
/* @__PURE__ */h("div",{id:
|
|
26
|
+
/* @__PURE__ */h("button",{type:"button",className:_?"bu-filters-fab":"filters-button","aria-expanded":o,"aria-controls":Ue,onClick:()=>i(!o),children:[_&&/* @__PURE__ */d(se,{}),ne("filters"),b]}),_&&o&&/* @__PURE__ */d("div",{className:"bu-filters-backdrop","data-testid":"filters-backdrop",onClick:()=>i(!1)}),
|
|
27
|
+
/* @__PURE__ */h("div",{id:Ue,className:y,onKeyDown:e=>{"Escape"===e.key&&i(!1)},children:[
|
|
29
28
|
/* @__PURE__ */h("div",{className:"filters-header",children:[/* @__PURE__ */d("span",{className:"filters-title",children:ne("filters")}),/* @__PURE__ */d("button",{type:"button",className:"filters-close","aria-label":ne("close"),onClick:()=>i(!1),children:/* @__PURE__ */d(oe,{size:18})})]}),
|
|
30
29
|
/* @__PURE__ */d(ie,{items:p,onRemove:e=>g(e,null),onClear:()=>t({})}),m.map(t=>/* @__PURE__ */h("div",{className:"bu-field",id:`field-${t.id}`,children:[/* @__PURE__ */d("label",{id:`${t.id}-label`,htmlFor:k(t)?t.id:void 0,children:t.label}),/* @__PURE__ */d(E,{field:t,labelId:`${t.id}-label`,options:c.get(t.id),PortalSite:n,filters:e,value:String(f[t.id]??""),onFilterChange:g})]},t.id)),_&&/* @__PURE__ */d("button",{type:"button",className:"bu-filters-apply",onClick:()=>i(!1),children:ne("show_results")})]})]})}function qe(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Be(e){return"number"==typeof e?Number.isInteger(e):"string"==typeof e&&/^-?\d+$/.test(e)}function Fe({result:e,options:t,currency:n}){const r=[t.show_city&&`<span>${qe(e.city)}, </span>`,t.show_region&&`<span>${qe(e.province)}, </span>`,t.show_country&&`<span>${qe(e.country_name)}</span>`].filter(Boolean).join(""),o=[t.show_persons&&`<div>${qe(e.persons)} ${qe(ne("persons"))}</div>`,t.show_bedrooms&&`<div>${qe(e.bedrooms)} ${qe(ne("bedrooms"))}</div>`,t.show_bathrooms&&`<div>${qe(e.bathrooms)} ${qe(ne("bathrooms"))}</div>`].filter(Boolean).join(""),i=t.show_rating&&e.rating?`<div class="result-rating bu_card"><div class="result-rating-inner">${qe(e.rating.toFixed(1))}</div></div>`:"",s=t.show_price?e.booking_price?`<div class="result-price">${qe(ne("price_from"))}<span class="price">${qe(re(e.booking_price.total_price,{style:"currency",currency:e.booking_price.currency,minimumFractionDigits:0,maximumFractionDigits:0}))}</span></div>`:`<div class="result-price">${qe(ne("minimum_week_price"))}<span class="price">${qe(re(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="${qe(e.house_url)}"`:""}>\n <div class="bukazu-result-inner">\n <div class="image-holder">\n <img${e.image_url?` src="${qe(e.image_url)}"`:""} alt="${qe(e.name)}" />\n </div>\n <div class="result">\n <div class="result-title">${qe(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 ${i}\n ${s}\n <div class="result-button">${qe(ne("view_details"))}</div>\n </div>\n </div>\n </a>\n `}function ze({onPageChange:e,totalCount:t,activePage:n,limit:r}){const o=r>0?Math.ceil(t/r):0,i=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 i=n;i<=r;i++)o.push(i);return r<t-2&&o.push("..."),o.push(t-1),o}(n,o);/* @__PURE__ */
|
|
31
30
|
return h("div",{className:"bu-paginator",children:[/* @__PURE__ */h("div",{children:[t," ",ne("results")]}),o>1&&/* @__PURE__ */h("ul",{className:"bu-pagination",children:[
|
|
@@ -35,51 +34,51 @@ return h("div",{className:"bu-paginator",children:[/* @__PURE__ */h("div",{child
|
|
|
35
34
|
/* @__PURE__ */d("rect",{x:"11",y:"3",width:"6",height:"6",rx:"1"}),
|
|
36
35
|
/* @__PURE__ */d("rect",{x:"3",y:"11",width:"6",height:"6",rx:"1"}),
|
|
37
36
|
/* @__PURE__ */d("rect",{x:"11",y:"11",width:"6",height:"6",rx:"1"})]}),Ye=({size:e=18})=>/* @__PURE__ */d("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:/* @__PURE__ */d("path",{d:"M3 5h14M3 10h14M3 15h14"})});function We({mode:e,onChange:t}){/* @__PURE__ */
|
|
38
|
-
return h("div",{className:"bu-view-toggle",role:"group","aria-label":ne("view_mode"),children:[/* @__PURE__ */d("button",{type:"button","aria-pressed":"grid"===e,"aria-label":ne("grid_view"),onClick:()=>t("grid"),children:/* @__PURE__ */d(He,{})}),/* @__PURE__ */d("button",{type:"button","aria-pressed":"list"===e,"aria-label":ne("list_view"),onClick:()=>t("list"),children:/* @__PURE__ */d(Ye,{})})]})}var Je="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ve=globalThis,Ke="10.75.0";function Ge(){return Xe(Ve),Ve}function Xe(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||"10.75.0",t[Ke]=t["10.75.0"]||{}}function Qe(e,t,n=Ve){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Ke]=r["10.75.0"]||{};return o[e]||(o[e]=t())}var Ze=["debug","info","warn","error","log","assert","trace"],et={};function tt(e){if(!("console"in Ve))return e();const t=Ve.console,n={},r=Object.keys(et);r.forEach(e=>{const r=et[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function nt(){return ot().enabled}function rt(e,...t){Je&&nt()&&tt(()=>{Ve.console[e](`Sentry Logger [${e}]:`,...t)})}function ot(){return Je?Qe("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var it={enable:function(){ot().enabled=!0},disable:function(){ot().enabled=!1},isEnabled:nt,log:function(...e){rt("log",...e)},warn:function(...e){rt("warn",...e)},error:function(...e){rt("error",...e)}},st=/\(error: (.*)\)/,at=/captureMessage|captureException/;function ct(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],i=e.split("\n");for(let s=n;s<i.length;s++){let e=i[s];e.length>1024&&(e=e.slice(0,1024));const n=st.test(e)?e.replace(st,"$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(ut(t).function||"")&&t.pop();t.reverse(),at.test(ut(t).function||"")&&(t.pop(),at.test(ut(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||ut(t).filename,function:e.function||"?"}))}(o.slice(r))}}function ut(e){return e[e.length-1]||{}}var lt="<anonymous>";function dt(e){try{return e&&"function"==typeof e&&e.name||lt}catch{return lt}}function ht(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 pt={},ft={};function mt(e,t){return pt[e]=pt[e]||[],pt[e].push(t),()=>{const n=pt[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function gt(e,t){if(!ft[e]){ft[e]=!0;try{t()}catch(ed){Je&&it.error(`Error while instrumenting ${e}`,ed)}}}function _t(e,t){const n=e&&pt[e];if(n)for(const r of n)try{r(t)}catch(ed){Je&&it.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${dt(r)}\nError:`,ed)}}var yt=null;function vt(){yt=Ve.onerror,Ve.onerror=function(e,t,n,r,o){return _t("error",{column:r,error:o,line:n,msg:e,url:t}),!!yt&&yt.apply(this,arguments)},Ve.onerror.__SENTRY_INSTRUMENTED__=!0}var bt=null;function wt(){bt=Ve.onunhandledrejection,Ve.onunhandledrejection=function(e){return _t("unhandledrejection",e),!bt||bt.apply(this,arguments)},Ve.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var xt,kt=Object.prototype.toString;function St(e){switch(kt.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return jt(e,Error)}}function Ct(e,t){return kt.call(e)===`[object ${t}]`}function Et(e){return Ct(e,"ErrorEvent")}function Nt(e){return Ct(e,"DOMError")}function Tt(e){return Ct(e,"String")}function Rt(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function At(e){return null===e||Rt(e)||"object"!=typeof e&&"function"!=typeof e}function $t(e){return Ct(e,"Object")}function Pt(e){return"object"==typeof e&&null!==e}function Dt(e){return"undefined"!=typeof Event&&jt(e,Event)}function Lt(e){return Boolean(e?.then&&"function"==typeof e.then)}function jt(e,t){try{return e instanceof t}catch{return!1}}function Ut(e){return"undefined"!=typeof Request&&jt(e,Request)}function Mt(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const o=n(r);"function"==typeof o&&It(o,r);try{e[t]=o}catch{Je&&it.log(`Failed to replace method "${t}" in object`,e)}}function Ot(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Je&&it.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function It(e,t){try{e.prototype=t.prototype=t.prototype||{},Ot(e,"__sentry_original__",t)}catch{}}function qt(e){return e.__sentry_original__}function Bt(e){if(St(e))return{message:e.message,name:e.name,stack:e.stack,...Ft(e)};if(Dt(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...Ft(e)}}return e}function Ft(e){return Pt(e)?Object.fromEntries(Object.entries(e)):{}}function zt(e){if(void 0!==xt)return xt?xt(e):e();const t=/* @__PURE__ */Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=Ve;return t in n&&"function"==typeof n[t]?(xt=n[t])(e):(xt=null,e())}function Ht(){return zt(()=>Math.random())}function Yt(){return zt(()=>Date.now())}var Wt,Jt,Vt=/* @__PURE__ */Symbol.for("sentry.skipNormalization"),Kt=/* @__PURE__ */Symbol.for("sentry.overrideNormalizationDepth");function Gt(e,t=100,n=1/0){try{return Qt("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Xt(e,t=3,n=102400){const r=Gt(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?Xt(e,t-1,n):r;var o}function Qt(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[i,s]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=Zt(e,t);if(!a.startsWith("[object "))return a;if(function(e){return Boolean(e[Vt])}(t))return t;const c=function(e){const t=e[Kt];return"number"==typeof t?t:void 0}(t),u=void 0!==c?c:n;if(0===u)return a.replace("object ","");if(i(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return Qt("",l.toJSON(),u-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let h=0;const p=Bt(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]=Qt(f,e,u-1,r,o),h++}return s(t),d}function Zt(e,t){try{if(Wt){const e=Wt(t);if(e)return e}return"undefined"!=typeof global&&t===global?"[Global]":"number"!=typeof t||Number.isFinite(t)?"function"==typeof t?`[Function: ${dt(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 en(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function tn(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];At(t)?n.push(String(t)):t instanceof Error?n.push(t.message?`${t.name}: ${t.message}`:t.name):n.push(Zt(0,t))}return n.join(t)}function nn(e,t,n=!1){return!!Tt(e)&&(Ct(t,"RegExp")?t.test(e):Tt(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function rn(e,t=[],n=!1){for(const r of t)if(nn(e,r,n))return!0;return!1}function on(e=function(){const e=Ve;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return zt(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Jt||(Jt="10000000100040008000100000000000"),Jt.replace(/[018]/g,e=>(e^(16*Ht()&15)>>e/4).toString(16))}function sn(e){return e.exception?.values?.[0]}function an(e){const{message:t,event_id:n}=e;if(t)return t;const r=sn(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function cn(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function un(e,t){const n=sn(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 ln(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{Ot(e,"__sentry_captured__",!0)}catch{}return!1}var dn;function hn(){return Yt()/1e3}function pn(){return(dn??(dn=function(){const{performance:e}=Ve;if(!e?.now||!e.timeOrigin)return hn;const t=e.timeOrigin;return()=>(t+zt(()=>e.now()))/1e3}()))()}function fn(e){const t=pn(),n={sid:on(),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&&mn(n,e),n}function mn(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||pn(),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:on()),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 gn(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]=gn(r[o],t[o],n-1));return r}function _n(){return on()}function yn(){return on().substring(16)}function vn(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}var bn="_sentrySpan";function wn(e,t){t?Ot(e,bn,function(e){try{const t=Ve.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(t)):delete e[bn]}function xn(e){return vn(e[bn])}var kn=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:_n(),sampleRand:Ht()}}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,wn(t,xn(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&&mn(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:i,user:s,contexts:a,level:c,fingerprint:u=[],propagationContext:l,conversationId:d}=(n instanceof e?n.getScopeData():$t(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},s&&Object.keys(s).length&&(this._user=s),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,wn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:_n(),sampleRand:Ht()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:hn(),...e,message:e.message?en(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:xn(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=gn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||on();if(!this._client)return Je&&it.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||on();if(!this._client)return Je&&it.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||on();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Je&&it.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 Sn=e=>e instanceof Promise&&!e[Cn],Cn=/* @__PURE__ */Symbol("chained PromiseLike"),En=(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,{[Cn]:!0}),t},Nn=class{constructor(e,t){let n,r;n=e||new kn,r=t||new kn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(ed){throw this._popScope(),ed}return Lt(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Sn(r)&&Sn(e)?r:En(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 Tn(){const e=Xe(Ge());return e.stack=e.stack||new Nn(Qe("defaultCurrentScope",()=>new kn),Qe("defaultIsolationScope",()=>new kn))}function Rn(e){return Tn().withScope(e)}function An(e,t){const n=Tn();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function $n(e){return Tn().withScope(()=>e(Tn().getIsolationScope()))}function Pn(e){const t=Xe(e);return t.acs?t.acs:{withIsolationScope:$n,withScope:Rn,withSetScope:An,withSetIsolationScope:(e,t)=>$n(t),getCurrentScope:()=>Tn().getScope(),getIsolationScope:()=>Tn().getIsolationScope()}}function Dn(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 i=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),s=r&&"string"==typeof r?{unit:r}:{};if(i)return{...i,...s};if(!t||"skip-undefined"===t&&void 0===n)return;let a="";try{a=JSON.stringify(n)??""}catch{}return{value:a,type:"string",...s}}function Ln(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const e=Dn(o,t);e&&(n[r]=e)}return n}function jn(){return Pn(Ge()).getCurrentScope()}function Un(){return Pn(Ge()).getIsolationScope()}function Mn(){return jn().getClient()}function On(e){const t=void 0;const{traceId:n,parentSpanId:r,propagationSpanId:o}=e.getPropagationContext(),i={trace_id:n,span_id:o||yn()};return r&&(i.parent_span_id=r),i}function In(e){const t=e;return{scope:t._sentryScope,isolationScope:vn(t._sentryIsolationScope)}}function qn(e){const t=function(e){if(!e||!Tt(e)&&!Array.isArray(e))return;return Array.isArray(e)?e.reduce((e,t)=>{const n=Bn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Bn(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 Bn(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 Fn=/^o(\d+)\./,zn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Hn(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${s}`}function Yn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Wn(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(Fn)?.[1]}(n)),r}function Jn(e){const t="string"==typeof e?function(e){const t=zn.exec(e);if(!t)return void tt(()=>{});const[n,r,o="",i="",s="",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 Yn({host:i,pass:o,path:c,projectId:u,port:s,protocol:n,publicKey:r})}(e):Yn(e);if(t&&function(e){if(!Je)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(it.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(it.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(it.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(it.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}var Vn=!1;function Kn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Zn(e).parent_span_id,i=In(e).scope;return{parent_span_id:o,span_id:r?i?.getPropagationContext().propagationSpanId||yn():t,trace_id:n}}function Gn(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 Xn(e){return"number"==typeof e?Qn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Qn(e.getTime()):pn()}function Qn(e){return e>9999999999?e/1e3:e}function Zn(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:i,endTime:s,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:er(e),start_timestamp:Xn(o),timestamp:Xn(s)||void 0,status:tr(a),op:r["sentry.op"],origin:r["sentry.origin"],links:Gn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function er(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function tr(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}var nr=function(e){return e._sentryRootSpan||e};function rr(){Vn||(tt(()=>{}),Vn=!0)}function or(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||Mn()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function ir(e){it.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function sr(e,t){if(!t?.length)return!1;for(const n of t){if(ur(n)){if(e.description&&nn(e.description,n))return Je&&ir(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&&nn(e.description,n.name),o=!n.op||e.op&&nn(e.op,n.op),i=!n.attributes||Object.entries(n.attributes).every(([t,n])=>ar(e.attributes?.[t],n));if(r&&o&&i)return Je&&ir(e),!0}return!1}function ar(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?nn(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function cr(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 ur(e){return"string"==typeof e||e instanceof RegExp}var lr=/* @__PURE__ */Symbol.for("sentry.nonRecordingSpan");var dr="production";function hr(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:Wn(t)};return t.emit("createDsc",o),o}function pr(e,t){const n=t.getPropagationContext();return n.dsc||hr(n.traceId,e)}function fr(e){const t=Mn();if(!t)return{};const n=nr(e),r=Zn(n),o=r.data,i=n.spanContext().traceState,s=i?.get("sentry.sample_rate")??o["sentry.sample_rate"]??o["sentry.previous_trace_sample_rate"];function a(e){return"number"!=typeof s&&"string"!=typeof s||(e.sample_rate=`${s}`),e}const c=n._frozenDsc;if(c)return a(c);const u=function(e){return!!e&&!0===e[lr]}(n),l=u&&"ignored"===n.dropReason;if(u&&(!or(t.getOptions())||l)){const e=In(n).scope;if(e){const n={...pr(t,e)};return l&&(n.sampled="false"),a(n)}}const d=i?.get("sentry.dsc"),h=d&&qn(d);if(h)return a(h);const p=hr(e.spanContext().traceId,t),f=o["sentry.source"]??o["sentry.segment.name.source"],m=r.description;return"url"!==f&&m&&(p.transaction=m),or()&&(p.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=i?.get("sentry.sample_rand")??In(n).scope?.getPropagationContext().sampleRand.toString()),a(p),t.emit("createDsc",p,n),p}function mr(e,t=[]){return[e,t]}function gr(e,t){const[n,r]=e;return[n,[...r,t]]}function _r(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function yr(e){const t=Xe(Ve);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function vr(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[yr(r),e]:r.push("string"==typeof e?yr(e):e)}for(const i of n){const[e,t]=i;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(Gt(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 br(e){const t="string"==typeof e.data?yr(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var wr={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 xr(e){return function(e){return e in wr}(e)?wr[e]:e}function kr(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Sr(e,t,n,r){const o=kr(n),i=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 s=function(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Yt()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Hn(r)},...o&&{trace:o}}}(e,o,r,t);return delete e.sdkProcessingMetadata,mr(s,[[{type:i},e]])}function Cr(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:i,level:s,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(i).length&&(e.contexts={...i,...e.contexts});s&&(e.level=s);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:Kn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:fr(t),...e.sdkProcessingMetadata};const n=nr(t),r=Zn(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,i)}function Er(e,t){const{extra:n,tags:r,attributes:o,user:i,contexts:s,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:d,attachments:h,propagationContext:p,transactionName:f,span:m}=t;Nr(e,"extra",n),Nr(e,"tags",r),Nr(e,"attributes",o),Nr(e,"user",i),Nr(e,"contexts",s),e.sdkProcessingMetadata=gn(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 Nr(e,t,n){e[t]=gn(e[t],n,1)}function Tr(e,t){const n=Qe("globalScope",()=>new kn).getScopeData();return e&&Er(n,e.getScopeData()),t&&Er(n,t.getScopeData()),n}var Rr="user_agent.original";function Ar(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function $r(e){return new Mr(t=>{t(e)})}function Pr(e){return new Mr((t,n)=>{n(e)})}var Dr,Lr,jr,Ur,Mr=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(ed){r(ed)}else e(n)},t=>{if(n)try{e(n(t))}catch(ed){r(ed)}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&&(Lt(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(ed){r(ed)}}};function Or(e,t,n,r=0){try{const o=Ir(t,n,e,r);return Lt(o)?o:$r(o)}catch(o){return Pr(o)}}function Ir(e,t,n,r){const o=n[r];if(!e||!o)return e;const i=o({...e},t);return Je&&null===i&&it.log(`Event processor "${o.id||"?"}" dropped event`),Lt(i)?i.then(e=>Ir(e,t,n,r+1)):Ir(i,t,n,r+1)}function qr(e,t,n,r,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||on(),timestamp:t.timestamp||hn()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:i}=t;e.environment=e.environment||n||"production",!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);const s=e.request;s?.url&&i&&(s.url=en(s.url,i));i&&e.exception?.values?.forEach(e=>{e.value&&(e.value=en(e.value,i))})}(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=Ve._sentryDebugIds,n=Ve._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Ur&&r.length===Lr&&o.length===jr)return Ur;Lr=r.length,jr=o.length,Ur={},Dr||(Dr={});const i=(t,n)=>{for(const r of t){const t=n[r],o=Dr?.[r];if(o&&Ur&&t)Ur[o[0]]=t,Dr&&(Dr[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&&Ur&&Dr){Ur[o]=t,Dr[r]=[o,t];break}}}}};return t&&i(r,t),n&&i(o,n),Ur}(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 kn;return n.update(t),n}(r,n.captureContext);n.mechanism&&un(c,n.mechanism);const d=o?o.getEventProcessors():[],h=Tr(i,l),p=[...n.attachments||[],...h.attachments];p.length&&(n.attachments=p),Cr(c,h);const f=[...d,...h.eventProcessors];return(n.data&&!0===n.data.__sentry__?$r(c):Or(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 s&&s>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Gt(e.data,t,n)}}))},...e.user&&{user:Gt(e.user,t,n)},...e.contexts&&{contexts:Gt(e.contexts,t,n)},...e.extra&&{extra:Gt(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Gt(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Gt(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=Gt(e.contexts.flags,3,n));return r}(e,s,a):e))}function Br(e){if(e)return function(e){return e instanceof kn||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>Fr.includes(e))}(e)?{captureContext:e}:e}var Fr=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function zr(e,t){return jn().captureException(e,Br(t))}function Hr(e,t){return jn().captureEvent(e,t)}function Yr(e,t){Un().setTag(e,t)}function Wr(e){const t=Un(),{user:n}=Tr(t,jn()),{userAgent:r}=Ve.navigator||{},o=fn({user:n,...r&&{userAgent:r},...e}),i=t.getSession();return"ok"===i?.status&&mn(i,{status:"exited"}),Jr(),t.setSession(o),o}function Jr(){const e=Un(),t=jn().getSession()||e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),mn(e,n)}(t),Vr(),e.setSession()}function Vr(){const e=Un(),t=Mn(),n=e.getSession();n&&t&&t.captureSession(n)}function Kr(e=!1){e?Jr():Vr()}function Gr(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function Xr(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 Qr=[];function Zr(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 eo(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function to(e,t,n){if(n[t.name])Je&&it.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Qr.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),Qr.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))}),Je&&it.log(`Integration installed: ${t.name}`)}}function no(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function ro(){return"undefined"!=typeof window&&(!no()||"renderer"===Ve.process?.type)}function oo(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...ro()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function io(e,t){const n=t??function(e){return so().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Hn(r)),mr(i,[oo(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);so().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function so(){return Qe("clientToLogBufferMap",()=>/* @__PURE__ */new WeakMap)}function ao(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,...ro()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function co(e,t){const n=t??function(e){return uo().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Hn(r)),mr(i,[ao(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);uo().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function uo(){return Qe("clientToMetricBufferMap",()=>/* @__PURE__ */new WeakMap)}function lo(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:Ln(n.attributes),links:n.links?.map(e=>({...e,attributes:Ln(e.attributes)}))};var n}var ho=/* @__PURE__ */Symbol.for("SentryBufferFullError");function po(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 Pr(ho);const o=r();return t.add(o),o.then(()=>n(o),()=>n(o)),o},drain:function(e){if(!t.size)return $r(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>Gr(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function fo(e,{statusCode:t,headers:n},r=Yt()){const o={...e},i=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(i)for(const a of i.trim().split(",")){const[e,t,,,n]=a.split(":",5),i=parseInt(e,10),s=1e3*(isNaN(i)?60:i);if(t)for(const a of t.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(o[a]=r+s);else o.all=r+s}else s?o.all=r+function(e,t=Yt()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(s,r):429===t&&(o.all=r+6e4);return o}function mo(e,t,n=po(e.bufferSize||64)){let r={};return{send:function(o){const i=[];if(_r(o,(t,n)=>{const o=xr(n);!function(e,t,n=Yt()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,o)?i.push(t):e.recordDroppedEvent("ratelimit_backoff",o)}),0===i.length)return Promise.resolve({});const s=mr(o[0],i),a=t=>{!function(e,t){return _r(e,(e,n)=>t.includes(n))}(s,["client_report"])?_r(s,(n,r)=>{e.recordDroppedEvent(t,xr(r))}):Je&&it.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>t({body:vr(s)}).then(e=>413===e.statusCode?(Je&&it.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),a("send_error"),e):(Je&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&it.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=fo(r,e),e),e=>{throw a("network_error"),Je&&it.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===ho)return Je&&it.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}function go(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 _o=["forwarded","-ip","remote-","via","-user"];var yo={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 vo(e,t){return void 0===e?{...t.httpHeaders}:"boolean"==typeof(n=e)||"allow"in n||"deny"in n?{request:e,response:e}:{request:e.request??t.httpHeaders.request,response:e.response??t.httpHeaders.response};var n}function bo(e){const t=null!=e.dataCollection?yo:!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:_o},httpHeaders:{request:{deny:_o},response:{deny:_o}},httpBodies:[],urlQueryParams:{deny:_o},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:vo(n.httpHeaders,t),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 wo="Not capturing exception because it's already been captured.",xo="Discarded session because of missing or non-string release",ko=/* @__PURE__ */Symbol.for("SentryInternalError"),So=/* @__PURE__ */Symbol.for("SentryDoNotSendEventError");function Co(e){return{message:e,[ko]:!0}}function Eo(e){return{message:e,[So]:!0}}function No(e){return Pt(e)&&ko in e}function To(e){return Pt(e)&&So in e}function Ro(e,t,n,r,o){let i,s=0,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,t=>{if(s+=r(t),s>=8e5)o(e);else if(!a){const t=e.getOptions()._flushInterval??5e3;t>0&&(a=!0,i=Gr(setTimeout(()=>{o(e)},t)))}}),e.on("flush",()=>{o(e)})}var Ao=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=po(e.transportOptions?.bufferSize??64),this._dataCollection=bo(e),e.dsn?this._dsn=Jn(e.dsn):Je&&it.warn("No DSN provided, client will not send events."),this._dsn){const t=Xr(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&&Ro(this,"afterCaptureLog","flushLogs",jo,io),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Ro(this,"afterCaptureMetric","flushMetrics",Lo,co)}captureException(e,t,n){const r=on();if(ln(e))return Je&&it.log(wo),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:on(),...n},i=Rt(e)?e:String(e),s=At(e),a=s?this.eventFromMessage(i,t,o):this.eventFromException(e,o);return this._process(()=>a.then(e=>this._captureEvent(e,o,r)),s?"unknown":"error"),o.event_id}captureEvent(e,t,n){const r=on();if(t?.originalException&&ln(t.originalException))return Je&&it.log(wo),r;const o={event_id:r,...t},i=e.sdkProcessingMetadata||{},s=i.capturedSpanScope,a=i.capturedSpanIsolationScope,c=$o(e.type);return this._process(()=>this._captureEvent(e,o,s||n,a),c),o.event_id}captureSession(e){this.sendSession(e),mn(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),to(this,e,this._integrations),t||eo(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 i of e.spans)i.op?.startsWith("gen_ai.")?n.push(lo(i)):r.push(i);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,...ro()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}(e,this);let r=Sr(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of t.attachments||[])r=gr(r,br(o));n&&(r=gr(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=dr}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(Je&&it.warn(xo));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(Je&&it.warn(xo));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const o=kr(n);return mr({sent_at:new Date(Yt()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Hn(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}`;Je&&it.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 Je&&it.error("Error while sending envelope:",t),{}}return Je&&it.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&&to(e,t,n)}),n}(this,e),eo(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 i="ok"===e.status;(i&&0===e.errors||i&&n)&&(mn(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(),i=this.getIntegrationNames();return!t.integrations&&i.length&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),qr(o,e,t,n,this,r).then(e=>(null===e||(this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...On(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:pr(this,n),...e.sdkProcessingMetadata}),e))}_captureEvent(e,t={},n=jn(),r=Un()){return Je&&Po(e)&&it.log(`Captured error event \`${go(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{Je&&(To(e)?it.log(e.message):No(e)?it.warn(e.message):it.warn(e))})}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:i}=o,s=Do(e),a=Po(e),c=`before send for type \`${e.type||"error"}\``,u=void 0===i?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}(i),l=$o(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",l),Eo("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(Lt(e))return e.then(e=>{if(!$t(e)&&null!==e)throw Co(n);return e},e=>{throw Co(`${t} rejected with ${e}`)});if(!$t(e)&&null!==e)throw Co(n);return e}(function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,ignoreSpans:s}=t,a=(c=t.beforeSendSpan,!(c&&"function"==typeof c&&"_streamed"in c&&c._streamed)&&t.beforeSendSpan);var c;let u=n;if(Po(u)&&o)return o(u,r);if(Do(u)){if(a||s){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},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:i,profile_id:s?.["sentry.profile_id"],exclusive_time:s?.["sentry.exclusive_time"],measurements:e.measurements,is_segment:!0}}(u);if(s?.length&&sr({description:t.description,op:t.op,attributes:t.data},s))return null;if(a){const e=a(t);e?u=gn(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}):rr()}if(u.spans){const t=[],n=u.spans;for(const e of n)if(s?.length&&sr({description:e.description,op:e.op,attributes:e.data},s))cr(n,e);else if(a){const n=a(e);n?t.push(n):(rr(),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(i){if(u.spans){const e=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(u,r)}}var l;return u}(this,o,e,t),c)}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",l),s){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw Eo(`${c} returned \`null\`, will not send event.`)}const d=n.getSession()||r.getSession();if(a&&d&&this._updateSessionFromEvent(d,o),a&&"number"==typeof u&&Ht()>u)throw this.recordDroppedEvent("sample_rate","error"),Eo(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);if(s){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(s&&h&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...h,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(To(e)||No(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),Co(`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===ho&&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(){Je&&it.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(Je&&it.log("No outcomes to send"));if(!this._dsn)return void(Je&&it.log("No dsn provided, will not send outcomes"));Je&&it.log("Sending outcomes:",e);const t=(n=e,mr((r=this._options.tunnel&&Hn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||hn(),discarded_events:n}]]));var n,r,o;this.sendEnvelope(t)}};function $o(e){return"replay_event"===e?"replay":e||"error"}function Po(e){return void 0===e.type}function Do(e){return"transaction"===e.type}function Lo(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+Uo(e.attributes)}function jo(e){let t=0;return e.message&&(t+=2*e.message.length),t+Uo(e.attributes)}function Uo(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Mo(e[0]):At(e)?t+=Mo(e):t+=100}),t}function Mo(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function Oo(e,t){!0===t.debug&&(Je?it.enable():tt(()=>{})),jn().update(t.initialScope);const n=new e(t);return function(e){jn().setClient(e)}(n),n.init(),n}function Io(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 qo(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 Bo=100;function Fo(e,t){const n=Mn(),r=Un();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Bo}=n.getOptions();if(i<=0)return;const s={timestamp:hn(),...e},a=o?tt(()=>o(s,t)):s;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,i))}var zo=/* @__PURE__ */new WeakMap,Ho=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=qt(this);let r;try{zo.has(Mn())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){zo.set(e,!0)}}),Yo=[/^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$/,/Java object is gone$/],Wo=(e={})=>{let t;return{name:"EventFilters",setup(n){t=Vo(e,n.getOptions())},processEvent:(n,r,o)=>(t||(t=Vo(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&&rn(n,t)}(e,t.ignoreTransactions))return Je&&it.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${an(e)}`),!0}else{if(function(e,t){return!!t?.length&&go(e).some(e=>rn(e,t))}(e,t.ignoreErrors))return Je&&it.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${an(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 Je&&it.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${an(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=Ko(e);return!!n&&rn(n,t)}(e,t.denyUrls))return Je&&it.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${an(e)}.\nUrl: ${Ko(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=Ko(e);return!n||rn(n,t)}(e,t.allowUrls))return Je&&it.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${an(e)}.\nUrl: ${Ko(e)}`),!0}return!1}(n,t)?null:n)}},Jo=(e={})=>({...Wo(e),name:"InboundFilters"});function Vo(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Yo],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ko(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 Je&&it.error(`Cannot extract url for event ${an(e)}`),null}}function Go(e,t,n,r,o,i){if(!o.exception?.values||!i||!St(i.originalException))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=Xo(e,t,r,i.originalException,n,o.exception.values,s,0))}function Xo(e,t,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(St(r[o])){Zo(s,a,r);const i=e(t,r[o]),u=c.length;ei(i,o,u,a),c=Xo(e,t,n,r[o],o,[i,...c],i,u)}return Qo(r)&&r.errors.forEach((i,u)=>{if(St(i)){Zo(s,a,r);const l=e(t,i),d=c.length;ei(l,`errors[${u}]`,d,a),c=Xo(e,t,n,i,o,[l,...c],l,d)}}),c}function Qo(e){return Array.isArray(e.errors)}function Zo(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Qo(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ei(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function ti(e){return function(e){return St(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 ni=/* @__PURE__ */new Set([]);var ri=/* @__PURE__ */new Set;function oi(){"console"in Ve&&Ze.forEach(function(e){!ri.has(e)&&e in Ve.console&&(ri.add(e),Mt(Ve.console,e,function(t){return et[e]=t,function(...t){const n=t[0],r=et[e],o=ni.size&&"string"==typeof n&&rn(n,ni);o||_t("console",{args:t,level:e}),(!o||Je&&it.isEnabled())&&r?.apply(Ve.console,t)}}))})}function ii(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var si=()=>{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&&(!!ci(e,t)&&!!ai(e,t))))}(e,t)||!!function(e,t){const n=ui(t),r=ui(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!ci(e,t)&&!!ai(e,t)))}(e,t))}(t,e))return Je&&it.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function ai(e,t){let n=ht(e),r=ht(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 ci(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 ui(e){return e.exception?.values?.[0]}var li=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=jn().getScopeData(),n=Un().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:o}=Zn(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!o?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}});function di(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}var hi=Ve;function pi(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function fi(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in hi))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(pi(hi.fetch))return!0;let e=!1;const t=hi.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=pi(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Je&&it.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function mi(e,t){const n="fetch",r=mt(n,e);return gt(n,()=>function(e,t=!1){if(t&&!fi())return;Mt(Ve,"fetch",function(t){return function(...n){const r=/* @__PURE__ */new Error,{method:o,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:_i(t),method:gi(n,"method")?String(n.method).toUpperCase():Ut(t)&&gi(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:_i(t),method:gi(t,"method")?String(t.method).toUpperCase():"GET"}}(n),s={args:n,fetchData:{method:o,url:i},startTimestamp:1e3*pn(),virtualError:r,headers:yi(n)};return e||_t("fetch",{...s}),t.apply(Ve,n).then(async t=>(e?e(t):_t("fetch",{...s,endTimestamp:1e3*pn(),response:t}),t),e=>{_t("fetch",{...s,endTimestamp:1e3*pn(),error:e}),St(e)&&void 0===e.stack&&(e.stack=r.stack,Ot(e,"framesToPop",1));const t=Mn()?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==t&&St(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(s.fetchData.url).host;"always"===t?e.message=`${e.message} (${n})`:Ot(e,"__sentry_fetch_url_host__",n)}catch{}throw e})}})}(void 0,t)),r}function gi(e,t){return Pt(e)&&!!e[t]}function _i(e){return"string"==typeof e?e:e?gi(e,"url")?e.url:e.toString?e.toString():"":""}function yi(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(Ut(t))return new Headers(t.headers)}catch{}}var vi=Ve;function bi(){try{return vi.document.location.href}catch{return""}}var wi=Ve,xi=0;function ki(){return xi>0}function Si(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(qt(e))return e}catch{return e}const n=function(...n){Ve._sentryWrappedDepth=(Ve._sentryWrappedDepth||0)+1;try{const r=n.map(e=>Si(e,t));return e.apply(this,r)}catch(r){throw xi++,setTimeout(()=>{xi--}),function(...e){const t=Pn(Ge());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&&(cn(e,void 0,void 0),un(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),zr(r)}),r}finally{Ve._sentryWrappedDepth=(Ve._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}It(n,e),Ot(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function Ci(){const e=bi(),{referrer:t}=wi.document||{},{userAgent:n}=wi.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function Ei(e,t){const n=Ri(e,t),r={type:Pi(t),value:Di(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ni(e,t,n,r){const o=Mn()?.getOptions().normalizeDepth,i=(s=t,Object.values(s).find(St));var s;const a={__serialized__:Xt(t,o)};if(i)return{exception:{values:[Ei(e,i)]},extra:a};const c={exception:{values:[{type:Dt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ui(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=Ri(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Ti(e,t){return{exception:{values:[Ei(e,t)]}}}function Ri(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&Ai.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 Ai=/Minified React error #\d+;/i;function $i(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function Pi(e){const t=e?.name;return!t&&$i(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Di(e){const t=e?.message;return $i(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?ti(t.error):ti(e):"No error message"}function Li(e,t,n,r,o){let i;if(Et(t)&&t.error)return Ti(e,t.error);if(Nt(t)||Ct(t,"DOMException")){const o=t;if("stack"in t){i=Ti(e,t);const o=i.exception?.values?.[0];if(r&&n&&o&&!o.stacktrace){const t=Ri(e,n);t.length&&(o.stacktrace={frames:t},un(i,{synthetic:!0}))}}else{const t=o.name||(Nt(o)?"DOMError":"DOMException"),s=o.message?`${t}: ${o.message}`:t;i=ji(e,s,n,r),cn(i,s)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return St(t)?Ti(e,t):$t(t)||Dt(t)?(i=Ni(e,t,n,o),un(i,{synthetic:!0}),i):(i=ji(e,t,n,r),cn(i,`${t}`,void 0),un(i,{synthetic:!0}),i)}function ji(e,t,n,r){const o={};if(r&&n){const r=Ri(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),un(o,{synthetic:!0})}if(Rt(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 Ui(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(Bt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return Et(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Dt(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 Mi=class extends Ao{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:wi.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:Ke})),o.version=Ke)}(t,"browser",["browser"],wi.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;wi.document&&wi.document.addEventListener("visibilitychange",()=>{"hidden"===wi.document.visibilityState&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",qo)}eventFromException(e,t){return function(e,t,n,r){const o=Li(e,t,n?.syntheticException||void 0,r);return un(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),$r(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const i=ji(e,t,r?.syntheticException||void 0,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),$r(i)}(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 Oi="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ii=Ve;function qi(e,t,n){Ii.document&&Ii.addEventListener(e,t,n)}function Bi(e,t,n){Ii.document&&Ii.removeEventListener(e,t,n)}var Fi={};try{"undefined"!=typeof Node&&(Fi.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(Fi.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,Fi.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,Fi.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,Fi.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(Fi.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function zi(e,t,n){const r=Fi[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return"function"==typeof o?o.call(e,n):o}function Hi(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let i=0,s=0;const a=" > ",c=3;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++<r&&(u=Yi(n,l),!("html"===u||i>1&&s+o.length*c+u.length>=d));)o.push(u),s+=u.length,n=zi(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function Yi(e,t){const n=[],r=zi(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=zi(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=>zi(e,"getAttribute",t)).map(t=>[t,zi(e,"getAttribute",t)]):null;if(o?.length)o.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=zi(e,"id");t&&n.push(`#${t}`);const r=zi(e,"className");if(r&&Tt(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const i of["aria-label","type","name","title","alt"]){const t=zi(e,"getAttribute",i);t&&n.push(`[${i}="${t}"]`)}return n.join("")}var Wi,Ji,Vi,Ki;function Gi(){if(!Ii.document)return;const e=_t.bind(null,"dom"),t=Xi(e,!0);Ii.document.addEventListener("click",t,!1),Ii.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Ii[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Mt(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__||{},i=r[n]=r[n]||{refCount:0};if(!i.handler){const r=Xi(e);i.handler=r,t.call(this,n,r,o)}i.refCount++}catch{}return t.call(this,n,r,o)}}),Mt(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 Xi(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;Ot(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ot(r,"_sentryId",on());const o="keypress"===n.type?"input":n.type;(function(e){if(e.type!==Ji)return!1;try{if(!e.target||e.target._sentryId!==Vi)return!1}catch{}return!0})(n)||(e({event:n,name:o,global:t}),Ji=n.type,Vi=r?r._sentryId:void 0),clearTimeout(Wi),Wi=Ii.setTimeout(()=>{Vi=void 0,Ji=void 0},1e3)}}function Qi(e){const t="history";mt(t,e),gt(t,Zi)}function Zi(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=Ki,o=function(e){try{return new URL(e,Ii.location.origin).toString()}catch{return e}}(String(n));if(Ki=o,r===o)return e.apply(this,t);_t("history",{from:r,to:o})}return e.apply(this,t)}}Ii.addEventListener("popstate",()=>{const e=Ii.location.href,t=Ki;Ki=e,t!==e&&_t("history",{from:t,to:e})}),"history"in hi&&hi.history&&(Mt(Ii.history,"pushState",e),Mt(Ii.history,"replaceState",e))}var es={};var ts="__sentry_xhr_v3__";function ns(){if(!Ii.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=/* @__PURE__ */new Error;const o=1e3*pn(),i=Tt(n[0])?n[0].toUpperCase():void 0,s=function(e){if(Tt(e))return e;try{return e.toString()}catch{}}(n[1]);if(!i||!s)return e.apply(t,n);t[ts]={method:i,url:s,request_headers:{}},"POST"===i&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[ts];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}_t("xhr",{endTimestamp:1e3*pn(),startTimestamp:o,xhr:t,virtualError:r}),r=void 0,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,i=t[ts];return i&&Tt(r)&&Tt(o)&&(i.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[ts];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return _t("xhr",{startTimestamp:1e3*pn(),xhr:t}),e.apply(t,n)}})}function rs(e,t=function(e){const t=es[e];if(t)return t;let n=Ii[e];if(pi(n))return es[e]=n.bind(Ii);const r=Ii.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(ed){Oi&&it.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,ed)}return n?es[e]=n.bind(Ii):n}("fetch")){let n=0,r=0;return mo(e,async function(o){const i=o.body.length;n+=i,r++;const s={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,s);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(ed){throw es["fetch"]=void 0,ed}finally{n-=i,r--}},po(e.bufferSize||40))}var os="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function is(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 ss=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,as=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cs=/\((\S*)(?::(\d+))(?::(\d+))\)/,us=/at (.+?) ?\(data:(.+?),/,ls=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ds=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hs=ct(...[[30,e=>{const t=e.match(us);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=ss.exec(e);if(n){const[,e,t,r]=n;return is(e,"?",+t,+r)}const r=as.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=cs.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=ps(r[1]||"?",r[2]);return is(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=ls.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ds.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]=ps(n,e),is(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),ps=(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]},fs=1024,ms=(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=mt(t,e);gt(t,oi)}(function(e){return function(t){if(Mn()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:ii(t.level),message:tn(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${tn(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Fo(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(Mn()!==e)return;let r,o,i="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>fs&&(os&&it.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=fs),"string"==typeof i&&(i=[i]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Hi(t,{keyAttrs:i,maxStringLength:s}),o=function(e,t=5){if(!vi.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}),Fo(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),mt("dom",n),gt("dom",Gi)),t.xhr&&function(e){mt("xhr",e),gt("xhr",ns)}(function(e){return function(t){if(Mn()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[ts];if(!n||!r||!o)return;const{method:i,url:s,status_code:a,body:c}=o,u={method:i,url:s,status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:di(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),Fo(d,l)}}(e)),t.fetch&&mi(function(e){return function(t){if(Mn()!==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},i={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,o),Fo(i,o)}else{const o=t.response,i={...t.fetchData,status_code:o?.status},s={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:i,type:"http",level:di(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,s),Fo(a,s)}}}(e)),t.history&&Qi(function(e){return function(t){if(Mn()!==e)return;let n=t.from,r=t.to;const o=Io(wi.location.href);let i=n?Io(n):void 0;const s=Io(r);i?.path||(i=o),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Fo({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Mn()===e&&Fo({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:an(t)},{event:t})}}(e))}}};var gs="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(","),_s=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&Mt(wi,"setTimeout",ys),t.setInterval&&Mt(wi,"setInterval",ys),t.requestAnimationFrame&&Mt(wi,"requestAnimationFrame",vs),t.XMLHttpRequest&&"XMLHttpRequest"in wi&&Mt(XMLHttpRequest.prototype,"send",bs);const e=t.eventTarget;e&&(Array.isArray(e)?e:gs).forEach(e=>function(e,t){const n=wi[e]?.prototype;if(!n?.hasOwnProperty?.("addEventListener"))return;Mt(n,"addEventListener",function(n){return function(r,o,i){try{"function"==typeof o.handleEvent&&(o.handleEvent=Si(o.handleEvent,{mechanism:{data:{handler:dt(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,Si(o,{mechanism:{data:{handler:dt(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),i])}}),Mt(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 ys(e){return function(...t){const n=t[0];return t[0]=Si(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${dt(e)}`}}),e.apply(this,t)}}function vs(e){return function(t){return e.apply(this,[Si(t,{mechanism:{data:{handler:dt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function bs(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Mt(n,e,function(t){const n={mechanism:{data:{handler:dt(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=qt(t);return r&&(n.mechanism.data.handler=dt(r)),Si(t,n)})}),e.apply(this,t)}}var ws=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===wi.document)return void(os&&it.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));Wr({ignoreDuration:!0});let e=!1;(e=>{const t=Ii.requestIdleCallback||Ii.setTimeout;"hidden"===Ii.document?.visibilityState?e():(qi("visibilitychange",e=(e=>{let t=!1;return()=>{t||(e(),t=!0)}})(e),{once:!0,capture:!0}),qi("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Bi("visibilitychange",e,{capture:!0}),Bi("pagehide",e,{capture:!0})}))})(()=>{e||(Kr(),e=!0)});const n=Un();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&Kr())}),"route"===t&&Qi(({from:t,to:n})=>{t!==n&&(Wr({ignoreDuration:!0}),Kr(),e=!0)})}}},xs=()=>({name:"CultureContext",preprocessEvent(e){const t=ks();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=ks();t&&Ar(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function ks(){try{const e=wi.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Ss=(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";mt(t,e),gt(t,vt)}(t=>{const{stackParser:n,attachStacktrace:r}=Es();if(Mn()!==e||ki())return;const{msg:o,url:i,line:s,column:a,error:c}=t,u=function(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[];0===c.length&&c.push({colno:r,lineno:n,filename:Ns(t)??bi(),function:"?",in_app:!0});return e}(Li(n,c||o,void 0,r,!1),i,s,a);u.level="error",Hr(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Cs("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";mt(t,e),gt(t,wt)}(t=>{const{stackParser:n,attachStacktrace:r}=Es();if(Mn()!==e||ki())return;const o=function(e){if(At(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),i=At(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:Li(n,o,void 0,r,!0);i.level="error",Hr(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Cs("onunhandledrejection"))}}};function Cs(e){os&&it.log(`Global Handler attached: ${e}`)}function Es(){return Mn()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Ns(e){if(Tt(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,"),i=e.indexOf(",");let s="";if(t&&-1!==i){const t=e.slice(i+1);s=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${o?",base64":""}${s?`,${s}`:""}`}return e}(e,!1)}>`:e}var Ts=()=>({name:"HttpContext",preprocessEvent(e){if(!wi.navigator&&!wi.location&&!wi.document)return;const t=Ci(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSpan(e){if(!wi.navigator&&!wi.location&&!wi.document)return;const t=Ci();Ar(e,{[Rr]:t.headers["User-Agent"],...e.is_segment&&{"url.full":"http.client"!==e.attributes?.["sentry.op"]?t.url:void 0,"http.request.header.referer":t.headers.Referer}})}}),Rs=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){Go(Ei,o.getOptions().stackParser,n,t,e,r)}}},As=/^HTML(\w*)Element$/;function $s(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(As.test(t))return`[HTMLElement: ${Hi(e)}]`}}function Ps(){return!!function(){if(void 0===wi.window)return!1;const e=wi;if(e.nw)return!1;if(!(e.chrome||e.browser)?.runtime?.id)return!1;const t=bi();return!(wi===wi.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}()&&(os&&tt(()=>{}),!0)}function Ds(e={}){const t=!e.skipBrowserExtensionCheck&&Ps();let n=null==e.defaultIntegrations?[Jo(),Ho(),li(),_s(),ms(),Ss(),Rs(),si(),Ts(),xs(),ws()]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(o=e.stackParser||hs,Array.isArray(o)?ct(...o):o),integrations:Zr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||rs};var o;return Wt=$s,Oo(Mi,r)}function Ls(e){const t="undefined"!=typeof window?window.location.href:void 0;Yr("portal_code",e.portalCode),Yr("object_code",e.objectCode??""),Yr("locale",e.locale??""),function(e,t){Un().setContext(e,t)}("bukazu",{portal_code:e.portalCode,object_code:e.objectCode??null,locale:e.locale??null,url:t??null})}function js(e){zr(e)}function Us(e){!function(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;jn().captureMessage(e,n,r)}(e,"error")}var Ms=/* @__PURE__ */new WeakSet;function Os(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 Is(e){const t=Os(e.errors);return"object"!=typeof e.errors||null===e.errors||Ms.has(e.errors)||(Ms.add(e.errors),js(new Error(t.join("\n")))),/* @__PURE__ */h("div",{className:"bukazu-error-message",children:[/* @__PURE__ */d("h2",{children:ne("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 Bs(e){if(!e)return"en";const t=e.split(/[-_]/)[0].toLowerCase();return function(e){return qs.includes(e)}(t)?t:"en"}var Fs=e=>"[object Object]"===Object.prototype.toString.call(e),zs=n({locale:"nl",portalCode:"",objectCode:"",apiUrl:"https://api.bukazu.com"}),Hs="bukazuCurrency";function Ys(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 Ws=n({currency:void 0,setCurrency:()=>{},allowed:[],multiCurrency:!1});function Js({currencies:e,children:t}){const n=s(()=>Ys(e),[e]),[o,i]=u(()=>{const e=function(){try{return window.localStorage.getItem(Hs)}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(Hs,e)}catch{}}(e),i(e))},[n]),c=n.multi_currency&&n.allowed.length>1,l=s(()=>({currency:c?o:void 0,setCurrency:a,allowed:n.allowed,multiCurrency:c}),[c,n.allowed,o,a]);/* @__PURE__ */
|
|
39
|
-
return d(Ws.Provider,{value:l,children:t})}function Vs(){return o(Ws)}function Ks(){const{currency:e,setCurrency:t,allowed:n,multiCurrency:r}=Vs();return!r||n.length<=1?null:/* @__PURE__ */h("div",{className:"bu-currency-selector",children:[/* @__PURE__ */d("label",{htmlFor:"bu-currency",children:ne("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 Gs=class extends Error{name="KyError";get isKyError(){return!0}},Xs=class extends Gs{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}},Qs=class extends Gs{name="NetworkError";request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}},Zs=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}},ea=class extends Gs{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new Zs(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}},ta=class extends Error{name="SchemaValidationError";issues;constructor(e){super("Response schema validation failed"),this.issues=e}},na=class extends Gs{name="TimeoutError";request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}},ra=(()=>{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})(),oa="function"==typeof globalThis.AbortController,ia="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,sa="function"==typeof globalThis.ReadableStream,aa="function"==typeof globalThis.FormData,ca=["get","post","put","patch","head","delete","query"],ua={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},la=2147483647,da=Symbol("stop"),ha=class{options;constructor(e){this.options=e}},pa=e=>new ha(e),fa={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},ma={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},ga=new TextEncoder,_a=(e,t,n)=>{let r,o=0;return e.pipeThrough(new TransformStream({transform(e,i){if(i.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)}}))},ya=(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+=ga.encode(`Content-Disposition: form-data; name="${n}"`).byteLength,t+="string"==typeof r?ga.encode(r).byteLength:r.size;return t}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:"string"==typeof e?ga.encode(e).byteLength:e instanceof URLSearchParams?ga.encode(e.toString()).byteLength:0})(n??e.body);return new Request(e,{duplex:"half",body:_a(e.body,r,t)})},va=e=>null!==e&&"object"==typeof e,ba=Symbol("replaceOption"),wa=e=>va(e)&&!0===e[ba]?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},xa=(...e)=>{for(const t of e)if((!va(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return Pa({},...e)},ka=(e={},t={})=>{const n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(const[i,s]of o.entries())r&&"undefined"===s||void 0===s?n.delete(i):n.set(i,s);return n},Sa=e=>{if(!va(e)||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},Ca=e=>{if(e instanceof URLSearchParams){const t=new URLSearchParams(e),n=e[Ra];return n&&(t[Ra]=new Set(n)),t}return e instanceof globalThis.Headers?new globalThis.Headers(e):Array.isArray(e)?[...e]:Sa(e)?{...e}:e},Ea=(e,t)=>{return Sa(e)&&Sa(t)?(n={...e,...t},Object.fromEntries(Object.entries(n).filter(e=>void 0!==e[1]))):ka(e,t);var n};function Na(e,t,n){return Object.hasOwn(t,n)&&void 0===t[n]?[]:Pa(e[n]??[],t[n]??[])}var Ta=(e={},t={})=>({init:Na(e,t,"init"),beforeRequest:Na(e,t,"beforeRequest"),beforeRetry:Na(e,t,"beforeRetry"),beforeError:Na(e,t,"beforeError"),afterResponse:Na(e,t,"afterResponse")}),Ra=Symbol("deletedParameters"),Aa=(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,i]of o.entries())n.append(t,i),r.delete(t);const e=o[Ra];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(va(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[Ra]=r),n},$a=(e,...t)=>{let n,r={},o={},i={};const s=[];for(const a of t)if(Array.isArray(a))Array.isArray(r)||(r=[]),r=[...r,...a];else if(va(a)){for(let[t,o]of Object.entries(a)){const i=wa(o),{isReplace:a}=i;o=i.value;const c=e&&"signal"===t;if(c&&(a||void 0===o)&&(s.length=0),c&&o instanceof globalThis.AbortSignal)s.push(o);else if("context"!==t)"searchParams"!==t?(e&&"retry"===t&&va(o)&&!a&&"number"==typeof r[t]&&(r={...r,[t]:{limit:r[t]}}),va(o)&&!a&&t in r&&(o=$a(!1,r[t],o)),r={...r,[t]:o}):n=null==o?void 0:a||void 0===n?o:Aa(n,o);else{if(null!=o&&(!va(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(va(a.hooks)){const{value:e,isReplace:t}=wa(a.hooks);i=Ta(t?{}:i,e),r.hooks=i}if(va(a.headers)){const{value:e,isReplace:t}=wa(a.headers);o=t?Ca(e):Ea(o,e),r.headers=o}}return void 0!==n&&(r.searchParams=n),s.length>0&&(1===s.length?r.signal=s[0]:r.signal=ia?AbortSignal.any(s):s.at(-1)),r},Pa=(...e)=>$a(!0,...e),Da=e=>ca.includes(e)?e.toUpperCase():e,La={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},ja=()=>({...La,methods:[...La.methods],statusCodes:[...La.statusCodes],afterStatusCodes:[...La.afterStatusCodes]}),Ua=e=>{if(void 0===e)return La.limit;if("number"!=typeof e||!Number.isInteger(e)||e<0)throw new TypeError("`retry.limit` must be a finite, non-negative integer");return e},Ma=(e={})=>{if("number"==typeof e)return{...ja(),limit:Ua(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=Ua(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]),{...ja(),...t,limit:n}};async function Oa(e,{signal:t}){return new Promise((n,r)=>{function o(){clearTimeout(i),r(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const i=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e)})}var Ia=Object.prototype.toString,qa=/* @__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 Ba(e){if(!e||(t=e,"[object Error]"!==Ia.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(")"))||qa.has(n))}var Fa=(e,t)=>e instanceof t||e?.name===t.name;var za=Date.parse("2024-01-01"),Ha=/^\d+$/,Ya=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Wa=/^(?: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$/,Ja=/^(?: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$/,Va=/^(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})$/,Ka=({year:e,month:t,day:n,hours:r,minutes:o,seconds:i})=>{const s=Ya.indexOf(t),a=Number(n),c=Number(r),u=Number(o),l=Number(i);if(-1===s||c>23||u>59||l>60)return;const d=Math.min(l,59),h=new Date(Date.UTC(e,s,a,c,u,d));h.setUTCFullYear(e);const p=h.getTime();return h.getUTCFullYear()===e&&h.getUTCMonth()===s&&h.getUTCDate()===a&&h.getUTCHours()===c&&h.getUTCMinutes()===u&&h.getUTCSeconds()===d?60===l?p+1e3:p:void 0},Ga=(e,t)=>e[t],Xa=({value:e,allowTimestamp:t})=>{if(Ha.test(e)){let n=1e3*Number(e);return t&&n>=za&&(n-=Date.now()),Math.max(0,n)}const n=(e=>{const t=Wa.exec(e);if(t)return Ka({year:Number(Ga(t,3)),month:Ga(t,2),day:Ga(t,1),hours:Ga(t,4),minutes:Ga(t,5),seconds:Ga(t,6)});const n=Ja.exec(e);if(n){const e=/* @__PURE__ */new Date,t=Number(Ga(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 i;for(const s of[r-100,r,r+100]){const e=Ka({year:s,month:Ga(n,2),day:Ga(n,1),hours:Ga(n,4),minutes:Ga(n,5),seconds:Ga(n,6)});void 0!==e&&e<=o&&(i=e)}return i}const r=Va.exec(e);if(r){const[e,t,n]=Ga(r,4).split(":");return Ka({year:Number(Ga(r,5)),month:Ga(r,2),day:Ga(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},Qa=Symbol("timedOutResponseData"),Za=Symbol("timedOutOperation"),ec="The `schema` argument must follow the Standard Schema specification",tc=Object.prototype.toString,nc=/^[\0-\u0020]+/g,rc=/[\t\n\r]/g,oc=/^[a-z][\d+.a-z-]*:/i,ic=/^https?:(?!\/\/)/i,sc=e=>e instanceof globalThis.Request||"[object Request]"===tc.call(e),ac=e=>e instanceof globalThis.Response||"[object Response]"===tc.call(e);function cc(e){const t={...e,json:Ca(e.json),context:Ca(e.context),headers:Ca(e.headers),searchParams:(n=e.searchParams,Array.isArray(n)?n.map(e=>[...e]):Ca(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 uc=async(e,t)=>{if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError(ec);const n=t["~standard"];if("object"!=typeof n||null===n||"function"!=typeof n.validate)throw new TypeError(ec);const r=await n.validate(e);if(r.issues)throw new ta(r.issues);return r.value},lc=class e{static create(t,n){const r=n.hooks?.init??[],o=r.length>0?cc(n):n;for(const e of r)e(o);const i=new e(t,o),s=async()=>{if("number"==typeof i.#e.timeout&&i.#e.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");if("number"==typeof i.#e.totalTimeout&&i.#e.totalTimeout>2147483647)throw new RangeError("The `totalTimeout` option cannot be greater than 2147483647");await Promise.resolve();const e=await i.#t();void 0!==e&&(i.#n=Ma(i.#e.retry).limit);let t=e??await i.#r(async()=>i.#o()),n=void 0!==e||i.#i();for(;;){if(void 0===t)return t;if(ac(t))try{t=await i.#s(t)}catch(r){if(!(r instanceof ea))throw r;const e=await i.#a(r,async()=>i.#o());if(void 0===e)return e;t=e,n=i.#i();continue}const e=t;if(!e.ok&&"opaque"!==e.type&&("function"==typeof i.#e.throwHttpErrors?i.#e.throwHttpErrors(e.status):i.#e.throwHttpErrors)){const r=new Xs(e,i.#c(e),i.#u()),o=r;if(r.data=await i.#l(e),n)throw o;const s=await i.#a(r,async()=>i.#o());if(void 0===s)return s;t=s,n=i.#i();continue}break}if(!ac(t))return t;if(i.#d(t),i.#e.onDownloadProgress){if("function"!=typeof i.#e.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!sa)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const e=t.clone();return i.#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(_a(e.body,r,t),n)})(e,i.#e.onDownloadProgress)}return t},a=(async()=>{try{return await s()}catch(e){await i.#p(e)}finally{const e=i.#f;i.#m(e?.body??void 0),i.request!==e&&i.#m(i.request.body??void 0)}})();for(const[e,c]of Object.entries(ua))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(a[e]=async t=>{i.request.headers.set("accept",i.request.headers.get("accept")||c);const n=await a;if("json"!==e)return i.#g(async()=>n[e](),n);const r=await i.#g(async()=>n.text(),n),s=i.#c(n),u=await i.#_(async()=>{const e=o.parseJson?await o.parseJson(r,{request:s,response:n}):""===r&&void 0!==t?void 0:JSON.parse(r);return void 0===t?e:uc(e,t)});return u===Za&&await i.#p(new na(s)),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;#N=/* @__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:ka(this.#w.headers,n.headers),hooks:Ta({},n.hooks),method:Da(n.method??this.#w.method??"GET"),prefix:String(n.prefix||""),retry:Ma(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(nc,"").replaceAll(rc,""))(this.#w);if(ic.test(e))throw new TypeError("`input` url protocol must be followed by `//` when using `baseUrl`");(e=>oc.test(e))(e)||(this.#w=new URL(this.#w,new Request(this.#e.baseUrl).url))}}oa&&ia&&(this.#x=this.#e.signal??this.#w.signal,this.#v=new globalThis.AbortController,this.#e.signal=this.#T()),ra&&(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&&(aa&&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[Ra]?.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?.[Ra];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#$(e){const t=Ma(this.#e.retry);if(this.#b>=Math.min(t.limit,this.#n))throw e;const n=e instanceof Error?e:new Zs(e);if(n instanceof ea)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===Za)throw new na(this.request);if(!1===o)throw e;if(!0===o)return this.#A(t)}if(function(e){return Fa(e,na)}(e)){if(!t.retryOnTimeout)throw e;return this.#A(t)}if(function(e){return Fa(e,Xs)}(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=Xa(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 Fa(e,Qs)}(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.#D(e,t.milliseconds);if(n===Qa){if(t.fromTotalTimeout)throw new na(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!==Qa)return o;if(r.fromTotalTimeout)throw new na(this.request);this.#L()}#P(){const e=!1===this.#e.timeout?1e4:this.#e.timeout,t=this.#M();if(void 0===t)return{milliseconds:e,fromTotalTimeout:!1};if(t<=0)throw new na(this.request);return{milliseconds:Math.min(e,t),fromTotalTimeout:t<=e}}#O(){const e=this.#M();if(void 0!==e){if(e<=0)throw new na(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.#O()}catch(i){await this.#p(i)}const r=e();if(void 0===n)return r;const o=await Promise.race([r,new Promise(e=>{const t=setTimeout(()=>{e(Qa)},n);r.finally(()=>{clearTimeout(t)}).catch(()=>{})})]);return o===Qa&&(this.#v?.abort(),await this.#p(new na(this.#c(t)))),o}async#_(e){const t=this.#M();if(void 0===t)return e();if(t<=0)return this.#v?.abort(),Za;let n;try{const r=new Promise(e=>{n=setTimeout(()=>{e(Za)},t)}),o=Promise.resolve().then(e).then(e=>({status:"fulfilled",value:e})).catch(e=>({status:"rejected",error:e})),i=await Promise.race([o,r]),s=this.#M();if(i===Za||void 0!==s&&s<=0)return this.#v?.abort(),i===Za?o.then(e=>{"fulfilled"===e.status&&this.#I(e.value)}):"fulfilled"===i.status&&this.#I(i.value),Za;if("rejected"===i.status)throw i.error;return i.value}finally{clearTimeout(n)}}#j(e){const t=(e.split(";",1)[0]??"").trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(t)}async#D(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")??""),i=[];let s=0;const a=(async()=>{try{for(;;){const{done:e,value:t}=await r.read();if(e)break;if(s+=t.byteLength,s>10485760)return void r.cancel().catch(()=>{});i.push(o.decode(t,{stream:!0}))}}catch{return}return i.push(o.decode()),i.join("")})(),c=new Promise(e=>{const n=setTimeout(()=>{e(Qa)},t);a.finally(()=>{clearTimeout(n)})}),u=await Promise.race([a,c]);return u===Qa&&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(Qa)},n)})])}catch{return}finally{clearTimeout(o)}}#m(e){e&&e.cancel().catch(()=>{})}#h(e){this.#m(e.body??void 0)}#I(e){ac(e)?this.#h(e):sc(e)&&this.#m(e.body??void 0)}#T(){return this.#x?AbortSignal.any([this.#x,this.#v.signal]):this.#v.signal}#L(){const e=this.#M();if(void 0!==e&&e<=0)throw new na(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===Za)throw new na(this.request);if(sc(t))this.#q(t);else if(ac(t))return t}}async#s(e){const t=this.#c(e);for(const r of this.#e.hooks.afterResponse){const o=this.#B(e.clone(),t);let i;this.#d(o);try{if(i=await this.#_(async()=>r({request:this.request,options:this.#u(),response:o,retryCount:this.#b})),i===Za)throw new na(this.request)}catch(n){throw o!==e&&this.#h(o),this.#h(e),n}if(i instanceof ha)throw o!==e&&this.#h(o),this.#h(e),new ea(i.options);const s=ac(i)?this.#B(i,t):e;o!==e&&o!==s&&o.body!==s.body&&this.#h(o),e!==s&&e.body!==s.body&&this.#h(e),e=s}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.#$(e),la),r={signal:this.#x},o=this.#M();if(void 0!==o){if(o<=0)throw new na(this.request);if(n>=o)throw await Oa(o,r),new na(this.request)}if(await Oa(n,r),this.#L(),e instanceof ea&&e.customRequest){const t=new globalThis.Request(e.customRequest,this.#e.signal?{signal:this.#e.signal}:void 0);this.#q(t)}for(const s of this.#e.hooks.beforeRetry){let t;try{t=await this.#_(async()=>s({request:this.request,options:this.#u(),error:e,retryCount:this.#b+1}))}catch(i){throw i instanceof Error&&i!==e&&this.#k.add(i),i}if(t===Za)throw new na(this.request);if(sc(t)){this.#q(t);break}if(ac(t))return this.#E=!0,this.#b++,t;if(t===da)return}return this.#L(),this.#b++,this.#r(t)}#i(){const e=this.#E;return this.#E=!1,e}async#o(){this.#v?.signal.aborted&&(this.#v=new globalThis.AbortController,this.#e.signal=this.#T(),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 ma||n in fa||(t[n]=e[n]));return t})(this.#e);this.#n=Ma(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.#M();if(void 0!==t&&t<=0)throw new na(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,i)=>{const s=setTimeout(()=>{n&&n.abort(),i(new na(e))},r.timeout);r.fetch(e,t).then(o).catch(i).then(()=>{clearTimeout(s)})})}(n,e,this.#v,{timeout:r,fetch:this.#e.fetch});return this.#B(o,n)}catch(r){if(Ba(r))throw new Qs(this.request,{cause:r});throw r}}#M(){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:i,totalTimeout:s,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.#N.get(e)??this.request}#B(e,t){return this.#N.set(e,t),e}#F(e,t){return this.#e.onUploadProgress&&e.body&&ra?ya(e,this.#e.onUploadProgress,t??this.#e.body??void 0):e}},dc=e=>{const t=(t,n)=>lc.create(t,xa(e,n));for(const n of ca)t[n]=(t,r)=>lc.create(t,xa(e,r,{method:n}));return t.create=e=>dc(xa(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),dc(xa(e,t))),t.stop=da,t.retry=pa,t},hc=dc(),pc=/* @__PURE__ */new Map,fc=hc.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=pc.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=pc.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();pc.set(e.url,{etag:n,lastModified:r,body:o})}}return t}]}});async function mc({apiUrl:e,locale:t,portalCode:n,params:r,signal:o}){const i=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 fc.get(i,{headers:{locale:t},signal:o}).json()}catch(s){if(s instanceof Xs)throw new Error(`Search request failed (${s.response.status})`);throw s}}function gc(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)}function _c(e,t,n){const r=Number(n);r&&(e[t]=String(r))}var yc=/^\d{4}-\d{2}-\d{2}$/,vc=/^\d{1,10}$/,bc="\\|[\\p{L}\\p{M}\\d '’.()-]{1,100}",wc=new RegExp(`^\\d{1,10}${bc}$`,"u"),xc=new RegExp(`^\\d{1,10}${bc}${bc}$`,"u");function kc(e){return e&&yc.test(e)?e:void 0}function Sc(e){return"number"==typeof e?Number.isSafeInteger(e)&&e>=0:"string"==typeof e&&vc.test(e)}function Cc(e){return t=>"string"==typeof t&&e.test(t)}var Ec={countries:{format:Sc,list:!0},regions:{format:Cc(wc),list:!0},cities:{format:Cc(xc),list:!0},persons_max:{format:Sc,list:!1},bedrooms_min:{format:Sc,list:!1},bathrooms_min:{format:Sc,list:!1},weekprice_max:{format:Sc,list:!1}};function Nc(e,{format:t,list:n}){if(t(e))return e;if(!n||!Array.isArray(e)||e.length>50)return;const r=e.filter(t);return r.length>0?r:void 0}function Tc(e,t){const n=parseInt(String(e.persons_min??""),10),r=function(e){const t={};for(const[r,o]of Object.entries(Ec)){const n=Nc(e[r],o);void 0!==n&&(t[r]=n)}const n=gc(e).filter(Sc);return n.length>0&&n.length<=50&&(t.properties=n),t}(e);return{arrival:kc(e.arrival_date),departure:kc(e.departure_date),persons:n>0?n:void 0,filters:Object.keys(r).length>0?r:void 0,result_count:t}}var Rc=/* @__PURE__ */new Set;function Ac(e){return e.isConnected&&"true"===e.getAttribute("data-consent")}function $c(){return"undefined"!=typeof window&&!0===window.bukazuConsent||[...Rc,...document.querySelectorAll(".bukazu-app, #bukazu-app")].some(Ac)}var Pc="https://api.bukazu.com/tracking",Dc="bu_portal_session",Lc=/^[A-Za-z0-9_.-]{1,64}$/,jc="",Uc=null,Mc=!1,Oc=null;function Ic(){return $c()&&Wc(Dc)||jc}function qc(e){return"string"==typeof e&&Lc.test(e)}async function Bc(e){try{!Ic()&&Oc&&await Oc;const t=async function(e){const t=$c(),n=Ic(),r={...e,interaction_info:Fc(e.interaction_info),url:window.location.href,consented:t};n&&(r.session_identifier=n);const o=t&&!Mc&&!Wc(Dc);o&&(r.attribution=function(){if(Uc)return Uc;const e=new URLSearchParams(window.location.search),t={landing_path:window.location.pathname,device_class:zc(window.innerWidth)},n=function(){const e=Hc();return e===window.location.host?"":e}();n&&(t.referrer_host=n);for(const r of["utm_source","utm_medium","utm_campaign"]){const n=e.get(r);n&&(t[r]=n)}return Uc=t,t}(),Mc=!0);let i="";try{i=(await fc.post(Pc,{json:r}).text()).trim()}finally{!i&&o&&(Mc=!1)}if(!i)return;jc=i,$c()&&function(e,t,n){const r=/* @__PURE__ */new Date;r.setTime(r.getTime()+24*n*60*60*1e3),document.cookie=`${e}=${t};expires=${r.toUTCString()};path=/;SameSite=Lax;Secure`}(Dc,i,14)}(e);if(!Ic()&&!Oc){const e=()=>{Oc=null};Oc=t.then(e,e)}await t}catch{}}function Fc(e){const t={};for(const[n,r]of Object.entries(e))null!=r&&""!==r&&(t[n]=r);return t}function zc(e){return e<768?"mobile":e<1024?"tablet":"desktop"}function Hc(){try{return document.referrer?new URL(document.referrer).host:""}catch{return""}}function Yc(){const e=Hc();return e?e===window.location.host?"search":"external":"direct"}function Wc(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""}function Jc({filters:e,PortalSite:t,limit:n,skip:r,onPageChange:a,activePage:l,viewMode:f,onViewModeChange:m}){const{portalCode:g,apiUrl:_,locale:y}=o(zs),{currency:v}=Vs(),[b,w]=u({status:"loading"}),x=JSON.stringify(function(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),_c(o,"persons_min",e.persons_min),_c(o,"persons_max",e.persons_max),_c(o,"bedrooms_min",e.bedrooms_min),_c(o,"bathrooms_min",e.bathrooms_min),_c(o,"weekprice_max",e.weekprice_max);const i=gc(e);return i.length>0&&(o.properties=i.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,_c(o,"no_nights_min",Se(le(e.departure_date),le(e.arrival_date)))):o.no_nights_min="1"),o}(e,{limit:n,skip:r,currency:v})),k=s(()=>JSON.parse(x),[x]),S=JSON.stringify(e),C=c(e);C.current=e;const E=c(null),N=c(null),T=c(null),R=()=>{const e=N.current;null!==e&&null!==T.current&&(N.current=null,E.current=e,Bc({portal_code:g,locale:y,interaction_type:"search",interaction_info:Tc(C.current,T.current)}))};if(i(()=>{if(E.current===S)return;const e=setTimeout(()=>{N.current=S,R()},1e3);return()=>{clearTimeout(e),N.current=null}},[S,g,y]),i(()=>{const e=new AbortController;return T.current=null,w({status:"loading"}),mc({apiUrl:_,locale:y,portalCode:g,params:k,signal:e.signal}).then(t=>{e.signal.aborted||(w({status:"ready",response:t}),T.current=t.meta.total_count,R())}).catch(t=>{e.signal.aborted||w({status:"error",error:t instanceof Error?t:/* @__PURE__ */new Error("A search request failed")})}),()=>{e.abort()}},[_,y,g,k]),"loading"===b.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(p,{})});if("error"===b.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(Is,{errors:b.error})});const{items:A,meta:$}=b.response,P=f??t.options.filtersForm.mode,D=/* @__PURE__ */d(ze,{totalCount:$.total_count,activePage:l,limit:n,onPageChange:a});/* @__PURE__ */
|
|
37
|
+
return h("div",{className:"bu-view-toggle",role:"group","aria-label":ne("view_mode"),children:[/* @__PURE__ */d("button",{type:"button","aria-pressed":"grid"===e,"aria-label":ne("grid_view"),onClick:()=>t("grid"),children:/* @__PURE__ */d(He,{})}),/* @__PURE__ */d("button",{type:"button","aria-pressed":"list"===e,"aria-label":ne("list_view"),onClick:()=>t("list"),children:/* @__PURE__ */d(Ye,{})})]})}var Je="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ve=globalThis,Ke="10.75.0";function Ge(){return Xe(Ve),Ve}function Xe(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||"10.75.0",t[Ke]=t["10.75.0"]||{}}function Qe(e,t,n=Ve){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Ke]=r["10.75.0"]||{};return o[e]||(o[e]=t())}var Ze=["debug","info","warn","error","log","assert","trace"],et={};function tt(e){if(!("console"in Ve))return e();const t=Ve.console,n={},r=Object.keys(et);r.forEach(e=>{const r=et[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function nt(){return ot().enabled}function rt(e,...t){Je&&nt()&&tt(()=>{Ve.console[e](`Sentry Logger [${e}]:`,...t)})}function ot(){return Je?Qe("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var it={enable:function(){ot().enabled=!0},disable:function(){ot().enabled=!1},isEnabled:nt,log:function(...e){rt("log",...e)},warn:function(...e){rt("warn",...e)},error:function(...e){rt("error",...e)}},st=/\(error: (.*)\)/,at=/captureMessage|captureException/;function ct(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],i=e.split("\n");for(let s=n;s<i.length;s++){let e=i[s];e.length>1024&&(e=e.slice(0,1024));const n=st.test(e)?e.replace(st,"$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(ut(t).function||"")&&t.pop();t.reverse(),at.test(ut(t).function||"")&&(t.pop(),at.test(ut(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||ut(t).filename,function:e.function||"?"}))}(o.slice(r))}}function ut(e){return e[e.length-1]||{}}var lt="<anonymous>";function dt(e){try{return e&&"function"==typeof e&&e.name||lt}catch{return lt}}function ht(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 pt={},ft={};function mt(e,t){return pt[e]=pt[e]||[],pt[e].push(t),()=>{const n=pt[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function gt(e,t){if(!ft[e]){ft[e]=!0;try{t()}catch(Rd){Je&&it.error(`Error while instrumenting ${e}`,Rd)}}}function _t(e,t){const n=e&&pt[e];if(n)for(const r of n)try{r(t)}catch(Rd){Je&&it.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${dt(r)}\nError:`,Rd)}}var yt=null;function bt(){yt=Ve.onerror,Ve.onerror=function(e,t,n,r,o){return _t("error",{column:r,error:o,line:n,msg:e,url:t}),!!yt&&yt.apply(this,arguments)},Ve.onerror.__SENTRY_INSTRUMENTED__=!0}var vt=null;function wt(){vt=Ve.onunhandledrejection,Ve.onunhandledrejection=function(e){return _t("unhandledrejection",e),!vt||vt.apply(this,arguments)},Ve.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var xt,kt=Object.prototype.toString;function St(e){switch(kt.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return jt(e,Error)}}function Ct(e,t){return kt.call(e)===`[object ${t}]`}function Et(e){return Ct(e,"ErrorEvent")}function Tt(e){return Ct(e,"DOMError")}function Nt(e){return Ct(e,"String")}function Rt(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function At(e){return null===e||Rt(e)||"object"!=typeof e&&"function"!=typeof e}function $t(e){return Ct(e,"Object")}function Pt(e){return"object"==typeof e&&null!==e}function It(e){return"undefined"!=typeof Event&&jt(e,Event)}function Dt(e){return Boolean(e?.then&&"function"==typeof e.then)}function jt(e,t){try{return e instanceof t}catch{return!1}}function Lt(e){return"undefined"!=typeof Request&&jt(e,Request)}function Ot(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const o=n(r);"function"==typeof o&&Mt(o,r);try{e[t]=o}catch{Je&&it.log(`Failed to replace method "${t}" in object`,e)}}function Ut(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Je&&it.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Mt(e,t){try{e.prototype=t.prototype=t.prototype||{},Ut(e,"__sentry_original__",t)}catch{}}function qt(e){return e.__sentry_original__}function Bt(e){if(St(e))return{message:e.message,name:e.name,stack:e.stack,...Ft(e)};if(It(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...Ft(e)}}return e}function Ft(e){return Pt(e)?Object.fromEntries(Object.entries(e)):{}}function zt(e){if(void 0!==xt)return xt?xt(e):e();const t=/* @__PURE__ */Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=Ve;return t in n&&"function"==typeof n[t]?(xt=n[t])(e):(xt=null,e())}function Ht(){return zt(()=>Math.random())}function Yt(){return zt(()=>Date.now())}var Wt,Jt,Vt=/* @__PURE__ */Symbol.for("sentry.skipNormalization"),Kt=/* @__PURE__ */Symbol.for("sentry.overrideNormalizationDepth");function Gt(e,t=100,n=1/0){try{return Qt("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Xt(e,t=3,n=102400){const r=Gt(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?Xt(e,t-1,n):r;var o}function Qt(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[i,s]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=Zt(e,t);if(!a.startsWith("[object "))return a;if(function(e){return Boolean(e[Vt])}(t))return t;const c=function(e){const t=e[Kt];return"number"==typeof t?t:void 0}(t),u=void 0!==c?c:n;if(0===u)return a.replace("object ","");if(i(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return Qt("",l.toJSON(),u-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let h=0;const p=Bt(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]=Qt(f,e,u-1,r,o),h++}return s(t),d}function Zt(e,t){try{if(Wt){const e=Wt(t);if(e)return e}return"undefined"!=typeof global&&t===global?"[Global]":"number"!=typeof t||Number.isFinite(t)?"function"==typeof t?`[Function: ${dt(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 en(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function tn(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];At(t)?n.push(String(t)):t instanceof Error?n.push(t.message?`${t.name}: ${t.message}`:t.name):n.push(Zt(0,t))}return n.join(t)}function nn(e,t,n=!1){return!!Nt(e)&&(Ct(t,"RegExp")?t.test(e):Nt(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function rn(e,t=[],n=!1){for(const r of t)if(nn(e,r,n))return!0;return!1}function on(e=function(){const e=Ve;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return zt(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Jt||(Jt="10000000100040008000100000000000"),Jt.replace(/[018]/g,e=>(e^(16*Ht()&15)>>e/4).toString(16))}function sn(e){return e.exception?.values?.[0]}function an(e){const{message:t,event_id:n}=e;if(t)return t;const r=sn(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function cn(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function un(e,t){const n=sn(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 ln(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{Ut(e,"__sentry_captured__",!0)}catch{}return!1}var dn;function hn(){return Yt()/1e3}function pn(){return(dn??(dn=function(){const{performance:e}=Ve;if(!e?.now||!e.timeOrigin)return hn;const t=e.timeOrigin;return()=>(t+zt(()=>e.now()))/1e3}()))()}function fn(e){const t=pn(),n={sid:on(),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&&mn(n,e),n}function mn(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||pn(),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:on()),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 gn(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]=gn(r[o],t[o],n-1));return r}function _n(){return on()}function yn(){return on().substring(16)}function bn(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}var vn="_sentrySpan";function wn(e,t){t?Ut(e,vn,function(e){try{const t=Ve.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(t)):delete e[vn]}function xn(e){return bn(e[vn])}var kn=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:_n(),sampleRand:Ht()}}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,wn(t,xn(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&&mn(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:i,user:s,contexts:a,level:c,fingerprint:u=[],propagationContext:l,conversationId:d}=(n instanceof e?n.getScopeData():$t(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},s&&Object.keys(s).length&&(this._user=s),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,wn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:_n(),sampleRand:Ht()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:hn(),...e,message:e.message?en(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:xn(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=gn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||on();if(!this._client)return Je&&it.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||on();if(!this._client)return Je&&it.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||on();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Je&&it.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 Sn=e=>e instanceof Promise&&!e[Cn],Cn=/* @__PURE__ */Symbol("chained PromiseLike"),En=(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,{[Cn]:!0}),t},Tn=class{constructor(e,t){let n,r;n=e||new kn,r=t||new kn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(Rd){throw this._popScope(),Rd}return Dt(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Sn(r)&&Sn(e)?r:En(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 Nn(){const e=Xe(Ge());return e.stack=e.stack||new Tn(Qe("defaultCurrentScope",()=>new kn),Qe("defaultIsolationScope",()=>new kn))}function Rn(e){return Nn().withScope(e)}function An(e,t){const n=Nn();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function $n(e){return Nn().withScope(()=>e(Nn().getIsolationScope()))}function Pn(e){const t=Xe(e);return t.acs?t.acs:{withIsolationScope:$n,withScope:Rn,withSetScope:An,withSetIsolationScope:(e,t)=>$n(t),getCurrentScope:()=>Nn().getScope(),getIsolationScope:()=>Nn().getIsolationScope()}}function In(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 i=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),s=r&&"string"==typeof r?{unit:r}:{};if(i)return{...i,...s};if(!t||"skip-undefined"===t&&void 0===n)return;let a="";try{a=JSON.stringify(n)??""}catch{}return{value:a,type:"string",...s}}function Dn(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const e=In(o,t);e&&(n[r]=e)}return n}function jn(){return Pn(Ge()).getCurrentScope()}function Ln(){return Pn(Ge()).getIsolationScope()}function On(){return jn().getClient()}function Un(e){const t=void 0;const{traceId:n,parentSpanId:r,propagationSpanId:o}=e.getPropagationContext(),i={trace_id:n,span_id:o||yn()};return r&&(i.parent_span_id=r),i}function Mn(e){const t=e;return{scope:t._sentryScope,isolationScope:bn(t._sentryIsolationScope)}}function qn(e){const t=function(e){if(!e||!Nt(e)&&!Array.isArray(e))return;return Array.isArray(e)?e.reduce((e,t)=>{const n=Bn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Bn(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 Bn(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 Fn=/^o(\d+)\./,zn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Hn(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${s}`}function Yn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Wn(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(Fn)?.[1]}(n)),r}function Jn(e){const t="string"==typeof e?function(e){const t=zn.exec(e);if(!t)return void tt(()=>{});const[n,r,o="",i="",s="",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 Yn({host:i,pass:o,path:c,projectId:u,port:s,protocol:n,publicKey:r})}(e):Yn(e);if(t&&function(e){if(!Je)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(it.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(it.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(it.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(it.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}var Vn=!1;function Kn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Zn(e).parent_span_id,i=Mn(e).scope;return{parent_span_id:o,span_id:r?i?.getPropagationContext().propagationSpanId||yn():t,trace_id:n}}function Gn(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 Xn(e){return"number"==typeof e?Qn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Qn(e.getTime()):pn()}function Qn(e){return e>9999999999?e/1e3:e}function Zn(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:i,endTime:s,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:er(e),start_timestamp:Xn(o),timestamp:Xn(s)||void 0,status:tr(a),op:r["sentry.op"],origin:r["sentry.origin"],links:Gn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function er(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function tr(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}var nr=function(e){return e._sentryRootSpan||e};function rr(){Vn||(tt(()=>{}),Vn=!0)}function or(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||On()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function ir(e){it.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function sr(e,t){if(!t?.length)return!1;for(const n of t){if(ur(n)){if(e.description&&nn(e.description,n))return Je&&ir(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&&nn(e.description,n.name),o=!n.op||e.op&&nn(e.op,n.op),i=!n.attributes||Object.entries(n.attributes).every(([t,n])=>ar(e.attributes?.[t],n));if(r&&o&&i)return Je&&ir(e),!0}return!1}function ar(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?nn(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function cr(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 ur(e){return"string"==typeof e||e instanceof RegExp}var lr=/* @__PURE__ */Symbol.for("sentry.nonRecordingSpan");var dr="production";function hr(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:Wn(t)};return t.emit("createDsc",o),o}function pr(e,t){const n=t.getPropagationContext();return n.dsc||hr(n.traceId,e)}function fr(e){const t=On();if(!t)return{};const n=nr(e),r=Zn(n),o=r.data,i=n.spanContext().traceState,s=i?.get("sentry.sample_rate")??o["sentry.sample_rate"]??o["sentry.previous_trace_sample_rate"];function a(e){return"number"!=typeof s&&"string"!=typeof s||(e.sample_rate=`${s}`),e}const c=n._frozenDsc;if(c)return a(c);const u=function(e){return!!e&&!0===e[lr]}(n),l=u&&"ignored"===n.dropReason;if(u&&(!or(t.getOptions())||l)){const e=Mn(n).scope;if(e){const n={...pr(t,e)};return l&&(n.sampled="false"),a(n)}}const d=i?.get("sentry.dsc"),h=d&&qn(d);if(h)return a(h);const p=hr(e.spanContext().traceId,t),f=o["sentry.source"]??o["sentry.segment.name.source"],m=r.description;return"url"!==f&&m&&(p.transaction=m),or()&&(p.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=i?.get("sentry.sample_rand")??Mn(n).scope?.getPropagationContext().sampleRand.toString()),a(p),t.emit("createDsc",p,n),p}function mr(e,t=[]){return[e,t]}function gr(e,t){const[n,r]=e;return[n,[...r,t]]}function _r(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function yr(e){const t=Xe(Ve);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function br(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[yr(r),e]:r.push("string"==typeof e?yr(e):e)}for(const i of n){const[e,t]=i;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(Gt(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 vr(e){const t="string"==typeof e.data?yr(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var wr={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 xr(e){return function(e){return e in wr}(e)?wr[e]:e}function kr(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Sr(e,t,n,r){const o=kr(n),i=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 s=function(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Yt()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Hn(r)},...o&&{trace:o}}}(e,o,r,t);return delete e.sdkProcessingMetadata,mr(s,[[{type:i},e]])}function Cr(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:i,level:s,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(i).length&&(e.contexts={...i,...e.contexts});s&&(e.level=s);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:Kn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:fr(t),...e.sdkProcessingMetadata};const n=nr(t),r=Zn(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,i)}function Er(e,t){const{extra:n,tags:r,attributes:o,user:i,contexts:s,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:d,attachments:h,propagationContext:p,transactionName:f,span:m}=t;Tr(e,"extra",n),Tr(e,"tags",r),Tr(e,"attributes",o),Tr(e,"user",i),Tr(e,"contexts",s),e.sdkProcessingMetadata=gn(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 Tr(e,t,n){e[t]=gn(e[t],n,1)}function Nr(e,t){const n=Qe("globalScope",()=>new kn).getScopeData();return e&&Er(n,e.getScopeData()),t&&Er(n,t.getScopeData()),n}var Rr="user_agent.original";function Ar(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function $r(e){return new Or(t=>{t(e)})}function Pr(e){return new Or((t,n)=>{n(e)})}var Ir,Dr,jr,Lr,Or=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(Rd){r(Rd)}else e(n)},t=>{if(n)try{e(n(t))}catch(Rd){r(Rd)}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&&(Dt(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(Rd){r(Rd)}}};function Ur(e,t,n,r=0){try{const o=Mr(t,n,e,r);return Dt(o)?o:$r(o)}catch(o){return Pr(o)}}function Mr(e,t,n,r){const o=n[r];if(!e||!o)return e;const i=o({...e},t);return Je&&null===i&&it.log(`Event processor "${o.id||"?"}" dropped event`),Dt(i)?i.then(e=>Mr(e,t,n,r+1)):Mr(i,t,n,r+1)}function qr(e,t,n,r,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||on(),timestamp:t.timestamp||hn()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:i}=t;e.environment=e.environment||n||"production",!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);const s=e.request;s?.url&&i&&(s.url=en(s.url,i));i&&e.exception?.values?.forEach(e=>{e.value&&(e.value=en(e.value,i))})}(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=Ve._sentryDebugIds,n=Ve._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Lr&&r.length===Dr&&o.length===jr)return Lr;Dr=r.length,jr=o.length,Lr={},Ir||(Ir={});const i=(t,n)=>{for(const r of t){const t=n[r],o=Ir?.[r];if(o&&Lr&&t)Lr[o[0]]=t,Ir&&(Ir[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&&Lr&&Ir){Lr[o]=t,Ir[r]=[o,t];break}}}}};return t&&i(r,t),n&&i(o,n),Lr}(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 kn;return n.update(t),n}(r,n.captureContext);n.mechanism&&un(c,n.mechanism);const d=o?o.getEventProcessors():[],h=Nr(i,l),p=[...n.attachments||[],...h.attachments];p.length&&(n.attachments=p),Cr(c,h);const f=[...d,...h.eventProcessors];return(n.data&&!0===n.data.__sentry__?$r(c):Ur(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 s&&s>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Gt(e.data,t,n)}}))},...e.user&&{user:Gt(e.user,t,n)},...e.contexts&&{contexts:Gt(e.contexts,t,n)},...e.extra&&{extra:Gt(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Gt(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Gt(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=Gt(e.contexts.flags,3,n));return r}(e,s,a):e))}function Br(e){if(e)return function(e){return e instanceof kn||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>Fr.includes(e))}(e)?{captureContext:e}:e}var Fr=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function zr(e,t){return jn().captureException(e,Br(t))}function Hr(e,t){return jn().captureEvent(e,t)}function Yr(e,t){Ln().setTag(e,t)}function Wr(e){const t=Ln(),{user:n}=Nr(t,jn()),{userAgent:r}=Ve.navigator||{},o=fn({user:n,...r&&{userAgent:r},...e}),i=t.getSession();return"ok"===i?.status&&mn(i,{status:"exited"}),Jr(),t.setSession(o),o}function Jr(){const e=Ln(),t=jn().getSession()||e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),mn(e,n)}(t),Vr(),e.setSession()}function Vr(){const e=Ln(),t=On(),n=e.getSession();n&&t&&t.captureSession(n)}function Kr(e=!1){e?Jr():Vr()}function Gr(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function Xr(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 Qr=[];function Zr(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 eo(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function to(e,t,n){if(n[t.name])Je&&it.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Qr.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),Qr.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))}),Je&&it.log(`Integration installed: ${t.name}`)}}function no(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function ro(){return"undefined"!=typeof window&&(!no()||"renderer"===Ve.process?.type)}function oo(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...ro()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function io(e,t){const n=t??function(e){return so().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Hn(r)),mr(i,[oo(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);so().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function so(){return Qe("clientToLogBufferMap",()=>/* @__PURE__ */new WeakMap)}function ao(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,...ro()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function co(e,t){const n=t??function(e){return uo().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=Hn(r)),mr(i,[ao(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);uo().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function uo(){return Qe("clientToMetricBufferMap",()=>/* @__PURE__ */new WeakMap)}function lo(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:Dn(n.attributes),links:n.links?.map(e=>({...e,attributes:Dn(e.attributes)}))};var n}var ho=/* @__PURE__ */Symbol.for("SentryBufferFullError");function po(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 Pr(ho);const o=r();return t.add(o),o.then(()=>n(o),()=>n(o)),o},drain:function(e){if(!t.size)return $r(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>Gr(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function fo(e,{statusCode:t,headers:n},r=Yt()){const o={...e},i=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(i)for(const a of i.trim().split(",")){const[e,t,,,n]=a.split(":",5),i=parseInt(e,10),s=1e3*(isNaN(i)?60:i);if(t)for(const a of t.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(o[a]=r+s);else o.all=r+s}else s?o.all=r+function(e,t=Yt()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(s,r):429===t&&(o.all=r+6e4);return o}function mo(e,t,n=po(e.bufferSize||64)){let r={};return{send:function(o){const i=[];if(_r(o,(t,n)=>{const o=xr(n);!function(e,t,n=Yt()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,o)?i.push(t):e.recordDroppedEvent("ratelimit_backoff",o)}),0===i.length)return Promise.resolve({});const s=mr(o[0],i),a=t=>{!function(e,t){return _r(e,(e,n)=>t.includes(n))}(s,["client_report"])?_r(s,(n,r)=>{e.recordDroppedEvent(t,xr(r))}):Je&&it.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>t({body:br(s)}).then(e=>413===e.statusCode?(Je&&it.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),a("send_error"),e):(Je&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&it.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=fo(r,e),e),e=>{throw a("network_error"),Je&&it.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===ho)return Je&&it.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}function go(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 _o=["forwarded","-ip","remote-","via","-user"];var yo={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 bo(e,t){return void 0===e?{...t.httpHeaders}:"boolean"==typeof(n=e)||"allow"in n||"deny"in n?{request:e,response:e}:{request:e.request??t.httpHeaders.request,response:e.response??t.httpHeaders.response};var n}function vo(e){const t=null!=e.dataCollection?yo:!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:_o},httpHeaders:{request:{deny:_o},response:{deny:_o}},httpBodies:[],urlQueryParams:{deny:_o},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:bo(n.httpHeaders,t),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 wo="Not capturing exception because it's already been captured.",xo="Discarded session because of missing or non-string release",ko=/* @__PURE__ */Symbol.for("SentryInternalError"),So=/* @__PURE__ */Symbol.for("SentryDoNotSendEventError");function Co(e){return{message:e,[ko]:!0}}function Eo(e){return{message:e,[So]:!0}}function To(e){return Pt(e)&&ko in e}function No(e){return Pt(e)&&So in e}function Ro(e,t,n,r,o){let i,s=0,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,t=>{if(s+=r(t),s>=8e5)o(e);else if(!a){const t=e.getOptions()._flushInterval??5e3;t>0&&(a=!0,i=Gr(setTimeout(()=>{o(e)},t)))}}),e.on("flush",()=>{o(e)})}var Ao=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=po(e.transportOptions?.bufferSize??64),this._dataCollection=vo(e),e.dsn?this._dsn=Jn(e.dsn):Je&&it.warn("No DSN provided, client will not send events."),this._dsn){const t=Xr(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&&Ro(this,"afterCaptureLog","flushLogs",jo,io),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Ro(this,"afterCaptureMetric","flushMetrics",Do,co)}captureException(e,t,n){const r=on();if(ln(e))return Je&&it.log(wo),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:on(),...n},i=Rt(e)?e:String(e),s=At(e),a=s?this.eventFromMessage(i,t,o):this.eventFromException(e,o);return this._process(()=>a.then(e=>this._captureEvent(e,o,r)),s?"unknown":"error"),o.event_id}captureEvent(e,t,n){const r=on();if(t?.originalException&&ln(t.originalException))return Je&&it.log(wo),r;const o={event_id:r,...t},i=e.sdkProcessingMetadata||{},s=i.capturedSpanScope,a=i.capturedSpanIsolationScope,c=$o(e.type);return this._process(()=>this._captureEvent(e,o,s||n,a),c),o.event_id}captureSession(e){this.sendSession(e),mn(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),to(this,e,this._integrations),t||eo(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 i of e.spans)i.op?.startsWith("gen_ai.")?n.push(lo(i)):r.push(i);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,...ro()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}(e,this);let r=Sr(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of t.attachments||[])r=gr(r,vr(o));n&&(r=gr(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=dr}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(Je&&it.warn(xo));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(Je&&it.warn(xo));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const o=kr(n);return mr({sent_at:new Date(Yt()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Hn(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}`;Je&&it.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 Je&&it.error("Error while sending envelope:",t),{}}return Je&&it.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&&to(e,t,n)}),n}(this,e),eo(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 i="ok"===e.status;(i&&0===e.errors||i&&n)&&(mn(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(),i=this.getIntegrationNames();return!t.integrations&&i.length&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),qr(o,e,t,n,this,r).then(e=>(null===e||(this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...Un(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:pr(this,n),...e.sdkProcessingMetadata}),e))}_captureEvent(e,t={},n=jn(),r=Ln()){return Je&&Po(e)&&it.log(`Captured error event \`${go(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{Je&&(No(e)?it.log(e.message):To(e)?it.warn(e.message):it.warn(e))})}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:i}=o,s=Io(e),a=Po(e),c=`before send for type \`${e.type||"error"}\``,u=void 0===i?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}(i),l=$o(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",l),Eo("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(Dt(e))return e.then(e=>{if(!$t(e)&&null!==e)throw Co(n);return e},e=>{throw Co(`${t} rejected with ${e}`)});if(!$t(e)&&null!==e)throw Co(n);return e}(function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,ignoreSpans:s}=t,a=(c=t.beforeSendSpan,!(c&&"function"==typeof c&&"_streamed"in c&&c._streamed)&&t.beforeSendSpan);var c;let u=n;if(Po(u)&&o)return o(u,r);if(Io(u)){if(a||s){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},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:i,profile_id:s?.["sentry.profile_id"],exclusive_time:s?.["sentry.exclusive_time"],measurements:e.measurements,is_segment:!0}}(u);if(s?.length&&sr({description:t.description,op:t.op,attributes:t.data},s))return null;if(a){const e=a(t);e?u=gn(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}):rr()}if(u.spans){const t=[],n=u.spans;for(const e of n)if(s?.length&&sr({description:e.description,op:e.op,attributes:e.data},s))cr(n,e);else if(a){const n=a(e);n?t.push(n):(rr(),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(i){if(u.spans){const e=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(u,r)}}var l;return u}(this,o,e,t),c)}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",l),s){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw Eo(`${c} returned \`null\`, will not send event.`)}const d=n.getSession()||r.getSession();if(a&&d&&this._updateSessionFromEvent(d,o),a&&"number"==typeof u&&Ht()>u)throw this.recordDroppedEvent("sample_rate","error"),Eo(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);if(s){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(s&&h&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...h,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(No(e)||To(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),Co(`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===ho&&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(){Je&&it.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(Je&&it.log("No outcomes to send"));if(!this._dsn)return void(Je&&it.log("No dsn provided, will not send outcomes"));Je&&it.log("Sending outcomes:",e);const t=(n=e,mr((r=this._options.tunnel&&Hn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||hn(),discarded_events:n}]]));var n,r,o;this.sendEnvelope(t)}};function $o(e){return"replay_event"===e?"replay":e||"error"}function Po(e){return void 0===e.type}function Io(e){return"transaction"===e.type}function Do(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+Lo(e.attributes)}function jo(e){let t=0;return e.message&&(t+=2*e.message.length),t+Lo(e.attributes)}function Lo(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Oo(e[0]):At(e)?t+=Oo(e):t+=100}),t}function Oo(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function Uo(e,t){!0===t.debug&&(Je?it.enable():tt(()=>{})),jn().update(t.initialScope);const n=new e(t);return function(e){jn().setClient(e)}(n),n.init(),n}function Mo(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 qo(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 Bo=100;function Fo(e,t){const n=On(),r=Ln();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Bo}=n.getOptions();if(i<=0)return;const s={timestamp:hn(),...e},a=o?tt(()=>o(s,t)):s;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,i))}var zo=/* @__PURE__ */new WeakMap,Ho=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=qt(this);let r;try{zo.has(On())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){zo.set(e,!0)}}),Yo=[/^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$/,/Java object is gone$/],Wo=(e={})=>{let t;return{name:"EventFilters",setup(n){t=Vo(e,n.getOptions())},processEvent:(n,r,o)=>(t||(t=Vo(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&&rn(n,t)}(e,t.ignoreTransactions))return Je&&it.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${an(e)}`),!0}else{if(function(e,t){return!!t?.length&&go(e).some(e=>rn(e,t))}(e,t.ignoreErrors))return Je&&it.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${an(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 Je&&it.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${an(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=Ko(e);return!!n&&rn(n,t)}(e,t.denyUrls))return Je&&it.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${an(e)}.\nUrl: ${Ko(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=Ko(e);return!n||rn(n,t)}(e,t.allowUrls))return Je&&it.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${an(e)}.\nUrl: ${Ko(e)}`),!0}return!1}(n,t)?null:n)}},Jo=(e={})=>({...Wo(e),name:"InboundFilters"});function Vo(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Yo],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ko(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 Je&&it.error(`Cannot extract url for event ${an(e)}`),null}}function Go(e,t,n,r,o,i){if(!o.exception?.values||!i||!St(i.originalException))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=Xo(e,t,r,i.originalException,n,o.exception.values,s,0))}function Xo(e,t,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(St(r[o])){Zo(s,a,r);const i=e(t,r[o]),u=c.length;ei(i,o,u,a),c=Xo(e,t,n,r[o],o,[i,...c],i,u)}return Qo(r)&&r.errors.forEach((i,u)=>{if(St(i)){Zo(s,a,r);const l=e(t,i),d=c.length;ei(l,`errors[${u}]`,d,a),c=Xo(e,t,n,i,o,[l,...c],l,d)}}),c}function Qo(e){return Array.isArray(e.errors)}function Zo(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Qo(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ei(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function ti(e){return function(e){return St(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 ni=/* @__PURE__ */new Set([]);var ri=/* @__PURE__ */new Set;function oi(){"console"in Ve&&Ze.forEach(function(e){!ri.has(e)&&e in Ve.console&&(ri.add(e),Ot(Ve.console,e,function(t){return et[e]=t,function(...t){const n=t[0],r=et[e],o=ni.size&&"string"==typeof n&&rn(n,ni);o||_t("console",{args:t,level:e}),(!o||Je&&it.isEnabled())&&r?.apply(Ve.console,t)}}))})}function ii(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var si=()=>{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&&(!!ci(e,t)&&!!ai(e,t))))}(e,t)||!!function(e,t){const n=ui(t),r=ui(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!ci(e,t)&&!!ai(e,t)))}(e,t))}(t,e))return Je&&it.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function ai(e,t){let n=ht(e),r=ht(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 ci(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 ui(e){return e.exception?.values?.[0]}var li=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=jn().getScopeData(),n=Ln().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:o}=Zn(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!o?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}});function di(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}var hi=Ve;function pi(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function fi(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in hi))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(pi(hi.fetch))return!0;let e=!1;const t=hi.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=pi(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Je&&it.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function mi(e,t){const n="fetch",r=mt(n,e);return gt(n,()=>function(e,t=!1){if(t&&!fi())return;Ot(Ve,"fetch",function(t){return function(...n){const r=/* @__PURE__ */new Error,{method:o,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:_i(t),method:gi(n,"method")?String(n.method).toUpperCase():Lt(t)&&gi(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:_i(t),method:gi(t,"method")?String(t.method).toUpperCase():"GET"}}(n),s={args:n,fetchData:{method:o,url:i},startTimestamp:1e3*pn(),virtualError:r,headers:yi(n)};return e||_t("fetch",{...s}),t.apply(Ve,n).then(async t=>(e?e(t):_t("fetch",{...s,endTimestamp:1e3*pn(),response:t}),t),e=>{_t("fetch",{...s,endTimestamp:1e3*pn(),error:e}),St(e)&&void 0===e.stack&&(e.stack=r.stack,Ut(e,"framesToPop",1));const t=On()?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==t&&St(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(s.fetchData.url).host;"always"===t?e.message=`${e.message} (${n})`:Ut(e,"__sentry_fetch_url_host__",n)}catch{}throw e})}})}(void 0,t)),r}function gi(e,t){return Pt(e)&&!!e[t]}function _i(e){return"string"==typeof e?e:e?gi(e,"url")?e.url:e.toString?e.toString():"":""}function yi(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(Lt(t))return new Headers(t.headers)}catch{}}var bi=Ve;function vi(){try{return bi.document.location.href}catch{return""}}var wi=Ve,xi=0;function ki(){return xi>0}function Si(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(qt(e))return e}catch{return e}const n=function(...n){Ve._sentryWrappedDepth=(Ve._sentryWrappedDepth||0)+1;try{const r=n.map(e=>Si(e,t));return e.apply(this,r)}catch(r){throw xi++,setTimeout(()=>{xi--}),function(...e){const t=Pn(Ge());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&&(cn(e,void 0,void 0),un(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),zr(r)}),r}finally{Ve._sentryWrappedDepth=(Ve._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Mt(n,e),Ut(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function Ci(){const e=vi(),{referrer:t}=wi.document||{},{userAgent:n}=wi.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function Ei(e,t){const n=Ri(e,t),r={type:Pi(t),value:Ii(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ti(e,t,n,r){const o=On()?.getOptions().normalizeDepth,i=(s=t,Object.values(s).find(St));var s;const a={__serialized__:Xt(t,o)};if(i)return{exception:{values:[Ei(e,i)]},extra:a};const c={exception:{values:[{type:It(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Li(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=Ri(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Ni(e,t){return{exception:{values:[Ei(e,t)]}}}function Ri(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&Ai.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 Ai=/Minified React error #\d+;/i;function $i(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function Pi(e){const t=e?.name;return!t&&$i(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Ii(e){const t=e?.message;return $i(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?ti(t.error):ti(e):"No error message"}function Di(e,t,n,r,o){let i;if(Et(t)&&t.error)return Ni(e,t.error);if(Tt(t)||Ct(t,"DOMException")){const o=t;if("stack"in t){i=Ni(e,t);const o=i.exception?.values?.[0];if(r&&n&&o&&!o.stacktrace){const t=Ri(e,n);t.length&&(o.stacktrace={frames:t},un(i,{synthetic:!0}))}}else{const t=o.name||(Tt(o)?"DOMError":"DOMException"),s=o.message?`${t}: ${o.message}`:t;i=ji(e,s,n,r),cn(i,s)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return St(t)?Ni(e,t):$t(t)||It(t)?(i=Ti(e,t,n,o),un(i,{synthetic:!0}),i):(i=ji(e,t,n,r),cn(i,`${t}`,void 0),un(i,{synthetic:!0}),i)}function ji(e,t,n,r){const o={};if(r&&n){const r=Ri(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),un(o,{synthetic:!0})}if(Rt(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 Li(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(Bt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return Et(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:It(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 Oi=class extends Ao{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:wi.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:Ke})),o.version=Ke)}(t,"browser",["browser"],wi.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;wi.document&&wi.document.addEventListener("visibilitychange",()=>{"hidden"===wi.document.visibilityState&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",qo)}eventFromException(e,t){return function(e,t,n,r){const o=Di(e,t,n?.syntheticException||void 0,r);return un(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),$r(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const i=ji(e,t,r?.syntheticException||void 0,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),$r(i)}(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 Ui="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Mi=Ve;function qi(e,t,n){Mi.document&&Mi.addEventListener(e,t,n)}function Bi(e,t,n){Mi.document&&Mi.removeEventListener(e,t,n)}var Fi={};try{"undefined"!=typeof Node&&(Fi.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(Fi.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,Fi.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,Fi.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,Fi.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(Fi.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function zi(e,t,n){const r=Fi[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return"function"==typeof o?o.call(e,n):o}function Hi(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let i=0,s=0;const a=" > ",c=3;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++<r&&(u=Yi(n,l),!("html"===u||i>1&&s+o.length*c+u.length>=d));)o.push(u),s+=u.length,n=zi(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function Yi(e,t){const n=[],r=zi(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=zi(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=>zi(e,"getAttribute",t)).map(t=>[t,zi(e,"getAttribute",t)]):null;if(o?.length)o.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=zi(e,"id");t&&n.push(`#${t}`);const r=zi(e,"className");if(r&&Nt(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const i of["aria-label","type","name","title","alt"]){const t=zi(e,"getAttribute",i);t&&n.push(`[${i}="${t}"]`)}return n.join("")}var Wi,Ji,Vi,Ki;function Gi(){if(!Mi.document)return;const e=_t.bind(null,"dom"),t=Xi(e,!0);Mi.document.addEventListener("click",t,!1),Mi.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Mi[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Ot(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__||{},i=r[n]=r[n]||{refCount:0};if(!i.handler){const r=Xi(e);i.handler=r,t.call(this,n,r,o)}i.refCount++}catch{}return t.call(this,n,r,o)}}),Ot(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 Xi(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;Ut(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ut(r,"_sentryId",on());const o="keypress"===n.type?"input":n.type;(function(e){if(e.type!==Ji)return!1;try{if(!e.target||e.target._sentryId!==Vi)return!1}catch{}return!0})(n)||(e({event:n,name:o,global:t}),Ji=n.type,Vi=r?r._sentryId:void 0),clearTimeout(Wi),Wi=Mi.setTimeout(()=>{Vi=void 0,Ji=void 0},1e3)}}function Qi(e){const t="history";mt(t,e),gt(t,Zi)}function Zi(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=Ki,o=function(e){try{return new URL(e,Mi.location.origin).toString()}catch{return e}}(String(n));if(Ki=o,r===o)return e.apply(this,t);_t("history",{from:r,to:o})}return e.apply(this,t)}}Mi.addEventListener("popstate",()=>{const e=Mi.location.href,t=Ki;Ki=e,t!==e&&_t("history",{from:t,to:e})}),"history"in hi&&hi.history&&(Ot(Mi.history,"pushState",e),Ot(Mi.history,"replaceState",e))}var es={};var ts="__sentry_xhr_v3__";function ns(){if(!Mi.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=/* @__PURE__ */new Error;const o=1e3*pn(),i=Nt(n[0])?n[0].toUpperCase():void 0,s=function(e){if(Nt(e))return e;try{return e.toString()}catch{}}(n[1]);if(!i||!s)return e.apply(t,n);t[ts]={method:i,url:s,request_headers:{}},"POST"===i&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[ts];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}_t("xhr",{endTimestamp:1e3*pn(),startTimestamp:o,xhr:t,virtualError:r}),r=void 0,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,i=t[ts];return i&&Nt(r)&&Nt(o)&&(i.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[ts];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return _t("xhr",{startTimestamp:1e3*pn(),xhr:t}),e.apply(t,n)}})}function rs(e,t=function(e){const t=es[e];if(t)return t;let n=Mi[e];if(pi(n))return es[e]=n.bind(Mi);const r=Mi.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(Rd){Ui&&it.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,Rd)}return n?es[e]=n.bind(Mi):n}("fetch")){let n=0,r=0;return mo(e,async function(o){const i=o.body.length;n+=i,r++;const s={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,s);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(Rd){throw es["fetch"]=void 0,Rd}finally{n-=i,r--}},po(e.bufferSize||40))}var os="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function is(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 ss=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,as=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cs=/\((\S*)(?::(\d+))(?::(\d+))\)/,us=/at (.+?) ?\(data:(.+?),/,ls=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ds=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hs=ct(...[[30,e=>{const t=e.match(us);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=ss.exec(e);if(n){const[,e,t,r]=n;return is(e,"?",+t,+r)}const r=as.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=cs.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=ps(r[1]||"?",r[2]);return is(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=ls.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ds.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]=ps(n,e),is(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),ps=(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]},fs=1024,ms=(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=mt(t,e);gt(t,oi)}(function(e){return function(t){if(On()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:ii(t.level),message:tn(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${tn(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Fo(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(On()!==e)return;let r,o,i="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>fs&&(os&&it.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=fs),"string"==typeof i&&(i=[i]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Hi(t,{keyAttrs:i,maxStringLength:s}),o=function(e,t=5){if(!bi.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}),Fo(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),mt("dom",n),gt("dom",Gi)),t.xhr&&function(e){mt("xhr",e),gt("xhr",ns)}(function(e){return function(t){if(On()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[ts];if(!n||!r||!o)return;const{method:i,url:s,status_code:a,body:c}=o,u={method:i,url:s,status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:di(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),Fo(d,l)}}(e)),t.fetch&&mi(function(e){return function(t){if(On()!==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},i={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,o),Fo(i,o)}else{const o=t.response,i={...t.fetchData,status_code:o?.status},s={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:i,type:"http",level:di(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,s),Fo(a,s)}}}(e)),t.history&&Qi(function(e){return function(t){if(On()!==e)return;let n=t.from,r=t.to;const o=Mo(wi.location.href);let i=n?Mo(n):void 0;const s=Mo(r);i?.path||(i=o),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Fo({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){On()===e&&Fo({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:an(t)},{event:t})}}(e))}}};var gs="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(","),_s=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&Ot(wi,"setTimeout",ys),t.setInterval&&Ot(wi,"setInterval",ys),t.requestAnimationFrame&&Ot(wi,"requestAnimationFrame",bs),t.XMLHttpRequest&&"XMLHttpRequest"in wi&&Ot(XMLHttpRequest.prototype,"send",vs);const e=t.eventTarget;e&&(Array.isArray(e)?e:gs).forEach(e=>function(e,t){const n=wi[e]?.prototype;if(!n?.hasOwnProperty?.("addEventListener"))return;Ot(n,"addEventListener",function(n){return function(r,o,i){try{"function"==typeof o.handleEvent&&(o.handleEvent=Si(o.handleEvent,{mechanism:{data:{handler:dt(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,Si(o,{mechanism:{data:{handler:dt(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),i])}}),Ot(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 ys(e){return function(...t){const n=t[0];return t[0]=Si(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${dt(e)}`}}),e.apply(this,t)}}function bs(e){return function(t){return e.apply(this,[Si(t,{mechanism:{data:{handler:dt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function vs(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Ot(n,e,function(t){const n={mechanism:{data:{handler:dt(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=qt(t);return r&&(n.mechanism.data.handler=dt(r)),Si(t,n)})}),e.apply(this,t)}}var ws=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===wi.document)return void(os&&it.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));Wr({ignoreDuration:!0});let e=!1;(e=>{const t=Mi.requestIdleCallback||Mi.setTimeout;"hidden"===Mi.document?.visibilityState?e():(qi("visibilitychange",e=(e=>{let t=!1;return()=>{t||(e(),t=!0)}})(e),{once:!0,capture:!0}),qi("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Bi("visibilitychange",e,{capture:!0}),Bi("pagehide",e,{capture:!0})}))})(()=>{e||(Kr(),e=!0)});const n=Ln();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&Kr())}),"route"===t&&Qi(({from:t,to:n})=>{t!==n&&(Wr({ignoreDuration:!0}),Kr(),e=!0)})}}},xs=()=>({name:"CultureContext",preprocessEvent(e){const t=ks();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=ks();t&&Ar(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function ks(){try{const e=wi.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Ss=(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";mt(t,e),gt(t,bt)}(t=>{const{stackParser:n,attachStacktrace:r}=Es();if(On()!==e||ki())return;const{msg:o,url:i,line:s,column:a,error:c}=t,u=function(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[];0===c.length&&c.push({colno:r,lineno:n,filename:Ts(t)??vi(),function:"?",in_app:!0});return e}(Di(n,c||o,void 0,r,!1),i,s,a);u.level="error",Hr(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Cs("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";mt(t,e),gt(t,wt)}(t=>{const{stackParser:n,attachStacktrace:r}=Es();if(On()!==e||ki())return;const o=function(e){if(At(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),i=At(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:Di(n,o,void 0,r,!0);i.level="error",Hr(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Cs("onunhandledrejection"))}}};function Cs(e){os&&it.log(`Global Handler attached: ${e}`)}function Es(){return On()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Ts(e){if(Nt(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,"),i=e.indexOf(",");let s="";if(t&&-1!==i){const t=e.slice(i+1);s=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${o?",base64":""}${s?`,${s}`:""}`}return e}(e,!1)}>`:e}var Ns=()=>({name:"HttpContext",preprocessEvent(e){if(!wi.navigator&&!wi.location&&!wi.document)return;const t=Ci(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSpan(e){if(!wi.navigator&&!wi.location&&!wi.document)return;const t=Ci();Ar(e,{[Rr]:t.headers["User-Agent"],...e.is_segment&&{"url.full":"http.client"!==e.attributes?.["sentry.op"]?t.url:void 0,"http.request.header.referer":t.headers.Referer}})}}),Rs=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){Go(Ei,o.getOptions().stackParser,n,t,e,r)}}},As=/^HTML(\w*)Element$/;function $s(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(As.test(t))return`[HTMLElement: ${Hi(e)}]`}}function Ps(){return!!function(){if(void 0===wi.window)return!1;const e=wi;if(e.nw)return!1;if(!(e.chrome||e.browser)?.runtime?.id)return!1;const t=vi();return!(wi===wi.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}()&&(os&&tt(()=>{}),!0)}function Is(e={}){const t=!e.skipBrowserExtensionCheck&&Ps();let n=null==e.defaultIntegrations?[Jo(),Ho(),li(),_s(),ms(),Ss(),Rs(),si(),Ns(),xs(),ws()]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(o=e.stackParser||hs,Array.isArray(o)?ct(...o):o),integrations:Zr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||rs};var o;return Wt=$s,Uo(Oi,r)}function Ds(e){const t="undefined"!=typeof window?window.location.href:void 0;Yr("portal_code",e.portalCode),Yr("object_code",e.objectCode??""),Yr("locale",e.locale??""),function(e,t){Ln().setContext(e,t)}("bukazu",{portal_code:e.portalCode,object_code:e.objectCode??null,locale:e.locale??null,url:t??null})}function js(e){zr(e)}function Ls(e){!function(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;jn().captureMessage(e,n,r)}(e,"error")}var Os=/* @__PURE__ */new WeakSet;function Us(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 Ms(e){const t=Us(e.errors);return"object"!=typeof e.errors||null===e.errors||Os.has(e.errors)||(Os.add(e.errors),js(new Error(t.join("\n")))),/* @__PURE__ */h("div",{className:"bukazu-error-message",children:[/* @__PURE__ */d("h2",{children:ne("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 Bs(e){if(!e)return"en";const t=e.split(/[-_]/)[0].toLowerCase();return function(e){return qs.includes(e)}(t)?t:"en"}var Fs=e=>"[object Object]"===Object.prototype.toString.call(e),zs=n({locale:"nl",portalCode:"",objectCode:"",apiUrl:"https://api.bukazu.com"}),Hs="bukazuCurrency";function Ys(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 Ws=n({currency:void 0,setCurrency:()=>{},allowed:[],multiCurrency:!1});function Js({currencies:e,children:t}){const n=s(()=>Ys(e),[e]),[o,i]=u(()=>{const e=function(){try{return window.localStorage.getItem(Hs)}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(Hs,e)}catch{}}(e),i(e))},[n]),c=n.multi_currency&&n.allowed.length>1,l=s(()=>({currency:c?o:void 0,setCurrency:a,allowed:n.allowed,multiCurrency:c}),[c,n.allowed,o,a]);/* @__PURE__ */
|
|
38
|
+
return d(Ws.Provider,{value:l,children:t})}function Vs(){return o(Ws)}function Ks(){const{currency:e,setCurrency:t,allowed:n,multiCurrency:r}=Vs();return!r||n.length<=1?null:/* @__PURE__ */h("div",{className:"bu-currency-selector",children:[/* @__PURE__ */d("label",{htmlFor:"bu-currency",children:ne("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 Gs=class extends Error{name="KyError";get isKyError(){return!0}},Xs=class extends Gs{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}},Qs=class extends Gs{name="NetworkError";request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}},Zs=e=>null!==e&&"object"==typeof e,ea=e=>Zs(e)&&!Array.isArray(e),ta=e=>"number"==typeof e&&e>=0,na=Object.prototype.toString,ra=e=>e instanceof Error||"[object Error]"===na.call(e),oa=e=>e instanceof globalThis.Request||"[object Request]"===na.call(e),ia=e=>e instanceof globalThis.Response||"[object Response]"===na.call(e),sa=class e extends Error{static wrap(t){return ra(t)?t:new e(t)}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}},aa=class extends Gs{name="ForceRetryError";customDelay;code;customRequest;constructor(e){if(null===e)throw new TypeError("The `ky.retry()` options must be an object");const t=e?.delay;if(void 0!==t&&!ta(t))throw new TypeError("The `ky.retry()` `delay` option must be a non-negative number or `Infinity`");if(void 0!==e?.code&&"string"!=typeof e.code)throw new TypeError("The `ky.retry()` `code` option must be a string");if(void 0!==e?.request&&!oa(e.request))throw new TypeError("The `ky.retry()` `request` option must be a `Request`");const n=void 0===e?.cause?void 0:sa.wrap(e.cause);super(void 0===e?.code?"Forced retry":`Forced retry: ${e.code}`,n?{cause:n}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},ca=class extends Error{name="SchemaValidationError";issues;constructor(e){super("Response schema validation failed"),this.issues=e}},ua=class extends Gs{name="TimeoutError";request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}},la=(()=>{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{return!1}const o="Bun"in globalThis||"Deno"in globalThis;return(e||o)&&!t})(),da="function"==typeof globalThis.AbortController,ha="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,pa="function"==typeof globalThis.ReadableStream,fa="function"==typeof globalThis.FormData,ma=["get","post","put","patch","head","delete","query"],ga={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},_a=()=>Object.keys(ga).filter(e=>"bytes"!==e||"function"==typeof globalThis.Response?.prototype?.bytes),ya=2147483647,ba=Symbol.for("ky.stop"),va=class{get isRetryMarker(){return!0}options;constructor(e){this.options=e}},wa=e=>e instanceof va||!0===e?.isRetryMarker,xa=e=>new va(e),ka=["onUploadProgress","onDownloadProgress","timeout","fetch","throwHttpErrors"],Sa={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,maxResponseSize:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Ca={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},Ea=class extends Gs{name="ResponseSizeError";request;maxResponseSize;constructor(e,t){super(`Response body exceeded ${t} bytes: ${e.method} ${e.url}`),this.request=e,this.maxResponseSize=t}},Ta=new TextEncoder,Na=/* @__PURE__ */new WeakMap,Ra=/* @__PURE__ */new Set([101,103,204,205,304]),Aa=(e,t)=>{const n=e?.body;n&&n!==t?.body&&n.cancel().catch(()=>{})},$a=e=>Math.max(0,Number(e.get("content-length"))||0),Pa=e=>e.replaceAll(/\r\n|\r|\n/g,"\r\n"),Ia=e=>e.replaceAll("\n","%0A").replaceAll("\r","%0D").replaceAll('"',"%22"),Da=(e,t,n)=>{let r,o=0;return e.pipeThrough(new TransformStream({transform(e,i){if(i.enqueue(e),r){o+=r.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),n?.({percent:e,totalBytes:0===t?0:Math.max(t,o),transferredBytes:o},r)}r=e},flush(){const e=r??/* @__PURE__ */new Uint8Array;o+=e.byteLength,n?.({percent:1,totalBytes:o,transferredBytes:o},e)}}))},ja=(e,t,n=(t.body?Na.get(t.body):void 0))=>{const r=e.clone.bind(e);if(e.body&&n){Na.set(e.body,n);for(const t of Object.keys(ga)){if("function"!=typeof e[t])continue;const r=e[t].bind(e);Object.defineProperty(e,t,{async value(){try{return await r()}catch(e){throw n()??e}},writable:!0,configurable:!0})}}return Object.defineProperties(e,{url:{value:t.url},redirected:{value:t.redirected},type:{value:t.type},headers:{value:t.headers},clone:{value(){const t=r();return e.body&&n&&Na.set(e.body,n),ja(t,e)},writable:!0,configurable:!0}}),e},La=e=>{const{body:t}=e;if(t&&!e.bodyUsed&&!t.locked&&!Ra.has(e.status))return t},Oa=(e,t,n)=>{if(!e.body||e.bodyUsed||e.body.locked||e.keepalive||"no-cors"===e.mode||!(e instanceof globalThis.Request))return e;const r=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[n,r]of e)t+=44,t+=Ta.encode(`Content-Disposition: form-data; name="${Ia(Pa(n))}"`).byteLength,r instanceof Blob&&(t+=Ta.encode(`; filename="${Ia(r.name??"")}"`).byteLength,t+=Ta.encode(`\r\nContent-Type: ${r.type||"application/octet-stream"}`).byteLength),t+=4,t+="string"==typeof r?Ta.encode(Pa(r)).byteLength:r.size,t+=2;return 0===t?0:t+40+6}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:"string"==typeof e?Ta.encode(e).byteLength:e instanceof URLSearchParams?Ta.encode(e.toString()).byteLength:0})(n??e.body)||$a(e.headers);return new Request(e,{duplex:"half",body:Da(e.body,r,t),headers:e.headers,referrer:e.referrer,referrerPolicy:e.referrerPolicy})},Ua=Symbol.for("ky.replaceOption"),Ma=e=>Zs(e)&&!0===e[Ua]?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},qa=(...e)=>{for(const t of e)if(void 0!==t&&!ea(t))throw new TypeError("The `options` argument must be an object");return nc({},...e)},Ba=(e={},t={})=>{const n=new globalThis.Headers(e);for(const[r,o]of Object.entries(Ja(t)))void 0===o?n.delete(r):n.set(r,o);return n},Fa=e=>{if(!ea(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},za=e=>Fa(e)||Array.isArray(e),Ha=e=>{if(e instanceof URLSearchParams){const t=new URLSearchParams(e),n=e[Xa];return n&&(t[Xa]=new Set(n)),t}return Array.isArray(e)?[...e]:Fa(e)?{...e}:e},Ya=e=>Array.isArray(e)?e.map(e=>Ha(e)):Ha(e),Wa=(e,t=/* @__PURE__ */new WeakMap)=>{if(!za(e))return e;const n=t.get(e);if(n)return n;if(Array.isArray(e)){const n=[];t.set(e,n);for(const r of e)n.push(Wa(r,t));return n}const r=null===Object.getPrototypeOf(e)?Object.create(null):{};t.set(e,r);for(const o of Reflect.ownKeys(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Object.defineProperty(r,o,{value:Wa(e[o],t),writable:!0,enumerable:!0,configurable:!0});return r},Ja=e=>{if(Fa(e))return e;const t=e instanceof globalThis.Headers,n={};for(const[r,o]of new globalThis.Headers(e).entries())n[r]=t&&"undefined"===o?void 0:o;return n},Va=(e,t)=>{const n=/* @__PURE__ */new Map;for(const[r,o]of[...Object.entries(Ja(e)),...Object.entries(Ja(t))])n.set(r.toLowerCase(),o);return Object.fromEntries(n)};function Ka(e,t,n){if(Object.hasOwn(t,n)&&void 0===t[n])return[];const{isReplace:r,value:o}=Ma(t[n]);if(!(void 0===o||Array.isArray(o)&&o.every(e=>"function"==typeof e)))throw new TypeError(`\`hooks.${n}\` must be an array of functions`);return r?[...o??[]]:nc(e[n]??[],o??[])}var Ga=(e={},t={})=>{if(!ea(t))throw new TypeError("The `hooks` option must be an object");return{init:Ka(e,t,"init"),beforeRequest:Ka(e,t,"beforeRequest"),beforeRetry:Ka(e,t,"beforeRetry"),beforeError:Ka(e,t,"beforeError"),afterResponse:Ka(e,t,"afterResponse")}},Xa=Symbol("deletedParameters"),Qa=/* @__PURE__ */new Set(["json","context"]),Za=(e,t)=>{if(!za(e))return e;if(t.has(e))return t.get(e);t.set(e,e);const n=((e,t)=>{let n;for(const[r,o]of Object.entries(e)){const i=t(o);i!==o&&(n??=Array.isArray(e)?[...e]:{...e},n[r]=i)}return n??e})(e,e=>Za(Ma(e).value,t));return t.set(e,n),n},ec=(e,t)=>{const n=new URLSearchParams,r=/* @__PURE__ */new Set;for(const o of[e,t])if(o instanceof URLSearchParams){const e=o[Xa];if(e)for(const t of e)n.delete(t),r.add(t);for(const[t,r]of o.entries())n.append(t,r)}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");const t=String(e[0]),{isReplace:r,value:o}=Ma(e[1]);r&&n.delete(t),n.append(t,String(o))}else if(Zs(o))for(const[e,t]of Object.entries(o)){const{isReplace:o,value:i}=Ma(t);void 0===i?(n.delete(e),r.add(e)):(o&&n.delete(e),n.append(e,String(i)))}else{const e=new URLSearchParams(o);for(const[t,r]of e.entries())n.append(t,r)}return r.size>0&&(n[Xa]=r),n},tc=(e,...t)=>{let n,r={},o={},i={};const s=[];for(const a of t)if(Array.isArray(a))Array.isArray(r)||(r=[]),r=[...r,...a];else if(Zs(a)){for(let[t,o]of Object.entries(a)){const i=Ma(o),{isReplace:a}=i;o=i.value;const c=e&&"signal"===t;if(c&&(a||void 0===o)&&(s.length=0),c&&o instanceof globalThis.AbortSignal)s.push(o);else{if(e&&"headers"===t&&null===o)throw new TypeError("The `headers` option must not be `null`. Use `undefined` to clear it.");if(e&&"context"===t){if(void 0!==o&&!ea(o))throw new TypeError("The `context` option must be an object");r={...r,context:void 0===o?{}:a?{...o}:{...r.context,...o}}}else if(e&&"searchParams"===t){if(null===o)throw new TypeError("The `searchParams` option must not be `null`. Use `undefined` to clear it.");n=void 0===o?void 0:a||void 0===n?Ya(o):ec(n,o)}else{if(e&&"retry"===t&&void 0!==o&&"number"!=typeof o&&!ea(o))throw new TypeError("`retry` must be a number or an object");e&&"retry"===t&&!a&&(Zs(o)&&"number"==typeof r[t]?r={...r,[t]:{limit:r[t]}}:"number"==typeof o&&Zs(r[t])&&(o={limit:o})),e&&"retry"===t&&Fa(o)&&(a||!za(r[t]))?o=tc(!1,{},o):!a&&za(r[t])&&za(o)&&Array.isArray(r[t])===Array.isArray(o)&&(o=tc(!1,r[t],o)),r={...r,[t]:o}}}}if(e&&void 0!==a.hooks){const{value:e,isReplace:t}=Ma(a.hooks);i=Ga(t?{}:i,e),r.hooks=i}if(e&&Zs(a.headers)){const{value:e,isReplace:t}=Ma(a.headers);o=Va(t?{}:o,e),r.headers=o}}if(void 0!==n&&(r.searchParams=n),s.length>0&&(1===s.length?r.signal=s[0]:r.signal=ha?AbortSignal.any(s):s.at(-1)),e)for(const[a,c]of Object.entries(r))Qa.has(a)||(r[a]=Za(c,/* @__PURE__ */new Map));return r},nc=(...e)=>tc(!0,...e),rc=e=>ma.includes(e.toLowerCase())?e.toUpperCase():e,oc=/* @__PURE__ */new Set([...ma,"options","trace"]),ic=e=>oc.has(e.toLowerCase())?e.toLowerCase():e,sc={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},ac=(e={})=>{if("number"==typeof e&&(e={limit:e}),!ea(e))throw new TypeError("`retry` must be a number or an object");const t={...sc,...Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))};if(!Number.isInteger(t.limit)||t.limit<0)throw new TypeError("`retry.limit` must be a finite, non-negative integer");for(const n of["methods","statusCodes","afterStatusCodes"])if(!Array.isArray(t[n]))throw new Error(`retry.${n} must be an array`);for(const[n,r]of[["methods",e=>"string"==typeof e],["statusCodes",e=>Number.isInteger(e)],["afterStatusCodes",e=>Number.isInteger(e)]])if(t[n].some(e=>!r(e)))throw new TypeError(`\`retry.${n}\` must only contain ${"methods"===n?"strings":"numbers"}`);for(const n of["maxRetryAfter","backoffLimit"])if(!ta(t[n]))throw new TypeError(`\`retry.${n}\` must be a non-negative number or \`Infinity\``);for(const n of["delay","shouldRetry"])if(void 0!==t[n]&&"function"!=typeof t[n])throw new TypeError(`\`retry.${n}\` must be a function`);if(void 0!==t.jitter&&"boolean"!=typeof t.jitter&&"function"!=typeof t.jitter)throw new TypeError("`retry.jitter` must be a boolean or a function");if("boolean"!=typeof t.retryOnTimeout)throw new TypeError("`retry.retryOnTimeout` must be a boolean");return t.methods=t.methods.map(e=>ic(e)),t.statusCodes=[...t.statusCodes],t.afterStatusCodes=[...t.afterStatusCodes],t};async function cc(e,{signal:t}){return new Promise((n,r)=>{function o(){clearTimeout(i),r(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const i=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e)})}var uc=/* @__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 lc(e){if(!e||!ra(e)||"TypeError"!==e.name||"string"!=typeof e.message)return!1;const{message:t,stack:n}=e;return"Load failed"===t||t.startsWith("Load failed (")&&t.endsWith(")")?void 0===n||"__sentry_captured__"in e:!!t.startsWith("error sending request for url")||(!!("Failed to fetch"===t||t.startsWith("Failed to fetch (")&&t.endsWith(")"))||uc.has(t))}var dc=(e,t)=>e instanceof t||!0===e?.isKyError&&e?.name===t.name;function hc(e){return dc(e,aa)}var pc=/^\d+$/,fc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],mc=/^(?: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$/,gc=/^(?: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$/,_c=/^(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})$/,yc=({year:e,month:t,day:n,hours:r,minutes:o,seconds:i})=>{const s=fc.indexOf(t),a=Number(n),c=Number(r),u=Number(o),l=Number(i);if(-1===s||c>23||u>59||l>60)return;const d=Math.min(l,59),h=new Date(Date.UTC(e,s,a,c,u,d));h.setUTCFullYear(e);const p=h.getTime();return h.getUTCFullYear()===e&&h.getUTCMonth()===s&&h.getUTCDate()===a&&h.getUTCHours()===c&&h.getUTCMinutes()===u&&h.getUTCSeconds()===d?60===l?p+1e3:p:void 0},bc=(e,t)=>e[t],vc=({value:e,allowTimestamp:t})=>{if(pc.test(e)){let n=1e3*Number(e);return t&&Number(e)>=1e9&&(n-=Date.now()),Math.max(0,n)}const n=(e=>{const t=mc.exec(e);if(t)return yc({year:Number(bc(t,3)),month:bc(t,2),day:bc(t,1),hours:bc(t,4),minutes:bc(t,5),seconds:bc(t,6)});const n=gc.exec(e);if(n){const e=/* @__PURE__ */new Date,t=Number(bc(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 i;for(const s of[r-100,r,r+100]){const e=yc({year:s,month:bc(n,2),day:bc(n,1),hours:bc(n,4),minutes:bc(n,5),seconds:bc(n,6)});void 0!==e&&e<=o&&(i=e)}return i}const r=_c.exec(e);if(r){const[e,t,n]=bc(r,4).split(":");return yc({year:Number(bc(r,5)),month:bc(r,2),day:bc(r,3).trim(),hours:e,minutes:t,seconds:n})}})(e);if(void 0!==n)return Math.max(0,n-Date.now())},wc=Symbol("timedOut"),xc=()=>globalThis.performance?.now()??Date.now(),kc=(e,t)=>Promise.race([e,new Promise(n=>{const r=setTimeout(()=>{n(wc)},t);e.finally(()=>{clearTimeout(r)}).catch(()=>{})})]),Sc=e=>{(ia(e)||oa(e))&&Aa(e)},Cc=e=>{e.then(e=>{Sc(e)}).catch(()=>{})},Ec=e=>{const t=(e.split(";",1)[0]??"").trim().toLowerCase();if(!t.endsWith("json"))return!1;const n=t.at(-5);return"/"===n||("."===n||"+"===n||"-"===n)&&t.includes("/")},Tc=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.headers.get("content-type")??"",i=Ec(o)?new TextDecoder:(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})(o),s=[];let a=0;const c=(async()=>{try{for(;;){const{done:e,value:t}=await r.read();if(e)break;if(a+=t.byteLength,a>10485760)return void r.cancel().catch(()=>{});s.push(i.decode(t,{stream:!0}))}}catch(e){if(function(e){return dc(e,Ea)}(e))throw e;return}return s.push(i.decode()),s.join("")})(),u=await kc(c,t);return u===wc&&r.cancel().catch(()=>{}),u},Nc=(e,t)=>{if(!1!==e){if(!ta(e))throw new TypeError(`The \`${t}\` option must be a non-negative number or \`false\``);if(e>2147483647)throw new RangeError(`The \`${t}\` option cannot be greater than 2147483647`)}},Rc=({throwHttpErrors:e=!0,timeout:t=1e4,fetch:n=globalThis.fetch.bind(globalThis)})=>({throwHttpErrors:e,timeout:t,fetch:n}),Ac=e=>{for(const n of["parseJson","stringifyJson","fetch","onDownloadProgress","onUploadProgress"])if(void 0!==e[n]&&"function"!=typeof e[n])throw new TypeError(`The \`${n}\` option must be a function`);const{throwHttpErrors:t}=e;if("boolean"!=typeof t&&"function"!=typeof t)throw new TypeError("The `throwHttpErrors` option must be a boolean or a function")},$c=/^[\0-\u0020]+/g,Pc=/[\t\n\r]/g,Ic=/^[a-z][\d+.a-z-]*:/i,Dc=/^https?:(?!\/\/)/i,jc=(e,t,n)=>{if("string"!=typeof e)return e;if(t&&(e=`${t.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`),n){const t=(e=>e.replaceAll($c,"").replaceAll(Pc,""))(e);if(Dc.test(t))throw new TypeError("`input` url protocol must be followed by `//` when using `baseUrl`");if(!(e=>Ic.test(e))(t))return new URL(e,new Request(n).url)}return e},Lc=(e,t)=>{e.searchParams.has(t)&&e.searchParams.delete(t)};var Oc=async(e,t)=>{const n=Zs(t)||"function"==typeof t?t["~standard"]:void 0;if(!Zs(n)||"function"!=typeof n.validate)throw new TypeError("The `schema` argument must follow the Standard Schema specification");const r=await n.validate(e);if(r.issues)throw new ca(r.issues);return r.value},Uc=class e{static create(t,n){const r=n.hooks?.init??[],o=r.length>0?function(e){return{...e,headers:Va({},e.headers??{}),context:{...e.context},json:Wa(e.json),searchParams:Ya(e.searchParams),retry:Wa(e.retry)}}(n):n;for(const e of r)e(o);const i=new e(t,o),s=(async()=>{let e;try{return e=await i.#e(),e}catch(t){return await i.#t(t)}finally{const t=i.#n;Aa(t,e),t&&i.request!==t&&Aa(i.request,e)}})();for(const e of _a()){const t=ga[e];s[e]=async n=>{i.request!==i.#n&&i.request.headers.set("accept",i.request.headers.get("accept")||t);const r=await s;if(void 0===r)throw new TypeError("The request resolved without a response, so there is no body to read. This happens when a `beforeRetry` hook returns `ky.stop`. Throw from the hook instead of returning `ky.stop`.");if("json"!==e)return i.#r(async()=>r[e](),r);const o=await i.#r(async()=>r.text(),r),a=i.#o(r);let c;try{c=await i.#i(async()=>{const e=""!==o||void 0===n||i.#s.parseJson?await i.#a(o,a,r):void 0;return void 0===n?e:await Oc(e,n)})}catch(u){throw i.#c?.aborted&&await i.#t(i.#c.reason,a),u}return c===wc&&await i.#t(new ua(a),a),c}}return s}request;#u;#l=0;#d;#s;#h;#n;#p=!1;#c;#f=/* @__PURE__ */new WeakSet;#m;#g;#_=/* @__PURE__ */new WeakSet;#y=/* @__PURE__ */new WeakMap;#b=/* @__PURE__ */new WeakSet;constructor(e,t={}){if("string"!=typeof e&&!(e instanceof URL||e instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");const{maxResponseSize:n=Number.POSITIVE_INFINITY,totalTimeout:r=!1}=t;if(Object.hasOwn(t,"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");for(const s of["headers","method","prefix","baseUrl","referrer","referrerPolicy"])if(null===t[s])throw new TypeError(`The \`${s}\` option must not be \`null\`. Use \`undefined\` to clear it.`);if(void 0!==t.context&&!ea(t.context))throw new TypeError("The `context` option must be an object");if(this.#s={...t,headers:Ba(e.headers,t.headers),hooks:Ga({},t.hooks),method:rc(t.method??e.method??"GET"),referrer:t.referrer??e.referrer,referrerPolicy:t.referrerPolicy??e.referrerPolicy,prefix:String(t.prefix||""),retry:ac(t.retry),...Rc(t),totalTimeout:r,maxResponseSize:n,context:t.context??{}},Ac(this.#s),Nc(this.#s.timeout,"timeout"),Nc(r,"totalTimeout"),this.#d=this.#s.retry.limit,n!==Number.POSITIVE_INFINITY&&(!Number.isSafeInteger(n)||n<0))throw new TypeError("The `maxResponseSize` option must be a non-negative safe integer or Infinity");this.#h=e instanceof globalThis.Request?e:void 0,e=jc(e,this.#s.prefix,this.#s.baseUrl),da&&ha&&(this.#c=this.#s.signal??this.#h?.signal,this.#u=new globalThis.AbortController,this.#s.signal=this.#v()),la&&(this.#s.duplex="half");const o=void 0!==t.headers&&Ba({},t.headers).has("content-type");void 0!==this.#s.json&&(this.#s.body=this.#s.stringifyJson?.(this.#s.json)??JSON.stringify(this.#s.json),o||this.#s.headers.set("content-type","application/json")),e instanceof globalThis.Request&&(fa&&this.#s.body instanceof globalThis.FormData||this.#s.body instanceof URLSearchParams)&&!o&&this.#s.headers.delete("content-type"),this.request=new globalThis.Request(e,this.#s),this.#p="function"==typeof globalThis.ReadableStream&&this.#s.body instanceof globalThis.ReadableStream;const{searchParams:i}=this.#s;if((e=>{if(void 0===e)return!1;if(null===e)throw new TypeError("The `searchParams` option must not be `null`. Use `undefined` to clear it.");return Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0||Boolean(e[Xa]?.size):"object"==typeof e?Object.keys(e).length>0:"string"==typeof e?e.trim().length>0:Boolean(e)})(i)){const e=new URL(this.request.url);if(((e,t)=>{const n=t?.[Xa];if(n)for(const r of n)Lc(e,r);if("string"==typeof t){const n=t.replace(/^\?/,"");""!==n&&(e.search=e.search?`${e.search}&${n}`:`?${n}`)}else if(!ea(t)||t instanceof URLSearchParams)for(const[r,o]of new URLSearchParams(t))e.searchParams.append(r,o);else for(const[r,o]of Object.entries(t))void 0===o?Lc(e,r):e.searchParams.append(r,o)})(e,i),e.href!==this.request.url){const{body:t,cache:n,credentials:r,integrity:o,keepalive:i,mode:s,redirect:a,referrer:c,referrerPolicy:u}=this.request,l=la&&!i&&"no-cors"!==s;this.request=new globalThis.Request(e,{...this.#s,cache:n,credentials:r,integrity:o,keepalive:i,mode:s,redirect:a,referrer:c,referrerPolicy:u,body:this.#s.body??(l?t:void 0)})}}this.#g="number"==typeof r?xc()+r:Number.POSITIVE_INFINITY}async#e(){await Promise.resolve();const e=await this.#w();void 0!==e&&(this.#d=ac(this.#s.retry).limit);let t=e??await this.#x();for(;;){if(void 0===t)return;const e=this.#_.has(t);let r;try{t=await this.#k(t)}catch(n){if(!hc(n))throw n;r=n}if(void 0===r){const n=t;if(n.ok||"opaque"===n.type||!this.#S(n))break;const o=new Xs(n,this.#o(n),this.#C());if(o.data=await this.#E(n),this.#T(),this.#N(),e)throw o;r=o}t=await this.#R(r)}if(this.#A(t),this.#s.onDownloadProgress){if(!pa)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const e=((e,t)=>{const n=La(e);if(!n)return e;const r=e.headers.get("content-encoding")?.toLowerCase(),o=Boolean(r)&&"identity"!==r?0:$a(e.headers),i=Da(n,o,t);return ja(new Response(i,e),e)})(t,this.#s.onDownloadProgress);return this.#$(e,this.#o(t)),this.#A(e)}return t}#P(e,t){const n=e.delay(this.#l+1);if(!ta(n))throw new TypeError("`retry.delay` must return a non-negative number or `Infinity`",{cause:t});let r=n;return!0===e.jitter?r=Math.random()*n:"function"==typeof e.jitter&&(r=e.jitter(n),(!Number.isFinite(r)||r<0)&&(r=n)),Math.min(e.backoffLimit,r)}async#I(e){const t=ac(this.#s.retry);if(this.#l>=Math.min(t.limit,this.#d))throw e;const n=sa.wrap(e);if(hc(n))return n.customDelay??this.#P(t,e);if(!t.methods.includes(ic(this.request.method)))throw e;let r=!1;const{shouldRetry:o}=t;if(void 0!==o){const t=await this.#i(async()=>o({error:n,retryCount:this.#l+1}));if(this.#T(),t===wc)throw new ua(this.#D);if(!1===t)throw e;r=!0===t}if(function(e){return dc(e,ua)}(e)){if(!r&&!t.retryOnTimeout)throw e;return this.#P(t,e)}if(function(e){return dc(e,Xs)}(e)){if(!r&&!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 r=vc(n);return void 0===r?this.#P(t,e):Math.min(t.maxRetryAfter,r)}if(!r&&413===e.response.status)throw e;return this.#P(t,e)}if(!r&&!function(e){return dc(e,Qs)}(e))throw e;return this.#P(t,e)}#A(e){if(!this.#s.parseJson||this.#b.has(e))return e;this.#b.add(e);const t=this.#o(e);e.json=async()=>this.#a(await e.text(),t,e);const n=e.clone.bind(e);return e.clone=()=>this.#A(this.#$(n(),t)),e}async#t(e,t=this.#D){if(!ra(e))throw e;if(this.#f.has(e))throw e;let n=e;for(const r of this.#s.hooks.beforeError){const e=await r({request:t,options:this.#C(),error:n,retryCount:this.#l});ra(e)&&(n=e)}throw n}async#E(e){const t=this.#o(e),n=({fromTotalTimeout:e})=>{if(e)throw new ua(t);this.#N(t)},r=this.#j(t),o=await Tc(e,r.milliseconds);if(o===wc)return void n(r);if(!o)return;if(!Ec(e.headers.get("content-type")??""))return o;const i=this.#j(t),s=await kc(Promise.resolve().then(()=>this.#a(o,t,e)),i.milliseconds).catch(()=>{});if(s!==wc)return s;n(i)}#j(e){const t=!1===this.#s.timeout?1e4:this.#s.timeout,n=this.#L();if(0===n)throw new ua(e);return{milliseconds:Math.min(t,n),fromTotalTimeout:n<=t}}#O(){const e=this.#L();if(0===e)throw new ua(this.#D);const t=Math.min(!1===this.#s.timeout?Number.POSITIVE_INFINITY:this.#s.timeout,e);return t===Number.POSITIVE_INFINITY?void 0:t}async#r(e,t){const n=this.#o(t);let r;try{r=this.#O()}catch(s){await this.#t(s,n)}const o=e();let i;try{i=void 0===r?await o:await kc(o,r)}catch(s){this.#c?.aborted&&await this.#t(this.#c.reason,n),0!==this.#L()&&(lc(s)&&await this.#t(new Qs(n,{cause:s}),n),await this.#t(s,n)),i=wc}return this.#c?.aborted&&await this.#t(this.#c.reason,n),i!==wc&&0!==this.#L()||(this.#u?.abort(),await this.#t(new ua(n),n)),i}async#i(e){const t=this.#c;t?.throwIfAborted();const n=this.#L();if(0===n)return this.#u?.abort(),wc;let r,o,i;try{const s=new Promise((e,n)=>{t&&(o=()=>{n(t.reason)},t.addEventListener("abort",o,{once:!0}))});if(i=e(),n===Number.POSITIVE_INFINITY)return await Promise.race([i,s]);const a=new Promise(e=>{r=setTimeout(()=>{e(wc)},n)}),c=await Promise.race([i,a,s]);return c===wc||0===this.#L()?(this.#u?.abort(),c===wc?Cc(i):Sc(c),wc):c}catch(s){if(t?.aborted&&(i&&Cc(i),t.throwIfAborted()),0===this.#L())return this.#u?.abort(),wc;throw s}finally{clearTimeout(r),o&&t?.removeEventListener("abort",o)}}#a(e,t,n){const{parseJson:r}=this.#s;return r?r(e,{request:t,response:n}):JSON.parse(e)}#v(){return this.#c?AbortSignal.any([this.#c,this.#u.signal]):this.#u.signal}#S(e){const{throwHttpErrors:t}=this.#s;try{return"function"==typeof t?t(e.status):t}catch(n){throw Aa(e),n}}get#D(){return this.#n??this.request}#N(e=this.#D){if(0===this.#L())throw new ua(e)}async#w(){for(const e of this.#s.hooks.beforeRequest){const t=await this.#i(async()=>e({request:this.request,options:this.#C(),retryCount:0}));if(t===wc)throw new ua(this.#D);if(oa(t))this.#U(this.#M(t));else if(ia(t))return this.#_.add(t),t}}async#k(e){const t=this.#o(e);e=this.#q(e);for(const r of this.#s.hooks.afterResponse){const o=this.#$(e.clone(),t);let i;this.#A(o);try{if(i=await this.#i(async()=>r({request:this.request,options:this.#C(),response:o,retryCount:this.#l})),i===wc)throw new ua(this.#D);if(wa(i))throw new aa(i.options)}catch(n){throw Aa(o),Aa(e),n}const s=ia(i)?this.#$(i,t):e;Aa(o,s),Aa(e,s),s!==e&&(e=this.#q(s))}return e}async#x(){try{return await this.#B()}catch(e){return this.#R(e)}}async#R(e){this.#T();const t=Math.min(await this.#I(e),ya),n={signal:this.#c},r=this.#L();if(0===r)throw new ua(this.#D);if(t>=r)throw await cc(r,n),new ua(this.#D);await cc(t,n),this.#N(),this.#u?.signal.aborted&&(this.#u=new globalThis.AbortController,this.#s.signal=this.#v(),this.#U(this.#M(this.request),this.#p)),hc(e)&&e.customRequest&&this.#U(this.#M(e.customRequest));for(const i of this.#s.hooks.beforeRetry){let t;try{t=await this.#i(async()=>i({request:this.request,options:this.#C(),error:sa.wrap(e),retryCount:this.#l+1}))}catch(o){throw this.#T(),ra(o)&&o!==e&&this.#f.add(o),o}if(t===wc)throw new ua(this.#D);if(oa(t)){this.#U(this.#M(t));break}if(ia(t))return this.#_.add(t),this.#l++,t;if(t===ba)return;ea(t)&&this.#F(t.options)}return this.#N(),this.#l++,this.#x()}async#B(){Aa(this.#n,this.request);const e=(e=>{const t={};for(const n of Object.keys(e))Object.hasOwn(Ca,n)||Object.hasOwn(Sa,n)||Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0,configurable:!0});return t})(this.#s);this.#d=ac(this.#s.retry).limit;const t=this.#d>0?this.#M(this.request.clone()):void 0,n=this.#z(this.request);this.#n=n,t&&(this.request=t,this.#p=!0);try{const t=this.#O(),{fetch:r}=this.#s,o=void 0===t?await r(n,e):await async function(e,t,n,r){let o,i=!1;try{return await new Promise((s,a)=>{o=setTimeout(()=>{i=!0,n?.abort(),a(new ua(e))},r.timeout);const{fetch:c}=r;c(e,t).then(e=>{i?Aa(e):s(e)}).catch(a)})}finally{clearTimeout(o)}}(n,e,this.#u,{timeout:t,fetch:r});if(!ia(o))throw new TypeError("The `fetch` option must resolve with a `Response`");if(0===this.#L())throw this.#u?.abort(),Aa(o),new ua(n);return this.#$(o,n)}catch(r){if(this.#T(),0===this.#L())throw this.#u?.abort(),new ua(n);if(lc(r))throw new Qs(n,{cause:r});throw r}}#T(){this.#c?.throwIfAborted()}#L(){return Math.max(0,this.#g-xc())}#F(e){if(!ea(e))throw new TypeError("The `options` returned from a `beforeRetry` hook must be an object");for(const r of Object.keys(e))if(!ka.includes(r))throw new TypeError(`The \`${r}\` option cannot be changed from a \`beforeRetry\` hook`);const t={...this.#s,...e},n={...t,...Rc(t)};Ac(n),Nc(n.timeout,"timeout"),Object.assign(this.#s,n),this.#m=void 0}#C(){if(!this.#m){const{hooks:e,json:t,parseJson:n,stringifyJson:r,searchParams:o,timeout:i,totalTimeout:s,maxResponseSize:a,throwHttpErrors:c,fetch:u,...l}=this.#s;this.#m=Object.freeze(l)}return this.#m}#U(e,t=!1){this.#p&&Aa(this.request,e),this.#m=void 0,this.request=e,this.#p=t}#M(e){return this.#s.signal&&e instanceof globalThis.Request?new globalThis.Request(e,{signal:this.#s.signal,referrer:e.referrer,referrerPolicy:e.referrerPolicy}):e}#o(e){return this.#y.get(e)??this.#D}#$(e,t){return this.#y.set(e,t),e}#q(e){const t=this.#o(e);return this.#$(((e,t,n)=>{const r=La(e);if(!r||n===Number.POSITIVE_INFINITY)return e;let o,i=0;const s=Na.get(r),a=r.pipeThrough(new TransformStream({transform(e,r){if(i+=e.byteLength,i>n)throw o=new Ea(t,n),o;r.enqueue(e)}}));return ja(new Response(a,e),e,()=>o??s?.())})(e,t,this.#s.maxResponseSize),t)}#z(e){return this.#s.onUploadProgress&&la&&e.body?Oa(e,this.#s.onUploadProgress,this.#s.body):e}},Mc=(e,t)=>{try{return Uc.create(e,t())}catch(n){const e=Promise.reject(n);for(const t of _a())e[t]=async()=>e;return e}},qc=e=>{const t=(t,n)=>Mc(t,()=>qa(e,n));for(const n of ma)t[n]=(t,r)=>Mc(t,()=>qa(e,r,{method:n}));return t.create=e=>qc(qa(e)),t.extend=t=>("function"==typeof t&&(t=t(qa(Wa(e)))),qc(qa(e,t))),t.stop=ba,t.retry=xa,t},Bc=qc(),Fc=/* @__PURE__ */new Map,zc=Bc.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=Fc.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=Fc.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();Fc.set(e.url,{etag:n,lastModified:r,body:o})}}return t}]}});async function Hc({apiUrl:e,locale:t,portalCode:n,params:r,signal:o}){const i=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 zc.get(i,{headers:{locale:t},signal:o}).json()}catch(s){if(s instanceof Xs)throw new Error(`Search request failed (${s.response.status})`);throw s}}function Yc(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)}function Wc(e,t,n){const r=Number(n);r&&(e[t]=String(r))}var Jc=/^\d{4}-\d{2}-\d{2}$/,Vc=/^\d{1,10}$/,Kc="\\|[\\p{L}\\p{M}\\d '’.()-]{1,100}",Gc=new RegExp(`^\\d{1,10}${Kc}$`,"u"),Xc=new RegExp(`^\\d{1,10}${Kc}${Kc}$`,"u");function Qc(e){return e&&Jc.test(e)?e:void 0}function Zc(e){return"number"==typeof e?Number.isSafeInteger(e)&&e>=0:"string"==typeof e&&Vc.test(e)}function eu(e){return t=>"string"==typeof t&&e.test(t)}var tu={countries:{format:Zc,list:!0},regions:{format:eu(Gc),list:!0},cities:{format:eu(Xc),list:!0},persons_max:{format:Zc,list:!1},bedrooms_min:{format:Zc,list:!1},bathrooms_min:{format:Zc,list:!1},weekprice_max:{format:Zc,list:!1}};function nu(e,{format:t,list:n}){if(t(e))return e;if(!n||!Array.isArray(e)||e.length>50)return;const r=e.filter(t);return r.length>0?r:void 0}function ru(e,t){const n=parseInt(String(e.persons_min??""),10),r=function(e){const t={};for(const[r,o]of Object.entries(tu)){const n=nu(e[r],o);void 0!==n&&(t[r]=n)}const n=Yc(e).filter(Zc);return n.length>0&&n.length<=50&&(t.properties=n),t}(e);return{arrival:Qc(e.arrival_date),departure:Qc(e.departure_date),persons:n>0?n:void 0,filters:Object.keys(r).length>0?r:void 0,result_count:t}}var ou=/* @__PURE__ */new Set;function iu(e){return e.isConnected&&"true"===e.getAttribute("data-consent")}function su(){return"undefined"!=typeof window&&!0===window.bukazuConsent||[...ou,...document.querySelectorAll(".bukazu-app, #bukazu-app")].some(iu)}var au="https://api.bukazu.com/tracking",cu="bu_portal_session",uu=/^[A-Za-z0-9_.-]{1,64}$/,lu="",du=null,hu=!1,pu=null;function fu(){return su()&&wu(cu)||lu}function mu(e){return"string"==typeof e&&uu.test(e)}async function gu(e){try{!fu()&&pu&&await pu;const t=async function(e){const t=su(),n=fu(),r={...e,interaction_info:_u(e.interaction_info),url:window.location.href,consented:t};n&&(r.session_identifier=n);const o=t&&!hu&&!wu(cu);o&&(r.attribution=function(){if(du)return du;const e=new URLSearchParams(window.location.search),t={landing_path:window.location.pathname,device_class:yu(window.innerWidth)},n=function(){const e=bu();return e===window.location.host?"":e}();n&&(t.referrer_host=n);for(const r of["utm_source","utm_medium","utm_campaign"]){const n=e.get(r);n&&(t[r]=n)}return du=t,t}(),hu=!0);let i="";try{i=(await zc.post(au,{json:r}).text()).trim()}finally{!i&&o&&(hu=!1)}if(!i)return;lu=i,su()&&function(e,t,n){const r=/* @__PURE__ */new Date;r.setTime(r.getTime()+24*n*60*60*1e3),document.cookie=`${e}=${t};expires=${r.toUTCString()};path=/;SameSite=Lax;Secure`}(cu,i,14)}(e);if(!fu()&&!pu){const e=()=>{pu=null};pu=t.then(e,e)}await t}catch{}}function _u(e){const t={};for(const[n,r]of Object.entries(e))null!=r&&""!==r&&(t[n]=r);return t}function yu(e){return e<768?"mobile":e<1024?"tablet":"desktop"}function bu(){try{return document.referrer?new URL(document.referrer).host:""}catch{return""}}function vu(){const e=bu();return e?e===window.location.host?"search":"external":"direct"}function wu(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""}function xu({filters:e,PortalSite:t,limit:n,skip:r,onPageChange:a,activePage:l,viewMode:f,onViewModeChange:m}){const{portalCode:g,apiUrl:_,locale:y}=o(zs),{currency:b}=Vs(),[v,w]=u({status:"loading"}),x=JSON.stringify(function(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),Wc(o,"persons_min",e.persons_min),Wc(o,"persons_max",e.persons_max),Wc(o,"bedrooms_min",e.bedrooms_min),Wc(o,"bathrooms_min",e.bathrooms_min),Wc(o,"weekprice_max",e.weekprice_max);const i=Yc(e);return i.length>0&&(o.properties=i.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,Wc(o,"no_nights_min",Se(le(e.departure_date),le(e.arrival_date)))):o.no_nights_min="1"),o}(e,{limit:n,skip:r,currency:b})),k=s(()=>JSON.parse(x),[x]),S=JSON.stringify(e),C=c(e);C.current=e;const E=c(null),T=c(null),N=c(null),R=()=>{const e=T.current;null!==e&&null!==N.current&&(T.current=null,E.current=e,gu({portal_code:g,locale:y,interaction_type:"search",interaction_info:ru(C.current,N.current)}))};if(i(()=>{if(E.current===S)return;const e=setTimeout(()=>{T.current=S,R()},1e3);return()=>{clearTimeout(e),T.current=null}},[S,g,y]),i(()=>{const e=new AbortController;return N.current=null,w({status:"loading"}),Hc({apiUrl:_,locale:y,portalCode:g,params:k,signal:e.signal}).then(t=>{e.signal.aborted||(w({status:"ready",response:t}),N.current=t.meta.total_count,R())}).catch(t=>{e.signal.aborted||w({status:"error",error:t instanceof Error?t:/* @__PURE__ */new Error("A search request failed")})}),()=>{e.abort()}},[_,y,g,k]),"loading"===v.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(p,{})});if("error"===v.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(Ms,{errors:v.error})});const{items:A,meta:$}=v.response,P=f??t.options.filtersForm.mode,I=/* @__PURE__ */d(ze,{totalCount:$.total_count,activePage:l,limit:n,onPageChange:a});/* @__PURE__ */
|
|
40
39
|
return h("div",{id:"results",className:P,children:[
|
|
41
|
-
/* @__PURE__ */h("div",{className:"bu-results-toolbar",children:[/* @__PURE__ */d(Ks,{}),m&&/* @__PURE__ */d(We,{mode:P,onChange:m})]}),
|
|
42
|
-
return h("div",{id:"search-page",className:"right"===i.filtersForm.location?"bu-reverse":"top"===i.filtersForm.location?"bu-column":"",children:[/* @__PURE__ */d(
|
|
43
|
-
return h(l,{children:[!o&&t&&/* @__PURE__ */d("button",{type:"button",className:"info-button",onClick:()=>s(!0),children:t}),/* @__PURE__ */h("dialog",{ref:a,className:"bukazu-modal",onCancel:p,onClick:e=>{e.target===a.current&&p()},children:[/* @__PURE__ */d("div",{className:"bukazu-modal-content",children:e}),/* @__PURE__ */d("div",{className:"bukazu-modal-footer",children:/* @__PURE__ */d("button",{type:"button",onClick:p,children:ne("close")})})]})]})}function
|
|
44
|
-
return d("option",{value:t,children:ne(e)})}var
|
|
45
|
-
return d(
|
|
46
|
-
/* @__PURE__ */d("div",{className:"legend",children:n}),o,t&&/* @__PURE__ */d(
|
|
47
|
-
return d(l,{children:e.allow_option&&/* @__PURE__ */d("div",{children:/* @__PURE__ */h(
|
|
40
|
+
/* @__PURE__ */h("div",{className:"bu-results-toolbar",children:[/* @__PURE__ */d(Ks,{}),m&&/* @__PURE__ */d(We,{mode:P,onChange:m})]}),I,0===A.length?/* @__PURE__ */d("div",{className:"bu-noresults",children:ne("no_results")}):null,A.map(e=>/* @__PURE__ */d("div",{style:{display:"contents"},dangerouslySetInnerHTML:{__html:Fe({result:e,options:t.options.filtersForm,currency:$.currency??b})}},e.id)),I]})}var ku=["countries","regions","cities","arrival_date","departure_date","persons_min","persons_max","bedrooms_min","bathrooms_min","weekprice_max","extra_search"];var Su="bukazuViewMode";function Cu(){try{const t=window.localStorage.getItem(Su);return"grid"===(e=t)||"list"===e?t:null}catch{return null}var e}var Eu=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??!0)&&"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))}(ku.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,viewMode:Cu()??this.props.options.filtersForm.mode??"grid"},this.onFilterChange=this.onFilterChange.bind(this),this.onViewModeChange=this.onViewModeChange.bind(this),this.pageChange=this.pageChange.bind(this)}componentDidMount(){if(gu({portal_code:this.props.PortalSite.portal_code,interaction_type:"search_view",locale:this.props.locale,interaction_info:{}}),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)}onViewModeChange(e){this.setState({viewMode:e}),function(e){try{window.localStorage.setItem(Su,e)}catch{}}(e)}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,viewMode:o}=this.state,{options:i,PortalSite:s}=this.props;/* @__PURE__ */
|
|
41
|
+
return h("div",{id:"search-page",className:"right"===i.filtersForm.location?"bu-reverse":"top"===i.filtersForm.location?"bu-column":"",children:[/* @__PURE__ */d(Me,{PortalSite:s,filters:e,onFilterChange:this.onFilterChange,options:i}),/* @__PURE__ */d(xu,{PortalSite:s,filters:e,activePage:t,onPageChange:this.pageChange,skip:r,limit:n,viewMode:o,onViewModeChange:this.onViewModeChange})]})}},Tu=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 Nu({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 zc.post(r,{json:n,headers:{locale:t}}).json()}catch(o){if(o instanceof Xs)throw await async function(e){const t=e.response.status;let n={};try{n=await e.response.json()}catch{return new Tu(t,[])}const r=n.error?[n.error]:[];return new Tu(t,r,n.errors)}(o);throw o}}var Ru=["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 Au(e){if("string"!=typeof e)return;const t=e.trim();return""===t?void 0:t}function $u(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 Pu({values:e,objectCode:t,portalCode:n,locale:r,sessionIdentifier:o}){const i={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:$u(e.costs)},s=function(e){const t={};for(const[n,r]of Object.entries(e??{})){const e=Au(r);void 0!==e&&(t[n]=e)}return Object.keys(t).length>0?t:void 0}(e.extra_fields);s&&(i.extra_fields=s),o&&(i.session_identifier=o);for(const a of Ru){const t=Au(e[a]);void 0!==t&&(i[a]=t)}return i}function Iu({children:e,buttonText:t,show:n=!1,onClose:r}){const[o,s]=u(n),a=c(null);i(()=>{const e=a.current;e&&(o?e.showModal():e.close())},[o]);const p=()=>{s(!1),r?.()};/* @__PURE__ */
|
|
42
|
+
return h(l,{children:[!o&&t&&/* @__PURE__ */d("button",{type:"button",className:"info-button",onClick:()=>s(!0),children:t}),/* @__PURE__ */h("dialog",{ref:a,className:"bukazu-modal",onCancel:p,onClick:e=>{e.target===a.current&&p()},children:[/* @__PURE__ */d("div",{className:"bukazu-modal-content",children:e}),/* @__PURE__ */d("div",{className:"bukazu-modal-footer",children:/* @__PURE__ */d("button",{type:"button",onClick:p,children:ne("close")})})]})]})}function Du(e){return Array.from({length:e+1},(e,t)=>t)}function ju(e){const t={};return e.forEach(e=>{t[e.id]=""}),t}function Lu(e){return e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".")}function Ou(e,t){const n=Lu(t);let r=e;for(const o of n){if(null===r||"object"!=typeof r||!(o in r))return;r=r[o]}return r}function Uu(e,t,n){const r=Lu(t),o={...e};let i=o,s=e;return r.forEach((e,t)=>{if(t===r.length-1)return void(i[e]=n);const o=null!==s&&"object"==typeof s?s[e]:void 0,a=null===o||"object"!=typeof o||Array.isArray(o)?{}:{...o};i[e]=a,i=a,s=o}),o}function Mu(e,t){let n=Number(t.babies)-Number(e.babies_extra);return n<0&&(n=0),Number(t.children)+Number(t.adults)+n}function qu(e,t){/* @__PURE__ */
|
|
43
|
+
return d("option",{value:t,children:ne(e)})}var Bu=n({values:{arrivalDate:{},departureDate:{},is_option:"false",costs:{},adults:0,children:0,babies:0,persons:0,discount:0,country:"",cancel_insurance:"0",discount_code:"",extra_fields:{}},errors:{},touched:{},isSubmitting:!1,setFieldValue:()=>{},setFieldTouched:()=>{}});function Fu(e){const{values:t,errors:n,touched:r,setFieldValue:i}=o(Bu),s=n[e],a=Ou(n,e),c="string"==typeof s?s:"string"==typeof a?a:void 0,u=r[e],l=Ou(r,e);return{error:c,touched:"boolean"==typeof u?u:"boolean"==typeof l&&l,value:Ou(t,e)??"",onBlur:()=>{},onChange:t=>{i(e,t.target.value)}}}var zu={selectedDate:null,arrivalDate:null,departureDate:null,bookingStarted:!1,persons:0},Hu=n(zu),Yu=n(Ju);function Wu({children:e}){const[t,n]=a(Ju,zu);/* @__PURE__ */
|
|
44
|
+
return d(Hu.Provider,{value:t,children:/* @__PURE__ */d(Yu.Provider,{value:n,children:e})})}function Ju(e,t){switch(t.type){case"clicked":{const{day:n,house:r}=t,{selectedDate:o,arrivalDate:i}=e,s=le(n.date),a=r.persons>2?2:r.persons;return n.departure&&o&&i&&xe(s,o)&&Se(s,o)<=r.max_nights&&Se(s,o)>=i.min_nights&&Se(s,o)<=i.max_nights?{...e,departureDate:n}:n.arrival?{bookingStarted:!1,selectedDate:s,arrivalDate:n,departureDate:null,persons:a}:e}case"reset":return zu;case"start":return{...e,bookingStarted:!0,persons:t.persons};case"return":return{...e,bookingStarted:!1};default:throw Error("Unknown action: "+t.type)}}var Vu=({error:e})=>e?/* @__PURE__ */d("div",{className:"input-feedback",children:e}):null,Ku=({name:e,value:t,currentValue:n,onChange:r,onBlur:o,id:i,label:s,...a})=>/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("input",{name:e,id:i,type:"radio",value:t,checked:t===n,onChange:r,onBlur:o,className:"radio-button",...a}),/* @__PURE__ */d("label",{htmlFor:i,children:s})]}),Gu=({error:e,touched:t,label:n,className:r,children:o})=>/* @__PURE__ */h("div",{className:r,children:[
|
|
45
|
+
/* @__PURE__ */d("div",{className:"legend",children:n}),o,t&&/* @__PURE__ */d(Vu,{error:e})]});function Xu({house:e}){const t=Fu("is_option");/* @__PURE__ */
|
|
46
|
+
return d(l,{children:e.allow_option&&/* @__PURE__ */d("div",{children:/* @__PURE__ */h(Gu,{id:"is_option",className:"booking_option",children:[/* @__PURE__ */d(Ku,{name:"is_option",value:"true",currentValue:String(t.value),onChange:t.onChange,onBlur:t.onBlur,id:"true",disabled:!e.allow_option,label:ne("option")}),/* @__PURE__ */d(Ku,{name:"is_option",value:"false",currentValue:String(t.value),onChange:t.onChange,onBlur:t.onBlur,id:"false",label:ne("booking")})]})})})}var Qu=({height:e="16px",width:t="16px"})=>/* @__PURE__ */h("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",style:{height:e,width:t},children:[
|
|
48
47
|
/* @__PURE__ */d("path",{d:"M50,5c24.813,0,45,20.187,45,45c0,24.813-20.187,45-45,45C25.187,95,5,74.813,5,50C5,25.187,25.187,5,50,5 M50,0C22.386,0,0,22.386,0,50c0,27.614,22.386,50,50,50c27.614,0,50-22.386,50-50C100,22.386,77.614,0,50,0L50,0z"}),
|
|
49
48
|
/* @__PURE__ */d("circle",{cx:"50",cy:"29.546",r:"4.934"}),
|
|
50
|
-
/* @__PURE__ */d("rect",{x:"46.5",y:"41.21",width:"7",height:"34.179"})]});function
|
|
51
|
-
return h("tr",{children:[/* @__PURE__ */h("td",{children:[o?ne(e):e,n&&/* @__PURE__ */d(l,{children:/* @__PURE__ */d(
|
|
52
|
-
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */h("tbody",{children:[t&&/* @__PURE__ */d(l,{children:Object.keys(t).map(e=>{const n=t[e];if(n>0)/* @__PURE__ */return d(
|
|
53
|
-
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */h("tbody",{children:[/* @__PURE__ */d(
|
|
54
|
-
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */d("tbody",{children:e.optional_house_costs.map(t=>{if(!t.on_site&&"0120"!==t.gl){if("none"===t.method)/* @__PURE__ */return d(
|
|
55
|
-
return d(l,{children:e.optional_house_costs.map(t=>{if(t.on_site&&"0120"!==t.gl){if("none"===t.method)/* @__PURE__ */return d(
|
|
56
|
-
return h("div",{className:"costs-section",children:[/* @__PURE__ */d("strong",{children:ne("costs_on_site")}),/* @__PURE__ */d("table",{children:/* @__PURE__ */h("tbody",{children:[e.required_house_costs.map(t=>{if(t.on_site&&"0120"!==t.gl){if("none"===t.method)/* @__PURE__ */return d(
|
|
57
|
-
return d(
|
|
58
|
-
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */d("tbody",{children:e})})})}function
|
|
49
|
+
/* @__PURE__ */d("rect",{x:"46.5",y:"41.21",width:"7",height:"34.179"})]});function Zu({description:e}){let t=/* @__PURE__ */d("span",{});return e&&(t=/* @__PURE__ */d("span",{style:{padding:"0 0 0 8px"},children:/* @__PURE__ */d(Iu,{buttonText:/* @__PURE__ */d(Qu,{}),children:/* @__PURE__ */d("p",{children:e})})})),t}function el({name:e,amount:t,description:n,method_name:r,formatName:o,forceMethod:i,currency:s="EUR"}){/* @__PURE__ */
|
|
50
|
+
return h("tr",{children:[/* @__PURE__ */h("td",{children:[o?ne(e):e,n&&/* @__PURE__ */d(l,{children:/* @__PURE__ */d(Zu,{description:n})})]}),/* @__PURE__ */d("td",{className:"price",children:t&&t>0?/* @__PURE__ */h(l,{children:[re(t,{style:"currency",currency:s}),i&&/* @__PURE__ */h(l,{children:[" ",r]})]}):/* @__PURE__ */d(l,{children:r})})]})}function tl({prices:e}){const{insurances:t,required_costs:n}=e.total_costs,{not_on_site:r}=n,{currency:o}=e;/* @__PURE__ */
|
|
51
|
+
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */h("tbody",{children:[t&&/* @__PURE__ */d(l,{children:Object.keys(t).map(e=>{const n=t[e];if(n>0)/* @__PURE__ */return d(el,{name:e,formatName:!0,amount:n,currency:o},e)})}),e.required_house_costs.map(e=>{if(!e.on_site&&"0120"!==e.gl)return"none"===e.method?/* @__PURE__ */d(el,{...e,currency:o},e.id):0===e.amount?null:/* @__PURE__ */d(el,{...e,amount:r?.find(t=>t.id==e.id)?.amount??0,currency:o},e.id)})]})})})}el.defaultValues={formatName:!1,forceMethod:!1};var nl=class extends Error{constructor(e,t){super(`No prices available for ${e} - ${t}`),this.name="PriceUnavailableError"}};async function rl(e){const t=function({apiUrl:e,portalCode:t,objectCode:n,startsAt:r,endsAt:o,persons:i,currency:s,cancelInsurance:a,discount:c,discountCode:u,costs:l,includeAccommodation:d}){const h=new URL("/portal_api/v1/accommodations/price",new URL(e).origin),p=new URLSearchParams({portal_code:t,object_code:n,starts_at:r,ends_at:o});if(void 0!==i&&p.set("persons",String(i)),s&&p.set("currency",s),void 0!==a&&p.set("cancel_insurance",String(a)),void 0!==c&&p.set("discount",String(c)),u&&p.set("discount_code",u),l)for(const[f,m]of Object.entries(l))p.set(`costs[${f}]`,String(m));return d&&p.set("include_accommodation","true"),h.search=p.toString(),h.toString()}(e);let n;try{n=await zc.get(t,{headers:{locale:e.locale}}).json()}catch(r){if(r instanceof Xs){if(422===r.response.status)throw new nl(e.startsAt,e.endsAt);throw new Error(`Price request failed (${r.response.status})`)}throw r}if(!n.currency)throw new nl(e.startsAt,e.endsAt);return n}function ol({prices:e}){const{rent_price:t,discount:n,discounted_price:r,currency:o}=e;/* @__PURE__ */
|
|
52
|
+
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */h("tbody",{children:[/* @__PURE__ */d(el,{name:"rent_price",formatName:!0,amount:t,currency:o}),n>0?/* @__PURE__ */h(l,{children:[/* @__PURE__ */d(el,{name:"discount",formatName:!0,amount:n,currency:o}),/* @__PURE__ */d(el,{name:"price_after_discount",formatName:!0,amount:r,currency:o})]}):null]})})})}function il({prices:e}){const{optional_costs:t}=e.total_costs,{not_on_site:n}=t;/* @__PURE__ */
|
|
53
|
+
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */d("tbody",{children:e.optional_house_costs.map(t=>{if(!t.on_site&&"0120"!==t.gl){if("none"===t.method)/* @__PURE__ */return d(el,{...t,currency:e.currency},t.id);if("on_site"===t.method){if((n.find(e=>e.id==t.id)?.nr_of_items??0)>0)/* @__PURE__ */return d(el,{...t,amount:t.amount,forceMethod:!0,currency:e.currency},t.id)}else{let r=n.find(e=>e.id==t.id)?.amount??0;if(r>0)/* @__PURE__ */return d(el,{...t,amount:r,currency:e.currency},t.id)}}})})})})}function sl({prices:e}){const{optional_costs:t}=e.total_costs,{on_site:n}=t;/* @__PURE__ */
|
|
54
|
+
return d(l,{children:e.optional_house_costs.map(t=>{if(t.on_site&&"0120"!==t.gl){if("none"===t.method)/* @__PURE__ */return d(el,{...t,currency:e.currency},t.id);if("on_site"===t.method){if((n?.find(e=>e.id==t.id)?.nr_of_items??0)>0)/* @__PURE__ */return d(el,{...t,amount:t.amount,forceMethod:!0,currency:e.currency},t.id)}else{let r=n?.find(e=>e.id==t.id)?.amount??0;if(r>0)/* @__PURE__ */return d(el,{...t,amount:r,currency:e.currency},t.id)}}})})}function al({prices:e}){const{required_costs:t}=e.total_costs,{on_site:n}=t;/* @__PURE__ */
|
|
55
|
+
return h("div",{className:"costs-section",children:[/* @__PURE__ */d("strong",{children:ne("costs_on_site")}),/* @__PURE__ */d("table",{children:/* @__PURE__ */h("tbody",{children:[e.required_house_costs.map(t=>{if(t.on_site&&"0120"!==t.gl){if("none"===t.method)/* @__PURE__ */return d(el,{...t,currency:e.currency},t.id);{let r=n.find(e=>e.id==t.id)?.amount??0;/* @__PURE__ */
|
|
56
|
+
return d(el,{...t,amount:r,currency:e.currency},t.id)}}}),/* @__PURE__ */d(sl,{prices:e})]})})]})}function cl({children:e}){/* @__PURE__ */
|
|
57
|
+
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */d("tbody",{children:e})})})}function ul({prices:e}){const{currency:t}=e;/* @__PURE__ */
|
|
59
58
|
return h(l,{children:[
|
|
60
|
-
/* @__PURE__ */d(
|
|
61
|
-
/* @__PURE__ */h(
|
|
62
|
-
/* @__PURE__ */d(
|
|
63
|
-
/* @__PURE__ */d(
|
|
64
|
-
/* @__PURE__ */d(
|
|
65
|
-
/* @__PURE__ */d(
|
|
66
|
-
/* @__PURE__ */d(
|
|
67
|
-
return d(l,{children:e.map(e=>{let r=t.find(t=>t.id==e.id);if("0120"===e.gl&&r&&r.amount>0)/* @__PURE__ */return d(
|
|
68
|
-
/* @__PURE__ */d(
|
|
69
|
-
/* @__PURE__ */d(
|
|
70
|
-
/* @__PURE__ */d(
|
|
71
|
-
/* @__PURE__ */d(
|
|
72
|
-
/* @__PURE__ */d(
|
|
59
|
+
/* @__PURE__ */d(cl,{children:/* @__PURE__ */h("tr",{children:[/* @__PURE__ */d("th",{style:{textAlign:"left",textTransform:"capitalize"},children:ne("total")}),/* @__PURE__ */d("th",{className:"price",style:{fontSize:18},children:re(e.total_costs.sub_total,{style:"currency",currency:t})})]})}),
|
|
60
|
+
/* @__PURE__ */h(cl,{children:[
|
|
61
|
+
/* @__PURE__ */d(ll,{cost_array:e.required_house_costs,price_array:e.total_costs.required_costs.on_site,currency:t}),
|
|
62
|
+
/* @__PURE__ */d(ll,{cost_array:e.required_house_costs,price_array:e.total_costs.required_costs.not_on_site,currency:t}),
|
|
63
|
+
/* @__PURE__ */d(ll,{cost_array:e.optional_house_costs,price_array:e.total_costs.optional_costs.on_site,currency:t}),
|
|
64
|
+
/* @__PURE__ */d(ll,{cost_array:e.optional_house_costs,price_array:e.total_costs.optional_costs.not_on_site,currency:t})]}),
|
|
65
|
+
/* @__PURE__ */d(cl,{children:/* @__PURE__ */h("tr",{children:[/* @__PURE__ */d("th",{style:{textAlign:"left",textTransform:"capitalize"},children:ne("total")}),/* @__PURE__ */d("td",{className:"price",children:re(e.total_costs.total_price,{style:"currency",currency:t})})]})})]})}function ll({cost_array:e,price_array:t,currency:n}){/* @__PURE__ */
|
|
66
|
+
return d(l,{children:e.map(e=>{let r=t.find(t=>t.id==e.id);if("0120"===e.gl&&r&&r.amount>0)/* @__PURE__ */return d(el,{...e,amount:r.amount,currency:n},e.id)})})}function dl({values:e,house:t}){let n=Number(e.babies)-Number(t.babies_extra);n<0&&(n=0);const r=Number(e.children)+Number(e.adults)+n,{portalCode:s,objectCode:a,locale:c,apiUrl:p}=o(zs),{currency:f}=Vs(),[m,g]=u(null),[_,y]=u(!0),[b,v]=u(null);return i(()=>{let t=!1;return y(!0),v(null),rl({apiUrl:p,locale:c,portalCode:s,objectCode:a,startsAt:e.arrivalDate.date,endsAt:e.departureDate.date,persons:r,currency:f,costs:e.costs,discount:Number(e.discount),discountCode:e.discount_code,cancelInsurance:Number(e.cancel_insurance)}).then(e=>{t||(g(e),y(!1))}).catch(e=>{t||(v(e),y(!1))}),()=>{t=!0}},[p,c,s,a,e.arrivalDate.date,e.departureDate.date,r,f,e.costs,e.discount,e.discount_code,e.cancel_insurance]),_?/* @__PURE__ */d("span",{children:"Loading..."}):b||!m?/* @__PURE__ */d("div",{children:String(b)}):/* @__PURE__ */h(l,{children:[
|
|
67
|
+
/* @__PURE__ */d(ol,{prices:m}),
|
|
68
|
+
/* @__PURE__ */d(tl,{prices:m}),
|
|
69
|
+
/* @__PURE__ */d(il,{prices:m}),
|
|
70
|
+
/* @__PURE__ */d(al,{prices:m}),
|
|
71
|
+
/* @__PURE__ */d(ul,{prices:m})]})}var hl=class{constructor(e,t){this.house=e,this.values=t,this.t={formatMessage:(e,t)=>ne(e.id,t)}}updateValues(e){this.values=e}render(){const{arrivalDate:e,departureDate:t}=this.values,n=document.createDocumentFragment(),r=document.createElement("h2");r.textContent=this.t.formatMessage({id:"booking_details"}),n.appendChild(r);const o=document.createElement("div");o.className="house-details";const i=document.createElement("div");if(i.textContent=this.house.name,o.appendChild(i),this.house.image_url){const e=document.createElement("img");e.src=this.house.image_url,e.alt="",o.appendChild(e)}const s=document.createElement("table"),a=document.createElement("tbody"),c=document.createElement("tr"),u=document.createElement("th");u.textContent=this.t.formatMessage({id:`${this.house.house_type}.arrival`});const l=document.createElement("td");l.className="price",l.textContent=ue(le(e.date),Ee);const d=document.createElement("td");d.textContent=`${e.arrival_time_from} - ${e.arrival_time_to}`,c.append(u,l,d);const h=document.createElement("tr"),p=document.createElement("th");p.textContent=this.t.formatMessage({id:`${this.house.house_type}.departure`});const f=document.createElement("td");f.className="price",f.textContent=ue(le(t.date),Ee);const m=document.createElement("td");m.textContent=t.departure_time??"",h.append(p,f,m),a.append(c,h),s.appendChild(a),o.appendChild(s),n.appendChild(o);const g=document.createElement("div");return g.appendChild(n),g}};function pl({values:e,house:t}){const n=c(null),r=c(null);return n.current||(n.current=new hl(t,e)),i(()=>{if(n.current&&(n.current.updateValues(e),r.current)){for(;r.current.firstChild;)r.current.removeChild(r.current.firstChild);r.current.appendChild(n.current.render())}},[e,t]),/* @__PURE__ */h("div",{children:[
|
|
73
72
|
/* @__PURE__ */d("div",{ref:r}),
|
|
74
|
-
/* @__PURE__ */d(
|
|
75
|
-
/* @__PURE__ */d(
|
|
73
|
+
/* @__PURE__ */d(Xu,{house:t}),
|
|
74
|
+
/* @__PURE__ */d(dl,{values:e,house:t})]})}function fl({label:e,description:t,count:n=0,name:r}){const o=Du(n),i=Fu(r);/* @__PURE__ */
|
|
76
75
|
return h("div",{className:"form-row inline",id:`bukazu_form_${r}`,children:[
|
|
77
76
|
/* @__PURE__ */d("label",{htmlFor:r,children:ne(e)}),
|
|
78
|
-
/* @__PURE__ */d("select",{id:r,name:r,value:String(i.value),onChange:i.onChange,onBlur:i.onBlur,children:o.map(e=>/* @__PURE__ */d("option",{value:e,children:e},e))}),t,i.touched&&i.error&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:i.error})]})}function
|
|
77
|
+
/* @__PURE__ */d("select",{id:r,name:r,value:String(i.value),onChange:i.onChange,onBlur:i.onBlur,children:o.map(e=>/* @__PURE__ */d("option",{value:e,children:e},e))}),t,i.touched&&i.error&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:i.error})]})}function ml({label:e,description:t,name:n,inline:r,required:o=!1}){const i=Fu(n),s="string"==typeof i.value&&""!==i.value?i.value:"";/* @__PURE__ */
|
|
79
78
|
return h("div",{className:`form-row ${r&&"inline"}`,id:`bukazu_form_${n}`,children:[
|
|
80
79
|
/* @__PURE__ */d("label",{htmlFor:n,children:ne(e)}),
|
|
81
80
|
/* @__PURE__ */d("input",{type:"date",className:"bukazu-date-picker",id:n,name:n,required:o,value:s,onChange:i.onChange,onBlur:i.onBlur}),
|
|
82
|
-
/* @__PURE__ */d("span",{className:"bu-input-description",children:t}),i.touched&&i.error&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:i.error})]})}
|
|
81
|
+
/* @__PURE__ */d("span",{className:"bu-input-description",children:t}),i.touched&&i.error&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:i.error})]})}ml.defaultValues={inline:!0};var gl=()=>{const{locale:e}=o(zs);/* @__PURE__ */
|
|
83
82
|
return h(l,{children:[
|
|
84
83
|
/* @__PURE__ */d("h2",{children:ne("cancel_insurance_normal_long")}),
|
|
85
84
|
/* @__PURE__ */d("p",{children:ne("cancel_insurance_normal_desc")}),
|
|
@@ -93,87 +92,87 @@ return h(l,{children:[
|
|
|
93
92
|
/* @__PURE__ */h("p",{children:[ne("cancel_insurance_questions_explain_1"),
|
|
94
93
|
/* @__PURE__ */d("a",{href:{nl:"https://recreatieverzekeringen.nl/veelgestelde-vragen",de:"https://recreatieverzekeringen.nl/de/haufig-gestellte-fragen",en:"https://recreatieverzekeringen.nl/en/frequently-asked-questions",fr:"https://recreatieverzekeringen.nl/en/frequently-asked-questions",es:"https://recreatieverzekeringen.nl/en/frequently-asked-questions",it:"https://recreatieverzekeringen.nl/en/frequently-asked-questions"}[e],target:"_blank",children:ne("cancel_insurance_questions_explain_link")}),ne("cancel_insurance_questions_explain_2")]}),
|
|
95
94
|
/* @__PURE__ */d("h3",{children:ne("terms")}),
|
|
96
|
-
/* @__PURE__ */d("a",{href:`https://api.bukazu.com/files/${e}/insurance.pdf`,target:"_blank",rel:"noopener noreferrer",children:ne("show_terms")})]})};function
|
|
95
|
+
/* @__PURE__ */d("a",{href:`https://api.bukazu.com/files/${e}/insurance.pdf`,target:"_blank",rel:"noopener noreferrer",children:ne("show_terms")})]})};function _l({house:e}){const t=Fu("cancel_insurance");return e.cancel_insurance?/* @__PURE__ */h("div",{className:"form-row inline",children:[
|
|
97
96
|
/* @__PURE__ */d("label",{htmlFor:"cancel_insurance",children:ne("cancel_insurance")}),
|
|
98
|
-
/* @__PURE__ */h("select",{id:"cancel_insurance",name:"cancel_insurance",value:String(t.value),onChange:t.onChange,onBlur:t.onBlur,required:!0,children:[
|
|
99
|
-
/* @__PURE__ */d(
|
|
97
|
+
/* @__PURE__ */h("select",{id:"cancel_insurance",name:"cancel_insurance",value:String(t.value),onChange:t.onChange,onBlur:t.onBlur,required:!0,children:[qu("choose",""),qu("cancel_insurance_normal","1"),qu("none","0")]}),
|
|
98
|
+
/* @__PURE__ */d(Iu,{buttonText:/* @__PURE__ */d(Qu,{}),children:/* @__PURE__ */d(gl,{})})]}):null}var yl=({house:e,values:t})=>e.cancel_insurance?/* @__PURE__ */h("div",{className:"form-section bup-16",id:"insurances",children:[
|
|
100
99
|
/* @__PURE__ */d("h2",{children:ne("insurances")}),
|
|
101
|
-
/* @__PURE__ */d(
|
|
100
|
+
/* @__PURE__ */d(_l,{house:e}),t.cancel_insurance&&"0"!==t.cancel_insurance&&/* @__PURE__ */d(ml,{label:"extra_fields.date_of_birth",name:"extra_fields.date_of_birth",required:!0,inline:!1,description:ne("insurance_company_needs_date_of_birth")})]}):/* @__PURE__ */d("div",{}),bl=class extends Error{constructor(e){super(`Discount code request failed (${e})`),this.name="DiscountCodeError",this.status=e,this.notFound=404===e}};async function vl(e){const t=function({apiUrl:e,portalCode:t,objectCode:n,code:r,currency:o}){const i=new URL("/portal_api/v1/accommodations/discount-code",new URL(e).origin),s=new URLSearchParams({portal_code:t,object_code:n,code:r});return o&&s.set("currency",o),i.search=s.toString(),i.toString()}(e);try{return await zc.get(t,{headers:{locale:e.locale}}).json()}catch(n){if(n instanceof Xs)throw new bl(n.response.status);throw n}}function wl({house:e}){const{apiUrl:t,locale:n,portalCode:r}=o(zs),{currency:i}=Vs(),s=Fu("discount_code"),[a,l]=u(null),[p,f]=u(!1),[m,g]=u(!1),[_,y]=u(!1),b=c(0);/* @__PURE__ */
|
|
102
101
|
return h("div",{className:"form-row inline",children:[
|
|
103
102
|
/* @__PURE__ */d("label",{htmlFor:"discount_code",children:ne("discount_code")}),
|
|
104
|
-
/* @__PURE__ */d("input",{id:"discount_code",name:"discount_code",value:String(s.value),onBlur:o=>{s.onBlur(),(o=>{const s=++
|
|
103
|
+
/* @__PURE__ */d("input",{id:"discount_code",name:"discount_code",value:String(s.value),onBlur:o=>{s.onBlur(),(o=>{const s=++b.current;if(""===o)return l(null),g(!1),y(!1),void f(!1);f(!0),vl({apiUrl:t,locale:n,portalCode:r,objectCode:e.code,code:o,currency:i}).then(e=>{s===b.current&&(l(e),g(!1),y(!1),f(!1))}).catch(e=>{if(s!==b.current)return;const t=e instanceof bl&&e.notFound;l(null),g(t),y(!t),f(!1)})})(o.target.value.trim())},onChange:s.onChange}),p&&/* @__PURE__ */d("div",{className:"bu_discount_code",children:"Loading..."}),!p&&m&&/* @__PURE__ */d("div",{className:"bu_discount_code",children:ne("no_discount_code_found")}),!p&&_&&/* @__PURE__ */d("div",{className:"bu_discount_code",children:ne("something_went_wrong_please_try_again")}),!p&&a&&/* @__PURE__ */h("div",{className:"bu_discount_code",children:[/* @__PURE__ */d("div",{children:a.name}),a.use_price?null!=a.price&&/* @__PURE__ */d("div",{children:re(a.price,{style:"currency",currency:a.currency})}):null!=a.percentage&&/* @__PURE__ */h("div",{children:[a.percentage,"%"]})]})]})}var xl=({errors:e,house:t,bookingFormConfiguration:n,values:r})=>{const o=Fu("discount"),i=Fu("discount_reason");if(t.discounts&&"0"!==t.discounts||n.show_discount_code){const r=t.discounts?t.discounts.split(","):[];/* @__PURE__ */
|
|
105
104
|
return h("div",{className:"form-section bup-16",children:[t.discounts&&"0"!==t.discounts&&/* @__PURE__ */h(l,{children:[
|
|
106
105
|
/* @__PURE__ */h("div",{className:"form-row inline",children:[/* @__PURE__ */d("label",{htmlFor:"discount",children:ne("discount")}),/* @__PURE__ */d("select",{id:"discount",name:"discount",value:String(o.value),onChange:o.onChange,onBlur:o.onBlur,children:r.map(e=>/* @__PURE__ */h("option",{value:e,children:[e,"%"]},e))})]}),
|
|
107
106
|
/* @__PURE__ */h("div",{className:"form-row inline",children:[
|
|
108
107
|
/* @__PURE__ */d("label",{htmlFor:"discount_reason",children:ne("discount_reason")}),
|
|
109
108
|
/* @__PURE__ */d("input",{id:"discount_reason",name:"discount_reason",value:String(i.value),onChange:i.onChange,onBlur:i.onBlur}),e.discount_reason&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:e.discount_reason})]}),
|
|
110
|
-
/* @__PURE__ */d("div",{children:/* @__PURE__ */d("i",{style:{fontSize:14},children:t.discounts_info})})]}),n.show_discount_code&&/* @__PURE__ */d(
|
|
109
|
+
/* @__PURE__ */d("div",{children:/* @__PURE__ */d("i",{style:{fontSize:14},children:t.discounts_info})})]}),n.show_discount_code&&/* @__PURE__ */d(wl,{house:t})]})}return null},kl=()=>/* @__PURE__ */h("div",{className:"success-message",children:[
|
|
111
110
|
/* @__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 125",style:{fill:"green",height:"150px"},xmlSpace:"preserve",children:/* @__PURE__ */d("path",{d:"M50,5C25.2,5,5,25.1,5,50c0,24.8,20.2,45,45,45s45-20.2,45-45C95,25.1,74.8,5,50,5z M72.7,38.2L44.2,66.7 c-0.4,0.4-0.9,0.6-1.4,0.6s-1-0.2-1.4-0.6l-14-14c-0.8-0.8-0.8-2,0-2.8c0.8-0.8,2-0.8,2.8,0l12.6,12.6l27.1-27.1 c0.8-0.8,2-0.8,2.8,0C73.5,36.1,73.5,37.4,72.7,38.2z"})}),
|
|
112
111
|
/* @__PURE__ */d("h3",{children:ne("thank_you_for_your_request")}),
|
|
113
|
-
/* @__PURE__ */d("p",{children:ne("we_sent_confirmation_check_email")})]}),
|
|
114
|
-
return h("select",{name:"country",id:"country",disabled:t,required:n,value:String(r.value),onChange:r.onChange,onBlur:r.onBlur,children:[/* @__PURE__ */d("option",{value:"",children:"—"}),e.map(e=>/* @__PURE__ */d("option",{value:e.alpha2,children:e.name},e.alpha2))]})}function
|
|
112
|
+
/* @__PURE__ */d("p",{children:ne("we_sent_confirmation_check_email")})]}),Sl=/* @__PURE__ */new Map,Cl={en:async()=>(await(import("./en-Bv1I_37O.js"))).default,nl:async()=>(await(import("./nl-B6ga4Zc8.js"))).default,de:async()=>(await(import("./de-AbyP7SiX.js"))).default,fr:async()=>(await(import("./fr-DQXnO3jP.js"))).default,es:async()=>(await(import("./es-EcksbtWo.js"))).default,it:async()=>(await(import("./it-z_lt2h0g.js"))).default};async function El(e){const t=R(e);if(Sl.has(t))return Sl.get(t);const n=await async function(e){return X(await Cl[e](),`Failed to load country data for locale "${e}"`)}(t);return Sl.set(t,n),n}var Tl=[{id:"first_name",label:"Voornaam",type:"text",options:["text"],required:!0,placeholder:""},{id:"last_name",label:"Achternaam",type:"text",options:["text"],required:!0,mandatory:!0,placeholder:""},{id:"address",label:"Adres",type:"text",options:["text"],required:!0,placeholder:""},{id:"house_number",label:"Huisnummer",type:"text",options:["text"],required:!0,placeholder:""},{id:"zipcode",label:"Postcode",type:"text",options:["text"],required:!0,placeholder:""},{id:"city",label:"Plaats",type:"text",options:["text"],required:!0,placeholder:""},{id:"country",label:"Land",type:"select",options:["select"],required:!0,mandatory:!0,placeholder:""},{id:"email",label:"E-mail",type:"email",options:["email"],required:!0,mandatory:!0,placeholder:""},{id:"phone",label:"Telefoonnummer",type:"text",options:["text"],required:!0,placeholder:""}];function Nl({name:e,type:t="text",required:n=!1,onKeyPress:r}){const o=Fu(e);return"textarea"===t?/* @__PURE__ */d("textarea",{id:e,name:e,value:String(o.value),required:n,onChange:o.onChange,onBlur:o.onBlur,onKeyPress:r}):/* @__PURE__ */d("input",{id:e,type:t,name:e,value:String(o.value),required:n,onChange:o.onChange,onBlur:o.onBlur,onKeyPress:r})}function Rl({bookingField:e,required:t=!1}){const n=Fu(`extra_fields.booking_field_${e.id}`);return"textarea"===e.field_type?/* @__PURE__ */d("textarea",{id:`extra_fields.booking_field_${e.id}`,name:`extra_fields.booking_field_${e.id}`,value:String(n.value),required:t,onChange:n.onChange,onBlur:n.onBlur,onKeyPress:e=>{13===e.which&&e.preventDefault()}}):/* @__PURE__ */d("input",{id:`extra_fields.booking_field_${e.id}`,type:"text"===e.field_type?"text":e.field_type,name:`extra_fields.booking_field_${e.id}`,value:String(n.value),required:t,onChange:n.onChange,onBlur:n.onBlur,onKeyPress:e=>{13===e.which&&e.preventDefault()}})}function Al({countries:e,disabled:t,required:n=!1}){const r=Fu("country");/* @__PURE__ */
|
|
113
|
+
return h("select",{name:"country",id:"country",disabled:t,required:n,value:String(r.value),onChange:r.onChange,onBlur:r.onBlur,children:[/* @__PURE__ */d("option",{value:"",children:"—"}),e.map(e=>/* @__PURE__ */d("option",{value:e.alpha2,children:e.name},e.alpha2))]})}function $l({bookingFields:e,errors:t,touched:n,PortalSite:r,values:o}){const[a,c]=u([]),[l,p]=u(!0);i(()=>{let e=!0;const t="undefined"!=typeof window&&window.__localeId__||"en";return(async()=>{try{const n=await El(t);e&&c(n)}catch{}finally{e&&p(!1)}})(),()=>{e=!1}},[]);const f=s(()=>{const t=[...e];return"1"!==o.cancel_insurance&&"2"!==o.cancel_insurance||["address","house_number","zipcode","city"].forEach(n=>{const r=Tl.find(e=>e.id===n);if(!r)return;const o=e.findIndex(e=>e.id===n);-1!==o?t[o]=r:t.push(r)}),t},[e,o.cancel_insurance]);/* @__PURE__ */
|
|
115
114
|
return h("div",{className:"form-section bup-16",children:[/* @__PURE__ */d("h2",{children:ne("personal_details")}),f.map(e=>function({input:e,PortalSite:t,countries:n,countriesLoading:r,errors:o,touched:i}){const s="telephone"===e.id?"phonenumber":e.id;if("booking_field"===e.type||Be(s)){const n=t.booking_fields?.find(e=>e.id===s);return n?/* @__PURE__ */h("div",{className:"form-row",children:[
|
|
116
115
|
/* @__PURE__ */h("label",{htmlFor:`extra_fields.booking_field_${n.id}`,children:[n.label," ",e.required&&/* @__PURE__ */d("span",{children:"*"})]}),
|
|
117
|
-
/* @__PURE__ */d(
|
|
116
|
+
/* @__PURE__ */d(Rl,{bookingField:n,required:e.required}),o[e.id]&&(i.extra_fields&&i.extra_fields[`booking_field_${n.id}`]||i[e.id])&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:o[e.id]})]},n.id):null}return"country"===s?/* @__PURE__ */h("div",{className:"form-row",children:[
|
|
118
117
|
/* @__PURE__ */h("label",{htmlFor:s,children:[t[`${s}_label`]," ",e.required&&/* @__PURE__ */d("span",{children:"*"})]}),
|
|
119
|
-
/* @__PURE__ */d(
|
|
118
|
+
/* @__PURE__ */d(Al,{countries:n,disabled:r,required:e.required}),o[s]&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:o[s]})]},s):"date"===e.type?/* @__PURE__ */d("div",{className:"form-row",children:/* @__PURE__ */d(ml,{name:s,label:s,inline:!1,required:e.required})},s):/* @__PURE__ */h("div",{className:"form-row",children:[
|
|
120
119
|
/* @__PURE__ */h("label",{htmlFor:s,children:[t[`${s.replace(/\./g,"_")}_label`]," ",e.required&&/* @__PURE__ */d("span",{children:"*"})]}),
|
|
121
|
-
/* @__PURE__ */d(
|
|
120
|
+
/* @__PURE__ */d(Nl,{type:e.type,name:s,required:e.required,onKeyPress:e=>{13===e.which&&e.preventDefault()}}),o[s]&&i[s]&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:o[s]})]},s)}({input:e,PortalSite:r,countries:a,countriesLoading:l,errors:t,touched:n}))]})}function Pl({cost:e}){const t=Fu(`costs[${e.id}]`);return 1===e.max_available?/* @__PURE__ */h("select",{id:e.id,name:`costs[${e.id}]`,value:String(t.value),onChange:t.onChange,onBlur:t.onBlur,children:[/* @__PURE__ */d("option",{value:0,children:ne("no")}),/* @__PURE__ */d("option",{value:1,children:ne("yes")})]}):/* @__PURE__ */d("select",{id:e.id,name:`costs[${e.id}]`,value:String(t.value),onChange:t.onChange,onBlur:t.onBlur,children:Du(e.max_available).map(e=>/* @__PURE__ */d("option",{value:e,children:e},e))})}function Il({costs:e,currency:t}){return 0===e.length?null:/* @__PURE__ */h("div",{className:"form-section bup-16 optional_house_costs",children:[/* @__PURE__ */d("h2",{children:ne("extra_costs_bookable")}),/* @__PURE__ */d("div",{children:e.map(e=>!["none","total"].includes(e.method)&&e.max_available>0?/* @__PURE__ */h("div",{className:"form-row inline",children:[
|
|
122
121
|
/* @__PURE__ */d("label",{htmlFor:e.id,children:e.name}),
|
|
123
|
-
/* @__PURE__ */d(
|
|
122
|
+
/* @__PURE__ */d(Pl,{cost:e}),
|
|
124
123
|
/* @__PURE__ */h("div",{className:"price_per",children:[re(e.amount,{style:"currency",currency:t??"EUR"})," ",e.method_name]}),
|
|
125
|
-
/* @__PURE__ */d("div",{children:e.description?/* @__PURE__ */d("div",{children:/* @__PURE__ */d(
|
|
124
|
+
/* @__PURE__ */d("div",{children:e.description?/* @__PURE__ */d("div",{children:/* @__PURE__ */d(Iu,{buttonText:/* @__PURE__ */d(Qu,{}),children:/* @__PURE__ */d("p",{children:e.description})})}):null})]},e.id):"")})]})}function Dl({bookingFormConfiguration:e,house:t}){/* @__PURE__ */
|
|
126
125
|
return h(l,{children:[
|
|
127
|
-
/* @__PURE__ */d(
|
|
128
|
-
return d(
|
|
126
|
+
/* @__PURE__ */d(fl,{name:"adults",label:"adults",count:t.persons,description:/* @__PURE__ */d("div",{className:"age-description",children:ne("adults_from",{age:e.adults_from_age})})}),e.children_allowed?/* @__PURE__ */d(fl,{name:"children",label:"children",count:t.persons-1,description:/* @__PURE__ */d("div",{className:"age-description",children:ne("children_from",{from:e.children_from_age,til:e.children_till_age})})}):null,e.babies_allowed?/* @__PURE__ */d(fl,{name:"babies",label:"babies",count:t.persons-1,description:/* @__PURE__ */d("div",{className:"age-description",children:ne("babies_from",{babies:e.babies_till_age})})}):null]})}function jl(e,t,n){const{persons:r}=t,o={},i=Mu(t,e);for(const a of n){if(!a.required)continue;if(Be(a.id)){const t=Ou(e,`extra_fields.booking_field_${a.id}`);t&&""!==t||(o[a.id]=ne("required"));continue}const t=Ou(e,a.id);t&&""!==t||(o[a.id]=ne("required"))}e.adults<1&&r>0&&(o.adults=ne("at_least_1_adult")),Number(e.discount)>0&&!e.discount_reason&&(o.discount_reason=ne("you_need_to_give_reason")),i>r&&(o.max_persons=ne("max_persons_reached"));const s=e.extra_fields?.date_of_birth;return"0"!==e.cancel_insurance&&s&&xe(new Date(s),me(/* @__PURE__ */new Date,18))&&(o["extra_fields.date_of_birth"]=ne("at_least_18y_old"),o.insurances=ne("at_least_18y_old")),o}function Ll({house:e,PortalSite:t}){const{persons:n,arrivalDate:i,departureDate:a}=o(Hu),{locale:c,portalCode:l,objectCode:p,apiUrl:f}=o(zs),{currency:m}=Vs(),g=o(Yu),{options:_,bookingFormConfiguration:y}=t,b=_.bookingFields.map(e=>"telephone"===e.id?{...e,id:"phonenumber"}:e),v=e.booking_price,w=r(()=>{const t={};for(const e of v.optional_house_costs)t[e.id]="0";const r={...ju(b),arrivalDate:i,departureDate:a,is_option:"false",costs:t,adults:n,children:0,babies:0,persons:n,discount:0,country:"nl",cancel_insurance:"0",discount_code:"",currency:m??"",extra_fields:{}};return{...r,persons:Mu(e,r)}},[i,b,v.optional_house_costs,a,e,n,m]),[x,k]=u(()=>w()),[S,C]=u({}),[E,T]=u(!1),[N,R]=u(null),[A,$]=u(null),[P,I]=u({}),D=r(()=>{R(null),I({})},[]),j=r((t,n)=>{I(e=>void 0===e[t]?e:{...e,[t]:void 0}),k(r=>{let o=Uu(r,t,n);return["adults","children","babies"].includes(t)&&(o={...o,persons:Mu(e,o)}),o})},[e]),L=r((e,t=!0)=>{C(n=>Uu(n,e,t))},[]),O=fu()||null,U=s(()=>({...P,...jl(x,e,b)}),[b,e,P,x]),M=r(async t=>{t.preventDefault();const n={house_code:p,portal_code:l,locale:c},r=e=>{gu({...n,interaction_type:"booking_form_error",interaction_info:{fields:e.filter(mu)}})},o=jl(x,e,b);if(C(function(e,t){let n={adults:!0,children:!0,babies:!0,cancel_insurance:!0};return e.forEach(e=>{n=Uu(n,Be(e.id)?`extra_fields.booking_field_${e.id}`:e.id,!0)}),Number(t.discount)>0&&(n.discount_reason=!0),"1"!==t.cancel_insurance&&"2"!==t.cancel_insurance||(["address","house_number","zipcode","city"].forEach(e=>{n=Uu(n,e,!0)}),n=Uu(n,"extra_fields.date_of_birth",!0)),n}(b,x)),Object.keys(o).length>0)r(Object.keys(o));else{T(!0),R(null),I({});try{const e=await Nu({apiUrl:f,locale:c,payload:Pu({values:x,objectCode:p,portalCode:l,locale:c,sessionIdentifier:O})});$(e);const t=y.redirect_urls??{},n=e.redirect_to_payment&&e.payment_url||e.redirect_url||t[c];n&&""!==n?(i=n,window.location.href=i):setTimeout(()=>{g({type:"return"})},15e3)}catch(s){if(gu({...n,interaction_type:"booking_failed",interaction_info:{error_key:s instanceof Tu?`http_${s.status}`:"network"}}),R(s instanceof Error?s:/* @__PURE__ */new Error("The booking could not be created")),s instanceof Tu&&s.fieldErrors){const e={};for(const[t,n]of Object.entries(s.fieldErrors))e[t]=n.join(" ");I(e),r(Object.keys(s.fieldErrors))}}finally{T(!1)}var i}},[f,b,y,g,e,c,p,l,O,x]);/* @__PURE__ */
|
|
127
|
+
return d(Bu.Provider,{value:{values:x,errors:U,touched:S,isSubmitting:E,setFieldValue:j,setFieldTouched:L},children:/* @__PURE__ */h("form",{className:"form",onSubmit:M,children:[E&&/* @__PURE__ */d("div",{className:"return-message",children:"Creating booking..."}),N&&/* @__PURE__ */d(Iu,{show:!0,onClose:D,children:/* @__PURE__ */d(Ms,{errors:N})}),A&&/* @__PURE__ */d(Iu,{show:!0,children:/* @__PURE__ */d(kl,{})}),
|
|
129
128
|
/* @__PURE__ */h("div",{className:"form-content",children:[
|
|
130
129
|
/* @__PURE__ */h("div",{className:"form-section bup-16",children:[
|
|
131
130
|
/* @__PURE__ */d("a",{className:"return-link",role:"link",tabIndex:0,onClick:()=>{g({type:"return"})},children:ne("return_to_calendar")}),
|
|
132
131
|
/* @__PURE__ */d("h2",{children:ne("stay_details")}),
|
|
133
|
-
/* @__PURE__ */d(
|
|
134
|
-
/* @__PURE__ */d(
|
|
135
|
-
/* @__PURE__ */d(
|
|
136
|
-
/* @__PURE__ */d(
|
|
137
|
-
/* @__PURE__ */d(
|
|
132
|
+
/* @__PURE__ */d(Dl,{bookingFormConfiguration:y,house:e}),U.max_persons&&/* @__PURE__ */d("div",{className:"error-message bu-error-message persons",children:U.max_persons})]}),
|
|
133
|
+
/* @__PURE__ */d(xl,{errors:U,house:e,bookingFormConfiguration:y,values:x}),
|
|
134
|
+
/* @__PURE__ */d(yl,{house:e,values:x}),
|
|
135
|
+
/* @__PURE__ */d(Il,{costs:v.optional_house_costs,currency:v.currency}),
|
|
136
|
+
/* @__PURE__ */d($l,{bookingFields:b,errors:U,touched:S,PortalSite:t,values:x})]}),
|
|
138
137
|
/* @__PURE__ */h("div",{className:"form-sum bup-16",children:[
|
|
139
|
-
/* @__PURE__ */d(
|
|
138
|
+
/* @__PURE__ */d(pl,{house:e,values:x}),
|
|
140
139
|
/* @__PURE__ */h("div",{className:"terms",children:[t.form_submit_text," ",
|
|
141
|
-
/* @__PURE__ */d(
|
|
142
|
-
/* @__PURE__ */d("button",{className:"bu-calendar-button",type:"submit",disabled:E,children:t.form_submit_button_text})]})]})})}var
|
|
140
|
+
/* @__PURE__ */d(Iu,{buttonText:ne("terms"),children:/* @__PURE__ */d("div",{style:{width:"90vh",height:"90vh"},children:/* @__PURE__ */d("iframe",{src:e.rental_terms??void 0,width:"100%",height:"100%",title:"Terms"})})}),e.allow_option&&/* @__PURE__ */h("span",{children:[", ",ne("option_is_free")]})]}),[1,2].includes(Number(x.cancel_insurance))?/* @__PURE__ */d("div",{className:"terms",children:ne("comply_insurance_card")}):null,
|
|
141
|
+
/* @__PURE__ */d("button",{className:"bu-calendar-button",type:"submit",disabled:E,children:t.form_submit_button_text})]})]})})}var Ol=/* @__PURE__ */new Set;function Ul(e){return!Ol.has(e)&&(Ol.add(e),!0)}function Ml(e,t){return Ul(`price_unavailable:${e}:${t.arrival}:${t.departure}`)}function ql({portalSite:e}){const{portalCode:t,objectCode:n,locale:r,apiUrl:s}=o(zs),{currency:a}=Vs(),{arrivalDate:l,departureDate:h,persons:f}=o(Hu),[m,g]=u(null),[_,y]=u(null),b=c(/* @__PURE__ */new Set);return i(()=>{let e=!1;g(null),y(null);const o={arrival:l.date,departure:h.date},i={house_code:n,portal_code:t,locale:r};return rl({apiUrl:s,locale:r,portalCode:t,objectCode:n,startsAt:l.date,endsAt:h.date,currency:a,includeAccommodation:!0}).then(t=>{e||(t.accommodation?((()=>{const e=`${n}:${o.arrival}:${o.departure}`;return!b.current.has(e)&&(b.current.add(e),!0)})()&&gu({...i,interaction_type:"booking_started",interaction_info:{...o,persons:f}}),g({...t.accommodation,booking_price:{total_price:t.total_price,currency:t.currency,optional_house_costs:t.optional_house_costs.map(e=>({id:String(e.id),name:e.name,method:e.method,max_available:e.max_available,amount:e.amount,method_name:e.method_name,description:e.description}))}})):y(/* @__PURE__ */new Error("Price response lacks the accommodation")))}).catch(t=>{e||(y(t instanceof Error?t:new Error(String(t))),t instanceof nl&&Ml(n,o)&&gu({...i,interaction_type:"price_unavailable",interaction_info:o}))}),()=>{e=!0}},[s,r,t,n,l,h,f,a]),m||_?_||!m?/* @__PURE__ */d("div",{children:ne(_ instanceof nl?"no_prices_available_for_period":"something_went_wrong_please_try_again")}):/* @__PURE__ */d(Ll,{house:m,PortalSite:e}):/* @__PURE__ */d("div",{children:/* @__PURE__ */d(p,{})})}var Bl=class extends Error{constructor(e){super(`Accommodation detail request failed (${e})`),this.name="AccommodationDetailError",this.status=e,this.notFound=404===e}};async function Fl(e){const t=function({apiUrl:e,portalCode:t,objectCode:n}){const r=new URL("/portal_api/v1/accommodations/detail",new URL(e).origin);return r.search=new URLSearchParams({portal_code:t,object_code:n}).toString(),r.toString()}(e);try{return await zc.get(t,{headers:{locale:e.locale}}).json()}catch(n){if(n instanceof Xs)throw new Bl(n.response.status);throw n}}var zl=()=>/* @__PURE__ */h("svg",{xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 100 100",x:"0px",y:"0px",children:[/* @__PURE__ */d("title",{children:"Forward"}),/* @__PURE__ */d("path",{d:"M97.64,44.1,64.72,11.18a8.06,8.06,0,1,0-11.4,11.39L72.78,42H8.06a8.06,8.06,0,0,0,0,16.12H72.6L53.32,77.43a8.06,8.06,0,0,0,11.4,11.39L97.64,55.9A8,8,0,0,0,100,50.2a1.27,1.27,0,0,0,0-.2,1.41,1.41,0,0,0,0-.2A8.07,8.07,0,0,0,97.64,44.1Z"})]}),Hl=()=>/* @__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"})});function Yl({changeMonth:e,currentMonth:t,numberOfMonths:n}){const r=o(Yu);/* @__PURE__ */
|
|
143
142
|
return h("div",{className:"calendars-header bu-grid bu-grid-cols-3",children:[
|
|
144
143
|
/* @__PURE__ */d("div",{className:"bu-calendar-col bup-8",style:{textAlign:"center"},onClick:function(){e(fe(t,-n))},tabIndex:0,role:"button",children:/* @__PURE__ */d("div",{className:"icon bu-rounded bu-hover-bright",children:/* @__PURE__ */d("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",x:"0px",y:"0px",enableBackground:"new 0 0 100 100",viewBox:"0 0 100 125",xmlSpace:"preserve",children:/* @__PURE__ */d("path",{d:"M2.4,44.1l32.9-32.9c3.1-3.1,8.2-3.1,11.4,0c1.6,1.6,2.4,3.6,2.4,5.7c0,2.1-0.8,4.1-2.4,5.7L27.2,42h64.7 c2.2,0,4.2,0.9,5.7,2.4c1.5,1.5,2.4,3.5,2.4,5.7c0,4.4-3.6,8.1-8.1,8.1H27.4l19.3,19.3c1.6,1.6,2.4,3.6,2.4,5.7s-0.8,4.1-2.4,5.7 c-3.1,3.1-8.3,3.1-11.4,0L2.4,55.9C0.8,54.3,0,52.3,0,50.2c0-0.1,0-0.1,0-0.2c0-0.1,0-0.1,0-0.2C0,47.7,0.8,45.7,2.4,44.1z"})})})}),
|
|
145
|
-
/* @__PURE__ */d("div",{className:"bu-calendar-col bup-8",onClick:()=>{r({type:"reset"})},style:{textAlign:"center"},tabIndex:0,role:"button",children:/* @__PURE__ */d("div",{className:"icon bu-rounded bu-hover-bright",children:/* @__PURE__ */d(
|
|
146
|
-
/* @__PURE__ */d("div",{className:"bu-calendar-col bup-8 bup-x16",onClick:function(){e(fe(t,n))},style:{textAlign:"center"},tabIndex:0,role:"button",children:/* @__PURE__ */d("div",{className:"icon bu-rounded bu-hover-bright",children:/* @__PURE__ */d(
|
|
144
|
+
/* @__PURE__ */d("div",{className:"bu-calendar-col bup-8",onClick:()=>{r({type:"reset"})},style:{textAlign:"center"},tabIndex:0,role:"button",children:/* @__PURE__ */d("div",{className:"icon bu-rounded bu-hover-bright",children:/* @__PURE__ */d(Hl,{})})}),
|
|
145
|
+
/* @__PURE__ */d("div",{className:"bu-calendar-col bup-8 bup-x16",onClick:function(){e(fe(t,n))},style:{textAlign:"center"},tabIndex:0,role:"button",children:/* @__PURE__ */d("div",{className:"icon bu-rounded bu-hover-bright",children:/* @__PURE__ */d(zl,{})})})]})}function Wl({house:e}){const{departureDate:t,arrivalDate:n}=o(Hu);return t?.date?/* @__PURE__ */h("div",{className:"bup-16 bu-bold",children:[ne(`${e.house_type}.you_picked_arrival_date`),":"," ",ue(le(n.date),Ee),
|
|
147
146
|
/* @__PURE__ */d("br",{}),ne(`${e.house_type}.you_picked_departure_date`),":"," ",ue(le(t.date),Ee)]}):n?.date?/* @__PURE__ */h("div",{className:"bup-16 bu-bold",children:[ne(`${e.house_type}.you_picked_arrival_date`),":"," ",ue(le(n.date),Ee),
|
|
148
147
|
/* @__PURE__ */d("br",{}),ne(`${e.house_type}.pick_your_departure_in_the_calendar`),
|
|
149
|
-
/* @__PURE__ */d("br",{}),ne("minimum_nights",{minimum:n.min_nights})]}):/* @__PURE__ */d("div",{className:"bup-16 bu-bold",children:ne(`${e.house_type}.pick_your_arrivaldate_in_the_calendar`)})}function
|
|
148
|
+
/* @__PURE__ */d("br",{}),ne("minimum_nights",{minimum:n.min_nights})]}):/* @__PURE__ */d("div",{className:"bup-16 bu-bold",children:ne(`${e.house_type}.pick_your_arrivaldate_in_the_calendar`)})}function Jl({house:e}){/* @__PURE__ */
|
|
150
149
|
return h("div",{className:"legend",children:[
|
|
151
150
|
/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("span",{className:"legend-field arrival"}),ne(`${e.house_type}.arrival_date`)]}),
|
|
152
151
|
/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("span",{className:"legend-field booked"}),ne("booked")]}),
|
|
153
152
|
/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("span",{className:"legend-field departure"}),ne(`${e.house_type}.departure_date`)]}),
|
|
154
|
-
/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("span",{className:"legend-field last_minute_discount"}),ne("discount")]})]})}async function
|
|
155
|
-
return d("div",{className:"bu-grid bu-grid-cols-7",children:h})}function
|
|
156
|
-
return d("div",{className:"bu-grid bu-grid-cols-7",children:n})}function
|
|
153
|
+
/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("span",{className:"legend-field last_minute_discount"}),ne("discount")]})]})}async function Vl({apiUrl:e,locale:t,portalCode:n,objectCode:r,startsDate:o,endDate:i}){const s=function({apiUrl:e,portalCode:t,objectCode:n,startsDate:r,endDate:o}){const i=new URL("/portal_api/v1/accommodations/availability",new URL(e).origin);return i.search=new URLSearchParams({portal_code:t,object_code:n,starts_date:de(r),end_date:de(o)}).toString(),i.toString()}({apiUrl:e,portalCode:n,objectCode:r,startsDate:o,endDate:i});try{return await zc.get(s,{headers:{locale:t}}).json()}catch(a){if(a instanceof Xs)throw new Error(`Availability request failed (${a.response.status})`);throw a}}var Kl=({month:e})=>/* @__PURE__ */d("div",{className:"bu-bold bup-4",children:/* @__PURE__ */d("div",{className:"bu-calendar-col bu-text-center",children:/* @__PURE__ */d("span",{children:ue(e,Ce)})})});function Gl({day:e,monthStart:t,buDate:n,prevBooked:r,dates:o,house:i,discounts:s}){const{selectedDate:a,departureDate:c,arrivalDate:u}=o,l=/* @__PURE__ */new Date,d=["bu-grid","bu-center","bu-rounded-half","bu-h-42","bu-w-42"];if(p=t,(h=e).getFullYear()!==p.getFullYear()||h.getMonth()!==p.getMonth())return d.push("disabled"),d.join(" ");var h,p;if(n&&(n.arrival&&xe(e,pe(l,1))&&0!==n.max_nights?0===r?.max_nights?d.push("departure-arrival","bu-hover-bright"):d.push("arrival","bu-hover-bright"):0===n.max_nights?void 0!==r&&0!==r.max_nights?d.push("booked-departure","bu-hover-bright"):d.push("booked"):n.max_nights>0&&(void 0===r||0===r.max_nights)&&!n.arrival&&d.push("booked")),a){we(e,a)&&d.push("selected");const t=Se(e,a),o=t>=(u?.min_nights??0),s=t<=i.max_nights&&t<=(u?.max_nights??0);n.departure&&xe(e,a)&&o&&s&&void 0!==r&&0!==r.max_nights&&d.push("departure")}if(c&&a){const t=le(c.date);xe(e,a)&&ke(e,t)&&d.push("selected"),we(e,t)&&d.push("selected")}const f=Se(e,l),m=f<=i.last_minute_days&&f>0,g=s.find(t=>ke(pe(le(t.discount_starts_at),1),e)&&xe(he(le(t.discount_ends_at),1),e));return(m||g||n.special_offer>0)&&d.push("discount"),d.join(" ")}function Xl({availabilities:e,month:t,discounts:n,house:r}){const i=o(Yu),s=o(Hu),a=_e(t),c=ye(a),u=be(a),l=ve(c),h=[];let p=[],f=u;for(;f<=l;){for(let t=0;t<7;t++){let t=de(f),o=de(pe(f,1));const c=e.find(e=>e.date===t),u=e.find(e=>e.date===o);if(!c){p.push(/* @__PURE__ */d("div",{className:"bu-grid bu-center disabled",children:/* @__PURE__ */d("span",{children:ue(f,{day:"numeric"})})},t)),f=he(f,1);continue}const l=c;p.push(/* @__PURE__ */d("div",{className:Gl({day:f,monthStart:a,discounts:n,buDate:c,prevBooked:u,house:r,dates:s}),role:"button",tabIndex:0,onClick:()=>{ke(le(l.date),/* @__PURE__ */new Date)||i({type:"clicked",day:l,house:r})},children:/* @__PURE__ */d("span",{children:ue(f,{day:"numeric"})})},c.date)),f=he(f,1)}h.push(p),p=[]}/* @__PURE__ */
|
|
154
|
+
return d("div",{className:"bu-grid bu-grid-cols-7",children:h})}function Ql({month:e}){const t={weekday:"short"};let n=[],r=be(e);for(let o=0;o<7;o++)n.push(/* @__PURE__ */d("div",{className:"bu-calendar-col bu-text-center",children:ue(he(r,o),t)},o));/* @__PURE__ */
|
|
155
|
+
return d("div",{className:"bu-grid bu-grid-cols-7",children:n})}function Zl({count:e,currentMonth:t,house:n,availabilities:r,discounts:o}){const i=fe(t,e);/* @__PURE__ */
|
|
157
156
|
return h("div",{className:"bu-calendar calendar bup-16",children:[
|
|
158
|
-
/* @__PURE__ */d(
|
|
159
|
-
/* @__PURE__ */d(
|
|
160
|
-
/* @__PURE__ */d(
|
|
161
|
-
return d("div",{className:`bu-grid bu-grid-cols-${e||2} bu-gap-16`,children:
|
|
157
|
+
/* @__PURE__ */d(Kl,{month:i}),
|
|
158
|
+
/* @__PURE__ */d(Ql,{month:i}),
|
|
159
|
+
/* @__PURE__ */d(Xl,{availabilities:r,discounts:o,month:i,house:n})]},i.toISOString())}function ed({numberOfMonthsInARow:e,currentMonth:t,numberOfMonths:n,house:r}){const{portalCode:s,objectCode:a,locale:c,apiUrl:l}=o(zs),[h,f]=u(null),[m,g]=u(!0),[_,y]=u(!1);if(i(()=>{let e=!1;g(!0),y(!1);const r=be(_e(t)),o=ve(ye(fe(t,n-1)));return Vl({apiUrl:l,locale:c,portalCode:s,objectCode:a,startsDate:r,endDate:o}).then(t=>{e||(f(t),g(!1))}).catch(()=>{e||(y(!0),g(!1))}),()=>{e=!0}},[l,c,s,a,t,n]),m)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(p,{})});if(_||!h)/* @__PURE__ */return d("div",{children:"Error"});let b=[];for(let o=0;o<n;o++)b.push(/* @__PURE__ */d(Zl,{house:r,currentMonth:t,count:o,availabilities:h.availabilities,discounts:h.discounts},de(fe(t,o)).slice(0,7)));/* @__PURE__ */
|
|
160
|
+
return d("div",{className:`bu-grid bu-grid-cols-${e||2} bu-gap-16`,children:b})}function td({persons:e,variables:t}){const{portalCode:n,objectCode:r,locale:s,apiUrl:a}=o(zs),{currency:c}=Vs(),[f,m]=u(null),[g,_]=u(!0),[y,b]=u(null);return i(()=>{let o=!1;_(!0),b(null);const i={arrival:t.starts_at,departure:t.ends_at};return rl({apiUrl:a,locale:s,portalCode:n,objectCode:r,startsAt:t.starts_at,endsAt:t.ends_at,persons:e,currency:c}).then(t=>{o||(m(t),_(!1),function(e,t,n){return Ul(`quote_shown:${e}:${t.arrival}:${t.departure}:${n}`)}(r,i,e)&&gu({house_code:r,portal_code:n,locale:s,interaction_type:"quote_shown",interaction_info:{...i,persons:e,total_cents:Math.round(100*t.total_price),currency:t.currency.toUpperCase()}}))}).catch(e=>{o||(b(e),_(!1),e instanceof nl&&Ml(r,i)&&gu({house_code:r,portal_code:n,locale:s,interaction_type:"price_unavailable",interaction_info:i}))}),()=>{o=!0}},[a,s,n,r,t.starts_at,t.ends_at,e,c]),g?/* @__PURE__ */d("div",{className:"price-overview--build bup-16",children:/* @__PURE__ */d(p,{})}):y||!f?/* @__PURE__ */d("div",{className:"price-overview--build bup-16",children:ne(y instanceof nl?"no_prices_available_for_period":"something_went_wrong_please_try_again")}):/* @__PURE__ */d(l,{children:/* @__PURE__ */h("div",{className:"price-overview--book",children:[/* @__PURE__ */d("div",{className:"price",children:re(Math.round(f.total_price),{style:"currency",currency:f.currency})}),/* @__PURE__ */d("div",{children:/* @__PURE__ */d("i",{children:ne("based_on_one_person",{persons:e})})})]})})}var nd=Ee;function rd({house:e}){const t=e.persons>2?2:e.persons,[n,r]=u(t),{arrivalDate:i,departureDate:s}=o(Hu),a=o(Yu);let c=Du(e.persons);/* @__PURE__ */
|
|
162
161
|
return h("div",{className:"calendar--picker",children:[
|
|
163
|
-
/* @__PURE__ */h("div",{className:"calendar--picker--date",children:[/* @__PURE__ */d("span",{className:"name",children:ne(`${e.house_type}.arrival`)}),/* @__PURE__ */d("span",{className:"detail",children:i?.date?/* @__PURE__ */d("span",{children:ue(le(i?.date),
|
|
164
|
-
/* @__PURE__ */h("div",{className:"calendar--picker--date",children:[/* @__PURE__ */d("span",{className:"name",children:ne(`${e.house_type}.departure`)}),/* @__PURE__ */d("span",{className:"detail",children:s?.date?/* @__PURE__ */d("span",{children:ue(le(s?.date),
|
|
162
|
+
/* @__PURE__ */h("div",{className:"calendar--picker--date",children:[/* @__PURE__ */d("span",{className:"name",children:ne(`${e.house_type}.arrival`)}),/* @__PURE__ */d("span",{className:"detail",children:i?.date?/* @__PURE__ */d("span",{children:ue(le(i?.date),nd)}):ne(`${e.house_type}.pick_your_arrivaldate_in_the_calendar`)})]}),
|
|
163
|
+
/* @__PURE__ */h("div",{className:"calendar--picker--date",children:[/* @__PURE__ */d("span",{className:"name",children:ne(`${e.house_type}.departure`)}),/* @__PURE__ */d("span",{className:"detail",children:s?.date?/* @__PURE__ */d("span",{children:ue(le(s?.date),nd)}):/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("div",{children:ne(`${e.house_type}.pick_your_departure_in_the_calendar`)}),i&&ne("minimum_nights",{minimum:i?.min_nights})]})})]}),
|
|
165
164
|
/* @__PURE__ */d("div",{className:"calendar--picker--date",children:/* @__PURE__ */d("span",{className:"detail",children:/* @__PURE__ */d("select",{className:"calendar--picker--persons",value:n,onChange:e=>{r(Number(e.target.value))},children:c.map(e=>/* @__PURE__ */h("option",{value:e,children:[e," ",ne("persons")]},e))})})}),
|
|
166
165
|
/* @__PURE__ */d("div",{className:"calendar--picker--date",children:/* @__PURE__ */d(Ks,{})}),
|
|
167
|
-
/* @__PURE__ */d("div",{className:"calendar--picker--date",children:i&&s&&/* @__PURE__ */d(
|
|
168
|
-
/* @__PURE__ */d("button",{className:"button",disabled:!i||!s,onClick:()=>{i&&s&&a({type:"start",persons:n})},children:ne("calculate")})]})}function
|
|
169
|
-
return d("div",{className:"price-overview bup-16",children:/* @__PURE__ */d(
|
|
170
|
-
return h("div",{className:"calendar-container ",children:[/* @__PURE__ */d(
|
|
171
|
-
/* @__PURE__ */d(
|
|
172
|
-
/* @__PURE__ */d(
|
|
173
|
-
/* @__PURE__ */d(
|
|
174
|
-
/* @__PURE__ */d(
|
|
175
|
-
return d("div",{id:"calendar-container",children:"not-found"===a.status?/* @__PURE__ */d("div",{children:ne("no_house_found")}):/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("div",{className:"bup-16",children:a.house.name}),/* @__PURE__ */d(
|
|
176
|
-
return d(t?
|
|
166
|
+
/* @__PURE__ */d("div",{className:"calendar--picker--date",children:i&&s&&/* @__PURE__ */d(td,{persons:n,variables:{starts_at:i?.date,ends_at:s?.date}})}),
|
|
167
|
+
/* @__PURE__ */d("button",{className:"button",disabled:!i||!s,onClick:()=>{i&&s&&a({type:"start",persons:n})},children:ne("calculate")})]})}function od({house:e}){/* @__PURE__ */
|
|
168
|
+
return d("div",{className:"price-overview bup-16",children:/* @__PURE__ */d(rd,{house:e})})}function id({numberOfMonths:e,house:t,numberOfMonthsInARow:n}){const[r,o]=u(/* @__PURE__ */new Date);/* @__PURE__ */
|
|
169
|
+
return h("div",{className:"calendar-container ",children:[/* @__PURE__ */d(od,{house:t}),/* @__PURE__ */h("div",{className:"calendar-section",children:[
|
|
170
|
+
/* @__PURE__ */d(Yl,{changeMonth:o,currentMonth:r,numberOfMonths:e}),
|
|
171
|
+
/* @__PURE__ */d(ed,{house:t,numberOfMonths:e,numberOfMonthsInARow:n,currentMonth:r}),
|
|
172
|
+
/* @__PURE__ */d(Jl,{house:t}),
|
|
173
|
+
/* @__PURE__ */d(Wl,{house:t})]})]})}function sd({portalSite:e}){const{portalCode:t,objectCode:n,locale:r,apiUrl:s}=o(zs),[a,c]=u({status:"loading"});if(i(()=>{let e=!1;return c({status:"loading"}),Fl({apiUrl:s,locale:r,portalCode:t,objectCode:n}).then(t=>{e||c({status:"ready",house:t})}).catch(t=>{e||(t instanceof Bl&&t.notFound?c({status:"not-found"}):c({status:"error",error:t instanceof Error?t:/* @__PURE__ */new Error(`The accommodation request failed: ${String(t)}`)}))}),()=>{e=!0}},[s,r,t,n]),"loading"===a.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(p,{})});if("error"===a.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(Ms,{errors:a.error})});const l=e.bookingFormConfiguration.show_months_amount,f=e.bookingFormConfiguration.show_months_in_a_row_amount;/* @__PURE__ */
|
|
174
|
+
return d("div",{id:"calendar-container",children:"not-found"===a.status?/* @__PURE__ */d("div",{children:ne("no_house_found")}):/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("div",{className:"bup-16",children:a.house.name}),/* @__PURE__ */d(id,{numberOfMonths:l,numberOfMonthsInARow:f,house:a.house})]})})}function ad({portalSite:e}){const{bookingStarted:t}=o(Hu);/* @__PURE__ */
|
|
175
|
+
return d(t?ql:sd,{portalSite:e})}function cd({portalSite:e}){const{portalCode:t,objectCode:n,locale:r}=o(zs);return i(()=>{Ul(`house_view:${n}`)&&gu({house_code:n,portal_code:t,locale:r,interaction_type:"house_view",interaction_info:{entry:vu()}})},[n,t,r]),/* @__PURE__ */d(Wu,{children:/* @__PURE__ */d(ad,{portalSite:e})})}async function ud({portalCode:e,objectCode:t,apiUrl:n="",after:r}){const o=new URLSearchParams({portal_code:e,object_code:t});r&&o.set("after",r);const i=`${n?new URL(n).origin:""}/portal_api/v1/accommodations/reviews?${o.toString()}`;try{const e=await zc.get(i).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(s){if(s instanceof Xs)throw new Error(`Reviews request failed (${s.response.status})`);throw s}}function ld(e){return e>7?"best":e>6?"good":e>4?"medium":"low"}function dd(e){return{color:ld(e),formatted:e%1==0?String(e):e.toFixed(1)}}function hd(e,t){const n=document.createElement("div");return e&&(n.className=e),t&&(n.textContent=t),n}function pd(e){const t=hd("bu_reviews bup-16"),n=hd("bu_reviews__overview bup-16 bu_card"),r=hd("bu_score");if(e.rating){const t=dd(e.rating),n=hd(`bu_score__rating bu_card ${t.color}`);n.textContent=t.formatted,r.appendChild(n)}const o=hd("bu_reviews__overview__number",`${e.scoreAmount} ${ne("reviews")}`);return n.appendChild(r),n.appendChild(o),t.appendChild(n),e.reviews.forEach(e=>{const n=function(e){const t=dd(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=dd(e.score);return{id:e.id,name:e.name,score:e.score,color:t.color,formatted:t.formatted}})}}(e),r=hd("bu_single_review bup-16 bu_card"),o=hd("bu_review_summary"),i=hd("bu_score");if(e.score){const e=hd(`bu_score__rating bu_card ${n.color}`,n.formatted);i.appendChild(e)}const s=hd("bu_review_summary__date_name"),a=hd(void 0,`${Ne(n.createdAt)}, `),c=hd("bu_review_summary__name",n.name);if(s.appendChild(a),s.appendChild(c),o.appendChild(i),o.appendChild(s),n.sourceName){const e=hd("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=hd("bu_criteria");n.criteria.forEach(t=>{const n=hd("bu_score");if(t.score){const e=hd(`bu_score__rating bu_card ${t.color}`,t.formatted);n.appendChild(e)}n.appendChild(hd(void 0,t.name)),e.appendChild(n)}),r.appendChild(e)}if(n.reviewResponses?.length>0){const e=hd("bu_review_responses");n.reviewResponses.forEach(t=>{const n=hd("bu_review_response"),r=hd("bu_review_response__label",ne("review_response_label")),o=hd("bu_review_response__header"),i=Ne(t.created_at);o.appendChild(hd("bu_review_response__sender",t.sender)),o.appendChild(hd("bu_review_response__date",i));const s=document.createElement("p");s.className="bu_review_response__message",s.textContent=t.message,n.appendChild(r),n.appendChild(o),n.appendChild(s),e.appendChild(n)}),r.appendChild(e)}t.appendChild(r)}),t}function fd({house:e}){const t=c(null);return i(()=>{var n,r;if(t.current)return n=t.current,r=()=>pd(e),n.replaceChildren(r()),()=>{n.replaceChildren()}},[e]),/* @__PURE__ */d("div",{ref:t})}function md({objectCode:e,portalCode:t,apiUrl:n}){const[r,o]=u({status:"loading"}),s=c(!0);if(i(()=>(s.current=!0,()=>{s.current=!1}),[]),i(()=>{let r=!0;return o({status:"loading"}),ud({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:ne("something_went_wrong_please_try_again")})});const a=r.house,f="ready"===r.status&&r.hasNextPage,m="loading_more"===r.status;/* @__PURE__ */
|
|
177
176
|
return h(l,{children:[
|
|
178
|
-
/* @__PURE__ */d(
|
|
179
|
-
/* @__PURE__ */d("div",{className:"bu_reviews__note",children:/* @__PURE__ */d("a",{href:"https://www.bukazu.com",target:"_blank",rel:"noopener noreferrer",children:ne("reviews_note_link")})})]})}var
|
|
177
|
+
/* @__PURE__ */d(fd,{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 i=r.house,a=r.endCursor;o({status:"loading_more",house:i,endCursor:a}),ud({portalCode:t,objectCode:e,apiUrl:n,after:a??void 0}).then(({house:e,pageInfo:t})=>{s.current&&o({status:"ready",house:{...i,reviews:[...i.reviews,...e.reviews]},endCursor:t.end_cursor,hasNextPage:t.has_next_page})}).catch(e=>{s.current&&o({status:"error",error:e instanceof Error?e:new Error(String(e))})})},children:ne("load_more_reviews")}),
|
|
178
|
+
/* @__PURE__ */d("div",{className:"bu_reviews__note",children:/* @__PURE__ */d("a",{href:"https://www.bukazu.com",target:"_blank",rel:"noopener noreferrer",children:ne("reviews_note_link")})})]})}var gd={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 _d(e){const{url:t,label:n}=Object.prototype.hasOwnProperty.call(gd,e)?gd[e]:gd.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 yd=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 bd(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 vd(e,t){try{return await zc.get(e,{headers:{locale:t}}).json()}catch(n){if(n instanceof Xs)throw new Error(`Portal settings request failed (${n.response.status})`);throw n}}function wd({apiUrl:e,locale:t,portalCode:n}){return vd(function({apiUrl:e,portalCode:t}){return bd(e,"settings",t)}({apiUrl:e,portalCode:n}),t)}function xd({apiUrl:e,locale:t,portalCode:n}){return vd(function({apiUrl:e,portalCode:t}){return bd(e,"booking-fields",t)}({apiUrl:e,portalCode:n}),t)}function kd({apiUrl:e,locale:t,portalCode:n}){return vd(function({apiUrl:e,portalCode:t}){return bd(e,"filter-fields",t)}({apiUrl:e,portalCode:n}),t)}function Sd(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 Cd(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 Ed({portalCode:e,isSearchPage:t,isBookingPage:n,apiUrl:r,locale:o}){const i=wd({apiUrl:r,locale:o,portalCode:e}),s=t?kd({apiUrl:r,locale:o,portalCode:e}):Promise.resolve(void 0),a=n?xd({apiUrl:r,locale:o,portalCode:e}):Promise.resolve(void 0),[c,u,l]=await Promise.all([i,s,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})),i=(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}}))),s=e.colors,a={filtersForm:Cd(e.filters_form),bookingFields:o,searchFields:void 0!==t?i:void 0,bookingForm:{},colors:s};var c;return{name:e.name,portal_code:e.portal_code,options:a,colorsConfiguration:s,currencies:Ys(e.currencies),bookingFormConfiguration:e.booking_form,booking_fields:o,max_persons:0,max_bedrooms:0,max_bathrooms:0,max_weekprice:0,...Sd(e.labels,r)}}({settings:c,filterFields:u,bookingFields:l,locale:o})}function Td({pageType:e,locale:t,filters:n={}}){const{portalCode:r,objectCode:s,apiUrl:a,locale:c}=o(zs),[l,f]=u({status:"loading"}),m=!s,g=!!s&&"reviews"!==e;if(i(()=>{let e=!0;f({status:"loading"});const t=te(c);return Ed({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(Ms,{errors:l.error});const _=l.portalSite;let y=_.options;const b=_.colorsConfiguration,v=document.documentElement;let w;return v.style.setProperty("--bukazu-discount",b.discount),v.style.setProperty("--bukazu-cell",b.cell),v.style.setProperty("--bukazu-arrival",b.arrival),v.style.setProperty("--bukazu-booked",b.booked),v.style.setProperty("--bukazu-departure",b.departure),v.style.setProperty("--bukazu-button",b.button),v.style.setProperty("--bukazu-button_cta",b.button_cta),w=s&&null!==s&&"reviews"!==e?/* @__PURE__ */h(yd,{children:[/* @__PURE__ */d(cd,{portalSite:_}),/* @__PURE__ */d("div",{dangerouslySetInnerHTML:{__html:_d(t)}})]}):s&&null!==s&&"reviews"===e?/* @__PURE__ */d(md,{objectCode:s,portalCode:r,apiUrl:a}):/* @__PURE__ */d(Eu,{PortalSite:_,locale:t,options:y,filters:n}),/* @__PURE__ */d(Js,{currencies:_.currencies,children:w})}function Nd({portalCode:e,objectCode:t,pageType:n,locale:r,filters:o,api_url:s="https://api.bukazu.com",sentryDsn:a}){const c=Bs(r);i(()=>{var n;a&&(n=a,void 0===On()&&Is({dsn:n,integrations:e=>e.filter(e=>"GlobalHandlers"!==e.name)})),Ds({portalCode:e,objectCode:t,locale:c})},[a,e,t,c]),i(()=>{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&&(Bs(n),n.toLowerCase().split(/[-_]/)[0]);r&&Fs(r);const s=JSON.stringify(o);return i(()=>{o.forEach(e=>Ls(e))},[s]),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(zs.Provider,{value:{portalCode:e,objectCode:t,locale:c,apiUrl:s},children:/* @__PURE__ */d("div",{className:"bu-portal",children:/* @__PURE__ */d(Td,{pageType:n,locale:c,filters:o})})})}export{Nd as default};
|