bukazu-portal-react 4.3.1 → 4.3.2
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/{de-SfUVSlej.js → de-YHuGd9n8.js} +1 -1
- package/build/{en-CgSqbzSK.js → en-CCG9CwEg.js} +1 -1
- package/build/{es-BON5ABqu.js → es-CkgxT8_P.js} +1 -1
- package/build/{fr-BMdUPHOL.js → fr-BtkMi82T.js} +1 -1
- package/build/{it-DQ9dWVHp.js → it-CHgwFaJs.js} +1 -1
- package/build/{nl-Cz225X0w.js → nl-LIfxbb4N.js} +1 -1
- package/build/portal.es.js +97 -97
- package/build/portal.website.js +2 -2
- package/package.json +3 -3
package/build/portal.es.js
CHANGED
|
@@ -16,101 +16,101 @@ return d("button",{type:"button",className:"bu-chip "+(s?"bu-disabled":""),"data
|
|
|
16
16
|
return h("select",{id:t.id,name:t.id,onBlur:s,onChange:s,value:r,children:[/* @__PURE__ */d("option",{value:""}),n.map(e=>{let n=!1;return["cities","regions"].includes(t.id)&&(i&&!i.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:s,onChange:s,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 s=t.countries,i=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=!(!s||!o)&&!s.includes(o);/* @__PURE__ */
|
|
18
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:i,onChange:i}),/* @__PURE__ */d("label",{htmlFor:t,children:n})]},t)})})}function _({value:e,onChange:t,field:n}){const r=e??"",[o,i]=u(r);function a(){o!==r&&t(n.id,o)}return s(()=>{i(r)},[r]),/* @__PURE__ */d("input",{type:"date",id:n.id,name:n.id,value:o,onChange:e=>i(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 k(e){return v.includes(e.type)?e.type:b.includes(e.id)?"select":"text"}function x(e){return w.includes(k(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:s,labelId:i}){const a=s??C(t,e),c=k(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:i}):"radio"===c?/* @__PURE__ */d(g,{options:a,field:t,filters:n,onChange:o,labelledBy:i}):"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",nights:"{count} nights",clear_dates:"Clear dates",change_dates:"Change dates",price_follows_dates:"The price follows your dates",previous_month:"Previous month",next_month:"Next month",have_discount_code:"Have a discount code?",hide:"Hide",your_booking:"Your booking",view_breakdown:"View breakdown",returning_to_calendar:"You will return to the calendar in a moment.",done:"Done",score_excellent:"Excellent",score_very_good:"Very good",score_good:"Good",score_fair:"Fair",via_source:"via {source}",based_on_last_reviews:"Based on the last {count} reviews",score_only:"Score only",based_on_reviews:"Based on {count} reviews"},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,s=[];let i="";for(;r<o;){const t=e[r++];if(128&t)if(192==(224&t)){const n=63&e[r++];s.push((31&t)<<6|n)}else if(224==(240&t)){const n=63&e[r++],o=63&e[r++];s.push((31&t)<<12|n<<6|o)}else if(240==(248&t)){let n=(7&t)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++];n>65535&&(n-=65536,s.push(n>>>10&1023|55296),n=56320|1023&n),s.push(n)}else s.push(t);else s.push(t);s.length>=4096&&(i+=String.fromCharCode(...s),s.length=0)}return s.length>0&&(i+=String.fromCharCode(...s)),i}var D=new TextDecoder;function P(e,t,n){return n>200?function(e,t,n){const r=e.subarray(t,t+n);return D.decode(r)}(e,t,n):A(e,t,n)}var $=class{type;data;constructor(e,t){this.type=e,this.data=t}},I=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),s=new DataView(o.buffer);return s.setUint32(0,t<<2|3&n),s.setUint32(4,r),o}}{const n=/* @__PURE__ */new Uint8Array(12),r=new DataView(n.buffer);return r.setUint32(0,t),function(e,t,n){const r=Math.floor(n/4294967296),o=n;e.setUint32(t,r),e.setUint32(t+4,o)}(r,4,e),n}}var M={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 I(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}(e);/* @__PURE__ */
|
|
20
|
-
return new Date(1e3*t.sec+t.nsec/1e6)}},
|
|
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 i of e){if(n)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(i);try{t=this.doDecodeSync(),n=!0}catch(
|
|
19
|
+
return 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 k(e){return v.includes(e.type)?e.type:b.includes(e.id)?"select":"text"}function x(e){return w.includes(k(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:s,labelId:i}){const a=s??C(t,e),c=k(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:i}):"radio"===c?/* @__PURE__ */d(g,{options:a,field:t,filters:n,onChange:o,labelledBy:i}):"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","house_boat.arrival_date":"Start date","house_boat.departure_date":"End date","house_boat.arrival":"Start date","house_boat.departure":"End 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",nights:"{count} nights",clear_dates:"Clear dates",change_dates:"Change dates",price_follows_dates:"The price follows your dates",previous_month:"Previous month",next_month:"Next month",have_discount_code:"Have a discount code?",hide:"Hide",your_booking:"Your booking",view_breakdown:"View breakdown",returning_to_calendar:"You will return to the calendar in a moment.",done:"Done",score_excellent:"Excellent",score_very_good:"Very good",score_good:"Good",score_fair:"Fair",via_source:"via {source}",based_on_last_reviews:"Based on the last {count} reviews",score_only:"Score only",based_on_reviews:"Based on {count} reviews"},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,s=[];let i="";for(;r<o;){const t=e[r++];if(128&t)if(192==(224&t)){const n=63&e[r++];s.push((31&t)<<6|n)}else if(224==(240&t)){const n=63&e[r++],o=63&e[r++];s.push((31&t)<<12|n<<6|o)}else if(240==(248&t)){let n=(7&t)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++];n>65535&&(n-=65536,s.push(n>>>10&1023|55296),n=56320|1023&n),s.push(n)}else s.push(t);else s.push(t);s.length>=4096&&(i+=String.fromCharCode(...s),s.length=0)}return s.length>0&&(i+=String.fromCharCode(...s)),i}var D=new TextDecoder;function $(e,t,n){return n>200?function(e,t,n){const r=e.subarray(t,t+n);return D.decode(r)}(e,t,n):A(e,t,n)}var P=class{type;data;constructor(e,t){this.type=e,this.data=t}},j=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 I(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),s=new DataView(o.buffer);return s.setUint32(0,t<<2|3&n),s.setUint32(4,r),o}}{const n=/* @__PURE__ */new Uint8Array(12),r=new DataView(n.buffer);return r.setUint32(0,t),function(e,t,n){const r=Math.floor(n/4294967296),o=n;e.setUint32(t,r),e.setUint32(t+4,o)}(r,4,e),n}}var 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:I(t,4),nsec:t.getUint32(0)};default:throw new j(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}(e);/* @__PURE__ */
|
|
20
|
+
return new Date(1e3*t.sec+t.nsec/1e6)}},M=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 P(-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 P(n,o)}}return e instanceof P?e:null}decode(e,t,n){const r=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return r?r(e,t,n):new P(t,e)}};function U(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 j("The type of key must be string or number but "+typeof e)},W=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}},Y=/* @__PURE__ */new DataView(/* @__PURE__ */new ArrayBuffer(0)),V=new Uint8Array(Y.buffer);try{Y.getInt8(0)}catch(ih){if(!(ih 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 J=/* @__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),s=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(s,o),o}},G=class e{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=Y;bytes=V;headByte=-1;stack=new W;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??M.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=U(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=U(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 i of e){if(n)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(i);try{t=this.doDecodeSync(),n=!0}catch(ih){if(!(ih instanceof RangeError))throw ih}this.totalPos+=this.pos}if(n){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return t}const{headByte:r,pos:o,totalPos:s}=this;throw new RangeError(`Insufficient data in parsing ${q(r)} at ${s} (${o} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,t){if(this.entered)yield*this.clone().decodeMultiAsync(e,t);else try{this.entered=!0;let n=t,r=-1;for await(const o of e){if(t&&0===r)throw this.createExtraByteError(this.totalPos);this.appendBuffer(o),n&&(r=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),0!==--r;);}catch(ih){if(!(ih instanceof RangeError))throw ih}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 j(`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 j("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 j(`Unrecognized array type byte: ${q(e)}`)}}pushMapState(e){if(e>this.maxMapLength)throw new j(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new j(`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 j(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+t+e)throw J;const n=this.pos+t;let r;return r=this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?this.keyDecoder.decode(this.bytes,n,e):$(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 j(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+t))throw J;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 j(`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=I(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(s).decode(o);var o,s}var Q=/* @__PURE__ */new Map([["en",N]]),Z=/* @__PURE__ */new Map,ee={en:async()=>(await(import("./en-CCG9CwEg.js"))).default,nl:async()=>(await(import("./nl-LIfxbb4N.js"))).default,de:async()=>(await(import("./de-YHuGd9n8.js"))).default,fr:async()=>(await(import("./fr-BtkMi82T.js"))).default,es:async()=>(await(import("./es-CkgxT8_P.js"))).default,it:async()=>(await(import("./it-CHgwFaJs.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 se({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 ie=({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:[
|
|
22
22
|
/* @__PURE__ */d("path",{d:"M3 6h9M15 6h2M3 14h3M9 14h8"}),
|
|
23
23
|
/* @__PURE__ */d("circle",{cx:"13",cy:"6",r:"2"}),
|
|
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 s=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(o,s)),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()+6)%7),t}function ve(e){const t=ge(e);return t.setDate(t.getDate()+(7-t.getDay())%7),t}function we(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function ke(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function xe(e,t){return e.getTime()>t.getTime()}function Se(e,t){return e.getTime()<t.getTime()}function Ce(e,t){const n=ge(e).getTime(),r=ge(t).getTime();return Math.round((n-r)/864e5)}var Ee={month:"long",year:"numeric"},Ne={weekday:"long",day:"2-digit",month:"long",year:"numeric"},Te={year:"numeric",month:"long",day:"numeric"};function Re(e){return ue(le(e.slice(0,10)),Te)}var Ae={day:"numeric",month:"short",year:"numeric"};function De(e){return null!=e&&("string"==typeof e?""!==e.trim():!Array.isArray(e)||e.length>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 s=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(o,s)),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()+6)%7),t}function ve(e){const t=ge(e);return t.setDate(t.getDate()+(7-t.getDay())%7),t}function we(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function ke(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function xe(e,t){return e.getTime()>t.getTime()}function Se(e,t){return e.getTime()<t.getTime()}function Ce(e,t){const n=ge(e).getTime(),r=ge(t).getTime();return Math.round((n-r)/864e5)}var Ee={month:"long",year:"numeric"},Ne={weekday:"long",day:"2-digit",month:"long",year:"numeric"},Te={year:"numeric",month:"long",day:"numeric"};function Re(e){return ue(le(e.slice(0,10)),Te)}var Ae={day:"numeric",month:"short",year:"numeric"};function De(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),Ae):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 je=["countries","regions","cities"];function Ie(e,t){return String(e)===String(t)}function Le(e,t){return Array.isArray(e)?e.some(e=>Ie(e,t)):Ie(e,t)}function Oe(e,t){for(const n of e??[])if("object"==typeof n&&Ie(n.id,t))return n;return null}function Me(e,t,n,r){let o=De(n)?{...e,[t]:n}:$e(e,t);if(!function(e){return je.includes(e)}(t))return o;const s=je.indexOf(t);if(!De(n)){for(const e of je.slice(s+1))o=$e(o,e);return o}const i=o;if("cities"===t){const e=Oe(r.get("cities"),n);void 0!==e?.region&&null!==e.region&&(i.regions=String(e.region)),void 0!==e?.country_id&&null!==e.country_id&&(i.countries=String(e.country_id))}else if("regions"===t){const e=Oe(r.get("regions"),n);void 0!==e?.country_id&&null!==e.country_id&&(i.countries=String(e.country_id))}const a=Oe(r.get("regions"),i.regions);De(i.regions)&&void 0!==a?.country_id&&De(i.countries)&&!Le(i.countries,a.country_id)&&(o=$e(o,"regions"));const c=Oe(r.get("cities"),i.cities),u=o;if(De(u.cities)&&c){const e=void 0!==c.country_id&&De(u.countries)&&!Le(u.countries,c.country_id),t=void 0!==c.region&&De(u.regions)&&!Le(u.regions,c.region);(e||t)&&(o=$e(o,"cities"))}return o}var Ue="bu-filters-panel";function qe({filters:e,onFilterChange:t,PortalSite:n,options:r}){const[o,s]=u(!1),i=r.searchFields??[],a=i.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=>De(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=i.filter(e=>!De(f[e.id]));function g(n,r){t(Me(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__ */
|
|
25
25
|
return h(l,{children:[
|
|
26
26
|
/* @__PURE__ */h("button",{type:"button",className:_?"bu-filters-fab":"filters-button","aria-expanded":o,"aria-controls":Ue,onClick:()=>s(!o),children:[_&&/* @__PURE__ */d(ie,{}),ne("filters"),b]}),_&&o&&/* @__PURE__ */d("div",{className:"bu-filters-backdrop","data-testid":"filters-backdrop",onClick:()=>s(!1)}),
|
|
27
27
|
/* @__PURE__ */h("div",{id:Ue,className:y,onKeyDown:e=>{"Escape"===e.key&&s(!1)},children:[
|
|
28
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:()=>s(!1),children:/* @__PURE__ */d(oe,{size:18})})]}),
|
|
29
|
-
/* @__PURE__ */d(se,{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:x(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:()=>s(!1),children:ne("show_results")})]})]})}function Be(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Fe(e){return"number"==typeof e?Number.isInteger(e):"string"==typeof e&&/^-?\d+$/.test(e)}function ze({result:e,options:t,currency:n}){const r=[t.show_city&&`<span>${Be(e.city)}, </span>`,t.show_region&&`<span>${Be(e.province)}, </span>`,t.show_country&&`<span>${Be(e.country_name)}</span>`].filter(Boolean).join(""),o=[t.show_persons&&`<div>${Be(e.persons)} ${Be(ne("persons"))}</div>`,t.show_bedrooms&&`<div>${Be(e.bedrooms)} ${Be(ne("bedrooms"))}</div>`,t.show_bathrooms&&`<div>${Be(e.bathrooms)} ${Be(ne("bathrooms"))}</div>`].filter(Boolean).join(""),s=t.show_rating&&e.rating?`<div class="result-rating bu_card"><div class="result-rating-inner">${Be(e.rating.toFixed(1))}</div></div>`:"",i=t.show_price?e.booking_price?`<div class="result-price">${Be(ne("price_from"))}<span class="price">${Be(re(e.booking_price.total_price,{style:"currency",currency:e.booking_price.currency,minimumFractionDigits:0,maximumFractionDigits:0}))}</span></div>`:`<div class="result-price">${Be(ne("minimum_week_price"))}<span class="price">${Be(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="${Be(e.house_url)}"`:""}>\n <div class="bukazu-result-inner">\n <div class="image-holder">\n <img${
|
|
29
|
+
/* @__PURE__ */d(se,{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:x(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:()=>s(!1),children:ne("show_results")})]})]})}function Be(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Fe(e){return"number"==typeof e?Number.isInteger(e):"string"==typeof e&&/^-?\d+$/.test(e)}function ze(e,t,n){return t?{src:t.large,srcset:`${t.small} 480w, ${t.medium} 960w, ${t.large} 1600w`,sizes:n}:e?{src:e}:null}function He({result:e,options:t,currency:n}){const r=[t.show_city&&`<span>${Be(e.city)}, </span>`,t.show_region&&`<span>${Be(e.province)}, </span>`,t.show_country&&`<span>${Be(e.country_name)}</span>`].filter(Boolean).join(""),o=[t.show_persons&&`<div>${Be(e.persons)} ${Be(ne("persons"))}</div>`,t.show_bedrooms&&`<div>${Be(e.bedrooms)} ${Be(ne("bedrooms"))}</div>`,t.show_bathrooms&&`<div>${Be(e.bathrooms)} ${Be(ne("bathrooms"))}</div>`].filter(Boolean).join(""),s=t.show_rating&&e.rating?`<div class="result-rating bu_card"><div class="result-rating-inner">${Be(e.rating.toFixed(1))}</div></div>`:"",i=t.show_price?e.booking_price?`<div class="result-price">${Be(ne("price_from"))}<span class="price">${Be(re(e.booking_price.total_price,{style:"currency",currency:e.booking_price.currency,minimumFractionDigits:0,maximumFractionDigits:0}))}</span></div>`:`<div class="result-price">${Be(ne("minimum_week_price"))}<span class="price">${Be(re(e.minimum_week_price,{style:"currency",currency:n??"EUR",minimumFractionDigits:0,maximumFractionDigits:0}))}</span></div>`:"",a=ze(e.image_url,e.image_urls,"(min-width: 992px) 400px, 300px"),c=a?Object.entries(a).map(([e,t])=>` ${e}="${Be(t)}"`).join(""):"";return`\n <a class="bukazu-result bu_card"${e.house_url?` href="${Be(e.house_url)}"`:""}>\n <div class="bukazu-result-inner">\n <div class="image-holder">\n <img${c} alt="${Be(e.name)}" loading="lazy" decoding="async" />\n </div>\n <div class="result">\n <div class="result-title">${Be(e.name)}</div>\n <div class="result-place">${r}</div>\n <div class="result-description">${e.description}</div>\n <div class="result-details">${o}</div>\n ${s}\n ${i}\n <div class="result-button">${Be(ne("view_details"))}</div>\n </div>\n </div>\n </a>\n `}function We({onPageChange:e,totalCount:t,activePage:n,limit:r}){const o=r>0?Math.ceil(t/r):0,s=function(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t);let n=Math.max(1,e-Math.floor(2.5)),r=n+5-1;r>=t-1&&(r=t-2,n=r-5+1);const o=[0];n>1&&o.push("...");for(let s=n;s<=r;s++)o.push(s);return r<t-2&&o.push("..."),o.push(t-1),o}(n,o);/* @__PURE__ */
|
|
30
30
|
return h("div",{className:"bu-paginator",children:[/* @__PURE__ */h("div",{children:[t," ",ne("results")]}),o>1&&/* @__PURE__ */h("ul",{className:"bu-pagination",children:[
|
|
31
31
|
/* @__PURE__ */d("li",{className:0===n?"disabled":"",children:/* @__PURE__ */d("button",{disabled:0===n,onClick:()=>e(n-1),"aria-label":ne("previous"),children:"<"})}),s.map((t,r)=>"..."===t?/* @__PURE__ */d("li",{children:/* @__PURE__ */d("span",{"aria-label":"More pages",children:"..."})},`break-${r}`):/* @__PURE__ */d("li",{className:t===n?"selected":"",children:/* @__PURE__ */d("button",{"data-page-button":!0,onClick:()=>e(t),"aria-current":t===n?"page":void 0,children:t+1})},t)),
|
|
32
|
-
/* @__PURE__ */d("li",{className:n===o-1?"disabled":"",children:/* @__PURE__ */d("button",{disabled:n===o-1,onClick:()=>e(n+1),"aria-label":ne("next"),children:">"})})]})]})}var
|
|
32
|
+
/* @__PURE__ */d("li",{className:n===o-1?"disabled":"",children:/* @__PURE__ */d("button",{disabled:n===o-1,onClick:()=>e(n+1),"aria-label":ne("next"),children:">"})})]})]})}var Ye=({size:e=18})=>/* @__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:[
|
|
33
33
|
/* @__PURE__ */d("rect",{x:"3",y:"3",width:"6",height:"6",rx:"1"}),
|
|
34
34
|
/* @__PURE__ */d("rect",{x:"11",y:"3",width:"6",height:"6",rx:"1"}),
|
|
35
35
|
/* @__PURE__ */d("rect",{x:"3",y:"11",width:"6",height:"6",rx:"1"}),
|
|
36
|
-
/* @__PURE__ */d("rect",{x:"11",y:"11",width:"6",height:"6",rx:"1"})]}),
|
|
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(We,{})}),/* @__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__,Ke=globalThis,Ge="10.75.0";function Xe(){return Qe(Ke),Ke}function Qe(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||"10.75.0",t[Ge]=t["10.75.0"]||{}}function Ze(e,t,n=Ke){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Ge]=r["10.75.0"]||{};return o[e]||(o[e]=t())}var et=["debug","info","warn","error","log","assert","trace"],tt={};function nt(e){if(!("console"in Ke))return e();const t=Ke.console,n={},r=Object.keys(tt);r.forEach(e=>{const r=tt[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function rt(){return st().enabled}function ot(e,...t){Je&&rt()&&nt(()=>{Ke.console[e](`Sentry Logger [${e}]:`,...t)})}function st(){return Je?Ze("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var it={enable:function(){st().enabled=!0},disable:function(){st().enabled=!1},isEnabled:rt,log:function(...e){ot("log",...e)},warn:function(...e){ot("warn",...e)},error:function(...e){ot("error",...e)}},at=/\(error: (.*)\)/,ct=/captureMessage|captureException/;function ut(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],s=e.split("\n");for(let i=n;i<s.length;i++){let e=s[i];e.length>1024&&(e=e.slice(0,1024));const n=at.test(e)?e.replace(at,"$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(lt(t).function||"")&&t.pop();t.reverse(),ct.test(lt(t).function||"")&&(t.pop(),ct.test(lt(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||lt(t).filename,function:e.function||"?"}))}(o.slice(r))}}function lt(e){return e[e.length-1]||{}}var dt="<anonymous>";function ht(e){try{return e&&"function"==typeof e&&e.name||dt}catch{return dt}}function pt(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 ft={},mt={};function gt(e,t){return ft[e]=ft[e]||[],ft[e].push(t),()=>{const n=ft[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function _t(e,t){if(!mt[e]){mt[e]=!0;try{t()}catch(zd){Je&&it.error(`Error while instrumenting ${e}`,zd)}}}function yt(e,t){const n=e&&ft[e];if(n)for(const r of n)try{r(t)}catch(zd){Je&&it.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ht(r)}\nError:`,zd)}}var bt=null;function vt(){bt=Ke.onerror,Ke.onerror=function(e,t,n,r,o){return yt("error",{column:r,error:o,line:n,msg:e,url:t}),!!bt&&bt.apply(this,arguments)},Ke.onerror.__SENTRY_INSTRUMENTED__=!0}var wt=null;function kt(){wt=Ke.onunhandledrejection,Ke.onunhandledrejection=function(e){return yt("unhandledrejection",e),!wt||wt.apply(this,arguments)},Ke.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var xt,St=Object.prototype.toString;function Ct(e){switch(St.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Lt(e,Error)}}function Et(e,t){return St.call(e)===`[object ${t}]`}function Nt(e){return Et(e,"ErrorEvent")}function Tt(e){return Et(e,"DOMError")}function Rt(e){return Et(e,"String")}function At(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Dt(e){return null===e||At(e)||"object"!=typeof e&&"function"!=typeof e}function Pt(e){return Et(e,"Object")}function $t(e){return"object"==typeof e&&null!==e}function It(e){return"undefined"!=typeof Event&&Lt(e,Event)}function jt(e){return Boolean(e?.then&&"function"==typeof e.then)}function Lt(e,t){try{return e instanceof t}catch{return!1}}function Mt(e){return"undefined"!=typeof Request&&Lt(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&&qt(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 qt(e,t){try{e.prototype=t.prototype=t.prototype||{},Ut(e,"__sentry_original__",t)}catch{}}function Bt(e){return e.__sentry_original__}function Ft(e){if(Ct(e))return{message:e.message,name:e.name,stack:e.stack,...zt(e)};if(It(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...zt(e)}}return e}function zt(e){return $t(e)?Object.fromEntries(Object.entries(e)):{}}function Ht(e){if(void 0!==xt)return xt?xt(e):e();const t=/* @__PURE__ */Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=Ke;return t in n&&"function"==typeof n[t]?(xt=n[t])(e):(xt=null,e())}function Wt(){return Ht(()=>Math.random())}function Yt(){return Ht(()=>Date.now())}var Vt,Jt,Kt=/* @__PURE__ */Symbol.for("sentry.skipNormalization"),Gt=/* @__PURE__ */Symbol.for("sentry.overrideNormalizationDepth");function Xt(e,t=100,n=1/0){try{return Zt("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Qt(e,t=3,n=102400){const r=Xt(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?Qt(e,t-1,n):r;var o}function Zt(e,t,n=1/0,r=1/0,o=function(){const e=/* @__PURE__ */new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=en(e,t);if(!a.startsWith("[object "))return a;if(function(e){return Boolean(e[Kt])}(t))return t;const c=function(e){const t=e[Gt];return"number"==typeof t?t:void 0}(t),u=void 0!==c?c:n;if(0===u)return a.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return Zt("",l.toJSON(),u-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let h=0;const p=Ft(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]=Zt(f,e,u-1,r,o),h++}return i(t),d}function en(e,t){try{if(Vt){const e=Vt(t);if(e)return e}return"undefined"!=typeof global&&t===global?"[Global]":"number"!=typeof t||Number.isFinite(t)?"function"==typeof t?`[Function: ${ht(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 tn(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function nn(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];Dt(t)?n.push(String(t)):t instanceof Error?n.push(t.message?`${t.name}: ${t.message}`:t.name):n.push(en(0,t))}return n.join(t)}function rn(e,t,n=!1){return!!Rt(e)&&(Et(t,"RegExp")?t.test(e):Rt(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function on(e,t=[],n=!1){for(const r of t)if(rn(e,r,n))return!0;return!1}function sn(e=function(){const e=Ke;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return Ht(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Jt||(Jt="10000000100040008000100000000000"),Jt.replace(/[018]/g,e=>(e^(16*Wt()&15)>>e/4).toString(16))}function an(e){return e.exception?.values?.[0]}function cn(e){const{message:t,event_id:n}=e;if(t)return t;const r=an(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function un(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function ln(e,t){const n=an(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 dn(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{Ut(e,"__sentry_captured__",!0)}catch{}return!1}var hn;function pn(){return Yt()/1e3}function fn(){return(hn??(hn=function(){const{performance:e}=Ke;if(!e?.now||!e.timeOrigin)return pn;const t=e.timeOrigin;return()=>(t+Ht(()=>e.now()))/1e3}()))()}function mn(e){const t=fn(),n={sid:sn(),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&&gn(n,e),n}function gn(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||fn(),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:sn()),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 _n(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]=_n(r[o],t[o],n-1));return r}function yn(){return sn()}function bn(){return sn().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 wn="_sentrySpan";function kn(e,t){t?Ut(e,wn,function(e){try{const t=Ke.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(t)):delete e[wn]}function xn(e){return vn(e[wn])}var Sn=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:yn(),sampleRand:Wt()}}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,kn(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&&gn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,{tags:r,attributes:o,extra:s,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:l,conversationId:d}=(n instanceof e?n.getScopeData():Pt(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),l&&(this._propagationContext=l),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,kn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:yn(),sampleRand:Wt()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:pn(),...e,message:e.message?tn(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=_n(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||sn();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||sn();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||sn();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 Cn=e=>e instanceof Promise&&!e[En],En=/* @__PURE__ */Symbol("chained PromiseLike"),Nn=(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,{[En]:!0}),t},Tn=class{constructor(e,t){let n,r;n=e||new Sn,r=t||new Sn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(zd){throw this._popScope(),zd}return jt(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Cn(r)&&Cn(e)?r:Nn(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 Rn(){const e=Qe(Xe());return e.stack=e.stack||new Tn(Ze("defaultCurrentScope",()=>new Sn),Ze("defaultIsolationScope",()=>new Sn))}function An(e){return Rn().withScope(e)}function Dn(e,t){const n=Rn();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Pn(e){return Rn().withScope(()=>e(Rn().getIsolationScope()))}function $n(e){const t=Qe(e);return t.acs?t.acs:{withIsolationScope:Pn,withScope:An,withSetScope:Dn,withSetIsolationScope:(e,t)=>Pn(t),getCurrentScope:()=>Rn().getScope(),getIsolationScope:()=>Rn().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 s=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),i=r&&"string"==typeof r?{unit:r}:{};if(s)return{...s,...i};if(!t||"skip-undefined"===t&&void 0===n)return;let a="";try{a=JSON.stringify(n)??""}catch{}return{value:a,type:"string",...i}}function jn(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 Ln(){return $n(Xe()).getCurrentScope()}function Mn(){return $n(Xe()).getIsolationScope()}function On(){return Ln().getClient()}function Un(e){const t=void 0;const{traceId:n,parentSpanId:r,propagationSpanId:o}=e.getPropagationContext(),s={trace_id:n,span_id:o||bn()};return r&&(s.parent_span_id=r),s}function qn(e){const t=e;return{scope:t._sentryScope,isolationScope:vn(t._sentryIsolationScope)}}function Bn(e){const t=function(e){if(!e||!Rt(e)&&!Array.isArray(e))return;return Array.isArray(e)?e.reduce((e,t)=>{const n=Fn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Fn(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 Fn(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 zn=/^o(\d+)\./,Hn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Wn(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}function 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 Vn(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(zn)?.[1]}(n)),r}function Jn(e){const t="string"==typeof e?function(e){const t=Hn.exec(e);if(!t)return void nt(()=>{});const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return Yn({host:s,pass:o,path:c,projectId:u,port:i,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 Kn=!1;function Gn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:er(e).parent_span_id,s=qn(e).scope;return{parent_span_id:o,span_id:r?s?.getPropagationContext().propagationSpanId||bn():t,trace_id:n}}function Xn(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 Qn(e){return"number"==typeof e?Zn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Zn(e.getTime()):fn()}function Zn(e){return e>9999999999?e/1e3:e}function er(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:tr(e),start_timestamp:Qn(o),timestamp:Qn(i)||void 0,status:nr(a),op:r["sentry.op"],origin:r["sentry.origin"],links:Xn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function tr(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function nr(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}var rr=function(e){return e._sentryRootSpan||e};function or(){Kn||(nt(()=>{}),Kn=!0)}function sr(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 ar(e,t){if(!t?.length)return!1;for(const n of t){if(lr(n)){if(e.description&&rn(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&&rn(e.description,n.name),o=!n.op||e.op&&rn(e.op,n.op),s=!n.attributes||Object.entries(n.attributes).every(([t,n])=>cr(e.attributes?.[t],n));if(r&&o&&s)return Je&&ir(e),!0}return!1}function cr(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?rn(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function ur(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 lr(e){return"string"==typeof e||e instanceof RegExp}var dr=/* @__PURE__ */Symbol.for("sentry.nonRecordingSpan");var hr="production";function pr(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:Vn(t)};return t.emit("createDsc",o),o}function fr(e,t){const n=t.getPropagationContext();return n.dsc||pr(n.traceId,e)}function mr(e){const t=On();if(!t)return{};const n=rr(e),r=er(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o["sentry.sample_rate"]??o["sentry.previous_trace_sample_rate"];function a(e){return"number"!=typeof i&&"string"!=typeof i||(e.sample_rate=`${i}`),e}const c=n._frozenDsc;if(c)return a(c);const u=function(e){return!!e&&!0===e[dr]}(n),l=u&&"ignored"===n.dropReason;if(u&&(!sr(t.getOptions())||l)){const e=qn(n).scope;if(e){const n={...fr(t,e)};return l&&(n.sampled="false"),a(n)}}const d=s?.get("sentry.dsc"),h=d&&Bn(d);if(h)return a(h);const p=pr(e.spanContext().traceId,t),f=o["sentry.source"]??o["sentry.segment.name.source"],m=r.description;return"url"!==f&&m&&(p.transaction=m),sr()&&(p.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=s?.get("sentry.sample_rand")??qn(n).scope?.getPropagationContext().sampleRand.toString()),a(p),t.emit("createDsc",p,n),p}function gr(e,t=[]){return[e,t]}function _r(e,t){const[n,r]=e;return[n,[...r,t]]}function yr(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function br(e){const t=Qe(Ke);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:[br(r),e]:r.push("string"==typeof e?br(e):e)}for(const s of n){const[e,t]=s;if(o(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)o(t);else{let e;try{e=JSON.stringify(t)}catch{e=JSON.stringify(Xt(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 wr(e){const t="string"==typeof e.data?br(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var kr={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 kr}(e)?kr[e]:e}function Sr(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Cr(e,t,n,r){const o=Sr(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const i=function(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Yt()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Wn(r)},...o&&{trace:o}}}(e,o,r,t);return delete e.sdkProcessingMetadata,gr(i,[[{type:s},e]])}function Er(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(o).length&&(e.user={...o,...e.user});Object.keys(s).length&&(e.contexts={...s,...e.contexts});i&&(e.level=i);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:Gn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:mr(t),...e.sdkProcessingMetadata};const n=rr(t),r=er(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint.length||delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}function Nr(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:d,attachments:h,propagationContext:p,transactionName:f,span:m}=t;Tr(e,"extra",n),Tr(e,"tags",r),Tr(e,"attributes",o),Tr(e,"user",s),Tr(e,"contexts",i),e.sdkProcessingMetadata=_n(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]=_n(e[t],n,1)}function Rr(e,t){const n=Ze("globalScope",()=>new Sn).getScopeData();return e&&Nr(n,e.getScopeData()),t&&Nr(n,t.getScopeData()),n}var Ar="user_agent.original";function Dr(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function Pr(e){return new Or(t=>{t(e)})}function $r(e){return new Or((t,n)=>{n(e)})}var Ir,jr,Lr,Mr,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(zd){r(zd)}else e(n)},t=>{if(n)try{e(n(t))}catch(zd){r(zd)}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&&(jt(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(zd){r(zd)}}};function Ur(e,t,n,r=0){try{const o=qr(t,n,e,r);return jt(o)?o:Pr(o)}catch(o){return $r(o)}}function qr(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return Je&&null===s&&it.log(`Event processor "${o.id||"?"}" dropped event`),jt(s)?s.then(e=>qr(e,t,n,r+1)):qr(s,t,n,r+1)}function Br(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||sn(),timestamp:t.timestamp||pn()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||"production",!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=tn(i.url,s));s&&e.exception?.values?.forEach(e=>{e.value&&(e.value=tn(e.value,s))})}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=Ke._sentryDebugIds,n=Ke._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Mr&&r.length===jr&&o.length===Lr)return Mr;jr=r.length,Lr=o.length,Mr={},Ir||(Ir={});const s=(t,n)=>{for(const r of t){const t=n[r],o=Ir?.[r];if(o&&Mr&&t)Mr[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&&Mr&&Ir){Mr[o]=t,Ir[r]=[o,t];break}}}}};return t&&s(r,t),n&&s(o,n),Mr}(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 Sn;return n.update(t),n}(r,n.captureContext);n.mechanism&&ln(c,n.mechanism);const d=o?o.getEventProcessors():[],h=Rr(s,l),p=[...n.attachments||[],...h.attachments];p.length&&(n.attachments=p),Er(c,h);const f=[...d,...h.eventProcessors];return(n.data&&!0===n.data.__sentry__?Pr(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 i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Xt(e.data,t,n)}}))},...e.user&&{user:Xt(e.user,t,n)},...e.contexts&&{contexts:Xt(e.contexts,t,n)},...e.extra&&{extra:Xt(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Xt(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Xt(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=Xt(e.contexts.flags,3,n));return r}(e,i,a):e))}function Fr(e){if(e)return function(e){return e instanceof Sn||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>zr.includes(e))}(e)?{captureContext:e}:e}var zr=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Hr(e,t){return Ln().captureException(e,Fr(t))}function Wr(e,t){return Ln().captureEvent(e,t)}function Yr(e,t){Mn().setTag(e,t)}function Vr(e){const t=Mn(),{user:n}=Rr(t,Ln()),{userAgent:r}=Ke.navigator||{},o=mn({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return"ok"===s?.status&&gn(s,{status:"exited"}),Jr(),t.setSession(o),o}function Jr(){const e=Mn(),t=Ln().getSession()||e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),gn(e,n)}(t),Kr(),e.setSession()}function Kr(){const e=Mn(),t=On(),n=e.getSession();n&&t&&t.captureSession(n)}function Gr(e=!1){e?Jr():Kr()}function Xr(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function Qr(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 Zr=[];function eo(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 to(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function no(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,Zr.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),Zr.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 ro(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function oo(){return"undefined"!=typeof window&&(!ro()||"renderer"===Ke.process?.type)}function so(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...oo()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function io(e,t){const n=t??function(e){return ao().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Wn(r)),gr(s,[so(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ao().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function ao(){return Ze("clientToLogBufferMap",()=>/* @__PURE__ */new WeakMap)}function co(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,...oo()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function uo(e,t){const n=t??function(e){return lo().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Wn(r)),gr(s,[co(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);lo().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function lo(){return Ze("clientToMetricBufferMap",()=>/* @__PURE__ */new WeakMap)}function ho(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:jn(n.attributes),links:n.links?.map(e=>({...e,attributes:jn(e.attributes)}))};var n}var po=/* @__PURE__ */Symbol.for("SentryBufferFullError");function fo(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 $r(po);const o=r();return t.add(o),o.then(()=>n(o),()=>n(o)),o},drain:function(e){if(!t.size)return Pr(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>Xr(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function mo(e,{statusCode:t,headers:n},r=Yt()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[e,t,,,n]=a.split(":",5),s=parseInt(e,10),i=1e3*(isNaN(s)?60:s);if(t)for(const a of t.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(o[a]=r+i);else o.all=r+i}else i?o.all=r+function(e,t=Yt()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(i,r):429===t&&(o.all=r+6e4);return o}function go(e,t,n=fo(e.bufferSize||64)){let r={};return{send:function(o){const s=[];if(yr(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)?s.push(t):e.recordDroppedEvent("ratelimit_backoff",o)}),0===s.length)return Promise.resolve({});const i=gr(o[0],s),a=t=>{!function(e,t){return yr(e,(e,n)=>t.includes(n))}(i,["client_report"])?yr(i,(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(i)}).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=mo(r,e),e),e=>{throw a("network_error"),Je&&it.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===po)return Je&&it.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}function _o(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 yo=["forwarded","-ip","remote-","via","-user"];var bo={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 wo(e){const t=null!=e.dataCollection?bo:!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:yo},httpHeaders:{request:{deny:yo},response:{deny:yo}},httpBodies:[],urlQueryParams:{deny:yo},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 ko="Not capturing exception because it's already been captured.",xo="Discarded session because of missing or non-string release",So=/* @__PURE__ */Symbol.for("SentryInternalError"),Co=/* @__PURE__ */Symbol.for("SentryDoNotSendEventError");function Eo(e){return{message:e,[So]:!0}}function No(e){return{message:e,[Co]:!0}}function To(e){return $t(e)&&So in e}function Ro(e){return $t(e)&&Co in e}function Ao(e,t,n,r,o){let s,i=0,a=!1;e.on(n,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,t=>{if(i+=r(t),i>=8e5)o(e);else if(!a){const t=e.getOptions()._flushInterval??5e3;t>0&&(a=!0,s=Xr(setTimeout(()=>{o(e)},t)))}}),e.on("flush",()=>{o(e)})}var Do=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=fo(e.transportOptions?.bufferSize??64),this._dataCollection=wo(e),e.dsn?this._dsn=Jn(e.dsn):Je&&it.warn("No DSN provided, client will not send events."),this._dsn){const t=Qr(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&&Ao(this,"afterCaptureLog","flushLogs",Lo,io),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Ao(this,"afterCaptureMetric","flushMetrics",jo,uo)}captureException(e,t,n){const r=sn();if(dn(e))return Je&&it.log(ko),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:sn(),...n},s=At(e)?e:String(e),i=Dt(e),a=i?this.eventFromMessage(s,t,o):this.eventFromException(e,o);return this._process(()=>a.then(e=>this._captureEvent(e,o,r)),i?"unknown":"error"),o.event_id}captureEvent(e,t,n){const r=sn();if(t?.originalException&&dn(t.originalException))return Je&&it.log(ko),r;const o={event_id:r,...t},s=e.sdkProcessingMetadata||{},i=s.capturedSpanScope,a=s.capturedSpanIsolationScope,c=Po(e.type);return this._process(()=>this._captureEvent(e,o,i||n,a),c),o.event_id}captureSession(e){this.sendSession(e),gn(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),no(this,e,this._integrations),t||to(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!1===t.getOptions().streamGenAiSpans||function(e){return"stream"===e.getOptions().traceLifecycle}(t))return;const n=[],r=[];for(const s of e.spans)s.op?.startsWith("gen_ai.")?n.push(ho(s)):r.push(s);if(0===n.length)return;e.spans=r;const o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...oo()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}(e,this);let r=Cr(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of t.attachments||[])r=_r(r,wr(o));n&&(r=_r(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=hr}=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=Sr(n);return gr({sent_at:new Date(Yt()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Wn(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&&no(e,t,n)}),n}(this,e),to(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0,n=!1;for(const e of o)if(!1===e.mechanism?.handled){n=!0;break}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(gn(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),s=this.getIntegrationNames();return!t.integrations&&s.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Br(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:fr(this,n),...e.sdkProcessingMetadata}),e))}_captureEvent(e,t={},n=Ln(),r=Mn()){return Je&&$o(e)&&it.log(`Captured error event \`${_o(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{Je&&(Ro(e)?it.log(e.message):To(e)?it.warn(e.message):it.warn(e))})}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:s}=o,i=Io(e),a=$o(e),c=`before send for type \`${e.type||"error"}\``,u=void 0===s?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(s),l=Po(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",l),No("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(jt(e))return e.then(e=>{if(!Pt(e)&&null!==e)throw Eo(n);return e},e=>{throw Eo(`${t} rejected with ${e}`)});if(!Pt(e)&&null!==e)throw Eo(n);return e}(function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,ignoreSpans:i}=t,a=(c=t.beforeSendSpan,!(c&&"function"==typeof c&&"_streamed"in c&&c._streamed)&&t.beforeSendSpan);var c;let u=n;if($o(u)&&o)return o(u,r);if(Io(u)){if(a||i){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.["sentry.profile_id"],exclusive_time:i?.["sentry.exclusive_time"],measurements:e.measurements,is_segment:!0}}(u);if(i?.length&&ar({description:t.description,op:t.op,attributes:t.data},i))return null;if(a){const e=a(t);e?u=_n(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}):or()}if(u.spans){const t=[],n=u.spans;for(const e of n)if(i?.length&&ar({description:e.description,op:e.op,attributes:e.data},i))ur(n,e);else if(a){const n=a(e);n?t.push(n):(or(),t.push(e))}else t.push(e);const r=u.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),u.spans=t}}if(s){if(u.spans){const e=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return s(u,r)}}var l;return u}(this,o,e,t),c)}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",l),i){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw No(`${c} returned \`null\`, will not send event.`)}const d=n.getSession()||r.getSession();if(a&&d&&this._updateSessionFromEvent(d,o),a&&"number"==typeof u&&Wt()>u)throw this.recordDroppedEvent("sample_rate","error"),No(`Discarding event because it's not included in the random sample (sampling rate = ${s})`);if(i){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const h=o.transaction_info;if(i&&h&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...h,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(Ro(e)||To(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),Eo(`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===po&&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,gr((r=this._options.tunnel&&Wn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||pn(),discarded_events:n}]]));var n,r,o;this.sendEnvelope(t)}};function Po(e){return"replay_event"===e?"replay":e||"error"}function $o(e){return void 0===e.type}function Io(e){return"transaction"===e.type}function jo(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+Mo(e.attributes)}function Lo(e){let t=0;return e.message&&(t+=2*e.message.length),t+Mo(e.attributes)}function Mo(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Oo(e[0]):Dt(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():nt(()=>{})),Ln().update(t.initialScope);const n=new e(t);return function(e){Ln().setClient(e)}(n),n.init(),n}function qo(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 Bo(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 Fo=100;function zo(e,t){const n=On(),r=Mn();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Fo}=n.getOptions();if(s<=0)return;const i={timestamp:pn(),...e},a=o?nt(()=>o(i,t)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}var Ho=/* @__PURE__ */new WeakMap,Wo=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Bt(this);let r;try{Ho.has(On())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){Ho.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$/],Vo=(e={})=>{let t;return{name:"EventFilters",setup(n){t=Ko(e,n.getOptions())},processEvent:(n,r,o)=>(t||(t=Ko(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&&on(n,t)}(e,t.ignoreTransactions))return Je&&it.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${cn(e)}`),!0}else{if(function(e,t){return!!t?.length&&_o(e).some(e=>on(e,t))}(e,t.ignoreErrors))return Je&&it.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${cn(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: ${cn(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=Go(e);return!!n&&on(n,t)}(e,t.denyUrls))return Je&&it.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${cn(e)}.\nUrl: ${Go(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=Go(e);return!n||on(n,t)}(e,t.allowUrls))return Je&&it.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${cn(e)}.\nUrl: ${Go(e)}`),!0}return!1}(n,t)?null:n)}},Jo=(e={})=>({...Vo(e),name:"InboundFilters"});function Ko(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 Go(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 ${cn(e)}`),null}}function Xo(e,t,n,r,o,s){if(!o.exception?.values||!s||!Ct(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=Qo(e,t,r,s.originalException,n,o.exception.values,i,0))}function Qo(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Ct(r[o])){es(i,a,r);const s=e(t,r[o]),u=c.length;ts(s,o,u,a),c=Qo(e,t,n,r[o],o,[s,...c],s,u)}return Zo(r)&&r.errors.forEach((s,u)=>{if(Ct(s)){es(i,a,r);const l=e(t,s),d=c.length;ts(l,`errors[${u}]`,d,a),c=Qo(e,t,n,s,o,[l,...c],l,d)}}),c}function Zo(e){return Array.isArray(e.errors)}function es(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Zo(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ts(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function ns(e){return function(e){return Ct(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 rs=/* @__PURE__ */new Set([]);var os=/* @__PURE__ */new Set;function ss(){"console"in Ke&&et.forEach(function(e){!os.has(e)&&e in Ke.console&&(os.add(e),Ot(Ke.console,e,function(t){return tt[e]=t,function(...t){const n=t[0],r=tt[e],o=rs.size&&"string"==typeof n&&on(n,rs);o||yt("console",{args:t,level:e}),(!o||Je&&it.isEnabled())&&r?.apply(Ke.console,t)}}))})}function is(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var as=()=>{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&&(!!us(e,t)&&!!cs(e,t))))}(e,t)||!!function(e,t){const n=ls(t),r=ls(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!us(e,t)&&!!cs(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 cs(e,t){let n=pt(e),r=pt(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 us(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 ls(e){return e.exception?.values?.[0]}var ds=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=Ln().getScopeData(),n=Mn().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:o}=er(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!o?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}});function hs(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}var ps=Ke;function fs(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ms(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in ps))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(fs(ps.fetch))return!0;let e=!1;const t=ps.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=fs(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 gs(e,t){const n="fetch",r=gt(n,e);return _t(n,()=>function(e,t=!1){if(t&&!ms())return;Ot(Ke,"fetch",function(t){return function(...n){const r=/* @__PURE__ */new Error,{method:o,url:s}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:ys(t),method:_s(n,"method")?String(n.method).toUpperCase():Mt(t)&&_s(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:ys(t),method:_s(t,"method")?String(t.method).toUpperCase():"GET"}}(n),i={args:n,fetchData:{method:o,url:s},startTimestamp:1e3*fn(),virtualError:r,headers:bs(n)};return e||yt("fetch",{...i}),t.apply(Ke,n).then(async t=>(e?e(t):yt("fetch",{...i,endTimestamp:1e3*fn(),response:t}),t),e=>{yt("fetch",{...i,endTimestamp:1e3*fn(),error:e}),Ct(e)&&void 0===e.stack&&(e.stack=r.stack,Ut(e,"framesToPop",1));const t=On()?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==t&&Ct(e)&&"TypeError"===e.name&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const n=new URL(i.fetchData.url).host;"always"===t?e.message=`${e.message} (${n})`:Ut(e,"__sentry_fetch_url_host__",n)}catch{}throw e})}})}(void 0,t)),r}function _s(e,t){return $t(e)&&!!e[t]}function ys(e){return"string"==typeof e?e:e?_s(e,"url")?e.url:e.toString?e.toString():"":""}function bs(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(Mt(t))return new Headers(t.headers)}catch{}}var vs=Ke;function ws(){try{return vs.document.location.href}catch{return""}}var ks=Ke,xs=0;function Ss(){return xs>0}function Cs(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(Bt(e))return e}catch{return e}const n=function(...n){Ke._sentryWrappedDepth=(Ke._sentryWrappedDepth||0)+1;try{const r=n.map(e=>Cs(e,t));return e.apply(this,r)}catch(r){throw xs++,setTimeout(()=>{xs--}),function(...e){const t=$n(Xe());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&&(un(e,void 0,void 0),ln(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),Hr(r)}),r}finally{Ke._sentryWrappedDepth=(Ke._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}qt(n,e),Ut(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function Es(){const e=ws(),{referrer:t}=ks.document||{},{userAgent:n}=ks.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function Ns(e,t){const n=As(e,t),r={type:$s(t),value:Is(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ts(e,t,n,r){const o=On()?.getOptions().normalizeDepth,s=(i=t,Object.values(i).find(Ct));var i;const a={__serialized__:Qt(t,o)};if(s)return{exception:{values:[Ns(e,s)]},extra:a};const c={exception:{values:[{type:It(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ms(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=As(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Rs(e,t){return{exception:{values:[Ns(e,t)]}}}function As(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&Ds.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 Ds=/Minified React error #\d+;/i;function Ps(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function $s(e){const t=e?.name;return!t&&Ps(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Is(e){const t=e?.message;return Ps(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?ns(t.error):ns(e):"No error message"}function js(e,t,n,r,o){let s;if(Nt(t)&&t.error)return Rs(e,t.error);if(Tt(t)||Et(t,"DOMException")){const o=t;if("stack"in t){s=Rs(e,t);const o=s.exception?.values?.[0];if(r&&n&&o&&!o.stacktrace){const t=As(e,n);t.length&&(o.stacktrace={frames:t},ln(s,{synthetic:!0}))}}else{const t=o.name||(Tt(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Ls(e,i,n,r),un(s,i)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return Ct(t)?Rs(e,t):Pt(t)||It(t)?(s=Ts(e,t,n,o),ln(s,{synthetic:!0}),s):(s=Ls(e,t,n,r),un(s,`${t}`,void 0),ln(s,{synthetic:!0}),s)}function Ls(e,t,n,r){const o={};if(r&&n){const r=As(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),ln(o,{synthetic:!0})}if(At(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 Ms(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(Ft(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return Nt(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 Os=class extends Do{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:ks.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:Ge})),o.version=Ge)}(t,"browser",["browser"],ks.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;ks.document&&ks.document.addEventListener("visibilitychange",()=>{"hidden"===ks.document.visibilityState&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",Bo)}eventFromException(e,t){return function(e,t,n,r){const o=js(e,t,n?.syntheticException||void 0,r);return ln(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Pr(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const s=Ls(e,t,r?.syntheticException||void 0,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Pr(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}};var Us="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,qs=Ke;function Bs(e,t,n){qs.document&&qs.addEventListener(e,t,n)}function Fs(e,t,n){qs.document&&qs.removeEventListener(e,t,n)}var zs={};try{"undefined"!=typeof Node&&(zs.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(zs.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,zs.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,zs.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,zs.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(zs.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Hs(e,t,n){const r=zs[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return"function"==typeof o?o.call(e,n):o}function Ws(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=3;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<r&&(u=Ys(n,l),!("html"===u||s>1&&i+o.length*c+u.length>=d));)o.push(u),i+=u.length,n=Hs(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function Ys(e,t){const n=[],r=Hs(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=Hs(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=>Hs(e,"getAttribute",t)).map(t=>[t,Hs(e,"getAttribute",t)]):null;if(o?.length)o.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=Hs(e,"id");t&&n.push(`#${t}`);const r=Hs(e,"className");if(r&&Rt(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const s of["aria-label","type","name","title","alt"]){const t=Hs(e,"getAttribute",s);t&&n.push(`[${s}="${t}"]`)}return n.join("")}var Vs,Js,Ks,Gs;function Xs(){if(!qs.document)return;const e=yt.bind(null,"dom"),t=Qs(e,!0);qs.document.addEventListener("click",t,!1),qs.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=qs[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__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=Qs(e);s.handler=r,t.call(this,n,r,o)}s.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 Qs(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",sn());const o="keypress"===n.type?"input":n.type;(function(e){if(e.type!==Js)return!1;try{if(!e.target||e.target._sentryId!==Ks)return!1}catch{}return!0})(n)||(e({event:n,name:o,global:t}),Js=n.type,Ks=r?r._sentryId:void 0),clearTimeout(Vs),Vs=qs.setTimeout(()=>{Ks=void 0,Js=void 0},1e3)}}function Zs(e){const t="history";gt(t,e),_t(t,ei)}function ei(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=Gs,o=function(e){try{return new URL(e,qs.location.origin).toString()}catch{return e}}(String(n));if(Gs=o,r===o)return e.apply(this,t);yt("history",{from:r,to:o})}return e.apply(this,t)}}qs.addEventListener("popstate",()=>{const e=qs.location.href,t=Gs;Gs=e,t!==e&&yt("history",{from:t,to:e})}),"history"in ps&&ps.history&&(Ot(qs.history,"pushState",e),Ot(qs.history,"replaceState",e))}var ti={};var ni="__sentry_xhr_v3__";function ri(){if(!qs.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=/* @__PURE__ */new Error;const o=1e3*fn(),s=Rt(n[0])?n[0].toUpperCase():void 0,i=function(e){if(Rt(e))return e;try{return e.toString()}catch{}}(n[1]);if(!s||!i)return e.apply(t,n);t[ni]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[ni];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}yt("xhr",{endTimestamp:1e3*fn(),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,s=t[ni];return s&&Rt(r)&&Rt(o)&&(s.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[ni];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return yt("xhr",{startTimestamp:1e3*fn(),xhr:t}),e.apply(t,n)}})}function oi(e,t=function(e){const t=ti[e];if(t)return t;let n=qs[e];if(fs(n))return ti[e]=n.bind(qs);const r=qs.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(zd){Us&&it.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,zd)}return n?ti[e]=n.bind(qs):n}("fetch")){let n=0,r=0;return go(e,async function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,i);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(zd){throw ti["fetch"]=void 0,zd}finally{n-=s,r--}},fo(e.bufferSize||40))}var si="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function ii(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 ai=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ci=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ui=/\((\S*)(?::(\d+))(?::(\d+))\)/,li=/at (.+?) ?\(data:(.+?),/,di=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,hi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,pi=ut(...[[30,e=>{const t=e.match(li);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=ai.exec(e);if(n){const[,e,t,r]=n;return ii(e,"?",+t,+r)}const r=ci.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=ui.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=fi(r[1]||"?",r[2]);return ii(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=di.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=hi.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]=fi(n,e),ii(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),fi=(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]},mi=1024,gi=(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=gt(t,e);_t(t,ss)}(function(e){return function(t){if(On()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:is(t.level),message:nn(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${nn(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}zo(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(On()!==e)return;let r,o,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>mi&&(si&&it.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=mi),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Ws(t,{keyAttrs:s,maxStringLength:i}),o=function(e,t=5){if(!vs.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}),zo(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),gt("dom",n),_t("dom",Xs)),t.xhr&&function(e){gt("xhr",e),_t("xhr",ri)}(function(e){return function(t){if(On()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[ni];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,u={method:s,url:i,status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:hs(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),zo(d,l)}}(e)),t.fetch&&gs(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},s={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),zo(s,o)}else{const o=t.response,s={...t.fetchData,status_code:o?.status},i={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:hs(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,i),zo(a,i)}}}(e)),t.history&&Zs(function(e){return function(t){if(On()!==e)return;let n=t.from,r=t.to;const o=qo(ks.location.href);let s=n?qo(n):void 0;const i=qo(r);s?.path||(s=o),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),zo({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){On()===e&&zo({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:cn(t)},{event:t})}}(e))}}};var _i="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(","),yi=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&Ot(ks,"setTimeout",bi),t.setInterval&&Ot(ks,"setInterval",bi),t.requestAnimationFrame&&Ot(ks,"requestAnimationFrame",vi),t.XMLHttpRequest&&"XMLHttpRequest"in ks&&Ot(XMLHttpRequest.prototype,"send",wi);const e=t.eventTarget;e&&(Array.isArray(e)?e:_i).forEach(e=>function(e,t){const n=ks[e]?.prototype;if(!n?.hasOwnProperty?.("addEventListener"))return;Ot(n,"addEventListener",function(n){return function(r,o,s){try{"function"==typeof o.handleEvent&&(o.handleEvent=Cs(o.handleEvent,{mechanism:{data:{handler:ht(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,Cs(o,{mechanism:{data:{handler:ht(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),s])}}),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 bi(e){return function(...t){const n=t[0];return t[0]=Cs(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ht(e)}`}}),e.apply(this,t)}}function vi(e){return function(t){return e.apply(this,[Cs(t,{mechanism:{data:{handler:ht(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function wi(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:ht(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Bt(t);return r&&(n.mechanism.data.handler=ht(r)),Cs(t,n)})}),e.apply(this,t)}}var ki=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===ks.document)return void(si&&it.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));Vr({ignoreDuration:!0});let e=!1;(e=>{const t=qs.requestIdleCallback||qs.setTimeout;"hidden"===qs.document?.visibilityState?e():(Bs("visibilitychange",e=(e=>{let t=!1;return()=>{t||(e(),t=!0)}})(e),{once:!0,capture:!0}),Bs("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Fs("visibilitychange",e,{capture:!0}),Fs("pagehide",e,{capture:!0})}))})(()=>{e||(Gr(),e=!0)});const n=Mn();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&Gr())}),"route"===t&&Zs(({from:t,to:n})=>{t!==n&&(Vr({ignoreDuration:!0}),Gr(),e=!0)})}}},xi=()=>({name:"CultureContext",preprocessEvent(e){const t=Si();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=Si();t&&Dr(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function Si(){try{const e=ks.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Ci=(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";gt(t,e),_t(t,vt)}(t=>{const{stackParser:n,attachStacktrace:r}=Ni();if(On()!==e||Ss())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=function(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];0===c.length&&c.push({colno:r,lineno:n,filename:Ti(t)??ws(),function:"?",in_app:!0});return e}(js(n,c||o,void 0,r,!1),s,i,a);u.level="error",Wr(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Ei("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";gt(t,e),_t(t,kt)}(t=>{const{stackParser:n,attachStacktrace:r}=Ni();if(On()!==e||Ss())return;const o=function(e){if(Dt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),s=Dt(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:js(n,o,void 0,r,!0);s.level="error",Wr(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Ei("onunhandledrejection"))}}};function Ei(e){si&&it.log(`Global Handler attached: ${e}`)}function Ni(){return On()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Ti(e){if(Rt(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&-1!==s){const t=e.slice(s+1);i=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}(e,!1)}>`:e}var Ri=()=>({name:"HttpContext",preprocessEvent(e){if(!ks.navigator&&!ks.location&&!ks.document)return;const t=Es(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSpan(e){if(!ks.navigator&&!ks.location&&!ks.document)return;const t=Es();Dr(e,{[Ar]: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}})}}),Ai=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){Xo(Ns,o.getOptions().stackParser,n,t,e,r)}}},Di=/^HTML(\w*)Element$/;function Pi(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(Di.test(t))return`[HTMLElement: ${Ws(e)}]`}}function $i(){return!!function(){if(void 0===ks.window)return!1;const e=ks;if(e.nw)return!1;if(!(e.chrome||e.browser)?.runtime?.id)return!1;const t=ws();return!(ks===ks.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}()&&(si&&nt(()=>{}),!0)}function Ii(e={}){const t=!e.skipBrowserExtensionCheck&&$i();let n=null==e.defaultIntegrations?[Jo(),Wo(),ds(),yi(),gi(),Ci(),Ai(),as(),Ri(),xi(),ki()]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(o=e.stackParser||pi,Array.isArray(o)?ut(...o):o),integrations:eo({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||oi};var o;return Vt=Pi,Uo(Os,r)}function ji(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){Mn().setContext(e,t)}("bukazu",{portal_code:e.portalCode,object_code:e.objectCode??null,locale:e.locale??null,url:t??null})}function Li(e){Hr(e)}function Mi(e){!function(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;Ln().captureMessage(e,n,r)}(e,"error")}var Oi=/* @__PURE__ */new WeakSet;function Ui(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 qi(e){const t=Ui(e.errors);return"object"!=typeof e.errors||null===e.errors||Oi.has(e.errors)||(Oi.add(e.errors),Li(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 Bi=["en","nl","de","fr","es","it"];function Fi(e){if(!e)return"en";const t=e.split(/[-_]/)[0].toLowerCase();return function(e){return Bi.includes(e)}(t)?t:"en"}var zi=e=>"[object Object]"===Object.prototype.toString.call(e),Hi=n({locale:"nl",portalCode:"",objectCode:"",apiUrl:"https://api.bukazu.com"}),Wi="bukazuCurrency";function Yi(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 Vi=n({currency:void 0,setCurrency:()=>{},allowed:[],multiCurrency:!1});function Ji({currencies:e,children:t}){const n=i(()=>Yi(e),[e]),[o,s]=u(()=>{const e=function(){try{return window.localStorage.getItem(Wi)}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(Wi,e)}catch{}}(e),s(e))},[n]),c=n.multi_currency&&n.allowed.length>1,l=i(()=>({currency:c?o:void 0,setCurrency:a,allowed:n.allowed,multiCurrency:c}),[c,n.allowed,o,a]);/* @__PURE__ */
|
|
38
|
-
return d(Vi.Provider,{value:l,children:t})}function Ki(){return o(Vi)}function Gi(){const{currency:e,setCurrency:t,allowed:n,multiCurrency:r}=Ki();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 Xi=class extends Error{name="KyError";get isKyError(){return!0}},Qi=class extends Xi{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}},Zi=class extends Xi{name="NetworkError";request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}},ea=e=>null!==e&&"object"==typeof e,ta=e=>ea(e)&&!Array.isArray(e),na=e=>"number"==typeof e&&e>=0,ra=Object.prototype.toString,oa=e=>e instanceof Error||"[object Error]"===ra.call(e),sa=e=>e instanceof globalThis.Request||"[object Request]"===ra.call(e),ia=e=>e instanceof globalThis.Response||"[object Response]"===ra.call(e),aa=class e extends Error{static wrap(t){return oa(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}},ca=class extends Xi{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&&!na(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&&!sa(e.request))throw new TypeError("The `ky.retry()` `request` option must be a `Request`");const n=void 0===e?.cause?void 0:aa.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}},ua=class extends Error{name="SchemaValidationError";issues;constructor(e){super("Response schema validation failed"),this.issues=e}},la=class extends Xi{name="TimeoutError";request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}},da=(()=>{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})(),ha="function"==typeof globalThis.AbortController,pa="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,fa="function"==typeof globalThis.ReadableStream,ma="function"==typeof globalThis.FormData,ga=["get","post","put","patch","head","delete","query"],_a={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},ya=()=>Object.keys(_a).filter(e=>"bytes"!==e||"function"==typeof globalThis.Response?.prototype?.bytes),ba=2147483647,va=Symbol.for("ky.stop"),wa=class{get isRetryMarker(){return!0}options;constructor(e){this.options=e}},ka=e=>e instanceof wa||!0===e?.isRetryMarker,xa=e=>new wa(e),Sa=["onUploadProgress","onDownloadProgress","timeout","fetch","throwHttpErrors"],Ca={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},Ea={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},Na=class extends Xi{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,Ra=/* @__PURE__ */new WeakMap,Aa=/* @__PURE__ */new Set([101,103,204,205,304]),Da=(e,t)=>{const n=e?.body;n&&n!==t?.body&&n.cancel().catch(()=>{})},Pa=e=>Math.max(0,Number(e.get("content-length"))||0),$a=e=>e.replaceAll(/\r\n|\r|\n/g,"\r\n"),Ia=e=>e.replaceAll("\n","%0A").replaceAll("\r","%0D").replaceAll('"',"%22"),ja=(e,t,n)=>{let r,o=0;return e.pipeThrough(new TransformStream({transform(e,s){if(s.enqueue(e),r){o+=r.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),n?.({percent:e,totalBytes: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)}}))},La=(e,t,n=(t.body?Ra.get(t.body):void 0))=>{const r=e.clone.bind(e);if(e.body&&n){Ra.set(e.body,n);for(const t of Object.keys(_a)){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&&Ra.set(e.body,n),La(t,e)},writable:!0,configurable:!0}}),e},Ma=e=>{const{body:t}=e;if(t&&!e.bodyUsed&&!t.locked&&!Aa.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($a(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($a(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)||Pa(e.headers);return new Request(e,{duplex:"half",body:ja(e.body,r,t),headers:e.headers,referrer:e.referrer,referrerPolicy:e.referrerPolicy})},Ua=Symbol.for("ky.replaceOption"),qa=e=>ea(e)&&!0===e[Ua]?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},Ba=(...e)=>{for(const t of e)if(void 0!==t&&!ta(t))throw new TypeError("The `options` argument must be an object");return rc({},...e)},Fa=(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},za=e=>{if(!ta(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},Ha=e=>za(e)||Array.isArray(e),Wa=e=>{if(e instanceof URLSearchParams){const t=new URLSearchParams(e),n=e[Qa];return n&&(t[Qa]=new Set(n)),t}return Array.isArray(e)?[...e]:za(e)?{...e}:e},Ya=e=>Array.isArray(e)?e.map(e=>Wa(e)):Wa(e),Va=(e,t=/* @__PURE__ */new WeakMap)=>{if(!Ha(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(Va(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:Va(e[o],t),writable:!0,enumerable:!0,configurable:!0});return r},Ja=e=>{if(za(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},Ka=(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 Ga(e,t,n){if(Object.hasOwn(t,n)&&void 0===t[n])return[];const{isReplace:r,value:o}=qa(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??[]]:rc(e[n]??[],o??[])}var Xa=(e={},t={})=>{if(!ta(t))throw new TypeError("The `hooks` option must be an object");return{init:Ga(e,t,"init"),beforeRequest:Ga(e,t,"beforeRequest"),beforeRetry:Ga(e,t,"beforeRetry"),beforeError:Ga(e,t,"beforeError"),afterResponse:Ga(e,t,"afterResponse")}},Qa=Symbol("deletedParameters"),Za=/* @__PURE__ */new Set(["json","context"]),ec=(e,t)=>{if(!Ha(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 s=t(o);s!==o&&(n??=Array.isArray(e)?[...e]:{...e},n[r]=s)}return n??e})(e,e=>ec(qa(e).value,t));return t.set(e,n),n},tc=(e,t)=>{const n=new URLSearchParams,r=/* @__PURE__ */new Set;for(const o of[e,t])if(o instanceof URLSearchParams){const e=o[Qa];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}=qa(e[1]);r&&n.delete(t),n.append(t,String(o))}else if(ea(o))for(const[e,t]of Object.entries(o)){const{isReplace:o,value:s}=qa(t);void 0===s?(n.delete(e),r.add(e)):(o&&n.delete(e),n.append(e,String(s)))}else{const e=new URLSearchParams(o);for(const[t,r]of e.entries())n.append(t,r)}return r.size>0&&(n[Qa]=r),n},nc=(e,...t)=>{let n,r={},o={},s={};const i=[];for(const a of t)if(Array.isArray(a))Array.isArray(r)||(r=[]),r=[...r,...a];else if(ea(a)){for(let[t,o]of Object.entries(a)){const s=qa(o),{isReplace:a}=s;o=s.value;const c=e&&"signal"===t;if(c&&(a||void 0===o)&&(i.length=0),c&&o instanceof globalThis.AbortSignal)i.push(o);else{if(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&&!ta(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):tc(n,o)}else{if(e&&"retry"===t&&void 0!==o&&"number"!=typeof o&&!ta(o))throw new TypeError("`retry` must be a number or an object");e&&"retry"===t&&!a&&(ea(o)&&"number"==typeof r[t]?r={...r,[t]:{limit:r[t]}}:"number"==typeof o&&ea(r[t])&&(o={limit:o})),e&&"retry"===t&&za(o)&&(a||!Ha(r[t]))?o=nc(!1,{},o):!a&&Ha(r[t])&&Ha(o)&&Array.isArray(r[t])===Array.isArray(o)&&(o=nc(!1,r[t],o)),r={...r,[t]:o}}}}if(e&&void 0!==a.hooks){const{value:e,isReplace:t}=qa(a.hooks);s=Xa(t?{}:s,e),r.hooks=s}if(e&&ea(a.headers)){const{value:e,isReplace:t}=qa(a.headers);o=Ka(t?{}:o,e),r.headers=o}}if(void 0!==n&&(r.searchParams=n),i.length>0&&(1===i.length?r.signal=i[0]:r.signal=pa?AbortSignal.any(i):i.at(-1)),e)for(const[a,c]of Object.entries(r))Za.has(a)||(r[a]=ec(c,/* @__PURE__ */new Map));return r},rc=(...e)=>nc(!0,...e),oc=e=>ga.includes(e.toLowerCase())?e.toUpperCase():e,sc=/* @__PURE__ */new Set([...ga,"options","trace"]),ic=e=>sc.has(e.toLowerCase())?e.toLowerCase():e,ac={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},cc=(e={})=>{if("number"==typeof e&&(e={limit:e}),!ta(e))throw new TypeError("`retry` must be a number or an object");const t={...ac,...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(!na(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 uc(e,{signal:t}){return new Promise((n,r)=>{function o(){clearTimeout(s),r(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const s=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e)})}var lc=/* @__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 dc(e){if(!e||!oa(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(")"))||lc.has(t))}var hc=(e,t)=>e instanceof t||!0===e?.isKyError&&e?.name===t.name;function pc(e){return hc(e,ca)}var fc=/^\d+$/,mc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],gc=/^(?: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$/,_c=/^(?: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$/,yc=/^(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})$/,bc=({year:e,month:t,day:n,hours:r,minutes:o,seconds:s})=>{const i=mc.indexOf(t),a=Number(n),c=Number(r),u=Number(o),l=Number(s);if(-1===i||c>23||u>59||l>60)return;const d=Math.min(l,59),h=new Date(Date.UTC(e,i,a,c,u,d));h.setUTCFullYear(e);const p=h.getTime();return h.getUTCFullYear()===e&&h.getUTCMonth()===i&&h.getUTCDate()===a&&h.getUTCHours()===c&&h.getUTCMinutes()===u&&h.getUTCSeconds()===d?60===l?p+1e3:p:void 0},vc=(e,t)=>e[t],wc=({value:e,allowTimestamp:t})=>{if(fc.test(e)){let n=1e3*Number(e);return t&&Number(e)>=1e9&&(n-=Date.now()),Math.max(0,n)}const n=(e=>{const t=gc.exec(e);if(t)return bc({year:Number(vc(t,3)),month:vc(t,2),day:vc(t,1),hours:vc(t,4),minutes:vc(t,5),seconds:vc(t,6)});const n=_c.exec(e);if(n){const e=/* @__PURE__ */new Date,t=Number(vc(n,3)),r=100*Math.floor(e.getUTCFullYear()/100)+t,o=Date.UTC(e.getUTCFullYear()+50,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());let s;for(const i of[r-100,r,r+100]){const e=bc({year:i,month:vc(n,2),day:vc(n,1),hours:vc(n,4),minutes:vc(n,5),seconds:vc(n,6)});void 0!==e&&e<=o&&(s=e)}return s}const r=yc.exec(e);if(r){const[e,t,n]=vc(r,4).split(":");return bc({year:Number(vc(r,5)),month:vc(r,2),day:vc(r,3).trim(),hours:e,minutes:t,seconds:n})}})(e);if(void 0!==n)return Math.max(0,n-Date.now())},kc=Symbol("timedOut"),xc=()=>globalThis.performance?.now()??Date.now(),Sc=(e,t)=>Promise.race([e,new Promise(n=>{const r=setTimeout(()=>{n(kc)},t);e.finally(()=>{clearTimeout(r)}).catch(()=>{})})]),Cc=e=>{(ia(e)||sa(e))&&Da(e)},Ec=e=>{e.then(e=>{Cc(e)}).catch(()=>{})},Nc=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")??"",s=Nc(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),i=[];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(()=>{});i.push(s.decode(t,{stream:!0}))}}catch(e){if(function(e){return hc(e,Na)}(e))throw e;return}return i.push(s.decode()),i.join("")})(),u=await Sc(c,t);return u===kc&&r.cancel().catch(()=>{}),u},Rc=(e,t)=>{if(!1!==e){if(!na(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`)}},Ac=({throwHttpErrors:e=!0,timeout:t=1e4,fetch:n=globalThis.fetch.bind(globalThis)})=>({throwHttpErrors:e,timeout:t,fetch:n}),Dc=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")},Pc=/^[\0-\u0020]+/g,$c=/[\t\n\r]/g,Ic=/^[a-z][\d+.a-z-]*:/i,jc=/^https?:(?!\/\/)/i,Lc=(e,t,n)=>{if("string"!=typeof e)return e;if(t&&(e=`${t.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`),n){const t=(e=>e.replaceAll(Pc,"").replaceAll($c,""))(e);if(jc.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},Mc=(e,t)=>{e.searchParams.has(t)&&e.searchParams.delete(t)};var Oc=async(e,t)=>{const n=ea(t)||"function"==typeof t?t["~standard"]:void 0;if(!ea(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 ua(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:Ka({},e.headers??{}),context:{...e.context},json:Va(e.json),searchParams:Ya(e.searchParams),retry:Va(e.retry)}}(n):n;for(const e of r)e(o);const s=new e(t,o),i=(async()=>{let e;try{return e=await s.#e(),e}catch(t){return await s.#t(t)}finally{const t=s.#n;Da(t,e),t&&s.request!==t&&Da(s.request,e)}})();for(const e of ya()){const t=_a[e];i[e]=async n=>{s.request!==s.#n&&s.request.headers.set("accept",s.request.headers.get("accept")||t);const r=await i;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 s.#r(async()=>r[e](),r);const o=await s.#r(async()=>r.text(),r),a=s.#o(r);let c;try{c=await s.#s(async()=>{const e=""!==o||void 0===n||s.#i.parseJson?await s.#a(o,a,r):void 0;return void 0===n?e:await Oc(e,n)})}catch(u){throw s.#c?.aborted&&await s.#t(s.#c.reason,a),u}return c===kc&&await s.#t(new la(a),a),c}}return i}request;#u;#l=0;#d;#i;#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 i of["headers","method","prefix","baseUrl","referrer","referrerPolicy"])if(null===t[i])throw new TypeError(`The \`${i}\` option must not be \`null\`. Use \`undefined\` to clear it.`);if(void 0!==t.context&&!ta(t.context))throw new TypeError("The `context` option must be an object");if(this.#i={...t,headers:Fa(e.headers,t.headers),hooks:Xa({},t.hooks),method:oc(t.method??e.method??"GET"),referrer:t.referrer??e.referrer,referrerPolicy:t.referrerPolicy??e.referrerPolicy,prefix:String(t.prefix||""),retry:cc(t.retry),...Ac(t),totalTimeout:r,maxResponseSize:n,context:t.context??{}},Dc(this.#i),Rc(this.#i.timeout,"timeout"),Rc(r,"totalTimeout"),this.#d=this.#i.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=Lc(e,this.#i.prefix,this.#i.baseUrl),ha&&pa&&(this.#c=this.#i.signal??this.#h?.signal,this.#u=new globalThis.AbortController,this.#i.signal=this.#v()),da&&(this.#i.duplex="half");const o=void 0!==t.headers&&Fa({},t.headers).has("content-type");void 0!==this.#i.json&&(this.#i.body=this.#i.stringifyJson?.(this.#i.json)??JSON.stringify(this.#i.json),o||this.#i.headers.set("content-type","application/json")),e instanceof globalThis.Request&&(ma&&this.#i.body instanceof globalThis.FormData||this.#i.body instanceof URLSearchParams)&&!o&&this.#i.headers.delete("content-type"),this.request=new globalThis.Request(e,this.#i),this.#p="function"==typeof globalThis.ReadableStream&&this.#i.body instanceof globalThis.ReadableStream;const{searchParams:s}=this.#i;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[Qa]?.size):"object"==typeof e?Object.keys(e).length>0:"string"==typeof e?e.trim().length>0:Boolean(e)})(s)){const e=new URL(this.request.url);if(((e,t)=>{const n=t?.[Qa];if(n)for(const r of n)Mc(e,r);if("string"==typeof t){const n=t.replace(/^\?/,"");""!==n&&(e.search=e.search?`${e.search}&${n}`:`?${n}`)}else if(!ta(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?Mc(e,r):e.searchParams.append(r,o)})(e,s),e.href!==this.request.url){const{body:t,cache:n,credentials:r,integrity:o,keepalive:s,mode:i,redirect:a,referrer:c,referrerPolicy:u}=this.request,l=da&&!s&&"no-cors"!==i;this.request=new globalThis.Request(e,{...this.#i,cache:n,credentials:r,integrity:o,keepalive:s,mode:i,redirect:a,referrer:c,referrerPolicy:u,body:this.#i.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=cc(this.#i.retry).limit);let t=e??await this.#k();for(;;){if(void 0===t)return;const e=this.#_.has(t);let r;try{t=await this.#x(t)}catch(n){if(!pc(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 Qi(n,this.#o(n),this.#C());if(o.data=await this.#E(n),this.#N(),this.#T(),e)throw o;r=o}t=await this.#R(r)}if(this.#A(t),this.#i.onDownloadProgress){if(!fa)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const e=((e,t)=>{const n=Ma(e);if(!n)return e;const r=e.headers.get("content-encoding")?.toLowerCase(),o=Boolean(r)&&"identity"!==r?0:Pa(e.headers),s=ja(n,o,t);return La(new Response(s,e),e)})(t,this.#i.onDownloadProgress);return this.#D(e,this.#o(t)),this.#A(e)}return t}#P(e,t){const n=e.delay(this.#l+1);if(!na(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#$(e){const t=cc(this.#i.retry);if(this.#l>=Math.min(t.limit,this.#d))throw e;const n=aa.wrap(e);if(pc(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.#s(async()=>o({error:n,retryCount:this.#l+1}));if(this.#N(),t===kc)throw new la(this.#I);if(!1===t)throw e;r=!0===t}if(function(e){return hc(e,la)}(e)){if(!r&&!t.retryOnTimeout)throw e;return this.#P(t,e)}if(function(e){return hc(e,Qi)}(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=wc(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 hc(e,Zi)}(e))throw e;return this.#P(t,e)}#A(e){if(!this.#i.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.#D(n(),t)),e}async#t(e,t=this.#I){if(!oa(e))throw e;if(this.#f.has(e))throw e;let n=e;for(const r of this.#i.hooks.beforeError){const e=await r({request:t,options:this.#C(),error:n,retryCount:this.#l});oa(e)&&(n=e)}throw n}async#E(e){const t=this.#o(e),n=({fromTotalTimeout:e})=>{if(e)throw new la(t);this.#T(t)},r=this.#j(t),o=await Tc(e,r.milliseconds);if(o===kc)return void n(r);if(!o)return;if(!Nc(e.headers.get("content-type")??""))return o;const s=this.#j(t),i=await Sc(Promise.resolve().then(()=>this.#a(o,t,e)),s.milliseconds).catch(()=>{});if(i!==kc)return i;n(s)}#j(e){const t=!1===this.#i.timeout?1e4:this.#i.timeout,n=this.#L();if(0===n)throw new la(e);return{milliseconds:Math.min(t,n),fromTotalTimeout:n<=t}}#M(){const e=this.#L();if(0===e)throw new la(this.#I);const t=Math.min(!1===this.#i.timeout?Number.POSITIVE_INFINITY:this.#i.timeout,e);return t===Number.POSITIVE_INFINITY?void 0:t}async#r(e,t){const n=this.#o(t);let r;try{r=this.#M()}catch(i){await this.#t(i,n)}const o=e();let s;try{s=void 0===r?await o:await Sc(o,r)}catch(i){this.#c?.aborted&&await this.#t(this.#c.reason,n),0!==this.#L()&&(dc(i)&&await this.#t(new Zi(n,{cause:i}),n),await this.#t(i,n)),s=kc}return this.#c?.aborted&&await this.#t(this.#c.reason,n),s!==kc&&0!==this.#L()||(this.#u?.abort(),await this.#t(new la(n),n)),s}async#s(e){const t=this.#c;t?.throwIfAborted();const n=this.#L();if(0===n)return this.#u?.abort(),kc;let r,o,s;try{const i=new Promise((e,n)=>{t&&(o=()=>{n(t.reason)},t.addEventListener("abort",o,{once:!0}))});if(s=e(),n===Number.POSITIVE_INFINITY)return await Promise.race([s,i]);const a=new Promise(e=>{r=setTimeout(()=>{e(kc)},n)}),c=await Promise.race([s,a,i]);return c===kc||0===this.#L()?(this.#u?.abort(),c===kc?Ec(s):Cc(c),kc):c}catch(i){if(t?.aborted&&(s&&Ec(s),t.throwIfAborted()),0===this.#L())return this.#u?.abort(),kc;throw i}finally{clearTimeout(r),o&&t?.removeEventListener("abort",o)}}#a(e,t,n){const{parseJson:r}=this.#i;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.#i;try{return"function"==typeof t?t(e.status):t}catch(n){throw Da(e),n}}get#I(){return this.#n??this.request}#T(e=this.#I){if(0===this.#L())throw new la(e)}async#w(){for(const e of this.#i.hooks.beforeRequest){const t=await this.#s(async()=>e({request:this.request,options:this.#C(),retryCount:0}));if(t===kc)throw new la(this.#I);if(sa(t))this.#O(this.#U(t));else if(ia(t))return this.#_.add(t),t}}async#x(e){const t=this.#o(e);e=this.#q(e);for(const r of this.#i.hooks.afterResponse){const o=this.#D(e.clone(),t);let s;this.#A(o);try{if(s=await this.#s(async()=>r({request:this.request,options:this.#C(),response:o,retryCount:this.#l})),s===kc)throw new la(this.#I);if(ka(s))throw new ca(s.options)}catch(n){throw Da(o),Da(e),n}const i=ia(s)?this.#D(s,t):e;Da(o,i),Da(e,i),i!==e&&(e=this.#q(i))}return e}async#k(){try{return await this.#B()}catch(e){return this.#R(e)}}async#R(e){this.#N();const t=Math.min(await this.#$(e),ba),n={signal:this.#c},r=this.#L();if(0===r)throw new la(this.#I);if(t>=r)throw await uc(r,n),new la(this.#I);await uc(t,n),this.#T(),this.#u?.signal.aborted&&(this.#u=new globalThis.AbortController,this.#i.signal=this.#v(),this.#O(this.#U(this.request),this.#p)),pc(e)&&e.customRequest&&this.#O(this.#U(e.customRequest));for(const s of this.#i.hooks.beforeRetry){let t;try{t=await this.#s(async()=>s({request:this.request,options:this.#C(),error:aa.wrap(e),retryCount:this.#l+1}))}catch(o){throw this.#N(),oa(o)&&o!==e&&this.#f.add(o),o}if(t===kc)throw new la(this.#I);if(sa(t)){this.#O(this.#U(t));break}if(ia(t))return this.#_.add(t),this.#l++,t;if(t===va)return;ta(t)&&this.#F(t.options)}return this.#T(),this.#l++,this.#k()}async#B(){Da(this.#n,this.request);const e=(e=>{const t={};for(const n of Object.keys(e))Object.hasOwn(Ea,n)||Object.hasOwn(Ca,n)||Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0,configurable:!0});return t})(this.#i);this.#d=cc(this.#i.retry).limit;const t=this.#d>0?this.#U(this.request.clone()):void 0,n=this.#z(this.request);this.#n=n,t&&(this.request=t,this.#p=!0);try{const t=this.#M(),{fetch:r}=this.#i,o=void 0===t?await r(n,e):await async function(e,t,n,r){let o,s=!1;try{return await new Promise((i,a)=>{o=setTimeout(()=>{s=!0,n?.abort(),a(new la(e))},r.timeout);const{fetch:c}=r;c(e,t).then(e=>{s?Da(e):i(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(),Da(o),new la(n);return this.#D(o,n)}catch(r){if(this.#N(),0===this.#L())throw this.#u?.abort(),new la(n);if(dc(r))throw new Zi(n,{cause:r});throw r}}#N(){this.#c?.throwIfAborted()}#L(){return Math.max(0,this.#g-xc())}#F(e){if(!ta(e))throw new TypeError("The `options` returned from a `beforeRetry` hook must be an object");for(const r of Object.keys(e))if(!Sa.includes(r))throw new TypeError(`The \`${r}\` option cannot be changed from a \`beforeRetry\` hook`);const t={...this.#i,...e},n={...t,...Ac(t)};Dc(n),Rc(n.timeout,"timeout"),Object.assign(this.#i,n),this.#m=void 0}#C(){if(!this.#m){const{hooks:e,json:t,parseJson:n,stringifyJson:r,searchParams:o,timeout:s,totalTimeout:i,maxResponseSize:a,throwHttpErrors:c,fetch:u,...l}=this.#i;this.#m=Object.freeze(l)}return this.#m}#O(e,t=!1){this.#p&&Da(this.request,e),this.#m=void 0,this.request=e,this.#p=t}#U(e){return this.#i.signal&&e instanceof globalThis.Request?new globalThis.Request(e,{signal:this.#i.signal,referrer:e.referrer,referrerPolicy:e.referrerPolicy}):e}#o(e){return this.#y.get(e)??this.#I}#D(e,t){return this.#y.set(e,t),e}#q(e){const t=this.#o(e);return this.#D(((e,t,n)=>{const r=Ma(e);if(!r||n===Number.POSITIVE_INFINITY)return e;let o,s=0;const i=Ra.get(r),a=r.pipeThrough(new TransformStream({transform(e,r){if(s+=e.byteLength,s>n)throw o=new Na(t,n),o;r.enqueue(e)}}));return La(new Response(a,e),e,()=>o??i?.())})(e,t,this.#i.maxResponseSize),t)}#z(e){return this.#i.onUploadProgress&&da&&e.body?Oa(e,this.#i.onUploadProgress,this.#i.body):e}},qc=(e,t)=>{try{return Uc.create(e,t())}catch(n){const e=Promise.reject(n);for(const t of ya())e[t]=async()=>e;return e}},Bc=e=>{const t=(t,n)=>qc(t,()=>Ba(e,n));for(const n of ga)t[n]=(t,r)=>qc(t,()=>Ba(e,r,{method:n}));return t.create=e=>Bc(Ba(e)),t.extend=t=>("function"==typeof t&&(t=t(Ba(Va(e)))),Bc(Ba(e,t))),t.stop=va,t.retry=xa,t},Fc=Bc(),zc=/* @__PURE__ */new Map,Hc=Fc.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=zc.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=zc.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();zc.set(e.url,{etag:n,lastModified:r,body:o})}}return t}]}});async function Wc({apiUrl:e,locale:t,portalCode:n,params:r,signal:o}){const s=function({apiUrl:e,portalCode:t,params:n}){const r=new URL("/portal_api/v1/accommodations",new URL(e).origin);return r.search=new URLSearchParams({portal_code:t,...n}).toString(),r.toString()}({apiUrl:e,portalCode:n,params:r});try{return await Hc.get(s,{headers:{locale:t},signal:o}).json()}catch(i){if(i instanceof Qi)throw new Error(`Search request failed (${i.response.status})`);throw i}}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 Vc(e,t,n){const r=Number(n);r&&(e[t]=String(r))}var Jc=/^\d{4}-\d{2}-\d{2}$/,Kc=/^\d{1,10}$/,Gc="\\|[\\p{L}\\p{M}\\d '’.()-]{1,100}",Xc=new RegExp(`^\\d{1,10}${Gc}$`,"u"),Qc=new RegExp(`^\\d{1,10}${Gc}${Gc}$`,"u");function Zc(e){return e&&Jc.test(e)?e:void 0}function eu(e){return"number"==typeof e?Number.isSafeInteger(e)&&e>=0:"string"==typeof e&&Kc.test(e)}function tu(e){return t=>"string"==typeof t&&e.test(t)}var nu={countries:{format:eu,list:!0},regions:{format:tu(Xc),list:!0},cities:{format:tu(Qc),list:!0},persons_max:{format:eu,list:!1},bedrooms_min:{format:eu,list:!1},bathrooms_min:{format:eu,list:!1},weekprice_max:{format:eu,list:!1}};function ru(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 ou(e,t){const n=parseInt(String(e.persons_min??""),10),r=function(e){const t={};for(const[r,o]of Object.entries(nu)){const n=ru(e[r],o);void 0!==n&&(t[r]=n)}const n=Yc(e).filter(eu);return n.length>0&&n.length<=50&&(t.properties=n),t}(e);return{arrival:Zc(e.arrival_date),departure:Zc(e.departure_date),persons:n>0?n:void 0,filters:Object.keys(r).length>0?r:void 0,result_count:t}}var su=/* @__PURE__ */new Set;function iu(e){return e.isConnected&&"true"===e.getAttribute("data-consent")}function au(){return"undefined"!=typeof window&&!0===window.bukazuConsent||[...su,...document.querySelectorAll(".bukazu-app, #bukazu-app")].some(iu)}var cu="https://api.bukazu.com/tracking",uu="bu_portal_session",lu=/^[A-Za-z0-9_.-]{1,64}$/,du="",hu=null,pu=!1,fu=null;function mu(){return au()&&ku(uu)||du}function gu(e){return"string"==typeof e&&lu.test(e)}async function _u(e){try{!mu()&&fu&&await fu;const t=async function(e){const t=au(),n=mu(),r={...e,interaction_info:yu(e.interaction_info),url:window.location.href,consented:t};n&&(r.session_identifier=n);const o=t&&!pu&&!ku(uu);o&&(r.attribution=function(){if(hu)return hu;const e=new URLSearchParams(window.location.search),t={landing_path:window.location.pathname,device_class:bu(window.innerWidth)},n=function(){const e=vu();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 hu=t,t}(),pu=!0);let s="";try{s=(await Hc.post(cu,{json:r}).text()).trim()}finally{!s&&o&&(pu=!1)}if(!s)return;du=s,au()&&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`}(uu,s,14)}(e);if(!mu()&&!fu){const e=()=>{fu=null};fu=t.then(e,e)}await t}catch{}}function yu(e){const t={};for(const[n,r]of Object.entries(e))null!=r&&""!==r&&(t[n]=r);return t}function bu(e){return e<768?"mobile":e<1024?"tablet":"desktop"}function vu(){try{return document.referrer?new URL(document.referrer).host:""}catch{return""}}function wu(){const e=vu();return e?e===window.location.host?"search":"external":"direct"}function ku(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(Hi),{currency:b}=Ki(),[v,w]=u({status:"loading"}),k=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),Vc(o,"persons_min",e.persons_min),Vc(o,"persons_max",e.persons_max),Vc(o,"bedrooms_min",e.bedrooms_min),Vc(o,"bathrooms_min",e.bathrooms_min),Vc(o,"weekprice_max",e.weekprice_max);const s=Yc(e);return s.length>0&&(o.properties=s.join(",")),e.arrival_date&&(o.arrival_date=e.arrival_date,e.departure_date?(o.starts_at=e.arrival_date,o.ends_at=e.departure_date,Vc(o,"no_nights_min",Ce(le(e.departure_date),le(e.arrival_date)))):o.no_nights_min="1"),o}(e,{limit:n,skip:r,currency:b})),x=i(()=>JSON.parse(k),[k]),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,_u({portal_code:g,locale:y,interaction_type:"search",interaction_info:ou(C.current,T.current)}))};if(s(()=>{if(E.current===S)return;const e=setTimeout(()=>{N.current=S,R()},1e3);return()=>{clearTimeout(e),N.current=null}},[S,g,y]),s(()=>{const e=new AbortController;return T.current=null,w({status:"loading"}),Wc({apiUrl:_,locale:y,portalCode:g,params:x,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,x]),"loading"===v.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(p,{})});if("error"===v.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(qi,{errors:v.error})});const{items:A,meta:D}=v.response,P=f??t.options.filtersForm.mode,$=/* @__PURE__ */d(He,{totalCount:D.total_count,activePage:l,limit:n,onPageChange:a});/* @__PURE__ */
|
|
39
|
-
return h("div",{id:"results",className
|
|
40
|
-
/* @__PURE__ */h("div",{className:"bu-results-toolbar",children:[/* @__PURE__ */d(
|
|
41
|
-
return h("div",{id:"search-page",className:"right"===s.filtersForm.location?"bu-reverse":"top"===s.filtersForm.location?"bu-column":"",children:[/* @__PURE__ */d(qe,{PortalSite:i,filters:e,onFilterChange:this.onFilterChange,options:s}),/* @__PURE__ */d(
|
|
42
|
-
return h(l,{children:[!o&&t&&/* @__PURE__ */d("button",{type:"button",className:"info-button",onClick:()=>i(!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
|
|
43
|
-
return d(
|
|
44
|
-
/* @__PURE__ */d("div",{className:"legend",children:n}),o,t&&/* @__PURE__ */d(
|
|
45
|
-
return d(l,{children:e.allow_option&&/* @__PURE__ */d("div",{children:/* @__PURE__ */h(
|
|
36
|
+
/* @__PURE__ */d("rect",{x:"11",y:"11",width:"6",height:"6",rx:"1"})]}),Ve=({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 Je({mode:e,onChange:t}){/* @__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(Ye,{})}),/* @__PURE__ */d("button",{type:"button","aria-pressed":"list"===e,"aria-label":ne("list_view"),onClick:()=>t("list"),children:/* @__PURE__ */d(Ve,{})})]})}var Ke="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ge=globalThis,Xe="11.8.0";function Qe(){return Ze(Ge),Ge}function Ze(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||"11.8.0",t[Xe]=t["11.8.0"]||{}}function et(e,t,n=Ge){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Xe]=r["11.8.0"]||{};return o[e]||(o[e]=t())}var tt=["debug","info","warn","error","log","assert","trace"],nt={};function rt(e){if(!("console"in Ge))return e();const t=Ge.console,n={},r=Object.keys(nt);r.forEach(e=>{const r=nt[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function ot(){return it().enabled}function st(e,...t){Ke&&ot()&&rt(()=>{Ge.console[e](`Sentry Logger [${e}]:`,...t)})}function it(){return Ke?et("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var at={enable:function(){it().enabled=!0},disable:function(){it().enabled=!1},isEnabled:ot,log:function(...e){st("log",...e)},warn:function(...e){st("warn",...e)},error:function(...e){st("error",...e)}},ct=/\(error: (.*)\)/,ut=/captureMessage|captureException/;function lt(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],s=e.split("\n");for(let i=n;i<s.length;i++){let e=s[i];e.length>1024&&(e=e.slice(0,1024));const n=ct.test(e)?e.replace(ct,"$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(dt(t).function||"")&&t.pop();t.reverse(),ut.test(dt(t).function||"")&&(t.pop(),ut.test(dt(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||dt(t).filename,function:e.function||"?"}))}(o.slice(r))}}function dt(e){return e[e.length-1]||{}}var ht="<anonymous>";function pt(e){try{return e&&"function"==typeof e&&e.name||ht}catch{return ht}}function ft(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 mt={},gt={};function _t(e,t){return mt[e]=mt[e]||[],mt[e].push(t),()=>{const n=mt[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function yt(e,t){if(!gt[e]){gt[e]=!0;try{t()}catch(ih){Ke&&at.error(`Error while instrumenting ${e}`,ih)}}}function bt(e,t){const n=e&&mt[e];if(n)for(const r of n)try{r(t)}catch(ih){Ke&&at.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${pt(r)}\nError:`,ih)}}var vt=null;function wt(){vt=Ge.onerror,Ge.onerror=function(e,t,n,r,o){return bt("error",{column:r,error:o,line:n,msg:e,url:t}),!!vt&&vt.apply(this,arguments)},Ge.onerror.__SENTRY_INSTRUMENTED__=!0}var kt=null;function xt(){kt=Ge.onunhandledrejection,Ge.onunhandledrejection=function(e){return bt("unhandledrejection",e),!kt||kt.apply(this,arguments)},Ge.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var St,Ct=Object.prototype.toString;function Et(e){switch(Ct.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ot(e,Error)}}function Nt(e,t){return Ct.call(e)===`[object ${t}]`}function Tt(e){return Nt(e,"ErrorEvent")}function Rt(e){return Nt(e,"DOMError")}function At(e){return Nt(e,"String")}function Dt(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function $t(e){return null===e||Dt(e)||"object"!=typeof e&&"function"!=typeof e}function Pt(e){return Nt(e,"Object")}function jt(e){return"object"==typeof e&&null!==e}function It(e){return"undefined"!=typeof Event&&Ot(e,Event)}function Lt(e){return Boolean(e?.then&&"function"==typeof e.then)}function Ot(e,t){try{return e instanceof t}catch{return!1}}function Mt(e){return"undefined"!=typeof Request&&Ot(e,Request)}function Ut(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const o=n(r);"function"==typeof o&&Bt(o,r);try{e[t]=o}catch{Ke&&at.log(`Failed to replace method "${t}" in object`,e)}}function qt(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ke&&at.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Bt(e,t){try{e.prototype=t.prototype=t.prototype||{},qt(e,"__sentry_original__",t)}catch{}}function Ft(e){return e.__sentry_original__}function zt(e){if(Et(e))return{message:e.message,name:e.name,stack:e.stack,...Ht(e)};if(It(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...Ht(e)}}return e}function Ht(e){return jt(e)?Object.fromEntries(Object.entries(e)):{}}function Wt(e){if(void 0!==St)return St?St(e):e();const t=/* @__PURE__ */Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=Ge;return t in n&&"function"==typeof n[t]?(St=n[t])(e):(St=null,e())}function Yt(){return Wt(()=>Math.random())}function Vt(){return Wt(()=>Date.now())}var Jt,Kt,Gt=/* @__PURE__ */Symbol.for("sentry.skipNormalization"),Xt=/* @__PURE__ */Symbol.for("sentry.overrideNormalizationDepth");function Qt(e,t=100,n=1/0){try{return en("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Zt(e,t=3,n=102400){const r=Qt(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?Zt(e,t-1,n):r;var o}function en(e,t,n=1/0,r=1/0,o=function(){const e=/* @__PURE__ */new WeakSet;function t(t){return!!e.has(t)||(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=tn(e,t);if(!a.startsWith("[object "))return a;if(function(e){return Boolean(e[Gt])}(t))return t;const c=function(e){const t=e[Xt];return"number"==typeof t?t:void 0}(t),u=void 0!==c?c:n;if(0===u)return a.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return en("",l.toJSON(),u-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let h=0;const p=zt(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]=en(f,e,u-1,r,o),h++}return i(t),d}function tn(e,t){try{if(Jt){const e=Jt(t);if(e)return e}return"undefined"!=typeof global&&t===global?"[Global]":"number"!=typeof t||Number.isFinite(t)?"function"==typeof t?`[Function: ${pt(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 nn(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function rn(e,t,n=!1){return!!At(e)&&(Nt(t,"RegExp")?t.test(e):At(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function on(e,t=[],n=!1){for(const r of t)if(rn(e,r,n))return!0;return!1}function sn(e=function(){const e=Ge;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return Wt(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Kt||(Kt="10000000100040008000100000000000"),Kt.replace(/[018]/g,e=>(e^(16*Yt()&15)>>e/4).toString(16))}function an(e){return e.exception?.values?.[0]}function cn(e){const{message:t,event_id:n}=e;if(t)return t;const r=an(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function un(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function ln(e,t){const n=an(e);n&&dn(n,t)}function dn(e,t){const n=e.mechanism;e.mechanism={type:"generic",handled:!0,...n,...t},t&&"data"in t&&(e.mechanism.data={...n?.data,...t.data})}function hn(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{qt(e,"__sentry_captured__",!0)}catch{}return!1}function pn(){return Vt()/1e3}var fn,mn=[];function gn(){return(fn??(fn=function(){const{performance:e}=Ge;if(!e?.now||!e.timeOrigin)return e?.now&&(mn=[{from:0,origin:Vt()-Wt(()=>e.now())}]),pn;let t=e.timeOrigin;mn=[{from:0,origin:t}];let n=!0,r=0;return()=>Wt(()=>{const o=e.now(),s=Date.now();return Math.abs(t+o-s)>1e3&&(t=s-o,n?mn=[{from:0,origin:t}]:(mn.push({from:r,origin:t}),mn.length>100&&mn.splice(1,1))),n=!1,r=o,(t+o)/1e3})}()))()}function _n(e){const t=gn(),n={sid:sn(),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&&yn(n,e),n}function yn(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||gn(),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:sn()),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 bn(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]=bn(r[o],t[o],n-1));return r}function vn(){return sn().substring(16)}var wn=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={},qt(this,"refs",{}),this._propagationContext={traceId:sn(),sampleRand:Yt()}}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,t.refs={...this.refs},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&&yn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,{tags:r,attributes:o,extra:s,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:l,conversationId:d}=(n instanceof e?n.getScopeData():Pt(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),l&&(this._propagationContext=l),d&&(this._conversationId=d),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:pn(),...e,message:e.message?nn(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}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,conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=bn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||sn();if(!this._client)return Ke&&at.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||sn();if(!this._client)return Ke&&at.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||sn();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Ke&&at.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 kn="__SENTRY_SUPPRESS_TRACING__",xn=e=>e instanceof Promise&&!e[Sn],Sn=/* @__PURE__ */Symbol("chained PromiseLike"),Cn=(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,{[Sn]:!0}),t},En=class{constructor(e,t){let n,r;n=e||new wn,r=t||new wn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(ih){throw this._popScope(),ih}return Lt(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return xn(r)&&xn(e)?r:Cn(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=Ze(Qe());return e.stack=e.stack||new En(et("defaultCurrentScope",()=>new wn),et("defaultIsolationScope",()=>new wn))}function Tn(e){return Nn().withScope(e)}function Rn(e,t){const n=Nn();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function An(e){return Nn().withScope(()=>e(Nn().getIsolationScope()))}function Dn(e){return Tn(t=>{t.setSDKProcessingMetadata({[kn]:!0});const n=e();return t.setSDKProcessingMetadata({[kn]:void 0}),n})}function $n(e){const t=Ze(e);return t.acs?t.acs:{suppressTracing:Dn,withIsolationScope:An,withScope:Tn,withSetScope:Rn,withSetIsolationScope:(e,t)=>An(t),getCurrentScope:()=>Nn().getScope(),getIsolationScope:()=>Nn().getIsolationScope()}}function Pn(e,t){const{value:n,unit:r}="object"==typeof(o=e)&&null!=o&&!Array.isArray(o)&&Object.keys(o).includes("value")?e:{value:e,unit:void 0};var o;const s=function(e){if(Array.isArray(e))return{value:e,type:"array"};const t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),i=r&&"string"==typeof r?{unit:r}:{};if(s)return{...s,...i};if(!t||"skip-undefined"===t&&void 0===n)return;let a="";try{a=JSON.stringify(n)??""}catch{}return{value:a,type:"string",...i}}function jn(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const e=Pn(o,t);e&&(n[r]=e)}return n}function In(){return Ze(Qe()).externalPropagationContextProvider?.()}function Ln(){return $n(Qe()).getCurrentScope()}function On(){return $n(Qe()).getIsolationScope()}function Mn(){return Ln().getClient()}function Un(e){const t=In();if(t)return{trace_id:t.traceId,span_id:t.spanId};const{traceId:n,parentSpanId:r,propagationSpanId:o}=e.getPropagationContext(),s={trace_id:n,span_id:o||vn()};return r&&(s.parent_span_id=r),s}var qn="sentry.is_localhost",Bn="user_agent.original",Fn=["ok","deadline_exceeded","unauthenticated","permission_denied","not_found","resource_exhausted","invalid_argument","unimplemented","unavailable","internal_error","unknown_error","cancelled","already_exists","failed_precondition","aborted","out_of_range","data_loss"];function zn(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}function Hn(e){const t=e;return{scope:t._sentryScope,isolationScope:zn(t._sentryIsolationScope)}}function Wn(e){const t=function(e){if(!e||!At(e)&&!Array.isArray(e))return;return Array.isArray(e)?e.reduce((e,t)=>{const n=Yn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Yn(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 Yn(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 Vn=/^o(\d+)\./,Jn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Kn(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}function Gn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Xn(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(Vn)?.[1]}(n)),r}function Qn(e){const t="string"==typeof e?function(e){const t=Jn.exec(e);if(!t)return void rt(()=>{});const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const e=u.match(/^\d+/);e&&(u=e[0])}return Gn({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}(e):Gn(e);if(t&&function(e){if(!Ke)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(at.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(at.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(at.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(at.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function Zn(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:rr(e).parent_span_id,s=Hn(e).scope;return{parent_span_id:o,span_id:r?s?.getPropagationContext().propagationSpanId||vn():t,trace_id:n}}function er(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 tr(e){return"number"==typeof e?nr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?nr(e.getTime()):gn()}function nr(e){return e>9999999999?e/1e3:e}function rr(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getStaticSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:or(e),start_timestamp:tr(o),timestamp:tr(i)||void 0,status:sr(a),op:r["sentry.op"],origin:r["sentry.origin"],links:er(c)}}return{span_id:t,trace_id:n,start_timestamp:0,status:"ok",data:{}}}function or(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function sr(e){return e&&0!==e.code?1===e.code?"ok":e.message&&("ok"!==(t=e.message)&&Fn.includes(t))?e.message:"internal_error":"ok";var t}var ir=function(e){return e._sentryRootSpan||e};function ar(e){const t=$n(Qe());return t.getActiveSpan?t.getActiveSpan(e):function(e){return zn(e.refs.span)}(e||Ln())}function cr(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||Mn()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function ur(e){at.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function lr(e,t){if(!t?.length)return!1;for(const n of t){if(pr(n)){if(e.description&&rn(e.description,n))return Ke&&ur(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&&rn(e.description,n.name),o=!n.op||e.op&&rn(e.op,n.op),s=!n.attributes||Object.entries(n.attributes).every(([t,n])=>dr(e.attributes?.[t],n));if(r&&o&&s)return Ke&&ur(e),!0}return!1}function dr(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?rn(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function hr(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 pr(e){return"string"==typeof e||e instanceof RegExp}var fr=[];function mr(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 gr(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function _r(e,t,n){if(n[t.name])Ke&&at.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,fr.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),fr.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))}),Ke&&at.log(`Integration installed: ${t.name}`)}}var yr="production",br=/* @__PURE__ */Symbol.for("sentry.nonRecordingSpan");function vr(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:Xn(t)};return t.emit("createDsc",o),o}function wr(e,t){if(In())return;const n=t.getPropagationContext();return n.dsc||vr(n.traceId,e)}function kr(e){const t=Mn();if(!t)return{};const n=ir(e),r=rr(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o["sentry.sample_rate"]??o["sentry.previous_trace_sample_rate"];function a(e){return"number"!=typeof i&&"string"!=typeof i||(e.sample_rate=`${i}`),e}const c=n._frozenDsc;if(c)return a(c);const u=function(e){return!!e&&!0===e[br]}(n),l=u&&"ignored"===n.dropReason;if(u&&(!cr(t.getOptions())||l)){const e=Hn(n).scope,r=e&&wr(t,e);if(r){const e={...r};return l&&(e.sampled="false"),a(e)}}const d=s?.get("sentry.dsc"),h=d&&Wn(d);if(h)return a(h);const p=vr(e.spanContext().traceId,t),f=o["sentry.segment.name.source"],m=r.description;return"url"!==f&&m&&(p.transaction=m),cr()&&(p.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=s?.get("sentry.sample_rand")??Hn(n).scope?.getPropagationContext().sampleRand.toString()),a(p),t.emit("createDsc",p,n),p}function xr(e,t){const{fingerprint:n,breadcrumbs:r,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(o).length&&(e.user={...o,...e.user});Object.keys(s).length&&(e.contexts={...s,...e.contexts});i&&(e.level=i);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),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,r),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function Sr(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:d,attachments:h,propagationContext:p,transactionName:f}=t;Cr(e,"extra",n),Cr(e,"tags",r),Cr(e,"attributes",o),Cr(e,"user",s),Cr(e,"contexts",i),e.sdkProcessingMetadata=bn(e.sdkProcessingMetadata,c,2),a&&(e.level=a),f&&(e.transactionName=f),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 Cr(e,t,n){e[t]=bn(e[t],n,1)}function Er(e,t){const n=et("globalScope",()=>new wn).getScopeData();return e&&Sr(n,e.getScopeData()),t&&Sr(n,t.getScopeData()),n}function Nr(e,t,n){let r;try{r=t()}catch(o){return Tr(e,o,n)}return Lt(r)?r.then(void 0,t=>Tr(e,t,n)):r}function Tr(e,t,n){return Ke&&at.error(e,t),n(t)}function Rr(e){return!!e&&"function"==typeof e&&"_static"in e&&!!e._static}function Ar(e,t){return Nr(Ke?"The `beforeSendSpan` callback threw an error, sending the span unmodified:":"",()=>t(e),()=>e)||e}function Dr(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,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links};return n=t,{...n,end_timestamp:n.end_timestamp??n.start_timestamp,attributes:jn(n.attributes),links:n.links?.map(e=>({...e,attributes:jn(e.attributes)}))};var n}function $r(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function Pr(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function jr(e,t=[]){return[e,t]}function Ir(e,t){const[n,r]=e;return[n,[...r,t]]}function Lr(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function Or(e){const t=Ze(Ge);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Mr(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[Or(r),e]:r.push("string"==typeof e?Or(e):e)}for(const s of n){const[e,t]=s;if(o(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)o(t);else{let e;try{e=JSON.stringify(t)}catch{e=JSON.stringify(Qt(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 Ur(e){const t="string"==typeof e.data?Or(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var qr={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 Br(e){return function(e){return e in qr}(e)?qr[e]:e}function Fr(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function zr(e){return"replay_event"===e?"replay":e||"error"}function Hr(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function Wr(){return"undefined"!=typeof window&&(!Hr()||"renderer"===Ge.process?.type)}var Yr=/* @__PURE__ */new WeakMap;function Vr(e,t,n){const r=function(e){return $t(e)?void 0:e}(t.originalException),o=r&&Yr.get(r);if(!o)return;const s=e.contexts?.trace;(s?.trace_id??(n&&Un(n).trace_id))===o.trace_id&&(e.contexts={...e.contexts,trace:{...s,...o}})}function Jr(e,t,n,r){const o=Fr(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const i=function(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Vt()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Kn(r)},...o&&{trace:o}}}(e,o,r,t);return delete e.sdkProcessingMetadata,jr(i,[[{type:s},e]])}function Kr(e){return new to(t=>{t(e)})}function Gr(e){return new to((t,n)=>{n(e)})}var Xr,Qr,Zr,eo,to=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(ih){r(ih)}else e(n)},t=>{if(n)try{e(n(t))}catch(ih){r(ih)}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(ih){r(ih)}}};function no(e,t,n,r=0,o){try{const s=ro(t,n,e,r,o);return Lt(s)?s:Kr(s)}catch(s){return Gr(s)}}function ro(e,t,n,r,o){const s=n[r];if(!e||!s)return e;const i=`Event processor "${s.id||"?"}"`;let a=!1;const c=Nr(Ke?`${i} threw an error, dropping event:`:"",()=>s({...e},t),()=>(a=!0,null));return Ke&&null===c&&at.log(`${i} dropped event`),Lt(c)?c.then(e=>e?ro(e,t,n,r+1,o):(o?.(a?"callback_error":"event_processor"),null)):c?ro(c,t,n,r+1,o):(o?.(a?"callback_error":"event_processor"),null)}function oo(e){return!0===e.data?.__sentry__}function so(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}function io(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||sn(),timestamp:t.timestamp||pn()},u=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||"production",!e.release&&r&&(e.release=r);!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=nn(i.url,s));s&&e.exception?.values?.forEach(e=>{e.value&&(e.value=nn(e.value,s))})}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,u),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=Ge._sentryDebugIds,n=Ge._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(eo&&r.length===Qr&&o.length===Zr)return eo;Qr=r.length,Zr=o.length,eo={},Xr||(Xr={});const s=(t,n)=>{for(const r of t){const t=n[r],o=Xr?.[r];if(o&&eo&&t)eo[o[0]]=t,Xr&&(Xr[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&&eo&&Xr){eo[o]=t,Xr[r]=[o,t];break}}}}};return t&&s(r,t),n&&s(o,n),eo}(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 wn;return n.update(t),n}(r,n.captureContext);n.mechanism&&function(e,t){const n=e.exception?.values,r=n?.find(e=>0===e.mechanism?.exception_id)??n?.[0];r&&dn(r,t)}(c,n.mechanism);const d=o?o.getEventProcessors():[],h=Er(s,l),p=[...n.attachments||[],...h.attachments];p.length&&(n.attachments=p),xr(c,h);const f=ar(l);f&&function(e,t){e.contexts={trace:Zn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:kr(t),...e.sdkProcessingMetadata};const n=rr(ir(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(c,f),Vr(c,n,l);const m=[...d,...h.eventProcessors],g="transaction"===t.type,_=t.spans?.length||0;return(oo(n)?Kr(c):no(m,c,n,0,e=>{o&&(o.recordDroppedEvent(e,zr(t.type)),g&&o.recordDroppedEvent(e,"span",1+_))})).then(e=>{if(!e)return null;if(g&&o){const t=_-(e.spans?.length||0);t>0&&o.recordDroppedEvent("event_processor","span",t)}return function(e){const t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Qt(e.data,t,n)}}))},...e.user&&{user:Qt(e.user,t,n)},...e.contexts&&{contexts:Qt(e.contexts,t,n)},...e.extra&&{extra:Qt(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Qt(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Qt(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=Qt(e.contexts.flags,3,n));return r}(e,i,a):e})}function ao(e){if(e)return function(e){return e instanceof wn||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>co.includes(e))}(e)?{captureContext:e}:e}var co=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function uo(e,t){return Ln().captureException(e,ao(t))}function lo(e,t){return Ln().captureEvent(e,t)}function ho(e,t){On().setTag(e,t)}function po(e){const t=On(),{user:n}=Er(t,Ln()),{userAgent:r}=Ge.navigator||{},o=_n({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return"ok"===s?.status&&yn(s,{status:"exited"}),fo(),t.setSession(o),o}function fo(){const e=On(),t=Ln().getSession()||e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),yn(e,n)}(t),mo(),e.setSession()}function mo(){const e=On(),t=Mn(),n=e.getSession();n&&t&&t.captureSession(n)}function go(e=!1){e?fo():mo()}function _o(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)}`}function yo(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Wr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function bo(e,t){const n=t??function(e){return vo().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Kn(r)),jr(s,[yo(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);vo().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function vo(){return et("clientToLogBufferMap",()=>/* @__PURE__ */new WeakMap)}function wo(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,...Wr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ko(e,t){const n=t??function(e){return xo().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Kn(r)),jr(s,[wo(e,o)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);xo().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function xo(){return et("clientToMetricBufferMap",()=>/* @__PURE__ */new WeakMap)}function So(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||function(e){return"stream"===e.getOptions().traceLifecycle}(t))return;const n=[],r=[];for(const o of e.spans)o.op?.startsWith("gen_ai.")?n.push(Dr(o)):r.push(o);return 0!==n.length?(e.spans=r,function(e,t){const n=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,ingest_settings:Wr()?{infer_ip:n,infer_user_agent:n}:void 0,items:e}]}(n,t)):void 0}var Co=/* @__PURE__ */Symbol.for("SentryBufferFullError");function Eo(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 Gr(Co);const o=r();return t.add(o),o.then(()=>n(o),()=>n(o)),o},drain:function(e){if(!t.size)return Kr(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>Pr(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function No(e,{statusCode:t,headers:n},r=Vt()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[e,t,,,n]=a.split(":",5),s=parseInt(e,10),i=1e3*(isNaN(s)?60:s);if(t)for(const a of t.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(o[a]=r+i);else o.all=r+i}else i?o.all=r+function(e,t=Vt()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(i,r):429===t&&(o.all=r+6e4);return o}function To(e,t,n=Eo(e.bufferSize||64)){let r={};function o(t,[n,r],o){const s=Br(o);"transaction"===o&&e.recordDroppedEvent(t,"span",(r.spans?.length??0)+1),e.recordDroppedEvent(t,s,"number"==typeof n.item_count?n.item_count:1)}return{send:function(e){const s=[];if(Lr(e,(e,t)=>{!function(e,t,n=Vt()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,Br(t))?s.push(e):o("ratelimit_backoff",e,t)}),0===s.length)return Promise.resolve({});const i=jr(e[0],s),a=e=>{!function(e,t){return Lr(e,(e,n)=>t.includes(n))}(i,["client_report"])?Lr(i,(t,n)=>{o(e,t,n)}):Ke&&at.warn(`Dropping client report. Will not send outcomes (reason: ${e}).`)};return n.add(()=>t({body:Mr(i)}).then(e=>413===e.statusCode?(Ke&&at.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),a("send_error"),e):(Ke&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&at.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=No(r,e),e),e=>{throw a("network_error"),Ke&&at.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===Co)return Ke&&at.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}var Ro={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,queues:!0,stackFrameVariables:!0,frameContextLines:5};var Ao="Not capturing exception because it's already been captured.",Do="Discarded session because of missing or non-string release",$o=/* @__PURE__ */Symbol.for("SentryInternalError"),Po=/* @__PURE__ */Symbol.for("SentryDoNotSendEventError"),jo=/* @__PURE__ */Symbol.for("SentryClosedClient");function Io(e){return{message:e,[$o]:!0}}function Lo(e){return{message:e,[Po]:!0}}function Oo(e){return jt(e)&&$o in e}function Mo(e){return jt(e)&&Po in e}function Uo(e,t,n,r,o){let s,i=0,a=!1;e.on(n,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,t=>{if(i+=r(t),i>=8e5)o(e);else if(!a){const t=e.getOptions()._flushInterval??5e3;t>0&&(a=!0,s=Pr(setTimeout(()=>{o(e)},t)))}}),e.on("flush",()=>{o(e)})}var qo=class{constructor(e){this._options={attachStacktrace:!0,...e,traceLifecycle:"static"===e.traceLifecycle?"static":"stream"},this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Eo(e.transportOptions?.bufferSize??64),this._dataCollection=function(e){const t=e.dataCollection??{};return{userInfo:t.userInfo??Ro.userInfo,cookies:t.cookies??Ro.cookies,httpHeaders:(n=t.httpHeaders,void 0===n?{...Ro.httpHeaders}:"boolean"==typeof(r=n)||"allow"in r||"deny"in r?{request:n,response:n}:{request:n.request??Ro.httpHeaders.request,response:n.response??Ro.httpHeaders.response}),httpBodies:t.httpBodies??Ro.httpBodies,urlQueryParams:t.urlQueryParams??Ro.urlQueryParams,graphQL:{document:t.graphQL?.document??Ro.graphQL.document,variables:t.graphQL?.variables??Ro.graphQL.variables},genAI:{inputs:t.genAI?.inputs??Ro.genAI.inputs,outputs:t.genAI?.outputs??Ro.genAI.outputs},databaseQueryData:t.databaseQueryData??Ro.databaseQueryData,queues:t.queues??Ro.queues,stackFrameVariables:t.stackFrameVariables??Ro.stackFrameVariables,frameContextLines:t.frameContextLines??Ro.frameContextLines};var n,r}(e),this._unhandledSessionStatus="crashed",e.dsn?this._dsn=Qn(e.dsn):Ke&&at.warn("No DSN provided, client will not send events.");const{beforeSendSpan:t,traceLifecycle:n}=this._options;if(Ke&&t&&Rr(t)!==("static"===n)&&rt(()=>{}),this._dsn){const t=_o(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})}Uo(this,"afterCaptureLog","flushLogs",Ho,bo),Uo(this,"afterCaptureMetric","flushMetrics",zo,ko)}captureException(e,t,n){const r=sn();if(hn(e))return Ke&&at.log(Ao),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:sn(),...n},s=Dt(e)?e:String(e),i=$t(e),a=i?this.eventFromMessage(s,t,o):this.eventFromException(e,o);return this._process(()=>a.then(e=>this._captureEvent(e,o,r)),i?"unknown":"error"),o.event_id}captureEvent(e,t,n){const r=sn();if(t?.originalException&&hn(t.originalException))return Ke&&at.log(Ao),r;const o={event_id:r,...t},s=e.sdkProcessingMetadata||{},i=s.capturedSpanScope,a=s.capturedSpanIsolationScope,c=zr(e.type);return this._process(()=>this._captureEvent(e,o,i||n,a),c),o.event_id}captureSession(e){this.sendSession(e),yn(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){Object.defineProperty(this,jo,{value:!0});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(){var e;(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&(this._setupIntegrations(),"stream"===(e=this._options).traceLifecycle&&(e.beforeSendTransaction||e.ignoreTransactions?.length)&&rt(()=>{}))}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),_r(this,e,this._integrations),t||gr(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=So(e,this);let r=Jr(e,this._dsn,this._options._metadata,this._options.tunnel);if(!oo(t))for(const o of t.attachments||[])r=Ir(r,Ur(o));n&&(r=Ir(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=yr}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(Ke&&at.warn(Do));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(Ke&&at.warn(Do));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const o=Fr(n);return jr({sent_at:new Date(Vt()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Kn(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}`;Ke&&at.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{const t=await this._transport.send(e);return this.emit("afterEnvelope",e),t}catch(t){return Ke&&at.error("Error while sending envelope:",t),{}}return Ke&&at.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&&_r(e,t,n)}),n}(this,e),gr(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0,n=!1;for(const e of o)if(!1===e.mechanism?.handled){n=!0;break}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(yn(e,{...n&&{status:this._unhandledSessionStatus},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),s=this.getIntegrationNames();return!t.integrations&&s.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),io(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:wr(this,n),...e.sdkProcessingMetadata}),e))}_captureEvent(e,t={},n=Ln(),r=On()){return Ke&&Bo(e)&&at.log(`Captured error event \`${so(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{Ke&&(Mo(e)?at.log(e.message):Oo(e)?at.warn(e.message):at.warn(e))})}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:s}=o,i=Fo(e),a=Bo(e),c=`before send for type \`${e.type||"error"}\``;let u="before_send",l=0;const d=void 0===s?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(s),h=zr(e.type);let p=0;return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw Lo("An event processor returned `null`, will not send event.");return p=e.spans?.length||0,oo(t)?e:function(e,t,n,r,o){const{beforeSend:s,ignoreSpans:i,beforeSendTransaction:a}=e,c=Rr(e.beforeSendSpan)&&e.beforeSendSpan;let u=t;if(Bo(u)&&s){const e=u;return Nr(Ke?"The `beforeSend` callback threw an error, dropping the event:":"",()=>s(e,n),()=>(r("callback_error"),null))}if(Fo(u)){if(c||i){const e=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o??"ok",timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.["sentry.profile_id"],exclusive_time:i?.["sentry.exclusive_time"],measurements:e.measurements,is_segment:!0}}(u);if(i?.length&&lr({description:e.description,op:e.op,attributes:e.data},i))return r("ignored"),null;if(c){const n=Ar(e,c);u=bn(t,{type:"transaction",timestamp:(l=n).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})}if(u.spans){const e=[],t=u.spans;for(const n of t)i?.length&&lr({description:n.description,op:n.op,attributes:n.data},i)?hr(t,n):c?e.push(Ar(n,c)):e.push(n);o(t.length-e.length),u.spans=e}}if(a)return Nr(Ke?"The `beforeSendTransaction` callback threw an error, dropping the event:":"",()=>a(u,n),()=>(r("callback_error"),null))}var l;return u}(o,e,t,e=>{u=e},e=>{l=e})}).then(o=>{if(l&&this.recordDroppedEvent("ignored","span",l),!Pt(o)||null===o){if(this.recordDroppedEvent(u,h),i&&this.recordDroppedEvent(u,"span",1+p-l),null!==o)throw Io(`${c} must return \`null\` or a valid event.`);throw Lo(("ignored"===u?"Transaction matched `ignoreSpans`":`${c} ${"callback_error"===u?"threw an error":"returned `null`"}`)+", will not send event.")}const f=n.getSession()||r.getSession();if(a&&f&&this._updateSessionFromEvent(f,o),a&&"number"==typeof d&&Yt()>d)throw this.recordDroppedEvent("sample_rate","error"),Lo(`Discarding event because it's not included in the random sample (sampling rate = ${s})`);if(i){const e=p-l-(o.spans?.length||0);e>0&&this.recordDroppedEvent("before_send","span",e)}const m=o.transaction_info;if(i&&m&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...m,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(Mo(e)||Oo(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),Io(`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===Co&&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(){Ke&&at.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(Ke&&at.log("No outcomes to send"));if(!this._dsn)return void(Ke&&at.log("No dsn provided, will not send outcomes"));Ke&&at.log("Sending outcomes:",e);const t=(n=e,jr((r=this._options.tunnel&&Kn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||pn(),discarded_events:n}]]));var n,r,o;this.sendEnvelope(t)}};function Bo(e){return void 0===e.type}function Fo(e){return"transaction"===e.type}function zo(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+Wo(e.attributes)}function Ho(e){let t=0;return e.message&&(t+=2*e.message.length),t+Wo(e.attributes)}function Wo(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Yo(e[0]):$t(e)?t+=Yo(e):t+=100}),t}function Yo(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function Vo(e,t){!0===t.debug&&(Ke?at.enable():rt(()=>{})),function(){const e=Mn();return e&&!function(e){return jo in e}(e)?e:void 0}()&&rt(()=>{}),Ln().update(t.initialScope);const n=new e(t);return function(e){Ln().setClient(e)}(n),n.init(),n}var Jo="[Filtered]",Ko=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"];function Go(e,t,n){if(!1===t)return!0;const r=e.toLowerCase();if(o=r,(null!=n?[...Ko,...n]:Ko).some(e=>o.includes(e)))return!0;var o;if(!0===t)return!1;const s=("deny"in t?t.deny:t.allow).some(e=>r.includes(e.toLowerCase()));return"deny"in t?s:!s}function Xo(e,t,n){if(!1===t)return{};const r={};for(const o of Object.keys(e))r[o]=Go(o,t,n)?Jo:e[o];return r}function Qo(e,t){const n=e.indexOf("#"),r=-1===n?e.length:n,o=e.indexOf("?");if(-1===o||o>r)return e;const s=e.slice(0,o),i=e.slice(o+1,r),a=e.slice(r),c=function(e,t){if(e&&!1!==t)return e.split("&").map(e=>{const n=e.indexOf("="),r=-1===n?e:e.slice(0,n),o=new URLSearchParams(`${r}=`).keys().next().value;return void 0!==o&&Go(o,t)?`${r}=${Jo}`:e}).join("&")}(i,t);return c?`${s}?${c}${a}`:`${s}${a}`}function Zo(e,t){return void 0===e?void 0:Qo(e,function(e){return(e??Mn())?.getDataCollectionOptions().urlQueryParams??!0}(t))}function es(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 ts(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 ns=100;function rs(e,t){const n=Mn(),r=On();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=ns}=n.getOptions();if(s<=0)return;const i={timestamp:pn(),...e},a=o?Nr(Ke?"The `beforeBreadcrumb` callback threw an error, dropping the breadcrumb:":"",()=>rt(()=>o(i,t)),()=>null):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}var os=/* @__PURE__ */new WeakMap,ss=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Ft(this);let r;try{os.has(Mn())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){os.set(e,!0)}}),is=[/^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$/],as=(e={})=>{let t;return{name:"EventFilters",setup(n){t=cs(e,n.getOptions())},processEvent:(n,r,o)=>(t||(t=cs(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&&on(n,t)}(e,t.ignoreTransactions))return Ke&&at.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${cn(e)}`),!0}else{if(function(e,t){return!!t?.length&&so(e).some(e=>on(e,t))}(e,t.ignoreErrors))return Ke&&at.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${cn(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 Ke&&at.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${cn(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=us(e);return!!n&&on(n,t)}(e,t.denyUrls))return Ke&&at.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${cn(e)}.\nUrl: ${us(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=us(e);return!n||on(n,t)}(e,t.allowUrls))return Ke&&at.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${cn(e)}.\nUrl: ${us(e)}`),!0}return!1}(n,t)?null:n)}};function cs(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:is],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function us(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 Ke&&at.error(`Cannot extract url for event ${cn(e)}`),null}}function ls(e,t,n,r,o,s){if(!o.exception?.values||!s||!Et(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=ds(e,t,r,s.originalException,n,o.exception.values,i,0))}function ds(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Et(r[o])){ps(i,a,r);const s=e(t,r[o]),u=c.length;fs(s,o,u,a),c=ds(e,t,n,r[o],o,[s,...c],s,u)}return hs(r)&&r.errors.forEach((s,u)=>{if(Et(s)){ps(i,a,r);const l=e(t,s),d=c.length;fs(l,`errors[${u}]`,d,a),c=ds(e,t,n,s,o,[l,...c],l,d)}}),function(e){return"error"in e&&"suppressed"in e}(r)&&["error","suppressed"].forEach(s=>{const u=r[s];if(Et(u)){ps(i,a,r);const l=e(t,u),d=c.length;fs(l,s,d,a),c=ds(e,t,n,u,o,[l,...c],l,d)}}),c}function hs(e){return Array.isArray(e.errors)}function ps(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...hs(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function fs(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function ms(e){return function(e){return Et(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 gs=/* @__PURE__ */new Set([]);var _s=/* @__PURE__ */new Set;function ys(){"console"in Ge&&tt.forEach(function(e){!_s.has(e)&&e in Ge.console&&(_s.add(e),Ut(Ge.console,e,function(t){return nt[e]=t,function(...t){const n=t[0],r=nt[e],o=gs.size&&"string"==typeof n&&on(n,gs);o||bt("console",{args:t,level:e}),(!o||Ke&&at.isEnabled())&&r?.apply(Ge.console,t)}}))})}function bs(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var vs=()=>{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&&(!!ks(e,t)&&!!ws(e,t))))}(e,t)||!!function(e,t){const n=xs(t),r=xs(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!ks(e,t)&&!!ws(e,t)))}(e,t))}(t,e))return Ke&&at.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function ws(e,t){const n=ft(e),r=ft(t);if(!n||!r)return!n&&!r;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 ks(e,t){const n=e.fingerprint,r=t.fingerprint;if(!n||!r)return!n&&!r;try{return!(n.join("")!==r.join(""))}catch{return!1}}function xs(e){return e.exception?.values?.[0]}var Ss=(e={})=>{const t=new Set(e.levels||tt);return{name:"Console",setup(n){const r=function(e){const t="console",n=_t(t,e);return yt(t,ys),n}(({args:e,level:r})=>{Mn()===n&&t.has(r)&&function(e,t){const n={category:"console",data:{arguments:t,logger:"console"},level:bs(e),message:Cs(t)};if("assert"===e){if(!1!==t[0])return;{const e=t.slice(1);n.message=e.length>0?`Assertion failed: ${Cs(e)}`:"Assertion failed",n.data.arguments=e}}rs(n,{input:t,level:e})}(r,e)});if(n.registerCleanup(r),e.filter){const t=function(e){for(const t of e)gs.add(t);return()=>{for(const t of e)gs.delete(t)}}(e.filter);n.registerCleanup(t)}}}};function Cs(e){return"util"in Ge&&"function"==typeof Ge.util.format?Ge.util.format(...e):function(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const t=e[r];$t(t)?n.push(String(t)):t instanceof Error?n.push(t.message?`${t.name}: ${t.message}`:t.name):n.push(tn(0,t))}return n.join(t)}(e," ")}var Es=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=Ln().getScopeData(),n=On().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:o}=rr(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!o?.startsWith("ai."))return;e.setAttribute("gen_ai.conversation.id",r)}})}}),Ns=Ge;function Ts(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Rs(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in Ns))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(Ts(Ns.fetch))return!0;let e=!1;const t=Ns.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Ts(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Ke&&at.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function As(e){const t="fetch",n=_t(t,e);return yt(t,()=>function(e){if(Wr()&&!Rs())return;Ut(Ge,"fetch",function(t){return new Proxy(t,{apply(t,n,r){const o=/* @__PURE__ */new Error,{method:s,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:$s(t),method:Ds(n,"method")?String(n.method).toUpperCase():Mt(t)&&Ds(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:$s(t),method:Ds(t,"method")?String(t.method).toUpperCase():"GET"}}(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:1e3*gn(),virtualError:o,headers:Ps(r)};return e||bt("fetch",{...a}),Reflect.apply(t,Ge,r).then(async t=>(e?e(t):bt("fetch",{...a,endTimestamp:1e3*gn(),response:t}),t),e=>{bt("fetch",{...a,endTimestamp:1e3*gn(),error:e}),Et(e)&&void 0===e.stack&&(e.stack=o.stack,qt(e,"framesToPop",1));const t=Mn()?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==t&&Et(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(a.fetchData.url).host;"always"===t?e.message=`${e.message} (${n})`:qt(e,"__sentry_fetch_url_host__",n)}catch{}throw e})}})})}()),n}function Ds(e,t){return jt(e)&&!!e[t]}function $s(e){return"string"==typeof e?e:e?Ds(e,"url")?e.url:e.toString?e.toString():"":""}function Ps(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(Mt(t))return new Headers(t.headers)}catch{}}function js(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}var Is="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ls=Ge,Os={};try{"undefined"!=typeof Node&&(Os.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(Os.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,Os.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,Os.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,Os.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(Os.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Ms(e,t,n){const r=Os[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return"function"==typeof o?o.call(e,n):o}function Us(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=3;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<r&&(u=qs(n,l),!("html"===u||s>1&&i+o.length*c+u.length>=d));)o.push(u),i+=u.length,n=Ms(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function qs(e,t){const n=[],r=Ms(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=Ms(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=>Ms(e,"getAttribute",t)).map(t=>[t,Ms(e,"getAttribute",t)]):null;if(o?.length)o.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=Ms(e,"id");t&&n.push(`#${t}`);const r=Ms(e,"className");if(r&&At(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const s of["aria-label","type","name","title","alt"]){const t=Ms(e,"getAttribute",s);t&&n.push(`[${s}="${t}"]`)}return n.join("")}var Bs=e=>{const t=Ls.requestIdleCallback||Ls.setTimeout;if("hidden"===Ls.document?.visibilityState)e();else{let s=!1;const i=()=>{s||(e(),s=!0)};n="visibilitychange",r=i,o={once:!0,capture:!0},Ls.document&&Ls.addEventListener(n,r,o),t(()=>{i(),function(e,t,n){Ls.document&&Ls.removeEventListener(e,t,n)}("visibilitychange",i,{capture:!0})})}var n,r,o};function Fs(){try{return Ls.document?.location.href??""}catch{return""}}var zs=/* @__PURE__ */new WeakMap;function Hs(e,t=Mn()){t?(Is&&function(e=Mn()){return e&&zs.get(e)}(t)&&at.warn("A route provider is already registered for this client and will be replaced. Routes only the previous provider knows about will no longer resolve."),zs.set(t,e)):Is&&at.warn("Cannot set a route provider without a client.")}var Ws,Ys,Vs,Js;function Ks(e){return"boolean"==typeof e?e:!!e?.capture}function Gs(){if(!Ls.document)return;const e=bt.bind(null,"dom"),t=Xs(e,!0);Ls.document.addEventListener("click",t,!1),Ls.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Ls[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Ut(n,"addEventListener",function(t){return function(n,r,o){if(("click"===n||"keypress"==n)&&r)try{const s=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=s[n]=s[n]||{captureListeners:/* @__PURE__ */new WeakSet,bubbleListeners:/* @__PURE__ */new WeakSet,listenerCount:0},a=Ks(o);if(!i.handler){const r=Xs(e);i.handler=r,i.capture=a,t.call(this,n,r,i.capture)}const c=i[a?"captureListeners":"bubbleListeners"];c.has(r)||("object"==typeof o&&(o?.once||o?.signal)?i.sticky=!0:(c.add(r),i.listenerCount++))}catch{}return t.call(this,n,r,o)}}),Ut(n,"removeEventListener",function(e){return function(t,n,r){if(("click"===t||"keypress"==t)&&n)try{const o=this.__sentry_instrumentation_handlers__||{},s=o[t];s?.[Ks(r)?"captureListeners":"bubbleListeners"].delete(n)&&(--s.listenerCount||s.sticky||(e.call(this,t,s.handler,s.capture),s.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Xs(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;qt(n,"_sentryCaptured",!0),r&&!r._sentryId&&qt(r,"_sentryId",sn());const o="keypress"===n.type?"input":n.type;(function(e){if(e.type!==Ys)return!1;try{if(!e.target||e.target._sentryId!==Vs)return!1}catch{}return!0})(n)||(e({event:n,name:o,global:t}),Ys=n.type,Vs=r?r._sentryId:void 0),clearTimeout(Ws),Ws=Ls.setTimeout(()=>{Vs=void 0,Ys=void 0},1e3)}}function Qs(e){const t="history";_t(t,e),yt(t,Zs)}function Zs(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=Js,o=function(e){try{return new URL(e,Ls.location.origin).toString()}catch{return e}}(String(n));if(Js=o,r===o)return e.apply(this,t);bt("history",{from:r,to:o})}return e.apply(this,t)}}Ls.addEventListener("popstate",()=>{const e=Ls.location.href,t=Js;Js=e,t!==e&&bt("history",{from:t,to:e})}),"history"in Ls&&Ls.history&&(Ut(Ls.history,"pushState",e),Ut(Ls.history,"replaceState",e))}var ei={};var ti="__sentry_xhr_v3__";function ni(){if(!Ls.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=/* @__PURE__ */new Error;const o=1e3*gn(),s=At(n[0])?n[0].toUpperCase():void 0,i=function(e){if(At(e))return e;try{return e.toString()}catch{}}(n[1]);if(!s||!i)return e.apply(t,n);t[ti]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[ti];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}bt("xhr",{endTimestamp:1e3*gn(),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,s=t[ti];return s&&At(r)&&At(o)&&(s.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[ti];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return bt("xhr",{startTimestamp:1e3*gn(),xhr:t}),e.apply(t,n)}})}var ri=Ge,oi=0,si=[];function ii(e){if(oi>0)return!0;const t=e?si.findIndex(t=>{return r=e,(n=t).msg===r.msg&&n.url===r.url&&n.line===r.line&&n.column===r.column;var n,r}):-1;return-1!==t&&(si.splice(t,1),!0)}function ai(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(Ft(e))return e}catch{return e}const n=function(...n){Ge._sentryWrappedDepth=(Ge._sentryWrappedDepth||0)+1;try{const r=n.map(e=>ai(e,t));return e.apply(this,r)}catch(r){throw oi++,setTimeout(()=>{oi--}),function(...e){const t=$n(Qe());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&&(un(e,void 0,void 0),ln(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),uo(r)}),r}finally{Ge._sentryWrappedDepth=(Ge._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Bt(n,e),qt(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function ci(e){const t=Fs(),{referrer:n}=ri.document||{},{userAgent:r}=ri.navigator||{};return{url:t,headers:{...n&&{Referer:Zo(n,e)},...r&&{"User-Agent":r}}}}function ui(e,t){const n=hi(e,t),r={type:mi(t),value:gi(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function li(e,t,n,r){const o=Mn()?.getOptions().normalizeDepth,s=(i=t,Object.values(i).find(Et));var i;const a={__serialized__:Zt(t,o)};if(s)return{exception:{values:[ui(e,s)]},extra:a};const c={exception:{values:[{type:It(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:bi(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=hi(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function di(e,t){return{exception:{values:[ui(e,t)]}}}function hi(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&pi.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 pi=/Minified React error #\d+;/i;function fi(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function mi(e){const t=e?.name;return!t&&fi(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function gi(e){const t=e?.message;return fi(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?ms(t.error):ms(e):"No error message"}function _i(e,t,n,r,o){let s;if(Tt(t)&&t.error)return di(e,t.error);if(Rt(t)||Nt(t,"DOMException")){const o=t;if("stack"in t){s=di(e,t);const o=s.exception?.values?.[0];if(r&&n&&o&&!o.stacktrace){const t=hi(e,n);t.length&&(o.stacktrace={frames:t},ln(s,{synthetic:!0}))}}else{const t=o.name||(Rt(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=yi(e,i,n,r),un(s,i)}return s}if(Et(t))return di(e,t);if(Pt(t)||It(t))return s=li(e,t,n,o),ln(s,{synthetic:!0}),s;const i=String(t);return s=yi(e,i,n,r),un(s,i,void 0),ln(s,{synthetic:!0}),s}function yi(e,t,n,r){const o={};if(r&&n){const r=hi(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),ln(o,{synthetic:!0})}if(Dt(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 bi(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(zt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return Tt(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 vi=class extends qo{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:ri.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:Xe})),o.version=Xe)}(t,"browser",["browser"],ri.SENTRY_SDK_SOURCE||"npm"),super(t),t.routeProvider&&Hs(t.routeProvider,this),this._unhandledSessionStatus="unhandled";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,s=()=>{gn()},i=[[ri.document,"visibilitychange",()=>{s(),"hidden"===ri.document.visibilityState&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}],[ri.document,"freeze",s],[ri.document,"resume",s],[ri,"pagehide",s],[ri,"pageshow",s]];i.forEach(([e,t,n])=>e?.addEventListener?.(t,n)),this.on("close",()=>i.forEach(([e,t,n])=>e?.removeEventListener?.(t,n))),r&&this.on("beforeSendSession",ts)}eventFromException(e,t){return function(e,t,n,r){const o=_i(e,t,n?.syntheticException||void 0,r);return ln(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Kr(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const s=yi(e,t,r?.syntheticException||void 0,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Kr(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}};function wi(e,t=function(e){const t=ei[e];if(t)return t;let n=Ls[e];if(Ts(n))return ei[e]=n.bind(Ls);const r=Ls.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(ih){Is&&at.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,ih)}return n?ei[e]=n.bind(Ls):n}("fetch")){let n=0,r=0;return To(e,async function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,i);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(ih){throw ei["fetch"]=void 0,ih}finally{n-=s,r--}},Eo(e.bufferSize||40))}var ki="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function xi(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 Si=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ci=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ei=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ni=/at (.+?) ?\(data:(.+?),/,Ti=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ri=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ai=lt(...[[30,e=>{const t=e.match(Ni);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=Si.exec(e);if(n){const[,e,t,r]=n;return xi(e,"?",+t,+r)}const r=Ci.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=Ei.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Di(r[1]||"?",r[2]);return xi(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=Ti.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ri.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]=Di(n,e),xi(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Di=(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]},$i=1024,Pi=(e={})=>{const t={dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.dom&&(n=function(e,t){return function(n){if(Mn()!==e)return;let r,o,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>$i&&(ki&&at.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=$i),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Us(t,{keyAttrs:s,maxStringLength:i}),o=function(e,t=5){if(!Ge.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}),rs(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),_t("dom",n),yt("dom",Gs)),t.xhr&&function(e){_t("xhr",e),yt("xhr",ni)}(function(e){return function(t){if(Mn()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[ti];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,u={method:s,url:Zo(i),status_code:a},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:js(a)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),rs(d,l)}}(e)),t.fetch&&As(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},s={category:"fetch",data:{...t.fetchData,url:Zo(t.fetchData.url)},level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),rs(s,o)}else{const o=t.response,s={...t.fetchData,url:Zo(t.fetchData.url),status_code:o?.status},i={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:js(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,i),rs(a,i)}}}(e)),t.history&&Qs(function(e){return function(t){if(Mn()!==e)return;let n=t.from,r=t.to;const o=es(ri.location.href);let s=n?es(n):void 0;const i=es(r);s?.path||(s=o),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),rs({category:"navigation",data:{from:Zo(n),to:Zo(r)}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Mn()===e&&rs({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:cn(t)},{event:t})}}(e))}}};var ji="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(","),Ii=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&Ut(ri,"setTimeout",Li),t.setInterval&&Ut(ri,"setInterval",Li),t.requestAnimationFrame&&Ut(ri,"requestAnimationFrame",Oi),t.XMLHttpRequest&&"XMLHttpRequest"in ri&&Ut(XMLHttpRequest.prototype,"send",Mi);const e=t.eventTarget;e&&(Array.isArray(e)?e:ji).forEach(e=>function(e,t){const n=ri[e]?.prototype;if(!n?.hasOwnProperty?.("addEventListener"))return;Ut(n,"addEventListener",function(n){return function(r,o,s){try{"function"==typeof o.handleEvent&&(o.handleEvent=ai(o.handleEvent,{mechanism:{data:{handler:pt(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,ai(o,{mechanism:{data:{handler:pt(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),s])}}),Ut(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 Li(e){return function(...t){const n=t[0];return t[0]=ai(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${pt(e)}`}}),e.apply(this,t)}}function Oi(e){return function(t){return e.apply(this,[ai(t,{mechanism:{data:{handler:pt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Mi(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Ut(n,e,function(t){const n={mechanism:{data:{handler:pt(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Ft(t);return r&&(n.mechanism.data.handler=pt(r)),ai(t,n)})}),e.apply(this,t)}}var Ui=(e={})=>{const t=e.lifecycle??"page";return{name:"BrowserSession",setupOnce(){if(void 0===ri.document)return void(ki&&at.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));po({ignoreDuration:!0});let e=!1;Bs(()=>{e||(go(),e=!0)});const n=On();let r=n.getUser();n.addScopeListener(t=>{const n=t.getUser();r?.id===n?.id&&r?.ip_address===n?.ip_address||(r=n,e&&go())}),"route"===t&&Qs(({from:t,to:n})=>{t!==n&&(po({ignoreDuration:!0}),go(),e=!0)})}}},qi=()=>({name:"CultureContext",preprocessEvent(e){const t=Bi();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=Bi();t&&$r(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function Bi(){try{const e=ri.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Fi=(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";_t(t,e),yt(t,wt)}(t=>{const{stackParser:n,attachStacktrace:r}=Hi();if(Mn()!==e||ii(t))return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=function(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];0===c.length&&c.push({colno:r,lineno:n,filename:Wi(t)??Fs(),function:"?",in_app:!0});return e}(_i(n,c||o,void 0,r,!1),s,i,a);u.level="error",lo(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),zi("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";_t(t,e),yt(t,xt)}(t=>{const{stackParser:n,attachStacktrace:r}=Hi();if(Mn()!==e||ii())return;const o=function(e){if($t(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),s=$t(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:_i(n,o,void 0,r,!0);s.level="error",lo(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),zi("onunhandledrejection"))}}};function zi(e){ki&&at.log(`Global Handler attached: ${e}`)}function Hi(){return Mn()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Wi(e){if(At(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&-1!==s){const t=e.slice(s+1);i=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}(e,!1)}>`:e}var Yi=()=>({name:"HttpContext",preprocessEvent(e,t,n){if(!ri.navigator&&!ri.location&&!ri.document)return;const{url:r,headers:o}=ci(n),s=n.getDataCollectionOptions().httpHeaders.request,i=Object.entries(e.request?.headers??{}).filter(([e])=>!(e in o)),a={...Xo(o,s),...Object.fromEntries(i)};e.request={url:Zo(r,n),...e.request,...Object.keys(a).length>0?{headers:a}:{headers:void 0}}},processSpan(e,t){if(!ri.navigator&&!ri.location&&!ri.document)return;const n=ci(t),r=Xo(n.headers,t.getDataCollectionOptions().httpHeaders.request),o=r.Referer,{hostname:s,protocol:i}=ri.location||{};$r(e,{[Bn]:r["User-Agent"],[qn]:"file:"===i||"localhost"===s||"127.0.0.1"===s||"[::1]"===s||!!s?.endsWith(".localhost"),...e.is_segment&&{"url.full":"http.client"!==e.attributes?.["sentry.op"]?Zo(n.url):void 0,"http.request.header.referer":o?[o]:void 0}})}}),Vi=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){ls(ui,o.getOptions().stackParser,n,t,e,r)}}},Ji=/^HTML(\w*)Element$/;function Ki(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(Ji.test(t))return`[HTMLElement: ${Us(e)}]`}}function Gi(){return!!function(){if(void 0===ri.window)return!1;const e=ri;if(e.nw)return!1;if(!(e.chrome||e.browser)?.runtime?.id)return!1;const t=Fs();return!(ri===ri.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}()&&(ki&&rt(()=>{}),!0)}function Xi(e={}){const t=!e.skipBrowserExtensionCheck&&Gi();let n=null==e.defaultIntegrations?[as(),ss(),Es(),Ii(),Pi(),Ss(),Fi(),Vi(),vs(),Yi(),qi(),Ui()]:e.defaultIntegrations;const r=mr({integrations:e.integrations,defaultIntegrations:n}),o={...e,enabled:!t&&e.enabled,stackParser:(s=e.stackParser||Ai,Array.isArray(s)?lt(...s):s),integrations:r,transport:e.transport||wi};var s;return Jt=Ki,Vo(vi,o)}function Qi(e){const t="undefined"!=typeof window?window.location.href:void 0;ho("portal_code",e.portalCode),ho("object_code",e.objectCode??""),ho("locale",e.locale??""),function(e,t){On().setContext(e,t)}("bukazu",{portal_code:e.portalCode,object_code:e.objectCode??null,locale:e.locale??null,url:t??null})}function Zi(e){uo(e)}function ea(e){!function(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;Ln().captureMessage(e,n,r)}(e,"error")}var ta=/* @__PURE__ */new WeakSet;function na(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 ra(e){const t=na(e.errors);return"object"!=typeof e.errors||null===e.errors||ta.has(e.errors)||(ta.add(e.errors),Zi(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 oa=["en","nl","de","fr","es","it"];function sa(e){if(!e)return"en";const t=e.split(/[-_]/)[0].toLowerCase();return function(e){return oa.includes(e)}(t)?t:"en"}var ia=e=>"[object Object]"===Object.prototype.toString.call(e),aa=n({locale:"nl",portalCode:"",objectCode:"",apiUrl:"https://api.bukazu.com"}),ca="bukazuCurrency";function ua(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 la=n({currency:void 0,setCurrency:()=>{},allowed:[],multiCurrency:!1});function da({currencies:e,children:t}){const n=i(()=>ua(e),[e]),[o,s]=u(()=>{const e=function(){try{return window.localStorage.getItem(ca)}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(ca,e)}catch{}}(e),s(e))},[n]),c=n.multi_currency&&n.allowed.length>1,l=i(()=>({currency:c?o:void 0,setCurrency:a,allowed:n.allowed,multiCurrency:c}),[c,n.allowed,o,a]);/* @__PURE__ */
|
|
38
|
+
return d(la.Provider,{value:l,children:t})}function ha(){return o(la)}function pa(){const{currency:e,setCurrency:t,allowed:n,multiCurrency:r}=ha();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 fa=class extends Error{name="KyError";get isKyError(){return!0}},ma=class extends fa{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}},ga=class extends fa{name="NetworkError";request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}},_a=e=>null!==e&&"object"==typeof e,ya=e=>_a(e)&&!Array.isArray(e),ba=e=>"number"==typeof e&&e>=0,va=Object.prototype.toString,wa=e=>e instanceof Error||"[object Error]"===va.call(e),ka=e=>e instanceof globalThis.Request||"[object Request]"===va.call(e),xa=e=>e instanceof globalThis.Response||"[object Response]"===va.call(e),Sa=class e extends Error{static wrap(t){return wa(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}},Ca=class extends fa{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&&!ba(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&&!ka(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}},Ea=class extends Error{name="SchemaValidationError";issues;constructor(e){super("Response schema validation failed"),this.issues=e}},Na=class extends fa{name="TimeoutError";request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}},Ta=(()=>{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})(),Ra="function"==typeof globalThis.AbortController,Aa="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,Da="function"==typeof globalThis.ReadableStream,$a="function"==typeof globalThis.FormData,Pa=["get","post","put","patch","head","delete","query"],ja={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Ia=()=>Object.keys(ja).filter(e=>"bytes"!==e||"function"==typeof globalThis.Response?.prototype?.bytes),La=2147483647,Oa=Symbol.for("ky.stop"),Ma=class{get isRetryMarker(){return!0}options;constructor(e){this.options=e}},Ua=e=>e instanceof Ma||!0===e?.isRetryMarker,qa=e=>new Ma(e),Ba=["onUploadProgress","onDownloadProgress","timeout","fetch","throwHttpErrors"],Fa={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},za={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},Ha=class extends fa{name="ResponseSizeError";request;maxResponseSize;constructor(e,t){super(`Response body exceeded ${t} bytes: ${e.method} ${e.url}`),this.request=e,this.maxResponseSize=t}},Wa=new TextEncoder,Ya=/* @__PURE__ */new WeakMap,Va=/* @__PURE__ */new Set([101,103,204,205,304]),Ja=(e,t)=>{const n=e?.body;n&&n!==t?.body&&n.cancel().catch(()=>{})},Ka=e=>Math.max(0,Number(e.get("content-length"))||0),Ga=e=>e.replaceAll(/\r\n|\r|\n/g,"\r\n"),Xa=e=>e.replaceAll("\n","%0A").replaceAll("\r","%0D").replaceAll('"',"%22"),Qa=(e,t,n)=>{let r,o=0;return e.pipeThrough(new TransformStream({transform(e,s){if(s.enqueue(e),r){o+=r.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),n?.({percent:e,totalBytes: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)}}))},Za=(e,t,n=(t.body?Ya.get(t.body):void 0))=>{const r=e.clone.bind(e);if(e.body&&n){Ya.set(e.body,n);for(const t of Object.keys(ja)){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&&Ya.set(e.body,n),Za(t,e)},writable:!0,configurable:!0}}),e},ec=e=>{const{body:t}=e;if(t&&!e.bodyUsed&&!t.locked&&!Va.has(e.status))return t},tc=(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+=Wa.encode(`Content-Disposition: form-data; name="${Xa(Ga(n))}"`).byteLength,r instanceof Blob&&(t+=Wa.encode(`; filename="${Xa(r.name??"")}"`).byteLength,t+=Wa.encode(`\r\nContent-Type: ${r.type||"application/octet-stream"}`).byteLength),t+=4,t+="string"==typeof r?Wa.encode(Ga(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?Wa.encode(e).byteLength:e instanceof URLSearchParams?Wa.encode(e.toString()).byteLength:0})(n??e.body)||Ka(e.headers);return new Request(e,{duplex:"half",body:Qa(e.body,r,t),headers:e.headers,referrer:e.referrer,referrerPolicy:e.referrerPolicy})},nc=Symbol.for("ky.replaceOption"),rc=e=>_a(e)&&!0===e[nc]?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},oc=(...e)=>{for(const t of e)if(void 0!==t&&!ya(t))throw new TypeError("The `options` argument must be an object");return vc({},...e)},sc=(e={},t={})=>{const n=new globalThis.Headers(e);for(const[r,o]of Object.entries(dc(t)))void 0===o?n.delete(r):n.set(r,o);return n},ic=e=>{if(!ya(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},ac=e=>ic(e)||Array.isArray(e),cc=e=>{if(e instanceof URLSearchParams){const t=new URLSearchParams(e),n=e[mc];return n&&(t[mc]=new Set(n)),t}return Array.isArray(e)?[...e]:ic(e)?{...e}:e},uc=e=>Array.isArray(e)?e.map(e=>cc(e)):cc(e),lc=(e,t=/* @__PURE__ */new WeakMap)=>{if(!ac(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(lc(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:lc(e[o],t),writable:!0,enumerable:!0,configurable:!0});return r},dc=e=>{if(ic(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},hc=(e,t)=>{const n=/* @__PURE__ */new Map;for(const[r,o]of[...Object.entries(dc(e)),...Object.entries(dc(t))])n.set(r.toLowerCase(),o);return Object.fromEntries(n)};function pc(e,t,n){if(Object.hasOwn(t,n)&&void 0===t[n])return[];const{isReplace:r,value:o}=rc(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??[]]:vc(e[n]??[],o??[])}var fc=(e={},t={})=>{if(!ya(t))throw new TypeError("The `hooks` option must be an object");return{init:pc(e,t,"init"),beforeRequest:pc(e,t,"beforeRequest"),beforeRetry:pc(e,t,"beforeRetry"),beforeError:pc(e,t,"beforeError"),afterResponse:pc(e,t,"afterResponse")}},mc=Symbol("deletedParameters"),gc=/* @__PURE__ */new Set(["json","context"]),_c=(e,t)=>{if(!ac(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 s=t(o);s!==o&&(n??=Array.isArray(e)?[...e]:{...e},n[r]=s)}return n??e})(e,e=>_c(rc(e).value,t));return t.set(e,n),n},yc=(e,t)=>{const n=new URLSearchParams,r=/* @__PURE__ */new Set;for(const o of[e,t])if(o instanceof URLSearchParams){const e=o[mc];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}=rc(e[1]);r&&n.delete(t),n.append(t,String(o))}else if(_a(o))for(const[e,t]of Object.entries(o)){const{isReplace:o,value:s}=rc(t);void 0===s?(n.delete(e),r.add(e)):(o&&n.delete(e),n.append(e,String(s)))}else{const e=new URLSearchParams(o);for(const[t,r]of e.entries())n.append(t,r)}return r.size>0&&(n[mc]=r),n},bc=(e,...t)=>{let n,r={},o={},s={};const i=[];for(const a of t)if(Array.isArray(a))Array.isArray(r)||(r=[]),r=[...r,...a];else if(_a(a)){for(let[t,o]of Object.entries(a)){const s=rc(o),{isReplace:a}=s;o=s.value;const c=e&&"signal"===t;if(c&&(a||void 0===o)&&(i.length=0),c&&o instanceof globalThis.AbortSignal)i.push(o);else{if(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&&!ya(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?uc(o):yc(n,o)}else{if(e&&"retry"===t&&void 0!==o&&"number"!=typeof o&&!ya(o))throw new TypeError("`retry` must be a number or an object");e&&"retry"===t&&!a&&(_a(o)&&"number"==typeof r[t]?r={...r,[t]:{limit:r[t]}}:"number"==typeof o&&_a(r[t])&&(o={limit:o})),e&&"retry"===t&&ic(o)&&(a||!ac(r[t]))?o=bc(!1,{},o):!a&&ac(r[t])&&ac(o)&&Array.isArray(r[t])===Array.isArray(o)&&(o=bc(!1,r[t],o)),r={...r,[t]:o}}}}if(e&&void 0!==a.hooks){const{value:e,isReplace:t}=rc(a.hooks);s=fc(t?{}:s,e),r.hooks=s}if(e&&_a(a.headers)){const{value:e,isReplace:t}=rc(a.headers);o=hc(t?{}:o,e),r.headers=o}}if(void 0!==n&&(r.searchParams=n),i.length>0&&(1===i.length?r.signal=i[0]:r.signal=Aa?AbortSignal.any(i):i.at(-1)),e)for(const[a,c]of Object.entries(r))gc.has(a)||(r[a]=_c(c,/* @__PURE__ */new Map));return r},vc=(...e)=>bc(!0,...e),wc=e=>Pa.includes(e.toLowerCase())?e.toUpperCase():e,kc=/* @__PURE__ */new Set([...Pa,"options","trace"]),xc=e=>kc.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},Cc=(e={})=>{if("number"==typeof e&&(e={limit:e}),!ya(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(!ba(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=>xc(e)),t.statusCodes=[...t.statusCodes],t.afterStatusCodes=[...t.afterStatusCodes],t};async function Ec(e,{signal:t}){return new Promise((n,r)=>{function o(){clearTimeout(s),r(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const s=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e)})}var Nc=/* @__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 Tc(e){if(!e||!wa(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(")"))||Nc.has(t))}var Rc=(e,t)=>e instanceof t||!0===e?.isKyError&&e?.name===t.name;function Ac(e){return Rc(e,Ca)}var Dc=/^\d+$/,$c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Pc=/^(?: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$/,jc=/^(?: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$/,Ic=/^(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})$/,Lc=({year:e,month:t,day:n,hours:r,minutes:o,seconds:s})=>{const i=$c.indexOf(t),a=Number(n),c=Number(r),u=Number(o),l=Number(s);if(-1===i||c>23||u>59||l>60)return;const d=Math.min(l,59),h=new Date(Date.UTC(e,i,a,c,u,d));h.setUTCFullYear(e);const p=h.getTime();return h.getUTCFullYear()===e&&h.getUTCMonth()===i&&h.getUTCDate()===a&&h.getUTCHours()===c&&h.getUTCMinutes()===u&&h.getUTCSeconds()===d?60===l?p+1e3:p:void 0},Oc=(e,t)=>e[t],Mc=({value:e,allowTimestamp:t})=>{if(Dc.test(e)){let n=1e3*Number(e);return t&&Number(e)>=1e9&&(n-=Date.now()),Math.max(0,n)}const n=(e=>{const t=Pc.exec(e);if(t)return Lc({year:Number(Oc(t,3)),month:Oc(t,2),day:Oc(t,1),hours:Oc(t,4),minutes:Oc(t,5),seconds:Oc(t,6)});const n=jc.exec(e);if(n){const e=/* @__PURE__ */new Date,t=Number(Oc(n,3)),r=100*Math.floor(e.getUTCFullYear()/100)+t,o=Date.UTC(e.getUTCFullYear()+50,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());let s;for(const i of[r-100,r,r+100]){const e=Lc({year:i,month:Oc(n,2),day:Oc(n,1),hours:Oc(n,4),minutes:Oc(n,5),seconds:Oc(n,6)});void 0!==e&&e<=o&&(s=e)}return s}const r=Ic.exec(e);if(r){const[e,t,n]=Oc(r,4).split(":");return Lc({year:Number(Oc(r,5)),month:Oc(r,2),day:Oc(r,3).trim(),hours:e,minutes:t,seconds:n})}})(e);if(void 0!==n)return Math.max(0,n-Date.now())},Uc=Symbol("timedOut"),qc=()=>globalThis.performance?.now()??Date.now(),Bc=(e,t)=>Promise.race([e,new Promise(n=>{const r=setTimeout(()=>{n(Uc)},t);e.finally(()=>{clearTimeout(r)}).catch(()=>{})})]),Fc=e=>{(xa(e)||ka(e))&&Ja(e)},zc=e=>{e.then(e=>{Fc(e)}).catch(()=>{})},Hc=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("/")},Wc=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")??"",s=Hc(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),i=[];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(()=>{});i.push(s.decode(t,{stream:!0}))}}catch(e){if(function(e){return Rc(e,Ha)}(e))throw e;return}return i.push(s.decode()),i.join("")})(),u=await Bc(c,t);return u===Uc&&r.cancel().catch(()=>{}),u},Yc=(e,t)=>{if(!1!==e){if(!ba(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`)}},Vc=({throwHttpErrors:e=!0,timeout:t=1e4,fetch:n=globalThis.fetch.bind(globalThis)})=>({throwHttpErrors:e,timeout:t,fetch:n}),Jc=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")},Kc=/^[\0-\u0020]+/g,Gc=/[\t\n\r]/g,Xc=/^[a-z][\d+.a-z-]*:/i,Qc=/^https?:(?!\/\/)/i,Zc=(e,t,n)=>{if("string"!=typeof e)return e;if(t&&(e=`${t.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`),n){const t=(e=>e.replaceAll(Kc,"").replaceAll(Gc,""))(e);if(Qc.test(t))throw new TypeError("`input` url protocol must be followed by `//` when using `baseUrl`");if(!(e=>Xc.test(e))(t))return new URL(e,new Request(n).url)}return e},eu=(e,t)=>{e.searchParams.has(t)&&e.searchParams.delete(t)};var tu=async(e,t)=>{const n=_a(t)||"function"==typeof t?t["~standard"]:void 0;if(!_a(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 Ea(r.issues);return r.value},nu=class e{static create(t,n){const r=n.hooks?.init??[],o=r.length>0?function(e){return{...e,headers:hc({},e.headers??{}),context:{...e.context},json:lc(e.json),searchParams:uc(e.searchParams),retry:lc(e.retry)}}(n):n;for(const e of r)e(o);const s=new e(t,o),i=(async()=>{let e;try{return e=await s.#e(),e}catch(t){return await s.#t(t)}finally{const t=s.#n;Ja(t,e),t&&s.request!==t&&Ja(s.request,e)}})();for(const e of Ia()){const t=ja[e];i[e]=async n=>{s.request!==s.#n&&s.request.headers.set("accept",s.request.headers.get("accept")||t);const r=await i;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 s.#r(async()=>r[e](),r);const o=await s.#r(async()=>r.text(),r),a=s.#o(r);let c;try{c=await s.#s(async()=>{const e=""!==o||void 0===n||s.#i.parseJson?await s.#a(o,a,r):void 0;return void 0===n?e:await tu(e,n)})}catch(u){throw s.#c?.aborted&&await s.#t(s.#c.reason,a),u}return c===Uc&&await s.#t(new Na(a),a),c}}return i}request;#u;#l=0;#d;#i;#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 i of["headers","method","prefix","baseUrl","referrer","referrerPolicy"])if(null===t[i])throw new TypeError(`The \`${i}\` option must not be \`null\`. Use \`undefined\` to clear it.`);if(void 0!==t.context&&!ya(t.context))throw new TypeError("The `context` option must be an object");if(this.#i={...t,headers:sc(e.headers,t.headers),hooks:fc({},t.hooks),method:wc(t.method??e.method??"GET"),referrer:t.referrer??e.referrer,referrerPolicy:t.referrerPolicy??e.referrerPolicy,prefix:String(t.prefix||""),retry:Cc(t.retry),...Vc(t),totalTimeout:r,maxResponseSize:n,context:t.context??{}},Jc(this.#i),Yc(this.#i.timeout,"timeout"),Yc(r,"totalTimeout"),this.#d=this.#i.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=Zc(e,this.#i.prefix,this.#i.baseUrl),Ra&&Aa&&(this.#c=this.#i.signal??this.#h?.signal,this.#u=new globalThis.AbortController,this.#i.signal=this.#v()),Ta&&(this.#i.duplex="half");const o=void 0!==t.headers&&sc({},t.headers).has("content-type");void 0!==this.#i.json&&(this.#i.body=this.#i.stringifyJson?.(this.#i.json)??JSON.stringify(this.#i.json),o||this.#i.headers.set("content-type","application/json")),e instanceof globalThis.Request&&($a&&this.#i.body instanceof globalThis.FormData||this.#i.body instanceof URLSearchParams)&&!o&&this.#i.headers.delete("content-type"),this.request=new globalThis.Request(e,this.#i),this.#p="function"==typeof globalThis.ReadableStream&&this.#i.body instanceof globalThis.ReadableStream;const{searchParams:s}=this.#i;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[mc]?.size):"object"==typeof e?Object.keys(e).length>0:"string"==typeof e?e.trim().length>0:Boolean(e)})(s)){const e=new URL(this.request.url);if(((e,t)=>{const n=t?.[mc];if(n)for(const r of n)eu(e,r);if("string"==typeof t){const n=t.replace(/^\?/,"");""!==n&&(e.search=e.search?`${e.search}&${n}`:`?${n}`)}else if(!ya(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?eu(e,r):e.searchParams.append(r,o)})(e,s),e.href!==this.request.url){const{body:t,cache:n,credentials:r,integrity:o,keepalive:s,mode:i,redirect:a,referrer:c,referrerPolicy:u}=this.request,l=Ta&&!s&&"no-cors"!==i;this.request=new globalThis.Request(e,{...this.#i,cache:n,credentials:r,integrity:o,keepalive:s,mode:i,redirect:a,referrer:c,referrerPolicy:u,body:this.#i.body??(l?t:void 0)})}}this.#g="number"==typeof r?qc()+r:Number.POSITIVE_INFINITY}async#e(){await Promise.resolve();const e=await this.#w();void 0!==e&&(this.#d=Cc(this.#i.retry).limit);let t=e??await this.#k();for(;;){if(void 0===t)return;const e=this.#_.has(t);let r;try{t=await this.#x(t)}catch(n){if(!Ac(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 ma(n,this.#o(n),this.#C());if(o.data=await this.#E(n),this.#N(),this.#T(),e)throw o;r=o}t=await this.#R(r)}if(this.#A(t),this.#i.onDownloadProgress){if(!Da)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const e=((e,t)=>{const n=ec(e);if(!n)return e;const r=e.headers.get("content-encoding")?.toLowerCase(),o=Boolean(r)&&"identity"!==r?0:Ka(e.headers),s=Qa(n,o,t);return Za(new Response(s,e),e)})(t,this.#i.onDownloadProgress);return this.#D(e,this.#o(t)),this.#A(e)}return t}#$(e,t){const n=e.delay(this.#l+1);if(!ba(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#P(e){const t=Cc(this.#i.retry);if(this.#l>=Math.min(t.limit,this.#d))throw e;const n=Sa.wrap(e);if(Ac(n))return n.customDelay??this.#$(t,e);if(!t.methods.includes(xc(this.request.method)))throw e;let r=!1;const{shouldRetry:o}=t;if(void 0!==o){const t=await this.#s(async()=>o({error:n,retryCount:this.#l+1}));if(this.#N(),t===Uc)throw new Na(this.#j);if(!1===t)throw e;r=!0===t}if(function(e){return Rc(e,Na)}(e)){if(!r&&!t.retryOnTimeout)throw e;return this.#$(t,e)}if(function(e){return Rc(e,ma)}(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=Mc(n);return void 0===r?this.#$(t,e):Math.min(t.maxRetryAfter,r)}if(!r&&413===e.response.status)throw e;return this.#$(t,e)}if(!r&&!function(e){return Rc(e,ga)}(e))throw e;return this.#$(t,e)}#A(e){if(!this.#i.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.#D(n(),t)),e}async#t(e,t=this.#j){if(!wa(e))throw e;if(this.#f.has(e))throw e;let n=e;for(const r of this.#i.hooks.beforeError){const e=await r({request:t,options:this.#C(),error:n,retryCount:this.#l});wa(e)&&(n=e)}throw n}async#E(e){const t=this.#o(e),n=({fromTotalTimeout:e})=>{if(e)throw new Na(t);this.#T(t)},r=this.#I(t),o=await Wc(e,r.milliseconds);if(o===Uc)return void n(r);if(!o)return;if(!Hc(e.headers.get("content-type")??""))return o;const s=this.#I(t),i=await Bc(Promise.resolve().then(()=>this.#a(o,t,e)),s.milliseconds).catch(()=>{});if(i!==Uc)return i;n(s)}#I(e){const t=!1===this.#i.timeout?1e4:this.#i.timeout,n=this.#L();if(0===n)throw new Na(e);return{milliseconds:Math.min(t,n),fromTotalTimeout:n<=t}}#O(){const e=this.#L();if(0===e)throw new Na(this.#j);const t=Math.min(!1===this.#i.timeout?Number.POSITIVE_INFINITY:this.#i.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(i){await this.#t(i,n)}const o=e();let s;try{s=void 0===r?await o:await Bc(o,r)}catch(i){this.#c?.aborted&&await this.#t(this.#c.reason,n),0!==this.#L()&&(Tc(i)&&await this.#t(new ga(n,{cause:i}),n),await this.#t(i,n)),s=Uc}return this.#c?.aborted&&await this.#t(this.#c.reason,n),s!==Uc&&0!==this.#L()||(this.#u?.abort(),await this.#t(new Na(n),n)),s}async#s(e){const t=this.#c;t?.throwIfAborted();const n=this.#L();if(0===n)return this.#u?.abort(),Uc;let r,o,s;try{const i=new Promise((e,n)=>{t&&(o=()=>{n(t.reason)},t.addEventListener("abort",o,{once:!0}))});if(s=e(),n===Number.POSITIVE_INFINITY)return await Promise.race([s,i]);const a=new Promise(e=>{r=setTimeout(()=>{e(Uc)},n)}),c=await Promise.race([s,a,i]);return c===Uc||0===this.#L()?(this.#u?.abort(),c===Uc?zc(s):Fc(c),Uc):c}catch(i){if(t?.aborted&&(s&&zc(s),t.throwIfAborted()),0===this.#L())return this.#u?.abort(),Uc;throw i}finally{clearTimeout(r),o&&t?.removeEventListener("abort",o)}}#a(e,t,n){const{parseJson:r}=this.#i;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.#i;try{return"function"==typeof t?t(e.status):t}catch(n){throw Ja(e),n}}get#j(){return this.#n??this.request}#T(e=this.#j){if(0===this.#L())throw new Na(e)}async#w(){for(const e of this.#i.hooks.beforeRequest){const t=await this.#s(async()=>e({request:this.request,options:this.#C(),retryCount:0}));if(t===Uc)throw new Na(this.#j);if(ka(t))this.#M(this.#U(t));else if(xa(t))return this.#_.add(t),t}}async#x(e){const t=this.#o(e);e=this.#q(e);for(const r of this.#i.hooks.afterResponse){const o=this.#D(e.clone(),t);let s;this.#A(o);try{if(s=await this.#s(async()=>r({request:this.request,options:this.#C(),response:o,retryCount:this.#l})),s===Uc)throw new Na(this.#j);if(Ua(s))throw new Ca(s.options)}catch(n){throw Ja(o),Ja(e),n}const i=xa(s)?this.#D(s,t):e;Ja(o,i),Ja(e,i),i!==e&&(e=this.#q(i))}return e}async#k(){try{return await this.#B()}catch(e){return this.#R(e)}}async#R(e){this.#N();const t=Math.min(await this.#P(e),La),n={signal:this.#c},r=this.#L();if(0===r)throw new Na(this.#j);if(t>=r)throw await Ec(r,n),new Na(this.#j);await Ec(t,n),this.#T(),this.#u?.signal.aborted&&(this.#u=new globalThis.AbortController,this.#i.signal=this.#v(),this.#M(this.#U(this.request),this.#p)),Ac(e)&&e.customRequest&&this.#M(this.#U(e.customRequest));for(const s of this.#i.hooks.beforeRetry){let t;try{t=await this.#s(async()=>s({request:this.request,options:this.#C(),error:Sa.wrap(e),retryCount:this.#l+1}))}catch(o){throw this.#N(),wa(o)&&o!==e&&this.#f.add(o),o}if(t===Uc)throw new Na(this.#j);if(ka(t)){this.#M(this.#U(t));break}if(xa(t))return this.#_.add(t),this.#l++,t;if(t===Oa)return;ya(t)&&this.#F(t.options)}return this.#T(),this.#l++,this.#k()}async#B(){Ja(this.#n,this.request);const e=(e=>{const t={};for(const n of Object.keys(e))Object.hasOwn(za,n)||Object.hasOwn(Fa,n)||Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0,configurable:!0});return t})(this.#i);this.#d=Cc(this.#i.retry).limit;const t=this.#d>0?this.#U(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.#i,o=void 0===t?await r(n,e):await async function(e,t,n,r){let o,s=!1;try{return await new Promise((i,a)=>{o=setTimeout(()=>{s=!0,n?.abort(),a(new Na(e))},r.timeout);const{fetch:c}=r;c(e,t).then(e=>{s?Ja(e):i(e)}).catch(a)})}finally{clearTimeout(o)}}(n,e,this.#u,{timeout:t,fetch:r});if(!xa(o))throw new TypeError("The `fetch` option must resolve with a `Response`");if(0===this.#L())throw this.#u?.abort(),Ja(o),new Na(n);return this.#D(o,n)}catch(r){if(this.#N(),0===this.#L())throw this.#u?.abort(),new Na(n);if(Tc(r))throw new ga(n,{cause:r});throw r}}#N(){this.#c?.throwIfAborted()}#L(){return Math.max(0,this.#g-qc())}#F(e){if(!ya(e))throw new TypeError("The `options` returned from a `beforeRetry` hook must be an object");for(const r of Object.keys(e))if(!Ba.includes(r))throw new TypeError(`The \`${r}\` option cannot be changed from a \`beforeRetry\` hook`);const t={...this.#i,...e},n={...t,...Vc(t)};Jc(n),Yc(n.timeout,"timeout"),Object.assign(this.#i,n),this.#m=void 0}#C(){if(!this.#m){const{hooks:e,json:t,parseJson:n,stringifyJson:r,searchParams:o,timeout:s,totalTimeout:i,maxResponseSize:a,throwHttpErrors:c,fetch:u,...l}=this.#i;this.#m=Object.freeze(l)}return this.#m}#M(e,t=!1){this.#p&&Ja(this.request,e),this.#m=void 0,this.request=e,this.#p=t}#U(e){return this.#i.signal&&e instanceof globalThis.Request?new globalThis.Request(e,{signal:this.#i.signal,referrer:e.referrer,referrerPolicy:e.referrerPolicy}):e}#o(e){return this.#y.get(e)??this.#j}#D(e,t){return this.#y.set(e,t),e}#q(e){const t=this.#o(e);return this.#D(((e,t,n)=>{const r=ec(e);if(!r||n===Number.POSITIVE_INFINITY)return e;let o,s=0;const i=Ya.get(r),a=r.pipeThrough(new TransformStream({transform(e,r){if(s+=e.byteLength,s>n)throw o=new Ha(t,n),o;r.enqueue(e)}}));return Za(new Response(a,e),e,()=>o??i?.())})(e,t,this.#i.maxResponseSize),t)}#z(e){return this.#i.onUploadProgress&&Ta&&e.body?tc(e,this.#i.onUploadProgress,this.#i.body):e}},ru=(e,t)=>{try{return nu.create(e,t())}catch(n){const e=Promise.reject(n);for(const t of Ia())e[t]=async()=>e;return e}},ou=e=>{const t=(t,n)=>ru(t,()=>oc(e,n));for(const n of Pa)t[n]=(t,r)=>ru(t,()=>oc(e,r,{method:n}));return t.create=e=>ou(oc(e)),t.extend=t=>("function"==typeof t&&(t=t(oc(lc(e)))),ou(oc(e,t))),t.stop=Oa,t.retry=qa,t},su=ou(),iu=/* @__PURE__ */new Map,au=su.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=iu.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=iu.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();iu.set(e.url,{etag:n,lastModified:r,body:o})}}return t}]}});async function cu({apiUrl:e,locale:t,portalCode:n,params:r,signal:o}){const s=function({apiUrl:e,portalCode:t,params:n}){const r=new URL("/portal_api/v1/accommodations",new URL(e).origin);return r.search=new URLSearchParams({portal_code:t,...n}).toString(),r.toString()}({apiUrl:e,portalCode:n,params:r});try{return await au.get(s,{headers:{locale:t},signal:o}).json()}catch(i){if(i instanceof ma)throw new Error(`Search request failed (${i.response.status})`);throw i}}function uu(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 lu(e,t,n){const r=Number(n);r&&(e[t]=String(r))}var du=/^\d{4}-\d{2}-\d{2}$/,hu=/^\d{1,10}$/,pu="\\|[\\p{L}\\p{M}\\d '’.()-]{1,100}",fu=new RegExp(`^\\d{1,10}${pu}$`,"u"),mu=new RegExp(`^\\d{1,10}${pu}${pu}$`,"u");function gu(e){return e&&du.test(e)?e:void 0}function _u(e){return"number"==typeof e?Number.isSafeInteger(e)&&e>=0:"string"==typeof e&&hu.test(e)}function yu(e){return t=>"string"==typeof t&&e.test(t)}var bu={countries:{format:_u,list:!0},regions:{format:yu(fu),list:!0},cities:{format:yu(mu),list:!0},persons_max:{format:_u,list:!1},bedrooms_min:{format:_u,list:!1},bathrooms_min:{format:_u,list:!1},weekprice_max:{format:_u,list:!1}};function vu(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 wu(e,t){const n=parseInt(String(e.persons_min??""),10),r=function(e){const t={};for(const[r,o]of Object.entries(bu)){const n=vu(e[r],o);void 0!==n&&(t[r]=n)}const n=uu(e).filter(_u);return n.length>0&&n.length<=50&&(t.properties=n),t}(e);return{arrival:gu(e.arrival_date),departure:gu(e.departure_date),persons:n>0?n:void 0,filters:Object.keys(r).length>0?r:void 0,result_count:t}}var ku=/* @__PURE__ */new Set;function xu(e){return e.isConnected&&"true"===e.getAttribute("data-consent")}function Su(){return"undefined"!=typeof window&&!0===window.bukazuConsent||[...ku,...document.querySelectorAll(".bukazu-app, #bukazu-app")].some(xu)}var Cu="https://api.bukazu.com/tracking",Eu="bu_portal_session",Nu=/^[A-Za-z0-9_.-]{1,64}$/,Tu="",Ru=null,Au=!1,Du=null;function $u(){return Su()&&Uu(Eu)||Tu}function Pu(e){return"string"==typeof e&&Nu.test(e)}async function ju(e){try{!$u()&&Du&&await Du;const t=async function(e){const t=Su(),n=$u(),r={...e,interaction_info:Iu(e.interaction_info),url:window.location.href,consented:t};n&&(r.session_identifier=n);const o=t&&!Au&&!Uu(Eu);o&&(r.attribution=function(){if(Ru)return Ru;const e=new URLSearchParams(window.location.search),t={landing_path:window.location.pathname,device_class:Lu(window.innerWidth)},n=function(){const e=Ou();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 Ru=t,t}(),Au=!0);let s="";try{s=(await au.post(Cu,{json:r}).text()).trim()}finally{!s&&o&&(Au=!1)}if(!s)return;Tu=s,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`}(Eu,s,14)}(e);if(!$u()&&!Du){const e=()=>{Du=null};Du=t.then(e,e)}await t}catch{}}function Iu(e){const t={};for(const[n,r]of Object.entries(e))null!=r&&""!==r&&(t[n]=r);return t}function Lu(e){return e<768?"mobile":e<1024?"tablet":"desktop"}function Ou(){try{return document.referrer?new URL(document.referrer).host:""}catch{return""}}function Mu(){const e=Ou();return e?e===window.location.host?"search":"external":"direct"}function Uu(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 qu({filters:e,PortalSite:t,limit:n,skip:r,onPageChange:a,activePage:l,viewMode:f,onViewModeChange:m}){const{portalCode:g,apiUrl:_,locale:y}=o(aa),{currency:b}=ha(),[v,w]=u({status:"loading"}),k=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),lu(o,"persons_min",e.persons_min),lu(o,"persons_max",e.persons_max),lu(o,"bedrooms_min",e.bedrooms_min),lu(o,"bathrooms_min",e.bathrooms_min),lu(o,"weekprice_max",e.weekprice_max);const s=uu(e);return s.length>0&&(o.properties=s.join(",")),e.arrival_date&&(o.arrival_date=e.arrival_date,e.departure_date?(o.starts_at=e.arrival_date,o.ends_at=e.departure_date,lu(o,"no_nights_min",Ce(le(e.departure_date),le(e.arrival_date)))):o.no_nights_min="1"),o}(e,{limit:n,skip:r,currency:b})),x=i(()=>JSON.parse(k),[k]),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,ju({portal_code:g,locale:y,interaction_type:"search",interaction_info:wu(C.current,T.current)}))};if(s(()=>{if(E.current===S)return;const e=setTimeout(()=>{N.current=S,R()},1e3);return()=>{clearTimeout(e),N.current=null}},[S,g,y]),s(()=>{const e=new AbortController;return T.current=null,w({status:"loading"}),cu({apiUrl:_,locale:y,portalCode:g,params:x,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,x]),"loading"===v.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(p,{})});if("error"===v.status)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(ra,{errors:v.error})});const{items:A,meta:D}=v.response,$=f??t.options.filtersForm.mode,P=/* @__PURE__ */d(We,{totalCount:D.total_count,activePage:l,limit:n,onPageChange:a});/* @__PURE__ */
|
|
39
|
+
return h("div",{id:"results",className:$,children:[
|
|
40
|
+
/* @__PURE__ */h("div",{className:"bu-results-toolbar",children:[/* @__PURE__ */d(pa,{}),m&&/* @__PURE__ */d(Je,{mode:$,onChange:m})]}),P,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:He({result:e,options:t.options.filtersForm,currency:D.currency??b})}},e.id)),P]})}var Bu=["countries","regions","cities","arrival_date","departure_date","persons_min","persons_max","bedrooms_min","bathrooms_min","weekprice_max","extra_search"];var Fu="bukazuViewMode";function zu(){try{const t=window.localStorage.getItem(Fu);return"grid"===(e=t)||"list"===e?t:null}catch{return null}var e}var Hu=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))}(Bu.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:zu()??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(ju({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(Fu,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:s,PortalSite:i}=this.props;/* @__PURE__ */
|
|
41
|
+
return h("div",{id:"search-page",className:"right"===s.filtersForm.location?"bu-reverse":"top"===s.filtersForm.location?"bu-column":"",children:[/* @__PURE__ */d(qe,{PortalSite:i,filters:e,onFilterChange:this.onFilterChange,options:s}),/* @__PURE__ */d(qu,{PortalSite:i,filters:e,activePage:t,onPageChange:this.pageChange,skip:r,limit:n,viewMode:o,onViewModeChange:this.onViewModeChange})]})}},Wu=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 Yu({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 au.post(r,{json:n,headers:{locale:t}}).json()}catch(o){if(o instanceof ma)throw await async function(e){const t=e.response.status;let n={};try{n=await e.response.json()}catch{return new Wu(t,[])}const r=n.error?[n.error]:[];return new Wu(t,r,n.errors)}(o);throw o}}var Vu=["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 Ju(e){if("string"!=typeof e)return;const t=e.trim();return""===t?void 0:t}function Ku(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 Gu({values:e,objectCode:t,portalCode:n,locale:r,sessionIdentifier:o}){const s={portal_code:n,object_code:t,starts_at:e.arrivalDate.date,ends_at:e.departureDate.date,is_option:"true"===e.is_option,language:r,country:e.country.toUpperCase(),adults:Number(e.adults)||0,children:Number(e.children)||0,babies:Number(e.babies)||0,discount:Number(e.discount)||0,cancel_insurance:Number(e.cancel_insurance)||0,costs:Ku(e.costs)},i=function(e){const t={};for(const[n,r]of Object.entries(e??{})){const e=Ju(r);void 0!==e&&(t[n]=e)}return Object.keys(t).length>0?t:void 0}(e.extra_fields);i&&(s.extra_fields=i),o&&(s.session_identifier=o);for(const a of Vu){const t=Ju(e[a]);void 0!==t&&(s[a]=t)}return s}function Xu({children:e,buttonText:t,show:n=!1,onClose:r}){const[o,i]=u(n),a=c(null);s(()=>{const e=a.current;e&&(o?e.showModal():e.close())},[o]);const p=()=>{i(!1),r?.()};/* @__PURE__ */
|
|
42
|
+
return h(l,{children:[!o&&t&&/* @__PURE__ */d("button",{type:"button",className:"info-button",onClick:()=>i(!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 Qu(e){return Array.from({length:e+1},(e,t)=>t)}function Zu(e){const t={};return e.forEach(e=>{t[e.id]=""}),t}function el(e){return e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".")}function tl(e,t){const n=el(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 nl(e,t,n){const r=el(t),o={...e};let s=o,i=e;return r.forEach((e,t)=>{if(t===r.length-1)return void(s[e]=n);const o=null!==i&&"object"==typeof i?i[e]:void 0,a=null===o||"object"!=typeof o||Array.isArray(o)?{}:{...o};s[e]=a,s=a,i=o}),o}function rl(e,t){let n=Number(t.babies)-Number(e.babies_extra);return n<0&&(n=0),Number(t.children)+Number(t.adults)+n}var ol=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 sl(){return o(ol)}function il(e){const{values:t,errors:n,touched:r,setFieldValue:o}=sl(),s=n[e],i=tl(n,e),a="string"==typeof s?s:"string"==typeof i?i:void 0,c=r[e],u=tl(r,e);return{error:a,touched:"boolean"==typeof c?c:"boolean"==typeof u&&u,value:tl(t,e)??"",onBlur:()=>{},onChange:t=>{o(e,t.target.value)}}}var al={selectedDate:null,arrivalDate:null,departureDate:null,bookingStarted:!1,persons:0,hoverDate:null,hoverValid:!1},cl=n(al),ul=n(dl);function ll({children:e,initialState:t}){const[n,r]=a(dl,{...al,...t});/* @__PURE__ */
|
|
43
|
+
return d(cl.Provider,{value:n,children:/* @__PURE__ */d(ul.Provider,{value:r,children:e})})}function dl(e,t){switch(t.type){case"clicked":{const{day:n,house:r}=t,{selectedDate:o,arrivalDate:s}=e,i=le(n.date),a=r.persons>2?2:r.persons;return n.departure&&o&&s&&xe(i,o)&&Ce(i,o)<=r.max_nights&&Ce(i,o)>=s.min_nights&&Ce(i,o)<=s.max_nights?{...e,departureDate:n,hoverDate:null,hoverValid:!1}:n.arrival?{...e,selectedDate:i,arrivalDate:n,departureDate:null,persons:e.bookingStarted?e.persons:a,hoverDate:null,hoverValid:!1}:e}case"hover":return{...e,hoverDate:t.date,hoverValid:t.valid};case"unhover":return e.hoverDate?{...e,hoverDate:null,hoverValid:!1}:e;case"set_dates":return{...e,selectedDate:le(t.arrivalDate.date),arrivalDate:t.arrivalDate,departureDate:t.departureDate,hoverDate:null,hoverValid:!1};case"reset":return al;case"start":return{...e,bookingStarted:!0,persons:t.persons};case"return":return{...e,bookingStarted:!1};default:throw Error("Unknown action: "+t.type)}}var hl=({error:e})=>e?/* @__PURE__ */d("div",{className:"input-feedback",children:e}):null,pl=({name:e,value:t,currentValue:n,onChange:r,onBlur:o,id:s,label:i,...a})=>/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("input",{name:e,id:s,type:"radio",value:t,checked:t===n,onChange:r,onBlur:o,className:"radio-button",...a}),/* @__PURE__ */d("label",{htmlFor:s,children:i})]}),fl=({error:e,touched:t,label:n,className:r,children:o})=>/* @__PURE__ */h("div",{className:r,children:[
|
|
44
|
+
/* @__PURE__ */d("div",{className:"legend",children:n}),o,t&&/* @__PURE__ */d(hl,{error:e})]});function ml({house:e}){const t=il("is_option");/* @__PURE__ */
|
|
45
|
+
return d(l,{children:e.allow_option&&/* @__PURE__ */d("div",{children:/* @__PURE__ */h(fl,{id:"is_option",className:"booking_option",children:[/* @__PURE__ */d(pl,{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(pl,{name:"is_option",value:"false",currentValue:String(t.value),onChange:t.onChange,onBlur:t.onBlur,id:"false",label:ne("booking")})]})})})}var gl=({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:[
|
|
46
46
|
/* @__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"}),
|
|
47
47
|
/* @__PURE__ */d("circle",{cx:"50",cy:"29.546",r:"4.934"}),
|
|
48
|
-
/* @__PURE__ */d("rect",{x:"46.5",y:"41.21",width:"7",height:"34.179"})]});function
|
|
49
|
-
return h("tr",{children:[/* @__PURE__ */h("td",{children:[o?ne(e):e,n&&/* @__PURE__ */d(l,{children:/* @__PURE__ */d(
|
|
50
|
-
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(
|
|
51
|
-
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */h("tbody",{children:[/* @__PURE__ */d(
|
|
52
|
-
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(
|
|
53
|
-
return d(l,{children:e.optional_house_costs.map(t=>{if(t.on_site&&"0120"!==t.gl){if("none"===t.method)/* @__PURE__ */return d(
|
|
54
|
-
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(
|
|
55
|
-
return d(
|
|
56
|
-
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */d("tbody",{children:e})})})}function
|
|
48
|
+
/* @__PURE__ */d("rect",{x:"46.5",y:"41.21",width:"7",height:"34.179"})]});function _l({description:e}){let t=/* @__PURE__ */d("span",{});return e&&(t=/* @__PURE__ */d("span",{style:{padding:"0 0 0 8px"},children:/* @__PURE__ */d(Xu,{buttonText:/* @__PURE__ */d(gl,{}),children:/* @__PURE__ */d("p",{children:e})})})),t}function yl({name:e,amount:t,description:n,method_name:r,formatName:o,forceMethod:s,currency:i="EUR"}){/* @__PURE__ */
|
|
49
|
+
return h("tr",{children:[/* @__PURE__ */h("td",{children:[o?ne(e):e,n&&/* @__PURE__ */d(l,{children:/* @__PURE__ */d(_l,{description:n})})]}),/* @__PURE__ */d("td",{className:"price",children:t&&t>0?/* @__PURE__ */h(l,{children:[re(t,{style:"currency",currency:i}),s&&/* @__PURE__ */h(l,{children:[" ",r]})]}):/* @__PURE__ */d(l,{children:r})})]})}function bl({prices:e}){const{insurances:t,required_costs:n}=e.total_costs,{not_on_site:r}=n,{currency:o}=e;/* @__PURE__ */
|
|
50
|
+
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(yl,{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(yl,{...e,currency:o},e.id):0===e.amount?null:/* @__PURE__ */d(yl,{...e,amount:r?.find(t=>t.id==e.id)?.amount??0,currency:o},e.id)})]})})})}yl.defaultValues={formatName:!1,forceMethod:!1};var vl=class extends Error{constructor(e,t){super(`No prices available for ${e} - ${t}`),this.name="PriceUnavailableError"}};async function wl(e){const t=function({apiUrl:e,portalCode:t,objectCode:n,startsAt:r,endsAt:o,persons:s,currency:i,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!==s&&p.set("persons",String(s)),i&&p.set("currency",i),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 au.get(t,{headers:{locale:e.locale}}).json()}catch(r){if(r instanceof ma){if(422===r.response.status)throw new vl(e.startsAt,e.endsAt);throw new Error(`Price request failed (${r.response.status})`)}throw r}if(!n.currency)throw new vl(e.startsAt,e.endsAt);return n}function kl({prices:e}){const{rent_price:t,discount:n,discounted_price:r,currency:o}=e;/* @__PURE__ */
|
|
51
|
+
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */h("tbody",{children:[/* @__PURE__ */d(yl,{name:"rent_price",formatName:!0,amount:t,currency:o}),n>0?/* @__PURE__ */h(l,{children:[/* @__PURE__ */d(yl,{name:"discount",formatName:!0,amount:n,currency:o}),/* @__PURE__ */d(yl,{name:"price_after_discount",formatName:!0,amount:r,currency:o})]}):null]})})})}function xl({prices:e}){const{optional_costs:t}=e.total_costs,{not_on_site:n}=t;/* @__PURE__ */
|
|
52
|
+
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(yl,{...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(yl,{...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(yl,{...t,amount:r,currency:e.currency},t.id)}}})})})})}function Sl({prices:e}){const{optional_costs:t}=e.total_costs,{on_site:n}=t;/* @__PURE__ */
|
|
53
|
+
return d(l,{children:e.optional_house_costs.map(t=>{if(t.on_site&&"0120"!==t.gl){if("none"===t.method)/* @__PURE__ */return d(yl,{...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(yl,{...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(yl,{...t,amount:r,currency:e.currency},t.id)}}})})}function Cl({prices:e}){const{required_costs:t}=e.total_costs,{on_site:n}=t;/* @__PURE__ */
|
|
54
|
+
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(yl,{...t,currency:e.currency},t.id);{let r=n.find(e=>e.id==t.id)?.amount??0;/* @__PURE__ */
|
|
55
|
+
return d(yl,{...t,amount:r,currency:e.currency},t.id)}}}),/* @__PURE__ */d(Sl,{prices:e})]})})]})}function El({children:e}){/* @__PURE__ */
|
|
56
|
+
return d("div",{className:"costs-section",children:/* @__PURE__ */d("table",{children:/* @__PURE__ */d("tbody",{children:e})})})}function Nl({prices:e}){const{currency:t}=e;/* @__PURE__ */
|
|
57
57
|
return h(l,{children:[
|
|
58
|
-
/* @__PURE__ */d(
|
|
59
|
-
/* @__PURE__ */h(
|
|
60
|
-
/* @__PURE__ */d(
|
|
61
|
-
/* @__PURE__ */d(
|
|
62
|
-
/* @__PURE__ */d(
|
|
63
|
-
/* @__PURE__ */d(
|
|
64
|
-
/* @__PURE__ */d(
|
|
65
|
-
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(
|
|
66
|
-
/* @__PURE__ */d(
|
|
67
|
-
/* @__PURE__ */d(
|
|
68
|
-
/* @__PURE__ */d(
|
|
69
|
-
/* @__PURE__ */d(
|
|
70
|
-
/* @__PURE__ */d(
|
|
58
|
+
/* @__PURE__ */d(El,{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})})]})}),
|
|
59
|
+
/* @__PURE__ */h(El,{children:[
|
|
60
|
+
/* @__PURE__ */d(Tl,{cost_array:e.required_house_costs,price_array:e.total_costs.required_costs.on_site,currency:t}),
|
|
61
|
+
/* @__PURE__ */d(Tl,{cost_array:e.required_house_costs,price_array:e.total_costs.required_costs.not_on_site,currency:t}),
|
|
62
|
+
/* @__PURE__ */d(Tl,{cost_array:e.optional_house_costs,price_array:e.total_costs.optional_costs.on_site,currency:t}),
|
|
63
|
+
/* @__PURE__ */d(Tl,{cost_array:e.optional_house_costs,price_array:e.total_costs.optional_costs.not_on_site,currency:t})]}),
|
|
64
|
+
/* @__PURE__ */d(El,{children:/* @__PURE__ */h("tr",{children:[/* @__PURE__ */d("th",{style:{textAlign:"left",textTransform:"capitalize"},children:ne("total")}),/* @__PURE__ */d("td",{className:"price",children:re(e.amount_due??e.total_costs.total_price,{style:"currency",currency:t})})]})})]})}function Tl({cost_array:e,price_array:t,currency:n}){/* @__PURE__ */
|
|
65
|
+
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(yl,{...e,amount:r.amount,currency:n},e.id)})})}function Rl({values:e,house:t,onPrices:n}){let r=Number(e.babies)-Number(t.babies_extra);r<0&&(r=0);const i=Number(e.children)+Number(e.adults)+r,{portalCode:a,objectCode:c,locale:p,apiUrl:f}=o(aa),{currency:m}=ha(),[g,_]=u(null),[y,b]=u(!0),[v,w]=u(null);return s(()=>{let t=!1;return b(!0),w(null),wl({apiUrl:f,locale:p,portalCode:a,objectCode:c,startsAt:e.arrivalDate.date,endsAt:e.departureDate.date,persons:i,currency:m,costs:e.costs,discount:Number(e.discount),discountCode:e.discount_code,cancelInsurance:Number(e.cancel_insurance)}).then(e=>{t||(_(e),b(!1),n?.(e))}).catch(e=>{t||(w(e),b(!1),n?.(null))}),()=>{t=!0}},[f,p,a,c,e.arrivalDate.date,e.departureDate.date,i,m,e.costs,e.discount,e.discount_code,e.cancel_insurance]),y?/* @__PURE__ */d("span",{children:"Loading..."}):v||!g?/* @__PURE__ */d("div",{children:String(v)}):/* @__PURE__ */h(l,{children:[
|
|
66
|
+
/* @__PURE__ */d(kl,{prices:g}),
|
|
67
|
+
/* @__PURE__ */d(bl,{prices:g}),
|
|
68
|
+
/* @__PURE__ */d(xl,{prices:g}),
|
|
69
|
+
/* @__PURE__ */d(Cl,{prices:g}),
|
|
70
|
+
/* @__PURE__ */d(Nl,{prices:g})]})}var Al=({size:e=16})=>/* @__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:[/* @__PURE__ */d("rect",{x:"3",y:"4",width:"14",height:"13",rx:"2"}),/* @__PURE__ */d("path",{d:"M3 8h14M7 2v4M13 2v4"})]}),Dl=({size:e=24})=>/* @__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:[
|
|
71
71
|
/* @__PURE__ */d("rect",{x:"3",y:"4",width:"14",height:"12",rx:"2"}),
|
|
72
72
|
/* @__PURE__ */d("circle",{cx:"7.5",cy:"8.5",r:"1.5"}),
|
|
73
|
-
/* @__PURE__ */d("path",{d:"M17 13l-4-4-7 7"})]})
|
|
73
|
+
/* @__PURE__ */d("path",{d:"M17 13l-4-4-7 7"})]}),$l={weekday:"short",day:"numeric",month:"short"};function Pl({house:e,values:t,onChangeDates:n}){const r=ze(e.image_url,e.image_urls,"72px"),{arrivalDate:o,departureDate:s}=t,i=le(o.date),a=le(s.date),c=Ce(a,i),u=[o.arrival_time_from&&o.arrival_time_to?`${ne(`${e.house_type}.arrival`)} ${o.arrival_time_from} - ${o.arrival_time_to}`:null,s.departure_time?`${ne(`${e.house_type}.departure`)} ${s.departure_time}`:null].filter(e=>null!==e);/* @__PURE__ */
|
|
74
74
|
return h("div",{className:"house-details bu-stay-card",children:[
|
|
75
75
|
/* @__PURE__ */d("h2",{className:"bu-visually-hidden",children:ne("booking_details")}),
|
|
76
|
-
/* @__PURE__ */h("div",{className:"bu-stay-card-house",children:[
|
|
76
|
+
/* @__PURE__ */h("div",{className:"bu-stay-card-house",children:[r?/* @__PURE__ */d("img",{src:r.src,srcSet:r.srcset,sizes:r.sizes,decoding:"async",alt:"",className:"bu-stay-card-image"}):/* @__PURE__ */d("div",{className:"bu-stay-card-image bu-stay-card-placeholder",children:/* @__PURE__ */d(Dl,{})}),/* @__PURE__ */d("div",{className:"bu-stay-card-name",children:e.name})]}),
|
|
77
77
|
/* @__PURE__ */h("div",{className:"bu-stay-card-dates",children:[
|
|
78
78
|
/* @__PURE__ */h("div",{className:"bu-stay-card-row",children:[/* @__PURE__ */h("span",{className:"bu-stay-card-range",children:[
|
|
79
|
-
/* @__PURE__ */d(
|
|
80
|
-
/* @__PURE__ */h("div",{className:"bu-stay-card-meta",children:[/* @__PURE__ */d("span",{children:ne("nights",{count:
|
|
79
|
+
/* @__PURE__ */d(Al,{}),ue(i,$l)," →"," ",ue(a,$l)]}),n&&/* @__PURE__ */d("button",{type:"button",className:"bu-link-button",onClick:n,children:ne("change_dates")})]}),
|
|
80
|
+
/* @__PURE__ */h("div",{className:"bu-stay-card-meta",children:[/* @__PURE__ */d("span",{children:ne("nights",{count:c})}),/* @__PURE__ */h("span",{children:[t.persons," ",ne("persons")]})]}),u.length>0&&/* @__PURE__ */d("div",{className:"bu-stay-card-meta",children:u.map(e=>/* @__PURE__ */d("span",{children:e},e))})]})]})}function jl({values:e,house:t,onChangeDates:n,onPrices:r}){/* @__PURE__ */
|
|
81
81
|
return h("div",{className:"bu-summary",children:[
|
|
82
|
-
/* @__PURE__ */d(
|
|
83
|
-
/* @__PURE__ */d(
|
|
84
|
-
/* @__PURE__ */d(
|
|
82
|
+
/* @__PURE__ */d(Pl,{house:t,values:e,onChangeDates:n}),
|
|
83
|
+
/* @__PURE__ */d(ml,{house:t}),
|
|
84
|
+
/* @__PURE__ */d(Rl,{values:e,house:t,onPrices:r})]})}var Il=({size:e=16})=>/* @__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:"M4 10h12M11 5l5 5-5 5"})}),Ll=({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:"M4 16h3l9-9-3-3-9 9z"})});function Ol({house:e,persons:t,onChange:n}){const{arrivalDate:r,departureDate:s}=o(cl);if(!r||!s)return null;const i=le(r.date),a=le(s.date),c=Ce(a,i),u=(e,t)=>/* @__PURE__ */h("button",{type:"button",className:"bu-date-pill",onClick:n,children:[/* @__PURE__ */d(Al,{}),/* @__PURE__ */h("span",{className:"bu-date-pill-text",children:[/* @__PURE__ */d("span",{className:"bu-date-pill-label",children:e}),/* @__PURE__ */d("span",{className:"bu-date-pill-value",children:ue(t,Ne)})]})]});/* @__PURE__ */
|
|
85
85
|
return h("div",{className:"bu-date-strip",children:[/* @__PURE__ */h("div",{className:"bu-date-strip-dates",children:[u(ne(`${e.house_type}.arrival`),i),
|
|
86
|
-
/* @__PURE__ */d("span",{className:"bu-date-strip-arrow","aria-hidden":"true",children:/* @__PURE__ */d(
|
|
86
|
+
/* @__PURE__ */d("span",{className:"bu-date-strip-arrow","aria-hidden":"true",children:/* @__PURE__ */d(Il,{size:18})}),u(ne(`${e.house_type}.departure`),a),
|
|
87
87
|
/* @__PURE__ */d("span",{className:"bu-pill",children:ne("nights",{count:c})}),
|
|
88
|
-
/* @__PURE__ */h("span",{className:"bu-pill",children:[t," ",ne("persons")]})]}),/* @__PURE__ */h("button",{type:"button",className:"bu-link-button bu-date-strip-change",onClick:n,children:[/* @__PURE__ */d(
|
|
88
|
+
/* @__PURE__ */h("span",{className:"bu-pill",children:[t," ",ne("persons")]})]}),/* @__PURE__ */h("button",{type:"button",className:"bu-link-button bu-date-strip-change",onClick:n,children:[/* @__PURE__ */d(Ll,{}),ne("change_dates")]})]})}function Ml({house:e}){/* @__PURE__ */
|
|
89
89
|
return h("div",{className:"legend bu-legend",children:[
|
|
90
90
|
/* @__PURE__ */h("div",{className:"bu-legend-item",children:[/* @__PURE__ */d("span",{className:"legend-field bu-legend-swatch arrival"}),ne(`${e.house_type}.arrival_date`)]}),
|
|
91
91
|
/* @__PURE__ */h("div",{className:"bu-legend-item",children:[/* @__PURE__ */d("span",{className:"legend-field bu-legend-swatch booked"}),ne("booked")]}),
|
|
92
92
|
/* @__PURE__ */h("div",{className:"bu-legend-item",children:[/* @__PURE__ */d("span",{className:"legend-field bu-legend-swatch departure"}),ne(`${e.house_type}.departure_date`)]}),
|
|
93
|
-
/* @__PURE__ */h("div",{className:"bu-legend-item",children:[/* @__PURE__ */d("span",{className:"legend-field bu-legend-swatch last_minute_discount"}),ne("discount")]})]})}async function
|
|
94
|
-
/* @__PURE__ */d("div",{className:"bu-month-title bu-text-center",children:/* @__PURE__ */d("span",{children:ue(e,Ee)})}),n?/* @__PURE__ */d("button",{type:"button",className:"bu-month-nav","aria-label":ne("next_month"),onClick:n,children:/* @__PURE__ */d(
|
|
95
|
-
return d("div",{className:"bu-days bu-grid bu-grid-cols-7",children:p})}function
|
|
96
|
-
return d("div",{className:"bu-weekdays bu-grid bu-grid-cols-7",children:n})}function
|
|
93
|
+
/* @__PURE__ */h("div",{className:"bu-legend-item",children:[/* @__PURE__ */d("span",{className:"legend-field bu-legend-swatch last_minute_discount"}),ne("discount")]})]})}async function Ul({apiUrl:e,locale:t,portalCode:n,objectCode:r,startsDate:o,endDate:s}){const i=function({apiUrl:e,portalCode:t,objectCode:n,startsDate:r,endDate:o}){const s=new URL("/portal_api/v1/accommodations/availability",new URL(e).origin);return s.search=new URLSearchParams({portal_code:t,object_code:n,starts_date:de(r),end_date:de(o)}).toString(),s.toString()}({apiUrl:e,portalCode:n,objectCode:r,startsDate:o,endDate:s});try{return await au.get(i,{headers:{locale:t}}).json()}catch(a){if(a instanceof ma)throw new Error(`Availability request failed (${a.response.status})`);throw a}}var ql=({size:e=16})=>/* @__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:"M12 5l-5 5 5 5"})}),Bl=({size:e=16})=>/* @__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:"M8 5l5 5-5 5"})}),Fl=({month:e,onPrev:t,onNext:n,prevDisabled:r=!1})=>/* @__PURE__ */h("div",{className:"bu-month-header bu-bold",children:[t?/* @__PURE__ */d("button",{type:"button",className:"bu-month-nav","aria-label":ne("previous_month"),disabled:r,onClick:t,children:/* @__PURE__ */d(ql,{})}):/* @__PURE__ */d("div",{className:"bu-month-nav bu-month-nav-spacer","aria-hidden":"true"}),
|
|
94
|
+
/* @__PURE__ */d("div",{className:"bu-month-title bu-text-center",children:/* @__PURE__ */d("span",{children:ue(e,Ee)})}),n?/* @__PURE__ */d("button",{type:"button",className:"bu-month-nav","aria-label":ne("next_month"),onClick:n,children:/* @__PURE__ */d(Bl,{})}):/* @__PURE__ */d("div",{className:"bu-month-nav bu-month-nav-spacer","aria-hidden":"true"})]});function zl({day:e,buDate:t,prevBooked:n,dates:r,house:o}){const{selectedDate:s,arrivalDate:i}=r;if(!s)return!1;const a=Ce(e,s),c=a>=(i?.min_nights??0),u=a<=o.max_nights&&a<=(i?.max_nights??0);return t.departure&&xe(e,s)&&c&&u&&void 0!==n&&0!==n.max_nights}function Hl({day:e,monthStart:t,buDate:n,prevBooked:r,dates:o,house:s,discounts:i}){const{selectedDate:a,departureDate:c,arrivalDate:u,hoverDate:l,hoverValid:d}=o,h=/* @__PURE__ */new Date,p=["bu-day"];if(!ke(e,t))return p.push("disabled"),p.join(" ");if(Se(e,pe(h,1))&&p.push("bu-past"),n&&(n.arrival&&xe(e,pe(h,1))&&0!==n.max_nights?0===r?.max_nights?p.push("departure-arrival"):p.push("arrival"):0===n.max_nights?void 0!==r&&0!==r.max_nights?p.push("booked-departure"):p.push("booked"):n.max_nights>0&&(void 0===r||0===r.max_nights)&&!n.arrival&&p.push("booked")),we(e,h)&&p.push("bu-today"),a&&(we(e,a)&&(p.push("selected","bu-stay-start"),c?p.push("bu-stay-has-end"):l&&d&&xe(l,a)&&p.push("bu-preview-start")),zl({day:e,buDate:n,prevBooked:r,dates:o,house:s})&&p.push("departure")),c&&a){const t=le(c.date);xe(e,a)&&Se(e,t)&&p.push("selected","bu-stay-in"),we(e,t)&&p.push("selected","bu-stay-end")}else a&&l&&xe(l,a)&&(we(e,l)?p.push("bu-preview",d?"bu-preview-end":"bu-preview-invalid"):d&&xe(e,a)&&Se(e,l)&&p.push("bu-preview","bu-preview-in"));const f=Ce(e,h),m=f<=s.last_minute_days&&f>0,g=i.find(t=>Se(pe(le(t.discount_starts_at),1),e)&&xe(he(le(t.discount_ends_at),1),e));return(m||g||n.special_offer>0)&&p.push("discount"),p.join(" ")}function Wl({availabilities:e,month:t,discounts:n,house:r}){const s=o(ul),i=o(cl),a=_e(t),c=ye(a),u=be(a),l=ve(c),h=/* @__PURE__ */new Date,p=[],f=null!==i.selectedDate&&null===i.departureDate;let m=u;for(;m<=l;){const t=de(m),o=de(pe(m,1)),c=e.find(e=>e.date===t),u=e.find(e=>e.date===o);if(!c||!ke(m,a)){p.push(/* @__PURE__ */d("div",{className:"bu-day disabled","aria-hidden":"true",children:/* @__PURE__ */d("span",{children:ue(m,{day:"numeric"})})},t)),m=he(m,1);continue}const l=c,g=m,_=Se(g,pe(h,1)),y=zl({day:g,buDate:c,prevBooked:u,dates:i,house:r}),b=Hl({day:g,monthStart:a,discounts:n,buDate:c,prevBooked:u,house:r,dates:i});let v;b.includes("bu-preview-invalid")&&i.arrivalDate&&i.selectedDate&&Ce(g,i.selectedDate)<i.arrivalDate.min_nights&&(v=ne("minimum_nights",{minimum:i.arrivalDate.min_nights}));const w=()=>{_||s({type:"clicked",day:l,house:r})};p.push(/* @__PURE__ */d("div",{className:b,role:"button",tabIndex:_?-1:0,"aria-label":ue(g,Ne),"aria-disabled":_||void 0,"data-bu-tip":v,onClick:w,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),w())},onMouseEnter:()=>{f&&!_&&s({type:"hover",date:g,valid:y})},onMouseLeave:()=>{f&&s({type:"unhover"})},children:/* @__PURE__ */d("span",{children:ue(g,{day:"numeric"})})},c.date)),m=he(m,1)}/* @__PURE__ */
|
|
95
|
+
return d("div",{className:"bu-days bu-grid bu-grid-cols-7",children:p})}function Yl({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__ */
|
|
96
|
+
return d("div",{className:"bu-weekdays bu-grid bu-grid-cols-7",children:n})}function Vl({count:e,currentMonth:t,house:n,availabilities:r,discounts:o,onPrev:s,onNext:i,prevDisabled:a}){const c=fe(t,e);/* @__PURE__ */
|
|
97
97
|
return h("div",{className:"bu-calendar calendar",children:[
|
|
98
|
-
/* @__PURE__ */d(
|
|
99
|
-
/* @__PURE__ */d(
|
|
100
|
-
/* @__PURE__ */d(
|
|
101
|
-
return d("div",{className:"bu-months",style:{"--bu-months-per-row":e||2},children:x})}function
|
|
102
|
-
return h("div",{className:"bu-assistance",role:"status",children:[/* @__PURE__ */h("span",{className:"bu-assistance-title",children:[ue(e,Ne)," →"," ",ue(r,Ne)]}),/* @__PURE__ */d("span",{className:"bu-assistance-hint",children:ne("nights",{count:Ce(r,e)})})]})}return n?.date?/* @__PURE__ */h("div",{className:"bu-assistance",role:"status",children:[/* @__PURE__ */d("span",{className:"bu-assistance-title",children:ne(`${e.house_type}.pick_your_departure_in_the_calendar`)}),/* @__PURE__ */h("span",{className:"bu-assistance-hint",children:[ne(`${e.house_type}.you_picked_arrival_date`)," ",ue(le(n.date),Ne)," ·"," ",ne("minimum_nights",{minimum:n.min_nights})]})]}):/* @__PURE__ */d("div",{className:"bu-assistance",role:"status",children:/* @__PURE__ */d("span",{className:"bu-assistance-title",children:ne(`${e.house_type}.pick_your_arrivaldate_in_the_calendar`)})})}function
|
|
98
|
+
/* @__PURE__ */d(Fl,{month:c,onPrev:s,onNext:i,prevDisabled:a}),
|
|
99
|
+
/* @__PURE__ */d(Yl,{month:c}),
|
|
100
|
+
/* @__PURE__ */d(Wl,{availabilities:r,discounts:o,month:c,house:n})]},c.toISOString())}function Jl({numberOfMonthsInARow:e,currentMonth:t,numberOfMonths:n,house:r,changeMonth:i}){const{portalCode:a,objectCode:c,locale:l,apiUrl:h}=o(aa),[f,m]=u(null),[g,_]=u(!0),[y,b]=u(!1);if(s(()=>{let e=!1;_(!0),b(!1);const r=be(_e(t)),o=ve(ye(fe(t,n-1)));return Ul({apiUrl:h,locale:l,portalCode:a,objectCode:c,startsDate:r,endDate:o}).then(t=>{e||(m(t),_(!1))}).catch(()=>{e||(b(!0),_(!1))}),()=>{e=!0}},[h,l,a,c,t,n]),g)/* @__PURE__ */return d("div",{children:/* @__PURE__ */d(p,{})});if(y||!f)/* @__PURE__ */return d("div",{children:"Error"});const v=!xe(_e(t),_e(/* @__PURE__ */new Date)),w=i?()=>i(fe(t,-n)):void 0,k=i?()=>i(fe(t,n)):void 0;let x=[];for(let o=0;o<n;o++)x.push(/* @__PURE__ */d(Vl,{house:r,currentMonth:t,count:o,availabilities:f.availabilities,discounts:f.discounts,onPrev:0===o?w:void 0,onNext:o===n-1?k:void 0,prevDisabled:v},de(fe(t,o)).slice(0,7)));/* @__PURE__ */
|
|
101
|
+
return d("div",{className:"bu-months",style:{"--bu-months-per-row":e||2},children:x})}function Kl({house:e}){const{departureDate:t,arrivalDate:n}=o(cl);if(t?.date&&n?.date){const e=le(n.date),r=le(t.date);/* @__PURE__ */
|
|
102
|
+
return h("div",{className:"bu-assistance",role:"status",children:[/* @__PURE__ */h("span",{className:"bu-assistance-title",children:[ue(e,Ne)," →"," ",ue(r,Ne)]}),/* @__PURE__ */d("span",{className:"bu-assistance-hint",children:ne("nights",{count:Ce(r,e)})})]})}return n?.date?/* @__PURE__ */h("div",{className:"bu-assistance",role:"status",children:[/* @__PURE__ */d("span",{className:"bu-assistance-title",children:ne(`${e.house_type}.pick_your_departure_in_the_calendar`)}),/* @__PURE__ */h("span",{className:"bu-assistance-hint",children:[ne(`${e.house_type}.you_picked_arrival_date`)," ",ue(le(n.date),Ne)," ·"," ",ne("minimum_nights",{minimum:n.min_nights})]})]}):/* @__PURE__ */d("div",{className:"bu-assistance",role:"status",children:/* @__PURE__ */d("span",{className:"bu-assistance-title",children:ne(`${e.house_type}.pick_your_arrivaldate_in_the_calendar`)})})}function Gl({house:e,numberOfMonths:t,numberOfMonthsInARow:n,onClose:r,onApply:s}){const{selectedDate:i,arrivalDate:a,departureDate:c}=o(cl),[p,f]=u(()=>_e(i??/* @__PURE__ */new Date));/* @__PURE__ */
|
|
103
103
|
return h(l,{children:[
|
|
104
|
-
/* @__PURE__ */d(
|
|
105
|
-
/* @__PURE__ */d(
|
|
106
|
-
/* @__PURE__ */h("div",{className:"bu-popover-footer",children:[/* @__PURE__ */d(
|
|
104
|
+
/* @__PURE__ */d(Kl,{house:e}),
|
|
105
|
+
/* @__PURE__ */d(Jl,{house:e,numberOfMonths:t,numberOfMonthsInARow:n,currentMonth:p,changeMonth:f}),
|
|
106
|
+
/* @__PURE__ */h("div",{className:"bu-popover-footer",children:[/* @__PURE__ */d(Ml,{house:e}),/* @__PURE__ */h("div",{className:"bu-popover-actions",children:[/* @__PURE__ */d("button",{type:"button",className:"bu-button-ghost",onClick:r,children:ne("close")}),/* @__PURE__ */d("button",{type:"button",className:"bu-button-primary",disabled:!a||!c,onClick:()=>{a&&c&&s(a,c)},children:ne("done")})]})]})]})}function Xl({house:e,numberOfMonths:t,numberOfMonthsInARow:n,onClose:r}){const i=o(cl),a=o(ul);return s(()=>{const e=e=>{"Escape"===e.key&&r()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r]),/* @__PURE__ */h(l,{children:[/* @__PURE__ */d("div",{className:"bu-popover-backdrop",onClick:r}),/* @__PURE__ */d("div",{className:"bu-popover",role:"dialog","aria-modal":"true","aria-label":ne("change_dates"),children:/* @__PURE__ */d(ll,{initialState:{selectedDate:i.selectedDate,arrivalDate:i.arrivalDate,departureDate:i.departureDate,persons:i.persons,bookingStarted:!0},children:/* @__PURE__ */d(Gl,{house:e,numberOfMonths:t,numberOfMonthsInARow:n,onClose:r,onApply:(e,t)=>{a({type:"set_dates",arrivalDate:e,departureDate:t}),r()}})})})]})}function Ql({label:e,description:t,count:n=0,name:r}){const o=Qu(n),s=il(r);/* @__PURE__ */
|
|
107
107
|
return h("div",{className:"form-row inline",id:`bukazu_form_${r}`,children:[
|
|
108
108
|
/* @__PURE__ */d("label",{htmlFor:r,children:ne(e)}),
|
|
109
|
-
/* @__PURE__ */d("select",{id:r,name:r,value:String(s.value),onChange:s.onChange,onBlur:s.onBlur,children:o.map(e=>/* @__PURE__ */d("option",{value:e,children:e},e))}),t,s.touched&&s.error&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:s.error})]})}function
|
|
109
|
+
/* @__PURE__ */d("select",{id:r,name:r,value:String(s.value),onChange:s.onChange,onBlur:s.onBlur,children:o.map(e=>/* @__PURE__ */d("option",{value:e,children:e},e))}),t,s.touched&&s.error&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:s.error})]})}function Zl({label:e,description:t,name:n,inline:r,required:o=!1}){const s=il(n),i="string"==typeof s.value&&""!==s.value?s.value:"";/* @__PURE__ */
|
|
110
110
|
return h("div",{className:`form-row ${r&&"inline"}`,id:`bukazu_form_${n}`,children:[
|
|
111
111
|
/* @__PURE__ */d("label",{htmlFor:n,children:ne(e)}),
|
|
112
112
|
/* @__PURE__ */d("input",{type:"date",className:"bukazu-date-picker",id:n,name:n,required:o,value:i,onChange:s.onChange,onBlur:s.onBlur}),
|
|
113
|
-
/* @__PURE__ */d("span",{className:"bu-input-description",children:t}),s.touched&&s.error&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:s.error})]})}
|
|
113
|
+
/* @__PURE__ */d("span",{className:"bu-input-description",children:t}),s.touched&&s.error&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:s.error})]})}Zl.defaultValues={inline:!0};var ed=()=>{const{locale:e}=o(aa);/* @__PURE__ */
|
|
114
114
|
return h(l,{children:[
|
|
115
115
|
/* @__PURE__ */d("h2",{children:ne("cancel_insurance_normal_long")}),
|
|
116
116
|
/* @__PURE__ */d("p",{children:ne("cancel_insurance_normal_desc")}),
|
|
@@ -124,71 +124,71 @@ return h(l,{children:[
|
|
|
124
124
|
/* @__PURE__ */h("p",{children:[ne("cancel_insurance_questions_explain_1"),
|
|
125
125
|
/* @__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")]}),
|
|
126
126
|
/* @__PURE__ */d("h3",{children:ne("terms")}),
|
|
127
|
-
/* @__PURE__ */d("a",{href:`https://api.bukazu.com/files/${e}/insurance.pdf`,target:"_blank",rel:"noopener noreferrer",children:ne("show_terms")})]})};function
|
|
127
|
+
/* @__PURE__ */d("a",{href:`https://api.bukazu.com/files/${e}/insurance.pdf`,target:"_blank",rel:"noopener noreferrer",children:ne("show_terms")})]})};function td(){const e=il("cancel_insurance"),{setFieldValue:t}=sl(),n=String(e.value),r=(e,r)=>/* @__PURE__ */d("button",{type:"button",className:"bu-chip","aria-pressed":n===e,onClick:()=>t("cancel_insurance",e),children:ne(r)});/* @__PURE__ */
|
|
128
128
|
return h("div",{className:"form-row bu-insurance",children:[
|
|
129
|
-
/* @__PURE__ */h("div",{className:"bu-field-label",id:"cancel_insurance_label",children:[ne("cancel_insurance"),/* @__PURE__ */d(
|
|
129
|
+
/* @__PURE__ */h("div",{className:"bu-field-label",id:"cancel_insurance_label",children:[ne("cancel_insurance"),/* @__PURE__ */d(Xu,{buttonText:/* @__PURE__ */d(gl,{}),children:/* @__PURE__ */d(ed,{})})]}),
|
|
130
130
|
/* @__PURE__ */h("div",{className:"bu-chips",role:"group","aria-labelledby":"cancel_insurance_label",children:[r("0","none"),r("1","cancel_insurance_normal")]}),
|
|
131
|
-
/* @__PURE__ */d("input",{type:"hidden",name:"cancel_insurance",value:n})]})}var
|
|
131
|
+
/* @__PURE__ */d("input",{type:"hidden",name:"cancel_insurance",value:n})]})}var nd=({house:e,values:t})=>e.cancel_insurance?/* @__PURE__ */h("div",{className:"form-section bup-16",id:"insurances",children:[
|
|
132
132
|
/* @__PURE__ */d("h2",{children:ne("insurances")}),
|
|
133
|
-
/* @__PURE__ */d(
|
|
133
|
+
/* @__PURE__ */d(td,{}),t.cancel_insurance&&"0"!==t.cancel_insurance&&/* @__PURE__ */d(Zl,{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",{}),rd=class extends Error{constructor(e){super(`Discount code request failed (${e})`),this.name="DiscountCodeError",this.status=e,this.notFound=404===e}};async function od(e){const t=function({apiUrl:e,portalCode:t,objectCode:n,code:r,currency:o}){const s=new URL("/portal_api/v1/accommodations/discount-code",new URL(e).origin),i=new URLSearchParams({portal_code:t,object_code:n,code:r});return o&&i.set("currency",o),s.search=i.toString(),s.toString()}(e);try{return await au.get(t,{headers:{locale:e.locale}}).json()}catch(n){if(n instanceof ma)throw new rd(n.response.status);throw n}}function sd({house:e}){const{apiUrl:t,locale:n,portalCode:r}=o(aa),{currency:s}=ha(),i=il("discount_code"),[a,l]=u(null),[p,f]=u(!1),[m,g]=u(!1),[_,y]=u(!1),b=c(0);/* @__PURE__ */
|
|
134
134
|
return h("div",{className:"form-row inline",children:[
|
|
135
135
|
/* @__PURE__ */d("label",{htmlFor:"discount_code",children:ne("discount_code")}),
|
|
136
|
-
/* @__PURE__ */d("input",{id:"discount_code",name:"discount_code",value:String(i.value),onBlur:o=>{i.onBlur(),(o=>{const i=++b.current;if(""===o)return l(null),g(!1),y(!1),void f(!1);f(!0),
|
|
136
|
+
/* @__PURE__ */d("input",{id:"discount_code",name:"discount_code",value:String(i.value),onBlur:o=>{i.onBlur(),(o=>{const i=++b.current;if(""===o)return l(null),g(!1),y(!1),void f(!1);f(!0),od({apiUrl:t,locale:n,portalCode:r,objectCode:e.code,code:o,currency:s}).then(e=>{i===b.current&&(l(e),g(!1),y(!1),f(!1))}).catch(e=>{if(i!==b.current)return;const t=e instanceof rd&&e.notFound;l(null),g(t),y(!t),f(!1)})})(o.target.value.trim())},onChange:i.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 id=({errors:e,house:t,bookingFormConfiguration:n,values:r})=>{const o=il("discount"),s=il("discount_reason"),[i,a]=u(Number(r.discount)>0||""!==r.discount_code);if(t.discounts&&"0"!==t.discounts||n.show_discount_code){const r=t.discounts?t.discounts.split(","):[];/* @__PURE__ */
|
|
137
137
|
return h("div",{className:"form-section bup-16 bu-discount",children:[/* @__PURE__ */h("div",{className:"bu-section-head",children:[/* @__PURE__ */d("h2",{children:ne("discount")}),/* @__PURE__ */d("button",{type:"button",className:"bu-link-button bu-discount-toggle","aria-expanded":i,onClick:()=>a(e=>!e),children:ne(i?"hide":"have_discount_code")})]}),i&&/* @__PURE__ */h("div",{className:"bu-discount-fields",children:[t.discounts&&"0"!==t.discounts&&/* @__PURE__ */h(l,{children:[
|
|
138
138
|
/* @__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))})]}),
|
|
139
139
|
/* @__PURE__ */h("div",{className:"form-row inline",children:[
|
|
140
140
|
/* @__PURE__ */d("label",{htmlFor:"discount_reason",children:ne("discount_reason")}),
|
|
141
|
-
/* @__PURE__ */d("input",{id:"discount_reason",name:"discount_reason",value:String(s.value),onChange:s.onChange,onBlur:s.onBlur}),e.discount_reason&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:e.discount_reason})]}),t.discounts_info&&/* @__PURE__ */d("div",{className:"bu-discount-info",children:t.discounts_info})]}),n.show_discount_code&&/* @__PURE__ */d(
|
|
142
|
-
/* @__PURE__ */d("div",{className:"bu-success-icon",children:/* @__PURE__ */d(
|
|
141
|
+
/* @__PURE__ */d("input",{id:"discount_reason",name:"discount_reason",value:String(s.value),onChange:s.onChange,onBlur:s.onBlur}),e.discount_reason&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:e.discount_reason})]}),t.discounts_info&&/* @__PURE__ */d("div",{className:"bu-discount-info",children:t.discounts_info})]}),n.show_discount_code&&/* @__PURE__ */d(sd,{house:t})]})]})}return null},ad=({size:e=12})=>/* @__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:"M4 10l4 4 8-8"})}),cd=()=>/* @__PURE__ */h("div",{className:"success-message bu-success",children:[
|
|
142
|
+
/* @__PURE__ */d("div",{className:"bu-success-icon",children:/* @__PURE__ */d(ad,{size:28})}),
|
|
143
143
|
/* @__PURE__ */d("h3",{children:ne("thank_you_for_your_request")}),
|
|
144
144
|
/* @__PURE__ */d("p",{children:ne("we_sent_confirmation_check_email")}),
|
|
145
|
-
/* @__PURE__ */d("p",{className:"bu-success-hint",children:ne("returning_to_calendar")})]}),
|
|
146
|
-
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
|
|
145
|
+
/* @__PURE__ */d("p",{className:"bu-success-hint",children:ne("returning_to_calendar")})]}),ud=/* @__PURE__ */new Map,ld={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 dd(e){const t=R(e);if(ud.has(t))return ud.get(t);const n=await async function(e){return X(await ld[e](),`Failed to load country data for locale "${e}"`)}(t);return ud.set(t,n),n}var hd=[{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 pd({name:e,type:t="text",required:n=!1,onKeyPress:r}){const o=il(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 fd({bookingField:e,required:t=!1}){const n=il(`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 md({countries:e,disabled:t,required:n=!1}){const r=il("country");/* @__PURE__ */
|
|
146
|
+
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 gd({bookingFields:e,errors:t,touched:n,PortalSite:r,values:o}){const[a,c]=u([]),[l,p]=u(!0);s(()=>{let e=!0;const t="undefined"!=typeof window&&window.__localeId__||"en";return(async()=>{try{const n=await dd(t);e&&c(n)}catch{}finally{e&&p(!1)}})(),()=>{e=!1}},[]);const f=i(()=>{const t=[...e];return"1"!==o.cancel_insurance&&"2"!==o.cancel_insurance||["address","house_number","zipcode","city"].forEach(n=>{const r=hd.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__ */
|
|
147
147
|
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:s}){const i="telephone"===e.id?"phonenumber":e.id;if("booking_field"===e.type||Fe(i)){const n=t.booking_fields?.find(e=>e.id===i);return n?/* @__PURE__ */h("div",{className:"form-row",children:[
|
|
148
148
|
/* @__PURE__ */h("label",{htmlFor:`extra_fields.booking_field_${n.id}`,children:[n.label," ",e.required&&/* @__PURE__ */d("span",{children:"*"})]}),
|
|
149
|
-
/* @__PURE__ */d(
|
|
149
|
+
/* @__PURE__ */d(fd,{bookingField:n,required:e.required}),o[e.id]&&(s.extra_fields&&s.extra_fields[`booking_field_${n.id}`]||s[e.id])&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:o[e.id]})]},n.id):null}return"country"===i?/* @__PURE__ */h("div",{className:"form-row",children:[
|
|
150
150
|
/* @__PURE__ */h("label",{htmlFor:i,children:[t[`${i}_label`]," ",e.required&&/* @__PURE__ */d("span",{children:"*"})]}),
|
|
151
|
-
/* @__PURE__ */d(
|
|
151
|
+
/* @__PURE__ */d(md,{countries:n,disabled:r,required:e.required}),o[i]&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:o[i]})]},i):"date"===e.type?/* @__PURE__ */d("div",{className:"form-row",children:/* @__PURE__ */d(Zl,{name:i,label:i,inline:!1,required:e.required})},i):/* @__PURE__ */h("div",{className:"form-row",children:[
|
|
152
152
|
/* @__PURE__ */h("label",{htmlFor:i,children:[t[`${i.replace(/\./g,"_")}_label`]," ",e.required&&/* @__PURE__ */d("span",{children:"*"})]}),
|
|
153
|
-
/* @__PURE__ */d(
|
|
153
|
+
/* @__PURE__ */d(pd,{type:e.type,name:i,required:e.required,onKeyPress:e=>{13===e.which&&e.preventDefault()}}),o[i]&&s[i]&&/* @__PURE__ */d("div",{className:"error-message bu-error-message",children:o[i]})]},i)}({input:e,PortalSite:r,countries:a,countriesLoading:l,errors:t,touched:n}))]})}function _d({cost:e}){const t=`costs[${e.id}]`,n=il(t),{setFieldValue:r}=sl();if(1===e.max_available){const o=String(n.value),s=(e,n)=>/* @__PURE__ */d("button",{type:"button","aria-pressed":o===e,onClick:()=>r(t,e),children:ne(n)});/* @__PURE__ */
|
|
154
154
|
return h("div",{className:"bu-segmented",role:"group","aria-labelledby":`bu_cost_${e.id}`,children:[s("0","no"),s("1","yes"),
|
|
155
155
|
/* @__PURE__ */d("input",{type:"hidden",id:e.id,name:t,value:o})]})}/* @__PURE__ */
|
|
156
|
-
return d("select",{id:e.id,name:t,className:"bu-extra-quantity",value:String(n.value),onChange:n.onChange,onBlur:n.onBlur,children:
|
|
156
|
+
return d("select",{id:e.id,name:t,className:"bu-extra-quantity",value:String(n.value),onChange:n.onChange,onBlur:n.onBlur,children:Qu(e.max_available).map(e=>/* @__PURE__ */d("option",{value:e,children:e},e))})}function yd({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",{className:"bu-extras",children:e.map(e=>!["none","total"].includes(e.method)&&e.max_available>0?/* @__PURE__ */h("div",{className:"form-row bu-extra-row",children:[/* @__PURE__ */h("div",{className:"bu-extra-info",children:[/* @__PURE__ */h("label",{htmlFor:e.id,id:`bu_cost_${e.id}`,className:"bu-extra-name",children:[e.name,e.description?/* @__PURE__ */d(Xu,{buttonText:/* @__PURE__ */d(gl,{}),children:/* @__PURE__ */d("p",{children:e.description})}):null]}),/* @__PURE__ */h("div",{className:"price_per bu-extra-price",children:[re(e.amount,{style:"currency",currency:t??"EUR"})," ",e.method_name]})]}),/* @__PURE__ */d(_d,{cost:e})]},e.id):"")})]})}function bd({bookingFormConfiguration:e,house:t}){/* @__PURE__ */
|
|
157
157
|
return h("div",{className:"bu-guests",children:[
|
|
158
|
-
/* @__PURE__ */d(
|
|
159
|
-
/* @__PURE__ */d(
|
|
158
|
+
/* @__PURE__ */d(Ql,{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(Ql,{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(Ql,{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 vd(e,t,n){const{persons:r}=t,o={},s=rl(t,e);for(const a of n){if(!a.required)continue;if(Fe(a.id)){const t=tl(e,`extra_fields.booking_field_${a.id}`);t&&""!==t||(o[a.id]=ne("required"));continue}const t=tl(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")),s>r&&(o.max_persons=ne("max_persons_reached"));const i=e.extra_fields?.date_of_birth;return"0"!==e.cancel_insurance&&i&&xe(new Date(i),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 wd({house:e,PortalSite:t}){const{persons:n,arrivalDate:a,departureDate:c}=o(cl),{locale:p,portalCode:f,objectCode:m,apiUrl:g}=o(aa),{currency:_}=ha(),y=o(ul),{options:b,bookingFormConfiguration:v}=t,w=b.bookingFields.map(e=>"telephone"===e.id?{...e,id:"phonenumber"}:e),k=e.booking_price,x=r(()=>{const t={};for(const e of k.optional_house_costs)t[e.id]="0";const r={...Zu(w),arrivalDate:a,departureDate:c,is_option:"false",costs:t,adults:n,children:0,babies:0,persons:n,discount:0,country:"nl",cancel_insurance:"0",discount_code:"",currency:_??"",extra_fields:{}};return{...r,persons:rl(e,r)}},[a,w,k.optional_house_costs,c,e,n,_]),[S,C]=u(()=>x()),[E,N]=u({}),[T,R]=u(!1),[A,D]=u(null),[$,P]=u(null),[j,I]=u({}),[L,O]=u(!1),[M,U]=u(!1),[q,B]=u(null),F=r(()=>O(!0),[]),z=r(()=>O(!1),[]);s(()=>{a&&c&&C(e=>e.arrivalDate===a&&e.departureDate===c?e:{...e,arrivalDate:a,departureDate:c})},[a,c]);const H=r(()=>{D(null),I({})},[]),W=r((t,n)=>{I(e=>void 0===e[t]?e:{...e,[t]:void 0}),C(r=>{let o=nl(r,t,n);return["adults","children","babies"].includes(t)&&(o={...o,persons:rl(e,o)}),o})},[e]),Y=r((e,t=!0)=>{N(n=>nl(n,e,t))},[]),V=$u()||null,J=i(()=>({...j,...vd(S,e,w)}),[w,e,j,S]),K=r(async t=>{t.preventDefault();const n={house_code:m,portal_code:f,locale:p},r=e=>{ju({...n,interaction_type:"booking_form_error",interaction_info:{fields:e.filter(Pu)}})},o=vd(S,e,w);if(N(function(e,t){let n={adults:!0,children:!0,babies:!0,cancel_insurance:!0};return e.forEach(e=>{n=nl(n,Fe(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=nl(n,e,!0)}),n=nl(n,"extra_fields.date_of_birth",!0)),n}(w,S)),Object.keys(o).length>0)r(Object.keys(o));else{R(!0),D(null),I({});try{const e=await Yu({apiUrl:g,locale:p,payload:Gu({values:S,objectCode:m,portalCode:f,locale:p,sessionIdentifier:V})});P(e);const t=v.redirect_urls??{},n=e.redirect_to_payment&&e.payment_url||e.redirect_url||t[p];n&&""!==n?(s=n,window.location.href=s):setTimeout(()=>{y({type:"return"})},15e3)}catch(i){if(ju({...n,interaction_type:"booking_failed",interaction_info:{error_key:i instanceof Wu?`http_${i.status}`:"network"}}),D(i instanceof Error?i:/* @__PURE__ */new Error("The booking could not be created")),i instanceof Wu&&i.fieldErrors){const e={};for(const[t,n]of Object.entries(i.fieldErrors))e[t]=n.join(" ");I(e),r(Object.keys(i.fieldErrors))}}finally{R(!1)}var s}},[g,w,v,y,e,p,m,f,V,S]),G=Math.min(2,Math.max(1,v.show_months_amount||2)),X=t.form_submit_button_text||ne("book"),Q=q?re(q.total_costs.sub_total,{style:"currency",currency:q.currency}):null,Z=/* @__PURE__ */h(l,{children:[
|
|
159
|
+
/* @__PURE__ */d(jl,{house:e,values:S,onChangeDates:F,onPrices:B}),
|
|
160
160
|
/* @__PURE__ */h("div",{className:"terms",children:[t.form_submit_text," ",
|
|
161
|
-
/* @__PURE__ */d(
|
|
161
|
+
/* @__PURE__ */d(Xu,{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(S.cancel_insurance))?/* @__PURE__ */d("div",{className:"terms",children:ne("comply_insurance_card")}):null,
|
|
162
162
|
/* @__PURE__ */d("button",{className:"bu-calendar-button",type:"submit",disabled:T,children:X})]});/* @__PURE__ */
|
|
163
|
-
return d(
|
|
163
|
+
return d(ol.Provider,{value:{values:S,errors:J,touched:E,isSubmitting:T,setFieldValue:W,setFieldTouched:Y},children:/* @__PURE__ */h("form",{className:"form bu-booking",onSubmit:K,children:[T&&/* @__PURE__ */d("div",{className:"return-message",children:"Creating booking..."}),A&&/* @__PURE__ */d(Xu,{show:!0,onClose:H,children:/* @__PURE__ */d(ra,{errors:A})}),$&&/* @__PURE__ */d(Xu,{show:!0,children:/* @__PURE__ */d(cd,{})}),
|
|
164
164
|
/* @__PURE__ */h("div",{className:"bu-booking-head",children:[
|
|
165
165
|
/* @__PURE__ */d("a",{className:"return-link bu-link-button",role:"link",tabIndex:0,onClick:()=>{y({type:"return"})},children:ne("return_to_calendar")}),
|
|
166
|
-
/* @__PURE__ */d(
|
|
166
|
+
/* @__PURE__ */d(Ol,{house:e,persons:S.persons,onChange:F}),L&&/* @__PURE__ */d(Xl,{house:e,numberOfMonths:G,numberOfMonthsInARow:G,onClose:z})]}),
|
|
167
167
|
/* @__PURE__ */h("div",{className:"bu-booking-body",children:[
|
|
168
168
|
/* @__PURE__ */h("div",{className:"form-content",children:[
|
|
169
169
|
/* @__PURE__ */h("div",{className:"form-section bup-16",children:[
|
|
170
170
|
/* @__PURE__ */d("h2",{children:ne("stay_details")}),
|
|
171
|
-
/* @__PURE__ */d(
|
|
172
|
-
/* @__PURE__ */d(
|
|
173
|
-
/* @__PURE__ */d(
|
|
174
|
-
/* @__PURE__ */d(
|
|
175
|
-
/* @__PURE__ */d(
|
|
176
|
-
/* @__PURE__ */h("div",{className:"form-sum bup-16"+(
|
|
177
|
-
/* @__PURE__ */h("div",{className:"bu-form-bar",children:[/* @__PURE__ */h("button",{type:"button",className:"bu-form-bar-total","aria-expanded":
|
|
171
|
+
/* @__PURE__ */d(bd,{bookingFormConfiguration:v,house:e}),J.max_persons&&/* @__PURE__ */d("div",{className:"error-message bu-error-message persons",children:J.max_persons})]}),
|
|
172
|
+
/* @__PURE__ */d(id,{errors:J,house:e,bookingFormConfiguration:v,values:S}),
|
|
173
|
+
/* @__PURE__ */d(nd,{house:e,values:S}),
|
|
174
|
+
/* @__PURE__ */d(yd,{costs:k.optional_house_costs,currency:k.currency}),
|
|
175
|
+
/* @__PURE__ */d(gd,{bookingFields:w,errors:J,touched:E,PortalSite:t,values:S})]}),
|
|
176
|
+
/* @__PURE__ */h("div",{className:"form-sum bup-16"+(M?" bu-open":""),children:[/* @__PURE__ */h("div",{className:"bu-sheet-head",children:[/* @__PURE__ */d("span",{className:"bu-sheet-title",children:ne("your_booking")}),/* @__PURE__ */d("button",{type:"button",className:"bu-sheet-close","aria-label":ne("close"),onClick:()=>U(!1),children:/* @__PURE__ */d(oe,{size:18})})]}),Z]}),M&&/* @__PURE__ */d("div",{className:"bu-form-backdrop",onClick:()=>U(!1)})]}),
|
|
177
|
+
/* @__PURE__ */h("div",{className:"bu-form-bar",children:[/* @__PURE__ */h("button",{type:"button",className:"bu-form-bar-total","aria-expanded":M,onClick:()=>U(!0),children:[/* @__PURE__ */d("span",{className:"bu-form-bar-amount",children:Q??"—"}),/* @__PURE__ */d("span",{className:"bu-form-bar-hint",children:ne("view_breakdown")})]}),/* @__PURE__ */d("button",{className:"bu-form-bar-submit",type:"submit",disabled:T,children:X})]})]})})}var kd=/* @__PURE__ */new Set;function xd(e){return!kd.has(e)&&(kd.add(e),!0)}function Sd(e,t){return xd(`price_unavailable:${e}:${t.arrival}:${t.departure}`)}function Cd({portalSite:e}){const{portalCode:t,objectCode:n,locale:r,apiUrl:i}=o(aa),{currency:a}=ha(),{arrivalDate:l,departureDate:h,persons:f}=o(cl),[m,g]=u(null),[_,y]=u(null),b=c(/* @__PURE__ */new Set);return s(()=>{let e=!1;y(null);const o={arrival:l.date,departure:h.date},s={house_code:n,portal_code:t,locale:r};return wl({apiUrl:i,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)})()&&ju({...s,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 vl&&Sd(n,o)&&ju({...s,interaction_type:"price_unavailable",interaction_info:o}))}),()=>{e=!0}},[i,r,t,n,l,h,f,a]),m||_?_||!m?/* @__PURE__ */d("div",{children:ne(_ instanceof vl?"no_prices_available_for_period":"something_went_wrong_please_try_again")}):/* @__PURE__ */d(wd,{house:m,PortalSite:e}):/* @__PURE__ */d("div",{children:/* @__PURE__ */d(p,{})})}var Ed=class extends Error{constructor(e){super(`Accommodation detail request failed (${e})`),this.name="AccommodationDetailError",this.status=e,this.notFound=404===e}};async function Nd(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 au.get(t,{headers:{locale:e.locale}}).json()}catch(n){if(n instanceof ma)throw new Ed(n.response.status);throw n}}function Td({persons:e,variables:t}){const{portalCode:n,objectCode:r,locale:i,apiUrl:a}=o(aa),{currency:c}=ha(),[l,f]=u(null),[m,g]=u(!0),[_,y]=u(null);return s(()=>{let o=!1;g(!0),y(null);const s={arrival:t.starts_at,departure:t.ends_at};return wl({apiUrl:a,locale:i,portalCode:n,objectCode:r,startsAt:t.starts_at,endsAt:t.ends_at,persons:e,currency:c}).then(t=>{o||(f(t),g(!1),function(e,t,n){return xd(`quote_shown:${e}:${t.arrival}:${t.departure}:${n}`)}(r,s,e)&&ju({house_code:r,portal_code:n,locale:i,interaction_type:"quote_shown",interaction_info:{...s,persons:e,total_cents:Math.round(100*t.total_price),currency:t.currency.toUpperCase()}}))}).catch(e=>{o||(y(e),g(!1),e instanceof vl&&Sd(r,s)&&ju({house_code:r,portal_code:n,locale:i,interaction_type:"price_unavailable",interaction_info:s}))}),()=>{o=!0}},[a,i,n,r,t.starts_at,t.ends_at,e,c]),m?/* @__PURE__ */d("div",{className:"price-overview--build bu-stay-price bu-stay-price-loading",children:/* @__PURE__ */d(p,{})}):_||!l?/* @__PURE__ */d("div",{className:"price-overview--build bu-stay-price bu-stay-price-error",children:ne(_ instanceof vl?"no_prices_available_for_period":"something_went_wrong_please_try_again")}):/* @__PURE__ */h("div",{className:"price-overview--book bu-stay-price",children:[/* @__PURE__ */d("div",{className:"price bu-stay-price-value",children:re(Math.round(l.total_price),{style:"currency",currency:l.currency})}),/* @__PURE__ */d("div",{className:"bu-stay-price-hint",children:ne("based_on_one_person",{persons:e})})]})}function Rd({house:e}){const t=e.persons>2?2:e.persons,[n,r]=u(t),{arrivalDate:s,departureDate:i}=o(cl),a=o(ul),c=Qu(e.persons),l=Boolean(s&&i),p=s&&i?Ce(le(i.date),le(s.date)):0;/* @__PURE__ */
|
|
178
178
|
return h("div",{className:"calendar--picker bu-stay-bar",children:[/* @__PURE__ */h("div",{className:"bu-stay-bar-dates",children:[
|
|
179
179
|
/* @__PURE__ */h("div",{className:"bu-stay-slot",children:[/* @__PURE__ */d("span",{className:"bu-stay-slot-label",children:ne(`${e.house_type}.arrival`)}),/* @__PURE__ */d("span",{className:"bu-stay-slot-value"+(s?"":" bu-empty"),children:s?ue(le(s.date),Ne):ne(`${e.house_type}.pick_your_arrivaldate_in_the_calendar`)})]}),
|
|
180
|
-
/* @__PURE__ */d("span",{className:"bu-stay-arrow","aria-hidden":"true",children:/* @__PURE__ */d(
|
|
180
|
+
/* @__PURE__ */d("span",{className:"bu-stay-arrow","aria-hidden":"true",children:/* @__PURE__ */d(Il,{size:18})}),
|
|
181
181
|
/* @__PURE__ */h("div",{className:"bu-stay-slot",children:[/* @__PURE__ */d("span",{className:"bu-stay-slot-label",children:ne(`${e.house_type}.departure`)}),/* @__PURE__ */d("span",{className:"bu-stay-slot-value"+(i?"":" bu-empty"),children:i?ue(le(i.date),Ne):s?ne(`${e.house_type}.pick_your_departure_in_the_calendar`):"—"})]}),l?/* @__PURE__ */d("span",{className:"bu-pill bu-stay-nights",children:ne("nights",{count:p})}):s?/* @__PURE__ */d("span",{className:"bu-stay-nights bu-stay-nights-empty",children:ne("minimum_nights",{minimum:s.min_nights})}):null,
|
|
182
182
|
/* @__PURE__ */h("label",{className:"bu-stay-persons",children:[/* @__PURE__ */d("span",{className:"bu-visually-hidden",children:ne("persons")}),/* @__PURE__ */d("select",{className:"calendar--picker--persons",value:n,disabled:!l,onChange:e=>{r(Number(e.target.value))},children:c.map(e=>/* @__PURE__ */h("option",{value:e,children:[e," ",ne("persons")]},e))})]}),
|
|
183
|
-
/* @__PURE__ */d(
|
|
184
|
-
/* @__PURE__ */h("button",{type:"button",className:"button bu-stay-next",disabled:!l,onClick:()=>{s&&i&&a({type:"start",persons:n})},children:[ne("calculate"),/* @__PURE__ */d(
|
|
185
|
-
return d("div",{className:"price-overview bu-stay-bar-wrap",children:/* @__PURE__ */d(
|
|
183
|
+
/* @__PURE__ */d(pa,{})]}),/* @__PURE__ */h("div",{className:"bu-stay-bar-actions",children:[s&&i?/* @__PURE__ */d(Td,{persons:n,variables:{starts_at:s.date,ends_at:i.date}}):/* @__PURE__ */h("div",{className:"bu-stay-price bu-empty",children:[/* @__PURE__ */d("div",{className:"bu-stay-price-value",children:"—"}),/* @__PURE__ */d("div",{className:"bu-stay-price-hint",children:ne("price_follows_dates")})]}),s&&/* @__PURE__ */d("button",{type:"button",className:"bu-link-button bu-stay-clear",onClick:()=>a({type:"reset"}),children:ne("clear_dates")}),
|
|
184
|
+
/* @__PURE__ */h("button",{type:"button",className:"button bu-stay-next",disabled:!l,onClick:()=>{s&&i&&a({type:"start",persons:n})},children:[ne("calculate"),/* @__PURE__ */d(Il,{})]})]})]})}function Ad({house:e}){/* @__PURE__ */
|
|
185
|
+
return d("div",{className:"price-overview bu-stay-bar-wrap",children:/* @__PURE__ */d(Rd,{house:e})})}function Dd({numberOfMonths:e,house:t,numberOfMonthsInARow:n}){const[r,o]=u(/* @__PURE__ */new Date);/* @__PURE__ */
|
|
186
186
|
return h("div",{className:"calendar-container bu-calendar-page",children:[/* @__PURE__ */h("div",{className:"calendar-section bu-calendar-main",children:[
|
|
187
|
-
/* @__PURE__ */d(
|
|
188
|
-
/* @__PURE__ */d(
|
|
189
|
-
/* @__PURE__ */d(
|
|
190
|
-
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(
|
|
191
|
-
return d(t?
|
|
187
|
+
/* @__PURE__ */d(Kl,{house:t}),
|
|
188
|
+
/* @__PURE__ */d(Jl,{house:t,numberOfMonths:e,numberOfMonthsInARow:n,currentMonth:r,changeMonth:o}),
|
|
189
|
+
/* @__PURE__ */d(Ml,{house:t})]}),/* @__PURE__ */d(Ad,{house:t})]})}function $d({portalSite:e}){const{portalCode:t,objectCode:n,locale:r,apiUrl:i}=o(aa),[a,c]=u({status:"loading"});if(s(()=>{let e=!1;return c({status:"loading"}),Nd({apiUrl:i,locale:r,portalCode:t,objectCode:n}).then(t=>{e||c({status:"ready",house:t})}).catch(t=>{e||(t instanceof Ed&&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}},[i,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(ra,{errors:a.error})});const l=e.bookingFormConfiguration.show_months_amount,f=e.bookingFormConfiguration.show_months_in_a_row_amount;/* @__PURE__ */
|
|
190
|
+
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(Dd,{numberOfMonths:l,numberOfMonthsInARow:f,house:a.house})]})})}function Pd({portalSite:e}){const{bookingStarted:t}=o(cl);/* @__PURE__ */
|
|
191
|
+
return d(t?Cd:$d,{portalSite:e})}function jd({portalSite:e}){const{portalCode:t,objectCode:n,locale:r}=o(aa);return s(()=>{xd(`house_view:${n}`)&&ju({house_code:n,portal_code:t,locale:r,interaction_type:"house_view",interaction_info:{entry:Mu()}})},[n,t,r]),/* @__PURE__ */d(ll,{children:/* @__PURE__ */d(Pd,{portalSite:e})})}async function Id({portalCode:e,objectCode:t,apiUrl:n="",after:r}){const o=new URLSearchParams({portal_code:e,object_code:t});r&&o.set("after",r);const s=`${n?new URL(n).origin:""}/portal_api/v1/accommodations/reviews?${o.toString()}`;try{const e=await au.get(s).json();return{house:{id:"",name:e.house.name,rating:Number(e.house.rating),scoreAmount:Number(e.house.score_amount),criteriaAverages:e.house.criteria_averages?.map(e=>({name:e.name,score:Number(e.score),count:Number(e.count)})),reviews:e.items.map(e=>({id:"",name:e.name,review:e.review,score:Number(e.score),createdAt:e.created_at,sourceName:e.source_name??"",reviewResponses:e.review_responses??[],reviewCriteria:(e.review_criteria??[]).map(e=>({id:0,name:e.name,score:Number(e.score)}))}))},pageInfo:e.page_info}}catch(i){if(i instanceof ma)throw new Error(`Reviews request failed (${i.response.status})`);throw i}}function Ld(e){return e>8?"best":e>7?"good":e>5.5?"medium":"low"}function Od(e){return{color:Ld(e),formatted:e%1==0?String(e):e.toFixed(1)}}function Md(e){const t=/* @__PURE__ */new Map;for(const n of e)for(const e of n.reviewCriteria){if(!(e.name&&e.score>0))continue;const n=t.get(e.name)??{sum:0,count:0};n.sum+=e.score,n.count+=1,t.set(e.name,n)}return Array.from(t,([e,{sum:t,count:n}])=>({name:e,score:Math.round(t/n*10)/10}))}function Ud(e){return e.filter(e=>e.reviewCriteria.some(e=>e.score>0)).length}function qd(e,t){const n=document.createElement("div");return e&&(n.className=e),t&&(n.textContent=t),n}function Bd(e,t){const n=document.createElement("span");return n.className=e,n.textContent=t,n}function Fd(e,t,n=!1){return qd(`bu_score__rating ${t}${n?" bu-score-lg":""}`,e)}function zd(e){const t=qd("bu_reviews__overview bu-reviews-header"),n=qd("bu_score bu-reviews-header-score"),r=qd("bu-reviews-header-text");if(e.rating){const t=Od(e.rating);n.appendChild(Fd(t.formatted,t.color,!0)),r.appendChild(qd("bu-reviews-header-label",ne(function(e){switch(Ld(e)){case"best":return"score_excellent";case"good":return"score_very_good";case"medium":return"score_good";default:return"score_fair"}}(e.rating))))}r.appendChild(qd("bu_reviews__overview__number",`${e.scoreAmount} ${ne("reviews")}${e.name?` · ${e.name}`:""}`)),n.appendChild(r),t.appendChild(n);const{averages:o,count:s,source:i}=function(e){return e.criteriaAverages&&e.criteriaAverages.length>0?{averages:e.criteriaAverages,count:Math.max(...e.criteriaAverages.map(e=>e.count??0)),source:"api"}:{averages:Md(e.reviews),count:Ud(e.reviews),source:"loaded"}}(e);if(o.length>0){const e=qd("bu-criteria-averages");o.forEach(t=>{const n=qd("bu-criteria-average");n.appendChild(Bd("bu-criteria-average-name",t.name));const r=qd("bu-criteria-bar"),o=document.createElement("span");o.className=Ld(t.score),o.style.width=`${Math.min(100,10*t.score)}%`,r.appendChild(o),n.appendChild(r),n.appendChild(Bd("bu-criteria-average-value",Od(t.score).formatted)),e.appendChild(n)}),e.appendChild(qd("bu-criteria-averages-hint",ne("api"===i?"based_on_reviews":"based_on_last_reviews",{count:s}))),t.appendChild(e)}return t}function Hd(e){const t=qd("bu_reviews bu-reviews");return t.appendChild(zd(e)),e.reviews.forEach(e=>{const n=function(e){const t=Od(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=Od(e.score);return{id:e.id,name:e.name,score:e.score,color:t.color,formatted:t.formatted}})}}(e),r=""!==n.review.trim(),o=qd("bu_single_review bu-review-card"+(r?"":" bu-review-card-slim")),s=qd("bu_review_summary bu-review-head"),i=qd("bu_score");e.score&&i.appendChild(Fd(n.formatted,n.color));const a=qd("bu_review_summary__date_name bu-review-who");if(a.appendChild(qd("bu_review_summary__name",n.name)),a.appendChild(qd("bu_review_summary__date",r?Re(n.createdAt):`${Re(n.createdAt)} · ${ne("score_only")}`)),i.appendChild(a),s.appendChild(i),n.sourceName&&s.appendChild(qd("bu_review_summary__source",ne("via_source",{source:n.sourceName}))),o.appendChild(s),r){const e=document.createElement("p");e.className="bu_review bu-review-text",e.textContent=n.review,o.appendChild(e)}if(n.criteria.length>0){const e=qd("bu_criteria bu-criteria-pills");n.criteria.forEach(t=>{const n=Bd("bu-criterion","");t.score&&n.appendChild(Bd(`bu-criterion-dot ${t.color}`,"")),n.appendChild(Bd("bu-criterion-name",t.name)),t.score&&n.appendChild(Bd("bu-criterion-score",t.formatted)),e.appendChild(n)}),o.appendChild(e)}if(n.reviewResponses?.length>0){const e=qd("bu_review_responses");n.reviewResponses.forEach(t=>{const n=qd("bu_review_response"),r=qd("bu_review_response__header");r.appendChild(Bd("bu-review-response-avatar",t.sender.charAt(0))),r.appendChild(qd("bu_review_response__sender",t.sender)),r.appendChild(qd("bu_review_response__label",ne("review_response_label"))),r.appendChild(qd("bu_review_response__date",Re(t.created_at)));const o=document.createElement("p");o.className="bu_review_response__message",o.textContent=t.message,n.appendChild(r),n.appendChild(o),e.appendChild(n)}),o.appendChild(e)}t.appendChild(o)}),t}function Wd({house:e}){const t=c(null);return s(()=>{var n,r;if(t.current)return n=t.current,r=()=>Hd(e),n.replaceChildren(r()),()=>{n.replaceChildren()}},[e]),/* @__PURE__ */d("div",{ref:t})}function Yd({objectCode:e,portalCode:t,apiUrl:n}){const[r,o]=u({status:"loading"}),i=c(!0);if(s(()=>(i.current=!0,()=>{i.current=!1}),[]),s(()=>{let r=!0;return o({status:"loading"}),Id({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__ */
|
|
192
192
|
return h(l,{children:[
|
|
193
|
-
/* @__PURE__ */d(
|
|
194
|
-
/* @__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
|
|
193
|
+
/* @__PURE__ */d(Wd,{house:a}),m&&/* @__PURE__ */d("div",{children:/* @__PURE__ */d(p,{})}),!m&&f&&/* @__PURE__ */d("div",{className:"bu-reviews-more",children:/* @__PURE__ */d("button",{type:"button",className:"bu_load_more bu-button-ghost",onClick:function(){if("ready"!==r.status||!r.hasNextPage)return;const s=r.house,a=r.endCursor;o({status:"loading_more",house:s,endCursor:a}),Id({portalCode:t,objectCode:e,apiUrl:n,after:a??void 0}).then(({house:e,pageInfo:t})=>{i.current&&o({status:"ready",house:{...s,reviews:[...s.reviews,...e.reviews]},endCursor:t.end_cursor,hasNextPage:t.has_next_page})}).catch(e=>{i.current&&o({status:"error",error:e instanceof Error?e:new Error(String(e))})})},children:ne("load_more_reviews")})}),
|
|
194
|
+
/* @__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 Vd={nl:{url:"http://bukazu.com/veiligheid",label:"Beveiligd en mogelijk gemaakt door BUKAZU"},en:{url:"http://bukazu.co.uk/security",label:"Secured and made possible by BUKAZU"},de:{url:"http://bukazu.com/sicherheit",label:"Gesichert und ermöglicht durch BUKAZU"},fr:{url:"http://bukazu.com/securite",label:"Sécurisé et rendu possible par BUKAZU"},es:{url:"http://bukazu.com/seguridad",label:"Asegurado y hecho posible por BUKAZU"},it:{url:"http://bukazu.com/sicurezza",label:"Protetto e reso possibile da BUKAZU"}};function Jd(e){const{url:t,label:n}=Object.prototype.hasOwnProperty.call(Vd,e)?Vd[e]:Vd.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 Kd=class extends e.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){Zi(e)}render(){return this.state.hasError?/* @__PURE__ */d("h1",{children:"Something went wrong."}):this.props.children}};function Gd(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 Xd(e,t){try{return await au.get(e,{headers:{locale:t}}).json()}catch(n){if(n instanceof ma)throw new Error(`Portal settings request failed (${n.response.status})`);throw n}}function Qd({apiUrl:e,locale:t,portalCode:n}){return Xd(function({apiUrl:e,portalCode:t}){return Gd(e,"settings",t)}({apiUrl:e,portalCode:n}),t)}function Zd({apiUrl:e,locale:t,portalCode:n}){return Xd(function({apiUrl:e,portalCode:t}){return Gd(e,"booking-fields",t)}({apiUrl:e,portalCode:n}),t)}function eh({apiUrl:e,locale:t,portalCode:n}){return Xd(function({apiUrl:e,portalCode:t}){return Gd(e,"filter-fields",t)}({apiUrl:e,portalCode:n}),t)}function th(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 nh(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 rh({portalCode:e,isSearchPage:t,isBookingPage:n,apiUrl:r,locale:o}){const s=Qd({apiUrl:r,locale:o,portalCode:e}),i=t?eh({apiUrl:r,locale:o,portalCode:e}):Promise.resolve(void 0),a=n?Zd({apiUrl:r,locale:o,portalCode:e}):Promise.resolve(void 0),[c,u,l]=await Promise.all([s,i,a]);if(!c)throw new Error("Portal site data is missing");return function({settings:e,filterFields:t,bookingFields:n,locale:r}){const o=(n??[]??[]).map(e=>({id:e.id,label:e.label,field_type:e.field_type,type:e.field_type,options:e.field_options,required:e.required,placeholder:e.placeholder})),s=(c=t??[],(c??[]).map(e=>({id:e.id,type:e.field_type,label:e.label,...void 0!==e.max&&{max:e.max},...void 0!==e.options&&{options:e.options}}))),i=e.colors,a={filtersForm:nh(e.filters_form),bookingFields:o,searchFields:void 0!==t?s:void 0,bookingForm:{},colors:i};var c;return{name:e.name,portal_code:e.portal_code,options:a,colorsConfiguration:i,currencies:ua(e.currencies),bookingFormConfiguration:e.booking_form,booking_fields:o,max_persons:0,max_bedrooms:0,max_bathrooms:0,max_weekprice:0,...th(e.labels,r)}}({settings:c,filterFields:u,bookingFields:l,locale:o})}function oh({pageType:e,locale:t,filters:n={}}){const{portalCode:r,objectCode:i,apiUrl:a,locale:c}=o(aa),[l,f]=u({status:"loading"}),m=!i,g=!!i&&"reviews"!==e;if(s(()=>{let e=!0;f({status:"loading"});const t=te(c);return rh({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(ra,{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=i&&null!==i&&"reviews"!==e?/* @__PURE__ */h(Kd,{children:[/* @__PURE__ */d(jd,{portalSite:_}),/* @__PURE__ */d("div",{dangerouslySetInnerHTML:{__html:Jd(t)}})]}):i&&null!==i&&"reviews"===e?/* @__PURE__ */d(Yd,{objectCode:i,portalCode:r,apiUrl:a}):/* @__PURE__ */d(Hu,{PortalSite:_,locale:t,options:y,filters:n}),/* @__PURE__ */d(da,{currencies:_.currencies,children:w})}function sh({portalCode:e,objectCode:t,pageType:n,locale:r,filters:o,api_url:i="https://api.bukazu.com",sentryDsn:a}){const c=sa(r);s(()=>{var n;a&&(n=a,void 0===Mn()&&Xi({dsn:n,integrations:e=>e.filter(e=>"GlobalHandlers"!==e.name)})),Qi({portalCode:e,objectCode:t,locale:c})},[a,e,t,c]),s(()=>{window.__localeId__=c,async function(){}()},[c]);const u=function({portalCode:e,pageType:t,locale:n,filters:r}){let o=[];if(!e){let e="No portal code is specified, so portal is not working";o.push(e)}if(t&&"reviews"!==t){let e=`'${t}' is not a valid page`;o.push(e)}n&&(sa(n),n.toLowerCase().split(/[-_]/)[0]);r&&ia(r);const i=JSON.stringify(o);return s(()=>{o.forEach(e=>ea(e))},[i]),0!==o.length&&/* @__PURE__ */h("div",{children:[/* @__PURE__ */d("h2",{children:"Something went wrong please try again "}),/* @__PURE__ */d("ul",{children:o.map(e=>/* @__PURE__ */d("li",{children:e},e))})]})}({portalCode:e,pageType:n,locale:c,filters:o});return u||/* @__PURE__ */d(aa.Provider,{value:{portalCode:e,objectCode:t,locale:c,apiUrl:i},children:/* @__PURE__ */d("div",{className:"bu-portal",children:/* @__PURE__ */d(oh,{pageType:n,locale:c,filters:o})})})}export{sh as default};
|