1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"2.54.4"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:hellowork-web":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2c3563b0-bc64-4280-8604-8217f1d2812b",e._sentryDebugIdIdentifier="sentry-dbid-2c3563b0-bc64-4280-8604-8217f1d2812b")}catch(e){}}(),(()=>{var e,t,n={5713(e,t,n){var r={"./ab_test/ab_test_controller.ts":607,"./account_data/fetch/fetch_account_data_controller.ts":8914,"./account_data/from_account_data/from_account_data_controller.ts":9287,"./account_data/service_adaptation/service_adaptation_controller.ts":6131,"./account_data/user_authenticated/user_authenticated_controller.ts":7723,"./action/clipboard/clipboard_controller.ts":7509,"./action/press_to_click/press_to_click_controller.ts":7671,"./ai_agent/next_steps/next_steps_controller.ts":3351,"./autocomplete/autocomplete_controller.ts":9238,"./autocomplete/email/email_autocomplete_controller.ts":5494,"./autocomplete/multiple/autocomplete_multiple_controller.ts":7592,"./autocomplete/simple/autocomplete_simple_controller.ts":6632,"./click_outside/click_outside_controller.ts":4996,"./coach/coach_error_controller.ts":8871,"./components/alert_scroll_up/alert_scroll_up_controller.ts":5223,"./components/confetti/confetti_controller.ts":4969,"./components/conversion_box/conversion_box_controller.ts":1573,"./components/minimum_salary/minimum_salary_controller.ts":6488,"./components/multi_apply_bounce/multi_apply_bounce_controller.ts":8907,"./components/onetap/onetap_importer_controller.ts":4224,"./components/prequalification/prequalification_controller.ts":3329,"./components/smart_banner/smart_banner_controller.ts":1877,"./conditional_display_controller.ts":4690,"./cookie/cookie_from_value_controller.ts":3163,"./cookie/external_content_controller.ts":3159,"./cookie/marketing_cookie_controller.ts":9289,"./cp_menu_item/cp_menu_item_controller.ts":2188,"./delete_resume_modal/delete_resume_modal_controller.ts":1804,"./events/countdown/countdown_controller.ts":3870,"./events/mutable/mutable_controller.ts":1152,"./events/page_restore/page_restore_controller.ts":3110,"./events/timer/timer_controller.ts":4816,"./expandable_section/expandable_section_controller.ts":9894,"./focus/focus_group_controller.ts":5064,"./focus/focusable/focusable_controller.ts":4069,"./focus/trap/focus_trap_controller.ts":9578,"./focus_on_connect/focus_on_connect_controller.ts":184,"./hello_cv/hello_cv_controller.ts":4014,"./html/action_forwarder/action_forwarder_controller.ts":1908,"./html/anchor/anchor_controller.ts":6736,"./html/carousel/carousel_controller.ts":422,"./html/details/details_controller.ts":9932,"./html/form_exit/form_exit_controller.ts":7560,"./html/hide_offer/hide_offer_controller.ts":7208,"./html/id_storage/id_storage_controller.ts":2288,"./html/intersect/intersect_controller.ts":9328,"./html/overlap_detector/overlap_detector_controller.ts":7026,"./html/print/print_controller.ts":8440,"./html/removable/removable_controller.ts":1704,"./html/remove_attribute/remove_attribute_controller.ts":7700,"./html/resize/resize_controller.ts":9462,"./html/scroll_to/scroll_to_controller.ts":2824,"./html/scroll_top/scroll_to_top_controller.ts":1476,"./html/set_cursor_position/set_cursor_position_controller.ts":2280,"./html/show_on_auth_state/show_on_auth_state_controller.ts":2654,"./html/state/state_controller.ts":9156,"./html/sticky_detector/sticky_detector_controller.ts":6424,"./html/swtich_display/switch_display_controller.ts":3630,"./html/text_rotator/text_rotator_controller.ts":3104,"./html/toggle/toggle_controller.ts":4830,"./html/toggleAttribute/toggle_attribute_controller.ts":69,"./html/toggle_body/toggle_on_body_controller.ts":7346,"./html/toggle_class_header/toggle_class_on_header_controller.ts":3908,"./html/toggle_property/toggle_property_controller.ts":4664,"./images/gallery/gallery_controller.ts":9877,"./images/svg/cross_origin_svg_controller.ts":7859,"./images/svg/loader_button_controller/loader_button_controller.ts":4283,"./inputs
1/append_values/append_values_controller.ts":9738,"./inputs/auto_submittable/auto_submittable_controller.ts":2557,"./inputs/check_all/check_all_controller.ts":1856,"./inputs/checkbox_selector/checkbox_selector_controller.ts":2992,"./inputs/checkbox_sync/checkbox_sync_controller.ts":1620,"./inputs/checkbox_tree/checkboxtree_controller.ts":9817,"./inputs/clear_inputs/clear_inputs_controller.ts":9440,"./inputs/clearable/clearable_controller.ts":2204,"./inputs/connected_guard/connected_guard_controller.ts":9128,"./inputs/input_checker/input_checker_controller.ts":3324,"./inputs/multi_select/multi_select_controller.ts":5630,"./inputs/option_to_value/option_to_value_controller.ts":6636,"./inputs/range/range_controller.ts":6524,"./inputs/restrict/restrict_input_controller.ts":4275,"./md_streamable/md_streamable_controller.ts":9612,"./mobile/mobile_app_controller.ts":5578,"./modals/dialog_modal/dialog_modal_controller.ts":2699,"./modals/modal/modal_controller.ts":29,"./notifications/bookmark/bookmark_controller.ts":1395,"./otp/otp_controller.ts":9686,"./router/cookie/cookie_from_url_param_controller.ts":9841,"./router/history/history_controller.ts":2452,"./router/redirect_controller.ts":7767,"./router/reload_page_controller.ts":1510,"./screeb/screeb_controller.ts":3790,"./sse_stream/sse_stream_controller.ts":8834,"./toast/display_toast_message_controller.ts":891,"./tracking/analytics_controller.ts":4817,"./tracking/tracker_controller.ts":3593,"./truncate/truncate_text_controller.ts":6296,"./turbo/content_missing_controller.ts":6368,"./turbo/forced_reload_guard_controller.ts":4367,"./turbo/frame_clearable_controller.ts":6857,"./turbo/update_turbo_src_controller.ts":8133,"./validation/captcha/captcha_controller.ts":1446,"./validation/email_confirmation/email_confirmation_controller.ts":3532,"./validation/file_validator/file_validator_controller.ts":6947,"./validation/form_validator/form_validator_controller.ts":7846,"./validation/input_validity/input_validity_controller.ts":4414,"./validation/passwords_validation/passwords_validation_controller.ts":7264,"./worker/service_unsubscriber_controller.ts":104,"./working_hours_tool/daily_working_hours_tool_controller.ts":1776,"./working_hours_tool/day_mode_working_hours_tool_controller.ts":3289,"./working_hours_tool/week_mode_working_hours_tool_controller.ts":8681,"./working_hours_tool/weekly_working_hours_tool_controller.ts":3574};function webpackContext(e){var t=webpackContextResolve(e);return n(t)}function webpackContextResolve(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}webpackContext.keys=function webpackContextKeys(){return Object.keys(r)},webpackContext.resolve=webpackContextResolve,e.exports=webpackContext,webpackContext.id=5713},2891(e,t,n){"use strict";n.d(t,{lg:()=>Application,xI:()=>Controller});class EventListener{constructor(e,t,n){this.eventTarget=e,this.eventName=t,this.eventOptions=n,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){const t=function extendEvent(e){if("immediatePropagationStopped"in e)return e;{const{stopImmediatePropagation:t}=e;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}(e);for(const e of this.bindings){if(t.immediatePropagationStopped)break;e.handleEvent(t)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((e,t)=>{const n=e.index,r=t.index;return n<r?-1:n>r?1:0})}}class Dispatcher{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(e=>e.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(e=>e.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((e,t)=>
vendor: 45,785 bytes, line 1
1e.concat(Array.from(t.values())),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,t=!1){this.fetchEventListenerForBinding(e).bindingDisconnected(e),t&&this.clearEventListenersForBinding(e)}handleError(e,t,n={}){this.application.handleError(e,`Error ${t}`,n)}clearEventListenersForBinding(e){const t=this.fetchEventListenerForBinding(e);t.hasBindings()||(t.disconnect(),this.removeMappedEventListenerFor(e))}removeMappedEventListenerFor(e){const{eventTarget:t,eventName:n,eventOptions:r}=e,s=this.fetchEventListenerMapForEventTarget(t),i=this.cacheKey(n,r);s.delete(i),0==s.size&&this.eventListenerMaps.delete(t)}fetchEventListenerForBinding(e){const{eventTarget:t,eventName:n,eventOptions:r}=e;return this.fetchEventListener(t,n,r)}fetchEventListener(e,t,n){const r=this.fetchEventListenerMapForEventTarget(e),s=this.cacheKey(t,n);let i=r.get(s);return i||(i=this.createEventListener(e,t,n),r.set(s,i)),i}createEventListener(e,t,n){const r=new EventListener(e,t,n);return this.started&&r.connect(),r}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){const n=[e];return Object.keys(t).sort().forEach(e=>{n.push(`${t[e]?"":"!"}${e}`)}),n.join(":")}}const r={stop:({event:e,value:t})=>(t&&e.stopPropagation(),!0),prevent:({event:e,value:t})=>(t&&e.preventDefault(),!0),self:({event:e,value:t,element:n})=>!t||n===e.target},s=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function parseEventTarget(e){return"window"==e?window:"document"==e?document:void 0}function camelize(e){return e.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function namespaceCamelize(e){return camelize(e.replace(/--/g,"-").replace(/__/g,"_"))}function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}function dasherize(e){return e.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function isSomething(e){return null!=e}function hasProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}const i=["meta","ctrl","alt","shift"];class Action{constructor(e,t,n,r){this.element=e,this.index=t,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||function getDefaultEventNameForElement(e){const t=e.tagName.toLowerCase();if(t in a)return a[t](e)}(e)||error("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||error("missing identifier"),this.methodName=n.methodName||error("missing method name"),this.keyFilter=n.keyFilter||"",this.schema=r}static forToken(e,t){return new this(e.element,e.index,function parseActionDescriptorString(e){const t=e.trim().match(s)||[];let n=t[2],r=t[3];return r&&!["keydown","keyup","keypress"].includes(n)&&(n+=`.${r}`,r=""),{eventTarget:parseEventTarget(t[4]),eventName:n,eventOptions:t[7]?(i=t[7],i.split(":").reduce((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)}),{})):{},identifier:t[5],methodName:t[6],keyFilter:t[1]||r};var i}(e.content),t)}toString(){const e=this.keyFilter?`.${this.keyFilter}`:"",t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}${t}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(e){if(!this.keyFilter)return!1;const t=this.keyFilter.split("+");if(this.keyFilterDissatisfied(e,t))return!0;const n=t.filter(e=>!i.includes(e))[0];return!!n&&(hasProperty(this.keyMappings,n)||error(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[n].toLowerCase()!==e.key.toLowerCase())}shouldIgnoreMouseEvent(e){if(!this.keyFilter)return!1;const t=[this.keyFilter];return!!this.keyFilterDissatisfied(e,t)}get params(){const e={},t=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:n,value:r}of Array.from(this.element.attributes)){const s=n.match(t),i=s&&s[1];i&&(e[camelize(i)]=typecast(r))}return e}get eventTargetName(){return function stringifyEventTarget(e){return e==window?"window":e==document?"document":void 0}(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(e,t){const[n,r,s,a]=i.map(e=>t.includes(e));return e.metaKey!==n||e.ctrlKey!==r||e.altKey!==s||e.shiftKey!==a}}const a={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:e=>"submit"==e.getAttribute("type")?"click":"input",select:()=>"change",textarea:()=>"input"};function error(e){throw new Error(e)}function typecast(e){try{return JSON.parse(e)}catch(t){return e}}class Binding{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){const t=this.prepareActionEvent(e);this.willBeInvokedByEvent(e)&&this.applyEventModifiers(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){const e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){const{element:t}=this.action,{actionDescriptorFilters:n}=this.context.application,{controller:r}=this.context;let s=!0;for(const[i,a]of Object.entries(this.eventOptions))if(i in n){const o=n[i];s=s&&o({name:i,value:a,event:e,element:t,controller:r})}return s}prepareActionEvent(e){return Object.assign(e,{params:this.action.params})}invokeWithEvent(e){const{target:t,currentTarget:n}=e;try{this.method.call(this.controller,e),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:n,action:this.methodName})}catch(t){const{identifier:n,controller:r,element:s,index:i}=this,a={identifier:n,controller:r,element:s,index:i,event:e};this.context.handleError(t,`invoking action "${this.action}"`,a)}}willBeInvokedByEvent(e){const t=e.target;return!(e instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(e))&&(!(e instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(e))&&(this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class ElementObserver{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver(e=>this.processMutations(e))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const e=new Set(this.matchElementsInTree());for(const t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(const t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){this.elements.has(e)?this.delegate.elementAttributeChanged&&this.matchElement(e)?this.delegate.elementAttributeChanged(e,t):this.removeElement(e):this.matchElement(e)&&this.addElement(e)}processRemovedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.processTree(e,this.removeElement)}}processAddedNodes(e){for(const t of Array.from(e)){const e=this.elementFromNode(t);e&&this.elementIsActive(e)&&this.processTree(e,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(const n of this.matchElementsInTree(e))t.call(this,n)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}}class AttributeObserver{constructor(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new ElementObserver(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}}function add(e,t,n){fetch(e,t).add(n)}function del(e,t,n){fetch(e,t).delete(n),function prune(e,t){const n=e.get(t);null!=n&&0==n.size&&e.delete(t)}(e,t)}function fetch(e,t){let n=e.get(t);return n||(n=new Set,e.set(t,n)),n}class Multimap{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((e,t)=>e.concat(Array.from(t)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((e,t)=>e+t.size,0)}add(e,t){add(this.valuesByKey,e,t)}delete(e,t){del(this.valuesByKey,e,t)}has(e,t){const n=this.valuesByKey.get(e);return null!=n&&n.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some(t=>t.has(e))}getValuesForKey(e){const t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter(([t,n])=>n.has(e)).map(([e,t])=>e)}}class SelectorObserver{constructor(e,t,n,r){this._selector=t,this.details=r,this.elementObserver=new ElementObserver(e,this),this.delegate=n,this.matchesByElement=new Multimap}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(e){this._selector=e,this.refresh()}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(e){const{selector:t}=this;if(t){const n=e.matches(t);return this.delegate.selectorMatchElement?n&&this.delegate.selectorMatchElement(e,this.details):n}return!1}matchElementsInTree(e){const{selector:t}=this;if(t){const n=this.matchElement(e)?[e]:[],r=Array.from(e.querySelectorAll(t)).filter(e=>this.matchElement(e));return n.concat(r)}return[]}elementMatched(e){const{selector:t}=this;t&&this.selectorMatched(e,t)}elementUnmatched(e){const t=this.matchesByElement.getKeysForValue(e);for(const n of t)this.selectorUnmatched(e,n)}elementAttributeChanged(e,t){const{selector:n}=this;if(n){const t=this.matchElement(e),r=this.matchesByElement.has(n,e);t&&!r?this.selectorMatched(e,n):!t&&r&&this.selectorUnmatched(e,n)}}selectorMatched(e,t){this.delegate.selectorMatched(e,t,this.details),this.matchesByElement.add(t,e)}selectorUnmatched(e,t){this.delegate.selectorUnmatched(e,t,this.details),this.matchesByElement.delete(t,e)}}class StringMapObserver{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(e=>this.processMutations(e))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){const t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){const n=this.delegate.getStringMapKeyForAttribute(e);if(null!=n){this.stringMap.has(e)||this.stringMapKeyAdded(n,e);const r=this.element.getAttribute(e);if(this.stringMap.get(e)!=r&&this.stringMapValueChanged(r,n,t),null==r){const t=this.stringMap.get(e);this.stringMap.delete(e),t&&this.stringMapKeyRemoved(n,e,t)}else this.stringMap.set(e,r)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,n){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,n)}stringMapKeyRemoved(e,t,n){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,n)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(e=>e.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class TokenListObserver{constructor(e,t,n){this.attributeObserver=new AttributeObserver(e,t,this),this.delegate=n,this.tokensByElement=new Multimap}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){const[t,n]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(n)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach(e=>this.tokenMatched(e))}tokensUnmatched(e){e.forEach(e=>this.tokenUnmatched(e))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){const t=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),r=function zip(e,t){const n=Math.max(e.length,t.length);return Array.from({length:n},(n,r)=>[e[r],t[r]])}(t,n).findIndex(([e,t])=>!function tokensAreEqual(e,t){return e&&t&&e.index==t.index&&e.content==t.content}(e,t));return-1==r?[[],[]]:[t.slice(r),n.slice(r)]}readTokensForElement(e){const t=this.attributeName;return function parseTokenString(e,t,n){return e.trim().split(/\s+/).filter(e=>e.length).map((e,r)=>({element:t,attributeName:n,content:e,index:r}))}(e.getAttribute(t)||"",e,t)}}class ValueListObserver{constructor(e,t,n){this.tokenListObserver=new TokenListObserver(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){const{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))}tokenUnmatched(e){const{element:t}=e,{value:n}=this.fetchParseResultForToken(e);n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}}}class BindingObserver{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new ValueListObserver(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){const t=new Binding(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){const t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}disconnectAllActions(){this.bindings.forEach(e=>this.delegate.bindingDisconnected(e,!0)),this.bindingsByAction.clear()}parseValueForToken(e){const t=Action.forToken(e,this.schema);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}}class ValueObserver{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new StringMapObserver(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){const n=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,n.writer(this.receiver[e]),n.writer(n.defaultValue))}stringMapValueChanged(e,t,n){const r=this.valueDescriptorNameMap[t];null!==e&&(null===n&&(n=r.writer(r.defaultValue)),this.invokeChangedCallback(t,e,n))}stringMapKeyRemoved(e,t,n){const r=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,r.writer(this.receiver[e]),n):this.invokeChangedCallback(e,r.writer(r.defaultValue),n)}invokeChangedCallbacksForDefaultValues(){for(const{key:e,name:t,defaultValue:n,writer:r}of this.valueDescriptors)null==n||this.controller.data.has(e)||this.invokeChangedCallback(t,r(n),void 0)}invokeChangedCallback(e,t,n){const r=`${e}Changed`,s=this.receiver[r];if("function"==typeof s){const r=this.valueDescriptorNameMap[e];try{const e=r.reader(t);let i=n;n&&(i=r.reader(n)),s.call(this.receiver,e,i)}catch(e){throw e instanceof TypeError&&(e.message=`Stimulus Value "${this.context.identifier}.${r.name}" - ${e.message}`),e}}}get valueDescriptors(){const{valueDescriptorMap:e}=this;return Object.keys(e).map(t=>e[t])}get valueDescriptorNameMap(){const e={};return Object.keys(this.valueDescriptorMap).forEach(t=>{const n=this.valueDescriptorMap[t];e[n.name]=n}),e}hasValue(e){const t=`has${capitalize(this.valueDescriptorNameMap[e].name)}`;return this.receiver[t]}}class TargetObserver{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new Multimap}start(){this.tokenListObserver||(this.tokenListObserver=new TokenListObserver(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var n;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),null===(n=this.tokenListObserver)||void 0===n||n.pause(()=>this.delegate.targetConnected(e,t)))}disconnectTarget(e,t){var n;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),null===(n=this.tokenListObserver)||void 0===n||n.pause(()=>this.delegate.targetDisconnected(e,t)))}disconnectAllTargets(){for(const e of this.targetsByName.keys)for(const t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function readInheritableStaticArrayValues(e,t){const n=getAncestorsForConstructor(e);return Array.from(n.reduce((e,n)=>(function getOwnStaticArrayValues(e,t){const n=e[t];return Array.isArray(n)?n:[]}(n,t).forEach(t=>e.add(t)),e),new Set))}function readInheritableStaticObjectPairs(e,t){return getAncestorsForConstructor(e).reduce((e,n)=>(e.push(...function getOwnStaticObjectPairs(e,t){const n=e[t];return n?Object.keys(n).map(e=>[e,n[e]]):[]}(n,t)),e),[])}function getAncestorsForConstructor(e){const t=[];for(;e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}class OutletObserver{constructor(e,t){this.started=!1,this.context=e,this.delegate=t,this.outletsByName=new Multimap,this.outletElementsByName=new Multimap,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(e=>{this.setupSelectorObserverForOutlet(e),this.setupAttributeObserverForOutlet(e)}),this.started=!0,this.dependentContexts.forEach(e=>e.refresh()))}refresh(){this.selectorObserverMap.forEach(e=>e.refresh()),this.attributeObserverMap.forEach(e=>e.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(e=>e.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(e=>e.stop()),this.attributeObserverMap.clear())}selectorMatched(e,t,{outletName:n}){const r=this.getOutlet(e,n);r&&this.connectOutlet(r,e,n)}selectorUnmatched(e,t,{outletName:n}){const r=this.getOutletFromMap(e,n);r&&this.disconnectOutlet(r,e,n)}selectorMatchElement(e,{outletName:t}){const n=this.selector(t),r=this.hasOutlet(e,t),s=e.matches(`[${this.schema.controllerAttribute}~=${t}]`);return!!n&&(r&&s&&e.matches(n))}elementMatchedAttribute(e,t){const n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}elementAttributeValueChanged(e,t){const n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}elementUnmatchedAttribute(e,t){const n=this.getOutletNameFromOutletAttributeName(t);n&&this.updateSelectorObserverForOutlet(n)}connectOutlet(e,t,n){var r;this.outletElementsByName.has(n,t)||(this.outletsByName.add(n,e),this.outletElementsByName.add(n,t),null===(r=this.selectorObserverMap.get(n))||void 0===r||r.pause(()=>this.delegate.outletConnected(e,t,n)))}disconnectOutlet(e,t,n){var r;this.outletElementsByName.has(n,t)&&(this.outletsByName.delete(n,e),this.outletElementsByName.delete(n,t),null===(r=this.selectorObserverMap.get(n))||void 0===r||r.pause(()=>this.delegate.outletDisconnected(e,t,n)))}disconnectAllOutlets(){for(const e of this.outletElementsByName.keys)for(const t of this.outletElementsByName.getValuesForKey(e))for(const n of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(n,t,e)}updateSelectorObserverForOutlet(e){const t=this.selectorObserverMap.get(e);t&&(t.selector=this.selector(e))}setupSelectorObserverForOutlet(e){const t=this.selector(e),n=new SelectorObserver(document.body,t,this,{outletName:e});this.selectorObserverMap.set(e,n),n.start()}setupAttributeObserverForOutlet(e){const t=this.attributeNameForOutletName(e),n=new AttributeObserver(this.scope.element,t,this);this.attributeObserverMap.set(e,n),n.start()}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}attributeNameForOutletName(e){return this.scope.schema.outletAttributeForScope(this.identifier,e)}getOutletNameFromOutletAttributeName(e){return this.outletDefinitions.find(t=>this.attributeNameForOutletName(t)===e)}get outletDependencies(){const e=new Multimap;return this.router.modules.forEach(t=>{readInheritableStaticArrayValues(t.definition.controllerConstructor,"outlets").forEach(n=>e.add(n,t.identifier))}),e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const e=this.dependentControllerIdentifiers;return this.router.contexts.filter(t=>e.includes(t.identifier))}hasOutlet(e,t){return!!this.getOutlet(e,t)||!!this.getOutletFromMap(e,t)}getOutlet(e,t){return this.application.getControllerForElementAndIdentifier(e,t)}getOutletFromMap(e,t){return this.outletsByName.getValuesForKey(t).find(t=>t.element===e)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class Context{constructor(e,t){this.logDebugActivity=(e,t={})=>{const{identifier:n,controller:r,element:s}=this;t=Object.assign({identifier:n,controller:r,element:s},t),this.application.logDebugActivity(this.identifier,e,t)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new BindingObserver(this,this.dispatcher),this.valueObserver=new ValueObserver(this,this.controller),this.targetObserver=new TargetObserver(this,this),this.outletObserver=new OutletObserver(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(e){this.handleError(e,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,n={}){const{identifier:r,controller:s,element:i}=this;n=Object.assign({identifier:r,controller:s,element:i},n),this.application.handleError(e,`Error ${t}`,n)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}outletConnected(e,t,n){this.invokeControllerMethod(`${namespaceCamelize(n)}OutletConnected`,e,t)}outletDisconnected(e,t,n){this.invokeControllerMethod(`${namespaceCamelize(n)}OutletDisconnected`,e,t)}invokeControllerMethod(e,...t){const n=this.controller;"function"==typeof n[e]&&n[e](...t)}}function bless(e){return function shadow(e,t){const n=c(e),r=function getShadowProperties(e,t){return o(t).reduce((n,r)=>{const s=function getShadowedDescriptor(e,t,n){const r=Object.getOwnPropertyDescriptor(e,n);if(!r||!("value"in r)){const e=Object.getOwnPropertyDescriptor(t,n).value;return r&&(e.get=r.get||e.get,e.set=r.set||e.set),e}}(e,t,r);return s&&Object.assign(n,{[r]:s}),n},{})}(e.prototype,t);return Object.defineProperties(n.prototype,r),n}(e,function getBlessedProperties(e){const t=readInheritableStaticArrayValues(e,"blessings");return t.reduce((t,n)=>{const r=n(e);for(const e in r){const n=t[e]||{};t[e]=Object.assign(n,r[e])}return t},{})}(e))}const o="function"==typeof Object.getOwnPropertySymbols?e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]:Object.getOwnPropertyNames,c=(()=>{function extendWithReflect(e){function extended(){return Reflect.construct(e,arguments,new.target)}return extended.prototype=Object.create(e.prototype,{constructor:{value:extended}}),Reflect.setPrototypeOf(extended,e),extended}try{return function testReflectExtension(){const e=extendWithReflect(function(){this.a.call(this)});return e.prototype.a=function(){},new e}(),extendWithReflect}catch(e){return e=>class extended extends e{}}})();class Module{constructor(e,t){this.application=e,this.definition=function blessDefinition(e){return{identifier:e.identifier,controllerConstructor:bless(e.controllerConstructor)}}(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){const t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){const t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new Context(this,e),this.contextsByScope.set(e,t)),t}}class ClassMap{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){return function tokenize(e){return e.match(/[^\s]+/g)||[]}(this.data.get(this.getDataKey(e))||"")}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}}class DataMap{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){const t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){const n=this.getAttributeNameForKey(e);return this.element.setAttribute(n,t),this.get(e)}has(e){const t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){const t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${dasherize(e)}`}}class Guide{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,n){let r=this.warnedKeysByObject.get(e);r||(r=new Set,this.warnedKeysByObject.set(e,r)),r.has(t)||(r.add(t),this.logger.warn(n,e))}}function attributeValueContainsToken(e,t){return`[${e}~="${t}"]`}class TargetSet{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce((e,t)=>e||this.findTarget(t)||this.findLegacyTarget(t),void 0)}findAll(...e){return e.reduce((e,t)=>[...e,...this.findAllTargets(t),...this.findAllLegacyTargets(t)],[])}findTarget(e){const t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){const t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){return attributeValueContainsToken(this.schema.targetAttributeForScope(this.identifier),e)}findLegacyTarget(e){const t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){const t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map(t=>this.deprecate(t,e))}getLegacySelectorForTargetName(e){const t=`${this.identifier}.${e}`;return attributeValueContainsToken(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:n}=this,r=this.schema.targetAttribute,s=this.schema.targetAttributeForScope(n);this.guide.warn(e,`target:${t}`,`Please replace ${r}="${n}.${t}" with ${s}="${t}". The ${r} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}}class OutletSet{constructor(e,t){this.scope=e,this.controllerElement=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return null!=this.find(e)}find(...e){return e.reduce((e,t)=>e||this.findOutlet(t),void 0)}findAll(...e){return e.reduce((e,t)=>[...e,...this.findAllOutlets(t)],[])}getSelectorForOutletName(e){const t=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(t)}findOutlet(e){const t=this.getSelectorForOutletName(e);if(t)return this.findElement(t,e)}findAllOutlets(e){const t=this.getSelectorForOutletName(e);return t?this.findAllElements(t,e):[]}findElement(e,t){return this.scope.queryElements(e).filter(n=>this.matchesElement(n,e,t))[0]}findAllElements(e,t){return this.scope.queryElements(e).filter(n=>this.matchesElement(n,e,t))}matchesElement(e,t,n){const r=e.getAttribute(this.scope.schema.controllerAttribute)||"";return e.matches(t)&&r.split(" ").includes(n)}}class Scope{constructor(e,t,n,r){this.targets=new TargetSet(this),this.classes=new ClassMap(this),this.data=new DataMap(this),this.containsElement=e=>e.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=n,this.guide=new Guide(r),this.outlets=new OutletSet(this.documentScope,t)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return attributeValueContainsToken(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new Scope(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class ScopeObserver{constructor(e,t,n){this.element=e,this.schema=t,this.delegate=n,this.valueListObserver=new ValueListObserver(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){const{element:t,content:n}=e;return this.parseValueForElementAndIdentifier(t,n)}parseValueForElementAndIdentifier(e,t){const n=this.fetchScopesByIdentifierForElement(e);let r=n.get(t);return r||(r=this.delegate.createScopeForElementAndIdentifier(e,t),n.set(t,r)),r}elementMatchedValue(e,t){const n=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,n),1==n&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){const n=this.scopeReferenceCounts.get(t);n&&(this.scopeReferenceCounts.set(t,n-1),1==n&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}}class Router{constructor(e){this.application=e,this.scopeObserver=new ScopeObserver(this.element,this.schema,this),this.scopesByIdentifier=new Multimap,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((e,t)=>e.concat(t.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);const t=new Module(this.application,e);this.connectModule(t);const n=e.controllerConstructor.afterLoad;n&&n.call(e.controllerConstructor,e.identifier,this.application)}unloadIdentifier(e){const t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){const n=this.modulesByIdentifier.get(t);if(n)return n.contexts.find(t=>t.element==e)}proposeToConnectScopeForElementAndIdentifier(e,t){const n=this.scopeObserver.parseValueForElementAndIdentifier(e,t);n?this.scopeObserver.elementMatchedValue(n.element,n):console.error(`Couldn't find or create scope for identifier: "${t}" and element:`,e)}handleError(e,t,n){this.application.handleError(e,t,n)}createScopeForElementAndIdentifier(e,t){return new Scope(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(t=>e.connectContextForScope(t))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier);this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(t=>e.disconnectContextForScope(t))}}const l={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:e=>`data-${e}-target`,outletAttributeForScope:(e,t)=>`data-${e}-${t}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},objectFromEntries("abcdefghijklmnopqrstuvwxyz".split("").map(e=>[e,e]))),objectFromEntries("0123456789".split("").map(e=>[e,e])))};function objectFromEntries(e){return e.reduce((e,[t,n])=>Object.assign(Object.assign({},e),{[t]:n}),{})}class Application{constructor(e=document.documentElement,t=l){this.logger=console,this.debug=!1,this.logDebugActivity=(e,t,n={})=>{this.debug&&this.logFormattedMessage(e,t,n)},this.element=e,this.schema=t,this.dispatcher=new Dispatcher(this),this.router=new Router(this),this.actionDescriptorFilters=Object.assign({},r)}static start(e,t){const n=new this(e,t);return n.start(),n}async start(){await function domReady(){return new Promise(e=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",()=>e()):e()})}(),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,t){this.load({identifier:e,controllerConstructor:t})}registerActionOption(e,t){this.actionDescriptorFilters[e]=t}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(e=>{e.controllerConstructor.shouldLoad&&this.router.loadDefinition(e)})}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(e=>this.router.unloadIdentifier(e))}get controllers(){return this.router.contexts.map(e=>e.controller)}getControllerForElementAndIdentifier(e,t){const n=this.router.getContextForElementAndIdentifier(e,t);return n?n.controller:null}handleError(e,t,n){var r;this.logger.error("%s\n\n%o\n\n%o",t,e,n),null===(r=window.onerror)||void 0===r||r.call(window,t,"",0,0,e)}logFormattedMessage(e,t,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}}function getOutletController(e,t,n){return e.application.getControllerForElementAndIdentifier(t,n)}function getControllerAndEnsureConnectedScope(e,t,n){let r=getOutletController(e,t,n);return r||(e.application.router.proposeToConnectScopeForElementAndIdentifier(t,n),r=getOutletController(e,t,n),r||void 0)}function parseValueDefinitionPair([e,t],n){return function valueDescriptorForTokenAndTypeDefinition(e){const{token:t,typeDefinition:n}=e,r=`${dasherize(t)}-value`,s=function parseValueTypeDefinition(e){const{controller:t,token:n,typeDefinition:r}=e,s={controller:t,token:n,typeObject:r},i=function parseValueTypeObject(e){const{controller:t,token:n,typeObject:r}=e,s=isSomething(r.type),i=isSomething(r.default),a=s&&i,o=s&&!i,c=!s&&i,l=parseValueTypeConstant(r.type),u=parseValueTypeDefault(e.typeObject.default);if(o)return l;if(c)return u;if(l!==u){throw new Error(`The specified default value for the Stimulus Value "${t?`${t}.${n}`:n}" must match the defined type "${l}". The provided default value of "${r.default}" is of type "${u}".`)}if(a)return l}(s),a=parseValueTypeDefault(r),o=parseValueTypeConstant(r),c=i||a||o;if(c)return c;const l=t?`${t}.${r}`:n;throw new Error(`Unknown value type "${l}" for "${n}" value`)}(e);return{type:s,key:r,name:camelize(r),get defaultValue(){return function defaultValueForDefinition(e){const t=parseValueTypeConstant(e);if(t)return u[t];const n=hasProperty(e,"default"),r=hasProperty(e,"type"),s=e;if(n)return s.default;if(r){const{type:e}=s,t=parseValueTypeConstant(e);if(t)return u[t]}return e}(n)},get hasCustomDefaultValue(){return void 0!==parseValueTypeDefault(n)},reader:d[s],writer:h[s]||h.default}}({controller:n,token:e,typeDefinition:t})}function parseValueTypeConstant(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function parseValueTypeDefault(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(e)?"array":"[object Object]"===Object.prototype.toString.call(e)?"object":void 0}const u={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},d={array(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${e}" of type "${parseValueTypeDefault(t)}"`);return t},boolean:e=>!("0"==e||"false"==String(e).toLowerCase()),number:e=>Number(e.replace(/_/g,"")),object(e){const t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${e}" of type "${parseValueTypeDefault(t)}"`);return t},string:e=>e},h={default:function writeString(e){return`${e}`},array:writeJSON,object:writeJSON};function writeJSON(e){return JSON.stringify(e)}class Controller{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:n={},prefix:r=this.identifier,bubbles:s=!0,cancelable:i=!0}={}){const a=new CustomEvent(r?`${r}:${e}`:e,{detail:n,bubbles:s,cancelable:i});return t.dispatchEvent(a),a}}Controller.blessings=[function ClassPropertiesBlessing(e){return readInheritableStaticArrayValues(e,"classes").reduce((e,t)=>Object.assign(e,function propertiesForClassDefinition(e){return{[`${e}Class`]:{get(){const{classes:t}=this;if(t.has(e))return t.get(e);{const n=t.getAttributeName(e);throw new Error(`Missing attribute "${n}"`)}}},[`${e}Classes`]:{get(){return this.classes.getAll(e)}},[`has${capitalize(e)}Class`]:{get(){return this.classes.has(e)}}}}(t)),{})},function TargetPropertiesBlessing(e){return readInheritableStaticArrayValues(e,"targets").reduce((e,t)=>Object.assign(e,function propertiesForTargetDefinition(e){return{[`${e}Target`]:{get(){const t=this.targets.find(e);if(t)return t;throw new Error(`Missing target element "${e}" for "${this.identifier}" controller`)}},[`${e}Targets`]:{get(){return this.targets.findAll(e)}},[`has${capitalize(e)}Target`]:{get(){return this.targets.has(e)}}}}(t)),{})},function ValuePropertiesBlessing(e){const t=readInheritableStaticObjectPairs(e,"values"),n={valueDescriptorMap:{get(){return t.reduce((e,t)=>{const n=parseValueDefinitionPair(t,this.identifier),r=this.data.getAttributeNameForKey(n.key);return Object.assign(e,{[r]:n})},{})}}};return t.reduce((e,t)=>Object.assign(e,function propertiesForValueDefinitionPair(e,t){const n=parseValueDefinitionPair(e,t),{key:r,name:s,reader:i,writer:a}=n;return{[s]:{get(){const e=this.data.get(r);return null!==e?i(e):n.defaultValue},set(e){void 0===e?this.data.delete(r):this.data.set(r,a(e))}},[`has${capitalize(s)}`]:{get(){return this.data.has(r)||n.hasCustomDefaultValue}}}}(t)),n)},function OutletPropertiesBlessing(e){return readInheritableStaticArrayValues(e,"outlets").reduce((e,t)=>Object.assign(e,function propertiesForOutletDefinition(e){const t=namespaceCamelize(e);return{[`${t}Outlet`]:{get(){const t=this.outlets.find(e),n=this.outlets.getSelectorForOutletName(e);if(t){const n=getControllerAndEnsureConnectedScope(this,t,e);if(n)return n;throw new Error(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${n}".`)}},[`${t}Outlets`]:{get(){const t=this.outlets.findAll(e);return t.length>0?t.map(t=>{const n=getControllerAndEnsureConnectedScope(this,t,e);if(n)return n;console.warn(`The provided outlet element is missing an outlet controller "${e}" instance for host controller "${this.identifier}"`,t)}).filter(e=>e):[]}},[`${t}OutletElement`]:{get(){const t=this.outlets.find(e),n=this.outlets.getSelectorForOutletName(e);
1if(t)return t;throw new Error(`Missing outlet element "${e}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${n}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(e)}},[`has${capitalize(t)}Outlet`]:{get(){return this.outlets.has(e)}}}}(t)),{})}],Controller.targets=[],Controller.outlets=[],Controller.values={}},89(e,t,n){"use strict";n.d(t,{K:()=>connectStreamSource,QS:()=>disconnectStreamSource,dZ:()=>P}); 2/*! 3Turbo 8.0.23 4Copyright © 2026 37signals LLC 5 */ 6const r="eager",s="lazy";class FrameElement extends HTMLElement{static delegateConstructor=void 0;loaded=Promise.resolve();static get observedAttributes(){return["disabled","loading","src"]}constructor(){super(),this.delegate=new FrameElement.delegateConstructor(this)}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){return this.delegate.sourceURLReloaded()}attributeChangedCallback(e){"loading"==e?this.delegate.loadingStyleChanged():"src"==e?this.delegate.sourceURLChanged():"disabled"==e&&this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get refresh(){return this.getAttribute("refresh")}set refresh(e){e?this.setAttribute("refresh",e):this.removeAttribute("refresh")}get shouldReloadWithMorph(){return this.src&&"morph"===this.refresh}get loading(){return function frameLoadingStyleFromString(e){if("lazy"===e.toLowerCase())return s;return r}(this.getAttribute("loading")||"")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){return this.ownerDocument?.documentElement?.hasAttribute("data-turbo-preview")}}const i={enabled:!0,progressBarDelay:500,unvisitableExtensions:new Set([".7z",".aac",".apk",".avi",".bmp",".bz2",".css",".csv",".deb",".dmg",".doc",".docx",".exe",".gif",".gz",".heic",".heif",".ico",".iso",".jpeg",".jpg",".js",".json",".m4a",".mkv",".mov",".mp3",".mp4",".mpeg",".mpg",".msi",".ogg",".ogv",".pdf",".pkg",".png",".ppt",".pptx",".rar",".rtf",".svg",".tar",".tif",".tiff",".txt",".wav",".webm",".webp",".wma",".wmv",".xls",".xlsx",".xml",".zip"])};function activateScriptElement(e){if("false"==e.getAttribute("data-turbo-eval"))return e;{const t=document.createElement("script"),n=getCspNonce();return n&&(t.nonce=n),t.textContent=e.textContent,t.async=!1,function copyElementAttributes(e,t){for(const{name:n,value:r}of t.attributes)e.setAttribute(n,r)}(t,e),t}}function dispatch(e,{target:t,cancelable:n,detail:r}={}){const s=new CustomEvent(e,{cancelable:n,bubbles:!0,composed:!0,detail:r});return t&&t.isConnected?t.dispatchEvent(s):document.documentElement.dispatchEvent(s),s}function cancelEvent(e){e.preventDefault(),e.stopImmediatePropagation()}function nextRepaint(){return"hidden"===document.visibilityState?nextEventLoopTick():nextAnimationFrame()}function nextAnimationFrame(){return new Promise(e=>requestAnimationFrame(()=>e()))}function nextEventLoopTick(){return new Promise(e=>setTimeout(()=>e(),0))}function parseHTMLDocument(e=""){return(new DOMParser).parseFromString(e,"text/html")}function unindent(e,...t){const n=function interpolate(e,t){return e.reduce((e,n,r)=>e+n+(null==t[r]?"":t[r]),"")}(e,t).replace(/^\n/,"").split("\n"),r=n[0].match(/^\s+/),s=r?r[0].length:0;return n.map(e=>e.slice(s)).join("\n")}function uuid(){return Array.from({length:36}).map((e,t)=>8==t||13==t||18==t||23==t?"-":14==t?"4":19==t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(16*Math.random()).toString(16)).join("")}function getAttribute(e,...t){for(const n of t.map(t=>t?.getAttribute(e)))if("string"==typeof n)return n;return null}function markAsBusy(...e){for(const t of e)"turbo-frame"==t.localName&&t.setAttribute("busy",""),t.setAttribute("aria-busy","true")}function clearBusyState(...e){for(const t of e)"turbo-frame"==t.localName&&t.removeAttribute("busy"),t.removeAttribute("aria-busy")}function waitForLoad(e,t=2e3){return new Promise(n=>{const onComplete=()=>{e.removeEventListener("error",onComplete),e.removeEventListener("load",onComplete),n()};e.addEventListener("load",onComplete,{once:!0}),e.addEventListener("error",onComplete,{once:!0}),setTimeout(n,t)})}function getHistoryMethodForAction(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}function getVisitAction(...e){const t=getAttribute("data-turbo-action",...e);return function isAction(e){return"advance"==e||"replace"==e||"restore"==e}(t)?t:null}function getMetaElement(e){return document.querySelector(`meta[name="${e}"]`)}function getMetaContent(e){const t=getMetaElement(e);return t&&t.content}function getCspNonce(){const e=getMetaElement("csp-nonce");if(e){const{nonce:t,content:n}=e;return""==t?n:t}}function findClosestRecursively(e,t){if(e instanceof Element)return e.closest(t)||findClosestRecursively(e.assignedSlot||e.getRootNode()?.host,t)}function elementIsFocusable(e){return!!e&&null==e.closest("[inert], :disabled, [hidden], details:not([open]), dialog:not([open])")&&"function"==typeof e.focus}function queryAutofocusableElement(e){return Array.from(e.querySelectorAll("[autofocus]")).find(elementIsFocusable)}function doesNotTargetIFrame(e){if("_blank"===e)return!1;if(e){for(const t of document.getElementsByName(e))if(t instanceof HTMLIFrameElement)return!1;return!0}return!0}function findLinkFromClickTarget(e){const t=findClosestRecursively(e,"a[href], a[xlink\\:href]");if(!t)return null;if(t.href.startsWith("#"))return null;if(t.hasAttribute("download"))return null;const n=t.getAttribute("target");return n&&"_self"!==n?null:t}const a={"aria-disabled":{beforeSubmit:e=>{e.setAttribute("aria-disabled","true"),e.addEventListener("click",cancelEvent)},afterSubmit:e=>{e.removeAttribute("aria-disabled"),e.removeEventListener("click",cancelEvent)}},disabled:{beforeSubmit:e=>e.disabled=!0,afterSubmit:e=>e.disabled=!1}};const o=new class Config{#e=null;constructor(e){Object.assign(this,e)}get submitter(){return this.#e}set submitter(e){this.#e=a[e]||e}}({mode:"on",submitter:"disabled"}),c={drive:i,forms:o};function expandURL(e){return new URL(e.toString(),document.baseURI)}function getAnchor(e){let t;return e.hash?e.hash.slice(1):(t=e.href.match(/#(.*)$/))?t[1]:void 0}function getAction$1(e,t){return expandURL(t?.getAttribute("formaction")||e.getAttribute("action")||e.action)}function getExtension(e){return(function getLastPathComponent(e){return function getPathComponents(e){return e.pathname.split("/").slice(1)}(e).slice(-1)[0]}(e).match(/\.[^.]*$/)||[])[0]||""}function locationIsVisitable(e,t){return function isPrefixedBy(e,t){const n=addTrailingSlash(t.origin+t.pathname);return addTrailingSlash(e.href)===n||e.href.startsWith(n)}(e,t)&&!c.drive.unvisitableExtensions.has(getExtension(e))}function getLocationForLink(e){return expandURL(e.getAttribute("href")||"")}function toCacheKey(e){return function getRequestURL(e){const t=getAnchor(e);return null!=t?e.href.slice(0,-(t.length+1)):e.href}(e)}function urlsAreEqual(e,t){return expandURL(e).href==expandURL(t).href}function addTrailingSlash(e){return e.endsWith("/")?e:e+"/"}class FetchResponse{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return expandURL(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.clone().text()}get responseHTML(){return this.isHTML?this.response.clone().text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}}class LimitedSet extends Set{constructor(e){super(),this.maxSize=e}add(e){if(this.size>=this.maxSize){const e=this.values().next().value;this.delete(e)}super.add(e)}}const l=new LimitedSet(20);function fetchWithTurboHeaders(e,t={}){const n=new Headers(t.headers||{}),r=uuid();return l.add(r),n.append("X-Turbo-Request-Id",r),window.fetch(e,{...t,headers:n})}function fetchMethodFromString(e){switch(e.toLowerCase()){case"get":return u.get;case"post":return u.post;case"put":return u.put;case"patch":return u.patch;case"delete":return u.delete}}const u={get:"get",post:"post",put:"put",patch:"patch",delete:"delete"};const d={urlEncoded:"application/x-www-form-urlencoded",multipart:"multipart/form-data",plain:"text/plain"};class FetchRequest{abortController=new AbortController;#t=e=>{};
6constructor(e,t,n,r=new URLSearchParams,s=null,i=d.urlEncoded){const[a,o]=buildResourceAndBody(expandURL(n),t,r,i);this.delegate=e,this.url=a,this.target=s,this.fetchOptions={credentials:"same-origin",redirect:"follow",method:t.toUpperCase(),headers:{...this.defaultHeaders},body:o,signal:this.abortSignal,referrer:this.delegate.referrer?.href},this.enctype=i}get method(){return this.fetchOptions.method}set method(e){const t=this.isSafe?this.url.searchParams:this.fetchOptions.body||new FormData,n=fetchMethodFromString(e)||u.get;this.url.search="";const[r,s]=buildResourceAndBody(this.url,n,t,this.enctype);this.url=r,this.fetchOptions.body=s,this.fetchOptions.method=n.toUpperCase()}get headers(){return this.fetchOptions.headers}set headers(e){this.fetchOptions.headers=e}get body(){return this.isSafe?this.url.searchParams:this.fetchOptions.body}set body(e){this.fetchOptions.body=e}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){const{fetchOptions:e}=this;this.delegate.prepareRequest(this);const t=await this.#n(e);try{this.delegate.requestStarted(this),t.detail.fetchRequest?this.response=t.detail.fetchRequest.response:this.response=fetchWithTurboHeaders(this.url.href,e);const n=await this.response;return await this.receive(n)}catch(e){if("AbortError"!==e.name)throw this.#r(e)&&this.delegate.requestErrored(this,e),e}finally{this.delegate.requestFinished(this)}}async receive(e){const t=new FetchResponse(e);return dispatch("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:t},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,t):t.succeeded?this.delegate.requestSucceededWithResponse(this,t):this.delegate.requestFailedWithResponse(this,t),t}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}get isSafe(){return isSafe(this.method)}get abortSignal(){return this.abortController.signal}acceptResponseType(e){this.headers.Accept=[e,this.headers.Accept].join(", ")}async#n(e){const t=new Promise(e=>this.#t=e),n=dispatch("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url,resume:this.#t},target:this.target});return this.url=n.detail.url,n.defaultPrevented&&await t,n}#r(e){return!dispatch("turbo:fetch-request-error",{target:this.target,cancelable:!0,detail:{request:this,error:e}}).defaultPrevented}}function isSafe(e){return fetchMethodFromString(e)==u.get}
6function buildResourceAndBody(e,t,n,r){const s=Array.from(n).length>0?new URLSearchParams(entriesExcludingFiles(n)):e.searchParams;return isSafe(t)?[mergeIntoURLSearchParams(e,s),null]:r==d.urlEncoded?[e,s]:[e,n]}function entriesExcludingFiles(e){const t=[];for(const[n,r]of e)r instanceof File||t.push([n,r]);return t}function mergeIntoURLSearchParams(e,t){const n=new URLSearchParams(entriesExcludingFiles(t));return e.search=n.toString(),e}class AppearanceObserver{started=!1;constructor(e,t){this.delegate=e,this.element=t,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}intersect=e=>{const t=e.slice(-1)[0];t?.isIntersecting&&this.delegate.elementAppearedInViewport(this.element)}}class StreamMessage{static contentType="text/vnd.turbo-stream.html";static wrap(e){return"string"==typeof e?new this(function createDocumentFragment(e){const t=document.createElement("template");return t.innerHTML=e,t.content}(e)):e}constructor(e){this.fragment=function importStreamElements(e){for(const t of e.querySelectorAll("turbo-stream")){const e=document.importNode(t,!0);for(const t of e.templateElement.content.querySelectorAll("script"))t.replaceWith(activateScriptElement(t));t.replaceWith(e)}return e}(e)}}const identity=e=>e;class LRUCache{keys=[];entries={};#s;constructor(e,t=identity){this.size=e,this.#s=t}has(e){return this.#s(e)in this.entries}get(e){if(this.has(e)){const t=this.read(e);return this.touch(e),t}}put(e,t){return this.write(e,t),this.touch(e),t}clear(){for(const e of Object.keys(this.entries))this.evict(e)}read(e){return this.entries[this.#s(e)]}write(e,t){this.entries[this.#s(e)]=t}touch(e){e=this.#s(e);const t=this.keys.indexOf(e);t>-1&&this.keys.splice(t,1),this.keys.unshift(e),this.trim()}trim(){for(const e of this.keys.splice(this.size))this.evict(e)}evict(e){delete this.entries[e]}}const h=1e4,p=new class PrefetchCache extends LRUCache{#i=null;#a={};constructor(e=1,t=100){super(e,toCacheKey),this.prefetchDelay=t}putLater(e,t,n){this.#i=setTimeout(()=>{t.perform(),this.put(e,t,n),this.#i=null},this.prefetchDelay)}put(e,t,n=h){super.put(e,t),this.#a[toCacheKey(e)]=new Date((new Date).getTime()+n)}clear(){super.clear(),this.#i&&clearTimeout(this.#i)}evict(e){super.evict(e),delete this.#a[e]}has(e){if(super.has(e)){const t=this.#a[toCacheKey(e)];return t&&t>Date.now()}return!1}},m={initialized:"initialized",requesting:"requesting",waiting:"waiting",receiving:"receiving",stopping:"stopping",stopped:"stopped"};class FormSubmission{state=m.initialized;static confirmMethod(e){return Promise.resolve(confirm(e))}constructor(e,t,n,r=!1){const s=function getMethod(e,t){const n=t?.getAttribute("formmethod")||e.getAttribute("method")||"";return fetchMethodFromString(n.toLowerCase())||u.get}(t,n),i=function getAction(e,t){const n=expandURL(e);isSafe(t)&&(n.search="");return n}(function getFormAction(e,t){const n="string"==typeof e.action?e.action:null;return t?.hasAttribute("formaction")?t.getAttribute("formaction")||"":e.getAttribute("action")||n||""}(t,n),s),a=function buildFormData(e,t){const n=new FormData(e),r=t?.getAttribute("name"),s=t?.getAttribute("value");r&&n.append(r,s||"");return n}(t,n),o=function getEnctype(e,t){return function fetchEnctypeFromString(e){switch(e.toLowerCase()){case d.multipart:return d.multipart;case d.plain:return d.plain;default:return d.urlEncoded}}(t?.getAttribute("formenctype")||e.enctype)}(t,n);this.delegate=e,this.formElement=t,this.submitter=n,this.fetchRequest=new FetchRequest(this,s,i,a,t,o),this.mustRedirect=r}get method(){return this.fetchRequest.method}set method(e){this.fetchRequest.method=e}get action(){return this.fetchRequest.url.toString()}set action(e){this.fetchRequest.url=expandURL(e)}get body(){return this.fetchRequest.body}get enctype(){return this.fetchRequest.enctype}get isSafe(){return this.fetchRequest.isSafe}get location(){return this.fetchRequest.url}async start(){const{initialized:e,requesting:t}=m,n=getAttribute("data-turbo-confirm",this.submitter,this.formElement);if("string"==typeof n){const e="function"==typeof c.forms.confirm?c.forms.confirm:FormSubmission.confirmMethod;if(!await e(n,this.formElement,this.submitter))return}if(this.state==e)return this.state=t,this.fetchRequest.perform()}stop(){const{stopping:e,stopped:t}=m;if(this.state!=e&&this.state!=t)return this.state=e,this.fetchRequest.cancel(),!0}prepareRequest(e){if(!e.isSafe){const t=function getCookieValue(e){if(null!=e){const t=(document.cookie?document.cookie.split("; "):[]).find(t=>t.startsWith(e));if(t){const e=t.split("=").slice(1).join("=");return e?decodeURIComponent(e):void 0}}}(getMetaContent("csrf-param"))||getMetaContent("csrf-token");t&&(e.headers["X-CSRF-Token"]=t)}this.requestAcceptsTurboStreamResponse(e)&&e.acceptResponseType(StreamMessage.contentType)}requestStarted(e){this.state=m.waiting,this.submitter&&c.forms.submitter.beforeSubmit(this.submitter),this.setSubmitsWith(),markAsBusy(this.formElement),dispatch("turbo:submit-start",{target:this.formElement,detail
6:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,t){p.clear(),this.result={success:t.succeeded,fetchResponse:t}}requestSucceededWithResponse(e,t){if(t.clientError||t.serverError)this.delegate.formSubmissionFailedWithResponse(this,t);else if(p.clear(),this.requestMustRedirect(e)&&function responseSucceededWithoutRedirect(e){return 200==e.statusCode&&!e.redirected}(t)){const e=new Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,e)}else this.state=m.receiving,this.result={success:!0,fetchResponse:t},this.delegate.formSubmissionSucceededWithResponse(this,t)}requestFailedWithResponse(e,t){this.result={success:!1,fetchResponse:t},this.delegate.formSubmissionFailedWithResponse(this,t)}requestErrored(e,t){this.result={success:!1,error:t},this.delegate.formSubmissionErrored(this,t)}requestFinished(e){this.state=m.stopped,this.submitter&&c.forms.submitter.afterSubmit(this.submitter),this.resetSubmitterText(),clearBusyState(this.formElement),dispatch("turbo:submit-end",{target:this.formElement,detail:{formSubmission:this,...this.result}}),this.delegate.formSubmissionFinished(this)}setSubmitsWith(){if(this.submitter&&this.submitsWith)if(this.submitter.matches("button"))this.originalSubmitText=this.submitter.innerHTML,this.submitter.innerHTML=this.submitsWith;else if(this.submitter.matches("input")){const e=this.submitter;this.originalSubmitText=e.value,e.value=this.submitsWith}}resetSubmitterText(){if(this.submitter&&this.originalSubmitText)if(this.submitter.matches("button"))this.submitter.innerHTML=this.originalSubmitText;else if(this.submitter.matches("input")){this.submitter.value=this.originalSubmitText}}requestMustRedirect(e){return!e.isSafe&&this.mustRedirect}requestAcceptsTurboStreamResponse(e){return!e.isSafe||function hasAttribute(e,...t){return t.some(t=>t&&t.hasAttribute(e))}("data-turbo-stream",this.submitter,this.formElement)}get submitsWith(){return this.submitter?.getAttribute("data-turbo-submits-with")}}class Snapshot{constructor(e){this.element=e}get activeElement(){return this.element.ownerDocument.activeElement}get children(){return[...this.element.children]}hasAnchor(e){return null!=this.getElementForAnchor(e)}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){return queryAutofocusableElement(this.element)}get permanentElements(){return queryPermanentElementsAll(this.element)}getPermanentElementById(e){return getPermanentElementById(this.element,e)}getPermanentElementMapForSnapshot(e){const t={};for(const n of this.permanentElements){const{id:r}=n,s=e.getPermanentElementById(r);s&&(t[r]=[n,s])}return t}}function getPermanentElementById(e,t){return e.querySelector(`#${t}[data-turbo-permanent]`)}function queryPermanentElementsAll(e){return e.querySelectorAll("[id][data-turbo-permanent]")}class FormSubmitObserver{started=!1;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}submitCaptured=()=>{this.eventTarget.removeEventListener("submit",this.submitBubbled,!1),this.eventTarget.addEventListener("submit",this.submitBubbled,!1)};submitBubbled=e=>{if(!e.defaultPrevented){const t=e.target instanceof HTMLFormElement?e.target:void 0,n=e.submitter||void 0;t&&function submissionDoesNotDismissDialog(e,t){const n=t?.getAttribute("formmethod")||e.getAttribute("method");return"dialog"!=n}(t,n)&&function submissionDoesNotTargetIFrame(e,t){const n=t?.getAttribute("formtarget")||e.getAttribute("target");return doesNotTargetIFrame(n)}(t,n)&&this.delegate.willSubmitForm(t,n)&&(e.preventDefault(),e.stopImmediatePropagation(),this.delegate.formSubmitted(t,n))}}}class View{#o=e=>{};#c=e=>{};constructor(e,t){this.delegate=e,this.element=t}scrollToAnchor(e){const t=this.snapshot.getElementForAnchor(e);t?(this.focusElement(t),this.scrollToElement(t)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(getAnchor(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:t}){this.scrollRoot.scrollTo(e,t)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}
6async render(e){const{isPreview:t,shouldRender:n,willRender:r,newSnapshot:s}=e,i=r;if(n)try{this.renderPromise=new Promise(e=>this.#o=e),this.renderer=e,await this.prepareToRenderSnapshot(e);const n=new Promise(e=>this.#c=e),r={resume:this.#c,render:this.renderer.renderElement,renderMethod:this.renderer.renderMethod};this.delegate.allowsImmediateRender(s,r)||await n,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(s,t,this.renderer.renderMethod),this.delegate.preloadOnLoadLinksForView(this.element),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.#o(void 0),delete this.renderPromise}else i&&this.invalidate(e.reloadReason)}invalidate(e){this.delegate.viewInvalidated(e)}async prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),await e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}markVisitDirection(e){this.element.setAttribute("data-turbo-visit-direction",e)}unmarkVisitDirection(){this.element.removeAttribute("data-turbo-visit-direction")}async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}}class FrameView extends View{missing(){this.element.innerHTML='<strong class="turbo-frame-error">Content missing</strong>'}get snapshot(){return new Snapshot(this.element)}}class LinkInterceptor{constructor(e,t){this.delegate=e,this.element=t}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}clickBubbled=e=>{this.clickEventIsSignificant(e)?this.clickEvent=e:delete this.clickEvent};linkClicked=e=>{this.clickEvent&&this.clickEventIsSignificant(e)&&this.delegate.shouldInterceptLinkClick(e.target,e.detail.url,e.detail.originalEvent)&&(this.clickEvent.preventDefault(),e.preventDefault(),this.delegate.linkClickIntercepted(e.target,e.detail.url,e.detail.originalEvent)),delete this.clickEvent};willVisit=e=>{delete this.clickEvent};clickEventIsSignificant(e){const t=e.composed?e.target?.parentElement:e.target,n=findLinkFromClickTarget(t)||t;return n instanceof Element&&n.closest("turbo-frame, html")==this.element}}class LinkClickObserver{started=!1;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickCaptured=()=>{this.eventTarget.removeEventListener("click",this.clickBubbled,!1),this.eventTarget.addEventListener("click",this.clickBubbled,!1)};clickBubbled=e=>{if(e instanceof MouseEvent&&this.clickEventIsSignificant(e)){const t=findLinkFromClickTarget(e.composedPath&&e.composedPath()[0]||e.target);if(t&&doesNotTargetIFrame(t.target)){const n=getLocationForLink(t);this.delegate.willFollowLinkToLocation(t,n,e)&&(e.preventDefault(),this.delegate.followedLinkToLocation(t,n))}}};clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}}class FormLinkClickObserver{constructor(e,t){this.delegate=e,this.linkInterceptor=new LinkClickObserver(this,t)}start(){this.linkInterceptor.start()}stop(){this.linkInterceptor.stop()}canPrefetchRequestToLocation(e,t){return!1}prefetchAndCacheRequestToLocation(e,t){}willFollowLinkToLocation(e,t,n){return this.delegate.willSubmitFormLinkToLocation(e,t,n)&&(e.hasAttribute("data-turbo-method")||e.hasAttribute("data-turbo-stream"))}followedLinkToLocation(e,t){const n=document.createElement("form");for(const[e,r]of t.searchParams)n.append(Object.assign(document.createElement("input"),{type:"hidden",name:e,value:r}));const r=Object.assign(t,{search:""});n.setAttribute("data-turbo","true"),n.setAttribute("action",r.href),n.setAttribute("hidden","");const s=e.getAttribute("data-turbo-method");s&&n.setAttribute("method",s);const i=e.getAttribute("data-turbo-frame");i&&n.setAttribute("data-turbo-frame",i);const a=getVisitAction(e);a&&n.setAttribute("data-turbo-action",a);const o=e.getAttribute("data-turbo-confirm");o&&n.setAttribute("data-turbo-confirm",o);e.hasAttribute("data-turbo-stream")&&n.setAttribute("data-turbo-stream",""),this.delegate.submittedFormLinkToLocation(e,t,n),document.body.appendChild(n),n.addEventListener("turbo:submit-end",()=>n.remove(),{once:!0}),requestAnimationFrame(()=>n.requestSubmit())}}
6class Bardo{static async preservingPermanentElements(e,t,n){const r=new this(e,t);r.enter(),await n(),r.leave()}constructor(e,t){this.delegate=e,this.permanentElementMap=t}enter(){for(const e in this.permanentElementMap){const[t,n]=this.permanentElementMap[e];this.delegate.enteringBardo(t,n),this.replaceNewPermanentElementWithPlaceholder(n)}}leave(){for(const e in this.permanentElementMap){const[t]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(t),this.replacePlaceholderWithPermanentElement(t),this.delegate.leavingBardo(t)}}replaceNewPermanentElementWithPlaceholder(e){const t=function createPlaceholderForPermanentElement(e){const t=document.createElement("meta");return t.setAttribute("name","turbo-permanent-placeholder"),t.setAttribute("content",e.id),t}(e);e.replaceWith(t)}replaceCurrentPermanentElementWithClone(e){const t=e.cloneNode(!0);e.replaceWith(t)}replacePlaceholderWithPermanentElement(e){const t=this.getPlaceholderById(e.id);t?.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find(t=>t.content==e)}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}}class Renderer{#l=null;static renderElement(e,t){}constructor(e,t,n,r=!0){this.currentSnapshot=e,this.newSnapshot=t,this.isPreview=n,this.willRender=r,this.renderElement=this.constructor.renderElement,this.promise=new Promise((e,t)=>this.resolvingFunctions={resolve:e,reject:t})}get shouldRender(){return!0}get shouldAutofocus(){return!0}get reloadReason(){}prepareToRender(){}render(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}async preservingPermanentElements(e){await Bardo.preservingPermanentElements(this,this.permanentElementMap,e)}focusFirstAutofocusableElement(){if(this.shouldAutofocus){const e=this.connectedSnapshot.firstAutofocusableElement;e&&e.focus()}}enteringBardo(e){this.#l||e.contains(this.currentSnapshot.activeElement)&&(this.#l=this.currentSnapshot.activeElement)}leavingBardo(e){e.contains(this.#l)&&this.#l instanceof HTMLElement&&(this.#l.focus(),this.#l=null)}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}get renderMethod(){return"replace"}}class FrameRenderer extends Renderer{static renderElement(e,t){const n=document.createRange();n.selectNodeContents(e),n.deleteContents();const r=t,s=r.ownerDocument?.createRange();s&&(s.selectNodeContents(r),e.appendChild(s.extractContents()))}constructor(e,t,n,r,s,i=!0){super(t,n,r,s,i),this.delegate=e}get shouldRender(){return!0}async render(){await nextRepaint(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),await nextRepaint(),this.focusFirstAutofocusableElement(),await nextRepaint(),this.activateScriptElements()}loadFrameElement(){this.delegate.willRenderFrame(this.currentElement,this.newElement),this.renderElement(this.currentElement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){const e=this.currentElement.firstElementChild,t=function readScrollLogicalPosition(e,t){return"end"==e||"start"==e||"center"==e||"nearest"==e?e:t}(this.currentElement.getAttribute("data-autoscroll-block"),"end"),n=function readScrollBehavior(e,t){return"auto"==e||"smooth"==e?e:t}(this.currentElement.getAttribute("data-autoscroll-behavior"),"auto");if(e)return e.scrollIntoView({block:t,behavior:n}),!0}return!1}activateScriptElements(){for(const e of this.newScriptElements){const t=activateScriptElement(e);e.replaceWith(t)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}}var g=function(){const noOp=()=>{},e={morphStyle:"outerHTML",callbacks:{beforeNodeAdded:noOp,afterNodeAdded:noOp,beforeNodeMorphed:noOp,afterNodeMorphed:noOp,beforeNodeRemoved:noOp,afterNodeRemoved:noOp,beforeAttributeUpdated:noOp},head:{style:"merge",shouldPreserve:e=>"true"===e.getAttribute("im-preserve"),shouldReAppend:e=>"true"===e.getAttribute("im-re-append"),shouldRemove:noOp,afterHeadMorphed:noOp},restoreFocus:!0};const t=function(){function createNode(e,t,r,s){if(!1===s.callbacks.beforeNodeAdded(t))return null;if(s.idMap.has(t)){const i=document.createElement(t.tagName);return e.insertBefore(i,r),n(i,t,s),s.callbacks.afterNodeAdded(i),i}{const n=document.importNode(t,!0);return e.insertBefore(n,r),s.callbacks.afterNodeAdded(n),n}}
6const e=function(){function isIdSetMatch(e,t,n){let r=e.idMap.get(t),s=e.idMap.get(n);if(!s||!r)return!1;for(const e of r)if(s.has(e))return!0;return!1}function isSoftMatch(e,t){const n=e,r=t;return n.nodeType===r.nodeType&&n.tagName===r.tagName&&(!n.getAttribute?.("id")||n.getAttribute?.("id")===r.getAttribute?.("id"))}return function findBestMatch(e,t,n,r){let s=null,i=t.nextSibling,a=0,o=n;for(;o&&o!=r;){if(isSoftMatch(o,t)){if(isIdSetMatch(e,o,t))return o;null===s&&(e.idMap.has(o)||(s=o))}if(null===s&&i&&isSoftMatch(o,i)&&(a++,i=i.nextSibling,a>=2&&(s=void 0)),e.activeElementAndParents.includes(o))break;o=o.nextSibling}return s||null}}();function removeNode(e,t){if(e.idMap.has(t))moveBefore(e.pantry,t,null);else{if(!1===e.callbacks.beforeNodeRemoved(t))return;t.parentNode?.removeChild(t),e.callbacks.afterNodeRemoved(t)}}function removeNodesBetween(e,t,n){let r=t;for(;r&&r!==n;){let t=r;r=r.nextSibling,removeNode(e,t)}return r}function moveBeforeById(e,t,n,r){const s=r.target.getAttribute?.("id")===t&&r.target||r.target.querySelector(`[id="${t}"]`)||r.pantry.querySelector(`[id="${t}"]`);return function removeElementFromAncestorsIdMaps(e,t){const n=e.getAttribute("id");for(;e=e.parentNode;){let r=t.idMap.get(e);r&&(r.delete(n),r.size||t.idMap.delete(e))}}(s,r),moveBefore(e,s,n),s}function moveBefore(e,t,n){if(e.moveBefore)try{e.moveBefore(t,n)}catch(r){e.insertBefore(t,n)}else e.insertBefore(t,n)}return function morphChildren(t,r,s,i=null,a=null){r instanceof HTMLTemplateElement&&s instanceof HTMLTemplateElement&&(r=r.content,s=s.content),i||=r.firstChild;for(const o of s.childNodes){if(i&&i!=a){const r=e(t,o,i,a);if(r){r!==i&&removeNodesBetween(t,i,r),n(r,o,t),i=r.nextSibling;continue}}if(o instanceof Element){const e=o.getAttribute("id");if(t.persistentIds.has(e)){const s=moveBeforeById(r,e,i,t);n(s,o,t),i=s.nextSibling;continue}}const s=createNode(r,o,i,t);s&&(i=s.nextSibling)}for(;i&&i!=a;){const e=i;i=i.nextSibling,removeNode(t,e)}}}(),n=function(){function syncBooleanAttribute(e,t,n,r){const s=t[n];if(s!==e[n]){const i=ignoreAttribute(n,e,"update",r);i||(e[n]=t[n]),s?i||e.setAttribute(n,""):ignoreAttribute(n,e,"remove",r)||e.removeAttribute(n)}}function ignoreAttribute(e,t,n,r){return!("value"!==e||!r.ignoreActiveValue||t!==document.activeElement)||!1===r.callbacks.beforeAttributeUpdated(e,t,n)}function ignoreValueOfActiveElement(e,t){return!!t.ignoreActiveValue&&e===document.activeElement&&e!==document.body}return function morphNode(e,n,r){return r.ignoreActive&&e===document.activeElement?null:(!1===r.callbacks.beforeNodeMorphed(e,n)||(e instanceof HTMLHeadElement&&r.head.ignore||(e instanceof HTMLHeadElement&&"morph"!==r.head.style?handleHeadElement(e,n,r):(!function morphAttributes(e,t,n){let r=t.nodeType;if(1===r){const r=e,s=t,i=r.attributes,a=s.attributes;for(const e of a)ignoreAttribute(e.name,r,"update",n)||r.getAttribute(e.name)!==e.value&&r.setAttribute(e.name,e.value);for(let e=i.length-1;0<=e;e--){const t=i[e];if(t&&!s.hasAttribute(t.name)){if(ignoreAttribute(t.name,r,"remove",n))continue;r.removeAttribute(t.name)}}ignoreValueOfActiveElement(r,n)||function syncInputValue(e,t,n){if(e instanceof HTMLInputElement&&t instanceof HTMLInputElement&&"file"!==t.type){let r=t.value,s=e.value;syncBooleanAttribute(e,t,"checked",n),syncBooleanAttribute(e,t,"disabled",n),t.hasAttribute("value")?s!==r&&(ignoreAttribute("value",e,"update",n)||(e.setAttribute("value",r),e.value=r)):ignoreAttribute("value",e,"remove",n)||(e.value="",e.removeAttribute("value"))}else if(e instanceof HTMLOptionElement&&t instanceof HTMLOptionElement)syncBooleanAttribute(e,t,"selected",n);else if(e instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement){let r=t.value,s=e.value;if(ignoreAttribute("value",e,"update",n))return;r!==s&&(e.value=r),e.firstChild&&e.firstChild.nodeValue!==r&&(e.firstChild.nodeValue=r)}}(r,s,n)}8!==r&&3!==r||e.nodeValue!==t.nodeValue&&(e.nodeValue=t.nodeValue)}(e,n,r),ignoreValueOfActiveElement(e,r)||t(r,e,n))),r.callbacks.afterNodeMorphed(e,n)),e)}}();function handleHeadElement(e,t,n){let r=[],s=[],i=[],a=[],o=new Map;for(const e of t.children)o.set(e.outerHTML,e);for(const t of e.children){let e=o.has(t.outerHTML),r=n.head.shouldReAppend(t),c=n.head.shouldPreserve(t);e||c?r?s.push(t):(o.delete(t.outerHTML),i.push(t)):"append"===n.head.style?r&&(s.push(t),a.push(t)):!1!==n.head.shouldRemove(t)&&s.push(t)}a.push(...o.values());let c=[];for(const t of a){let s=document.createRange().createContextualFragment(t.outerHTML).firstChild;if(!1!==n.callbacks.beforeNodeAdded(s)){if("href"in s&&s.href||"src"in s&&s.src){let e,t=new Promise(function(t){e=t});s.addEventListener("load",function(){e()}),c.push(t)}e.appendChild(s),n.callbacks.afterNodeAdded(s),r.push(s)}}for(const t of s)!1!==n.callbacks.beforeNodeRemoved(t)&&(e.removeChild(t),n.callbacks.afterNodeRemoved(t));return n.head.afterHeadMorphed(e,{added:r,kept:i,removed:s}),c}const r=function(){function createPantry(){const e=document.createElement("div");return e.hidden=!0,document.body.insertAdjacentElement("afterend",e),e}function createActiveElementAndParents(e){let t=[],n=document.activeElement;if("BODY"!==n?.tagName&&e.contains(n))for(;n&&(t.push(n),n!==e);)n=n.parentElement;return t}function findIdElements(e){let t=Array.from(e.querySelectorAll("[id]"));return e.getAttribute?.("id")&&t.push(e),t}function populateIdMapWithTree(e,t,n,r){for(const s of r){const r=s.getAttribute("id");if(t.has(r)){let t=s;for(;t;){let s=e.get(t);if(null==s&&(s=new Set,e.set(t,s)),s.add(r),t===n)break;t=t.parentElement}}}}return function createMorphContext(t,n,r){const{persistentIds:s,idMap:i}=function createIdMaps(e,t){const n=findIdElements(e),r=findIdElements(t),s=function createPersistentIds(e,t){let n=new Set,r=new Map;for(const{id:t,tagName:s}of e)r.has(t)?n.add(t):r.set(t,s);let s=new Set;for(const{id:e,tagName:i}of t)s.has(e)?n.add(e):r.get(e)===i&&s.add(e);for(const e of n)s.delete(e);return s}(n,r);let i=new Map;populateIdMapWithTree(i,s,e,n);const a=t.__idiomorphRoot||t;return populateIdMapWithTree(i,s,a,r),{persistentIds:s,idMap:i}}(t,n),a=function mergeDefaults(t){let n=Object.assign({},e);return Object.assign(n,t),n.callbacks=Object.assign({},e.callbacks,t.callbacks),n.head=Object.assign({},e.head,t.head),n}(r),o=a.morphStyle||"outerHTML";if(!["innerHTML","outerHTML"].includes(o))throw`Do not understand how to morph style ${o}`;return{target:t,newContent:n,config:a,morphStyle:o,ignoreActive:a.ignoreActive,ignoreActiveValue:a.ignoreActiveValue,restoreFocus:a.restoreFocus,idMap:i,persistentIds:s,pantry:createPantry(),activeElementAndParents:createActiveElementAndParents(t),callbacks:a.callbacks,head:a.head}}}(),{normalizeElement:s,normalizeParent:i}=function(){const e=new WeakSet;class SlicedParentNode{constructor(e){this.originalNode=e,this.realParentNode=e.parentNode,this.previousSibling=e.previousSibling,this.nextSibling=e.nextSibling}get childNodes(){const e=[];let t=this.previousSibling?this.previousSibling.nextSibling:this.realParentNode.firstChild;for(;t&&t!=this.nextSibling;)e.push(t),t=t.nextSibling;return e}querySelectorAll(e){return this.childNodes.reduce((t,n)=>{if(n instanceof Element){n.matches(e)&&t.push(n);const r=n.querySelectorAll(e);for(let e=0;e<r.length;e++)t.push(r[e])}return t},[])}insertBefore(e,t){return this.realParentNode.insertBefore(e,t)}moveBefore(e,t){return this.realParentNode.moveBefore(e,t)}get __idiomorphRoot(){return this.originalNode}}return{normalizeElement:function normalizeElement(e){return e instanceof Document?e.documentElement:e},normalizeParent:function normalizeParent(t){if(null==t)return document.createElement("div");if("string"==typeof t)return normalizeParent(function parseContent(t){let n=new DOMParser,r=t.replace(/<svg(\s[^>]*>|>)([\s\S]*?)<\/svg>/gim,"");if(r.match(/<\/html>/)||r.match(/<\/head>/)||r.match(/<\/body>/)){let s=n.parseFromString(t,"text/html");if(r.match(/<\/html>/))return e.add(s),s;{let t=s.firstChild;return t&&e.add(t),t}}{let r=n.parseFromString("<body><template>"+t+"</template></body>","text/html").body.querySelector("template").content;return e.add(r),r}}(t));if(e.has(t))return t;if(t instanceof Node){if(t.parentNode)return new SlicedParentNode(t);{const e=document.createElement("div");return e.append(t),e}}{const e=document.createElement("div");for(const n of[...t])e.append(n);return e}}}}();return{morph:function morph(e,n,a={}){e=s(e);const o=i(n),c=r(e,o,a),l=function saveAndRestoreFocus(e,t){if(!e.config.restoreFocus)return t();let n=document.activeElement;if(!(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement))return t();const{id:r,selectionStart:s,selectionEnd:i}=n,a=t();r&&r!==document.activeElement?.getAttribute("id")&&(n=e.target.querySelector(`[id="${r}
6"]`),n?.focus());n&&!n.selectionEnd&&i&&n.setSelectionRange(s,i);return a}(c,()=>function withHeadBlocking(e,t,n,r){if(e.head.block){const s=t.querySelector("head"),i=n.querySelector("head");if(s&&i){const t=handleHeadElement(s,i,e);return Promise.all(t).then(()=>{const t=Object.assign(e,{head:{block:!1,ignore:!0}});return r(t)})}}return r(e)}(c,e,o,n=>"innerHTML"===n.morphStyle?(t(n,e,o),Array.from(e.childNodes)):function morphOuterHTML(e,n,r){const s=i(n);return t(e,s,r,n,n.nextSibling),Array.from(s.childNodes)}(n,e,o)));return c.pantry.remove(),l},defaults:e}}();function morphElements(e,t,{callbacks:n,...r}={}){g.morph(e,t,{...r,callbacks:new DefaultIdiomorphCallbacks(n)})}function morphChildren(e,t,n={}){morphElements(e,t.childNodes,{...n,morphStyle:"innerHTML"})}function shouldRefreshFrameWithMorphing(e,t){return e instanceof FrameElement&&e.shouldReloadWithMorph&&(!t||function areFramesCompatibleForRefreshing(e,t){return t instanceof Element&&"TURBO-FRAME"===t.nodeName&&e.id===t.id&&(!t.getAttribute("src")||urlsAreEqual(e.src,t.getAttribute("src")))}(e,t))&&!e.closest("[data-turbo-permanent]")}function closestFrameReloadableWithMorphing(e){return e.parentElement.closest("turbo-frame[src][refresh=morph]")}class DefaultIdiomorphCallbacks{#u;constructor({beforeNodeMorphed:e}={}){this.#u=e||(()=>!0)}beforeNodeAdded=e=>!(e.id&&e.hasAttribute("data-turbo-permanent")&&document.getElementById(e.id));beforeNodeMorphed=(e,t)=>{if(e instanceof Element){if(!e.hasAttribute("data-turbo-permanent")&&this.#u(e,t)){return!dispatch("turbo:before-morph-element",{cancelable:!0,target:e,detail:{currentElement:e,newElement:t}}).defaultPrevented}return!1}};beforeAttributeUpdated=(e,t,n)=>!dispatch("turbo:before-morph-attribute",{cancelable:!0,target:t,detail:{attributeName:e,mutationType:n}}).defaultPrevented;beforeNodeRemoved=e=>this.beforeNodeMorphed(e);afterNodeMorphed=(e,t)=>{e instanceof Element&&dispatch("turbo:morph-element",{target:e,detail:{currentElement:e,newElement:t}})}}class MorphingFrameRenderer extends FrameRenderer{static renderElement(e,t){dispatch("turbo:before-frame-morph",{target:e,detail:{currentElement:e,newElement:t}}),morphChildren(e,t,{callbacks:{beforeNodeMorphed:(t,n)=>!shouldRefreshFrameWithMorphing(t,n)||closestFrameReloadableWithMorphing(t)!==e||(t.reload(),!1)}})}async preservingPermanentElements(e){return await e()}}class ProgressBar{static animationDuration=300;static get defaultCSS(){return unindent` 7 .turbo-progress-bar { 8 position: fixed; 9 display: block; 10 top: 0; 11 left: 0; 12 height: 3px; 13 background: #0076ff; 14 z-index: 2147483647; 15 transition: 16 width ${ProgressBar.animationDuration}ms ease-out, 17 opacity ${ProgressBar.animationDuration/2}ms ${ProgressBar.animationDuration/2}ms ease-in; 18 transform: translate3d(0, 0, 0); 19 } 20 `}hiding=!1;value=0;visible=!1;constructor(){this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,1.5*ProgressBar.animationDuration)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,ProgressBar.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}trickle=()=>{this.setValue(this.value+Math.random()/100)};refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=10+90*this.value+"%"})}createStylesheetElement(){const e=document.createElement("style");e.type="text/css",e.textContent=ProgressBar.defaultCSS;const t=getCspNonce();return t&&(e.nonce=t),e}createProgressElement(){const e=document.createElement("div");return e.className="turbo-progress-bar",e}}class HeadSnapshot extends Snapshot{detailsByOuterHTML=this.children.filter(e=>!function elementIsNoscript(e){const t=e.localName;return"noscript"==t}(e)).map(e=>function elementWithoutNonce(e){e.hasAttribute("nonce")&&e.setAttribute("nonce","");return e}(e)).reduce((e,t)=>
20{const{outerHTML:n}=t,r=n in e?e[n]:{type:elementType(t),tracked:elementIsTracked(t),elements:[]};return{...e,[n]:{...r,elements:[...r.elements,t]}}},{});get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(e=>this.detailsByOuterHTML[e].tracked).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,t){return Object.keys(this.detailsByOuterHTML).filter(e=>!(e in t.detailsByOuterHTML)).map(e=>this.detailsByOuterHTML[e]).filter(({type:t})=>t==e).map(({elements:[e]})=>e)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((e,t)=>{const{type:n,tracked:r,elements:s}=this.detailsByOuterHTML[t];return null!=n||r?s.length>1?[...e,...s.slice(1)]:e:[...e,...s]},[])}getMetaValue(e){const t=this.findMetaElementByName(e);return t?t.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce((t,n)=>{const{elements:[r]}=this.detailsByOuterHTML[n];return function elementIsMetaElementWithName(e,t){const n=e.localName;return"meta"==n&&e.getAttribute("name")==t}(r,e)?r:t},0)}}function elementType(e){return function elementIsScript(e){const t=e.localName;return"script"==t}
20(e)?"script":function elementIsStylesheet(e){const t=e.localName;return"style"==t||"link"==t&&"stylesheet"==e.getAttribute("rel")}(e)?"stylesheet":void 0}function elementIsTracked(e){return"reload"==e.getAttribute("data-turbo-track")}class PageSnapshot extends Snapshot{static fromHTMLString(e=""){return this.fromDocument(parseHTMLDocument(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({documentElement:e,body:t,head:n}){return new this(e,t,new HeadSnapshot(n))}constructor(e,t,n){super(t),this.documentElement=e,this.headSnapshot=n}clone(){const e=this.element.cloneNode(!0),t=this.element.querySelectorAll("select"),n=e.querySelectorAll("select");for(const[e,r]of t.entries()){const t=n[e];for(const e of t.selectedOptions)e.selected=!1;for(const e of r.selectedOptions)t.options[e.index].selected=!0}for(const t of e.querySelectorAll('input[type="password"]'))t.value="";for(const t of e.querySelectorAll("noscript"))t.remove();return new PageSnapshot(this.documentElement,e,this.headSnapshot)}get lang(){return this.documentElement.getAttribute("lang")}get dir(){return this.documentElement.getAttribute("dir")}get headElement(){return this.headSnapshot.element}get rootLocation(){return expandURL(this.getSetting("root")??"/")}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return"no-preview"!=this.cacheControlValue}get isCacheable(){return"no-cache"!=this.cacheControlValue}get isVisitable(){return"reload"!=this.getSetting("visit-control")}get prefersViewTransitions(){return("true"===this.getSetting("view-transition")||"same-origin"===this.headSnapshot.getMetaValue("view-transition"))&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches}get refreshMethod(){return this.getSetting("refresh-method")}get refreshScroll(){return this.getSetting("refresh-scroll")}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}}class ViewTransitioner{#d=!1;#h=Promise.resolve();renderChange(e,t){return e&&this.viewTransitionsAvailable&&!this.#d?(this.#d=!0,this.#h=this.#h.then(async()=>{await document.startViewTransition(t).finished})):this.#h=this.#h.then(t),this.#h}get viewTransitionsAvailable(){return document.startViewTransition}}const f={action:"advance",historyChanged:!1,visitCachedSnapshot:()=>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acceptsStreamResponse:!1,refresh:{}},v="visitStart",b="requestStart",_="requestEnd",S="visitEnd",y="initialized",T="started",E="canceled",w="failed",C="completed",I=0,A=-1,k=-2,x={advance:"forward",restore:"back",replace:"none"};class Visit{identifier=uuid();timingMetrics={};followedRedirect=!1;historyChanged=!1;scrolled=!1;shouldCacheSnapshot=!0;acceptsStreamResponse=!1;snapshotCached=!1;state=y;viewTransitioner=new ViewTransitioner;constructor(e,t,n,r={}){this.delegate=e,this.location=t,this.restorationIdentifier=n||uuid();const{action:s,historyChanged:i,referrer:a,snapshot:o,snapshotHTML:c,response:l,visitCachedSnapshot:u,willRender:d,updateHistory:h,shouldCacheSnapshot:p,acceptsStreamResponse:m,direction:g,refresh:v}={...f,...r};this.action=s,this.historyChanged=i,this.referrer=a,this.snapshot=o,this.snapshotHTML=c,this.response=l,this.isPageRefresh=this.view.isPageRefresh(this),this.visitCachedSnapshot=u,this.willRender=d,this.updateHistory=h,this.scrolled=!d,this.shouldCacheSnapshot=p,this.acceptsStreamResponse=m,this.direction=g||x[s],this.refresh=v}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}start(){this.state==y&&(this.recordTimingMetric(v),this.state=T,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==T&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=E)}complete(){this.state==T&&(this.recordTimingMetric(S),this.adapter.visitCompleted(this),this.state=C,this.followRedirect(),this.followedRedirect||this.delegate.visitCompleted(this))}fail(){this.state==T&&(this.state=w,this.adapter.visitFailed(this),this.delegate.visitCompleted(this))}changeHistory(){if(!this.historyChanged&&this.updateHistory){const e=getHistoryMethodForAction(this.location.href===this.referrer?.href?"replace":this.action);this.history.update(e,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new FetchRequest(this,u.get,this.location),this.request.perform())}
20simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(b),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){const{statusCode:t}=e;isSuccessful(t)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,t)}}finishRequest(){this.recordTimingMetric(_),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){const{statusCode:e,responseHTML:t}=this.response;this.render(async()=>{if(this.shouldCacheSnapshot&&this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,isSuccessful(e)&&null!=t){const e=PageSnapshot.fromHTMLString(t);await this.renderPageSnapshot(e,!1),this.adapter.visitRendered(this),this.complete()}else await this.view.renderError(PageSnapshot.fromHTMLString(t),this),this.adapter.visitRendered(this),this.fail()})}}getCachedSnapshot(){const e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!getAnchor(this.location)||e.hasAnchor(getAnchor(this.location)))&&("restore"==this.action||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return PageSnapshot.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return null!=this.getCachedSnapshot()}loadCachedSnapshot(){const e=this.getCachedSnapshot();if(e){const t=this.shouldIssueRequest();this.render(async()=>{this.cacheSnapshot(),this.isPageRefresh?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.renderPageSnapshot(e,t),this.adapter.visitRendered(this),t||this.complete())})}}followRedirect(){this.redirectedToLocation&&!this.followedRedirect&&this.response?.redirected&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response,shouldCacheSnapshot:!1,willRender:!1}),this.followedRedirect=!0)}prepareRequest(e){this.acceptsStreamResponse&&e.acceptResponseType(StreamMessage.contentType)}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,t){}async requestSucceededWithResponse(e,t){const n=await t.responseHTML,{redirected:r,statusCode:s}=t;null==n?this.recordResponse({statusCode:k,redirected:r}):(this.redirectedToLocation=t.redirected?t.location:void 0,this.recordResponse({statusCode:s,responseHTML:n,redirected:r}))}async requestFailedWithResponse(e,t){const n=await t.responseHTML,{redirected:r,statusCode:s}=t;null==n?this.recordResponse({statusCode:k,redirected:r}):this.recordResponse({statusCode:s,responseHTML:n,redirected:r})}requestErrored(e,t){this.recordResponse({statusCode:I,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){this.scrolled||this.view.forceReloaded||this.view.shouldPreserveScrollPosition(this)||("restore"==this.action?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.scrolled=!0)}scrollToRestoredPosition(){const{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){const e=getAnchor(this.location);if(null!=e)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=(new Date).getTime()}getTimingMetrics(){return{...this.timingMetrics}}hasPreloadedResponse(){return"object"==typeof this.response}shouldIssueRequest(){return"restore"==this.action?!this.hasCachedSnapshot():this.willRender}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(this.snapshot).then(e=>e&&this.visitCachedSnapshot(e)),this.snapshotCached=!0)}async render(e){this.cancelRender(),await new Promise(e=>{this.frame="hidden"===document.visibilityState?setTimeout(()=>e(),0):requestAnimationFrame(()=>e())}),await e(),delete this.frame}async renderPageSnapshot(e,t){await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(e),async()=>{await this.view.renderPage(e,t,this.willRender,this),this.performScroll()})}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}}function isSuccessful(e){return e>=200&&e<300}class BrowserAdapter{progressBar=new ProgressBar;constructor(e){this.session=e}visitProposedToLocation(e,t){locationIsVisitable(e,this.navigator.rootLocation)?this.navigator.startVisit(e,t?.restorationIdentifier||uuid(),t):window.location.href=e.toString()}visitStarted(e){this.location=e.location,this.redirectedToLocation=null,e.loadCachedSnapshot(),e.issueRequest()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||"restore"!=e.action?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse(),e.response.redirected&&(this.redirectedToLocation=e.redirectedToLocation)}visitRequestFailedWithStatusCode(e,t){switch(t){case I:case A:case k:return this.reload({reason:"request_failed",context:{statusCode:t}});default:return e.loadResponse()}}visitRequestFinished(e){}visitCompleted(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}pageInvalidated(e){this.reload(e)}visitFailed(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitRendered(e){}linkPrefetchingIsEnabledForLocation(e){return!0}
20formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),null!=this.visitProgressBarTimeout&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){null==this.formProgressBarTimeout&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),null!=this.formProgressBarTimeout&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}showProgressBar=()=>{this.progressBar.show()};reload(e){dispatch("turbo:reload",{detail:e}),window.location.href=(this.redirectedToLocation||this.location)?.toString()||window.location.href}get navigator(){return this.session.navigator}}class CacheObserver{selector="[data-turbo-temporary]";started=!1;start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}removeTemporaryElements=e=>{for(const e of this.temporaryElements)e.remove()};get temporaryElements(){return[...document.querySelectorAll(this.selector)]}}class FrameRedirector{constructor(e,t){this.session=e,this.element=t,this.linkInterceptor=new LinkInterceptor(this,t),this.formSubmitObserver=new FormSubmitObserver(this,t)}start(){this.linkInterceptor.start(),this.formSubmitObserver.start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}shouldInterceptLinkClick(e,t,n){return this.#p(e)}linkClickIntercepted(e,t,n){const r=this.#m(e);r&&r.delegate.linkClickIntercepted(e,t,n)}willSubmitForm(e,t){return null==e.closest("turbo-frame")&&this.#g(e,t)&&this.#p(e,t)}formSubmitted(e,t){const n=this.#m(e,t);n&&n.delegate.formSubmitted(e,t)}#g(e,t){const n=getAction$1(e,t),r=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),s=expandURL(r?.content??"/");return this.#p(e,t)&&locationIsVisitable(n,s)}#p(e,t){if(e instanceof HTMLFormElement?this.session.submissionIsNavigatable(e,t):this.session.elementIsNavigatable(e)){const n=this.#m(e,t);return!!n&&n!=e.closest("turbo-frame")}return!1}#m(e,t){const n=t?.getAttribute("data-turbo-frame")||e.getAttribute("data-turbo-frame");if(n&&"_top"!=n){const e=this.element.querySelector(`#${n}:not([disabled])`);if(e instanceof FrameElement)return e}}}class History{location;restorationIdentifier=uuid();restorationData={};started=!1;currentIndex=0;constructor(e){this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),this.currentIndex=history.state?.turbo?.restorationIndex||0,this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),this.started=!1)}push(e,t){this.update(history.pushState,e,t)}replace(e,t){this.update(history.replaceState,e,t)}update(e,t,n=uuid()){e===history.pushState&&++this.currentIndex;const r={turbo:{restorationIdentifier:n,restorationIndex:this.currentIndex}};e.call(history,r,"",t.href),this.location=t,this.restorationIdentifier=n}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){const{restorationIdentifier:t}=this,n=this.restorationData[t];this.restorationData[t]={...n,...e}}assumeControlOfScrollRestoration(){this.previousScrollRestoration||(this.previousScrollRestoration=history.scrollRestoration??"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}onPopState=e=>{const{turbo:t}=e.state||{};if(this.location=new URL(window.location.href),t){const{restorationIdentifier:e,restorationIndex:n}=t;this.restorationIdentifier=e;const r=n>this.currentIndex?"forward":"back";this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location,e,r),this.currentIndex=n}else this.currentIndex++,this.delegate.historyPoppedWithEmptyState(this.location)}}class LinkPrefetchObserver{started=!1;#f=null;constructor(e,t){this.delegate=e,this.eventTarget=t}start(){this.started||("loading"===this.eventTarget.readyState?this.eventTarget.addEventListener("DOMContentLoaded",this.#v,{once:!0}):this.#v())}stop(){this.started&&(this.eventTarget.removeEventListener("mouseenter",this.#b,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("mouseleave",this.#_,{capture:!0,passive:!0}),this.eventTarget.removeEventListener("turbo:before-fetch-request",this.#S,!0),this.started=!1)}#v=()=>{this.eventTarget.addEventListener("mouseenter",this.#b,{capture:!0,passive:!0}),this.eventTarget.addEventListener("mouseleave",this.#_,{capture:!0,passive:!0}),this.eventTarget.addEventListener("turbo:before-fetch-request",this.#S,!0),this.started=!0};#b=e=>{if("false"===getMetaContent("turbo-prefetch"))return;const t=e.target;if(t.matches&&t.matches("a[href]:not([target^=_]):not([download])")&&this.#y(t)){const e=t,n=getLocationForLink(e);if(this.delegate.canPrefetchRequestToLocation(e,n)){this.#f=e;const r=new FetchRequest(this,u.get,n,new URLSearchParams,t);r.fetchOptions.priority="low",p.putLater(n,r,this.#T)}}};#_=e=>{e.target===this.#f&&this.#E()};#E=()=>{p.clear(),this.#f=null};#S=e=>{if("FORM"!==e.target.tagName&&"GET"===e.detail.fetchOptions.method){const t=p.get(e.detail.url);t&&(e.detail.fetchRequest=t),p.clear()}};prepareRequest(e){const t=e.target;e.headers["X-Sec-Purpose"]="prefetch";const n=t.closest("turbo-frame"),r=t.getAttribute("data-turbo-frame")||n?.getAttribute("target")||n?.id;r&&"_top"!==r&&(e.headers["Turbo-Frame"]=r)}requestSucceededWithResponse(){}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,t){}requestFailedWithResponse(e,t){}get#T(){return Number(getMetaContent("turbo-prefetch-cache-time"))||h}#y(e){return!!e.getAttribute("href")&&(!unfetchableLink(e)&&(!linkToTheSamePage(e)&&(!linkOptsOut(e)&&(!nonSafeLink(e)&&!eventPrevented(e)))))}}const unfetchableLink=e=>e.origin!==document.location.origin||!["http:","https:"].includes(e.protocol)||e.hasAttribute("target"),linkToTheSamePage=e=>e.pathname+e.search===document.location.pathname+document.location.search||e.href.startsWith("#"),linkOptsOut=e=>{if("false"===e.getAttribute("data-turbo-prefetch"))return!0;
20if("false"===e.getAttribute("data-turbo"))return!0;const t=findClosestRecursively(e,"[data-turbo-prefetch]");return!(!t||"false"!==t.getAttribute("data-turbo-prefetch"))},nonSafeLink=e=>{const t=e.getAttribute("data-turbo-method");return!(!t||"get"===t.toLowerCase())||(!!isUJS(e)||(!!e.hasAttribute("data-turbo-confirm")||!!e.hasAttribute("data-turbo-stream")))},isUJS=e=>e.hasAttribute("data-remote")||e.hasAttribute("data-behavior")||e.hasAttribute("data-confirm")||e.hasAttribute("data-method"),eventPrevented=e=>dispatch("turbo:before-prefetch",{target:e,cancelable:!0}).defaultPrevented;class Navigator{constructor(e){this.delegate=e}proposeVisit(e,t={}){this.delegate.allowsVisitingLocationWithAction(e,t.action)&&this.delegate.visitProposedToLocation(e,t)}startVisit(e,t,n={}){this.stop(),this.currentVisit=new Visit(this,expandURL(e),t,{referrer:this.location,...n}),this.currentVisit.start()}submitForm(e,t){this.stop(),this.formSubmission=new FormSubmission(this,e,t,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get rootLocation(){return this.view.snapshot.rootLocation}get history(){return this.delegate.history}formSubmissionStarted(e){"function"==typeof this.adapter.formSubmissionStarted&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,t){if(e==this.formSubmission){const n=await t.responseHTML;if(n){const r=e.isSafe;r||this.view.clearSnapshotCache();const{statusCode:s,redirected:i}=t,a={action:this.#w(e,t),shouldCacheSnapshot:r,response:{statusCode:s,responseHTML:n,redirected:i}};this.proposeVisit(t.location,a)}}}async formSubmissionFailedWithResponse(e,t){const n=await t.responseHTML;if(n){const e=PageSnapshot.fromHTMLString(n);t.serverError?await this.view.renderError(e,this.currentVisit):await this.view.renderPage(e,!1,!0,this.currentVisit),"preserve"!==e.refreshScroll&&this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished(e){"function"==typeof this.adapter.formSubmissionFinished&&this.adapter.formSubmissionFinished(e)}linkPrefetchingIsEnabledForLocation(e){return"function"!=typeof this.adapter.linkPrefetchingIsEnabledForLocation||this.adapter.linkPrefetchingIsEnabledForLocation(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e),delete this.currentVisit}locationWithActionIsSamePage(e,t){return!1}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}#w(e,t){const{submitter:n,formElement:r}=e;return getVisitAction(n,r)||this.#C(t)}#C(e){return e.redirected&&e.location.href===this.location?.href?"replace":"advance"}}const O=0,L=1,R=2,M=3;class PageObserver{stage=O;started=!1;constructor(e){this.delegate=e}start(){this.started||(this.stage==O&&(this.stage=L),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}interpretReadyState=()=>{const{readyState:e}=this;"interactive"==e?this.pageIsInteractive():"complete"==e&&this.pageIsComplete()};pageIsInteractive(){this.stage==L&&(this.stage=R,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==R&&(this.stage=M,this.delegate.pageLoaded())}pageWillUnload=()=>{this.delegate.pageWillUnload()};get readyState(){return document.readyState}}class ScrollObserver{started=!1;constructor(e){this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})};updatePosition(e){this.delegate.scrollPositionChanged(e)}}class StreamMessageRenderer{render({fragment:e}){Bardo.preservingPermanentElements(this,function getPermanentElementMapForFragment(e){const t=queryPermanentElementsAll(document.documentElement),n={};for(const r of t){const{id:t}=r;for(const s of e.querySelectorAll("turbo-stream")){const e=getPermanentElementById(s.templateElement.content,t);e&&(n[t]=[r,e])}}return n}(e),()=>{!async function withAutofocusFromFragment(e,t){const n=`turbo-stream-autofocus-${uuid()}`,r=e.querySelectorAll("turbo-stream"),s=function firstAutofocusableElementInStreams(e){for(const t of e){const e=queryAutofocusableElement(t.templateElement.content);if(e)return e}return null}(r);let i=null;s&&(i=s.id?s.id:n,s.id=i);t(),await nextRepaint();if((null==document.activeElement||document.activeElement==document.body)&&i){const e=document.getElementById(i);elementIsFocusable(e)&&e.focus(),e&&e.id==n&&e.removeAttribute("id")}}(e,()=>{!async function withPreservedFocus(e){const[t,n]=await async function around(e,t){const n=t();return e(),await nextAnimationFrame(),[n,t()]}(e,()=>document.activeElement),r=t&&t.id;if(r){const e=document.getElementById(r);elementIsFocusable(e)&&e!=n&&e.focus()}}(()=>{document.documentElement.appendChild(e)})})})}enteringBardo(e,t){t.replaceWith(e.cloneNode(!0))}leavingBardo(){}}class StreamObserver{sources=new Set;#I=!1;constructor(e){this.delegate=e}start(){this.#I||(this.#I=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.#I&&(this.#I=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}inspectFetchResponse=e=>{const t=function fetchResponseFromEvent(e){const t=e.detail?.fetchResponse;if(t instanceof FetchResponse)return t}(e);t&&function fetchResponseIsStream(e){const t=e.contentType??"";return t.startsWith(StreamMessage.contentType)}(t)&&(e.preventDefault(),this.receiveMessageResponse(t))};receiveMessageEvent=e=>{this.#I&&"string"==typeof e.data&&this.receiveMessageHTML(e.data)};async receiveMessageResponse(e){const t=await e.responseHTML;t&&this.receiveMessageHTML(t)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(StreamMessage.wrap(e))}}class ErrorRenderer extends Renderer{static renderElement(e,t){const{documentElement:n,body:r}=document;n.replaceChild(t,r)}async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){const{documentElement:e,head:t}=document;e.replaceChild(this.newHead,t),this.renderElement(this.currentElement,this.newElement)}activateScriptElements(){for(const e of this.scriptElements){const t=e.parentNode;if(t){const n=activateScriptElement(e);t.replaceChild(n,e)}}}
20get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return document.documentElement.querySelectorAll("script")}}class PageRenderer extends Renderer{static renderElement(e,t){document.body&&t instanceof HTMLBodyElement?document.body.replaceWith(t):document.documentElement.appendChild(t)}get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}get reloadReason(){return this.newSnapshot.isVisitable?this.trackedElementsAreIdentical?void 0:{reason:"tracked_element_mismatch"}:{reason:"turbo_visit_control_is_reload"}}async prepareToRender(){this.#A(),await this.mergeHead()}async render(){this.willRender&&await this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}#A(){const{documentElement:e}=this.currentSnapshot,{dir:t,lang:n}=this.newSnapshot;n?e.setAttribute("lang",n):e.removeAttribute("lang"),t?e.setAttribute("dir",t):e.removeAttribute("dir")}async mergeHead(){const e=this.mergeProvisionalElements(),t=this.copyNewHeadStylesheetElements();this.copyNewHeadScriptElements(),await e,await t,this.willRender&&this.removeUnusedDynamicStylesheetElements()}async replaceBody(){await this.preservingPermanentElements(async()=>{this.activateNewBody(),await this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}async copyNewHeadStylesheetElements(){const e=[];for(const t of this.newHeadStylesheetElements)e.push(waitForLoad(t)),document.head.appendChild(t);await Promise.all(e)}copyNewHeadScriptElements(){for(const e of this.newHeadScriptElements)document.head.appendChild(activateScriptElement(e))}removeUnusedDynamicStylesheetElements(){for(const e of this.unusedDynamicStylesheetElements)document.head.removeChild(e)}async mergeProvisionalElements(){const e=[...this.newHeadProvisionalElements];for(const t of this.currentHeadProvisionalElements)this.isCurrentElementInElementList(t,e)||document.head.removeChild(t);for(const t of e)document.head.appendChild(t)}isCurrentElementInElementList(e,t){for(const[n,r]of t.entries()){if("TITLE"==e.tagName){if("TITLE"!=r.tagName)continue;if(e.innerHTML==r.innerHTML)return t.splice(n,1),!0}if(r.isEqualNode(e))return t.splice(n,1),!0}return!1}removeCurrentHeadProvisionalElements(){for(const e of this.currentHeadProvisionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(const e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.removeNoscriptElements(),this.activateNewBodyScriptElements()}removeNoscriptElements(){for(const e of this.newElement.querySelectorAll("noscript"))e.remove()}activateNewBodyScriptElements(){for(const e of this.newBodyScriptElements){const t=activateScriptElement(e);e.replaceWith(t)}}async assignNewBody(){await this.renderElement(this.currentElement,this.newElement)}get unusedDynamicStylesheetElements(){return this.oldHeadStylesheetElements.filter(e=>"dynamic"===e.getAttribute("data-turbo-track"))}get oldHeadStylesheetElements(){return this.currentHeadSnapshot.getStylesheetElementsNotInSnapshot(this.newHeadSnapshot)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}}class MorphingPageRenderer extends PageRenderer{static renderElement(e,t){morphElements(e,t,{callbacks:{beforeNodeMorphed:(e,t)=>!(shouldRefreshFrameWithMorphing(e,t)&&!closestFrameReloadableWithMorphing(e))||(e.reload(),!1)}}),dispatch("turbo:morph",{detail:{currentElement:e,newElement:t}})}async preservingPermanentElements(e){return await e()}get renderMethod(){return"morph"}get shouldAutofocus(){return!1}}
20class SnapshotCache extends LRUCache{constructor(e){super(e,toCacheKey)}get snapshots(){return this.entries}}class PageView extends View{snapshotCache=new SnapshotCache(10);lastRenderedLocation=new URL(location.href);forceReloaded=!1;shouldTransitionTo(e){return this.snapshot.prefersViewTransitions&&e.prefersViewTransitions}renderPage(e,t=!1,n=!0,r){const s=new(this.isPageRefresh(r)&&"morph"===(r?.refresh?.method||this.snapshot.refreshMethod)?MorphingPageRenderer:PageRenderer)(this.snapshot,e,t,n);return s.shouldRender?r?.changeHistory():this.forceReloaded=!0,this.render(s)}renderError(e,t){t?.changeHistory();const n=new ErrorRenderer(this.snapshot,e,!1);return this.render(n)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(e=this.snapshot){if(e.isCacheable){this.delegate.viewWillCacheSnapshot();const{lastRenderedLocation:t}=this;await nextEventLoopTick();const n=e.clone();return this.snapshotCache.put(t,n),n}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}isPageRefresh(e){return!e||this.lastRenderedLocation.pathname===e.location.pathname&&"replace"===e.action}shouldPreserveScrollPosition(e){return this.isPageRefresh(e)&&"preserve"===(e?.refresh?.scroll||this.snapshot.refreshScroll)}get snapshot(){return PageSnapshot.fromElement(this.element)}}class Preloader{selector="a[data-turbo-preload]";constructor(e,t){this.delegate=e,this.snapshotCache=t}start(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",this.#k):this.preloadOnLoadLinksForView(document.body)}stop(){document.removeEventListener("DOMContentLoaded",this.#k)}preloadOnLoadLinksForView(e){for(const t of e.querySelectorAll(this.selector))this.delegate.shouldPreloadLink(t)&&this.preloadURL(t)}async preloadURL(e){const t=new URL(e.href);if(this.snapshotCache.has(t))return;const n=new FetchRequest(this,u.get,t,new URLSearchParams,e);await n.perform()}prepareRequest(e){e.headers["X-Sec-Purpose"]="prefetch"}async requestSucceededWithResponse(e,t){try{const n=await t.responseHTML,r=PageSnapshot.fromHTMLString(n);this.snapshotCache.put(e.url,r)}catch(e){}}requestStarted(e){}requestErrored(e){}requestFinished(e){}requestPreventedHandlingResponse(e,t){}requestFailedWithResponse(e,t){}#k=()=>{this.preloadOnLoadLinksForView(document.body)}}class Cache{constructor(e){this.session=e}clear(){this.session.clearCache()}resetCacheControl(){this.#x("")}exemptPageFromCache(){this.#x("no-cache")}exemptPageFromPreview(){this.#x("no-preview")}#x(e){!function setMetaContent(e,t){let n=getMetaElement(e);return n||(n=document.createElement("meta"),n.setAttribute("name",e),document.head.appendChild(n)),n.setAttribute("content",t),n}("turbo-cache-control",e)}}function extendURLWithDeprecatedProperties(e){Object.defineProperties(e,N)}const N={absoluteURL:{get(){return this.toString()}}},P=new class Session{navigator=new Navigator(this);history=new History(this);view=new PageView(this,document.documentElement);adapter=new BrowserAdapter(this);pageObserver=new PageObserver(this);cacheObserver=new CacheObserver;linkPrefetchObserver=new LinkPrefetchObserver(this,document);linkClickObserver=new LinkClickObserver(this,window);formSubmitObserver=new FormSubmitObserver(this,document);scrollObserver=new ScrollObserver(this);streamObserver=new StreamObserver(this);formLinkClickObserver=new FormLinkClickObserver(this,document.documentElement);frameRedirector=new FrameRedirector(this,document.documentElement);streamMessageRenderer=new StreamMessageRenderer;cache=new Cache(this);enabled=!0;started=!1;#O=150;constructor(e){this.recentRequests=e,this.preloader=new Preloader(this,this.view.snapshotCache),this.debouncedRefresh=this.refresh,this.pageRefreshDebouncePeriod=this.pageRefreshDebouncePeriod}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.linkPrefetchObserver.start(),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.preloader.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.linkPrefetchObserver.stop(),this.formLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.preloader.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,t={}){const n=t.frame?document.getElementById(t.frame):null;if(n instanceof FrameElement){const r=t.action||getVisitAction(n);n.delegate.proposeVisitIfNavigatedWithAction(n,r),n.src=e.toString()}else this.navigator.proposeVisit(expandURL(e),t)}refresh(e,t={}){t="string"==typeof t?{requestId:t}:t;const{method:n,requestId:r,scroll:s}=t,i=r&&this.recentRequests.has(r),a=e===document.baseURI;i||this.navigator.currentVisit||!a||this.visit(e,{action:"replace",shouldCacheSnapshot:!1,refresh:{method:n,scroll:s}})}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){this.streamMessageRenderer.render(StreamMessage.wrap(e))}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(e){console.warn("Please replace `session.setProgressBarDelay(delay)` with `session.progressBarDelay = delay`. The function is deprecated and will be removed in a future version of Turbo.`"),this.progressBarDelay=e}set progressBarDelay(e){c.drive.progressBarDelay=e}get progressBarDelay(){return c.drive.progressBarDelay}set drive(e){c.drive.enabled=e}get drive(){return c.drive.enabled}set formMode(e){c.forms.mode=e}get formMode(){return c.forms.mode}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}get pageRefreshDebouncePeriod(){return this.#O}set pageRefreshDebouncePeriod(e){this.refresh=function debounce(e,t){let n=null;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}(this.debouncedRefresh.bind(this),e),this.#O=e}shouldPreloadLink(e){const t=e.hasAttribute("data-turbo-method"),n=e.hasAttribute("data-turbo-stream"),r=e.getAttribute("data-turbo-frame"),s="_top"==r?null:d
20ocument.getElementById(r)||findClosestRecursively(e,"turbo-frame:not([disabled])");if(t||n||s instanceof FrameElement)return!1;{const t=new URL(e.href);return this.elementIsNavigatable(e)&&locationIsVisitable(t,this.snapshot.rootLocation)}}historyPoppedToLocationWithRestorationIdentifierAndDirection(e,t,n){this.enabled?this.navigator.startVisit(e,t,{action:"restore",historyChanged:!0,direction:n}):this.adapter.pageInvalidated({reason:"turbo_disabled"})}historyPoppedWithEmptyState(e){this.history.replace(e),this.view.lastRenderedLocation=e,this.view.cacheSnapshot()}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willSubmitFormLinkToLocation(e,t){return this.elementIsNavigatable(e)&&locationIsVisitable(t,this.snapshot.rootLocation)}submittedFormLinkToLocation(){}canPrefetchRequestToLocation(e,t){return this.elementIsNavigatable(e)&&locationIsVisitable(t,this.snapshot.rootLocation)&&this.navigator.linkPrefetchingIsEnabledForLocation(t)}willFollowLinkToLocation(e,t,n){return this.elementIsNavigatable(e)&&locationIsVisitable(t,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(e,t,n)}followedLinkToLocation(e,t){const n=this.getActionForLink(e),r=e.hasAttribute("data-turbo-stream");this.visit(t.href,{action:n,acceptsStreamResponse:r})}allowsVisitingLocationWithAction(e,t){return this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,t){extendURLWithDeprecatedProperties(e),this.adapter.visitProposedToLocation(e,t)}visitStarted(e){e.acceptsStreamResponse||(markAsBusy(document.documentElement),this.view.markVisitDirection(e.direction)),extendURLWithDeprecatedProperties(e.location),this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){this.view.unmarkVisitDirection(),clearBusyState(document.documentElement),this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}willSubmitForm(e,t){const n=getAction$1(e,t);return this.submissionIsNavigatable(e,t)&&locationIsVisitable(expandURL(n),this.snapshot.rootLocation)}formSubmitted(e,t){this.navigator.submitForm(e,t)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},t){const n=this.notifyApplicationBeforeRender(e,t),{defaultPrevented:r,detail:{render:s}}=n;return this.view.renderer&&s&&(this.view.renderer.renderElement=s),!r}viewRenderedSnapshot(e,t,n){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender(n)}preloadOnLoadLinksForView(e){this.preloader.preloadOnLoadLinksForView(e)}viewInvalidated(e){this.adapter.pageInvalidated(e)}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,t){this.notifyApplicationAfterFrameRender(e,t)}applicationAllowsFollowingLinkToLocation(e,t,n){return!this.notifyApplicationAfterClickingLinkToLocation(e,t,n).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,t,n){return dispatch("turbo:click",{target:e,detail:{url:t.href,originalEvent:n},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return dispatch("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,t){return dispatch("turbo:visit",{detail:{url:e.href,action:t}})}notifyApplicationBeforeCachingSnapshot(){return dispatch("turbo:before-cache")}notifyApplicationBeforeRender(e,t){return dispatch("turbo:before-render",{detail:{newBody:e,...t},cancelable:!0})}notifyApplicationAfterRender(e){return dispatch("turbo:render",{detail:{renderMethod:e}})}notifyApplicationAfterPageLoad(e={}){return dispatch("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterFrameLoad(e){return dispatch("turbo:frame-load",{target:e})}
20notifyApplicationAfterFrameRender(e,t){return dispatch("turbo:frame-render",{detail:{fetchResponse:e},target:t,cancelable:!0})}submissionIsNavigatable(e,t){if("off"==c.forms.mode)return!1;{const n=!t||this.elementIsNavigatable(t);return"optin"==c.forms.mode?n&&null!=e.closest('[data-turbo="true"]'):n&&this.elementIsNavigatable(e)}}elementIsNavigatable(e){const t=findClosestRecursively(e,"[data-turbo]"),n=findClosestRecursively(e,"turbo-frame");return c.drive.enabled||n?!t||"false"!=t.getAttribute("data-turbo"):!!t&&"true"==t.getAttribute("data-turbo")}getActionForLink(e){return getVisitAction(e)||"advance"}get snapshot(){return this.view.snapshot}}(l),{cache:F,navigator:D}=P;function start(){P.start()}function connectStreamSource(e){P.connectStreamSource(e)}function disconnectStreamSource(e){P.disconnectStreamSource(e)}var B=Object.freeze({__proto__:null,PageRenderer,PageSnapshot,FrameRenderer,fetch:fetchWithTurboHeaders,config:c,session:P,cache:F,navigator:D,start,registerAdapter:function registerAdapter(e){P.registerAdapter(e)},visit:function visit(e,t){P.visit(e,t)},connectStreamSource,disconnectStreamSource,renderStreamMessage:function render
20StreamMessage(e){P.renderStreamMessage(e)},setProgressBarDelay:function setProgressBarDelay(e){console.warn("Please replace `Turbo.setProgressBarDelay(delay)` with `Turbo.config.drive.progressBarDelay = delay`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),c.drive.progressBarDelay=e},setConfirmMethod:function setConfirmMethod(e){console.warn("Please replace `Turbo.setConfirmMethod(confirmMethod)` with `Turbo.config.forms.confirm = confirmMethod`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),c.forms.confirm=e},setFormMode:function setFormMode(e){console.warn("Please replace `Turbo.setFormMode(mode)` with `Turbo.config.forms.mode = mode`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),c.forms.mode=e},morphBodyElements:function morphBodyElements(e,t){MorphingPageRenderer.renderElement(e,t)},morphTurboFrameElements:function morphTurboFrameElements(e,t){MorphingFrameRenderer.renderElement(e,t)},morphChildren,morphElements});class TurboFrameMissingError extends Error{}function activateElement(e,t){if(e){const n=e.getAttribute("src");if(null!=n&&null!=t&&urlsAreEqual(n,t))throw new Error(`Matching <turbo-frame id="${e.id}"> element has a source URL which references itself`);if(e.ownerDocument!==document&&(e=document.importNode(e,!0)),e instanceof FrameElement)return e.connectedCallback(),e.disconnectedCallback(),e}}const V={after(){this.removeDuplicateTargetSiblings(),this.targetElements.forEach(e=>e.parentElement?.insertBefore(this.templateContent,e.nextSibling))},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.append(this.templateContent))},before(){this.removeDuplicateTargetSiblings(),this.targetElements.forEach(e=>e.parentElement?.insertBefore(this.templateContent,e))},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.prepend(this.templateContent))},remove(){this.targetElements.forEach(e=>e.remove())},replace(){const e=this.getAttribute("method");this.targetElements.forEach(t=>{"morph"===e?morphElements(t,this.templateContent):t.replaceWith(this.templateContent)})},update(){const e=this.getAttribute("method");this.targetElements.forEach(t=>{"morph"===e?morphChildren(t,this.templateContent):(t.innerHTML="",t.append(this.templateContent))})},refresh(){const e=this.getAttribute("method"),t=this.requestId,n=this.getAttribute("scroll");P.refresh(this.baseURI,{method:e,requestId:t,scroll:n})}};class StreamElement extends HTMLElement{static async renderElement(e){await e.performAction()}async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){return this.renderPromise??=(async()=>{const e=this.beforeRenderEvent;this.dispatchEvent(e)&&(await nextRepaint(),await e.detail.render(this))})()}disconnect(){try{this.remove()}catch{}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(e=>e.remove())}get duplicateChildren(){const e=this.targetElements.flatMap(e=>[...e.children]).filter(e=>!!e.getAttribute("id")),t=[...this.templateContent?.children||[]].filter(e=>!!e.getAttribute("id")).map(e=>e.getAttribute("id"));return e.filter(e=>t.includes(e.getAttribute("id")))}removeDuplicateTargetSiblings(){this.duplicateSiblings.forEach(e=>e.remove())}get duplicateSiblings(){const e=this.targetElements.flatMap(e=>[...e.parentElement.children]).filter(e=>!!e.id),t=[...this.templateContent?.children||[]].filter(e=>!!e.id).map(e=>e.id);return e.filter(e=>t.includes(e.id))}get performAction(){if(this.action){const e=V[this.action];if(e)return e;this.#L("unknown action")}this.#L("action attribute is missing")}get targetElements(){return this.target?this.targetElementsById:this.targets?this.targetElementsByQuery:void this.#L("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(null===this.firstElementChild){const e=this.ownerDocument.createElement("template");return this.appendChild(e),e}if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.#L("first child element must be a <template> element")}get action(){return this.getAttribute("action")}get target(){return this.getAttribute("target")}get targets(){return this.getAttribute("targets")}get requestId(){return this.getAttribute("request-id")}#L(e){throw new Error(`${this.description}: ${e}`)}get description(){return(this.outerHTML.match(/<[^>]+>/)??[])[0]??"<turbo-stream>"}get beforeRenderEvent(){return new CustomEvent("turbo:before-stream-render",{bubbles:!0,cancelable:!0,detail:{newStream:this,render:StreamElement.renderElement}})}get targetElementsById(){const e=this.ownerDocument?.getElementById(this.target);return null!==e?[e]:[]}get targetElementsByQuery(){const e=this.ownerDocument?.querySelectorAll(this.targets);return 0!==e.length?Array.prototype.slice.call(e):[]}}class StreamSourceElement extends HTMLElement{streamSource=null;connectedCallback(){this.streamSource=this.src.match(/^ws{1,2}:/)?new WebSocket(this.src):new EventSource(this.src),connectStreamSource(this.streamSource)}disconnectedCallback(){this.streamSource&&(this.streamSource.close(),disconnectStreamSource(this.streamSource))}get src(){return this.getAttribute("src")||""}}FrameElement.delegateConstructor=class FrameController{fetchResponseLoaded=e=>Promise.resolve();#R=null;#M=()=>{};#N=!1;#P=!1;#F=new Set;#D=!1;action=null;constructor(e){this.element=e,this.view=new FrameView(this,this.element),this.appearanceObserver=new AppearanceObserver(this,this.element),this.formLinkClickObserver=new FormLinkClickObserver(this,this.element),this.linkInterceptor=new LinkInterceptor(this,this.element),this.restorationIdentifier=uuid(),this.formSubmitObserver=new FormSubmitObserver(this,this.element)}connect(){this.#N||(this.#N=!0,this.loadingStyle==s?this.appearanceObserver.start():this.#B(),this.formLinkClickObserver.start(),this.linkInterceptor.start(),this.formSubmitObserver.start())}disconnect(){this.#N&&(this.#N=!1,this.appearanceObserver.stop(),this.formLinkClickObserver.stop(),this.linkInterceptor.stop(),this.formSubmitObserver.stop(),this.element.hasAttribute("recurse")||this.#R?.cancel())}disabledChanged(){this.disabled?this.#R?.cancel():this.loadingStyle==r&&this.#B()}sourceURLChanged(){this.#V("src")||(this.sourceURL||this.#R?.cancel(),this.element.isConnected&&(this.complete=!1),(this.loadingStyle==r||this.#P)&&this.#B())}sourceURLReloaded(){const{refresh:e,src:t}=this.element;return this.#D=t&&"morph"===e,this.element.removeAttribute("complete"),this.element.src=null,this.element.src=t,this.element.loaded}loadingStyleChanged(){this.loadingStyle==s?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.#B())}async#B(){this.enabled&&this.isActive&&!this.complete&&this.sourceURL&&(this.element.loaded=this.#H(expandURL(this.sourceURL)),this.appearanceObserver.stop(),await this.element.loaded,this.#P=!0)}async loadResponse(e){(e.redirected||e.succeeded&&e.isHTML)&&(this.sourceURL=e.response.url);try{const t=await e.responseHTML;if(t){const n=parseHTMLDocument(t);PageSnapshot.fromDocument(n).isVisitable?await this.#U(e,n):await this.#$(e)}}finally{this.#D=!1,this.fetchResponseLoaded=()=>Promise.resolve()}}elementAppearedInViewport(e){this.proposeVisitIfNavigatedWithAction(e,getVisitAction(e)),this.#B()}willSubmitFormLinkToLocation(e){return this.#q(e)}submittedFormLinkToLocation(e,t,n){const r=this.#m(e);r&&n.setAttribute("data-turbo-frame",r.id)}shouldInterceptLinkClick(e,t,n){return this.#q(e)}linkClickIntercepted(e,t){this.#j(e,t)}willSubmitForm(e,t){return e.closest("turbo-frame")==this.element&&this.#q(e,t)}formSubmitted(e,t){this.formSubmission&&this.formSubmission.stop(),this.formSubmission=new FormSubmission(this,e,t);const{fetchRequest:n}=this.formSubmission,r=this.#m(e,t);this.prepareRequest(n,r),this.formSubmission.start()}
20prepareRequest(e,t=this){e.headers["Turbo-Frame"]=t.id,this.currentNavigationElement?.hasAttribute("data-turbo-stream")&&e.acceptResponseType(StreamMessage.contentType)}requestStarted(e){markAsBusy(this.element)}requestPreventedHandlingResponse(e,t){this.#M()}async requestSucceededWithResponse(e,t){await this.loadResponse(t),this.#M()}async requestFailedWithResponse(e,t){await this.loadResponse(t),this.#M()}requestErrored(e,t){console.error(t),this.#M()}requestFinished(e){clearBusyState(this.element)}formSubmissionStarted({formElement:e}){markAsBusy(e,this.#m(e))}formSubmissionSucceededWithResponse(e,t){const n=this.#m(e.formElement,e.submitter);n.delegate.proposeVisitIfNavigatedWithAction(n,getVisitAction(e.submitter,e.formElement,n)),n.delegate.loadResponse(t),e.isSafe||P.clearCache()}formSubmissionFailedWithResponse(e,t){this.element.delegate.loadResponse(t),P.clearCache()}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished({formElement:e}){clearBusyState(e,this.#m(e))}allowsImmediateRender({element:e},t){const n=dispatch("turbo:before-frame-render",{target:this.element,detail:{newFrame:e,...t},cancelable:!0}),{defaultPrevented:r,detail:{render:s}}=n;return this.view.renderer&&s&&(this.view.renderer.renderElement=s),!r}viewRenderedSnapshot(e,t,n){}preloadOnLoadLinksForView(e){P.preloadOnLoadLinksForView(e)}viewInvalidated(){}willRenderFrame(e,t){this.previousFrameElement=e.cloneNode(!0)}visitCachedSnapshot=({element:e})=>{const t=e.querySelector("#"+this.element.id);t&&this.previousFrameElement&&t.replaceChildren(...this.previousFrameElement.children),delete this.previousFrameElement};async#U(e,t){const n=await this.extractForeignFrameElement(t.body),r=this.#D?MorphingFrameRenderer:FrameRenderer;if(n){const t=new Snapshot(n),s=new r(this,this.view.snapshot,t,!1,!1);this.view.renderPromise&&await this.view.renderPromise,this.changeHistory(),await this.view.render(s),this.complete=!0,P.frameRendered(e,this.element),P.frameLoaded(this.element),await this.fetchResponseLoaded(e)}else this.#W(e)&&this.#z(e)}async#H(e){const t=new FetchRequest(this,u.get,e,new URLSearchParams,this.element);return this.#R?.cancel(),this.#R=t,new Promise(e=>{this.#M=()=>{this.#M=()=>{},this.#R=null,e()},t.perform()})}#j(e,t,n){const r=this.#m(e,n);r.delegate.proposeVisitIfNavigatedWithAction(r,getVisitAction(n,e,r)),this.#K(e,()=>{r.src=t})}proposeVisitIfNavigatedWithAction(e,t=null){if(this.action=t,this.action){const t=PageSnapshot.fromElement(e).clone(),{visitCachedSnapshot:n}=e.delegate;e.delegate.fetchResponseLoaded=async r=>{if(e.src){const{statusCode:s,redirected:i}=r,a={response:{statusCode:s,redirected:i,responseHTML:await r.responseHTML},visitCachedSnapshot:n,willRender:!1,updateHistory:!1,restorationIdentifier:this.restorationIdentifier,snapshot:t};this.action&&(a.action=this.action),P.visit(e.src,a)}}}}changeHistory(){if(this.action){const e=getHistoryMethodForAction(this.action);P.history.update(e,expandURL(this.element.src||""),this.restorationIdentifier)}}async#$(e){console.warn(`The response (${e.statusCode}) from <turbo-frame id="${this.element.id}"> is performing a full page visit due to turbo-visit-control.`),await this.#Y(e.response)}#W(e){this.element.setAttribute("complete","");const t=e.response;return!dispatch("turbo:frame-missing",{target:this.element,detail:{response:t,visit:async(e,t)=>{e instanceof Response?this.#Y(e):P.visit(e,t)}},cancelable:!0}).defaultPrevented}#z(e){this.view.missing(),this.#G(e)}#G(e){const t=`The response (${e.statusCode}) did not contain the expected <turbo-frame id="${this.element.id}"> and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;throw new TurboFrameMissingError(t)}async#Y(e){const t=new FetchResponse(e),n=await t.responseHTML,{location:r,redirected:s,statusCode:i}=t;return P.visit(r,{response:{redirected:s,statusCode:i,responseHTML:n}})}#m(e,t){const n=getAttribute("data-turbo-frame",t,e)||this.element.getAttribute("target"),r=this.#J(n);return r instanceof FrameElement?r:this.element}async extractForeignFrameElement(e){let t;
20const n=CSS.escape(this.id);try{if(t=activateElement(e.querySelector(`turbo-frame#${n}`),this.sourceURL),t)return t;if(t=activateElement(e.querySelector(`turbo-frame[src][recurse~=${n}]`),this.sourceURL),t)return await t.loaded,await this.extractForeignFrameElement(t)}catch(e){return console.error(e),new FrameElement}return null}#X(e,t){return locationIsVisitable(expandURL(getAction$1(e,t)),this.rootLocation)}#q(e,t){const n=getAttribute("data-turbo-frame",t,e)||this.element.getAttribute("target");if(e instanceof HTMLFormElement&&!this.#X(e,t))return!1;if(!this.enabled||"_top"==n)return!1;if(n){const e=this.#J(n);if(e)return!e.disabled;if("_parent"==n)return!1}return!!P.elementIsNavigatable(e)&&!(t&&!P.elementIsNavigatable(t))}get id(){return this.element.id}get disabled(){return this.element.disabled}get enabled(){return!this.disabled}get sourceURL(){if(this.element.src)return this.element.src}set sourceURL(e){this.#Q("src",()=>{this.element.src=e??null})}get loadingStyle(){return this.element.loading}get isLoading(){return void 0!==this.formSubmission||void 0!==this.#M()}get complete(){return this.element.hasAttribute("complete")}set complete(e){e?this.element.setAttribute("complete",""):this.element.removeAttribute("complete")}get isActive(){return this.element.isActive&&this.#N}get rootLocation(){const e=this.element.ownerDocument.querySelector('meta[name="turbo-root"]');return expandURL(e?.content??"/")}#V(e){return this.#F.has(e)}#Q(e,t){this.#F.add(e),t(),this.#F.delete(e)}#K(e,t){this.currentNavigationElement=e,t(),delete this.currentNavigationElement}#J(e){if(null!=e){const t="_parent"===e?this.element.parentElement.closest("turbo-frame"):document.getElementById(e);if(t instanceof FrameElement)return t}}},void 0===customElements.get("turbo-frame")&&customElements.define("turbo-frame",FrameElement),void 0===customElements.get("turbo-stream")&&customElements.define("turbo-stream",StreamElement),void 0===customElements.get("turbo-stream-source")&&customElements.define("turbo-stream-source",StreamSourceElement),(()=>{const e=document.currentScript;if(!e)return;if(e.hasAttribute("data-turbo-suppress-warning"))return;let t=e.parentElement;for(;t;){if(t==document.body)return console.warn(unindent` 21 You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do! 22 23 Load your applicationâs JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change. 24 25 For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements 26 27 ââ 28 Suppress this warning by adding a "data-turbo-suppress-warning" attribute to: %s 29 `,e.outerHTML);t=t.parentElement}})(),window.Turbo={...B,StreamActions:V},start()},2752(e,t,n){"use strict";n.d(t,{Ls:()=>useClickOutside,N$:()=>useMatchMedia,d7:()=>useDebounce});var r=n(2891);const composeEventName=(e,t,n)=>{let r=e;return!0===n?r=`${t.identifier}:${e}`:"string"==typeof n&&(r=`${n}:${e}`),r}
29,extendedEvent=(e,t,n)=>{const{bubbles:r,cancelable:s,composed:i}=t||{bubbles:!0,cancelable:!0,composed:!0};t&&Object.assign(n,{originalEvent:t});return new CustomEvent(e,{bubbles:r,cancelable:s,composed:i,detail:n})};function camelize(e){return e.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}const s={debug:!1,logger:console,dispatchEvent:!0,eventPrefix:!0};class StimulusUse{constructor(e,t={}){var n,r,i;this.log=(e,t)=>{this.debug&&(this.logger.groupCollapsed(`%c${this.controller.identifier} %c#${e}`,"color: #3B82F6","color: unset"),this.logger.log(Object.assign({controllerId:this.controllerId},t)),this.logger.groupEnd())},this.warn=e=>{this.logger.warn(`%c${this.controller.identifier} %c${e}`,"color: #3B82F6; font-weight: bold","color: unset")},this.dispatch=(e,t={})=>{if(this.dispatchEvent){const{event:n}=t,r=function __rest(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n}(t,["event"]),s=this.extendedEvent(e,n||null,r);this.targetElement.dispatchEvent(s),this.log("dispatchEvent",Object.assign({eventName:s.type},r))}},this.call=(e,t={})=>{const n=this.controller[e];if("function"==typeof n)return n.call(this.controller,t)}
29,this.extendedEvent=(e,t,n)=>{const{bubbles:r,cancelable:s,composed:i}=t||{bubbles:!0,cancelable:!0,composed:!0};t&&Object.assign(n,{originalEvent:t});return new CustomEvent(this.composeEventName(e),{bubbles:r,cancelable:s,composed:i,detail:n})},this.composeEventName=e=>{let t=e;return!0===this.eventPrefix?t=`${this.controller.identifier}:${e}`:"string"==typeof this.eventPrefix&&(t=`${this.eventPrefix}:${e}`),t},this.debug=null!==(r=null!==(n=null==t?void 0:t.debug)&&void 0!==n?n:e.application.stimulusUseDebug)&&void 0!==r?r:s.debug,this.logger=null!==(i=null==t?void 0:t.logger)&&void 0!==i?i:s.logger,this.controller=e,this.controllerId=e.element.id||e.element.dataset.id,this.targetElement=(null==t?void 0:t.element)||e.element;const{dispatchEvent:a,eventPrefix:o}=Object.assign({},s,t);Object.assign(this,{dispatchEvent:a,eventPrefix:o}),this.controllerInitialize=e.initialize.bind(e),this.controllerConnect=e.connect.bind(e),this.controllerDisconnect=e.disconnect.bind(e)}}r.xI;const i={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},useClickOutside=(e,t={})=>{const n=e,{onlyVisible:r,dispatchEvent:s,events:a,eventPrefix:o}=Object.assign({},i,t),onEvent=e=>{const i=(null==t?void 0:t.element)||n.element;if(!(i.contains(e.target)||!function isElementInViewport(e){const t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth,s=t.top<=n&&t.top+t.height>0,i=t.left<=r&&t.left+t.width>0;return s&&i}(i)&&r)&&(n.clickOutside&&n.clickOutside(e),s)){const t=composeEventName("click:outside",n,o),r=extendedEvent(t,e,{controller:n});i.dispatchEvent(r)}},observe=()=>{null==a||a.forEach(e=>{window.addEventListener(e,onEvent,!0)})},unobserve=()=>{null==a||a.forEach(e=>{window.removeEventListener(e,onEvent,!0)})},c=n.disconnect.bind(n);return Object.assign(n,{disconnect(){unobserve(),c()}}),observe(),[observe,unobserve]};r.xI;class DebounceController extends r.xI{}DebounceController.debounces=[];const debounce=(e,t=200)=>{let n=null;return function(){const r=Array.from(arguments),s=this,i=r.map(e=>e.params);n&&clearTimeout(n),n=setTimeout(()=>(r.forEach((e,t)=>e.params=i[t]),e.apply(s,r)),t)}},useDebounce=(e,t)=>{const n=e;n.constructor.debounces.forEach(e=>{if("string"==typeof e&&(n[e]=debounce(n[e],null==t?void 0:t.wait)),"object"==typeof e){const{name:r,wait:s}=e;if(!r)return;n[r]=debounce(n[r],s||(null==t?void 0:t.wait))}})};r.xI;r.xI;r.xI;r.xI;const a={mediaQueries:{},dispatchEvent:!0,eventPrefix:!0,debug:!1};class UseMatchMedia extends StimulusUse{constructor(e,t={}){var n,r,s,i;super(e,t),this.matches=[],this.callback=e=>{const t=Object.keys(this.mediaQueries).find(t=>this.mediaQueries[t]===e.media);if(!t)return;const{media:n,matches:r}=e;this.changed({name:t,media:n,matches:r,event:e})},this.changed=e=>{const{name:t}=e;e.event&&(this.call(camelize(`${t}_changed`),e),this.dispatch(`${t}:changed`,e),this.log(`media query "${t}" changed`,e)),e.matches?(this.call(camelize(`is_${t}`),e),this.dispatch(`is:${t}`,e)):(this.call(camelize(`not_${t}`),e),this.dispatch(`not:${t}`,e))},this.observe=()=>{Object.keys(this.mediaQueries).forEach(e=>{const t=this.mediaQueries[e],n=window.matchMedia(t);n.addListener(this.callback),this.matches.push(n),this.changed({name:e,media:t,matches:n.matches})})},this.unobserve=()=>{this.matches.forEach(e=>e.removeListener(this.callback))},this.controller=e,this.mediaQueries=null!==(n=t.mediaQueries)&&void 0!==n?n:a.mediaQueries,this.dispatchEvent=null!==(r=t.dispatchEvent)&&void 0!==r?r:a.dispatchEvent,this.eventPrefix=null!==(s=t.eventPrefix)&&void 0!==s?s:a.eventPrefix,this.debug=null!==(i=t.debug)&&void 0!==i?i:a.debug,window.matchMedia?(this.enhanceController(),this.observe()):console.error("window.matchMedia() is not available")}enhanceController(){const e=this.controller.disconnect.bind(this.controller);Object.assign(this.controller,{disconnect:()=>{this.unobserve(),e()}})}}const useMatchMedia=(e,t={})=>{const n=new UseMatchMedia(e,t);return[n.observe,n.unobserve]};r.xI;r.xI;r.xI;class ThrottleController extends r.xI{}ThrottleController.throttles=[];r.xI;r.xI;r.xI;r.xI},607(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(2891),s=n(4512);const i="unleash_uid";var a;
29!function(e){e.EXPOSED="exposed",e.UNEXPOSED="unexposed",e.UNKNOWN="unknown"}(a||(a={}));const getUserId=()=>{if((0,s.Hr)(i))return(0,s.Ri)(i);{const e=generateUUID();return(0,s.du)(i,e,365),e}},exposeUserSession=(e,t)=>{t?sessionStorage.setItem(e,a.EXPOSED):sessionStorage.setItem(e,a.UNEXPOSED)},generateUUID=()=>"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});class default_1 extends r.xI{connect(){this.featureSessionId=this.featureValue+"-unleash",this.initAbTest()}initAbTest(){const e=(t=this.featureSessionId,sessionStorage.getItem(t)||a.UNKNOWN);var t;e===a.UNKNOWN?(async e=>{try{const t=getUserId(),n=await fetch(`/fr-fr/unleash/${e}/${t}`);if(!n.ok)throw new Error(`Erreur lors de la récupération du variant: ${n.status}`);return await n.json()}catch(e){return console.error("Test A/B non initialisé:",e),{featureName:"",featureVersion:"default",isExposed:!1}}})(this.featureValue).then(e=>{e.isExposed?(exposeUserSession(this.featureSessionId,!0),this.dispatch("exposed")):exposeUserSession(this.featureSessionId,!1)}):e===a.EXPOSED&&requestAnimationFrame(()=>this.dispatch("exposed"))}}default_1.values={feature:String};const o=default_1},8914(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o});var r,s,i=n(2891),a=n(7765),__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class default_1 extends i.xI{constructor(){super(...arguments),r.add(this)}async connect(){(0,a.m6)();const e=await __classPrivateFieldGet(this,r,"m",s).call(this);(0,a.Wp)(e),(0,a.m6)()}async refreshAfterNextTurboEvent(e){delete window._privateAccountData,document.addEventListener(e.params.event,async()=>{await __classPrivateFieldGet(this,r,"m",s).call(this),this.dispatch("account-data-refreshed")},{once:!0})}}r=new WeakSet,s=async function _default_1_fetchAccountData(){const e={shouldFetchBookmarks:!1};this.hasOffersInPageTarget&&(e.shouldFetchBookmarks=!0);const t=await fetch(this.urlValue,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();return window._privateAccountData=n,document.dispatchEvent(new CustomEvent(a.LH)),n},default_1.targets=["offersInPage"],default_1.values={url:String};const o=default_1},9287(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(7765);class FromAccountDataController extends r.xI{async connect(){await this.copy()}async copy(){const e=await(0,s.yn)(),t=e[this.copyValue];t?e.IsAuthenticated&&(this.element[this.intoValue]=t,this.dispatch(`copied:${this.copyValue}`)):this.dispatch("empty")}}FromAccountDataController.values={copy:String,into:String};const i=FromAccountDataController},6131(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(2891),s=n(7765),i=n(7654);const a="adaptationService",o="false";class default_1 extends r.xI{constructor(){super(...arguments),this.adaptationService=(0,i.lw)(a)}async connect(){const e=await(0,s.yn)();this.adaptationService!==o&&e.HasServiceAdaptation&&this.element.setAttribute("src",this.urlValue)}selectTargetConnected(){this.adaptationService&&(this.selectTarget.value=this.adaptationService,this.lockIfNotSupported())}lockIfNotSupported(){"True"===this.selectTarget.selectedOptions[0].dataset.supported?((0,i.KD)(a,o),this.element.remove()):((0,i.KD)(a,this.selectTarget.value),this.buttonTarget.remove(),this.selectTarget.disabled=!0,this.messageTarget.classList.remove(...this.hideMessageClasses))}}default_1.values={url:String},default_1.targets=["select","button","message"],default_1.classes=["hideMessage"];const c=default_1},7723(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>UserAuthenticatedController});var r=n(2891),s=n(7765);class UserAuthenticatedController extends r.xI{async connect(){(await(0,s.yn)()).IsAuthenticated&&this.dispatch("userIsAuthenticated")}}},7509(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{async copyParam(e){const t=e.params.content;t&&(await navigator.clipboard.writeText(t),this.element.dispatchEvent(new CustomEvent("copied",{bubbles:!0,detail:{content:t}})))}async copyContent(){var e;return await navigator.clipboard.writeText(null===(e=this.sourceTarget.textContent)||void 0===e?void 0:e.trim())}async copyHtml(){const e=this.sourceTarget.cloneNode();return e.removeAttribute("data-clipboard-target"),e.removeAttribute("data-action"),await navigator.clipboard.writeText(e.outerHTML)}async copySvg(){const e=this.sourceTarget.cloneNode(!0);return e.removeAttribute("data-clipboard-target"),await navigator.clipboard.writeText(e.outerHTML)}async copyList(){if(this.hasListItemTarget){const e=this.listItemTargets.map(e=>{var t;return`- ${null===(t=e.textContent)||void 0===t?void 0:t.trim()}`}).join("\n");await navigator.clipboard.writeText(e)}}}default_1.targets=["source","listItem"];const s=default_1},7671(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>PressToClick});var r=n(2891);class PressToClick extends r.xI{handleKeydown(e){if("Enter"===e.key||" "===e.key){e.preventDefault();const t=e.currentTarget;t.click(),t.focus()}}}},3351(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{connect(){this.hasOfferSummaryRun()&&this.hasOfferActionTarget&&(this.offerActionTarget.hidden=!0)}hasOfferSummaryRun(){return this.sseStreamOutletElements.some(e=>{var t;return(null!==(t=e.dataset.sseStreamUrlValue)&&void 0!==t?t:"").includes("/agent/offer-summary/")})}}default_1.targets=["offerAction"],default_1.outlets=["sse-stream"];const s=default_1},9238(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(2752);class default_1 extends r.xI{connect(){(0,s.d7)(this,{wait:this.debounceWaitValue}),(0,s.Ls)(this,{events:["click","touchend","focusin"]})}clickOutside(){this.hasInputTarget&&this.inputTarget.value.length>0&&this.dispatch("click:outside:hasValue")}shouldSuggest(e){const{length:t}=e;return!!(this.numberMinLengthValue&&!isNaN(Number(e))&&t>=this.numberMinLengthValue)||t>=this.characterMinLengthValue}suggestIfNeeded(e){const{value:t}=e.target;if(!this.shouldSuggest(t))return void this.closeDropdown();const n=new URL(this.urlValue,location.origin);n.searchParams.append("term",t),this.frameTarget&&(this.frameTarget.setAttribute("src",n.toString()),this.openDropdown())}selectSuggestion(e){const t={id:e.params.id,label:e.params.label,decodedLabel:e.params.decodedLabel};this.dispatch("selected",{detail:t}),""!==this.idValue&&this.dispatch(`${this.idValue}:selected`,{detail:t}),this.closeDropdown()}openDropdown(){this.dropdownTarget.classList.remove(...this.hidingClasses)}closeDropdown(){this.dropdownTarget.classList.add(...this.hidingClasses)}toggleDropdown(){this.dropdownTarget.classList.contains(this.hidingClasses[0])?this.openDropdown():this.closeDropdown()}}default_1.values={url:String,name:String,numberMinLength:Number,characterMinLength:{type:Number,default:3},debounceWait:{type:Number,default:100},id:String},default_1.targets=["dropdown","frame","input"],default_1.classes=["hiding"],default_1.debounces=[{name:"suggestIfNeeded"}];const i=default_1},5494(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(2891);const s=JSON.parse('["aol.com","aol.fr","bbox.fr","caramail.com","free.fr","gmail.com","gmail.fr","hotmail.com","hotmail.fr","icloud.com","laposte.net","laposte.fr","live.net","live.fr","msn.com","msn.fr","neuf.fr","numericable.fr","netcourrier.com","orange.fr","orange.com","outlook.com","outlook.fr","protonmail.com","proton.me","pm.me","sfr.fr","wanadoo.fr","yahoo.com","yahoo.fr","ymail.com"]');var i,a,o,c,l=n(2752),u=n(1922),__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class default_1 extends r.xI{constructor(){super(...arguments),i.add(this)}connect(){(0,l.d7)(this,{wait:this.debounceWaitValue}),(0,l.Ls)(this,{events:["click","touchend"]}
29),s.forEach((e,t)=>{const n=new u.i4(this.itemTemplateTarget,{provider:e,id:t});this.dropdownTarget.append(n)})}suggestEmail(){const[,e]=__classPrivateFieldGet(this,i,"m",a).call(this);__classPrivateFieldGet(this,i,"m",c).call(this,!!e&&__classPrivateFieldGet(this,i,"m",o).call(this))}selectSuggestion({params:e}){const[t]=__classPrivateFieldGet(this,i,"m",a).call(this),n={id:e.id,label:`${t}@${e.label}`,decodedLabel:`${t}@${e.label}`};this.dispatch("selected",{detail:n}),this.inputTarget.dispatchEvent(new Event("blur")),__classPrivateFieldGet(this,i,"m",c).call(this,!1)}closeDropdown(){__classPrivateFieldGet(this,i,"m",c).call(this,!1),this.inputTarget.focus()}clickOutside(){this.inputTarget.value.length&&this.dispatch("click:outside:hasValue"),__classPrivateFieldGet(this,i,"m",c).call(this,!1)}}i=new WeakSet,a=function _default_1_getEmailParts(){const[e,t]=this.inputTarget.value.split("@");return[e,t||null]},o=function _default_1_updateEmailSuggestions(){const[e,t]=__classPrivateFieldGet(this,i,"m",a).call(this);let n=!1;return this.itemTargets.forEach(r=>{const s=r.dataset.emailAutocompleteProviderValue||"",i=s.startsWith(t);if(r.classList.toggle(this.hidingClass,!i),r.firstElementChild.classList.toggle(this.hidingClass,!i),i){r.firstElementChild.textContent="";const i=document.createElement("b");i.textContent=`${e}@${t}`,r.firstElementChild.appendChild(i),r.firstElementChild.appendChild(document.createTextNode(s.slice(t.length))),n=!0}}),n},c=function _default_1_toggleDropdown(e){this.dropdownTarget.classList.toggle(this.hidingClass,!e),this.inputTarget.setAttribute("aria-expanded",String(e))},default_1.values={debounceWait:{type:Number,default:100}},default_1.targets=["input","dropdown","itemTemplate","item"],default_1.classes=["hiding"],default_1.debounces=["suggestEmail"];const d=default_1},7592(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>d});var r,s,i,a,o,c,l=n(2891),u=n(1922),__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class AutocompleteMultipleController extends l.xI{constructor(){super(...arguments),r.add(this)}addItemIfNeeded(e){if(this.listTarget.querySelector(`[data-autocomplete-multiple-id="${e.detail.id}"]`)||__classPrivateFieldGet(this,r,"m",o).call(this))return;this.hasHiddenInputTarget&&__classPrivateFieldGet(this,r,"m",s).call(this,e.detail.id);const t=new u.i4(this.itemTemplateTarget,e.detail);this.listTarget.append(t)}removeItemInputHidden(e){const t=e.currentTarget.closest("li").dataset.autocompleteMultipleId,n=__classPrivateFieldGet(this,r,"m",i).call(this),s=n.indexOf(t);n.splice(s,1),this.hiddenInputTarget.value=n.join(","),this.hiddenInputTarget.required&&this.dispatch("itemUnselected")}itemTargetConnected(){__classPrivateFieldGet(this,r,"m",a).call(this),__classPrivateFieldGet(this,r,"m",c).call(this)}itemTargetDisconnected(){__classPrivateFieldGet(this,r,"m",a).call(this),__classPrivateFieldGet(this,r,"m",c).call(this)}}r=new WeakSet,s=function _AutocompleteMultipleController_pushItemInputHidden(e){const t=__classPrivateFieldGet(this,r,"m",i).call(this);t.push(e),this.hiddenInputTarget.value=t.join(",")},i=function _AutocompleteMultipleController_getHiddenInputValues(){return this.hiddenInputTarget.value?this.hiddenInputTarget.value.split(","):[]},a=function _AutocompleteMultipleController_toggleDisabledIfLimit(){this.fieldTarget.disabled=__classPrivateFieldGet(this,r,"m",o).call(this)},o=function _AutocompleteMultipleController_hasReachedLimit(){return this.itemTargets.length>=this.maxItemsValue},c=function _AutocompleteMultipleController_validateMinimum(){this.hasHiddenInputTarget&&(this.itemTargets.length<this.minItemsValue?this.hiddenInputTarget.setCustomValidity(`Veuillez sélectionner au moins ${this.minItemsValue} élément${this.minItemsValue>1?"s":""}`):(this.hiddenInputTarget.setCustomValidity(""),this.dispatch("itemAdded")))},AutocompleteMultipleController.values={maxItems:{type:Number,default:1/0},minItems:{type:Number,default:0}},AutocompleteMultipleController.targets=["field","itemTemplate","list","item","input","hiddenInput"];const d=AutocompleteMultipleController},6632(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{fillSuggestion(e){this.fieldTarget.value=e.detail.label,this.hasHiddenInputTarget&&(this.hiddenInputTarget.value=e.detail.id,this.hiddenInputTarget.dispatchEvent(new Event("hiddenInputChange",{bubbles:!0})))}clearSuggestion(){this.hiddenInputTarget.value=""}clearFieldIfNoSelection(){this.hasHiddenInputTarget&&!this.hiddenInputTarget.value&&(this.fieldTarget.value="")}}default_1.targets=["field","hiddenInput"];const s=default_1},4996(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(2752);const i=class extends r.xI{connect(){(0,s.Ls)(this)}clickOutside(){this.dispatch("click-outside:click:outside")}}},8871(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{handleResponse(e){var t,n;!1===(null===(n=null===(t=e.detail)||void 0===t?void 0:t.fetchResponse)||void 0===n?void 0:n.succeeded)&&(e.preventDefault(),this.reveal(e.target))}reload(){window.location.reload()}reveal(e){var t,n;const r=null!==(t=e.closest("turbo-frame"))&&void 0!==t?t:this.element.querySelector("turbo-frame");r&&(r.replaceChildren(this.templateTarget.content.cloneNode(!0)),null===(n=r.querySelector("[role='alert']"))||void 0===n||n.focus())}}default_1.targets=["template"];const s=default_1},5223(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{checkIfShouldBeRemoved(){if(this.categoryValue>=3)return;const e=window.location.search;if(e){"google_jobs_apply"!==new URLSearchParams(e).get("utm_campaign")&&this.element.remove()}else this.element.remove()}}default_1.values={category:Number};const s=default_1},4969(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);const s=class extends r.xI{importConfetti(){return new Promise(e=>{this.confetti?e(this.confetti):n.e(685).then(n.bind(n,4685)).then(t=>{this.confetti=t.default,e(this.confetti)})})}start(){this.importConfetti().then(()=>{this.confetti({particleCount:100,spread:70,origin:{y:.6},gravity:.2,startVelocity:35})})}}},1573(e,t,n){"use strict";n.r(t),n.d(t,{CONVERSION_BOX_SESSION_TOKEN_PREFIX:()=>s,default:()=>i});var r=n(2891);const s="_hw_conversion_box_already_displayed_";class default_1 extends r.xI{checkIfDisplayable(){const e=s+this.typeValue;sessionStorage.getItem(e)||(sessionStorage.setItem(e,"true"),this.dispatch("display"))}}default_1.values={type:String};const i=default_1},6488(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(2891);const s={EURO:"EUR"},i={NONE:0,TWO:2};function formatToEuroSalary(e,t=i.NONE){return new Intl.NumberFormat("fr-Fr",{style:"currency",currency:s.EURO,maximumFractionDigits:t,notation:"standard"}).format(Number(e))}function annualToMonthly(e,t=12){return Math.round(e/t)}var a,o,c,__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class default_1 extends r.xI{constructor(){super(...arguments),a.add(this)}monthlyOutputTargetConnected(){__classPrivateFieldGet(this,a,"m",o).call(this)}hourlyOutputTargetConnected(){__classPrivateFieldGet(this,a,"m",c).call(this)}updateOutputs(){this.annualOutputTarget.replaceChildren(formatToEuroSalary(this.inputTarget.value)),__classPrivateFieldGet(this,a,"m",o).call(this),__classPrivateFieldGet(this,a,"m",c).call(this)}}a=new WeakSet,o=function _default_1_updateMonthlyOutput(){const e=annualToMonthly(parseInt(this.inputTarget.value));this.monthlyOutputTarget.replaceChildren(formatToEuroSalary(e))},c=function _default_1_updateHourlyOutput(){const e=function monthlyToHourly(e,t=151.67){return parseFloat((e/t).toFixed(2))}(annualToMonthly(parseInt(this.inputTarget.value)));this.hourlyOutputTarget.replaceChildren(formatToEuroSalary(e,i.TWO))},default_1.targets=["input","annualOutput","monthlyOutput","hourlyOutput"];const l=default_1}
29,8907(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{connect(){this.displayCheckedInputsCount()}getCheckedInputs(){return this.checkboxTargets.filter(e=>e.checked)}displayCheckedInputsCount(){if(!this.hasOffersCountTarget)return;const e=this.getCheckedInputs();if(!e)return;const t=e.length;this.offersCountTarget.textContent=`${t} offre${t>1?"s":""}`}toggleForm(){0==this.getCheckedInputs().length?this.multiApplyFormTarget.classList.add(this.hideClass):this.multiApplyFormTarget.classList.remove(this.hideClass)}setCheckboxTracking(e){const t=e.target;if(t&&"checkbox"===t.type){const n=t.checked?e.params.checkedTracking:e.params.uncheckedTracking;t.setAttribute("data-analytics-values-param",JSON.stringify(n))}}}default_1.targets=["checkbox","offersCount","multiApplyForm"],default_1.classes=["hide"];const s=default_1},4224(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(4512);class default_1 extends r.xI{importScriptFromEvent(e){(null==e?void 0:e.detail.hasAccepted)?this.importGoogleOneTap():this.importCustomOneTap()}importScriptFromCookie(){(0,s.v9)()?this.importGoogleOneTap():this.importCustomOneTap()}importGoogleOneTap(){this.scriptElementTarget.setAttribute("src","https://accounts.google.com/gsi/client")}importCustomOneTap(){this.customFrameTarget.setAttribute("src",this.customUrlValue)}}default_1.values={customUrl:String},default_1.targets=["scriptElement","customFrame"];const i=default_1},3329(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{enableButton(){this.buttonTarget.classList.remove(this.disableClass)}checkAnswer(){let e;try{e=JSON.parse(this.expectedAnswersValue)}catch(e){}let t=parseInt(this.selectTarget.value);this.questionTarget.classList.add(this.hideClass),"object"==typeof e?e.includes(t)?this.formTarget.classList.remove(this.hideClass):this.messageTarget.classList.remove(this.hideClass):(this.messageTarget.classList.remove(this.hideClass),this.messageTarget.innerHTML="Une erreur est survenue, veuillez réessayer plus tard.")}}default_1.values={expectedAnswers:String},default_1.targets=["question","message","select","button","form"],default_1.classes=["hide","disable"];const s=default_1},1877(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(2891),s=n(7654),i=n(4512),a=n(1830);const o="at_least_second_page",c="has_closed_banner";function isSmartBannerDisplayable(){return(0,a.D)()&&!(0,i.Hr)(c)&&!function hasConversionBox(){return!!document.querySelector("#conversionBox")}()}class default_1 extends r.xI{connect(){if(this.hasTemplateTarget&&this.hasContainerTarget&&isSmartBannerDisplayable()){if(this.displayOnFirstPageValue||function isAtLeastSecondPage(){return!!(0,s.lw)(o)}()){const e=this.templateTarget.content.cloneNode(!0);this.containerTarget.appendChild(e)}(0,s.KD)(o,"1")}}close(){this.setClosedBannerCookie(),document.dispatchEvent(new CustomEvent("smart-banner:closed",{}))}setClosedBannerCookie(){(0,i.du)(c,"1",this.cookieLifespanValue)}}default_1.values={cookieLifespan:{type:Number,default:30},displayOnFirstPage:{type:Boolean,default:!1}},default_1.targets=["template","container"];const l=default_1},4690(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{constructor(){super(...arguments),this.referent=null,this.form=null,this.boundEvaluate=this.evaluate.bind(this)}connect(){this.hasDependsOnValue&&(this.referent=document.getElementById(this.dependsOnValue),this.form=this.element.closest("form"),this.referent&&(this.referent.addEventListener("change",this.boundEvaluate),this.referent.addEventListener("input",this.boundEvaluate),this.referent.addEventListener("hiddenInputChange",this.boundEvaluate)),this.form&&this.form.addEventListener("conditional-display:changed",this.boundEvaluate),this.evaluate())}disconnect(){this.referent&&(this.referent.removeEventListener("change",this.boundEvaluate),this.referent.removeEventListener("input",this.boundEvaluate),this.referent.removeEventListener("hiddenInputChange",this.boundEvaluate)),this.form&&this.form.removeEventListener("conditional-display:changed",this.boundEvaluate),this.referent=null,this.form=null}evaluate(){this.hasDependsOnValue&&this.referent&&(this.referent.disabled||""===this.referent.value?this.toggle(!1):this.isExpectedValueRever
29sedValue?this.toggle(!this.expectedValuesValue.includes(this.referent.value)):this.toggle(this.expectedValuesValue.includes(this.referent.value)))}toggle(e){var t;const n=!this.element.classList.contains(this.hiddenClass);this.element.classList.toggle(this.hiddenClass,!e),this.element.querySelectorAll("input, select, textarea").forEach(t=>t.disabled=!e),n!==e&&(null===(t=this.form)||void 0===t||t.dispatchEvent(new CustomEvent("conditional-display:changed")))}}default_1.classes=["hidden"],default_1.values={dependsOn:String,expectedValues:Array,isExpectedValueReversed:Boolean};const s=default_1},3163(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(4512);class default_1 extends r.xI{setCookie(){(0,s.du)(this.nameValue,this.valValue,this.durationValue)}hasCookie(){(0,s.Hr)(this.nameValue)&&(0,s.Ri)(this.nameValue)==this.valValue&&this.dispatch("hasCookie")}}default_1.values={name:String,val:String,duration:{type:Number,default:1}};const i=default_1},3159(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>l});var r,s,i,a=n(2891),o=n(4262),c=n(4512),__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class default_1 extends a.xI{constructor(){super(...arguments),r.add(this)}connect(){this.displayed=!1,this.displayIfAllowed(),document.addEventListener("marketingCookiesChanged",e=>{e.detail.hasAccepted&&__classPrivateFieldGet(this,r,"m",s).call(this)})}allowMarketingCookies(){const e=document.querySelector("#hw-cc-notice-accept-btn");e&&e.click()}displayIfAllowed(){((0,c.v9)()||__classPrivateFieldGet(this,r,"m",i).call(this))&&__classPrivateFieldGet(this,r,"m",s).call(this)}restrictIframeAttributes(){const e=this.embedTarget.querySelector("iframe");e&&e.setAttribute("sandbox","allow-same-origin allow-scripts")}}r=new WeakSet,s=function _default_1_display(){var e;if(!this.displayed){const t=null===(e=this.embedTarget.textContent)||void 0===e?void 0:e.replace(/\+/g,"%20");t&&(0,o.u3)(this.embedTarget,decodeURIComponent(t)),this.warningTarget.classList.add(...this.hidingClasses),this.embedTarget.classList.add(...this.showingClasses),this.embedTarget.classList.remove(...this.hidingClasses),this.displayed=!0,this.restrictIframeAttributes()}},i=function _default_1_isYoutubeNoCookie(){return(this.embedTarget.textContent||"").toLowerCase().includes("youtube-nocookie.com")},default_1.targets=["warning","embed"],default_1.classes=["hiding","showing"];const l=default_1},9289(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(4512);const i=class extends r.xI{hasAcceptedMarketingCookies(){(0,s.v9)()&&this.dispatch("hasAcceptedMarketingCookies")}}},2188(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{connect(){var e,t,n;const r=this.element,s=window.location.pathname.startsWith(null===(e=this.urlValue)||void 0===e?void 0:e.split(".")[0]);r.classList.toggle(this.activeClass,s),this.hasInactiveIconTarget&&(null===(t=this.inactiveIconTarget)||void 0===t||t.classList.toggle(this.hiddenClass,s)),this.hasActiveIconTarget&&(null===(n=this.activeIconTarget)||void 0===n||n.classList.toggle(this.hiddenClass,!s))}}default_1.targets=["activeIcon","inactiveIcon"],default_1.classes=["active","hidden"],default_1.values={url:String};const s=default_1},1804(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{open(e){this.hasInputCheckerOutlet&&(e.preventDefault(),this.nameTarget.textContent=e.params.fileName,this.deleteFormTarget.action=e.params.deleteUrl,this.inputCheckerOutlet.check())}}default_1.targets=["name","deleteForm"],default_1.outlets=["input-checker"];const s=default_1},3870(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);const toStringTime=e=>{const t=e%60;return`${Math.floor(e/60).toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`};class default_1 extends r.xI{disconnect(){clearInterval(this.interval)}start(){this.dispatch("started");let e=this.durationValue;this.countdownTarget.textContent=toStringTime(e),this.interval=setInterval(()=>{e--,0===e&&this.finish(),this.countdownTarget.textContent=toStringTime(e)},1e3)}finish(){clearInterval(this.interval),this.dispatch("finished")}}default_1.values={duration:Number},default_1.targets=["countdown"];const s=default_1},1152(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{connect(){requestAnimationFrame(()=>{this.dispatch(this.eventNameValue)})}}default_1.values={eventName:{type:String,default:"connected"}};const s=default_1},3110(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);const s=class extends r.xI{constructor(){super(...arguments),this.relayPageRestore=e=>{e.persisted&&this.dispatch("restored")}}connect(){window.addEventListener("pageshow",this.relayPageRestore)}disconnect(){window.removeEventListener("pageshow",this.relayPageRestore)}}},4816(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(2891);const s="interval",i="timeout";class default_1 extends r.xI{constructor(){super(...arguments),this.timeoutId=null,this.isRunning=!1,this.elapsed=0,this.resumedAt=0}start(){this.clearScheduled(),this.elapsed=0,this.isRunning=!0,this.schedule()}stop(){this.clearScheduled(),this.isRunning=!1,this.elapsed=0}pause(){if(this.isRunning)return this.elapsed+=performance.now()-this.resumedAt,this.clearScheduled(),void(this.isRunning=!1);this.isRunning=!0,this.schedule()}disconnect(){this.clearScheduled()}schedule(){this.resumedAt=performance.now();const e=Math.max(0,this.timeoutValue-this.elapsed);this.timeoutId=setTimeout(()=>this.onElapsed(),e)}onElapsed(){this.timeoutId=null,this.actionTypeValue===s?(this.start(),this.dispatch(s)):(this.stop(),this.dispatch(i))}clearScheduled(){null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}}default_1.values={timeout:Number,actionType:{type:String,default:i}};const a=default_1},9894(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(4262);class default_1 extends r.xI{connect(){this.maxDisplayedItems=(0,s.Fr)()?this.maxDisplayedItemsMobileValue:this.maxDisplayedItemsDesktopValue,this.resetDisplayState(),this.hideOutsideElements(),this.toggleMiscElements()}resetDisplayState(){for(const e of this.elementToHideTargets)e.classList.remove(this.hiddenClass);this.hasButtonToDisplayTarget&&this.buttonToDisplayTarget.classList.add(this.hiddenClass)}hideOutsideElements(){const e=this.elementToHideTargets.slice(this.maxDisplayedItems);for(const t of e)t.classList.add(this.hiddenClass)}hasHiddenElements(){return this.elementToHideTargets.some(e=>e.classList.contains(this.hiddenClass))}toggleMiscElements(){this.hasButtonToDisplayTarget&&this.hasHiddenElements()&&this.buttonToDisplayTarget.classList.remove(this.hiddenClass)}}default_1.values={maxDisplayedItemsDesktop:{type:Number,default:15},maxDisplayedItemsMobile:{type:Number,default:7}},default_1.targets=["elementToHide","buttonToDisplay"],default_1.classes=["hidden"];const i=default_1},5064(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>c});var r,s,i,a,o=n(2891),__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class default_1 extends o.xI{constructor(){super(...arguments),r.add(this)}focusPreviousElement(e){e.preventDefault();const t=__classPrivateFieldGet(this,r,"m",i).call(this),n=__classPrivateFieldGet(this,r,"m",a).call(this);n>0&&t[n-1].focus()}focusNextElement(e){e.preventDefault();const t=__classPrivateFieldGet(this,r,"m",i).call(this),n=__classPrivateFieldGet(this,r,"m",a).call(this);n<this.elementTargets.length-1&&t[n+1].focus()}}r=new WeakSet,s=function _default_1_isElementVisible(e){return"none"!==window.getComputedStyle(e).display},i=function _default_1_getVisibleElements(){return this.elementTargets.filter(e=>__classPrivateFieldGet(this,r,"m",s).call(this,e))},a=function _default_1_getElementIndex(){return __classPrivateFieldGet(this,r,"m",i).call(this).findIndex(e=>e===document.activeElement)},default_1.targets=["element"];const c=default_1},4069(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);
29class default_1 extends r.xI{focus(){this.fieldTarget.focus(),this.fieldTarget.click()}}default_1.targets=["field"];const s=default_1},9578(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{constructor(){super(...arguments),this.selectors='a[href]:not([disabled]), span[data-atc-l-value]:not([disabled]),button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]),[tabindex="0"]',this.handleTab=e=>{"Tab"===e.key&&(e.shiftKey?document.activeElement===this.firstElement&&(this.lastElement.focus(),e.preventDefault()):document.activeElement===this.lastElement&&(this.firstElement.focus(),e.preventDefault()))}}connect(){this.focusableElements=Array.from(this.containerTarget.querySelectorAll(this.selectors)),this.setFirstandLast(),document.addEventListener("keydown",this.handleTab,!0)}disconnect(){document&&document.removeEventListener("keydown",this.handleTab,!0)}reloadFocusElements(){this.focusableElements=this.focusableElements.concat(Array.from(this.containerTarget.querySelectorAll(this.selectors))),this.setFirstandLast()}setFirstandLast(){this.firstElement=this.focusableElements[0],this.lastElement=this.focusableElements[this.focusableElements.length-1]}}default_1.targets=["container"];const s=default_1},184(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);const s=class extends r.xI{connect(){this.element.focus()}}},4014(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);const s=class extends r.xI{createClickListener(){document.addEventListener("click",e=>{this._checkIfDownloaded(e.target)})}_checkIfDownloaded(e){e instanceof HTMLElement&&"hcvHeaderGetPdfBtn"==e.id&&this.dispatch("downloaded")}}},1908(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{constructor(){super(...arguments),this.dispatchClick=e=>{this.hasDestinationTarget&&e.target!==this.destinationTarget&&this.destinationTarget.dispatchEvent(new MouseEvent("click"))}}connect(){this.element.addEventListener("click",this.dispatchClick)}disconnect(){this.element.removeEventListener("click",this.dispatchClick)}}default_1.targets=["destination"];const s=default_1},6736(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class AnchorController extends r.xI{connect(){this.anchorValue===window.location.hash&&this.dispatch("tabMatchingWithAnchor",{detail:{param:this.paramValue}})}}AnchorController.values={anchor:String,param:String};const s=AnchorController},422(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>d});var r,s,i,a,o,c,l=n(2891),u=n(4262),__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class CarouselController extends l.xI{constructor(){super(...arguments),r.add(this)}connect(){__classPrivateFieldGet(this,r,"m",s).call(this,this.pageValue),__classPrivateFieldGet(this,r,"m",c).call(this),this.elementsPerPageNumber=__classPrivateFieldGet(this,r,"m",a).call(this),this.maxPage=__classPrivateFieldGet(this,r,"m",o).call(this),this.containerRect=this.itemsContainerTarget.getBoundingClientRect()}next(e){const t=this.pageValue;if("carousel:swipeLeft"===e.type){if(this.pageValue=this.lastSnappedIndex,this.pageValue>this.maxPage)return}else this.pageValue++;__classPrivateFieldGet(this,r,"m",s).call(this,this.pageValue);const n=t*this.elementsPerPageNumber;this.buttonPrevTarget.disabled=!1,this.pageValue==this.maxPage&&(this.buttonNextTarget.disabled=!0);const a=this.itemsTargets[n];"click"!==e.type&&"focusout"!==e.type||__classPrivateFieldGet(this,r,"m",i).call(this,a)}previous(e){if("carousel:swipeRight"===e.type){if(this.pageValue=this.lastSnappedIndex,this.pageValue-1<0)return}else this.pageValue--;__classPrivateFieldGet(this,r,"m",s).call(this,this.pageValue);const t=this.pageValue*this.elementsPerPageNumber-this.elementsPerPageNumber;this.buttonNextTarget.disabled=!1,0==t&&(this.buttonPrevTarget.disabled=!0);const n=this.itemsTargets[t];"click"!==e.type&&"focusout"!==e.type||__classPrivateFieldGet(this,r,"m",i).call(this,n)}dispatchSwipeDirection(){if(!(0,u.Fr)())return;const e=Array.from(this.itemsContainerTarget.children);let t=1/0,n=1,r=1;for(const s of e){const e=s.getBoundingClientRect(),i=Math.abs(e.left-this.containerRect.left);i<t&&(t=i,n=r),r++}const s=void 0!==this.lastSnappedIndex?this.lastSnappedIndex:1;if(this.lastSnappedIndex=n,s===n)return null;this.dispatch(n>s?"swipeLeft":"swipeRight")}onFocusOut(e){const t=e.params.itemId,n=e.relatedTarget;if(null===n)return;const r=n.closest("[data-carousel-item-id-param]").getAttribute("data-carousel-item-id-param");if(null===r)return;const s=t%this.elementsPerPageNumber===0&&r>t,i=(t-1)%this.elementsPerPageNumber==0&&r<t;s?this.next(e):i&&this.previous(e)}}r=new WeakSet,s=function _CarouselController_setPagination(e){const t=(0,u.Fr)()?this.paginationMobileTarget.children:this.paginationDesktopTarget.children;for(const e of t)e.classList.remove(...this.selectClasses);void 0!==t[e-1]&&t[e-1].classList.add(...this.selectClasses)},i=function _CarouselController_scrollToElement(e){setTimeout(()=>{e&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},0)},a=function _CarouselController_getElementsPerPageNumber(){return(0,u.Fr)()?1:this.nbElementsPerPageValue},o=function _CarouselController_getMaxPageNumber(){return(0,u.Fr)()?this.itemsTargets.length:Math.ceil(this.itemsTargets.length/this.elementsPerPageNumber)},c=function _CarouselController_makeCarouselItemChildrenUnfocusable(){this.itemsTargets.forEac
29h(e=>{e.querySelectorAll("*").forEach(e=>{e instanceof HTMLAnchorElement||e.setAttribute("tabindex","-1")})})},CarouselController.values={nbElementsPerPage:Number,page:{type:Number,default:1},maxPage:{type:Number,default:0}},CarouselController.targets=["buttonPrev","buttonNext","paginationMobile","paginationDesktop","items","itemsContainer"],CarouselController.classes=["select"];const d=CarouselController},9932(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>DetailsController});var r=n(2891),s=n(2752),i=n(7950);class DetailsController extends r.xI{connect(){const[e,t]=(0,s.Ls)(this);this.enableClickOutside=e,this.disableClickOutside=t,(0,s.N$)(this,{mediaQueries:i.A})}expand(){this.element.open=!0}collapse(){this.element.open&&this.dispatch("not:collapsed"),this.element.open=!1}}},7560(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{constructor(){super(...arguments),this.handleNavigationClick=e=>{const{dirty:t,hasModalOutlet:n,hasInputCheckerOutlet:r}=this;if(!t||!n||!r)return;const s=e.target;if(this.hasBackButtonTarget&&this.backButtonTarget.contains(s))return e.preventDefault(),e.stopImmediatePropagation(),void this.inputCheckerOutlet.check();const i=s.closest("a[href]");if(i){if("_blank"===i.target)return;e.preventDefault(),e.stopImmediatePropagation(),this.modalOutlet.setPendingUrl(i.href),this.inputCheckerOutlet.check()}}}connect(){this.dirty=!1,this.setupGlobalNavigationDetection()}disconnect(){document.removeEventListener("click",this.handleNavigationClick,!0)}setupGlobalNavigationDetection(){document.addEventListener("click",this.handleNavigationClick,!0)}makeDirty(){this.dirty=!0}clearDirty(){this.dirty=!1}}default_1.targets=["backButton"],default_1.outlets=["modal","input-checker"];const s=default_1},7208(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(2891),s=n(4706);const i="hidden_offers";class default_1 extends r.xI{connect(){this.applyHide(),this.updateCounter()}hide(e){const t=e.currentTarget.dataset.hideOfferOfferIdValue,n=t?parseInt(t,10):null;null===n||isNaN(n)||((0,s.EN)(i,n,100),this.applyHide(),this.updateCounter())}applyHide(){(0,s.Y9)(this.itemTargets,i,this.hiddenClass,e=>this.getItemOfferId(e))}updateCounter(){const e=(0,s.HB)(i),t=this.itemTargets.map(e=>this.getItemOfferId(e)).filter(t=>e.includes(t)).length;t>0?(this.counterTarget.textContent=`${t} ${t>1?"offres":"offre"}`,this.counterContainerTarget.classList.remove(this.hiddenClass)):this.counterContainerTarget.classList.add(this.hiddenClass)}getItemOfferId(e){const t=e.dataset.hideOfferItemIdValue;return t?parseInt(t,10):0}}default_1.targets=["item","counterContainer","counter"],default_1.classes=["hidden"];const a=default_1},2288(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(4706);class default_1 extends r.xI{save({params:{localStorageKey:e,id:t}}){if(t){const n=(0,s.HB)(e);n.length>=50&&n.shift(),n.includes(t)||n.push(t),(0,s.D7)(e,n)}}applyFlagClass({params:{localStorageKey:e}}){(0,s.Y9)(this.itemTargets,e,this.flagClass,e=>(0,s.De)(e,"data-id-storage-item-id"))}}default_1.targets=["item"],default_1.classes=["flag"];const i=default_1},9328(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{constructor(){super(...arguments),this.delay=200}connect(){this.observer=new IntersectionObserver(e=>{const t=e[e.length-1];this.handleIntersection(t)},{threshold:this.thresholdValue}),this.observer.observe(this.element)}handleIntersection(e){e.isIntersecting?(this.visibleSince=performance.now(),this.visibilityTimer=window.setTimeout(()=>{this.visibleSince&&performance.now()-this.visibleSince>=this.delay&&this.onUpdate(!0)},this.delay)):(this.visibleSince=null,this.visibilityTimer&&(clearTimeout(this.visibilityTimer),this.visibilityTimer=null),this.onUpdate(!1))}onUpdate(e){const t=this.hasNameValue?this.nameValue+":":"";this.dispatch(t+(e?"enter":"exit"))}}default_1.values={name:String,threshold:{type:Number,default:0}};const s=default_1},7026(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>b});var r,s,i,a,o,c,l,u,d,h,p,m,g,f,v=n(2891),__classPrivateFieldSet=function(e,t,n,r,s
29){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?s.call(e,n):s?s.value=n:t.set(e,n),n},__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class OverlapDetectorController extends v.xI{constructor(){super(...arguments),r.add(this),i.set(this,null),a.set(this,null),o.set(this,null),c.set(this,null),l.set(this,!1),u.set(this,[])}connect(){this.observeIdValue?(__classPrivateFieldSet(this,i,document.getElementById(this.observeIdValue),"f"),__classPrivateFieldGet(this,i,"f")&&this.targetTargets.length>0?(__classPrivateFieldGet(this,r,"m",d).call(this),__classPrivateFieldGet(this,r,"m",p).call(this),__classPrivateFieldGet(this,r,"m",m).call(this)):console.warn(`overlap-detector: Element with id "${this.observeIdValue}" not found or no targets defined`)):console.warn("overlap-detector: observeId value is required")}disconnect(){__classPrivateFieldGet(this,r,"m",h).call(this)}}s=OverlapDetectorController,i=new WeakMap,a=new WeakMap,o=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,r=new WeakSet,d=function _OverlapDetectorController_setupScrollListener(){__classPrivateFieldSet(this,a,()=>{__classPrivateFieldGet(this,l,"f")||(__classPrivateFieldSet(this,l,!0,"f"),__classPrivateFieldSet(this,c,window.setTimeout(()=>{requestAnimationFrame(()=>{__classPrivateFieldGet(this,r,"m",m).call(this),__classPrivateFieldSet(this,l,!1,"f"),__classPrivateFieldSet(this,c,null,"f")})},this.throttleMsValue),"f"))},"f"),window.addEventListener("scroll",__classPrivateFieldGet(this,a,"f"),{passive:!0})},h=function _OverlapDetectorController_cleanupScrollListener(){__classPrivateFieldGet(this,a,"f")&&(window.removeEventListener("scroll",__classPrivateFieldGet(this,a,"f")),__classPrivateFieldSet(this,a,null,"f")),__classPrivateFieldGet(this,c,"f")&&(clearTimeout(__classPrivateFieldGet(this,c,"f")),__classPrivateFieldSet(this,c,null,"f")),__classPrivateFieldSet(this,l,!1,"f")},p=function _OverlapDetectorController_cacheClickableElements(){if(!__classPrivateFieldGet(this,i,"f"))return;const e=s.CLICKABLE_SELECTORS.join(", ");__classPrivateFieldSet(this,u,Array.from(__classPrivateFieldGet(this,i,"f").querySelectorAll(e)),"f")},m=function _OverlapDetectorController_checkOverlap(){if(!__classPrivateFieldGet(this,i,"f"))return;const e=__classPrivateFieldGet(this,i,"f").getBoundingClientRect(),t=this.element.getBoundingClientRect(),n=!(e.bottom<t.top||e.top>t.bottom);__classPrivateFieldGet(this,o,"f")!==n&&(__classPrivateFieldSet(this,o,n,"f"),__classPrivateFieldGet(this,r,"m",g).call(this,n),this.disablePointerEventsValue&&__classPrivateFieldGet(this,r,"m",f).call(this,n),this.dispatch("overlap",{detail:{isOverlapping:n}}))},g=function _OverlapDetectorController_updateTargetClasses(e){this.targetTargets.forEach(t=>{this.overlapClasses.forEach(n=>{e?t.classList.add(n):t.classList.remove(n)}),this.hasNoOverlapClass&&this.noOverlapClasses.forEach(n=>{e?t.classList.remove(n):t.classList.add(n)})})},f=function _OverlapDetectorController_updatePointerEvents(e){if(!__classPrivateFieldGet(this,i,"f"))return;const t=e?"none":"",n=e?"auto":"";__classPrivateFieldGet(this,i,"f").style.pointerEvents=t,__classPrivateFieldGet(this,u,"f").forEach(e=>{e.style.pointerEvents=n})},OverlapDetectorController.targets=["target"],OverlapDetectorController.classes=["overlap","noOverlap"],OverlapDetectorController.values={observeId:{type:String,default:""},threshold:{type:Number,default:.1},disablePointerEvents:{type:Boolean,default:!0},throttleMs:{type:Number,default:16}},OverlapDetectorController.CLICKABLE_SELECTORS=["a","button","[data-action]",'[role="button"]','input[type="button"]','input[type="submit"]',"[tabindex]"];const b=OverlapDetectorController}
29,8440(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);const s=class extends r.xI{printWindow(){return window.print()}}},1704(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{remove(){const e=this.element.closest("form");e&&e.dispatchEvent(new Event("change",{bubbles:!0})),this.animationClasses.length>0?this.animateBeforeRemove():this.element.remove(),this.dispatch("removed")}animateBeforeRemove(){this.element.addEventListener("animationend",()=>{this.element.remove()}),this.element.classList.add(...this.animationClasses)}}default_1.classes=["animation"];const s=default_1},7700(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{connect(){if(!(this.namedValue in this.element))throw new Error(`${this.element} has not attribut ${this.namedValue}`);this.element.removeAttribute(this.namedValue)}}default_1.values={named:String};const s=default_1},9462(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{connect(){this.setWidth()}setWidth(){this.inputTarget.style.width=`${this.inputTarget.value.length}ch`}}default_1.targets=["input"];const s=default_1},2824(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(4262);class ScrollToController extends r.xI{scrollToElement(){const e=document.querySelector(this.elementValue);e&&e.scrollIntoView({behavior:"smooth",block:this.blockValue})}scrollToOffset(){const e=Math.max(0,this.offsetValue||0);window.scrollTo({top:e,behavior:"smooth"})}scrollToElementOnMobile(){(0,s.Fr)()&&this.scrollToElement()}}ScrollToController.values={element:String,block:{type:String,default:"start"},offset:{type:Number,default:0}};const i=ScrollToController},1476(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(2891),s=n(2752),i=n(7950);class ScrollToTopController extends r.xI{connect(){(0,s.N$)(this,{mediaQueries:i.A})}scroll({params:{behavior:e}}){const t=null!=e?e:"instant";window.scrollTo({top:0,behavior:t})}scrollElementDesktop({params:{behavior:e}}){const t=null!=e?e:"instant";this.elementTarget.scrollTo({top:0,behavior:t})}}ScrollToTopController.targets=["element"];const a=ScrollToTopController},2280(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class SetCursorPositionController extends r.xI{setCursorEndPosition(){const e=this.inputTargets.find(e=>e===document.activeElement),t=e.value.length;e.setSelectionRange(t,t)}}SetCursorPositionController.targets=["input"];const s=SetCursorPositionController},2654(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(7765);class default_1 extends r.xI{async connect(){try{(await(0,s.yn)()).IsAuthenticated?this.showConnectedTarget():this.showNotConnectedTarget()}catch(e){console.error("Erreur lors de la récupération des données d'authentification:",e),this.showNotConnectedTarget()}this.hideSkeleton()}showConnectedTarget(){this.connectedTarget.classList.remove(...this.hiddenClasses),this.notConnectedTarget.classList.add(...this.hiddenClasses)}showNotConnectedTarget(){this.connectedTarget.classList.add(...this.hiddenClasses),this.notConnectedTarget.classList.remove(...this.hiddenClasses)}hideSkeleton(){this.hasSkeletonTarget&&this.skeletonTarget.classList.add(...this.hiddenClasses)}}default_1.targets=["skeleton","connected","notConnected"],default_1.classes=["hidden"];const i=default_1},9156(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{constructor(){super(...arguments),this._hasSaved=!1}save(){this.savedTarget&&(this._elementSaved=this.savedTarget.cloneNode(!0),this._hasSaved=!0)}replace(){this._hasSaved&&this.destinationTarget.replaceWith(this._elementSaved)}}default_1.targets=["saved","destination"];const s=default_1},6424(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o});var r,s,i,a=n(2891),__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class default_1 extends a.xI{constructor(){super(...arguments),r.add(this)}connect(){this.stickyObserver=new IntersectionObserver(e=>{e[0].isIntersecting?__classPrivateFieldGet(this,r,"m",s).call(this):__classPrivateFieldGet(this,r,"m",i).call(this)},{threshold:1}),this.stickyObserver.observe(this.element)}disconnect(){this.stickyObserver.disconnect(),delete this.stickyObserver}}
29r=new WeakSet,s=function _default_1_removeStuckClasses(){this.element.classList.remove(...this.stuckClasses)},i=function _default_1_addStuckClasses(){this.element.classList.add(...this.stuckClasses)},default_1.classes=["stuck"];const o=default_1},3630(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class SwitchDisplayController extends r.xI{connect(){const e=window.location.hash;let t=this.initialIndexValue;if(this.hasHashesValue){const n=this.hashesValue.findIndex(t=>`#${t}`===e);-1!==n&&(t=n)}this.setActiveTab(t)}changeTab(e){var t;const n=this.tabContentTargets.length;if(n<=0)return;const r=e.currentTarget;let s=null!=(null===(t=e.params)||void 0===t?void 0:t.index)?Number(e.params.index):this.tabTargets.indexOf(r);s=(s%n+n)%n,this.setActiveTab(s)}changeTabByIndex(e){var t;const n=null===(t=e.params)||void 0===t?void 0:t.index;null!=n&&this.setActiveTab(Number(n))}setActiveTab(e){0!==this.tabContentTargets.length&&(this.tabContentTargets.forEach((t,n)=>{n===e?(t.classList.remove(this.hideClass),t.classList.add(this.showClass)):(t.classList.remove(this.showClass),t.classList.add(this.hideClass))}),this.tabTargets.forEach((t,n)=>{n===e?(t.classList.add(this.activeClass),this.updateIconForTab(t,!0),t.setAttribute("aria-selected","true")):(t.classList.remove(this.activeClass),this.updateIconForTab(t,!1),t.setAttribute("aria-selected","false"))}))}updateIconForTab(e,t){const n=this.tabTargets.indexOf(e);if(-1===n)return;const r=this.inactiveIconTargets[n],s=this.activeIconTargets[n];r&&r.classList.toggle(this.opacityClass,t),s&&s.classList.toggle(this.opacityClass,!t)}}SwitchDisplayController.targets=["tabContent","tab","inactiveIcon","activeIcon"],SwitchDisplayController.classes=["hide","show","active","opacity"],SwitchDisplayController.values={hashes:Array,initialIndex:{type:Number,default:0}};const s=SwitchDisplayController},3104(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{next(){if(0===this.textTargets.length)return;const e=this.textTargets.findIndex(e=>!this.isHidden(e));this.show((e+1)%this.textTargets.length)}reset(){this.show(0)}isHidden(e){return"true"===e.getAttribute("aria-hidden")}show(e){this.textTargets.forEach((t,n)=>{const r=n!==e;this.hiddenClasses.forEach(e=>t.classList.toggle(e,r)),r?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")})}}default_1.targets=["text"],default_1.classes=["hidden"];const s=default_1},4830(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{toggle(e){this.toggleTargets(this.toToggleTargets,this.toggledClasses,e)}toggleAdditional(e){this.toggleTargets(this.toToggleAdditionalTargets,this.toggledAdditionalClasses,e)}singleToggle(e){this.toToggleTargets.forEach(t=>{e.currentTarget===t?t.classList.add(...this.toggledClasses):t.classList.remove(...this.toggledClasses)})}add(){this.addClasses(this.toToggleTargets,this.toggledClasses)}addAdditional(){this.addClasses(this.toToggleAdditionalTargets,this.toggledAdditionalClasses)}remove(){this.removeClasses(this.toToggleTargets,this.toggledClasses)}removeAdditional(){this.removeClasses(this.toToggleAdditionalTargets,this.toggledAdditionalClasses)}toggleTargets(e,t,n){e.forEach(e=>{t.forEach(t=>{void 0!==n.params.force?e.classList.toggle(t,n.params.force):e.classList.toggle(t)})})}removeClasses(e,t){e.forEach(e=>{t.forEach(t=>{e.classList.toggle(t,!1)})})}addClasses(e,t){e.forEach(e=>{t.forEach(t=>{e.classList.toggle(t,!0)})}),requestAnimationFrame(()=>{this.dispatch("added")})}toggleAdditionalWithDelay(e){this.transitionDelayValue&&setTimeout(()=>{this.toggleAdditional(e)},this.transitionDelayValue)}}default_1.targets=["toToggle","toToggleAdditional"],default_1.classes=["toggled","toggledAdditional"],default_1.values={transitionDelay:{type:Number,default:500}};const s=default_1},69(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{setAttribute({params:{attribute:e,value:t}}){this.elementTarget.setAttribute(e,t)}unsetAttribute({params:{attribute:e}}){this.elementTarget.toggleAttribute(e,!1)}toggleAttribute({params:{attribute:e}}){this.elementTarget.toggleAttribute(e)}toggleValue({params:{attribute:e,oldValue:t,newValue:n}}){const r=this.elementTarget.getAttribute(e);"object"==typeof t?t=JSON.stringify(t):"string"!=typeof t&&(t=String(t)),"object"==typeof n?n=JSON.stringify(n):"string"!=typeof n&&(n=String(n));const s=r===t?n:t;this.elementTarget.setAttribute(e,s)}}default_1.targets=["element"];const s=default_1}
29,7346(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{toggle(e){this.toggledClasses.forEach(t=>{void 0!==e.params.force?document.body.classList.toggle(t,e.params.force):document.body.classList.toggle(t)})}add(){this.toggledClasses.forEach(e=>{document.body.classList.add(e)})}remove(){this.toggledClasses.forEach(e=>{document.body.classList.remove(e)})}}default_1.classes=["toggled"];const s=default_1},3908(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{toggleClass(){const e=document.querySelector("header");this.element.checked?e.classList.add(...this.toggledClasses):e.classList.remove(...this.toggledClasses)}}default_1.classes=["toggled"];const s=default_1},4664(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var r,s,i=n(2891),__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class TogglePropertyController extends i.xI{constructor(){super(...arguments),r.add(this)}toToggleOnConnectTargetConnected(){__classPrivateFieldGet(this,r,"m",s).call(this,this.toToggleOnConnectTarget)}toggle(){this.toToggleTargets.forEach(e=>__classPrivateFieldGet(this,r,"m",s).call(this,e))}}r=new WeakSet,s=function _TogglePropertyController_toggleProperty(e){e[this.namedValue]=!e[this.namedValue],this.dispatch("toggled")},TogglePropertyController.targets=["toToggle","toToggleOnConnect"],TogglePropertyController.values={named:String};const a=TogglePropertyController},9877(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>c});var r,s,i,a,o=n(2891),__classPrivateFieldSet=function(e,t,n,r,s){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?s.call(e,n):s?s.value=n:t.set(e,n),n},__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class default_1 extends o.xI{constructor(){super(...arguments),r.add(this),s.set(this,0)}open(e){__classPrivateFieldSet(this,s,e.params.index,"f"),__classPrivateFieldGet(this,r,"m",i).call(this),requestAnimationFrame(()=>{this.closeButtonTarget.focus()})}previous(){var e;this.previousButtonTarget.classList.contains(this.hiddenClass)||(__classPrivateFieldSet(this,s,(e=__classPrivateFieldGet(this,s,"f"),--e),"f"),__classPrivateFieldGet(this,r,"m",i).call(this))}next(){var e;this.nextButtonTarget.classList.contains(this.hiddenClass)||(__classPrivateFieldSet(this,s,(e=__classPrivateFieldGet(this,s,"f"),++e),"f"),__classPrivateFieldGet(this,r,"m",i).call(this))}}s=new WeakMap,r=new WeakSet,i=function _default_1_moveToIndex(){this.itemTargets.forEach(e=>{e.classList.add(this.hiddenClass)}),this.indexTarget.innerText=String(__classPrivateFieldGet(this,s,"f")+1),this.itemTargets[__classPrivateFieldGet(this,s,"f")].classList.remove(this.hiddenClass),__classPrivateFieldGet(this,r,"m",a).call(this)},a=function _default_1_displayBtn(){this.previousButtonTarget.classList.add(this.hiddenClass),this.nextButtonTarget.classList.add(this.hiddenClass),0!==__classPrivateFieldGet(this,s,"f")&&this.previousButtonTarget.classList.remove(this.hiddenClass),__classPrivateFieldGet(this,s,"f")!==this.maxValue-1&&this.nextButtonTarget.classList.remove(this.hiddenClass)},default_1.values={max:Number},default_1.classes=["hidden"],default_1.targets=["item","index","previousButton","nextButton","closeButton"];const c=default_1},7859(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(4262);class default_1 extends r.xI{async urlValueChanged(){if(!this.urlValue)return;const e=await fetch(this.urlValue),t=await e.text(),n=(0,s.SL)(t);(0,s.Tb)(n,{into:this.element})}}default_1.values={url:String};const i=default_1},4283(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class LoaderButtonController extends r.xI{constructor(){super(...arguments),this.svgUrl="href"}setLoadingState(){this.buttonTarget.disabled=!0,this.buttonTarget.classList.add(...this.disabledClasses),this.svgTarget.classList.add(this.hiddenClass),this.loaderTarget.classList.remove(this.hiddenClass),this._setFinalState()}resetPreviousState(){const e=this.svgTarget.querySelector("use");e&&e.setAttribute(this.svgUrl,this.initialSvgValue),this.textTarget.textContent=this.initialTextValue,this.loaderTarget.classList.add(this.hiddenClass)}_setFinalState(){setTimeout(()=>{const e=this.finalSvgValue||this.initialSvgValue,t=this.svgTarget.querySelector("use");t&&t.setAttribute(this.svgUrl,e),this.svgTarget.classList.remove(this.hiddenClass),this.loaderTarget.classList.add(this.hiddenClass),this.buttonTarget.disabled=!1,this.buttonTarget.classList.remove(...this.disabledClasses),this.hasTextValue&&(this.textTarget.textContent=this.textValue)},this.timeValue)}}LoaderButtonController.targets=["button","svg","text","loader"],LoaderButtonController.values={initialSvg:String,initialText:String,finalSvg:String,time:{type:String,default:"600"},text:String},LoaderButtonController.classes=["disabled","hidden"];const s=LoaderButtonController},9738(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r,s=n(2891);!function(e){e.INPUT_TYPE_TEXT="text",e.INPUT_TYPE_CHECKBOX="checkbox"}(r||(r={}));class default_1 extends s.xI{append(){const e=this.getSelectedValues();e.length?(this.toTarget.innerText=e.join(", "),this.toTarget.classList.remove(...this.emptyClasses)):(this.toTarget.innerText=this.placeholderValue,this.toTarget.classList.add(...this.emptyClasses))}appendCounter(){const e=this.getSelectedValues();e.length?(this.toTarget.innerText=e.length.toString(),this.toTarget.classList.add(...this.counterClasses)):(this.toTarget.innerText=this.placeholderValue,this.toTarget.classList.remove(...this.counterClasses))}getSelectedValues(){const e=[];
29return this.fromTargets.forEach(t=>{if(t.type===r.INPUT_TYPE_CHECKBOX){if(t.checked){const n=t.labels;n.length&&e.push(n[0].textContent.trim())}}else t.type===r.INPUT_TYPE_TEXT&&t.value&&e.push(t.value)}),e}}default_1.values={placeholder:String},default_1.targets=["from","to"],default_1.classes=["empty","counter"];const i=default_1},2557(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>h,morph:()=>morph});var r,s=n(2891);var i="undefined"==typeof document?void 0:document,a=!!i&&"content"in i.createElement("template"),o=!!i&&i.createRange&&"createContextualFragment"in i.createRange();function toElement(e){return e=e.trim(),a?function createFragmentFromTemplate(e){var t=i.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(e):o?function createFragmentFromRange(e){return r||(r=i.createRange()).selectNode(i.body),r.createContextualFragment(e).childNodes[0]}(e):function createFragmentFromWrap(e){var t=i.createElement("body");return t.innerHTML=e,t.childNodes[0]}(e)}function compareNodeNames(e,t){var n,r,s=e.nodeName,i=t.nodeName;return s===i||(n=s.charCodeAt(0),r=i.charCodeAt(0),n<=90&&r>=97?s===i.toUpperCase():r<=90&&n>=97&&i===s.toUpperCase())}function syncBooleanAttrProp(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var c={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();"OPTGROUP"===r&&(r=(n=n.parentNode)&&n.nodeName.toUpperCase()),"SELECT"!==r||n.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}syncBooleanAttrProp(e,t,"selected")},INPUT:function(e,t){syncBooleanAttrProp(e,t,"checked"),syncBooleanAttrProp(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var s=r.nodeValue;if(s==n||!n&&s==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n,r,s=-1,i=0,a=e.firstChild;a;)if("OPTGROUP"===(r=a.nodeName&&a.nodeName.toUpperCase()))(a=(n=a).firstChild)||(a=n.nextSibling,n=null);else{if("OPTION"===r){if(a.hasAttribute("selected")){s=i;break}i++}!(a=a.nextSibling)&&n&&(a=n.nextSibling,n=null)}e.selectedIndex=s}}};function noop(){}function defaultGetNodeKey(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var l=function morphdomFactory(e){return function morphdom(t,n,r){if(r||(r={}),"string"==typeof n)if("#document"===t.nodeName||"HTML"===t.nodeName){var s=n;(n=i.createElement("html")).innerHTML=s}else if("BODY"===t.nodeName){var a=n;(n=i.createElement("html")).innerHTML=a;var o=n.querySelector("body");o&&(n=o)}else n=toElement(n);else 11===n.nodeType&&(n=n.firstElementChild);var l=r.getNodeKey||defaultGetNodeKey,u=r.onBeforeNodeAdded||noop,d=r.onNodeAdded||noop,h=r.onBeforeElUpdated||noop,p=r.onElUpdated||noop,m=r.onBeforeNodeDiscarded||noop,g=r.onNodeDiscarded||noop,f=r.onBeforeElChildrenUpdated||noop,v=r.skipFromChildren||noop,b=r.addChild||function(e,t){return e.appendChild(t)},_=!0===r.childrenOnly,S=Object.create(null),y=[];function addKeyedRemoval(e){y.push(e)}function walkDiscardedChildNodes(e,t){if(1===e.nodeType)for(var n=e.firstChild;n;){var r=void 0;t&&(r=l(n))?addKeyedRemoval(r):(g(n),n.firstChild&&walkDiscardedChildNodes(n,t)),n=n.nextSibling}}function removeNode(e,t,n){!1!==m(e)&&(t&&t.removeChild(e),g(e),walkDiscardedChildNodes(e,n))}function indexTree(e){if(1===e.nodeType||11===e.nodeType)for(var t=e.firstChild;t;){var n=l(t);n&&(S[n]=t),indexTree(t),t=t.nextSibling}}function handleNodeAdded(e){d(e);for(var t=e.firstChild;t;){var n=t.nextSibling,r=l(t);if(r){var s=S[r];s&&compareNodeNames(t,s)?(t.parentNode.replaceChild(s,t),morphEl(s,t)):handleNodeAdded(t)}else handleNodeAdded(t);t=n}}function morphEl(t,n,r){var s=l(n);if(s&&delete S[s],!r){var a=h(t,n);if(!1===a)return;if(a instanceof HTMLElement&&indexTree(t=a),e(t,n),p(t),!1===f(t,n))return}"TEXTAREA"!==t.nodeName?function morphChildren(e,t){var n,r,s,a,o,d=v(e,t),h=t.firstChild,p=e.firstChild;e:for(;h;){for(a=h.nextSibling,n=l(h);!d&&p;){if(s=p.nextSibling,h.isSameNode&&h.isSameNode(p)){h=a,p=s;continue e}r=l(p);var m=p.nodeType,g=void 0;if(m===h.nodeType&&(1===m?(n?n!==r&&((o=S[n])?s===o?g=!1:(e.insertBefore(o,p),r?addKeyedRemoval(r):removeNode(p,e,!0),r=l(p=o)):g=!1):r&&(g=!1),(g=!1!==g&&compareNodeNames(p,h))&&morphEl(p,h)):3!==m&&8!=m||(g=!0,p.nodeValue!==h.nodeValue&&(p.nodeValue=h.nodeValue))),g){h=a,p=s;continue e}r?addKeyedRemoval(r):removeNode(p,e,!0),p=s}if(n&&(o=S[n])&&compareNodeNames(o,h))d||b(e,o),morphEl(o,h);else{var f=u(h);!1!==f&&(f&&(h=f),h.actualize&&(h=h.actualize(e.ownerDocument||i)),b(e,h),handleNodeAdded(h))}h=a,p=s}!function cleanupFromEl(e,t,n){for(;t;){var r=t.nextSibling;(n=l(t))?addKeyedRemoval(n):removeNode(t,e,!0),t=r}}(e,p,r);var _=c[e.nodeName];_&&_(e,t)}(t,n):c.TEXTAREA(t,n)}indexTree(t);var T=t,E=T.nodeType,w=n.nodeType;if(!_)if(1===E)1===w?compareNodeNames(t,n)||(g(t),T=function moveChildren(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}(t,function createElementNS(e,t){return t&&"http://www.w3.org/1999/xhtml"!==t?i.createElementNS(t,e):i.createElement(e)}(n.nodeName,n.namespaceURI))):T=n;else if(3===E||8===E){if(w===E)return T.nodeValue!==n.nodeValue&&(T.nodeValue=n.nodeValue),T;T=n}if(T===n)g(t);else{if(n.isSameNode&&n.isSameNode(T))return;if(morphEl(T,n,_),y)for(var C=0,I=y.length;C<I;C++){var A=S[y[C]];A&&removeNode(A,A.parentNode,!1)}}return!_&&T!==t&&t.parentNode&&(T.actualize&&(T=T.actualize(t.ownerDocument||i)),t.parentNode.replaceChild(T,t)),T}}(function morphAttrs(e,t){var n,r,s,i,a=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var o=a.length-1;o>=0;o--)r=(n=a[o]).name,s=n.namespaceURI,i=n.value,s?(r=n.localName||r,e.getAttributeNS(s,r)!==i&&("xmlns"===n.prefix&&(r=n.name),e.setAttributeNS(s,r,i))):e.getAttribute(r)!==i&&e.setAttribute(r,i);for(var c=e.attributes,l=c.length-1;l>=0;l--)r=(n=c[l]).name,(s=n.namespaceURI)?(r=n.localName||r,t.hasAttributeNS(s,r)||e.removeAttributeNS(s,r)):t.hasAttribute(r)||e.removeAttribute(r)}});const u=l,d="cross-origin-svg";class default_1 extends s.xI{submit(e){this.hasUpdatedFieldTarget&&(this.updatedFieldTarget.value=e.target.name),e.target.form.requestSubmit(),e.target instanceof HTMLInputElement&&"file"===e.target.type&&(e.target.value="");const t=this.hasNameValue?this.nameValue+":":"";this.dispatch(t+"submitted")}morph(e){const t=[];if(this.hasStaticFieldTarget)for(const e of this.staticFieldTargets)t.push(e.name);this.hasUpdatedFieldTarget&&t.push(this.updatedFieldTarget.value),e.detail.render=morph({skippedFieldList:t})}formSubmit(e){e.preventDefault(),this.hasSubmitterTarget?this.submitterTarget.form.requestSubmit(this.submitterTarget):e.target.submit(),this.dispatch("submitted")}}default_1.values={name:String},default_1.targets=["updatedField","staticField","submitter"];const h=default_1;function morph({skippedFieldList:e=[]}={}){return(t,n)=>u(t,n,{childrenOnly:!0,onBeforeElUpdated:(t,n)=>!(e&&e.length>0&&(t instanceof HTMLInputElement||t instanceof HTMLSelectElement)&&e.includes(t.name))&&
29!(t instanceof SVGSVGElement&&n instanceof SVGSVGElement&&t.getAttribute(`data-${d}-url-value`)===n.getAttribute(`data-${d}-url-value`))})}},1856(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{followerTargetConnected(){this.syncMaster()}toggle(){this.followerTargets.forEach(e=>{e.checked=this.masterTarget.checked})}syncMaster(){this.hasMasterTarget&&(this.masterTarget.checked=this.followerTargets.length>0&&this.followerTargets.every(e=>e.checked))}}default_1.targets=["master","follower"];const s=default_1},2992(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{connect(){this.dispatch("connected")}atLeastOneIsChecked(){const e=Array.from(this.parentTarget.querySelectorAll('input[type="checkbox"]'));e.find(e=>e.checked)?this.checkRequired(e,!1):this.checkRequired(e,!0)}checkRequired(e,t){e.forEach(e=>e.required=t)}}default_1.targets=["parent"];const s=default_1},1620(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{sync(e){this.propagate(e,!0)}syncByValue(e){this.propagate(e,!1)}propagate(e,t){const n=e.currentTarget;"checkbox"===n.type&&this.checkboxTargets.filter(e=>e!==n&&e.value===n.value&&(!t||e.name===n.name)).forEach(e=>{e.checked=n.checked})}syncAllCheckboxes(){const e=this.containerTarget.querySelectorAll('input[type="checkbox"]');0!==e.length&&e.forEach(e=>{this.getCheckboxesWithSameNameAndValue(e).forEach(t=>{t.checked!==e.checked&&(t.checked=e.checked)})})}getCheckboxesWithSameNameAndValue(e){const t=e.name,n=e.value;return Array.from(document.querySelectorAll(`input[type="checkbox"][name="${t}"][value="${n}"]`))}}default_1.targets=["checkbox","container"];const s=default_1},9817(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var r,s,i=n(2891),__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class CheckboxTreeController extends i.xI{constructor(){super(...arguments),r.add(this)}parentTargetConnected(){this.checkParentIfNeeded()}toggleAll(){this.childTargets.forEach(e=>{this.parentTarget.checked?e.checked=!0:e.checked=!1})}checkParentIfNeeded(){if(this.hasParentTarget){const e=__classPrivateFieldGet(this,r,"m",s).call(this,this.childTargets);e.length&&(this.parentTarget.checked=this.childTargets.length===e.length)}}}r=new WeakSet,s=function _CheckboxTreeController_getChildrenChecked(e){return e.filter(e=>e.checked)},CheckboxTreeController.targets=["parent","child"];const a=CheckboxTreeController}
29,9440(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{clear(){this.element.querySelectorAll("input[type=checkbox]:not([hidden]):checked").forEach(e=>e.checked=!1);const e=[];this.element.querySelectorAll("input[type=radio]:not([hidden])").forEach(t=>{e.includes(t.name)||(t.checked=!0,e.push(t.name))});this.element.querySelectorAll("input[type=range]:not([hidden])").length>0&&this.dispatch("reset-range"),this.hasAllValue&&this.allValue&&this.dispatch("clear")}}default_1.values={all:Boolean};const s=default_1},2204(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{clear(){this.hasFieldTarget&&this.fieldTargets.forEach(e=>{"checkbox"===e.type||"radio"===e.type?e.checked=!1:e.value="",this.dispatch(`${e.id}:cleared`)})}}default_1.targets=["field"];const s=default_1},9128(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(7765);const i=class extends r.xI{preventIfNotConnected(e){const[t]=s.iv;document.body.classList.contains(t)||e.preventDefault()}}},3324(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class InputChecker extends r.xI{check(){this.input=document.querySelector(this.inputValue),this.input&&(this.input.checked=!0,this.dispatch("checked",{target:this.input}))}uncheck(){this.input=document.querySelector(this.inputValue),this.input&&(this.input.checked=!1,this.dispatch("unchecked",{target:this.input}))}toggle(){this.input=document.querySelector(this.inputValue),this.input&&(this.input.checked=!this.input.checked,this.dispatch(this.input.checked?"checked":"unchecked",{target:this.input}))}}InputChecker.values={input:String};const s=InputChecker},5630(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(2891),s=n(1922),i=n(2752),a=n(4262);class default_1 extends r.xI{connect(){(0,i.Ls)(this,{events:["click","touchend","focusin"]}),this.initializeSelectedTags(),this.updateValidation()}toggle(e){null==e||e.preventDefault(),null==e||e.stopPropagation();this.isExpanded()?this.close():this.open()}open(){this.setExpanded(!0),this.focusFirstOption(),(0,a.Fr)()&&(this.triggerTarget.classList.add(this.hiddenClass),this.labelTarget.classList.add(this.hiddenClass),this.dispatch("is:mobile:opened"))}close(){this.setExpanded(!1),(0,a.Fr)()&&(this.triggerTarget.classList.remove(this.hiddenClass),this.labelTarget.classList.remove(this.hiddenClass),this.dispatch("is:mobile:closed"))}clickOutside(){(0,a.Fr)()||this.close()}select(e){const t=e.currentTarget,n=this.getOptionFromCheckbox(t);if(!n)return;const r=e.params.text,s=e.params.value;this.updateOptionState(n,t.checked),this.updateTags(t.checked,s,r),this.updateValidation()}removeTag(e){var t;const n=String(null!==(t=e.params.value)&&void 0!==t?t:"");if(!n)return;const r=this.checkboxTargets.find(e=>e.value===n);if(r){r.checked=!1;const e=this.getOptionFromCheckbox(r);e&&this.updateOptionState(e,!1)}const s=e.currentTarget;this.removeTagElement(s),this.updateValidation()}handleKeydown(e){if(!(0,a.Fr)()&&this.isExpanded())switch(e.key){case"ArrowDown":e.preventDefault(),this.navigateOptions(1);break;case"ArrowUp":e.preventDefault(),this.navigateOptions(-1);break;case"Home":e.preventDefault(),this.focusFirstOption();break;case"End":e.preventDefault(),this.focusLastOption();break;case"Escape":e.preventDefault(),this.close(),this.triggerTarget.focus();break;case"Enter":case" ":e.preventDefault(),this.toggleActiveOption();break;case"Tab":this.selectActiveOption(),this.close()}}handleTriggerKeydown(e){if(!(0,a.Fr)())switch(e.key){case"ArrowDown":case"ArrowUp":case" ":case"Enter":e.preventDefault(),this.isExpanded()||this.open(),"ArrowDown"===e.key?this.focusFirstOption():"ArrowUp"===e.key&&this.focusLastOption()}}getFocusedCheckbox(){var e;return null!==(e=this.checkboxTargets.find(e=>e===document.activeElement))&&void 0!==e?e:null}getOptionFromCheckbox(e){var t;return null!==(t=this.optionTargets.find(t=>t.contains(e)))&&void 0!==t?t:null}getCheckboxFromOption(e){var t;return null!==(t=this.checkboxTargets.find(t=>e.contains(t)))&&void 0!==t?t:null}navigateOptions(e){if(0===this.optionTargets.length)return;const t=this.getFocusedCheckbox(),n=t?this.getOptionFromCheckbox(t):null;let r=(n?this.optionTargets.indexOf(n):-1)+e;r<0?r=this.optionTargets.length-1:r>=this.optionTargets.length&&(r=0);const s=this.optionTargets[r],i=this.getCheckboxFromOption(s);null==i||i.focus(),s.scrollIntoView({block:"nearest",behavior:"smooth"}),this.updateActiveDescendant()}focusFirstOption(){this.focusOptionByIndex(0)}focusLastOption(){this.focusOptionByIndex(this.optionTargets.length-1)}focusOptionByIndex(e){if(0===this.optionTargets.length)return void this.listboxTarget.focu
29s();const t=this.optionTargets[e],n=this.getCheckboxFromOption(t);null==n||n.focus(),t.scrollIntoView({block:"nearest",behavior:"smooth"}),this.updateActiveDescendant()}toggleActiveOption(){const e=this.getFocusedCheckbox();e&&this.listboxTarget.contains(e)&&(e.checked=!e.checked,e.dispatchEvent(new Event("change",{bubbles:!0})))}selectActiveOption(){const e=this.getFocusedCheckbox();e&&this.listboxTarget.contains(e)&&!e.checked&&(e.checked=!0,e.dispatchEvent(new Event("change",{bubbles:!0})))}updateActiveDescendant(){const e=this.getFocusedCheckbox();if(e&&this.listboxTarget.contains(e)){const t=this.getOptionFromCheckbox(e);if(t)return t.id||(t.id=`option-${Date.now()}`),void this.triggerTarget.setAttribute("aria-activedescendant",t.id)}this.triggerTarget.removeAttribute("aria-activedescendant")}isExpanded(){return!this.listboxTarget.hidden}setExpanded(e){this.triggerTarget.setAttribute("aria-expanded",e.toString()),e?(this.listboxTarget.classList.remove(this.hiddenClass),this.listboxTarget.removeAttribute("hidden")):(this.listboxTarget.classList.add(this.hiddenClass),this.listboxTarget.setAttribute("hidden",""),this.updateActiveDescendant())}initializeSelectedTags(){this.checkboxTargets.filter(e=>e.checked).forEach(e=>{const t=e.getAttribute("data-multi-select-text-param"),n=e.getAttribute("data-multi-select-value-param");t&&n&&this.addTag(t,n)})}updateOptionState(e,t){e.setAttribute("aria-selected",t.toString())}updateTags(e,t,n){e?n&&this.addTag(n,t):this.removeTagByValue(t)}addTag(e,t){const n=new s.i4(this.tagTemplateTarget,{text:e,value:t});this.tagContainerTarget.append(n)}removeTagByValue(e){const t=this.tagTargets.find(t=>null!==t.querySelector(`button[data-multi-select-value-param="${e}"]`));null==t||t.remove()}removeTagElement(e){const t=this.tagTargets.find(t=>t.contains(e));null==t||t.remove()}getSelectedCount(){return this.checkboxTargets.filter(e=>e.checked).length}updateValidation(){const e=this.getSelectedCount();this.validationInputTarget.value=e>0?"filled":"";if(this.validationInputTarget.validity.valueMissing)return void this.validationInputTarget.setCustomValidity("");let t="";this.minItemsValue>0&&e<this.minItemsValue?t=`Vous devez sélectionner au moins ${this.minItemsValue} élément(s)`:this.maxItemsValue>0&&e>this.maxItemsValue&&(t=`Vous ne pouvez pas sélectionner plus de ${this.maxItemsValue} élément(s)`),this.validationInputTarget.setCustomValidity(t)}}default_1.targets=["trigger","listbox","tagContainer","tag","checkbox","validationInput","tagTemplate","option","label"],default_1.values={maxItems:{type:Number,default:0},minItems:{type:Number,default:0}},default_1.classes=["hidden"];const o=default_1},6636(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{copy(){if(this.fromTarget&&this.toTarget){const e=this.fromTarget.options[this.fromTarget.selectedIndex];e&&(this.toTarget.value=e.text)}}}default_1.targets=["from","to"];const s=default_1},6524(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(1199);class RangeController extends r.xI{connect(){this.trackStyle(),this.hasAvailableValuesValue&&this.updateValueText()}track(){this.trackStyle(),this.hasAvailableValuesValue&&(this.replaceValues(),this.updateValueText()),this.dispatch("changed")}reset(e){var t;this.inputRangeTarget.value=null!==(t=e.params.value)&&void 0!==t?t:"",this.trackStyle()}trackStyle(){const e=parseFloat(this.inputRangeTarget.min||"0"),t=parseFloat(this.inputRangeTarget.max||"100"),n=parseFloat(this.inputRangeTarget.value||"50");let r=n-e;this.reverseValue&&(r=t-n,this.inputRangeTarget.classList.add(...this.reverseClasses)),this.inputRangeTarget.style.backgroundSize=100*r/(t-e)+"% 100%",this.hasOutputRangeTarget&&(this.outputRangeTarget.value=n.toString())}replaceValues(){null!=this.getRangeIndexByCurrentValue()&&(this.hiddenInputTarget.value=String(this.getRangeIndexByCurrentValue()))}getRangeIndexByCurrentValue(){const e=Number(this.inputRangeTarget.max);if(!Array.isArray(this.availableValuesValue)||this.availableValuesValue.length!==e+1)return void s.wd(`[hw-custom] Tableau des vraies valeurs : "${JSON.stringify(this.availableValuesValue)}",\n Valeur minimum du bouton range : "${this.inputRangeTarget.min}",\n Valeur maximum du bouton range : "${e}"`,"error");const t=+this.inputRangeTarget.value;return this.availableValuesValue[t]}updateValueText(){const e=+this.inputRangeTarget.value,t=this.availableValuesValue[e];if(void 0!==t){const e=this.unitValue?`${t} ${this.unitValue}`:`${t}`;this.inputRangeTarget.setAttribute("aria-valuetext",e)}}}RangeController.targets=["inputRange","outputRange","hiddenInput"],RangeController.values={reverse:{type:Boolean,default:!1},availableValues:{type:Array},unit:{type:String,default:""}},RangeController.classes=["reverse"];const i=RangeController},4275(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);const s=class extends r.xI{constructor(){super(...arguments),this.navigationChars=["Backspace","ArrowUp","ArrowRight","ArrowDown","ArrowLeft","Tab","PageDown","PageUp","Home","End","Delete","F5","F12"],this.replacePointByComma=e=>{const t=e.target;if(t){const e=t.selectionEnd+1;let n=t.value.split("");n.splice(t.selectionStart,0,","),t.value=n.join(""),t.setSelectionRange(e,e)}}}onlyDouble(e){["0","1","2","3","4","5","6","7","8","9",","," ",...this.navigationChars].includes(e.ke
29y)||e.preventDefault();const t=e.target,n=t.value.length>0&&-1===t.value.indexOf(",");","!==e.key||n||e.preventDefault(),"."===e.key&&n&&this.replacePointByComma(e)}onlyDigit(e){["0","1","2","3","4","5","6","7","8","9",...this.navigationChars].includes(e.key)||e.preventDefault()}maxHoursValue(e){const t=parseInt(e.currentTarget.value);!isNaN(t)&&t>23&&(e.currentTarget.value="23")}maxMinutesValue(e){const t=parseInt(e.currentTarget.value);!isNaN(t)&&t>59&&(e.currentTarget.value="59")}}},9612(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{constructor(){super(...arguments),this.chunks="",this.observer=null}async connect(){this.depsPromise=Promise.all([n.e(418).then(n.bind(n,9418)),n.e(758).then(n.bind(n,1758))]).then(([e,t])=>({domPurify:e.default,streamingMarkdown:t}));const e=await this.depsPromise,t=e.streamingMarkdown.default_renderer(this.containerTarget);this.parser=e.streamingMarkdown.parser(t),this.observer=new MutationObserver(e=>{var t;for(const n of e)for(const e of n.addedNodes)if(e instanceof HTMLTemplateElement){if("close"===e.dataset.stream)return e.remove(),void this.close();this.stream(null!==(t=e.content.textContent)&&void 0!==t?t:""),e.remove()}});const r=this.element.parentElement,s=r.querySelectorAll("template");s.length&&s.forEach(e=>{var t;this.stream(null!==(t=e.content.textContent)&&void 0!==t?t:"")}),this.observer.observe(r,{childList:!0})}async stream(e){const t=await this.depsPromise;if(this.chunks+=e,t.domPurify.sanitize(this.chunks),t.domPurify.removed.length)return t.streamingMarkdown.parser_end(this.parser),void this.terminate();t.streamingMarkdown.parser_write(this.parser,e)}async close(){(await this.depsPromise).streamingMarkdown.parser_end(this.parser),this.terminate()}terminate(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.observer=null}disconnect(){this.terminate()}}default_1.targets=["container"];const s=default_1},5578(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(1830);class default_1 extends r.xI{androidTargetConnected(e){"ios"==(0,s.D)()&&e.remove()}iosTargetConnected(e){"android"==(0,s.D)()&&e.remove()}}default_1.targets=["android","ios"];const i=default_1},2699(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{constructor(){super(...arguments),this.pointerDownedOutside=!1,this.showDialog=()=>{this.dialogTarget.open||this.toggleTarget.checked&&this.dialogTarget.showModal()}}connect(){this.toggleTarget.checked&&this.open()}open(){var e,t;(null===(t=null===(e=window.HelloworkCookieConsent)||void 0===e?void 0:e.isModalOpen)||void 0===t?void 0:t.call(e))?document.addEventListener("cookieConsentModalClosed",this.showDialog,{once:!0}):this.showDialog()}disconnect(){document.removeEventListener("cookieConsentModalClosed",this.showDialog)}close(){this.dialogTarget.open&&this.dialogTarget.close()}handleCancel(){this.dismiss()}handlePointerDown(e){this.pointerDownedOutside=!this.contentTarget.contains(e.target)}handleBackdropClick(e){this.pointerDownedOutside&&(this.contentTarget.contains(e.target)||(this.close(),this.dismiss()))}dismiss(){this.toggleTarget.checked=!1,this.dispatch("discarded",{prefix:"modal"})}}default_1.targets=["dialog","toggle","content"];const s=default_1},29(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{dispatchDiscardedEvent(){this.dispatch("discarded")}setPendingUrl(e){this.pendingUrl=e}navigateToNextPage(){this.pendingUrl?(this.dispatch("navigate-to-next-page"),window.location.href=this.pendingUrl):this.hasHistoryOutlet?this.historyOutlet.back():console.error("No pending URL set and no history outlet available.")}handleFormSubmit(){this.hasFormValidatorOutlet&&(this.formValidatorOutlet.buttonTarget.click(),this.dispatch("form-submitted"))}}default_1.outlets=["form-validator","history"];const s=default_1},1395(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(7765);class default_1 extends r.xI{async connect(){null===document.querySelector("[data-fetch-account-data-target=offersInPage]")&&console.error('Error Stimulus: data-fetch-account-data-target="offersInPage" missing'),await this.highlight()}async highlight(){const e=await(0,s.yn)();if(e.IsAuthenticated){const t=e.Bookmarks.includes(this.offerIdValue);let n;t?(n=this.bookmarkedIconValue,this.buttonTarget.classList.add(this.bookmarkedClass)):(n=this.unbookmarkedIconValue,this.buttonTarget.classList.remove(this.bookmarkedClass)),this.buttonTarget.setAttribute("data-analytics-values-param",this.updatedAnalytics(t)),this.iconTarget.setAttribute("href",n)}}updatedAnalytics(e){const t=JSON.parse(this.buttonTarget.getAttribute("data-analytics-values-param"));return t.EventName=e?"bookmark_delete":"bookmark_add",JSON.stringify(t)}}default_1.targets=["icon","button"],default_1.classes=["bookmarked"],default_1.values={offerId:String,bookmarkedIcon:String,unbookmarkedIcon:String};const i=default_1}
29,9686(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(2891);function checkIfDigitAndLength(e,t){return new RegExp(`^[0-9]{${t}}$`).test(e)}var s,i,a,o,__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class OtpController extends r.xI{constructor(){super(...arguments),s.add(this)}copyToFormInput(){this.formInputTarget.value=this.inputTargets.map(e=>e.value).join("")}handleInput(e){__classPrivateFieldGet(this,s,"m",i).call(this);const t=e.target;t.value.length>1?__classPrivateFieldGet(this,s,"m",a).call(this,t.value):this.validInputFormatOrClear(e),this.copyToFormInput(),__classPrivateFieldGet(this,s,"m",o).call(this)}handleBackspace(e){const t=e.target;if("Backspace"!==e.key||""!==t.value)return;const n=this.inputTargets.indexOf(t);if(n<=0)return;e.preventDefault(),__classPrivateFieldGet(this,s,"m",i).call(this);const r=this.inputTargets[n-1];r.value="",r.focus(),this.copyToFormInput()}validInputFormatOrClear(e){const t=e.target;1===t.value.length&&""!=t.value&&checkIfDigitAndLength(t.value,1)?this.dispatch("validInputFormat"):t.value=""}paste(e){e.preventDefault();const t=e.clipboardData.getData("text").trim();if(!checkIfDigitAndLength(t,this.inputTargets.length))return;__classPrivateFieldGet(this,s,"m",i).call(this);const n=t.split("");this.inputTargets.forEach((e,t)=>{e.value=n[t]}),this.formInputTarget.value=t,__classPrivateFieldGet(this,s,"m",o).call(this)}}s=new WeakSet,i=function _OtpController_resetAriaInvalid(){this.inputTargets.forEach(e=>e.setAttribute("aria-invalid","false"))},a=function _OtpController_distributeCode(e){const t=e.replace(/\D/g,"").slice(0,this.inputTargets.length).split("");this.inputTargets.forEach((e,n)=>{var r;return e.value=null!==(r=t[n])&&void 0!==r?r:""})},o=function _OtpController_submitIfComplete(){this.hasSubmitTarget&&checkIfDigitAndLength(this.formInputTarget.value,this.inputTargets.length)&&this.submitTarget.click()},OtpController.targets=["formInput","input","submit"];const c=OtpController},9841(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(4512);class default_1 extends r.xI{track(){const e=window.location.search;if(!e)return;const t=new URLSearchParams(e),n=this.cookiesListValue.split(",");for(const e of t.keys())if(n.includes(e)){const n=t.get(e);(0,s.z_)(e,n,60)}}}default_1.values={cookiesList:String};const i=default_1},2452(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class HistoryController extends r.xI{connect(){const e=document.referrer;if(e&&!this.isSameHref(e))return sessionStorage.setItem(this.storageKey,e),this.refererURL=new URL(e),void(this.refererIsLive=!0);const t=sessionStorage.getItem(this.storageKey);this.refererURL=t?new URL(t):null,this.refererIsLive=!1}get storageKey(){return`history-referer:${window.location.pathname}`}redirect(){window.location.href=!this.refererURL||this.isSameHref(this.refererURL.href)||!this.isSameOrigin(this.refererURL.origin)||this.isExcluded()?this.defaultUrlValue:this.refererURL.href}back(){this.refererURL&&!this.isSameHref(this.refererURL.href)&&this.isSameOrigin(this.refererURL.origin)&&!this.isExcluded()?this.refererIsLive?history.length>1?history.back():window.location.href=this.defaultUrlValue:window.location.href=this.refererURL.href:window.location.href=this.defaultUrlValue}isExcluded(){var e,t;const n=null!==(t=null===(e=this.refererURL)||void 0===e?void 0:e.href)&&void 0!==t?t:"";return n.includes("bienvenue")||n.includes("/lp/")}isSameOrigin(e){return e===window.location.origin}isSameHref(e){const t=new URL(e),n=new URL(window.location.href);return t.origin===n.origin&&t.pathname===n.pathname}}HistoryController.values={defaultUrl:String};const s=HistoryController},7767(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{connect(){this.redirectOnConnectValue&&this.redirectTo()}redirectTo(){this.urlValue&&setTimeout(()=>{window.location.href=this.urlValue},this.timeoutValue)}openInNewTab(){this.externalUrlValue&&window.open(this.externalUrlValue,"_blank","noopener")}}default_1.values={redirectOnConnect:{type:Boolean,default:!1},url:String,externalUrl:String,timeout:{type:Number,default:0}};const s=default_1},1510(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);const s=class extends r.xI{reload({params:{isAnchorRemoved:e}}){const t=new URL(window.location.href);e&&t.hash&&(t.hash=""),window.location.href=t.toString()}}}
29,3790(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(4512);const i=class extends r.xI{async connect(){(0,s.v9)()&&await this.start()}async start(){var e,t;this.screeb=await this.importScreeb(),null===(e=this.screeb)||void 0===e||e.load(),null===(t=this.screeb)||void 0===t||t.init("3fcee497-d845-4f84-b5a7-e416e26fe1e0")}async updateImport(e){if(e.detail.hasAccepted)await this.start();else{const e=document.querySelector('script[src*="screeb"]');e&&e.remove(),this.screeb=null}}async importScreeb(){var e;const t=await this.screebIsImported();if(!this.screeb&&!t){const t=await n.e(371).then(n.bind(n,371)),r=null!==(e=t.default)&&void 0!==e?e:t;this.screeb=r}return this.screeb}screebIsImported(){return!!document.querySelector('script[src*="screeb"]')}}},8834(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(89);class default_1 extends r.xI{constructor(){super(...arguments),this.source=null}connect(){this.source=new EventSource(this.urlValue),(0,s.K)(this.source),this.source.addEventListener("message",e=>{e.data.includes("\x3c!-- stream-end --\x3e")&&setTimeout(()=>this.closeSource(),100)})}disconnect(){this.closeSource()}closeSource(){this.source&&((0,s.QS)(this.source),this.source.close(),this.source=null)}}default_1.values={url:String};const i=default_1},891(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(1922);class default_1 extends r.xI{constructor(){super(...arguments),this.displayErrorToastMessage=(e,t)=>{const n=new s.i4(this.errorTemplateTarget,{title:e,message:t});this.turboStreamToastMessageTarget.append(n)}}display({params:e}){var t,n;const r=document.getElementById(e.id),s=null===(t=null==r?void 0:r.content)||void 0===t?void 0:t.firstElementChild;s&&(null===(n=this.turboStreamToastMessageTarget)||void 0===n||n.appendChild(s.cloneNode(!0)))}}default_1.targets=["turboStreamToastMessage","errorTemplate"];const i=default_1},4817(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(2891),s=n(7765),i=n(1199);const a=class extends r.xI{connect(){this.dispatch("connected")}push(e){e.params.values&&(Array.isArray(e.params.values)?e.params.values.forEach(e=>{this.updateAndPushEvent(e)}):this.updateAndPushEvent(e.params.values))}async updateAndPushEvent(e){const t=await(0,s.yn)();t.IsAuthenticated?(e.user_logged_in=!0,e.user_id_back=t.Id,t.Id||i.wd(`[hw-custom] Identifiant utilisateur nul : Id="${t.Id}", Event="${JSON.stringify(e)}"`,"error")):e.user_logged_in=!1,window.dataLayer.push(e)}}},3593(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(7765);const i=class extends r.xI{async identify(){var e;const t=await(0,s.yn)();t.Email&&t.Id&&(null===(e=window.tracker)||void 0===e?void 0:e.identify)&&window.tracker.identify(t.Email,t.Id)}}},6296(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class TruncateTextController extends r.xI{constructor(){super(...arguments),this.isExpanded=!1}connect(){this.shouldCollapseOnConnectValue&&this.collapse(),this.checkIfTruncationNeeded()}toggle(){this.isExpanded?this.collapse():this.expand()}expand(){this.removeLineClampClasses(this.contentTarget),this.toggleButtonTarget.textContent=this.showLessTextValue,this.toggleButtonTarget.setAttribute("aria-expanded","true"),this.isExpanded=!0}collapse(){this.restoreOriginalLineClampClasses(this.contentTarget),this.toggleButtonTarget.textContent=this.showMoreTextValue,this.toggleButtonTarget.setAttribute("aria-expanded","false"),this.isExpanded=!1}checkIfTruncationNeeded(){this.contentTarget.scrollHeight>this.contentTarget.clientHeight?this.toggleButtonTarget.classList.remove(...this.hiddenClasses):this.toggleButtonTarget.classList.add(...this.hiddenClasses)}removeLineClampClasses(e){e.classList.remove(...this.lineClampClasses)}restoreOriginalLineClampClasses(e){e.classList.add(...this.lineClampClasses)}}TruncateTextController.targets=["content","toggleButton"],TruncateTextController.values={showMoreText:String,showLessText:String,shouldCollapseOnConnect:Boolean},TruncateTextController.classes=["hidden","lineClamp"];const s=TruncateTextController},6368(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(2891),s=n(1922);const i=/[a-z]/gi;function rot13(e){return e.replace(i,rot13OneLetter)}function rot13OneLetter(e){const t=e.charCodeAt(0),n=e.toLowerCase()>"m";return String.fromCharCode(n?t-13:t+13)}var a=n(1199);class default_1 extends r.xI{constructor(){super(...arguments),this.MAX_TEMPLATES=3,this.handleFrameMissing=e=>{const t=e.target;if(a.wd(`[hw-custom] Turbo frame non chargée : "${t.id}"`,"error"),this.hasExcludedTarget&&this.excludedTargets.includes(t))return;e.preventDefault();const n=function encryptLink(e){return function rot13ToEncryptedLink(e){return`x${e.replaceAll(".","=pt=")}f`}(rot13(e))}(this.getCurrentUrlWithoutHash()),r=new s.i4(this.templateTarget,{title:"Oups !",message:"Nous rencontrons un problème.",link:n,linkLabel:"Recharger la page"});this.instanceTargets.length>=this.MAX_TEMPLATES&&this.instanceTargets[0].remove(),this.containerTarget.append(r)}}getCurrentUrlWithoutHash(){const e=new URL(window.location.href);return e.hash&&(e.hash=""),e.toString()}}default_1.targets=["template","container","excluded","instance"];const o=default_1}
29,4367(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(5359);const i=class extends r.xI{check(e){var t,n,r;const i=null!==(r=null===(n=null===(t=e.target)||void 0===t?void 0:t.closest("turbo-frame"))||void 0===n?void 0:n.id)&&void 0!==r?r:null;i&&(0,s.y)(i,3e4)||this.dispatch("unsent")}}},6857(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);const s=class extends r.xI{clear(){this.element.innerHTML="",this.element.removeAttribute("complete"),this.element.removeAttribute("src")}}},8133(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(5359);class UpdateTurboSrcController extends r.xI{forceUpdate(e){if(!this.hasTurboFrameTarget)return;if(!this.endpointValue)return;if(this.isPageTransitionEvent(e)&&!e.persisted)return;this.turboFrameTarget.id&&(0,s.x)(this.turboFrameTarget.id),this.turboFrameTarget.setAttribute("src","");const t=this.queryParamsValue||{},n=Object.assign(Object.assign({},t),{ts:Date.now().toString()}),r=this.appendQueryParams(this.endpointValue,n);this.turboFrameTarget.setAttribute("src",r)}update({params:{url:e,queryParams:t={}}}){let n;if(this.hasTurboFrameTarget?n=this.turboFrameTarget:this.turboFrameIdValue&&(n=document.querySelector(`#${this.turboFrameIdValue}`)),!n)return;const r=e||this.endpointValue;if(!r)return;const s=this.appendQueryParams(r,t);n.setAttribute("src",s)}clearSrc(){this.hasTurboFrameTarget&&(this.turboFrameTarget.setAttribute("src",""),this.turboFrameTarget.replaceChildren())}updateFromAutocompleteSuggestion(e){const t=e.detail.id;if(!this.hasTurboFrameTarget||!this.endpointValue||!t)return;const n=new URLSearchParams({uri:t}),r=decodeURIComponent(`${this.endpointValue}?${n.toString()}`);this.turboFrameTarget.setAttribute("src",r)}clearFrame(){this.hasTurboFrameTarget&&this.endpointValue&&this.turboFrameTarget.setAttribute("src",this.endpointValue)}appendQueryParams(e,t){if(0===Object.keys(t).length)return e;const n=new URL(e,window.location.origin);return Object.entries(t).forEach(([e,t])=>{n.searchParams.append(e,t.toString())}),n.toString()}isPageTransitionEvent(e){return Boolean(e&&"persisted"in e)}}UpdateTurboSrcController.targets=["turboFrame"],UpdateTurboSrcController.values={endpoint:String,urlParam:String,queryParams:Object,turboFrameId:String};const i=UpdateTurboSrcController},1446(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{async start(){const{WidgetInstance:e,localizations:t}=await n.e(395).then(n.bind(n,395)),r={sitekey:this.siteKeyValue,language:t.fr,solutionFieldName:this.fieldNameValue,doneCallback:this.doneCallback.bind(this)};new e(this.widgetTarget,r).start()}doneCallback(){this.dispatch("done")}}default_1.values={siteKey:{type:String},fieldName:{type:String}},default_1.targets=["widget"];const s=default_1},3532(e,t,n){"use strict";n.r(t),n.d(t,{ACCOUNT_CREATION_SUCCESS:()=>s,default:()=>i});var r=n(2891);const s="accountCreationSuccess";class default_1 extends r.xI{connect(){document.addEventListener(s,e=>{this.innerTextTarget.innerText=e.detail.userEmail})}}default_1.targets=["innerText"];const i=default_1},6947(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(2891);const s=2097152,i=[".rtf"," .dot",".doc",".docx",".pdf",".odt",".wpd",".ods",".gif",".png",".jpg",".jpeg",".bmp"];var a=n(9209);class default_1 extends r.xI{connect(){this.dispatch("connected")}checkFileWithToast(){this.hasDisplayToastMessageOutlet&&this.validateFileWithToast()}check(){this.reset(),this.validateFileInline()}validateFileWithToast(){this.validateFile((e,t)=>{this.displayToastMessageOutlet.displayErrorToastMessage(e,t)})}validateFileInline(){this.validateFile((e,t,n)=>{this.showError(n)})}validateFile(e){const t=this.inputTarget.files[0];!function checkFormat(e,t){t=null!=t?t:i;const n=e.name.split(".").pop();return t.includes(`.${n.toLowerCase()}`)}(t,this.getAcceptedFormats())?e(a.A.CV_UPLOADER.TOAST_FORMAT_ERROR_TITLE,a.A.CV_UPLOADER.TOAST_FORMAT_ERROR_MESSAGE,a.A.CV_UPLOADER.FORMAT_ERROR):!function checkSize(e,t){return t=null!=t?t:s,isNaN(t)&&(t=s),e.size<=t}(t,this.getMaxSize())?e(a.A.CV_UPLOADER.TOAST_SIZE_ERROR_TITLE,a.A.CV_UPLOADER.TOAST_SIZE_ERROR_MESSAGE,a.A.CV_UPLOADER.SIZE_ERROR):this.dispatch("valid",{target:this.inputTarget})}showError(e){var t;this.errorTarget.classList.replace(this.hiddenClass,this.displayClass),null===(t=this.titleTarget)||void 0===t||t.classList.add(...this.errorClasses),this.messageTarget.textContent=e}reset(){this.hasErrorTarget&&this.errorTarget.classList.replace(this.displayClass,this.hiddenClass),this.hasTitleTarget&&this.titleTarget.classList.remove(...this.errorClasses)}getAcceptedFormats(){var e;return null===(e=this.inputTarget.attributes.getNamedItem("accept"))||void 0===e?void 0:e.value.split(",")}getMaxSize(){var e;return Number.parseInt(null===(e=this.inputTarget.attributes.getNamedItem("max-size"))||void 0===e?void 0:e.value)}}default_1.targets=["input","error","message","title"],default_1.classes=["error","display","hidden"],default_1.outlets=["display-toast-message"];const o=default_1}
29,7846(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891);const s=["INPUT","SELECT","TEXTAREA"];function isFormInputElement(e){return e instanceof HTMLElement&&s.includes(e.nodeName)}class default_1 extends r.xI{onSubmit(e){this.dispatchFormEvent("valid-form"),this.formTarget.checkValidity()?this.deactivateSubmitButton():(e.preventDefault(),this.focusFirstInvalidInput())}validateVisibleInputs(e){this.dispatchFormEvent("valid-form");const t=Array.from(this.formTarget.elements).find(e=>isFormInputElement(e)&&e.offsetHeight>0&&!e.checkValidity());if(t)return e.preventDefault(),t.focus(),void this.dispatch("invalid");this.dispatch("valid"),this.deactivateSubmitButton()}resetValidation(e){(null==e?void 0:e.target)instanceof Node&&!e.target.contains(this.element)||this.dispatchFormEvent("reset-form")}dispatchFormEvent(e){this.hasFormTarget&&this.formTarget.id&&window.dispatchEvent(new CustomEvent(`${e}:${this.formTarget.id}`))}deactivateSubmitButton(){this.hasTextTarget&&this.hasHideClass&&this.textTargets.forEach(e=>{e.classList.add(this.hideClass)}),this.hasLogoTarget&&this.hasShowClass&&this.logoTargets.forEach(e=>{e.classList.replace(this.hideClass,this.showClass)}),this.hasButtonTarget&&this.hasDisabledClass&&this.buttonTargets.forEach(e=>{e.classList.add(this.disabledClass)})}activateSubmitButton(){this.hasTextTarget&&this.hasHideClass&&this.textTargets.forEach(e=>{e.classList.remove(this.hideClass)}),this.hasLogoTarget&&this.hasShowClass&&this.logoTargets.forEach(e=>{e.classList.replace(this.showClass,this.hideClass)}),this.hasButtonTarget&&this.hasDisabledClass&&this.buttonTargets.forEach(e=>{e.classList.remove(this.disabledClass)})}focusFirstInvalidInput(){const e=Array.from(this.formTarget.elements).find(e=>isFormInputElement(e)&&!e.checkValidity());null==e||e.focus()}}default_1.targets=["form","logo","text","button"],default_1.classes=["show","hide","disabled"];const i=default_1},4414(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>p});var r,s=n(2891),i=n(9209);!function(e){e.ActivityFields="activityFields",e.Availability="availability",e.CGU="cgu",e.MODALITES="modalites",e.CompaniesAllCheckded="companiesAllChecked",e.Contracts="contracts",e.ContractsAllChecked="contractsAllChecked",e.Country="country",e.Date="date",e.Email="email",e.EmploymentStatus="employmentStatus",e.Experience
29="experience",e.FirstName="firstname",e.Job="job",e.JobAndDomain="jobsAndDomain",e.LanguageAutocomplete="languageAutocomplete",e.LastName="lastname",e.Location="location",e.MultipleJobs="multipleJobs",e.MultipleLocations="multipleLocations",e.Number="number",e.NumericMajority="numericMajority",e.OneTimePassword="oneTimePassword",e.Password="password",e.PhoneNumber="phoneNumber",e.Qualification="qualification",e.Resume="resume",e.SalaryExpectations="salaryExpectations",e.Situation="situation",e.TextArea="textArea",e.UserCriteria="userCriteria",e.WorkingPermit="workingPermit",e.ZipCode="zipCode",e.ReferentFirstName="referentFirstname",e.ReferentLastName="referentLastname",e.ReferentEmail="referentEmail"}(r||(r={}));const a={[r.ActivityFields]:i.A.VALUE_MISSING.ACTIVITY_FIELDS,[r.Availability]:i.A.VALUE_MISSING.AVAILABILITY,[r.CGU]:i.A.VALUE_MISSING.CGU,[r.MODALITES]:i.A.VALUE_MISSING.MODALITES,[r.Contracts]:i.A.VALUE_MISSING.CONTRACTS,[r.Country]:i.A.VALUE_MISSING.COUNTRY,[r.Email]:i.A.VALUE_MISSING.EMAIL,[r.EmploymentStatus]:i.A.VALUE_MISSING.EMPLOYMENT_STATUS,[r.Experience]:i.A.VALUE_MISSING.EXPERIENCE,[r.FirstName]:i.A.VALUE_MISSING.FIRSTNAME,[r.Job]:i.A.VALUE_MISSING.JOB,[r.JobAndDomain]:i.A.VALUE_MISSING.JOB_AND_DOMAIN,[r.LanguageAutocomplete]:i.A.VALUE_MISSING.LANGUAGE_AUTOCOMPLETE,[r.LastName]:i.A.VALUE_MISSING.NAME,[r.Location]:i.A.VALUE_MISSING.LOCALITY,[r.MultipleJobs]:i.A.VALUE_MISSING.JOB_MULTIPLE,[r.MultipleLocations]:i.A.VALUE_MISSING.LOCALITY_MULTIPLE,[r.Number]:i.A.PATTERN_MISSMATCH.NUMBER,[r.NumericMajority]:i.A.VALUE_MISSING.NUMERIC_MAJORITY,[r.OneTimePassword]:i.A.VALUE_MISSING.OTP,[r.Qualification]:i.A.VALUE_MISSING.QUALIFICATION,[r.Resume]:i.A.VALUE_MISSING.RESUME,[r.SalaryExpectations]:i.A.VALUE_MISSING.SALARY_EXPECTATIONS,[r.Situation]:i.A.VALUE_MISSING.SITUATION,[r.UserCriteria]:i.A.VALUE_MISSING.USER_CRITERIA,[r.WorkingPermit]:i.A.VALUE_MISSING.WORKING_PERMIT,[r.ReferentFirstName]:i.A.VALUE_MISSING.REFERENT_FIRSTNAME,[r.ReferentLastName]:i.A.VALUE_MISSING.REFERENT_LASTNAME,[r.ReferentEmail]:i.A.VALUE_MISSING.REFERENT_EMAIL},o={[r.Email]:i.A.PATTERN_MISSMATCH.EMAIL,[r.ReferentFirstName]:i.A.PATTERN_MISSMATCH.REFERENT_FIRSTNAME,[r.ReferentLastName]:i.A.PATTERN_MISSMATCH.REFERENT_LASTNAME,[r.ReferentEmail]:i.A.PATTERN_MISSMATCH.REFERENT_EMAIL,[r.Number]:i.A.PATTERN_MISSMATCH.NUMBER,[r.OneTimePassword]:i.A.PATTERN_MISSMATCH.OTP,[r.Password]:i.A.PATTERN_MISSMATCH.PASSWORD,[r.PhoneNumber]:i.A.PATTERN_MISSMATCH.PHONE,[r.TextArea]:i.A.PATTERN_MISSMATCH.DEFAULT,[r.ZipCode]:i.A.PATTERN_MISSMATCH.ZIP_CODE},c={[r.OneTimePassword]:i.A.TOO_SHORT.OTP,[r.TextArea]:i.A.TOO_SHORT.DEFAULT},l={[r.TextArea]:i.A.TOO_LONG.DEFAULT},u={[r.CompaniesAllCheckded]:i.A.CUSTOM_ERROR.COMPANIES_ALL_CHECKED,[r.ContractsAllChecked]:i.A.CUSTOM_ERROR.CONTRACTS_ALL_CHECKED};function getMessageFromErrorAndInput(e,t){var n,s,d,h,p;return e.valueMissing?null!==(n=a[t])&&void 0!==n?n:function getRandomErrorMessage(){const{RANDOMS:e}=i.A.VALUE_MISSING;return e[Math.floor(Math.random()*e.length)]}():e.patternMismatch?null!==(s=o[t])&&void 0!==s?s:i.A.PATTERN_MISSMATCH.DEFAULT:e.tooShort?null!==(d=c[t])&&void 0!==d?d:i.A.TOO_SHORT.DEFAULT:e.tooLong?null!==(h=l[t])&&void 0!==h?h:i.A.TOO_LONG.DEFAULT:e.rangeOverflow&&"date"===t?i.A.DATE.MAX_DATE:e.customError&&t===r.TextArea?null!==(p=o[t])&&void 0!==p?p:i.A.PATTERN_MISSMATCH.DEFAULT:e.customError?u[t]:i.A.DEFAULT}function getMessageFromErrorAndInputOld(e,t,n){switch(!0){case e.valueMissing:return function onValueMissingOld(e){switch(e){case"Firstname":return i.A.VALUE_MISSING.FIRSTNAME;case"Name":return i.A.VALUE_MISSING.NAME;case"Email":return i.A.VALUE_MISSING.EMAIL;case"Resume":return i.A.VALUE_MISSING.RESUME;case"job_autocomplete":case"Job.Uri":return i.A.VALUE_MISSING.JOB;case"job_autocomplete-multiple":return i.A.VALUE_MISSING.JOB_MULTIPLE;case"locality_autocomplete":case"Location.Uri":case"Location.DisplayLabel":return i.A.VALUE_MISSING.LOCALITY;case"location-autocomplete-multiple":return i.A.VALUE_MISSING.LOCALITY_MULTIPLE;case"Contracts":return i.A.VALUE_MISSING.CONTRACTS;case"job_domain_autocomplete":return i.A.VALUE_MISSING.JOB_AND_DOMAIN;case"OneTimePassword":return i.A.VALUE_MISSING.OTP;default:return`${i.A.VALUE_MISSING.RANDOMS[Math.floor(Math.random()*i.A.VALUE_MISSING.RANDOMS.length)]}`}}(t);case e.patternMismatch:return onPatternMismatchOld(t);case e.tooShort:return function onTooShortOld(e){if("OneTimePassword"===e)return i.A.TOO_SHORT.OTP;return i.A.TOO_SHORT.DEFAULT}(t);case e.customError:if("textarea"===n)return onPatternMismatchOld(t);break;default:return i.A.DEFAULT}}function onPatternMismatchOld(e){switch(e){case"Email":return i.A.PATTERN_MISSMATCH.EMAIL;case"Password":return i.A.PATTERN_MISSMATCH.PASSWORD;case"PhoneNumber":return i.A.PATTERN_MISSMATCH.PHONE;case"CandidateZipCode":return i.A.PATTERN_MISSMATCH.ZIP_CODE;case"OneTimePassword":return i.A.PATTERN_MISSMATCH.OTP;default:return i.A.PATTERN_MISSMATCH.DEFAULT}}var d,h,__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class default_1 extends s.xI{constructor(){super(...arguments),d.add(this),this.specificInputCustomError=[r.TextArea,r.ContractsAllChecked,r.CompaniesAllCheckded]}checkValidity(){const e=this.inputTargets.find(e=>"TEXTAREA"===e.nodeName);e&&this.setTextareaValidityState(e),this.hasInvalidWhenAllCheckedValue&&__classPrivateFieldGet(this,d,"m",h).call(this,this.invalidWhenAllCheckedValue);const t=this.inputTargets.find(e=>!e.checkValidity());t&&(t.offsetHeight>0||this.forceValue)?this.showError(t):this.hideError()}showError(e){if(this.errorTarget.classList.replace(this.hideErrorClass,this.showErrorClass),this.hasLabelTarget&&this.labelTarget.classList.add(...this.labelErrorClasses),this.containerTargets.length>
290&&this.containerTargets.forEach(e=>{e.classList.add(...this.containerErrorClasses)}),e.validity.customError&&e.validationMessage&&this.specificInputCustomError.every(e=>this.inputTypeValue!==e))this.errorMessageTarget.textContent=e.validationMessage;else if(this.hasInputTypeValue){const t=function getEnumFromValue(e){return Object.values(r).includes(e)?e:void 0}(this.inputTypeValue);this.errorMessageTarget.textContent=getMessageFromErrorAndInput(e.validity,t)}else this.errorMessageTarget.textContent=getMessageFromErrorAndInputOld(e.validity,e.name,e.type)}hideError(){this.errorTarget.classList.replace(this.showErrorClass,this.hideErrorClass),this.hasLabelTarget&&this.labelTarget.classList.remove(...this.labelErrorClasses),this.containerTargets.length>0&&this.containerTargets.forEach(e=>{e.classList.remove(...this.containerErrorClasses)}),this.errorMessageTarget.textContent=""}setTextareaValidityState(e){new RegExp("[<>]|(%3C)|(%3E)|(<)|(>)").test(e.value)?e.setCustomValidity("erreur : chevrons non autorisés"):e.setCustomValidity("")}}d=new WeakSet,h=function _default_1_setInvalidWhenAllChecked(e){if(e){this.inputTargets.filter(e=>e.checked).length===this.inputTargets.length?this.inputTargets.forEach(e=>{e.setCustomValidity("erreur : tous les éléments cochés")}):this.inputTargets.forEach(e=>{e.setCustomValidity("")})}},default_1.values={force:{type:Boolean,default:!1},inputType:String,invalidWhenAllChecked:Boolean},default_1.targets=["input","error","errorMessage","label","container"],default_1.classes=["labelError","showError","hideError","containerError"];const p=default_1},7264(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class default_1 extends r.xI{connect(){this.checkPasswords()}checkPasswords(){const e=""!==this.oldPasswordTarget.value,t=""!==this.newPasswordTarget.value,n=e||t;this.oldPasswordTarget.required=n,this.newPasswordTarget.required=n}}default_1.targets=["oldPassword","newPassword"];const s=default_1},104(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);const s=class extends r.xI{connect(){this.unsubscribe()}unsubscribe(){var e,t;null===(t=null===(e=window.navigator)||void 0===e?void 0:e.serviceWorker)||void 0===t||t.getRegistrations().then(e=>{for(const t of e)t.unregister()})}}},1776(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(2891);class DailyWorkingHoursToolController extends r.xI{constructor(e){super(e),this.MILLISECONDS_IN_MINUTE=6e4,this.inputsTarget=[this.startHoursTarget,this.startMinutesTarget,this.endHoursTarget,this.endMinutesTarget,this.breakHoursTarget,this.breakMinutesTarget,this.inputDayTarget,this.workingTimeTarget]}changeOnInput(e){if(2===e.currentTarget.value.length&&this._isNumericKey(e.key)||"Enter"===e.key){this._switchToNextDay(e.currentTarget)||this.dispatch("switchToNextDay")}if(0===e.currentTarget.value.length&&"Backspace"===e.key){this._switchToPreviousDay(e.currentTarget)||this.dispatch("switchToPreviousDay")}const t=this._getResult();this.dispatch("calculated",{detail:t}),this.workingTimeTarget.value=t.toString()}updateInputField(e){const t=e?this._getResult():0;this.dispatch("calculated",{detail:t}),this.workingTimeTarget.value=t.toString()}reset(){this.startHoursTarget.value="",this.startMinutesTarget.value="",this.endHoursTarget.value="",this.endMinutesTarget.value="",this.breakHoursTarget.value="",this.breakMinutesTarget.value="",this._hideErrorState(this.breakHoursTarget,this.breakMinutesTarget),this.isNocturnal&&(this._hideMoon(),this.isNocturnal=!1),this.dispatch("calculated",{detail:0}),this.workingTimeTarget.value="0"}switchToFirstInput(){this.inputsTarget[0].focus()}switchToLastInput(){this.inputsTarget[this.inputsTarget.length-1].focus()}select(e){e.target.select()}_isNumericKey(e){return/^[0-9]$/.test(e)}_getResult(){var e,t,n,r,s,i,a,o;if(!this._validateInputs(null===(e=this.startHoursTarget)||void 0===e?void 0:e.value,null===(t=this.endHoursTarget)||void 0===t?void 0:t.value))return this.isNocturnal=!1,this._hideMoon(),0;this._hideErrorState(this.breakHoursTarget,this.breakMinutesTarget);const c=this._createTime(null===(n=this.startHoursTarget)||void 0===n?void 0:n.value,
29null===(r=this.startMinutesTarget)||void 0===r?void 0:r.value),l=this._createTime(null===(s=this.endHoursTarget)||void 0===s?void 0:s.value,null===(i=this.endMinutesTarget)||void 0===i?void 0:i.value),u=this._getBreakTimeMilliseconds(null===(a=this.breakHoursTarget)||void 0===a?void 0:a.value,null===(o=this.breakMinutesTarget)||void 0===o?void 0:o.value);return this.isNocturnal=l<c,this.isNocturnal?(this._displayMoon(),l.setDate(l.getDate()+1)):this._hideMoon(),this._isBreakTimeValid(c,l,u)?(this._calculateWorkingTime(c,l,u),this._calculateWorkingTime(c,l,u)):(this._displayErrorState(this.breakHoursTarget,this.breakMinutesTarget),0)}_createTime(e,t){return new Date(0,0,0,this._getIntValue(e),this._getIntValue(t))}_validateInputs(e,t){return""!==e&&""!==t}_calculateWorkingTime(e,t,n){return(t.getTime()-e.getTime()-n)/this.MILLISECONDS_IN_MINUTE}_isBreakTimeValid(e,t,n){return n<=t.getTime()-e.getTime()}_hideErrorState(e,t){var n,r;null===(n=e.parentElement)||void 0===n||n.classList.remove(this.inputContainerErrorClass),null===(r=t.parentElement)||void 0===r||r.classList.remove(this.inputContainerErrorClass),this.breakErrorContainerTarget.classList.add(this.hiddenClass),this.breakErrorContainerTarget.classList.remove(this.inlineFlexClass)}_displayErrorState(e,t){var n,r;null===(n=e.parentElement)||void 0===n||n.classList.add(this.inputContainerErrorClass),null===(r=t.parentElement)||void 0===r||r.classList.add(this.inputContainerErrorClass),this.breakErrorContainerTarget.classList.remove(this.hiddenClass),this.breakErrorContainerTarget.classList.add(this.inl
29ineFlexClass)}_getIntValue(e){return Number(e||"0")}_getBreakTimeMilliseconds(e,t){return(60*Number(e||"0")+Number(t||"0"))*this.MILLISECONDS_IN_MINUTE}_switchToNextDay(e){const t=this.inputsTarget.indexOf(e),n=t<this.inputsTarget.length-1;return n&&this.inputsTarget[t+1].focus(),n}_switchToPreviousDay(e){const t=this.inputsTarget.indexOf(e),n=t>0;return n&&this.inputsTarget[t-1].focus(),n}_hideMoon(){this.hasMoonTarget&&this.moonTarget.classList.add(this.hiddenClass)}_displayMoon(){this.hasMoonTarget&&this.moonTarget.classList.remove(this.hiddenClass)}}DailyWorkingHoursToolController.targets=["startErrorContainer","endErrorContainer","breakErrorContainer","startHours","startMinutes","endHours","endMinutes","breakHours","breakMinutes","moon","inputDay","workingTime"],DailyWorkingHoursToolController.classes=["inputContainerError","hidden","inlineFlex"];const s=DailyWorkingHoursToolController},3289(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(6863);class DayModeWorkingHoursToolController extends r.xI{updateResults(e){this.textHoursTarget.textContent=(0,s.tS)(e.detail),this.textDecimalsTarget.textContent=(0,s.I6)(e.detail),this.textMinutesTarget.textContent=(0,s.U1)(e.detail),0!==e.detail?this._displayResultsStyle():this._hideResultsStyle(),this.dispatch("updated")}_displayResultsStyle(){this.textHoursTarget.classList.add(this.textBoldClass),this.textHoursTarget.classList.add(this.textColorBlackClass),this.textDecimalsTarget.classList.add(this.textBoldClass),this.textDecimalsTarget.classList.add(this.textColorBlackClass),this.textMinutesTarget.classList.add(this.textBoldClass),this.textMinutesTarget.classList.add(this.textColorBlackClass),this.resultBorderTarget.classList.add(this.borderSuccessClass)}_hideResultsStyle(){this.textHoursTarget.classList.remove(this.textBoldClass),this.textHoursTarget.classList.remove(this.textColorBlackClass),this.textDecimalsTarget.classList.remove(this.textBoldClass),this.textDecimalsTarget.classList.remove(this.textColorBlackClass),this.textMinutesTarget.classList.remove(this.textBoldClass),this.textMinutesTarget.classList.remove(this.textColorBlackClass),this.resultBorderTarget.classList.remove(this.borderSuccessClass)}}DayModeWorkingHoursToolController.targets=["textHours","textDecimals","textMinutes","resultBorder","downloadButton"],DayModeWorkingHoursToolController.classes=["borderSuccess","textBold","textColorBlack"];const i=DayModeWorkingHoursToolController},8681(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(1922),s=n(2891);function getWeekNumber(e){(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));const t=new Date(Date.UTC(e.getUTCFullYear(),0,1));return[Math.ceil(((e.getTime()-t.getTime())/864e5+1)/7),e.getUTCFullYear()]}class default_1 extends s.xI{constructor(e){super(e),this.daysToDisplay=[],this.daysToHide=[],this.weeksTemplates=[],this.weekId=0,this.results=[],this.inputsDayConfiguration=[this.mondayInputTarget,this.tuesdayInputTarget,this.wednesdayInputTarget,this.thursdayInputTarget,this.fridayInputTarget,this.saturdayInputTarget,this.sundayInputTarget],this.daysToDisplay=this.inputsDayConfiguration.filter(e=>e.checked),this.daysToHide=this.inputsDayConfiguration.filter(e=>!e.checked)}connect(){this._currentWeekNumber=getWeekNumber(new Date),this._displayWeek(this._currentWeekNumber)}updateResults(e){const t=e.target;this.results.find(e=>e.key===t.id)?this.results=this.results.map(n=>n.key===t.id?{key:t.id,value:e.detail}:n):this.results.push({key:t.id,value:e.detail}),this._registerTemplate(t),this._displayResults(t)}goToPreviousWeek(){this._currentWeekNumber=function getPreviousWeekNumber(e){const[t,n]=e;let r=t-1,s=n;return r<1&&(s-=1,r=getWeekNumber(new Date(s,11,27))[0]),[r,s]}(this._currentWeekNumber),this._displayWeek(this._currentWeekNumber)}goToNextWeek(){this._currentWeekNumber=function getNextWeekNumber(e){const[t,n]=e;let r=t+1,s=n;return r>getWeekNumber(new Date(n,11,27))[0]&&(s+=1,r=1),[r,s]}(this._currentWeekNumber),this._displayWeek(this._currentWeekNumber)}daysConfigurationChanged(){this.daysToDisplay=this.inputsDayConfiguration.filter(e=>e.checked),this.daysToHide=this.inputsDayConfiguration.filter(e=>!e.checked);this.application.getControllerForElementAndIdentifier(this._currentTemplate,"weekly-working-hours-tool").updateDaysDisplayed(this.daysToDisplay,this.daysToHide)}setCurrentTemplate(e){const t=e.currentTarget;t.classList.contains(this.hiddenClass)||(this._currentTemplate=t,this._displayResults(t),this._registerTemplate(t))}inputChanged(){0===this.inputsDayConfiguration.filter(e=>e.checked).length?(this._displayDayConfigurationError(),this.saveButtonTarget.disabled=!0):(this._hideDayConfigurationError(),this.saveButtonTarget.disabled=!1)}_displayDayConfigurationError(){this.dayConfigurationErrorTarget.classList.contains(this.flexClass)||(this.dayConfigurationErrorTarget.classList.add(this.flexClass),this.daysSelectorTarget.classList.contains(this.checkboxErrorClass)||this.daysSelectorTarget.classList.add(this.checkboxErrorClass))}_hideDayConfigurationError(){this.dayConfigurationErrorTarget.classList.contains(this.flexClass)&&(this.dayConfigurationErrorTarget.classList.remove(this.flexClass),this.daysSelectorTarget.classList.contains(this.checkboxErrorClass)&&this.daysSelectorTarget.classList.remove(this.checkboxErrorClass))}_displayWeek(e){var t;const n=null===(t=this.weeksTemplates.find(t=>t.key===this._weekKey(e)))||void 0===t?void 0:t.value,r=null!=n?n:this._generateWeekTemplate(e);
29this.weeksTemplates.forEach(e=>e.value.classList.toggle(this.hiddenClass,e.value!==r)),this._currentTemplate=r,this.weekNumberTarget.textContent=`Semaine ${e[0]}`}_weekKey(e){return`week-${e[0]}-${e[1]}`}_registerTemplate(e){e&&(this.weeksTemplates.some(t=>t.value===e)||this.weeksTemplates.push({key:e.id,value:e}))}_generateWeekTemplate(e){const t=function getDaysOfWeek(e,t){const n=new Date(t,0,1),r=7*(e-1)-n.getDay()+1,s=new Date(n.setDate(n.getDate()+r));return Array.from({length:7},(e,t)=>new Date(s.getFullYear(),s.getMonth(),s.getDate()+t))}(e[0],e[1]),n={},s=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];Object.keys(t).forEach((e,r)=>{var i;n[`${s[r]}Date`]=t[r].toDateString(),n[`${s[r]}DateString`]=(i=t[r].toLocaleDateString("fr-FR",{weekday:"long",day:"numeric",month:"long",year:"numeric"})).charAt(0).toUpperCase()+i.slice(1),n[`${s[r]}Class`]=this._getClassesByDay(this.inputsDayConfiguration[r])}),n.weekNumber=e[0],n.templateId=this._weekKey(e),n.weekId=this.weekId,this.weekId++;const i=new r.i4(this.weekTarget,n),a=i.firstElementChild;return this.weeksDivTarget.prepend(i),this._registerTemplate(a),a}_getClassesByDay(e){return this.daysToDisplay.includes(e)?"":"hidden"}_displayResults(e){const t=this.results.filter(e=>e.value>0),n=t.length>=0?t.reduce((e,t)=>e+t.value,0):0;this.globalWorkingTimeTarget.value=n.toString(),this.application.getControllerForElementAndIdentifier(e,"weekly-working-hours-tool").updateGlobalResults(n)}}default_1.targets=["mondayInput","tuesdayInput","wednesdayInput","thursdayInput","fridayInput","saturdayInput","sundayInput","daysSelector","dayConfigurationError","saveButton","week","weeksDiv","weekNumber","globalWorkingTime"],default_1.classes=["hidden","flex","checkboxError"];const i=default_1},3574(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(2891),s=n(6863);class WeeklyWorkingHoursToolController extends r.xI{constructor(e){super(e),this.results=[],this.inputFiledsTargetDisplayed=[],this.inputFieldsTarget=[this.mondayInputFieldTarget,this.tuesdayInputFieldTarget,this.wednesdayInputFieldTarget,this.thursdayInputFieldTarget,this.fridayInputFieldTarget,this.saturdayInputFieldTarget,this.sundayInputFieldTarget],this.inputFiledsTargetDisplayed=this.inputFieldsTarget.filter(e=>!e.classList.contains(this.hiddenClass))}updateResults(e){const t=e.target,n=this.results.find(e=>e.key===t.id);n?n.value=e.detail:this.results.push({key:t.id,value:e.detail}),this.dispatch("updated"),this._displayResults()}updateDaysDisplayed(e,t){this.inputFiledsTargetDisplayed=[],e.forEach(e=>this._updateDayDisplay(e,!0)),t.forEach(e=>this._updateDayDisplay(e,!1)),e.forEach(e=>{const t=this[`${e.id.replace("daysConfiguration","").toLowerCase()}InputFieldTarget`];t instanceof HTMLElement&&this.inputFiledsTargetDisplayed.push(t)}),this._displayResults()}reset(){this._getAllDailyWorkingHoursControllers().forEach(e=>e.reset())}updateGlobalResults(e){0!==e?(this.globalResultsTarget.classList.add(this.flexClass),this.globalResultTextHoursTarget.textContent=(0,s.tS)(e),this.globalResultTextDecimalsTarget.textContent=(0,s.I6)(e),this.globalResultTextMinutesTarget.textContent=(0,s.U1)(e)):this.globalResultsTarget.classList.remove(this.flexClass)}switchToPreviousDay(e){const t=this._getPreviousDisplayDay(e.currentTarget);t&&this.application.getControllerForElementAndIdentifier(t,"daily-working-hours-tool").switchToLastInput()}switchToNextDay(e){const t=this._getNextDisplayDay(e.currentTarget);t&&this.application.getControllerForElementAndIdentifier(t,"daily-working-hours-tool").switchToFirstInput()}_getPreviousDisplayDay(e){const t=this.inputFiledsTargetDisplayed.indexOf(e);return t>0?this.inputFiledsTargetDisplayed[t-1]:null}_getNextDisplayDay(e){const t=this.inputFiledsTargetDisplayed.indexOf(e);return t<this.inputFiledsTargetDisplayed.length-1?this.inputFiledsTargetDisplayed[t+1]:null}_updateDayDisplay(e,t){const n=this[`${e.id.replace("daysConfiguration","").toLowerCase()}InputFieldTarget`];n instanceof HTMLElement&&(n.classList.toggle(this.hiddenClass,!t),this.application.getControllerForElementAndIdentifier(n,"daily-working-hours-tool").updateInputField(t))}_getAllDailyWorkingHoursControllers(){return this.inputFieldsTarget.map(e=>this.application.getControllerForElementAndIdentifier(e,"daily-working-hours-tool"))}_displayResults(){const e=this._calculateTotalDuration();this.dispatch("updateResults",{detail:e}),this.workingTimeTarget.value=e.toString(),this.resultTextHoursTarget.textContent=(0,s.tS)(e),this.resultTextDecimalsTarget.textContent=(0,s.I6)(e),this.resultTextMinutesTarget.textContent=(0,s.U1)(e),0!==e?this._displayResultsStyle():this._hideResultsStyle()}_calculateTotalDuration(){return this.results.reduce((e,t)=>
29e+t.value,0)}_displayResultsStyle(){this.resultTextHoursTarget.classList.add(this.textBoldClass),this.resultTextHoursTarget.classList.add(this.textColorBlackClass),this.resultTextDecimalsTarget.classList.add(this.textBoldClass),this.resultTextDecimalsTarget.classList.add(this.textColorBlackClass),this.resultTextMinutesTarget.classList.add(this.textBoldClass),this.resultTextMinutesTarget.classList.add(this.textColorBlackClass),this.resultBorderTarget.classList.add(this.borderSuccessClass)}_hideResultsStyle(){this.resultTextHoursTarget.classList.remove(this.textBoldClass),this.resultTextHoursTarget.classList.remove(this.textColorBlackClass),this.resultTextDecimalsTarget.classList.remove(this.textBoldClass),this.resultTextDecimalsTarget.classList.remove(this.textColorBlackClass),this.resultTextMinutesTarget.classList.remove(this.textBoldClass),this.resultTextMinutesTarget.classList.remove(this.textColorBlackClass),this.resultBorderTarget.classList.remove(this.borderSuccessClass)}}WeeklyWorkingHoursToolController.targets=["fridayInputField","mondayInputField","nextWeek","previousWeek","resultBorder","saturdayInputField","sundayInputField","resultTextDecimals","resultTextHours","resultTextMinutes","thursdayInputField","tuesdayInputField","wednesdayInputField","week","weekNumber","weeksDiv","globalResults","globalResultTextDecimals","globalResultTextHours","globalResultTextMinutes","workingTime"],WeeklyWorkingHoursToolController.classes=["borderSuccess","textBold","hidden","flex","textColorBlack","downloadButton"];const i=WeeklyWorkingHoursToolController},7765(e,t,n){"use strict";n.d(t,{LH:()=>i,Wp:()=>updateCache,iv:()=>s,m6:()=>updateUIFromCache,yn:()=>getAccountData});var r=n(7654);const s=["isConnected","isConnected"],i="accountDataReady",a="HW_accountDataCache";async function getAccountData(){return window._privateAccountData?Promise.resolve(window._privateAccountData):new Promise(e=>{document.addEventListener(i,()=>{e(window._privateAccountData)},{once:!0})})}function updateCache(e){if(e.IsAuthenticated){const t={IsAuthenticated:!0,FirstName:e.FirstName};(0,r.KD)(a,JSON.stringify(t))}else(0,r.n_)(a)}function updateUIFromCache(){const e=function getCachedAccountData(){return JSON.parse((0,r.lw)(a))}();(null==e?void 0:e.IsAuthenticated)?document.body.classList.add(...s):document.body.classList.remove(...s)}},7950(e,t,n){"use strict";n.d(t,{A:()=>i});const r={sm:"641px",md:"768px",lg:"951px",xl:"1025px"},s={};for(const[e,t]of Object.entries(r))s[e]=`(min-width: ${t})`;const i=s},4512(e,t,n){"use strict";n.d(t,{Ri:()=>getCookie,v9:()=>hasAcceptedMarketingCookies,Hr:()=>hasCookie,du:()=>setCookieWithDurationInDays,z_:()=>setCookieWithDurationInMinutes});function setCookieWithDurationInDays(e,t,n){const r=isNaN(n)?"":"expires="+function endOfDayInNDays(e){const t=new Date;return t.setDate(t.getDate()+e),t.setHours(23),t.setMinutes(59),t.setSeconds(59),t.setMilliseconds(999),t}(n).toUTCString()+";";document.cookie=`${e}=${t};${r};path=/`}function getCookie(e){const t=decodeURIComponent(document.cookie),n=e+"=";for(const e of t.split(";").map(e=>e.trim()))if(e.startsWith(n))return e.slice(n.length);return null}function hasCookie(e){return null!==getCookie(e)}function setCookieWithDurationInMinutes(e,t,n){const r=new Date;r.setMinutes(r.getMinutes()-r.getTimezoneOffset()+n),document.cookie=`${e}=${t};expires=${r.toUTCString()};path=/`}function hasAcceptedMarketingCookies(){let e=!1;const t=getCookie("hw-cc-first-party");if(t)try{e=!!JSON.parse(t).marketing}catch(e){}return e}},9209(e,t,n){"use strict";n.d(t,{A:()=>r});const r={VALUE_MISSING:{FIRSTNAME:"Il nous manque votre prénom.",NAME:"Oups, quel est votre nom ?",EMAIL:"N'oubliez pas votre email.",RESUME:"Pas si vite, et votre CV ?",JOB:"N'oubliez pas de choisir votre métier dans la liste proposée.",JOB_MULTIPLE:"N'oubliez pas de choisir au moins un métier dans la liste proposée.",LOCALITY:"N'oubliez pas de choisir votre localité dans la liste proposée.",COUNTRY:"N'oubliez pas de choisir votre pays dans la liste proposée.",LOCALITY_MULTIPLE:"N'oubliez pas de choisir au moins une localité dans la liste proposée.",CONTRACTS:"Il nous faudrait au moins un type de contrat.",JOB_AND_DOMAIN:"Vous devez sélectionner un métier ou un domaine dans la liste proposée.",OTP:"N'oubliez pas le code.",CGU:"Vous devez accepter les CGU.",MODALITES:"Vous devez accepter les modalités suivantes.",LANGUAGE_AUTOCOMPLETE:"N'oubliez pas de choisir une langue dans la liste proposée.",EMPLOYMENT_STATUS:"N'oubliez pas de sélectionner votre statut.",SITUATION:"N'oubliez pas de renseigner votre situation actuelle.",EXPERIENCE:"N'oubliez pas d'indiquer votre niveau dâexpérience.",QUALIFICATION:"N'oubliez pas d'indiquer votre niveau de qualification.",ACTIVITY_FIELDS:"N'oubliez pas d'ajouter au moins un secteur.",SALARY_EXPECTATIONS:"N'oubliez pas de préciser vos attentes salariales.",AVAILABILITY:"N'oubliez pas de préciser votre disponibilité.",WORKING_PERMIT:"N'oubliez pas de préciser si vous êtes détenteur d'un permis de travail.",USER_CRITERIA:"Il nous faudrait au moins un critère.",NUMERIC_MAJORITY:"Vous devez confirmer avoir minimum 15 ans.",REFERENT_FIRSTNAME:"Il nous manque le prénom du référent.",REFERENT_LASTNAME:"Il nous manque le nom du référent.",REFERENT_EMAIL:"Il nous manque l'email du référent.",RANDOMS:["Il nous manque cette information.","Nous avons besoin de cette information.","Il nous faudrait cette information.","N'oubliez pas cette information."]},TOO_SHORT:{DEFAULT:"L'information est incomplète.",OTP:"Le code est incomplet."},TOO_LONG:{DEFAULT:"Vous avez atteint la limite de caractères. Merci de raccourcir votre texte."},PATTERN_MISSMATCH:{EMAIL:"Votre email n'est pas au bon format.",REFERENT_FIRSTNAME:"Le prénom du référent n'est pas au bon format.",REFERENT_LASTNAME:"Le nom du référent n'est pas au bon format.",REFERENT_EMAIL:"L'email du référent n'est pas au bon format.",NUMBER:"Veuillez saisir un chiffre ou un nombre val
29ide.",PASSWORD:"Saisissez entre 8 et 65 caractères et utilisez des majuscules, minuscules, chiffres et caractères spéciaux.",ZIP_CODE:"Votre code postal n'est pas valide.",PHONE:"Votre numéro de téléphone n'est pas valide.",OTP:"Le code doit contenir 6 chiffres.",DEFAULT:"Certains caractères ne sont pas acceptés."},CV_UPLOADER:{SIZE_ERROR:"Votre fichier est trop lourd.",FORMAT_ERROR:"Votre fichier n'est pas au bon format.",TOAST_SIZE_ERROR_TITLE:"Fichier trop lourd",TOAST_SIZE_ERROR_MESSAGE:"Merci d'utiliser un fichier avec un poids max. de 2Mo.",TOAST_FORMAT_ERROR_TITLE:"Le format n'est pas pris en compte",TOAST_FORMAT_ERROR_MESSAGE:"Veuillez utiliser les formats : .pdf, .doc, .docx, .odt, .rtf, .jpg ou .png"},CUSTOM_ERROR:{CONTRACTS_ALL_CHECKED:"Oups ! Si vous masquez tous les types de contrats, il ne restera aucune offre pour vous. Gardez au moins un critère.",COMPANIES_ALL_CHECKED:"Oups ! Si vous masquez tous les types dâentreprises, il ne restera aucune offre pour vous. Gardez au moins un critère."},DATE:{MAX_DATE:"Indiquez une date antérieure à celle du jour."},DEFAULT:"Une erreur est survenue."}},4262(e,t,n){"use strict";n.d(t,{Fr:()=>isMobile,SL:()=>createElementFromHTML,Tb:()=>copyAttributesAndChildren,u3:()=>createScriptElement});var r=n(1199);function createScriptElement(e,t){e.innerHTML=t;const n=e.querySelector("script");if(n){const e=document.createElement("script");Array.from(n.attributes).forEach(t=>{e.setAttribute(t.name,t.value)});const t=document.createTextNode(n.innerHTML);e.appendChild(t),n.replaceWith(e)}}function copyAttributesAndChildren(e,{into:t}){if(void 0!==e.attributes){for(const n of e.attributes)t.setAttribute(n.name,n.value);!function replaceChildren(e,...t){e.innerHTML="",e.append(...t)}(t,...e.childNodes)}else r.wd(`[hw-custom] Fonction copyAttributesAndChildren() dont source.attributes retourne undefined. Valeurs des paramètres : source --\x3e "${e}, into --\x3e "${t}"`,"error")}function createElementFromHTML(e){const t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}function isMobile(){return window.innerWidth<=640}},4706(e,t,n){"use strict";function getStoredArray(e){const t=function getItemFromLocalStorage(e){try{return localStorage.getItem(e)}catch(e){return null}}(e);return t?JSON.parse(t):[]}function setStoredArray(e,t){!function setItemInLocalStorage(e,t){try{localStorage.setItem(e,t)}catch(e){}}(e,JSON.stringify(t))}function addUniqueIdToStorage(e,t,n){let r=getStoredArray(e);r.includes(t)||(r.length>=n?r=[...r.slice(1-n),t]:r.push(t),setStoredArray(e,r))}function applyClassToItems(e,t,n,r){const s=getStoredArray(t);e.forEach(e=>{const t=r(e);s.includes(t)?e.classList.add(n):e.classList.remove(n)})}function getItemIdFromAttribute(e,t){const n=e.getAttribute(t);return n?parseInt(n,10):0}n.d(t,{D7:()=>setStoredArray,De:()=>getItemIdFromAttribute,EN:()=>addUniqueIdToStorage,HB:()=>getStoredArray,Y9:()=>applyClassToItems})},7654(e,t,n){"use strict";function getItemFromSessionStorage(e){try{return sessionStorage.getItem(e)}catch(e){return null}}function setItemInSessionStorage(e,t){try{sessionStorage.setItem(e,t)}catch(e){}}function removeItemFromSessionStorage(e){try{sessionStorage.removeItem(e)}catch(e){}}n.d(t,{KD:()=>setItemInSessionStorage,lw:()=>getItemFromSessionStorage,n_:()=>removeItemFromSessionStorage})},5359(e,t,n){"use strict";n.d(t,{x:()=>markTurboFrameForcedReload,y:()=>consumeTurboFrameForcedReload});var r=n(7654);function storageKey(e){return`hw-forced-frame-reload-${e}`}function markTurboFrameForcedReload(e){(0,r.KD)(storageKey(e),Date.now().toString())}function consumeTurboFrameForcedReload(e,t){const n=storageKey(e),s=(0,r.lw)(n);return(0,r.n_)(n),null!==s&&Date.now()-Number(s)<t}},1830(e,t,n){"use strict";function platformForInstallableApp(e=navigator.userAgent){return/iPhone|iPod|iPad/i.test(e)?"ios":/Android/i.test(e)?"android":void 0}n.d(t,{D:()=>platformForInstallableApp})},6863(e,t,n){"use strict";function getClassicDuration(e){if(null===e)return"0 h 00 min";const t=e%60;return`${Math.floor(e/60)} h ${t<10?"0":""}${t} min`}function getDecimalDuration(e){return null===e?"0.0 h":`${(e/60).toFixed(1)} h`}function getMinutesDuration(e){return null===e?"0 min":`${e} min`}n.d(t,{I6:()=>getDecimalDuration,U1:()=>getMinutesDuration,tS:()=>getClassicDuration})},1922(e,t,n){"use strict";n.d(t,{i4:()=>TemplateInstance});const r=new Map;function parse(e){if(r.has(e))return r.get(e);const t=e.length;let n=0,s=0,i=0;const a=[];for(let r=0;r<t;r+=1){const t=e[r],o=e[r+1],c=e[r-1];"{"===t&&"{"===o&&"\\"!==c?(i+=1,1===i&&(s=r),r+=1):"}"===t&&"}"===o&&"\\"!==c&&i&&(i-=1,0===i&&(s>n&&(a.push(Object.freeze({type:"string",start:n,end:s,value:e.slice(n,s)})),n=s),a.push(Object.freeze({type:"part",start:s,end:r+2,value:e.slice(n+2,r).trim()})),r+=1,n=r+1))}return n<t&&a.push(Object.freeze({type:"string",start:n,end:t,value:e.slice(n,t)})),r.set(e,Object.freeze(a)),r.get(e)}const s=new WeakMap,i=new WeakMap;class AttributeTemplatePart{constructor(e,t){this.expression=t,s.set(this,e),e.updateParent("")}get attributeName(){return s.get(this).attr.name}get attributeNamespace(){return s.get(this).attr.namespaceURI}get value(){return i.get(this)}set value(e){i.set(this,e||""),s.get(this).updateParent(e)}
29get element(){return s.get(this).element}get booleanValue(){return s.get(this).booleanValue}set booleanValue(e){s.get(this).booleanValue=e}}class AttributeValueSetter{constructor(e,t){this.element=e,this.attr=t,this.partList=[]}get booleanValue(){return this.element.hasAttributeNS(this.attr.namespaceURI,this.attr.name)}set booleanValue(e){if(1!==this.partList.length)throw new DOMException("Operation not supported","NotSupportedError");this.partList[0].value=e?"":null}append(e){this.partList.push(e)}updateParent(e){if(1===this.partList.length&&null===e)this.element.removeAttributeNS(this.attr.namespaceURI,this.attr.name);else{const e=this.partList.map(e=>"string"==typeof e?e:e.value).join("");this.element.setAttributeNS(this.attr.namespaceURI,this.attr.name,e)}}}const a=new WeakMap;class NodeTemplatePart{constructor(e,t){this.expression=t,a.set(this,[e]),e.textContent=""}get value(){return a.get(this).map(e=>e.textContent).join("")}set value(e){this.replace(e)}get previousSibling(){return a.get(this)[0].previousSibling}get nextSibling(){return a.get(this)[a.get(this).length-1].nextSibling}replace(...e){var t,n;const r=e.map(e=>"string"==typeof e?new Text(e):e);r.length||r.push(new Text(""));const s=a.get(this)[0];for(const e of r)null===(t=s.parentNode)||void 0===t||t.insertBefore(e,s);for(const e of a.get(this))null===(n=e.parentNode)||void 0===n||n.removeChild(e);a.set(this,r)}}class InnerTemplatePart extends NodeTemplatePart{constructor(e){var t;super(e,null!==(t=e.getAttribute("expression"))&&void 0!==t?t:""),this.template=e}get directive(){var e;return null!==(e=this.template.getAttribute("directive"))&&void 0!==e?e:""}}function createProcessor(e){return{processCallback(t,n,r){var s;if("object"==typeof r&&r)for(const t of n)if(t.expression in r){const n=null!==(s=r[t.expression])&&void 0!==s?s:"";e(t,n,r)}}}}function processPropertyIdentity(e,t){e.value=t instanceof Node?t:String(t)}const o=createProcessor(processPropertyIdentity);createProcessor((e,t)=>{(function processBooleanAttribute(e,t){return"boolean"==typeof t&&e instanceof AttributeTemplatePart&&"boolean"==typeof e.element[e.attributeName]&&(e.booleanValue=t,!0)})(e,t)||processPropertyIdentity(e,t)});function*collectParts(e){const t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null);let n;for(;n=t.nextNode();)if(n instanceof HTMLTemplateElement)if(n.hasAttribute("directive"))yield new InnerTemplatePart(n);else for(const e of collectParts(n.content))yield e;else if(n instanceof Element&&n.hasAttributes())for(let e=0;e<n.attributes.length;e+=1){const t=n.attributes.item(e);if(t&&t.value.includes("{{")){const e=new AttributeValueSetter(n,t);for(const n of parse(t.value))if("string"===n.type)e.append(n.value);else{const t=new AttributeTemplatePart(e,n.value);e.append(t),yield t}}}else if(n instanceof Text&&n.textContent&&n.textContent.includes("{{")){const e=parse(n.textContent);for(let t=0;t<e.length;t+=1){const r=e[t];r.end<n.textContent.length&&n.splitText(r.end),"part"===r.type&&(yield new NodeTemplatePart(n,r.value));break}}}const c=new WeakMap,l=new WeakMap;class TemplateInstance extends(globalThis.DocumentFragment||EventTarget){constructor(e,t,n=o){var r,s;super(),Object.getPrototypeOf(this)!==TemplateInstance.prototype&&Object.setPrototypeOf(this,TemplateInstance.prototype),this.appendChild(e.content.cloneNode(!0)),l.set(this,Array.from(collectParts(this))),c.set(this,n),null===(s=(r=c.get(this)).createCallback)||void 0===s||s.call(r,this,l.get(this),t),c.get(this).processCallback(this,l.get(this),t)}update(e){c.get(this).processCallback(this,l.get(this),e)}}},9354(e,t,n){"use strict";n.d(t,{h:()=>getAsyncContextStrategy});var r=n(3124),s=n(5315);function getAsyncContextStrategy(e){const t=(0,r.Se)(e);return t.acs?t.acs:(0,s.z)()}}
29,5315(e,t,n){"use strict";n.d(t,{z:()=>getStackAsyncContextStrategy});var r=n(2040),s=n(7080),i=n(814),a=n(6868),o=n(3124);class AsyncContextStack{constructor(e,t){let n,r;n=e||new s.H,r=t||new s.H,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return(0,a.Qg)(n)?(0,i.i)(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 getAsyncContextStack(){const e=(0,o.EU)(),t=(0,o.Se)(e);return t.stack=t.stack||new AsyncContextStack((0,r.r)(),(0,r.q)())}function withScope(e){return getAsyncContextStack().withScope(e)}function withSetScope(e,t){const n=getAsyncContextStack();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function withIsolationScope(e){return getAsyncContextStack().withScope(()=>e(getAsyncContextStack().getIsolationScope()))}function getStackAsyncContextStrategy(){return{withIsolationScope,withScope,withSetScope,withSetIsolationScope:(e,t)=>withIsolationScope(t),getCurrentScope:()=>getAsyncContextStack().getScope(),getIsolationScope:()=>getAsyncContextStack().getIsolationScope()}}},3124(e,t,n){"use strict";n.d(t,{BY:()=>getGlobalSingleton,EU:()=>getMainCarrier,Se:()=>getSentryCarrier});var r=n(438),s=n(5969);function getMainCarrier(){return getSentryCarrier(s.O),s.O}function getSentryCarrier(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||r.M,t[r.M]=t[r.M]||{}}function getGlobalSingleton(e,t,n=s.O){const i=n.__SENTRY__=n.__SENTRY__||{},a=i[r.M]=i[r.M]||{};return a[e]||(a[e]=t())}},1589(e,t,n){"use strict";n.d(t,{U:()=>r});const r="production"},8284(e,t,n){"use strict";n.d(t,{Bi:()=>hasExternalPropagationContext,KU:()=>getClient,m6:()=>getGlobalScope,o5:()=>getCurrentScope,rm:()=>getIsolationScope,v4:()=>withScope,vn:()=>getTraceContextFromScope});var r=n(9354),s=n(3124),i=n(7080),a=n(5185);let o;function hasExternalPropagationContext(){return void 0!==o}function getCurrentScope(){const e=(0,s.EU)();return(0,r.h)(e).getCurrentScope()}function getIsolationScope(){const e=(0,s.EU)();return(0,r.h)(e).getIsolationScope()}function getGlobalScope(){return(0,s.BY)("globalScope",()=>new i.H)}function withScope(...e){const t=(0,s.EU)(),n=(0,r.h)(t);if(2===e.length){const[t,r]=e;return t?n.withSetScope(t,r):n.withScope(r)}return n.withScope(e[0])}function getClient(){return getCurrentScope().getClient()}function getTraceContextFromScope(e){const t=function getExternalPropagationContext(){return o?.()}();if(t)return{trace_id:t.traceId,span_id:t.spanId};const n=e.getPropagationContext(),{traceId:r,parentSpanId:s,propagationSpanId:i}=n,c={trace_id:r,span_id:i||(0,a.Z)()};return s&&(c.parent_span_id=s),c}},862(e,t,n){"use strict";n.d(t,{T:()=>r});const r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},2040(e,t,n){"use strict";n.d(t,{q:()=>getDefaultIsolationScope,r:()=>getDefaultCurrentScope});var r=n(3124),s=n(7080);function getDefaultCurrentScope(){return(0,r.BY)("defaultCurrentScope",()=>new s.H)}function getDefaultIsolationScope(){return(0,r.BY)("defaultIsolationScope",()=>new s.H)}},1199(e,t,n){"use strict";n.d(t,{Cp:()=>captureException,J0:()=>startSession,J5:()=>captureSession,Ol:()=>isEnabled,r:()=>captureEvent,wd:()=>captureMessage});var r=n(8284),s=n(7540),i=n(8234),a=n(1482),o=n(5969);function captureException(e,t){return(0,r.o5)().captureException(e,(0,i.li)(t))}function captureMessage(e,t){const n="string"==typeof t?t:void 0,s="string"!=typeof t?{captureContext:t}:void 0;return(0,r.o5)().captureMessage(e,n,s)}function captureEvent(e,t){return(0,r.o5)().captureEvent(e,t)}function isEnabled(){const e=(0,r.KU)();return!1!==e?.getOptions().enabled&&!!e?.getTransport()}function startSession(e){const t=(0,r.rm)(),{user:n}=(0,a.Om)(t,(0,r.o5)()),{userAgent:i}=o.O.navigator||{},c=(0,s.fj)({user:n,...i&&{userAgent:i},...e}),l=t.getSession();return"ok"===l?.status&&(0,s.qO)(l,{status:"exited"}),endSession(),t.setSession(c),c}function endSession(){const e=(0,r.rm)(),t=(0,r.o5)().getSession()||e.getSession();t&&(0,s.Vu)(t),_sendSessionUpdate(),e.setSession()}function _sendSessionUpdate(){const e=(0,r.rm)(),t=(0,r.KU)(),n=e.getSession();n&&t&&t.captureSession(n)}function captureSession(e=!1){e?endSession():_sendSessionUpdate()}}
29,7080(e,t,n){"use strict";n.d(t,{H:()=>Scope});var r=n(862),s=n(7540),i=n(5366),a=n(6868),o=n(3458),c=n(1964),l=n(5185),u=n(7799),d=n(321),h=n(7161),p=n(6837);class Scope{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:(0,l.e)(),sampleRand:(0,u.hY)()}}clone(){const e=new Scope;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,(0,d.r)(e,(0,d.f)(this)),e}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&&(0,s.qO)(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(e){if(!e)return this;const t="function"==typeof e?e(this):e,n=t instanceof Scope?t.getScopeData():(0,a.Qd)(t)?e:void 0,{tags:r,attributes:s,extra:i,user:o,contexts:c,level:l,fingerprint:u=[],propagationContext:d,conversationId:h}=n||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},o&&Object.keys(o).length&&(this._user=o),l&&(this._level=l),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),h&&(this._conversationId=h),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,(0,d.r)(this,void 0),this._attachments=[],this.setPropagationContext({traceId:(0,l.e)(),sampleRand:(0,u.hY)()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:(0,p.lu)(),...e,message:e.message?(0,h.xv)(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:(0,d.f)(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=(0,o.h)(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}
29captureException(e,t){const n=t?.event_id||(0,c.eJ)();if(!this._client)return r.T&&i.Yz.warn("No client configured on scope - will not capture exception!"),n;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...t,event_id:n},this),n}captureMessage(e,t,n){const s=n?.event_id||(0,c.eJ)();if(!this._client)return r.T&&i.Yz.warn("No client configured on scope - will not capture message!"),s;const a=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...n,event_id:s},this),s}captureEvent(e,t){const n=e.event_id||t?.event_id||(0,c.eJ)();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(r.T&&i.Yz.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)}}},703(e,t,n){"use strict";n.d(t,{E1:()=>p,Ef:()=>i,Ft:()=>c,Fy:()=>f,JD:()=>o,Lc:()=>g,Le:()=>h,Sn:()=>u,fs:()=>l,i_:()=>r,jG:()=>m,sy:()=>s,uT:()=>a,xc:()=>d});const r="sentry.source",s="sentry.sample_rate",i="sentry.previous_trace_sample_rate",a="sentry.op",o="sentry.origin",c="sentry.status.message",l="sentry.idle_span_finish_reason",u="sentry.measurement_unit",d="sentry.measurement_value",h="sentry.custom_span_name",p="sentry.profile_id",m="sentry.exclusive_time",g="sentry.link.type",f="gen_ai.conversation.id"},7540(e,t,n){"use strict";n.d(t,{Vu:()=>closeSession,fj:()=>makeSession,qO:()=>updateSession});var r=n(1964),s=n(6837);function makeSession(e){const t=(0,s.zf)(),n={sid:(0,r.eJ)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function sessionToJSON(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp: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&&updateSession(n,e),n}function updateSession(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||(0,s.zf)(),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:(0,r.eJ)()),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 closeSession(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),updateSession(e,n)}},2810(e,t,n){"use strict";n.d(t,{LZ:()=>freezeDscOnSpan,ao:()=>getDynamicSamplingContextFromScope,k1:()=>getDynamicSamplingContextFromSpan});var r=n(1589),s=n(8284),i=n(703),a=n(724),o=n(3507),c=n(9868),l=n(4351),u=n(3181),d=n(9008),h=n(9228);const p="_frozenDsc";function freezeDscOnSpan(e,t){const n=e;(0,l.my)(n,p,t)}function getDynamicSamplingContextFromClient(e,t){const n=t.getOptions(),{publicKey:s}=t.getDsn()||{},i={environment:n.environment||r.U,release:n.release,public_key:s,trace_id:e,org_id:(0,o.ul)(t)};return t.emit("createDsc",i),i}function getDynamicSamplingContextFromScope(e,t){const n=t.getPropagationContext();return n.dsc||getDynamicSamplingContextFromClient(n.traceId,e)}function getDynamicSamplingContextFromSpan(e){const t=(0,s.KU)();if(!t)return{};const n=(0,u.zU)(e),r=(0,u.et)(n),o=r.data,l=n.spanContext().traceState,m=l?.get("sentry.sample_rate")??o[i.sy]??o[i.Ef];
29function applyLocalSampleRateToDsc(e){return"number"!=typeof m&&"string"!=typeof m||(e.sample_rate=`${m}`),e}const g=n[p];if(g)return applyLocalSampleRateToDsc(g);const f=(0,d.h)(n),v=f&&"ignored"===n.dropReason;if(f&&(!(0,c.f)(t.getOptions())||v)){const e=(0,h.Lb)(n).scope;if(e){const n={...getDynamicSamplingContextFromScope(t,e)};return v&&(n.sampled="false"),applyLocalSampleRateToDsc(n)}}const b=l?.get("sentry.dsc"),_=b&&(0,a.yD)(b);if(_)return applyLocalSampleRateToDsc(_);const S=getDynamicSamplingContextFromClient(e.spanContext().traceId,t),y=o[i.i_]??o["sentry.segment.name.source"],T=r.description;return"url"!==y&&T&&(S.transaction=T),(0,c.f)()&&(S.sampled=String((0,u.pK)(n)),S.sample_rand=l?.get("sentry.sample_rand")??(0,h.Lb)(n).scope?.getPropagationContext().sampleRand.toString()),applyLocalSampleRateToDsc(S),t.emit("createDsc",S,n),S}},9008(e,t,n){"use strict";n.d(t,{h:()=>spanIsNonRecordingSpan,w:()=>SentryNonRecordingSpan});var r=n(4351),s=n(5185),i=n(3181);const a=Symbol.for("sentry.nonRecordingSpan");class SentryNonRecordingSpan{constructor(e={}){this._traceId=e.traceId||(0,s.e)(),this._spanId=e.spanId||(0,s.Z)(),this.dropReason=e.dropReason,(0,r.my)(this,a,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:i.CC}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}function spanIsNonRecordingSpan(e){return!!e&&!0===e[a]}},3939(e,t,n){"use strict";n.d(t,{F3:()=>s,N8:()=>setHttpStatus,TJ:()=>i,a3:()=>r});const r=0,s=1,i=2;function setHttpStatus(e,t){e.setAttribute("http.response.status_code",t);const n=function getSpanStatusFromHttpCode(e){if(e<400&&e>=100)return{code:s};if(e>=400&&e<500)switch(e){case 401:return{code:i,message:"unauthenticated"};case 403:return{code:i,message:"permission_denied"};case 404:return{code:i,message:"not_found"};case 409:return{code:i,message:"already_exists"};case 413:return{code:i,message:"failed_precondition"};case 429:return{code:i,message:"resource_exhausted"};case 499:return{code:i,message:"cancelled"};default:return{code:i,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:i,message:"unimplemented"};case 503:return{code:i,message:"unavailable"};case 504:return{code:i,message:"deadline_exceeded"};default:return{code:i,message:"internal_error"}}return{code:i,message:"internal_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}},9228(e,t,n){"use strict";n.d(t,{Lb:()=>getCapturedScopesOnSpan,ZO:()=>spanShouldInferOtelSource,d_:()=>setCapturedScopesOnSpan,jF:()=>markSpanSourceAsExplicit,rh:()=>spanIsTracerProviderSpan});var r=n(4351),s=n(2071);const i="_sentryScope",a="_sentryIsolationScope",o=Symbol.for("sentry.otelSourceInference"),c=Symbol.for("sentry.otelSourceExplicitlySet"),l=Symbol.for("sentry.tracerProviderSpan");function setCapturedScopesOnSpan(e,t,n){e&&((0,r.my)(e,a,(0,s.Z)(n)),(0,r.my)(e,i,t))}function getCapturedScopesOnSpan(e){const t=e;return{scope:t[i],isolationScope:(0,s.q)(t[a])}}function spanShouldInferOtelSource(e){return!0===e[o]}function markSpanSourceAsExplicit(e){(0,r.my)(e,c,!0)}function spanIsTracerProviderSpan(e){return!0===e[l]}},724(e,t,n){"use strict";n.d(t,{De:()=>dynamicSamplingContextToSentryBaggageHeader,sv:()=>a,yD:()=>baggageHeaderToDynamicSamplingContext});var r=n(862),s=n(5366),i=n(6868);const a="sentry-";function baggageHeaderToDynamicSamplingContext(e){const t=parseBaggageHeader(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(a)){e[t.slice(a.length)]=n}return e},{});return Object.keys(n).length>0?n:void 0}function dynamicSamplingContextToSentryBaggageHeader(e){if(!e)return;return objectToBaggageHeader(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${a}${t}`]=n),e),{}))}function parseBaggageHeader(e){if(e&&((0,i.Kg)(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{const n=baggageHeaderToObject(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):baggageHeaderToObject(e)}function baggageHeaderToObject(e){return e.split(",").map(e=>{const t=e.indexOf("=");if(-1===t)return[];return[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),{})}function objectToBaggageHeader(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],i)=>{const a=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=0===i?a:`${e},${a}`;return o.length>8192?(r.T&&s.Yz.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},"")}},814(e,t,n){"use strict";n.d(t,{i:()=>chainAndCopyPromiseLike});const isActualPromise=e=>e instanceof Promise&&!e[r],r=Symbol("chained PromiseLike"),chainAndCopyPromiseLike=(e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return isActualPromise(r)&&isActualPromise(e)?r:copyProps(e,r)},copyProps=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const s=e[r];"function"==typeof s?Object.defineProperty(t,r,{value:(...t)=>s.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=s}return n&&Object.assign(t,{[r]:!0}),t}},5366(e,t,n){"use strict";n.d(t,{Ow:()=>a,Yz:()=>c,Z9:()=>o,pq:()=>consoleSandbox});var r=n(3124),s=n(862),i=n(5969);const a=["debug","info","warn","error","log","assert","trace"],o={};function consoleSandbox(e){if(!("console"in i.O))return e();const t=i.O.console,n={},r=Object.keys(o);
29r.forEach(e=>{const r=o[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function isEnabled(){return _getLoggerSettings().enabled}function _maybeLog(e,...t){s.T&&isEnabled()&&consoleSandbox(()=>{i.O.console[e](`Sentry Logger [${e}]:`,...t)})}function _getLoggerSettings(){return s.T?(0,r.BY)("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const c={enable:function enable(){_getLoggerSettings().enabled=!0},disable:function disable(){_getLoggerSettings().enabled=!1},isEnabled,log:function log(...e){_maybeLog("log",...e)},warn:function warn(...e){_maybeLog("warn",...e)},error:function error(...e){_maybeLog("error",...e)}}},3507(e,t,n){"use strict";n.d(t,{AD:()=>makeDsn,SB:()=>dsnToString,ul:()=>extractOrgIdFromClient});var r=n(862),s=n(5366);const i=/^o(\d+)\./,a=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function dsnToString(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:a,protocol:o,publicKey:c}=e;return`${o}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${a}`}function dsnFromComponents(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function extractOrgIdFromClient(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function extractOrgIdFromDsnHost(e){const t=e.match(i);return t?.[1]}(n)),r}function makeDsn(e){const t="string"==typeof e?function dsnFromString(e){const t=a.exec(e);if(!t)return void(0,s.pq)(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,i="",o="",c="",l=""]=t.slice(1);let u="",d=l;const h=d.split("/");if(h.length>1&&(u=h.slice(0,-1).join("/"),d=h.pop()),d){const e=d.match(/^\d+/);e&&(d=e[0])}return dsnFromComponents({host:o,pass:i,path:u,projectId:d,port:c,protocol:n,publicKey:r})}(e):dsnFromComponents(e);if(t&&function validateDsn(e){if(!r.T)return!0;const{port:t,projectId:n,protocol:i}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(s.Yz.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function isValidProtocol(e){return"http"===e||"https"===e}(i)?t&&isNaN(parseInt(t,10))&&(s.Yz.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(s.Yz.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),1):(s.Yz.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}},9868(e,t,n){"use strict";n.d(t,{f:()=>hasSpansEnabled});var r=n(8284);function hasSpansEnabled(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||(0,r.KU)()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}},6868(e,t,n){"use strict";n.d(t,{BD:()=>isDOMError,Kg:()=>isString,NF:()=>isParameterizedString,Qd:()=>isPlainObject,Qg:()=>isThenable,T2:()=>isErrorEvent,W6:()=>isDOMException,Z4:()=>isObjectLike,bJ:()=>isError,gd:()=>isRegExp,ks:()=>isRequest,sO:()=>isPrimitive,tH:()=>isInstanceOf,xH:()=>isEvent});const r=Object.prototype.toString;function isError(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return isInstanceOf(e,Error)}}function isBuiltin(e,t){return r.call(e)===`[object ${t}]`}function isErrorEvent(e){return isBuiltin(e,"ErrorEvent")}function isDOMError(e){return isBuiltin(e,"DOMError")}function isDOMException(e){return isBuiltin(e,"DOMException")}function isString(e){return isBuiltin(e,"String")}function isParameterizedString(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function isPrimitive(e){return null===e||isParameterizedString(e)||"object"!=typeof e&&"function"!=typeof e}function isPlainObject(e){return isBuiltin(e,"Object")}function isObjectLike(e){return"object"==typeof e&&null!==e}function isEvent(e){return"undefined"!=typeof Event&&isInstanceOf(e,Event)}function isRegExp(e){return isBuiltin(e,"RegExp")}function isThenable(e){return Boolean(e?.then&&"function"==typeof e.then)}function isInstanceOf(e,t){try{return e instanceof t}catch{return!1}}function isRequest(e){return"undefined"!=typeof Request&&isInstanceOf(e,Request)}},3458(e,t,n){"use strict";function merge(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 e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=merge(r[e],t[e],n-1));return r}n.d(t,{h:()=>merge})},1964(e,t,n){"use strict";n.d(t,{$X:()=>getEventDescription,GR:()=>checkOrSetAlreadyCaught,M6:()=>addExceptionMechanism,eJ:()=>uuid4,gO:()=>addExceptionTypeValue});var r=n(4351),s=n(7799),i=n(5969);let a;function uuid4(e=function getCrypto(){const e=i.O;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return(0,s.Qw)(()=>e.randomUUID()).replace(/-/g,"")}catch{}return a||(a="10000000100040008000100000000000"),a.replace(/[018]/g,e=>(e^(15&function getRandomByte(){return 16*(0,s.hY)()}())>>e/4).toString(16))}function getFirstException(e){return e.exception?.values?.[0]}function getEventDescription(e){const{message:t,event_id:n}=e;if(t)return t;const r=getFirstException(e);return r?r.type&&r.value?`${r.type}: ${r.value}
29`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function addExceptionTypeValue(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function addExceptionMechanism(e,t){const n=getFirstException(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 checkOrSetAlreadyCaught(e){if(function isAlreadyCaptured(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{(0,r.my)(e,"__sentry_captured__",!0)}catch{}return!1}},1306(e,t,n){"use strict";n.d(t,{S8:()=>normalize,cd:()=>normalizeToSize,Ip:()=>setNormalizeStringifier,ng:()=>stringifyValue});const r=Symbol.for("sentry.skipNormalization"),s=Symbol.for("sentry.overrideNormalizationDepth");var i=n(4351),a=n(3521);let o;function setNormalizeStringifier(e){o=e}function normalize(e,t=100,n=1/0){try{return visit("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function normalizeToSize(e,t=3,n=102400){const r=normalize(e,t);return function jsonSize(e){return function utf8Length(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}(r)>n?normalizeToSize(e,t-1,n):r}function visit(e,t,n=1/0,a=1/0,o=function memoBuilder(){const e=new WeakSet;function memoize(t){return!!e.has(t)||(e.add(t),!1)}function unmemoize(t){e.delete(t)}return[memoize,unmemoize]}()){const[c,l]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const u=stringifyValue(e,t);if(!u.startsWith("[object "))return u;if(function hasSkipNormalizationHint(e){return Boolean(e[r])}(t))return t;const d=function getNormalizationDepthOverrideHint(e){const t=e[s];return"number"==typeof t?t:void 0}(t),h=void 0!==d?d:n;if(0===h)return u.replace("object ","");if(c(t))return"[Circular ~]";const p=t;if(p&&"function"==typeof p.toJSON)try{return visit("",p.toJSON(),h-1,a,o)}catch{}const m=Array.isArray(t)?[]:{};let g=0;const f=(0,i.W4)(t);for(const e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(g>=a){m[e]="[MaxProperties ~]";break}const t=f[e];m[e]=visit(e,t,h-1,a,o),g++}return l(t),m}function stringifyValue(e,t){try{if(o){const e=o(t);if(e)return e}if(void 0!==n.g&&t===n.g)return"[Global]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${(0,a.qQ)(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const e=function getConstructorName(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return`[object ${e}]`}catch(e){return`**non-serializable** (${e})`}}},4351(e,t,n){"use strict";n.d(t,{GS:()=>fill,HF:()=>extractExceptionKeysForMessage,W4:()=>convertToPlainObject,my:()=>addNonEnumerableProperty,pO:()=>markFunctionWrapped,sp:()=>getOriginalFunction});var r=n(862),s=n(5366),i=n(6868);function fill(e,t,n){if(!(t in e))return;const i=e[t];if("function"!=typeof i)return;const a=n(i);"function"==typeof a&&markFunctionWrapped(a,i);try{e[t]=a}catch{r.T&&s.Yz.log(`Failed to replace method "${t}" in object`,e)}}function addNonEnumerableProperty(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{r.T&&s.Yz.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function markFunctionWrapped(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,addNonEnumerableProperty(e,"__sentry_original__",t)}catch{}}function getOriginalFunction(e){return e.__sentry_original__}function convertToPlainObject(e){if((0,i.bJ)(e))return{message:e.message,name:e.name,stack:e.stack,...getOwnProperties(e)};if((0,i.xH)(e)){const{type:t,target:n,currentTarget:r,detail:s}=e;return{type:t,target:n,currentTarget:r,...s?{detail:s}:{},...getOwnProperties(e)}}return e}function getOwnProperties(e){return(0,i.Z4)(e)?Object.fromEntries(Object.entries(e)):{}}function extractExceptionKeysForMessage(e){const t=Object.keys(convertToPlainObject(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}},7753(e,t,n){"use strict";function parseSampleRate(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}n.d(t,{i:()=>parseSampleRate})},8234(e,t,n){"use strict";n.d(t,{li:()=>parseEventHintOrCaptureContext,mG:()=>prepareEvent});var r=n(1589),s=n(862),i=n(5366),a=n(6868),o=n(5142);function notifyEventProcessors(e,t,n,r=0){try{const s=_notifyEventProcessors(t,n,e,r);return(0,a.Qg)(s)?s:(0,o.XW)(s)}catch(e){return(0,o.xg)(e)}}function _notifyEventProcessors(e,t,n,r){const o=n[r];if(!e||!o)return e;const c=o({...e},t);return s.T&&null===c&&i.Yz.log(`Event processor "${o.id||"?"}" dropped event`),(0,a.Qg)(c)?c.then(e=>_notifyEventProcessors(e,t,n,r+1)):_notifyEventProcessors(c,t,n,r+1)}var c=n(7080),l=n(5969);let u,d,h,p;function getFilenameToDebugIdMap(e){const t=l.O._sentryDebugIds,n=l.O._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];
29if(p&&r.length===d&&s.length===h)return p;d=r.length,h=s.length,p={},u||(u={});const processDebugIds=(t,n)=>{for(const r of t){const t=n[r],s=u?.[r];if(s&&p&&t)p[s[0]]=t,u&&(u[r]=[s[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const s=n[e],i=s?.filename;if(i&&p&&u){p[i]=t,u[r]=[i,t];break}}}}};return t&&processDebugIds(r,t),n&&processDebugIds(s,n),p}var m=n(1964),g=n(1306),f=n(1482),v=n(7161),b=n(6837);function prepareEvent(e,t,n,s,i,a){const{normalizeDepth:l=3,normalizeMaxBreadth:u=1e3}=e,d={...t,event_id:t.event_id||n.event_id||(0,m.eJ)(),timestamp:t.timestamp||(0,b.lu)()},h=n.integrations||e.integrations.map(e=>e.name);!function applyClientOptions(e,t){const{environment:n,release:s,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||r.U,!e.release&&s&&(e.release=s);!e.dist&&i&&(e.dist=i);const o=e.request;o?.url&&a&&(o.url=(0,v.xv)(o.url,a));a&&e.exception?.values?.forEach(e=>{e.value&&(e.value=(0,v.xv)(e.value,a))})}(d,e),function applyIntegrationsMetadata(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(d,h),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function applyDebugIds(e,t){const n=getFilenameToDebugIdMap(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(d,e.stackParser);const p=function getFinalScope(e,t){if(!t)return e;const n=e?e.clone():new c.H;return n.update(t),n}(s,n.captureContext);n.mechanism&&(0,m.M6)(d,n.mechanism);const _=i?i.getEventProcessors():[],S=(0,f.Om)(a,p),y=[...n.attachments||[],...S.attachments];y.length&&(n.attachments=y),(0,f.e2)(d,S);const T=[..._,...S.eventProcessors];return(n.data&&!0===n.data.__sentry__?(0,o.XW)(d):notifyEventProcessors(T,d,n)).then(e=>(e&&function applyDebugMeta(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 l&&l>0?function normalizeEvent(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:(0,g.S8)(e.data,t,n)}}))},...e.user&&{user:(0,g.S8)(e.user,t,n)},...e.contexts&&{contexts:(0,g.S8)(e.contexts,t,n)},...e.extra&&{extra:(0,g.S8)(e.extra,t,n)}};e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=(0,g.S8)(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:(0,g.S8)(e.data,t,n)}})));e.contexts?.flags&&r.contexts&&(r.contexts.flags=(0,g.S8)(e.contexts.flags,3,n));return r}(e,l,u):e))}function parseEventHintOrCaptureContext(e){if(e)return function hintIsScopeOrFunction(e){return e instanceof c.H||"function"==typeof e}(e)||function hintIsScopeContext(e){return Object.keys(e).some(e=>_.includes(e))}(e)?{captureContext:e}:e}const _=["user","level","extra","contexts","tags","fingerprint","propagationContext"]},5185(e,t,n){"use strict";n.d(t,{Z:()=>generateSpanId,e:()=>generateTraceId});var r=n(1964);function generateTraceId(){return(0,r.eJ)()}function generateSpanId(){return(0,r.eJ)().substring(16)}},7799(e,t,n){"use strict";n.d(t,{Qw:()=>withRandomSafeContext,Wk:()=>safeDateNow,hY:()=>safeMathRandom});var r=n(5969);let s;function withRandomSafeContext(e){if(void 0!==s)return s?s(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=r.O;return t in n&&"function"==typeof n[t]?(s=n[t],s(e)):(s=null,e())}function safeMathRandom(){return withRandomSafeContext(()=>Math.random())}function safeDateNow(){return withRandomSafeContext(()=>Date.now())}},1482(e,t,n){"use strict";n.d(t,{Om:()=>getCombinedScopeData,e2:()=>applyScopeDataToEvent});var r=n(8284),s=n(2810),i=n(3458),a=n(3181);function applyScopeDataToEvent(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;!function applyDataToEvent(e,t){const{extra:n,tags:r,user:s,contexts:i,level:a,transactionName:o}=t;Object.keys(n).length&&(e.extra={...n,...e.extra});Object.keys(r).length&&(e.tags={...r,...e.tags});Object.keys(s).length&&(e.user={...s,...e.user});Object.keys(i).length&&(e.contexts={...i,...e.contexts});a&&(e.level=a);o&&"transaction"!==e.type&&(e.transaction=o)}(e,t),r&&function applySpanToEvent(e,t){e.contexts={trace:(0,a.kX)(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:(0,s.k1)(t),...e.sdkProcessingMetadata};const n=(0,a.zU)(t),r=(0,a.et)(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function applyFingerprintToEvent(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 applyBreadcrumbsToEvent(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function applySdkMetadataToEvent(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function mergeScopeData(e,t){const{extra:n,tags:r,attributes:s,user:a,contexts:o,level:c,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:d,eventProcessors:h,attachments:p,propagationContext:m,transactionName:g,span:f}=t;mergeAndOverwriteScopeData(e,"extra",n),mergeAndOverwriteScopeData(e,"tags",r),mergeAndOverwriteScopeData(e,"attributes",s),mergeAndOverwriteScopeData(e,"user",a),mergeAndOverwriteScopeData(e,"contexts",o),e.sdkProcessingMetadata=(0,i.h)(e.sdkProcessingMetadata,l,2),c&&(e.level=c),g&&(e.transactionName=g),f&&(e.span=f),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]
29),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...m}}function mergeAndOverwriteScopeData(e,t,n){e[t]=(0,i.h)(e[t],n,1)}function getCombinedScopeData(e,t){const n=(0,r.m6)().getScopeData();return e&&mergeScopeData(n,e.getScopeData()),t&&mergeScopeData(n,t.getScopeData()),n}},321(e,t,n){"use strict";n.d(t,{f:()=>_getSpanForScope,r:()=>_setSpanForScope});var r=n(4351),s=n(2071);const i="_sentrySpan";function _setSpanForScope(e,t){t?(0,r.my)(e,i,(0,s.Z)(t)):delete e[i]}function _getSpanForScope(e){return(0,s.q)(e[i])}},3181(e,t,n){"use strict";n.d(t,{CC:()=>g,aO:()=>f,Hu:()=>addChildSpanToSpan,fy:()=>addStatusMessageAttribute,uU:()=>convertSpanLinksForEnvelope,Bk:()=>getActiveSpan,zU:()=>S,dZ:()=>getSimpleStatus,xO:()=>getSpanDescendants,yW:()=>getStatusMessage,HQ:()=>getStreamedSpanLinks,VS:()=>removeChildSpanFromSpan,xl:()=>showSpanDropWarning,pK:()=>spanIsSampled,cI:()=>spanTimeInputToSeconds,et:()=>spanToJSON,kX:()=>spanToTraceContext,Qh:()=>spanToTraceHeader,G_:()=>spanToTraceparentHeader,Ck:()=>spanToTransactionTraceContext,PL:()=>streamedSpanJsonToSerializedSpan});var r=n(9354);function attributeValueToTypedAttributeValue(e,t){const{value:n,unit:r}=function isAttributeObject(e){return"object"==typeof e&&null!=e&&!Array.isArray(e)&&Object.keys(e).includes("value")}(e)?e:{value:e,unit:void 0},s=function getTypedAttributeValue(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 serializeAttributes(e,t=!1){const n={};for(const[r,s]of Object.entries(e??{})){const e=attributeValueToTypedAttributeValue(s,t);e&&(n[r]=e)}return n}var s=n(3124),i=n(8284),a=n(703),o=n(3939),c=n(9228),l=n(4351),u=n(5185),d=n(6837),h=n(3752),p=n(5366),m=n(321);const g=0,f=1;let v=!1;function spanToTransactionTraceContext(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:a,origin:o,links:c}=spanToJSON(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:a,origin:o,links:c}}function spanToTraceContext(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:spanToJSON(e).parent_span_id,i=(0,c.Lb)(e).scope;return{parent_span_id:s,span_id:r?i?.getPropagationContext().propagationSpanId||(0,u.Z)():t,trace_id:n}}function spanToTraceHeader(e){const{traceId:t,spanId:n}=e.spanContext(),r=spanIsSampled(e);return(0,h.TC)(t,n,r)}function spanToTraceparentHeader(e){const{traceId:t,spanId:n}=e.spanContext(),r=spanIsSampled(e);return(0,h.Iy)(t,n,r)}function convertSpanLinksForEnvelope(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:s})=>({span_id:e,trace_id:t,sampled:n===f,attributes:s,...r})):void 0}function getStreamedSpanLinks(e){return e?.length?e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===f,attributes:r})):void 0}function spanTimeInputToSeconds(e){return"number"==typeof e?ensureTimestampInSeconds(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ensureTimestampInSeconds(e.getTime()):(0,d.zf)()}function ensureTimestampInSeconds(e){return e>9999999999?e/1e3:e}function spanToJSON(e){if(spanIsSentrySpan(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(spanIsOpenTelemetrySdkTraceBaseSpan(e)){const{attributes:r,startTime:s,name:i,endTime:o,status:c,links:l}=e;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:getOtelParentSpanId(e),start_timestamp:spanTimeInputToSeconds(s),timestamp:spanTimeInputToSeconds(o)||void 0,status:getStatusMessage(c),op:r[a.uT],origin:r[a.JD],links:convertSpanLinksForEnvelope(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function getOtelParentSpanId(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function streamedSpanJsonToSerializedSpan(e){return{...e,attributes:serializeAttributes(e.attributes),links:e.links?.map(e=>({...e,attributes:serializeAttributes(e.attributes)}))}}function spanIsOpenTelemetrySdkTraceBaseSpan(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function spanIsSentrySpan(e){return"function"==typeof e.getSpanJSON}function spanIsSampled(e){const{traceFlags:t}=e.spanContext();return t===f}function getStatusMessage(e){if(e&&e.code!==o.a3)return e.code===o.F3?"ok":e.message||"internal_error"}function getSimpleStatus(e){return e&&e.code!==o.F3&&e.code!==o.a3&&"cancelled"!==e.message?"error":"ok"}function addStatusMessageAttribute(e,t){const n="error"===getSimpleStatus(t)?t?.message:void 0;return{...n&&{[a.Ft]:n},...e}}const b="_sentryChildSpans",_="_sentryRootSpan";function addChildSpanToSpan(e,t){const n=e[_]||e;(0,l.my)(t,_,n),spanIsSampled(e)&&(e.isRecording()||n.isRecording())&&(e[b]?e[b].add(t):(0,l.my)(e,b,new Set([t])))}function removeChildSpanFromSpan(e,t){e[b]&&e[b].delete(t)}function getSpanDescendants(e){const t=new Set;return function addSpanChildren(e){if(!t.has(e)&&spanIsSampled(e)){t.add(e);const n=e[b]?Array.from(e[b]):[];for(const e of n)addSpanChildren(e)}}(e),Array.from(t)}const S=INTERNAL_getSegmentSpan;function INTERNAL_getSegmentSpan(e){return e[_]||e}function getActiveSpan(){const e=(0,s.EU)(),t=(0,r.h)(e);return t.getActiveSpan?t.getActiveSpan():(0,m.f)((0,i.o5)())}function showSpanDropWarning(){v||((0,p.pq)(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),v=!0)}},3521(e,t,n){"use strict";n.d(t,{RV:()=>getFramesFromEvent,gd:()=>createStackParser,qQ:()=>getFunctionName,vk:()=>stackParserFromStackParserOptions,yF:()=>r});const r="?",s=/\(error: (.*)\)/,i=/captureMessage|captureException/;function createStackParser(...e){const t=e.sort((e,t)=>
29e[0]-t[0]).map(e=>e[1]);return(e,n=0,a=0)=>{const o=[],c=e.split("\n");for(let e=n;e<c.length;e++){let n=c[e];n.length>1024&&(n=n.slice(0,1024));const r=s.test(n)?n.replace(s,"$1"):n;if(!r.includes("Error: ")){for(const e of t){const t=e(r);if(t){o.push(t);break}}if(o.length>=50+a)break}}return function stripSentryFramesAndReverse(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(getLastStackFrame(t).function||"")&&t.pop();t.reverse(),i.test(getLastStackFrame(t).function||"")&&(t.pop(),i.test(getLastStackFrame(t).function||"")&&t.pop());return t.slice(0,50).map(e=>({...e,filename:e.filename||getLastStackFrame(t).filename,function:e.function||r}))}(o.slice(a))}}function stackParserFromStackParserOptions(e){return Array.isArray(e)?createStackParser(...e):e}function getLastStackFrame(e){return e[e.length-1]||{}}const a="<anonymous>";function getFunctionName(e){try{return e&&"function"==typeof e&&e.name||a}catch{return a}}function getFramesFromEvent(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}}}},7161(e,t,n){"use strict";n.d(t,{Xr:()=>stringMatchesSomePattern,_c:()=>isMatchingPattern,gt:()=>safeJoin,xv:()=>truncate});var r=n(6868),s=n(1306);function truncate(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function safeJoin(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const i=e[t];(0,r.sO)(i)?n.push(String(i)):i instanceof Error?n.push(i.message?`${i.name}: ${i.message}`:i.name):n.push((0,s.ng)(void 0,i))}return n.join(t)}function isMatchingPattern(e,t,n=!1){return!!(0,r.Kg)(e)&&((0,r.gd)(t)?t.test(e):(0,r.Kg)(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}function stringMatchesSomePattern(e,t=[],n=!1){for(const r of t)if(isMatchingPattern(e,r,n))return!0;return!1}},5142(e,t,n){"use strict";n.d(t,{XW:()=>resolvedSyncPromise,xg:()=>rejectedSyncPromise});var r=n(6868);function resolvedSyncPromise(e){return new SyncPromise(t=>{t(e)})}function rejectedSyncPromise(e){return new SyncPromise((t,n)=>{n(e)})}class SyncPromise{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new SyncPromise((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new SyncPromise((t,n)=>{let r,s;return this.then(t=>{s=!1,r=t,e&&e()},t=>{s=!0,r=t,e&&e()}).then(()=>{s?n(r):t(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 setResult=(e,t)=>{0===this._state&&((0,r.Qg)(t)?t.then(resolve,reject):(this._state=e,this._value=t,this._executeHandlers()))},resolve=e=>{setResult(1,e)},reject=e=>{setResult(2,e)};try{e(resolve,reject)}catch(e){reject(e)}}}},6837(e,t,n){"use strict";n.d(t,{k3:()=>browserPerformanceTimeOrigin,lu:()=>dateTimestampInSeconds,zf:()=>timestampInSeconds});var r=n(7799),s=n(5969);function dateTimestampInSeconds(){return(0,r.Wk)()/1e3}let i;function timestampInSeconds(){return(i??(i=function createUnixTimestampInSecondsFunc(){const{performance:e}=s.O;if(!e?.now||!e.timeOrigin)return dateTimestampInSeconds;const t=e.timeOrigin;return()=>(t+(0,r.Qw)(()=>e.now()))/1e3}()))()}let a=null;function browserPerformanceTimeOrigin(){return null===a&&(a=function getBrowserTimeOrigin(){const{performance:e}=s.O;if(!e?.now)return;const t=3e5,n=(0,r.Qw)(()=>e.now()),i=(0,r.Wk)(),a=e.timeOrigin;if("number"==typeof a&&Math.abs(a+n-i)<t)return a;const o=e.timing?.navigationStart;if("number"==typeof o&&Math.abs(o+n-i)<t)return o;return i-n}()),a}},3752(e,t,n){"use strict";n.d(t,{Iy:()=>generateTraceparentHeader,MI:()=>o,TC:()=>generateSentryTraceHeader,kM:()=>propagationContextFromHeaders});var r=n(724),s=n(7753),i=n(5185),a=n(7799);const o=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function propagationContextFromHeaders(e,t){const n=function extractTraceparentData(e){if(!e)return;const t=e.match(o);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),c=(0,r.yD)(t);if(!n?.traceId)return{traceId:(0,i.e)(),sampleRand:(0,a.hY)()};const l=function getSampleRandFromTraceparentAndDsc(e,t){const n=(0,s.i)(t?.sample_rand);if(void 0!==n)return n;const r=(0,s.i)(t?.sample_rate);return r&&void 0!==e?.parentSampled?e.parentSampled?(0,a.hY)()*r:r+(0,a.hY)()*(1-r):(0,a.hY)()}(n,c);c&&(c.sample_rand=l.toString());const{traceId:u,parentSpanId:d,parentSampled:h}=n;return{traceId:u,parentSpanId:d,sampled:h,dsc:c||{},sampleRand:l}}function generateSentryTraceHeader(e=(0,i.e)(),t=(0,i.Z)(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function generateTraceparentHeader(e=(0,i.e)(),t=(0,i.Z)(),n){return`00-${e}-${t}-${n?"01":"00"}`}},438(e,t,n){"use strict";n.d(t,{M:()=>r});const r="10.72.0"},2071(e,t,n){"use strict";n.d(t,{Z:()=>makeWeakRef,q:()=>derefWeakRef});var r=n(5969);function makeWeakRef(e){try{const t=r.O.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}function derefWeakRef(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}},5969(e,t,n){"use strict";n.d(t,{O:()=>r});const r=globalThis}},r={};function __webpack_require__(e){var t=r[e];if(void 0!==t)return t.exports;var s=r[e]={exports:{}};return n[e](s,s.exports,__webpack_require__),s.exports}__webpack_require__.m=n,__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce((t,n)=>(__webpack_require__.f[n](e,t),t),[])),__webpack_require__.u=e=>"js/"+e+"."+e+".js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}
29}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="front:",__webpack_require__.l=(n,r,s,i)=>{if(e[n])e[n].push(r);else{var a,o;if(void 0!==s)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var u=c[l];if(u.getAttribute("src")==n||u.getAttribute("data-webpack")==t+s){a=u;break}}a||(o=!0,(a=document.createElement("script")).charset="utf-8",__webpack_require__.nc&&a.setAttribute("nonce",__webpack_require__.nc),a.setAttribute("data-webpack",t+s),a.src=n),e[n]=[r];var onScriptComplete=(t,r)=>{a.onerror=a.onload=null,clearTimeout(d);var s=e[n];if(delete e[n],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach(e=>e(r)),t)return t(r)},d=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=onScriptComplete.bind(null,a.onerror),a.onload=onScriptComplete.bind(null,a.onload),o&&document.head.appendChild(a)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e+"../"})(),(()=>{var e={523:0};__webpack_require__.f.j=(t,n)=>{var r=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var s=new Promise((n,s)=>r=e[t]=[n,s]);n.push(r[2]=s);var i=__webpack_require__.p+__webpack_require__.u(t),a=new Error;__webpack_require__.l(i,n=>{if(__webpack_require__.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var s=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+s+": "+i+")",a.name="ChunkLoadError",a.type=s,a.request=i,r[1](a)}},"chunk-"+t,t)}};var webpackJsonpCallback=(t,n)=>{var r,s,[i,a,o]=n,c=0;if(i.some(t=>0!==e[t])){for(r in a)__webpack_require__.o(a,r)&&(__webpack_require__.m[r]=a[r]);if(o)o(__webpack_require__)}for(t&&t(n);c<i.length;c++)s=i[c],__webpack_require__.o(e,s)&&e[s]&&e[s][0](),e[s]=0},t=self.webpackChunkfront=self.webpackChunkfront||[];t.forEach(webpackJsonpCallback.bind(null,0)),t.push=webpackJsonpCallback.bind(null,t.push.bind(t))})(),(()=>{"use strict";var e=__webpack_require__(2891),t=__webpack_require__(89),n=__webpack_require__(862),r=__webpack_require__(5366);const s=[];function getIntegrationsToSetup(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 filterDuplicates(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 afterSetupIntegrations(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function setupIntegration(e,t,i){if(i[t.name])n.T&&r.Yz.log(`Integration skipped because it was already installed: ${t.name}`);else{if(i[t.name]=t,s.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),s.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))}),n.T&&r.Yz.log(`Integration installed: ${t.name}`)}}function getPossibleEventMessages(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 i=__webpack_require__(1964),a=__webpack_require__(7161);const o=[/^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$/],eventFiltersIntegration=(e={})=>{let t;return{name:"EventFilters",setup(n){const r=n.getOptions();t=_mergeOptions(e,r)},processEvent(s,o,c){if(!t){const n=c.getOptions();t=_mergeOptions(e,n)}return function _shouldDropEvent(e,t){if(e.type){if("transaction"===e.type&&function _isIgnoredTransaction(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&(0,a.Xr)(n,t)}(e,t.ignoreTransactions))return n.T&&r.Yz.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${(0,i.$X)(e)}`),!0}else{if(function _isIgnoredError(e,t){if(!t?.length)return!1;return getPossibleEventMessages(e).some(e=>(0,a.Xr)(e,t))}(e,t.ignoreErrors))return n.T&&r.Yz.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${(0,i.$X)(e)}`),!0;if(function _isUselessError(e){if(!e.exception?.values?.length)return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return n.T&&r.Yz.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${(0,i.$X)(e)}`),!0;if(function _isDeniedUrl(e,t){if(!t?.length)return!1;const n=_getEventFilterUrl(e);return!!n&&(0,a.Xr)(n,t)}(e,t.denyUrls))return n.T&&r.Yz.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${(0,i.$X)(e)}.\nUrl: ${_getEventFilterUrl(e)}`),!0;if(!function _isAllowedUrl(e,t){if(!t?.length)return!0;const n=_getEventFilterUrl(e);return!n||(0,a.Xr)(n,t)}(e,t.allowUrls))return n.T&&r.Yz.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${(0,i.$X)(e)}.\nUrl: ${_getEventFilterUrl(e)}`),!0}return!1}(s,t)?null:s}}},inboundFiltersIntegration=(e={})=>({...eventFiltersIntegration(e),name:"InboundFilters"});function _mergeOptions(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:o],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function _getEventFilterUrl(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function _getLastValidUrl(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}(n):null}catch{return n.T&&r.Yz.error(`Cannot extract url for event ${(0,i.$X)(e)}`),null}}var c=__webpack_require__(8284),l=__webpack_require__(4351);const u=new WeakMap,functionToStringIntegration=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=(0,l.sp)(this);let r;try{u.has((0,c.KU)())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){u.set(e,!0)}});var d=__webpack_require__(703),h=__webpack_require__(3181);const conversationIdIntegration=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=(0,c.o5)().getScopeData(),n=(0,c.rm)().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:s}=(0,h.et)(e);if(!t?.startsWith("gen_ai.")&&!n["ai.operationId"]&&!s?.startsWith("ai."))return;e.setAttribute(d.Fy,r)}})}});var p=__webpack_require__(3521);const dedupeIntegration=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function dedupe_shouldDropEvent(e,t){if(!t)return!1;if(function _isSameMessageEvent(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!_isSameFingerprint(e,t))return!1;if(!_isSameStacktrace(e,t))return!1;return!0}(e,t))return!0;
29if(function _isSameExceptionEvent(e,t){const n=_getExceptionFromEvent(t),r=_getExceptionFromEvent(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!_isSameFingerprint(e,t))return!1;if(!_isSameStacktrace(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return n.T&&r.Yz.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function _isSameStacktrace(e,t){let n=(0,p.RV)(e),r=(0,p.RV)(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],s=n[e];if(t.filename!==s.filename||t.lineno!==s.lineno||t.colno!==s.colno||t.function!==s.function)return!1}return!0}function _isSameFingerprint(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 _getExceptionFromEvent(e){return e.exception?.values?.[0]}var m=__webpack_require__(1306);function initAndBind(e,t){!0===t.debug&&(n.T?r.Yz.enable():(0,r.pq)(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}));(0,c.o5)().update(t.initialScope);const s=new e(t);return function setCurrentClient(e){(0,c.o5)().setClient(e)}(s),s.init(),s}function getBaseApiEndpoint(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function getEnvelopeEndpointWithUrlEncodedAuth(e,t,n){return t||`${function _getIngestEndpoint(e){return`${getBaseApiEndpoint(e)}${e.projectId}/envelope/`}(e)}?${function _encodedAuth(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 g=__webpack_require__(1589),f=__webpack_require__(2810);function isStreamedBeforeSendSpanCallback(e){return!!e&&"function"==typeof e&&"_streamed"in e&&!!e._streamed}var v=__webpack_require__(3507),b=__webpack_require__(3124),_=__webpack_require__(7799),S=__webpack_require__(5969);function createEnvelope(e,t=[]){return[e,t]}function addItemToEnvelope(e,t){const[n,r]=e;return[n,[...r,t]]}function forEachEnvelopeItem(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function encodeUTF8(e){const t=(0,b.Se)(S.O);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function serializeEnvelope(e){const[t,n]=e;let r=JSON.stringify(t);function append(e){"string"==typeof r?r="string"==typeof e?r+e:[encodeUTF8(r),e]:r.push("string"==typeof e?encodeUTF8(e):e)}for(const e of n){const[t,n]=e;if(append(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)append(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify((0,m.S8)(n))}append(e)}}return"string"==typeof r?r:function concatBuffers(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function createSpanEnvelopeItem(e){return[{type:"span"},e]}function createAttachmentEnvelopeItem(e){const t="string"==typeof e.data?encodeUTF8(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const y={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 envelopeItemTypeToDataCategory(e){return function _isOverriddenType(e){return e in y}(e)?y[e]:e}function getSdkMetadataForEnvelopeHeader(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function logIgnoredSpan(e){r.Yz.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function shouldIgnoreSpan(e,t){if(!t?.length)return!1;for(const r of t){if(isStringOrRegExp(r)){if(e.description&&(0,a._c)(e.description,r))return n.T&&logIgnoredSpan(e),!0;continue}const t=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!t)continue;const s=!r.name||e.description&&(0,a._c)(e.description,r.name),i=!r.op||e.op&&(0,a._c)(e.op,r.op),o=!r.attributes||Object.entries(r.attributes).every(([t,n])=>_matchesAttributeValue(e.attributes?.[t],n));if(s&&i&&o)return n.T&&logIgnoredSpan(e),!0}return!1}function _matchesAttributeValue(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?(0,a._c)(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function reparentChildSpans(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function isStringOrRegExp(e){return"string"==typeof e||e instanceof RegExp}function createEventEnvelope(e,t,n,r){const s=getSdkMetadataForEnvelopeHeader(n),i=e.type&&"replay_event"!==e.type?e.type:"event";!function _enhanceEventWithSdkInfo(e,t){if(!t)return e;const n=e.sdk||{};return 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}(e,n?.sdk);const a=function createEventEnvelopeHeaders(e,t,n,r){const s=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date((0,_.Wk)()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:(0,v.SB)(r)},...s&&{trace:s}}}(e,s,r,t);delete e.sdkProcessingMetadata;return createEnvelope(a,[[{type:i},e]])}
29function isNodeEnv(){return!function isBrowserBundle(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}()&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function isBrowser(){return"undefined"!=typeof window&&(!isNodeEnv()||function isElectronNodeRenderer(){const e=S.O.process;return"renderer"===e?.type}())}function createLogContainerEnvelopeItem(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...isBrowser()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function _INTERNAL_flushLogsBuffer(e,t){const n=t??_INTERNAL_getLogBuffer(e)??[];if(0===n.length)return;const r=e.getOptions(),s=function createLogEnvelope(e,t,n,r,s){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=(0,v.SB)(r)),createEnvelope(i,[createLogContainerEnvelopeItem(e,s)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);_getBufferMap().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function _INTERNAL_getLogBuffer(e){return _getBufferMap().get(e)}function _getBufferMap(){return(0,b.BY)("clientToLogBufferMap",()=>new WeakMap)}function createMetricContainerEnvelopeItem(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,...isBrowser()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function _INTERNAL_flushMetricsBuffer(e,t){const n=t??_INTERNAL_getMetricBuffer(e)??[];if(0===n.length)return;const r=e.getOptions(),s=function createMetricEnvelope(e,t,n,r,s){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=(0,v.SB)(r)),createEnvelope(i,[createMetricContainerEnvelopeItem(e,s)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);internal_getBufferMap().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function _INTERNAL_getMetricBuffer(e){return internal_getBufferMap().get(e)}function internal_getBufferMap(){return(0,b.BY)("clientToMetricBufferMap",()=>new WeakMap)}var T=__webpack_require__(7540);function hasSpanStreamingEnabled(e){return"stream"===e.getOptions().traceLifecycle}function spanJsonToSerializedStreamedSpan(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(0,h.PL)(t)}var E=__webpack_require__(5142);function safeUnref(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}const w=Symbol.for("SentryBufferFullError");function makePromiseBuffer(e=100){const t=new Set;function remove(e){t.delete(e)}return{get $(){return Array.from(t)},add:function add(n){if(!function isReady(){return t.size<e}())return(0,E.xg)(w);const r=n();return t.add(r),r.then(()=>remove(r),()=>remove(r)),r},drain:function drain(e){if(!t.size)return(0,E.XW)(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>safeUnref(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function updateRateLimits(e,{statusCode:t,headers:n},r=(0,_.Wk)()){const s={...e},i=n?.["x-sentry-rate-limits"],a=n?.["retry-after"];if(i)for(const e of i.trim().split(",")){const[t,n,,,i]=e.split(":",5),a=parseInt(t,10),o=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(s[e]=r+o);else s.all=r+o}else a?s.all=r+function parseRetryAfterHeader(e,t=(0,_.Wk)()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(s.all=r+6e4);return s}function createTransport(e,t,s=makePromiseBuffer(e.bufferSize||64)){let i={};return{send:function send(a){const o=[];if(forEachEnvelopeItem(a,(t,n)=>{const r=envelopeItemTypeToDataCategory(n);!function isRateLimited(e,t,n=(0,_.Wk)()){return function disabledUntil(e,t){return e[t]||e.all||0}(e,t)>n}(i,r)?o.push(t):e.recordDroppedEvent("ratelimit_backoff",r)}),0===o.length)return Promise.resolve({});const c=createEnvelope(a[0],o),recordEnvelopeLoss=t=>{!function envelopeContainsItemType(e,t){return forEachEnvelopeItem(e,(e,n)=>t.includes(n))}(c,["client_report"])?forEachEnvelopeItem(c,(n,r)=>{e.recordDroppedEvent(t,envelopeItemTypeToDataCategory(r))}):n.T&&r.Yz.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return s.add(()=>t({body:serializeEnvelope(c)}).then(e=>413===e.statusCode?(n.T&&r.Yz.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),recordEnvelopeLoss("send_error"),e):(n.T&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&r.Yz.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=updateRateLimits(i,e),e),e=>
29{throw recordEnvelopeLoss("network_error"),n.T&&r.Yz.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===w)return n.T&&r.Yz.error("Skipped sending event because buffer is full."),recordEnvelopeLoss("queue_overflow"),Promise.resolve({});throw e})},flush:e=>s.drain(e)}}var C=__webpack_require__(6837);var I=__webpack_require__(6868),A=__webpack_require__(3458),k=__webpack_require__(7753),x=__webpack_require__(8234);const O=["forwarded","-ip","remote-","via","-user"];const L={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 resolveDataCollectionOptions(e){const t=null!=e.dataCollection?L:function defaultPiiToCollectionOptions(e){return!0===e?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:O},httpHeaders:{request:{deny:O},response:{deny:O}},httpBodies:[],urlQueryParams:{deny:O},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}(e.sendDefaultPii),n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}const R="Not capturing exception because it's already been captured.",M="Discarded session because of missing or non-string release",N=Symbol.for("SentryInternalError"),P=Symbol.for("SentryDoNotSendEventError");function _makeInternalError(e){return{message:e,[N]:!0}}function _makeDoNotSendEventError(e){return{message:e,[P]:!0}}function _isInternalError(e){return(0,I.Z4)(e)&&N in e}function _isDoNotSendEventError(e){return(0,I.Z4)(e)&&P in e}function setupWeightBasedFlushing(e,t,n,r,s){let i,a=0,o=!1;e.on(n,()=>{a=0,clearTimeout(i),o=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)s(e);else if(!o){const t=e.getOptions()._flushInterval??5e3;t>0&&(o=!0,i=safeUnref(setTimeout(()=>{s(e)},t)))}}),e.on("flush",()=>{s(e)})}class Client{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=makePromiseBuffer(e.transportOptions?.bufferSize??64),this._dataCollection=resolveDataCollectionOptions(e),e.dsn?this._dsn=(0,v.AD)(e.dsn):n.T&&r.Yz.warn("No DSN provided, client will not send events."),this._dsn){const t=getEnvelopeEndpointWithUrlEncodedAuth(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&&setupWeightBasedFlushing(this,"afterCaptureLog","flushLogs",estimateLogSizeInBytes,_INTERNAL_flushLogsBuffer);(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&setupWeightBasedFlushing(this,"afterCaptureMetric","flushMetrics",estimateMetricSizeInBytes,_INTERNAL_flushMetricsBuffer)}captureException(e,t,s){const a=(0,i.eJ)();if((0,i.GR)(e))return n.T&&r.Yz.log(R),a;const o={event_id:a,...t};return this._process(()=>this.eventFromException(e,o).then(e=>this._captureEvent(e,o,s)).then(e=>e),"error"),o.event_id}captureMessage(e,t,n,r){const s={event_id:(0,i.eJ)(),...n},a=(0,I.NF)(e)?e:String(e),o=(0,I.sO)(e),c=o?this.eventFromMessage(
29a,t,s):this.eventFromException(e,s);return this._process(()=>c.then(e=>this._captureEvent(e,s,r)),o?"unknown":"error"),s.event_id}captureEvent(e,t,s){const a=(0,i.eJ)();if(t?.originalException&&(0,i.GR)(t.originalException))return n.T&&r.Yz.log(R),a;const o={event_id:a,...t},c=e.sdkProcessingMetadata||{},l=c.capturedSpanScope,u=c.capturedSpanIsolationScope,d=getDataCategoryByType(e.type);return this._process(()=>this._captureEvent(e,o,l||s,u),d),o.event_id}captureSession(e){this.sendSession(e),(0,T.qO)(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),setupIntegration(this,e,this._integrations),t||afterSetupIntegrations(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function extractGenAiSpansFromEvent(e,t){if("transaction"!==e.type||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!1===t.getOptions().streamGenAiSpans||hasSpanStreamingEnabled(t))return;const n=[],r=[];for(const t of e.spans)t.op?.startsWith("gen_ai.")?n.push(spanJsonToSerializedStreamedSpan(t)):r.push(t);if(0===n.length)return;e.spans=r;const s=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...isBrowser()&&{ingest_settings:{infer_ip:s,infer_user_agent:s}},items:n}]}(e,this);let r=createEventEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])r=addItemToEnvelope(r,createAttachmentEnvelopeItem(e));n&&(r=addItemToEnvelope(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:s=g.U}=this._options;if("aggregates"in e){const i=e.attrs||{};if(!i.release&&!t)return void(n.T&&r.Yz.warn(M));i.release=i.release||t,i.environment=i.environment||s,e.attrs=i}else{if(!e.release&&!t)return void(n.T&&r.Yz.warn(M));e.release=e.release||t,e.environment=e.environment||s}this.emit("beforeSendSession",e);const i=function createSessionEnvelope(e,t,n,r){const s=getSdkMetadataForEnvelopeHeader(n);return createEnvelope({sent_at:new Date((0,_.Wk)()).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:(0,v.SB)(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,t,s=1){if(this._options.sendClientReports){const i=`${e}:${t}`;n.T&&r.Yz.log(`Recording outcome: "${i}"${s>1?` (${s} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+s}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,uniqueCallback=(...e)=>t(...e);return n.add(uniqueCallback),()=>{n.delete(uniqueCallback)}}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(e){return n.T&&r.Yz.error("Error while sending envelope:",e),{}}return n.T&&r.Yz.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function setupIntegrations(e,t){const n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&setupIntegration(e,t,n)}),n}(this,e),afterSetupIntegrations(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const s=t.exception?.values;if(s){r=!0,n=!1;for(const e of s)if(!1===e.mechanism?.handled){n=!0;break}}const i="ok"===e.status;(i&&0===e.errors||i&&n)&&((0,T.qO)(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 s=this.getOptions(),i=this.getIntegrationNames();
29return!t.integrations&&i.length&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),(0,x.mG)(s,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...(0,c.vn)(n)},...e.contexts};const r=(0,f.ao)(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},s=(0,c.o5)(),i=(0,c.rm)()){return n.T&&isErrorEvent(e)&&r.Yz.log(`Captured error event \`${getPossibleEventMessages(e)[0]||"<unknown>"}\``),this._processEvent(e,t,s,i).then(e=>e.event_id,e=>{n.T&&(_isDoNotSendEventError(e)?r.Yz.log(e.message):_isInternalError(e)?r.Yz.warn(e.message):r.Yz.warn(e))})}_processEvent(e,t,n,r){const s=this.getOptions(),{sampleRate:i}=s,a=isTransactionEvent(e),o=isErrorEvent(e),c=`before send for type \`${e.type||"error"}\``,l=void 0===i?void 0:(0,k.i)(i),u=getDataCategoryByType(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",u),_makeDoNotSendEventError("An event processor returned `null`, will not send event.");if(!0===t.data?.__sentry__)return e;const n=function processBeforeSend(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,ignoreSpans:a}=t,o=!isStreamedBeforeSendSpanCallback(t.beforeSendSpan)&&t.beforeSendSpan;let c=n;if(isErrorEvent(c)&&s)return s(c,r);if(isTransactionEvent(c)){if(o||a){const t=function convertTransactionEventToSpanJson(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:a,op:o}=e.contexts?.trace??{};return{data:a??{},description:e.transaction,op:o,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:a?.[d.E1],exclusive_time:a?.[d.jG],measurements:e.measurements,is_segment:!0}}(c);if(a?.length&&shouldIgnoreSpan({description:t.description,op:t.op,attributes:t.data},a))return null;if(o){const e=o(t);e?c=(0,A.h)(n,function convertSpanJsonToTransactionEvent(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[d.E1]:e.profile_id},...e.exclusive_time&&{[d.jG]:e.exclusive_time}}}},measurements:e.measurements}}(e)):(0,h.xl)()}if(c.spans){const t=[],n=c.spans;for(const e of n)if(a?.length&&shouldIgnoreSpan({description:e.description,op:e.op,attributes:e.data},a))reparentChildSpans(n,e);else if(o){const n=o(e);n?t.push(n):((0,h.xl)(),t.push(e))}else t.push(e);const r=c.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),c.spans=t}}if(i){if(c.spans){const e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(c,r)}}return c}(this,s,e,t);return function _validateBeforeSendResult(e,t){const n=`${t} must return \`null\` or a valid event.`;if((0,I.Qg)(e))return e.then(e=>{if(!(0,I.Qd)(e)&&null!==e)throw _makeInternalError(n);return e},e=>{throw _makeInternalError(`${t} rejected with ${e}`)});if(!(0,I.Qd)(e)&&null!==e)throw _makeInternalError(n);return e}(n,c)}).then(s=>{if(null===s){if(this.recordDroppedEvent("before_send",u),a){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw _makeDoNotSendEventError(`${c} returned \`null\`, will not send event.`)}const d=n.getSession()||r.getSession();if(o&&d&&this._updateSessionFromEvent(d,s),o&&"number"==typeof l&&(0,_.hY)()>l)throw this.recordDroppedEvent("sample_rate","error"),_makeDoNotSendEventError(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);if(a){const e=(s.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(s.spans?s.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const h=s.transaction_info;if(a&&h&&s.transaction!==e.transaction){const e="custom";s.transaction_info={...h,source:e}}return this.sendEvent(s,t),s}).then(null,e=>{if(_isDoNotSendEventError(e)||_isInternalError(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),_makeInternalError(`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===w&&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(){n.T&&r.Yz.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(n.T&&r.Yz.log("No outcomes to send"));if(!this._dsn)return void(n.T&&r.Yz.log("No dsn provided, will not send outcomes"));n.T&&r.Yz.log("Sending outcomes:",e);const t=function createClientReportEnvelope(e,t,n){return createEnvelope(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:n||(0,C.lu)(),discarded_events:e}]])}(e,this._options.tunnel&&(0,v.SB)(this._dsn));this.sendEnvelope(t)}}function getDataCategoryByType(e){return"replay_event"===e?"replay":e||"error"}function isErrorEvent(e){return void 0===e.type}function isTransactionEvent(e){return"transaction"===e.type}function estimateMetricSizeInBytes(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+estimateAttributesSizeInBytes(e.attributes)}function estimateLogSizeInBytes(e){let t=0;return e.message&&(t+=2*e.message.length),t+estimateAttributesSizeInBytes(e.attributes)}function estimateAttributesSizeInBytes(e){if(!e)return 0;let t=0;
29return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*estimatePrimitiveSizeInBytes(e[0]):(0,I.sO)(e)?t+=estimatePrimitiveSizeInBytes(e):t+=100}),t}function estimatePrimitiveSizeInBytes(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}var F=__webpack_require__(438);function addAutoIpAddressToSession(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function _enhanceErrorWithSentryInfo(e){return function hasSentryFetchUrlHost(e){return(0,I.bJ)(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function eventbuilder_exceptionFromError(e,t){const n=eventbuilder_parseStackFrames(e,t),r={type:extractType(t),value:extractMessage(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function eventFromPlainObject(e,t,n,r){const s=(0,c.KU)(),i=s?.getOptions().normalizeDepth,a=function eventbuilder_getErrorPropertyFromObject(e){return Object.values(e).find(I.bJ)}(t),o={__serialized__:(0,m.cd)(t,i)};if(a)return{exception:{values:[eventbuilder_exceptionFromError(e,a)]},extra:o};const l={exception:{values:[{type:(0,I.xH)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(t,{isUnhandledRejection:r})}]},extra:o};if(n){const t=eventbuilder_parseStackFrames(e,n);t.length&&(l.exception.values[0].stacktrace={frames:t})}return l}function eventFromError(e,t){return{exception:{values:[eventbuilder_exceptionFromError(e,t)]}}}function eventbuilder_parseStackFrames(e,t){const n=t.stacktrace||t.stack||"",r=function getSkipFirstStackStringLines(e){if(e&&D.test(e.message))return 1;return 0}(t),s=function getPopFirstTopFrames(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,s)}catch{}return[]}const D=/Minified React error #\d+;/i;function isWebAssemblyException(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function extractType(e){const t=e?.name;if(!t&&isWebAssemblyException(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function extractMessage(e){const t=e?.message;return isWebAssemblyException(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?_enhanceErrorWithSentryInfo(t.error):_enhanceErrorWithSentryInfo(e):"No error message"}function eventbuilder_eventFromUnknownInput(e,t,n,r,s){let a;if((0,I.T2)(t)&&t.error){return eventFromError(e,t.error)}if((0,I.BD)(t)||(0,I.W6)(t)){const s=t;if("stack"in t){a=eventFromError(e,t);const s=a.exception?.values?.[0];if(r&&n&&s&&!s.stacktrace){const t=eventbuilder_parseStackFrames(e,n);t.length&&(s.stacktrace={frames:t},(0,i.M6)(a,{synthetic:!0}))}}else{const t=s.name||((0,I.BD)(s)?"DOMError":"DOMException"),o=s.message?`${t}: ${s.message}`:t;a=eventFromString(e,o,n,r),(0,i.gO)(a,o)}return"code"in s&&(a.tags={...a.tags,"DOMException.code":`${s.code}`}),a}if((0,I.bJ)(t))return eventFromError(e,t);if((0,I.Qd)(t)||(0,I.xH)(t)){return a=eventFromPlainObject(e,t,n,s),(0,i.M6)(a,{synthetic:!0}),a}return a=eventFromString(e,t,n,r),(0,i.gO)(a,`${t}`,void 0),(0,i.M6)(a,{synthetic:!0}),a}function eventFromString(e,t,n,r){const s={};if(r&&n){const r=eventbuilder_parseStackFrames(e,n);r.length&&(s.exception={values:[{value:t,stacktrace:{frames:r}}]}),(0,i.M6)(s,{synthetic:!0})}if((0,I.NF)(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return s.logentry={message:e,params:n},s}return s.message=t,s}function getNonErrorObjectExceptionValue(e,{isUnhandledRejection:t}){const n=(0,l.HF)(e),r=t?"promise rejection":"exception";if((0,I.T2)(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if((0,I.xH)(e)){return`Event \`${function eventbuilder_getObjectClassName(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}var B=__webpack_require__(1199);const V=S.O;function getLocationHref(){try{return V.document.location.href}catch{return""}}const H=S.O;let U=0;function shouldIgnoreOnError(){return U>0}function wrap(e,t={}){if(!function isFunction(e){return"function"==typeof e}(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const t=e.__sentry_wrapped__;return"function"==typeof t?t:e}if((0,l.sp)(e))return e}catch{return e}const sentryWrapped=function(...n){S.O._sentryWrappedDepth=(S.O._sentryWrappedDepth||0)+1;try{const r=n.map(e=>wrap(e,t));return e.apply(this,r)}catch(e){throw function ignoreNextOnError(){U++,setTimeout(()=>{U--})}(),(0,c.v4)(r=>{r.addEventProcessor(e=>(t.mechanism&&((0,i.gO)(e,void 0,void 0),(0,i.M6)(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),(0,B.Cp)(e)}),e}finally{S.O._sentryWrappedDepth=(S.O._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(sentryWrapped[t]=e[t])}catch{}(0,l.pO)(sentryWrapped,e),(0,l.my)(e,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>e.name})}catch{}return sentryWrapped}function getHttpRequestData(){const e=getLocationHref(),{referrer:t}=H.document||{},{userAgent:n}=H.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}class BrowserClient extends Client{constructor(e){const t=function applyDefaultOptions(e){return{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:H.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}(e);!function applySdkMetadata(e,t,n=[t],r="npm"){const s=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};s.name||(s.name=`sentry.javascript.${t}`,s.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:F.M})),s.version=F.M)}(t,"browser",["browser"],H.SENTRY_SDK_SOURCE||"npm"),super(t);const{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:r}=this._options;H.document&&H.document.addEventListener("visibilitychange",()=>{"hidden"===H.document.visibilityState&&(r&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),n&&this.on("beforeSendSession",addAutoIpAddressToSession)}eventFromException(e,t){return function eventFromException(e,t,n,r){const s=eventbuilder_eventFromUnknownInput(e,t,n?.syntheticException||void 0,r);return(0,i.M6)(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),(0,E.XW)(s)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function eventbuilder_eventFromMessage(e,t,n="info",r,s){const i=eventFromString(e,t,r?.syntheticException||void 0,s);return i.level=n,r?.event_id&&(i.event_id=r.event_id),(0,E.XW)(i)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}const $={},q={};function addHandler(e,t){return $[e]=$[e]||[],$[e].push(t),()=>{const n=$[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function maybeInstrument(e,t){if(!q[e]){q[e]=!0;try{t()}catch(t){n.T&&r.Yz.error(`Error while instrumenting ${e}`,t)}}}function triggerHandlers(e,t){const s=e&&$[e];if(s)for(const i of s)try{i(t)}catch(t){n.T&&r.Yz.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${(0,p.qQ)(i)}\nError:`,t)}}const j=new Set([]);const W=new Set;
29function instrumentConsole(){"console"in S.O&&r.Ow.forEach(function(e){!W.has(e)&&e in S.O.console&&(W.add(e),(0,l.GS)(S.O.console,e,function(t){return r.Z9[e]=t,function(...t){const s=t[0],i=r.Z9[e],o=j.size&&"string"==typeof s&&(0,a.Xr)(s,j);o||triggerHandlers("console",{args:t,level:e}),(!o||n.T&&r.Yz.isEnabled())&&i?.apply(S.O.console,t)}}))})}const z=S.O;function _isFetchSupported(){if(!("fetch"in z))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function isNativeFunction(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function addFetchInstrumentationHandler(e,t){const n="fetch",r=addHandler(n,e);return maybeInstrument(n,()=>instrumentFetch(void 0,t)),r}function instrumentFetch(e,t=!1){t&&!function supportsNativeFetch(){if("string"==typeof EdgeRuntime)return!0;if(!_isFetchSupported())return!1;if(isNativeFunction(z.fetch))return!0;let e=!1;const t=z.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=isNativeFunction(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){n.T&&r.Yz.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||(0,l.GS)(S.O,"fetch",function(t){return function(...n){const r=new Error,{method:s,url:i}=function parseFetchArgs(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:getUrlFromResource(t),method:hasProp(n,"method")?String(n.method).toUpperCase():(0,I.ks)(t)&&hasProp(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:getUrlFromResource(t),method:hasProp(t,"method")?String(t.method).toUpperCase():"GET"}}(n),a={args:n,fetchData:{method:s,url:i},startTimestamp:1e3*(0,C.zf)(),virtualError:r,headers:getHeadersFromFetchArgs(n)};return e||triggerHandlers("fetch",{...a}),t.apply(S.O,n).then(async t=>(e?e(t):triggerHandlers("fetch",{...a,endTimestamp:1e3*(0,C.zf)(),response:t}),t),e=>{triggerHandlers("fetch",{...a,endTimestamp:1e3*(0,C.zf)(),error:e}),(0,I.bJ)(e)&&void 0===e.stack&&(e.stack=r.stack,(0,l.my)(e,"framesToPop",1));const t=(0,c.KU)(),n=t?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==n&&(0,I.bJ)(e)&&"TypeError"===e.name&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(a.fetchData.url).host;"always"===n?e.message=`${e.message} (${t})`:(0,l.my)(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})}function streamHandler(e){let t;try{t=e.clone()}catch{return}!async function resolveResponse(e,t){if(e?.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let i=!0;for(;i;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:s}=await r.read();clearTimeout(e),s&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(e)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}(t,()=>{triggerHandlers("fetch-body-resolved",{endTimestamp:1e3*(0,C.zf)(),response:e})})}function hasProp(e,t){return(0,I.Z4)(e)&&!!e[t]}function getUrlFromResource(e){return"string"==typeof e?e:e?hasProp(e,"url")?e.url:e.toString?e.toString():"":""}function getHeadersFromFetchArgs(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if((0,I.ks)(t))return new Headers(t.headers)}catch{}}const K=100;function addBreadcrumb(e,t){const n=(0,c.KU)(),s=(0,c.rm)();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=K}=n.getOptions();if(a<=0)return;const o={timestamp:(0,C.lu)(),...e},l=i?(0,r.pq)(()=>i(o,t)):o;null!==l&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),s.addBreadcrumb(l,a))}function severityLevelFromString(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}function getBreadcrumbLogLevelFromHttpStatusCode(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}function isURLObjectRelative(e){return"isRelative"in e}function parseStringToURLObject(e,t){const n=e.indexOf("://")<=0&&0!==e.indexOf("//"),r=t??(n?"thismessage:/":void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function getSanitizedUrlStringFromUrlObject(e){if(isURLObjectRelative(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function parseUrl(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}}
29function stripDataUrlContent(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",s=e.includes(";base64,"),i=e.indexOf(",");let a="";if(t&&-1!==i){const t=e.slice(i+1);a=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${s?",base64":""}${a?`,${a}`:""}`}return e}const Y="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,G="10.72.0",J=globalThis;function getMainCarrier(){return carrier_getSentryCarrier(J),J}function carrier_getSentryCarrier(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||G,t[G]=t[G]||{}}function getGlobalSingleton(e,t,n=J){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[G]=r[G]||{};return s[e]||(s[e]=t())}const X={};function debug_logger_consoleSandbox(e){if(!("console"in J))return e();const t=J.console,n={},r=Object.keys(X);r.forEach(e=>{const r=X[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function isEnabled(){return _getLoggerSettings().enabled}function _maybeLog(e,...t){Y&&isEnabled()&&debug_logger_consoleSandbox(()=>{J.console[e](`Sentry Logger [${e}]:`,...t)})}function _getLoggerSettings(){return Y?getGlobalSingleton("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Q={enable:function enable(){_getLoggerSettings().enabled=!0},disable:function disable(){_getLoggerSettings().enabled=!1},isEnabled,log:function log(...e){_maybeLog("log",...e)},warn:function warn(...e){_maybeLog("warn",...e)},error:function error(...e){_maybeLog("error",...e)}};const Z="<anonymous>";function getFunctionName(e){try{return e&&"function"==typeof e&&e.name||Z}catch{return Z}}const ee={},te={};function handlers_addHandler(e,t){return ee[e]=ee[e]||[],ee[e].push(t),()=>{const n=ee[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function handlers_maybeInstrument(e,t){if(!te[e]){te[e]=!0;try{t()}catch(t){Y&&Q.error(`Error while instrumenting ${e}`,t)}}}function handlers_triggerHandlers(e,t){const n=e&&ee[e];if(n)for(const r of n)try{r(t)}catch(t){Y&&Q.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${getFunctionName(r)}\nError:`,t)}}function fill(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const s=n(r);"function"==typeof s&&markFunctionWrapped(s,r);try{e[t]=s}catch{Y&&Q.log(`Failed to replace method "${t}" in object`,e)}}function object_addNonEnumerableProperty(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Y&&Q.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function markFunctionWrapped(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,object_addNonEnumerableProperty(e,"__sentry_original__",t)}catch{}}let ne;function withRandomSafeContext(e){if(void 0!==ne)return ne?ne(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=J;return t in n&&"function"==typeof n[t]?(ne=n[t],ne(e)):(ne=null,e())}function safeMathRandom(){return withRandomSafeContext(()=>Math.random())}function safeDateNow(){return withRandomSafeContext(()=>Date.now())}let re;function uuid4(e=function getCrypto(){const e=J;return e.crypto||e.msCrypto}()){try{if(e?.randomUUID)return withRandomSafeContext(()=>e.randomUUID()).replace(/-/g,"")}catch{}return re||(re="10000000100040008000100000000000"),re.replace(/[018]/g,e=>(e^(15&function getRandomByte(){return 16*safeMathRandom()}())>>e/4).toString(16))}const se=J;let ie,ae,oe;function instrumentDOM(){if(!se.document)return;const e=handlers_triggerHandlers.bind(null,"dom"),t=makeDOMEventHandler(e,!0);se.document.addEventListener("click",t,!1),se.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=se,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(fill(r,"addEventListener",function(t){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=r[n]=r[n]||{refCount:0};if(!i.handler){const r=makeDOMEventHandler(e);i.handler=r,t.call(this,n,r,s)}i.refCount++}catch{}return t.call(this,n,r,s)}}),fill(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[t];
29s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,r),s.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 makeDOMEventHandler(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function getEventTarget(e){try{return e.target}catch{return null}}(n);if(function shouldSkipDOMEvent(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;object_addNonEnumerableProperty(n,"_sentryCaptured",!0),r&&!r._sentryId&&object_addNonEnumerableProperty(r,"_sentryId",uuid4());const s="keypress"===n.type?"input":n.type;if(!function isSimilarToLastCapturedEvent(e){if(e.type!==ae)return!1;try{if(!e.target||e.target._sentryId!==oe)return!1}catch{}return!0}(n)){e({event:n,name:s,global:t}),ae=n.type,oe=r?r._sentryId:void 0}clearTimeout(ie),ie=se.setTimeout(()=>{oe=void 0,ae=void 0},1e3)}}function dateTimestampInSeconds(){return safeDateNow()/1e3}let ce;function time_timestampInSeconds(){return(ce??(ce=function createUnixTimestampInSecondsFunc(){const{performance:e}=J;if(!e?.now||!e.timeOrigin)return dateTimestampInSeconds;const t=e.timeOrigin;return()=>(t+withRandomSafeContext(()=>e.now()))/1e3}()))()}let le=null;function browserPerformanceTimeOrigin(){return null===le&&(le=function getBrowserTimeOrigin(){const{performance:e}=J;if(!e?.now)return;const t=3e5,n=withRandomSafeContext(()=>e.now()),r=safeDateNow(),s=e.timeOrigin;if("number"==typeof s&&Math.abs(s+n-r)<t)return s;const i=e.timing?.navigationStart;if("number"==typeof i&&Math.abs(i+n-r)<t)return i;return r-n}()),le}const ue=Object.prototype.toString;function isBuiltin(e,t){return ue.call(e)===`[object ${t}]`}function is_isString(e){return isBuiltin(e,"String")}function is_isPrimitive(e){return null===e||function is_isParameterizedString(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}(e)||"object"!=typeof e&&"function"!=typeof e}function is_isPlainObject(e){return isBuiltin(e,"Object")}const de="__sentry_xhr_v3__";function addXhrInstrumentationHandler(e){handlers_addHandler("xhr",e),handlers_maybeInstrument("xhr",instrumentXHR)}function instrumentXHR(){if(!se.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,s=1e3*time_timestampInSeconds(),i=is_isString(n[0])?n[0].toUpperCase():void 0,a=function parseXhrUrlArg(e){if(is_isString(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!i||!a)return e.apply(t,n);t[de]={method:i,url:a,request_headers:{}},"POST"===i&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const onreadystatechangeHandler=()=>{const e=t[de];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}handlers_triggerHandlers("xhr",{endTimestamp:1e3*time_timestampInSeconds(),startTimestamp:s,xhr:t,virtualError:r}),t.removeEventListener("readystatechange",onreadystatechangeHandler)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(onreadystatechangeHandler(),e.apply(t,n))}):t.addEventListener("readystatechange",onreadystatechangeHandler),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,s]=n,i=t[de];return i&&is_isString(r)&&is_isString(s)&&(i.request_headers[r.toLowerCase()]=s),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[de];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return handlers_triggerHandlers("xhr",{startTimestamp:1e3*time_timestampInSeconds(),xhr:t}),e.apply(t,n)}})}const he=J;function supports_isNativeFunction(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}let pe;function addHistoryInstrumentationHandler(e){const t="history";handlers_addHandler(t,e),handlers_maybeInstrument(t,instrumentHistory)}function instrumentHistory(){function historyReplacementFunction(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=pe,s=function getAbsoluteUrl(e){try{return new URL(e,se.location.origin).toString()}catch{return e}}(String(n));if(pe=s,r===s)return e.apply(this,t);handlers_triggerHandlers("history",{from:r,to:s})}return e.apply(this,t)}}se.addEventListener("popstate",()=>{const e=se.location.href,t=pe;if(pe=e,t===e)return;handlers_triggerHandlers("history",{from:t,to:e})}),function supports_supportsHistory(){return"history"in he&&!!he.history}()&&(fill(se.history,"pushState",historyReplacementFunction),fill(se.history,"replaceState",historyReplacementFunction))}const me={};try{"undefined"!=typeof Node&&(me.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(me.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,me.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,me.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,me.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(me.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}
29function _safeRead(e,t,n){const r=me[t];if(r)try{return r.call(e,n)}catch{}const s=e[t];return"function"==typeof s?s.call(e,n):s}function htmlTreeAsString_htmlTreeAsString(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,a=0;const o=" > ",c=o.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++<r&&(l=htmlTreeAsString_htmlElementAsString(n,u),!("html"===l||i>1&&a+s.length*c+l.length>=d));)s.push(l),a+=l.length,n=_safeRead(n,"parentNode");return s.reverse().join(o)}catch{return"<unknown>"}}function htmlTreeAsString_htmlElementAsString(e,t){const n=[],r=_safeRead(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=_safeRead(e,"dataset");if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());const s=t?.length?t.filter(t=>_safeRead(e,"getAttribute",t)).map(t=>[t,_safeRead(e,"getAttribute",t)]):null;if(s?.length)s.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=_safeRead(e,"id");t&&n.push(`#${t}`);const r=_safeRead(e,"className");if(r&&is_isString(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const t of["aria-label","type","name","title","alt"]){const r=_safeRead(e,"getAttribute",t);r&&n.push(`[${t}="${r}"]`)}return n.join("")}const ge="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,fe=1024,breadcrumbsIntegration=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){t.console&&function addConsoleInstrumentationHandler(e){const t="console",n=addHandler(t,e);return maybeInstrument(t,instrumentConsole),n}(function _getConsoleBreadcrumbHandler(e){return function _consoleBreadcrumb(t){if((0,c.KU)()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:severityLevelFromString(t.level),message:(0,a.gt)(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${(0,a.gt)(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}addBreadcrumb(n,{input:t.args,level:t.level})}}(e)),t.dom&&function addClickKeypressInstrumentationHandler(e){handlers_addHandler("dom",e),handlers_maybeInstrument("dom",instrumentDOM)}(function _getDomBreadcrumbHandler(e,t){return function _innerDomBreadcrumb(n){if((0,c.KU)()!==e)return;let s,i,a="object"==typeof t?t.serializeAttribute:void 0,o="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;o&&o>fe&&(ge&&r.Yz.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=fe),"string"==typeof a&&(a=[a]);try{const e=n.event,t=function _isEvent(e){return!!e&&!!e.target}(e)?e.target:e;s=htmlTreeAsString_htmlTreeAsString(t,{keyAttrs:a,maxStringLength:o}),i=function getComponentName(e,t=5){if(!V.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){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{s="<unknown>"}if(0===s.length)return;const l={category:`ui.${n.name}`,message:s};i&&(l.data={"ui.component_name":i}),addBreadcrumb(l,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&addXhrInstrumentationHandler(function _getXhrBreadcrumbHandler(e){return function _xhrBreadcrumb(t){if((0,c.KU)()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,s=t.xhr[de];if(!n||!r||!s)return;const{method:i,url:a,status_code:o,body:l}=s,u={method:i,url:a,status_code:o},d={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r},h={category:"xhr",data:u,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(o)};e.emit("beforeOutgoingRequestBreadcrumb",h,d),addBreadcrumb(h,d)}}(e)),t.fetch&&addFetchInstrumentationHandler(function _getFetchBreadcrumbHandler(e){return function _fetchBreadcrumb(t){if((0,c.KU)()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},i={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,s),addBreadcrumb(i,s)}else{const s=t.response,i={...t.fetchData,status_code:s?.status},a={input:t.args,response:s,startTimestamp:n,endTimestamp:r},o={category:"fetch",data:i,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",o,a),addBreadcrumb(o,a)}}}(e)),t.history&&addHistoryInstrumentationHandler(function _getHistoryBreadcrumbHandler(e){return function _historyBreadcrumb(t){if((0,c.KU)()!==e)return;let n=t.from,r=t.to;const s=parseUrl(H.location.href);let i=n?parseUrl(n):void 0;const a=parseUrl(r);i?.path||(i=s),s.protocol===a.protocol&&s.host===a.host&&(r=a.relative),s.protocol===i.protocol&&s.host===i.host&&(n=i.relative),addBreadcrumb({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function _getSentryBreadcrumbHandler(e){return function addSentryBreadcrumb(t){(0,c.KU)()===e&&addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:(0,i.$X)(t)},{event:t})}}(e))}}};const ve="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDB
29Request,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),browserApiErrorsIntegration=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&(0,l.GS)(H,"setTimeout",_wrapTimeFunction),t.setInterval&&(0,l.GS)(H,"setInterval",_wrapTimeFunction),t.requestAnimationFrame&&(0,l.GS)(H,"requestAnimationFrame",_wrapRAF),t.XMLHttpRequest&&"XMLHttpRequest"in H&&(0,l.GS)(XMLHttpRequest.prototype,"send",_wrapXHR);const e=t.eventTarget;if(e){(Array.isArray(e)?e:ve).forEach(e=>function _wrapEventTarget(e,t){const n=H,r=n[e]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;(0,l.GS)(r,"addEventListener",function(n){return function(r,s,i){try{(function isEventListenerObject(e){return"function"==typeof e.handleEvent})(s)&&(s.handleEvent=wrap(s.handleEvent,{mechanism:{data:{handler:(0,p.qQ)(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function unregisterOriginalCallback(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,s),n.apply(this,[r,wrap(s,{mechanism:{data:{handler:(0,p.qQ)(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),i])}}),(0,l.GS)(r,"removeEventListener",function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const s=n.__sentry_wrapped__;s&&e.call(this,t,s,r)}}catch{}return e.call(this,t,n,r)}})}(e,t))}}}};function _wrapTimeFunction(e){return function(...t){const n=t[0];return t[0]=wrap(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${(0,p.qQ)(e)}`}}),e.apply(this,t)}}function _wrapRAF(e){return function(t){return e.apply(this,[wrap(t,{mechanism:{data:{handler:(0,p.qQ)(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function _wrapXHR(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&(0,l.GS)(n,e,function(t){const n={mechanism:{data:{handler:(0,p.qQ)(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=(0,l.sp)(t);return r&&(n.mechanism.data.handler=(0,p.qQ)(r)),wrap(t,n)})}),e.apply(this,t)}}function addPageListener(e,t,n){se.document&&se.addEventListener(e,t,n)}function removePageListener(e,t,n){se.document&&se.removeEventListener(e,t,n)}const runOnce=e=>{let t=!1;return()=>{t||(e(),t=!0)}},whenIdleOrHidden=e=>{const t=se.requestIdleCallback||se.setTimeout;"hidden"===se.document?.visibilityState?e():(addPageListener("visibilitychange",e=runOnce(e),{once:!0,capture:!0}),addPageListener("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),removePageListener("visibilitychange",e,{capture:!0}),removePageListener("pagehide",e,{capture:!0})}))},browserSessionIntegration=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===H.document)return void(ge&&r.Yz.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));(0,B.J0)({ignoreDuration:!0});let e=!1;whenIdleOrHidden(()=>{e||((0,B.J5)(),e=!0)});const n=(0,c.rm)();let s=n.getUser();n.addScopeListener(t=>{const n=t.getUser();s?.id===n?.id&&s?.ip_address===n?.ip_address||(s=n,e&&(0,B.J5)())}),"route"===t&&addHistoryInstrumentationHandler(({from:t,to:n})=>{t!==n&&((0,B.J0)({ignoreDuration:!0}),(0,B.J5)(),e=!0)})}}};function safeSetSpanJSONAttributes(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}const cultureContextIntegration=()=>({name:"CultureContext",preprocessEvent(e){const t=getCultureContext();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=getCultureContext();t&&safeSetSpanJSONAttributes(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function getCultureContext(){try{const e=H.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}let be=null;function addGlobalErrorInstrumentationHandler(e){const t="error";addHandler(t,e),maybeInstrument(t,instrumentError)}function instrumentError(){be=S.O.onerror,S.O.onerror=function(e,t,n,r,s
29){return triggerHandlers("error",{column:r,error:s,line:n,msg:e,url:t}),!!be&&be.apply(this,arguments)},S.O.onerror.__SENTRY_INSTRUMENTED__=!0}let _e=null;function addGlobalUnhandledRejectionInstrumentationHandler(e){const t="unhandledrejection";addHandler(t,e),maybeInstrument(t,instrumentUnhandledRejection)}function instrumentUnhandledRejection(){_e=S.O.onunhandledrejection,S.O.onunhandledrejection=function(e){return triggerHandlers("unhandledrejection",e),!_e||_e.apply(this,arguments)},S.O.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const globalHandlersIntegration=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function _installGlobalOnErrorHandler(e){addGlobalErrorInstrumentationHandler(t=>{const{stackParser:n,attachStacktrace:r}=getOptions();if((0,c.KU)()!==e||shouldIgnoreOnError())return;const{msg:s,url:i,line:a,column:o,error:l}=t,u=function _enhanceEventWithInitialFrame(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],a=i[0]=i[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[];0===c.length&&c.push({colno:r,lineno:n,filename:getFilenameFromUrl(t)??getLocationHref(),function:p.yF,in_app:!0});return e}(eventbuilder_eventFromUnknownInput(n,l||s,void 0,r,!1),i,a,o);u.level="error",(0,B.r)(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),globalHandlerLog("onerror")),t.onunhandledrejection&&(!function _installGlobalOnUnhandledRejectionHandler(e){addGlobalUnhandledRejectionInstrumentationHandler(t=>{const{stackParser:n,attachStacktrace:r}=getOptions();if((0,c.KU)()!==e||shouldIgnoreOnError())return;const s=function _getUnhandledRejectionError(e){if((0,I.sO)(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),i=(0,I.sO)(s)?function _eventFromRejectionWithPrimitive(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}(s):eventbuilder_eventFromUnknownInput(n,s,void 0,r,!0);i.level="error",(0,B.r)(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),globalHandlerLog("onunhandledrejection"))}}};function globalHandlerLog(e){ge&&r.Yz.log(`Global Handler attached: ${e}`)}function getOptions(){const e=(0,c.KU)();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function getFilenameFromUrl(e){if((0,I.Kg)(e)&&0!==e.length)return e.startsWith("data:")?`<${stripDataUrlContent(e,!1)}>`:e}const Se="http.url",ye="sentry.segment.name",Te="sentry.transaction",Ee="url.full",we="url.path",httpContextIntegration=()=>({name:"HttpContext",preprocessEvent(e){if(!H.navigator&&!H.location&&!H.document)return;const t=getHttpRequestData(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){const t=e.attributes?.[d.uT];if(!H.navigator&&!H.location&&!H.document)return;const n=getHttpRequestData();safeSetSpanJSONAttributes(e,{[Ee]:"http.client"!==t?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}});function applyAggregateErrorsToEvent(e,t,n,r,s,i){if(!s.exception?.values||!i||!(0,I.bJ)(i.originalException))return;const a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=aggregateExceptionsFromError(e,t,r,i.originalException,n,s.exception.values,a,0))}function aggregateExceptionsFromError(e,t,n,r,s,i,a,o){if(i.length>=n+1)return i;let c=[...i];if((0,I.bJ)(r[s])){applyExceptionGroupFieldsForParentException(a,o,r);
29const i=e(t,r[s]),l=c.length;applyExceptionGroupFieldsForChildException(i,s,l,o),c=aggregateExceptionsFromError(e,t,n,r[s],s,[i,...c],i,l)}return isExceptionGroup(r)&&r.errors.forEach((i,l)=>{if((0,I.bJ)(i)){applyExceptionGroupFieldsForParentException(a,o,r);const u=e(t,i),d=c.length;applyExceptionGroupFieldsForChildException(u,`errors[${l}]`,d,o),c=aggregateExceptionsFromError(e,t,n,i,s,[u,...c],u,d)}}),c}function isExceptionGroup(e){return Array.isArray(e.errors)}function applyExceptionGroupFieldsForParentException(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...isExceptionGroup(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function applyExceptionGroupFieldsForChildException(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const linkedErrorsIntegration=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,s){applyAggregateErrorsToEvent(eventbuilder_exceptionFromError,s.getOptions().stackParser,n,t,e,r)}}};function createFrame(e,t,n,r){const s={filename:e,function:"<anonymous>"===t?p.yF:t,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const Ce=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ie=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ae=/\((\S*)(?::(\d+))(?::(\d+))\)/,ke=/at (.+?) ?\(data:(.+?),/,xe=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Oe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Le=[[30,e=>{const t=e.match(ke);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=Ce.exec(e);if(n){const[,e,t,r]=n;return createFrame(e,p.yF,+t,+r)}const r=Ie.exec(e);if(r){if(0===r[2]?.indexOf("eval")){const e=Ae.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=extractSafariExtensionDetails(r[1]||p.yF,r[2]);return createFrame(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=xe.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Oe.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]||p.yF;return[n,e]=extractSafariExtensionDetails(n,e),createFrame(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]],Re=(0,p.gd)(...Le),extractSafariExtensionDetails=(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]:p.yF,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Me="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ne={};function getNativeImplementation(e){const t=Ne[e];if(t)return t;let n=se[e];if(supports_isNativeFunction(n))return Ne[e]=n.bind(se);const r=se.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const s=t.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(t)}catch(t){Me&&Q.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?Ne[e]=n.bind(se):n}function makeFetchTransport(e,t=getNativeImplementation("fetch")){let n=0,r=0;return createTransport(e,async function makeRequest(s){const i=s.body.length;n+=i,r++;const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,a);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(e){throw function clearCachedImplementation(e){Ne[e]=void 0}("fetch"),e}finally{n-=i,r--}},makePromiseBuffer(e.bufferSize||40))}const Pe=/^HTML(\w*)Element$/;function normalizeStringifyValue(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function is_isElement(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function getConstructorName(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(e);if(Pe.test(t))return`[HTMLElement: ${htmlTreeAsString_htmlTreeAsString(e)}]`}}function checkAndWarnIfIsEmbeddedBrowserExtension(){return!!function _isEmbeddedBrowserExtension(){if(void 0===H.window)return!1;const e=H;if(e.nw)return!1;const t=e.chrome||e.browser;if(!t?.runtime?.id)return!1;const n=getLocationHref();return!(H===H.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}()&&(ge&&(0,r.pq)(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0)}var Fe=__webpack_require__(9868),De=__webpack_require__(321),Be=__webpack_require__(9008),Ve=__webpack_require__(5185);function timedEventsToMeasurements(e){if(!e||0===e.length)return;const t={};
29return e.forEach(e=>{const n=e.attributes||{},r=n[d.Sn],s=n[d.xc];"string"==typeof r&&"number"==typeof s&&(t[e.name]={value:s,unit:r})}),t}function getSegmentSpanCaptureStrategy(){return(0,b.Se)((0,b.EU)()).segmentSpanCaptureStrategy}var He=__webpack_require__(9228);class SentrySpan{constructor(e={}){this._traceId=e.traceId||(0,Ve.e)(),this._spanId=e.spanId||(0,Ve.Z)(),this._startTime=e.startTimestamp||(0,C.zf)(),this._links=e.links,this._attributes={},this.setAttributes({[d.JD]:"manual",[d.uT]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?h.aO:h.CC}}setAttribute(e,t){return this._frozen||(void 0===t?delete this._attributes[e]:this._attributes[e]=t,e===d.i_&&void 0!==t&&(0,He.ZO)(this)&&(0,He.jF)(this)),this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=(0,h.cI)(e))}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen||(this._name=e,(0,He.ZO)(this)||this.setAttribute(d.i_,"custom")),this}end(e){this._endTime||(this._endTime=(0,h.cI)(e),function logSpanEnd(e){if(!n.T)return;const{description:t="< unknown name >",op:s="< unknown op >"}=(0,h.et)(e),{spanId:i}=e.spanContext(),a=`[Tracing] Finishing "${s}" ${(0,h.zU)(e)===e?"root ":""}span "${t}" with ID ${i}`;r.Yz.log(a)}(this),this._onSpanEnded()),this._frozen=(0,He.rh)(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[d.uT],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:(0,h.yW)(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[d.JD],profile_id:this._attributes[d.E1],exclusive_time:this._attributes[d.jG],measurements:timedEventsToMeasurements(this._events),is_segment:this._isStandaloneSpan&&(0,h.zU)(this)===this||void 0,segment_id:this._isStandaloneSpan?(0,h.zU)(this).spanContext().spanId:void 0,links:(0,h.uU)(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===(0,h.zU)(this),status:(0,h.dZ)(this._status),attributes:(0,h.fy)(this._attributes,this._status),links:(0,h.HQ)(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,s){if(this._frozen)return this;n.T&&r.Yz.log("[Tracing] Adding an event to span:",e);const i=isSpanTimeInput(t)?t:s||(0,C.zf)(),a=isSpanTimeInput(t)?{}:t||{},o={name:e,time:(0,h.cI)(i),attributes:a};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=(0,c.KU)();e&&(e.emit("spanEnd",this),this._isStandaloneSpan||e.emit("afterSpanEnd",this));const t=(0,h.zU)(this),s=this._isStandaloneSpan||this===t;if(this._isStandaloneSpan)return void(this._sampled?function sendSpanEnvelope(e){const t=(0,c.KU)();if(!t)return;const n=e[1];if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");t.sendEnvelope(e)}(function createSpanEnvelope(e,t){const n=(0,f.k1)(e[0]),r=t?.getDsn(),s=t?.getOptions().tunnel,i={sent_at:new Date((0,_.Wk)()).toISOString(),...function dscHasRequiredProps(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n},...!!s&&r&&{dsn:(0,v.SB)(r)}},{beforeSendSpan:a,ignoreSpans:o}=t?.getOptions()||{},c=o?.length?e.filter(e=>{const t=(0,h.et)(e);return!shouldIgnoreSpan({description:t.description,op:t.op,attributes:t.data},o)}):e,l=e.length-c.length;l&&t?.recordDroppedEvent("before_send","span",l);const u=a?e=>{const t=(0,h.et)(e);return(isStreamedBeforeSendSpanCallback(a)?t:a(t))||((0,h.xl)(),t)}:h.et,d=[];for(const e of c){const t=u(e);t&&d.push(createSpanEnvelopeItem(t))}return createEnvelope(i,d)}([this],e)):(n.T&&r.Yz.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));if(!s){const e=getSegmentSpanCaptureStrategy();if(e){const n=(0,He.Lb)(this).scope||(0,c.o5)();e.onChildSpanEnded(this,t,e=>this._convertSpanToTransaction(e),n)}return}if(e&&hasSpanStreamingEnabled(e))return void e.emit("afterSegmentSpanEnd",this);const i=(0,He.Lb)(this).scope||(0,c.o5)(),a=getSegmentSpanCaptureStrategy();if(a)a.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),i);else{const e=this._convertSpanToTransaction();e&&i.captureEvent(e)}}_convertSpanToTransaction(e={}){if(!isFullFinishedSpan((0,h.et)(this)))return;this._name||(n.T&&r.Yz.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:s}=(0,He.Lb)(this),i=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;e.onSpanCaptured?.(this);const a=[];for(const t of(0,h.xO)(this)){if(t===this||isStandaloneSpan(t)||e.isSpanAlreadyCaptured?.(t))continue;const n=(0,h.et)(t);isFullFinishedSpan(n)&&(e.onSpanCaptured?.(t),a.push(n))}const o=this._attributes[d.i_];delete this._attributes[d.Le];let c=!1;
29a.forEach(e=>{delete e.data[d.Le],e.op?.startsWith("gen_ai.")&&(c=!0)});const l={contexts:{trace:(0,h.Ck)(this)},spans:a.length>1e3?a.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):a,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:s,dynamicSamplingContext:(0,f.k1)(this),hasGenAiSpans:c},request:i,...o&&{transaction_info:{source:o}}},u=timedEventsToMeasurements(this._events);return u&&Object.keys(u).length&&(n.T&&r.Yz.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),l.measurements=u),l}}function isSpanTimeInput(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function isFullFinishedSpan(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}function isStandaloneSpan(e){return e instanceof SentrySpan&&e.isStandaloneSpan()}var Ue=__webpack_require__(3939),$e=__webpack_require__(9354);const qe="__SENTRY_SUPPRESS_TRACING__";function startInactiveSpan(e){const t=getAcs();return t.startInactiveSpan?t.startInactiveSpan(e):_startInactiveSpanImpl(e)}function _startInactiveSpanImpl(e){const t=parseSentrySpanArguments(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?t=>(0,c.v4)(e.scope,t):void 0!==r?e=>withActiveSpan(r,e):e=>e())(()=>{const s=(0,c.o5)(),i=getParentSpan(s,r),a=(0,c.KU)();return e.onlyIfParent&&!i?startMissingRequiredParentSpan(s,a):createChildOrRootSpan({parentSpan:i,spanArguments:t,forceTransaction:n,scope:s})})}function withActiveSpan(e,t){const n=getAcs();return n.withActiveSpan?n.withActiveSpan(e,t):(0,c.v4)(n=>((0,De.r)(n,e||void 0),t(n)))}function isTracingSuppressed(e=(0,c.o5)()){const t=getAcs();return t.isTracingSuppressed?t.isTracingSuppressed(e):!0===e.getScopeData().sdkProcessingMetadata[qe]}function startMissingRequiredParentSpan(e,t){t?.recordDroppedEvent("no_parent_span","span");const n=new Be.w({traceId:e.getPropagationContext().traceId});return(0,He.d_)(n,e,(0,c.rm)()),n}function createChildOrRootSpan({parentSpan:e,spanArguments:t,forceTransaction:s,scope:i}){const a=(0,c.rm)();if(!(0,Fe.f)()){const t={...a.getPropagationContext(),...i.getPropagationContext()},n=e?e.spanContext().traceId:t.traceId,r=new Be.w({traceId:n});return e&&!s&&(0,h.Hu)(e,r),(0,He.d_)(r,i,a),r}const o=(0,c.KU)();if(function _shouldIgnoreStreamedSpan(e,t){const n=e?.getOptions().ignoreSpans;if(!e||!hasSpanStreamingEnabled(e)||!n?.length)return!1;return shouldIgnoreSpan({description:t.name||"",op:t.attributes?.[d.uT]||t.op,attributes:t.attributes},n)}(o,t)){isTracingSuppressed(i)||o?.recordDroppedEvent("ignored","span");const t=new Be.w({dropReason:"ignored",traceId:e?.spanContext().traceId??i.getPropagationContext().traceId});return e&&!s&&(0,h.Hu)(e,t),(0,He.d_)(t,i,a),t}let l;if(e&&!s)l=function _startChildSpan(e,t,n,r){const{spanId:s,traceId:i}=e.spanContext(),a=isTracingSuppressed(t),o=!a&&(0,h.pK)(e),l=o?new SentrySpan({...n,parentSpanId:s,traceId:i,sampled:o}):new Be.w({traceId:i});(0,h.Hu)(e,l),(0,He.d_)(l,t,r);const u=(0,c.KU)();if(!u)return l;hasSpanStreamingEnabled(u)&&(0,Be.h)(l)&&((0,Be.h)(e)&&e.dropReason?(l.dropReason=e.dropReason,u.recordDroppedEvent(e.dropReason,"span")):a||(l.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span")));u.emit("spanStart",l),n.endTimestamp&&(u.emit("spanEnd",l),u.emit("afterSpanEnd",l));return l}(e,i,t,a),(0,h.Hu)(e,l);else if(e){const n=(0,f.k1)(e),{traceId:r,spanId:s}=e.spanContext(),o=(0,h.pK)(e);l=_startRootSpan({traceId:r,parentSpanId:s,...t},i,a,o),(0,f.LZ)(l,n)}else{const{traceId:e,dsc:n,parentSpanId:r,sampled:s}={...a.getPropagationContext(),...i.getPropagationContext()};l=_startRootSpan({traceId:e,parentSpanId:r,...t},i,a,s),n&&(0,f.LZ)(l,n)}return function logSpanStart(e){if(!n.T)return;const{description:t="< unknown name >",op:s="< unknown op >",parent_span_id:i}=(0,h.et)(e),{spanId:a}=e.spanContext(),o=(0,h.pK)(e),c=(0,h.zU)(e),l=c===e,u=`[Tracing] Starting ${o?"sampled":"unsampled"} ${l?"root ":""}span`,d=[`op: ${s}`,`name: ${t}`,`ID: ${a}`];if(i&&d.push(`parent ID: ${i}`),!l){const{op:e,description:t}=(0,h.et)(c);d.push(`root ID: ${c.spanContext().spanId}`),e&&d.push(`root op: ${e}`),t&&d.push(`root description: ${t}`)}r.Yz.log(`${u}\n ${d.join("\n ")}`)}(l),l}function parseSentrySpanArguments(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=(0,h.cI)(e.startTime),delete n.startTime,n}return t}function getAcs(){const e=(0,b.EU)();return(0,$e.h)(e)}function _startRootSpan(e,t,s,i){const a=(0,c.KU)(),o=a?.getOptions()||{},{name:l=""}=e,u={spanAttributes:{...e.attributes},spanName:l,parentSampled:i};a?.emit("beforeSampling",u,{decision:!1});const h=u.parentSampled??i,p=u.spanAttributes,m=t.getPropagationContext(),g=isTracingSuppressed(t),[f,v,b]=g?[!1]:function sampleSpan(e,t,s){if(!(0,Fe.f)(e))return[!1];let i,a;"function"==typeof e.tracesSampler?(a=e.tracesSampler({...t,inheritOrSampleWith:e=>"number"==typeof t.parentSampleRate?t.parentSampleRate:"boolean"==typeof t.parentSampled?Number(t.parentSampled):e}),i=!0):void 0!==t.parentSampled?a=t.parentSampled:void 0!==e.tracesSampleRate&&(a=e.tracesSampleRate,i=!0);const o=(0,k.i)(a);if(void 0===o)return n.T&&r.Yz.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!o)return n.T&&r.Yz.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,o,i];const c=s<o;return c||n.T&&r.Yz.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[c,o,i]}(o,{name:l,parentSampled:h,attributes:p,normalizedRequest:s.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:(0,k.i)(m.dsc?.sample_rate)},m.sampleRand),_=new SentrySpan({...e,attributes:{[d.i_]:"custom",[d.sy]:void 0!==v&&b?v:void 0,...p},sampled:f});return f||!a||g||(n.T&&r.Yz.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),a.recordDroppedEvent("sample_rate",hasSpanStreamingEnabled(a)?"span":"transaction")),(0,He.d_)(_,t,s),a&&a.emit("spanStart",_),_}function getParentSpan(e,t){if(t)return t;if(null===t)return;const n=(0,De.f)(e);if(!n)return;const r=(0,c.KU)();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?(0,h.zU)(n):n}function spanIsIgnored(e){return(0,Be.h)(e)&&"ignored"===e.dropReason}const je={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function startIdleSpan(e,t={}){const s=new Map;let i,a,o=!1,l="externalFinish",u=!t.disableAutoFinish;const p=[],{idleTimeout:m=je.idleTimeout,finalTimeout:g=je.finalTimeout,childSpanTimeout:f=je.childSpanTimeout,beforeSpanEnd:v,trimIdleSpanEndTimestamp:b=!0}=t,_=(0,c.KU)(),S=(0,c.o5)();if(!_||!(0,Fe.f)()){const e=new Be.w({traceId:S.getPropagationContext().traceId});return(0,He.d_)(e,S,(0,c.rm)()),e}const y=(0,h.Bk)(),T=function _startIdleSpan(e){const t=startInactiveSpan(e);return(0,De.r)((0,c.o5)(),t),n.T&&r.Yz.log("[Tracing] Started span is an i
29dle span"),t}(e);function _cancelIdleTimeout(){i&&(clearTimeout(i),i=void 0)}function _cancelChildSpanTimeout(){a&&(clearTimeout(a),a=void 0)}function _restartIdleTimeout(e){_cancelIdleTimeout(),i=setTimeout(()=>{!o&&0===s.size&&u&&(l="idleTimeout",T.end(e))},m)}function _restartChildSpanTimeout(e){_cancelChildSpanTimeout(),a=setTimeout(()=>{!o&&u&&(l="heartbeatFailed",T.end(e))},f)}function onIdleSpanEnded(e){o=!0,s.clear(),p.forEach(e=>e()),(0,De.r)(S,y);const t=(0,h.et)(T),{start_timestamp:i}=t;if(!i)return;t.data[d.fs]||T.setAttribute(d.fs,l);const a=t.status;a&&"unknown"!==a||T.setStatus({code:Ue.F3}),r.Yz.log(`[Tracing] Idle span "${t.op}" finished`);const c=(0,h.xO)(T).filter(e=>e!==T);let u=0;c.forEach(t=>{t.isRecording()&&(t.setStatus({code:Ue.TJ,message:"cancelled"}),t.end(e),n.T&&r.Yz.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const s=(0,h.et)(t),{timestamp:i=0,start_timestamp:a=0}=s,o=a<=e,c=i-a<=(g+m)/1e3;if(n.T){const e=JSON.stringify(t,void 0,2);o?c||r.Yz.log("[Tracing] Discarding span since it finished after idle span final timeout",e):r.Yz.log("[Tracing] Discarding span since it happened after idle span was finished",e)}c&&o||((0,h.VS)(T,t),u++)}),u>0&&T.setAttribute("sentry.idle_span_discarded_spans",u)}return T.end=new Proxy(T.end,{apply(e,t,n){if(v&&v(T),(0,Be.h)(t))return;const[r,...s]=n,i=r||(0,C.zf)(),a=(0,h.cI)(i),o=(0,h.xO)(T).filter(e=>e!==T),c=(0,h.et)(T);if(!o.length||!b)return onIdleSpanEnded(a),Reflect.apply(e,t,[a,...s]);const l=_.getOptions().ignoreSpans,u=o?.reduce((e,t)=>{const n=(0,h.et)(t);return n.timestamp?l&&shouldIgnoreSpan({description:n.description,op:n.op,attributes:n.data},l)?e:e?Math.max(e,n.timestamp):n.timestamp:e},void 0),d=c.start_timestamp,p=Math.min(d?d+g/1e3:1/0,Math.max(d||-1/0,Math.min(a,u||1/0)));return onIdleSpanEnded(p),Reflect.apply(e,t,[p,...s])}}),p.push(_.on("spanStart",e=>{if(o||e===T||(0,h.et)(e).timestamp||e instanceof SentrySpan&&e.isStandaloneSpan())return;(0,h.xO)(T).includes(e)&&function _pushActivity(e){_cancelIdleTimeout(),s.set(e,!0),_restartChildSpanTimeout((0,C.zf)()+f/1e3)}(e.spanContext().spanId)})),p.push(_.on("spanEnd",e=>{o||function _popActivity(e){s.has(e)&&s.delete(e),0===s.size&&(_restartIdleTimeout((0,C.zf)()+m/1e3),_cancelChildSpanTimeout())}(e.spanContext().spanId)})),p.push(_.on("idleSpanEnableAutoFinish",e=>{e===T&&(u=!0,_restartIdleTimeout(),s.size&&_restartChildSpanTimeout())})),t.disableAutoFinish||_restartIdleTimeout(),setTimeout(()=>{o||(T.setStatus({code:Ue.TJ,message:"deadline_exceeded"}),l="finalTimeout",T.end())},g),T}let We=!1;var ze=__webpack_require__(3752);function updateSession(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||time_timestampInSeconds(),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:uuid4()),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 merge_merge(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 e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=merge_merge(r[e],t[e],n-1));return r}function propagationContext_generateTraceId(){return uuid4()}function generateSpanId(){return uuid4().substring(16)}function makeWeakRef(e){try{const t=J.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}function derefWeakRef(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}const Ke="_sentrySpan";function spanOnScope_setSpanForScope(e,t){t?object_addNonEnumerableProperty(e,Ke,makeWeakRef(t)):delete e[Ke]}
29function spanOnScope_getSpanForScope(e){return derefWeakRef(e[Ke])}function truncate(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function isMatchingPattern(e,t,n=!1){return!!is_isString(e)&&(function isRegExp(e){return isBuiltin(e,"RegExp")}(t)?t.test(e):is_isString(t)?n?e===t:e.includes(t):"function"==typeof t&&t(e))}class Scope{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:propagationContext_generateTraceId(),sampleRand:safeMathRandom()}}clone(){const e=new Scope;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,spanOnScope_setSpanForScope(e,spanOnScope_getSpanForScope(this)),e}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&&updateSession(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(e){if(!e)return this;const t="function"==typeof e?e(this):e,n=t instanceof Scope?t.getScopeData():is_isPlainObject(t)?e:void 0,{tags:r,attributes:s,extra:i,user:a,contexts:o,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=n||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...o},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),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,spanOnScope_setSpanForScope(this,void 0),this._attachments=[],this.setPropagationContext({traceId:propagationContext_generateTraceId(),sampleRand:safeMathRandom()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:dateTimestampInSeconds(),...e,message:e.message?truncate(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:spanOnScope_get
29SpanForScope(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=merge_merge(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||uuid4();if(!this._client)return Y&&Q.warn("No client configured on scope - will not capture exception!"),n;const r=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||uuid4();if(!this._client)return Y&&Q.warn("No client configured on scope - will not capture message!"),r;const s=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureEvent(e,t){const n=e.event_id||t?.event_id||uuid4();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(Y&&Q.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)}}const isActualPromise=e=>e instanceof Promise&&!e[Ye],Ye=Symbol("chained PromiseLike"),copyProps=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const s=e[r];"function"==typeof s?Object.defineProperty(t,r,{value:(...t)=>s.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=s}return n&&Object.assign(t,{[Ye]:!0}),t};class AsyncContextStack{constructor(e,t){let n,r;n=e||new Scope,r=t||new Scope,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return function isThenable(e){return Boolean(e?.then&&"function"==typeof e.then)}(n)?((e,t,n)=>{const r=e.then(e=>(t(e),e),e=>{throw n(e),e});return isActualPromise(r)&&isActualPromise(e)?r:copyProps(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 getAsyncContextStack(){const e=carrier_getSentryCarrier(getMainCarrier());return e.stack=e.stack||new AsyncContextStack(function getDefaultCurrentScope(){return getGlobalSingleton("defaultCurrentScope",()=>new Scope)}(),function getDefaultIsolationScope(){return getGlobalSingleton("defaultIsolationScope",()=>new Scope)}())}function stackStrategy_withScope(e){return getAsyncContextStack().withScope(e)}function withSetScope(e,t){const n=getAsyncContextStack();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function withIsolationScope(e){return getAsyncContextStack().withScope(()=>e(getAsyncContextStack().getIsolationScope()))}function asyncContext_getAsyncContextStrategy(e){const t=carrier_getSentryCarrier(e);return t.acs?t.acs:function getStackAsyncContextStrategy(){return{withIsolationScope,withScope:stackStrategy_withScope,withSetScope,withSetIsolationScope:(e,t)=>withIsolationScope(t),getCurrentScope:()=>getAsyncContextStack().getScope(),getIsolationScope:()=>getAsyncContextStack().getIsolationScope()}}()}function currentScopes_getCurrentScope(){return asyncContext_getAsyncContextStrategy(getMainCarrier()).getCurrentScope()}function currentScopes_getIsolationScope(){return asyncContext_getAsyncContextStrategy(getMainCarrier()).getIsolationScope()}function currentScopes_withScope(...e){const t=asyncContext_getAsyncContextStrategy(getMainCarrier());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function currentScopes_getClient(){return currentScopes_getCurrentScope().getClient()}const Ge="sentry.source",Je="sentry.sample_rate",Xe="sentry.op",Qe="sentry.origin",Ze="sentry.status.message",et="sentry.measurement_unit",tt="sentry.measurement_value",nt="sentry.custom_span_name",rt="sentry.exclusive_time";let st=!1;function spanToTransactionTraceContext(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:a,origin:o,links:c}=spanUtils_spanToJSON(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:a,origin:o,links:c}}function convertSpanLinksForEnvelope(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:s})=>({span_id:e,trace_id:t,sampled:1===n,attributes:s,...r})):void 0}function getStreamedSpanLinks(e){return e?.length?e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:1===n,attributes:r})):void 0}function spanTimeInputToSeconds(e){return"number"==typeof e?ensureTimestampInSeconds(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ensureTimestampInSeconds(e.getTime()):time_timestampInSeconds()}function ensureTimestampInSeconds(e){return e>9999999999?e/1e3:e}function spanUtils_spanToJSON(e){if(spanIsSentrySpan(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(spanIsOpenTelemetrySdkTraceBaseSpan(e)){const{attributes:r,startTime:s,name:i,endTime:a,status:o,links:c}=e;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:getOtelParentSpanId(e),start_timestamp:spanTimeInputToSeconds(s),timestamp:spanTimeInputToSeconds(a)||void 0,status:getStatusMessage(o),op:r[Xe],origin:r[Qe],links:convertSpanLinksForEnvelope(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function spanUtils_spanToStreamedSpanJSON(e){if(spanIsSentrySpan(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(spanIsOpenTelemetrySdkTraceBaseSpan(e)){const{attributes:r,startTime:s,name:i,endTime:a,status:o,links:c}=e;return{name:i,span_id:t,trace_id:n,parent_span_id:getOtelParentSpanId(e),start_timestamp:spanTimeInputToSeconds(s),end_timestamp:spanTimeInputToSeconds(a),is_segment:e===spanUtils_INTERNAL_getSegmentSpan(e),status:getSimpleStatus(o),attributes:addStatusMessageAttribute(r,o),links:getStreamedSpanLinks(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===spanUtils_INTERNAL_getSegmentSpan(e)}}function getOtelParentSpanId(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function spanIsOpenTelemetrySdkTraceBaseSpan(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function spanIsSentrySpan(e){return"function"==typeof e.getSpanJSON}function spanIsSampled(e){const{traceFlags:t}=e.spanContext();return 1===t}function getStatusMessage(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}function getSimpleStatus(e){return e&&1!==e.code&&0!==e.code&&"cancelled"!==e.message?"error":"ok"}function addStatusMessageAttribute(e,t){const n="error"===getSimpleStatus(t)?t?.message:void 0;return{...n&&{[Ze]:n},...e}}const it="_sentryChildSpans",at="_sentryRootSpan";function addChildSpanToSpan(e,t){const n=e[at]||e;object_addNonEnumerableProperty(t,at,n),spanIsSampled(e)&&(e.isRecording()||n.isRecording())&&(e[it]?e[it].add(t):object_addNonEnumerableProperty(e,it,new Set([t])))}const ot=spanUtils_INTERNAL_getSegmentSpan;function spanUtils_INTERNAL_getSegmentSpan(e){return e[at]||e}function spanUtils_getActiveSpan(){const e=asyncContext_getAsyncContextStrategy(getMainCarrier());
29return e.getActiveSpan?e.getActiveSpan():spanOnScope_getSpanForScope(currentScopes_getCurrentScope())}const ct=J;function browser_getComponentName(e,t=5){if(!ct.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){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}function measurement_setMeasurement(e,t,n,r=spanUtils_getActiveSpan()){const s=r&&ot(r);s&&(Y&&Q.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[tt]:t,[et]:n}))}function measurement_timedEventsToMeasurements(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},r=n[et],s=n[tt];"string"==typeof r&&"number"==typeof s&&(t[e.name]={value:s,unit:r})}),t}const bindReporter=(e,t,n,r)=>{let s,i;return a=>{t.value>=0&&(a||r)&&(i=t.value-(s??0),(i||void 0===s)&&(s=t.value,t.delta=i,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},getNavigationEntry=(e=!0)=>{const t=se.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},getActivationStart=()=>{const e=getNavigationEntry();return e?.activationStart??0};let lt=-1;const ut=new Set,onVisibilityUpdate=e=>{if(function isPageHidden(e){return"pagehide"===e.type||"hidden"===se.document?.visibilityState}(e)&<>-1){if("visibilitychange"===e.type||"pagehide"===e.type)for(const e of ut)e();isFinite(lt)||(lt="visibilitychange"===e.type?e.timeStamp:0,removePageListener("prerenderingchange",onVisibilityUpdate,!0))}},getVisibilityWatcher=()=>{if(se.document&<<0){const e=getActivationStart(),t=se.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;lt=t??("hidden"!==se.document?.visibilityState||se.document?.prerendering?1/0:0),addPageListener("visibilitychange",onVisibilityUpdate,!0),addPageListener("pagehide",onVisibilityUpdate,!0),addPageListener("prerenderingchange",onVisibilityUpdate,!0)}return{get firstHiddenTime(){return lt},onHidden(e){ut.add(e)}}};const initMetric=(e,t=-1)=>{const n=getNavigationEntry();let r="navigate";n&&(se.document?.prerendering||getActivationStart()>0?r="prerender":se.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-")));return{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},dt=new WeakMap;function initUnique(e,t){try{return dt.get(e)||dt.set(e,new t),dt.get(e)}catch(e){return new t}}class LayoutShiftManager{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}}const observe=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},whenActivated=e=>{se.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},ht=[1800,3e3],pt=[.1,.25],onCLS=(e,t={})=>{((e,t={})=>{whenActivated(()=>
29{const n=getVisibilityWatcher(),r=initMetric("FCP");let s;const i=observe("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(i.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-getActivationStart(),0),r.entries.push(t),s(!0)))});i&&(s=bindReporter(e,r,ht,t.reportAllChanges))})})(runOnce(()=>{const n=initMetric("CLS",0);let r;const s=getVisibilityWatcher(),i=initUnique(t,LayoutShiftManager),handleEntries=e=>{for(const t of e)i._processEntry(t);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},a=observe("layout-shift",handleEntries);a&&(r=bindReporter(e,n,pt,t.reportAllChanges),s.onHidden(()=>{handleEntries(a.takeRecords()),r(!0)}),se?.setTimeout?.(r))}))};let mt=0,gt=1/0,ft=0;const updateEstimate=e=>{e.forEach(e=>{e.interactionId&&(gt=Math.min(gt,e.interactionId),ft=Math.max(ft,e.interactionId),mt=ft?(ft-gt)/7+1:0)})};let vt;const getInteractionCount=()=>vt?mt:performance.interactionCount||0;let bt=0;class InteractionManager{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){bt=getInteractionCount(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor((getInteractionCount()-bt)/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this._longestInteractionList.at(-1);let n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<10||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>10){const e=this._longestInteractionList.splice(10);for(const t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}}const _t=[200,500],onINP=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=getVisibilityWatcher();whenActivated(()=>{"interactionCount"in performance||vt||(vt=observe("event",updateEstimate,{type:"event",buffered:!0,durationThreshold:0}));const r=initMetric("INP");let s;const i=initUnique(t,InteractionManager),handleEntries=e=>{whenIdleOrHidden(()=>{for(const t of e)i._processEntry(t);const t=i._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,s())})},a=observe("event",handleEntries,{durationThreshold:t.durationThreshold??40});s=bindReporter(e,r,_t,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{handleEntries(a.takeRecords()),s(!0)}))})};class LCPEntryManager{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const St=[2500,4e3],yt=[800,1800],whenReady=e=>{se.document?.prerendering?whenActivated(()=>whenReady(e)):"complete"!==se.document?.readyState?addEventListener("load",()=>whenReady(e),!0):setTimeout(e)},Tt={},Et={};let wt,Ct,It,At;function addClsInstrumentationHandler(e,t=!1){return addMetricObserver("cls",e,instrumentCls,wt,t)}function addLcpInstrumentationHandler(e,t=!1){return addMetricObserver("lcp",e,instrumentLcp,Ct,t)}function addInpInstrumentationHandler(e){return addMetricObserver("inp",e,instrumentInp,At)}function addPerformanceInstrumentationHandler(e,t){return instrument_addHandler(e,t),Et[e]||(!function instrumentPerformanceObserver(e){const t={};"event"===e&&(t.durationThreshold=0);observe(e,t=>{instrument_triggerHandlers(e,{entries:t})},t)}(e),Et[e]=!0),getCleanupCallback(e,t)}function instrument_triggerHandlers(e,t){const n=Tt[e];if(n?.length)for(const r of n)try{r(t)}catch(t){Me&&Q.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${getFunctionName(r)}\nError:`,t)}}function instrumentCls(){return onCLS(e=>{instrument_triggerHandlers("cls",{metric:e}),wt=e},{reportAllChanges:!0})}function instrumentLcp(){return((e,t={})=>{whenActivated(()=>
29{const n=getVisibilityWatcher(),r=initMetric("LCP");let s;const i=initUnique(t,LCPEntryManager),handleEntries=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)i._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-getActivationStart(),0),r.entries=[t],s())},a=observe("largest-contentful-paint",handleEntries);if(a){s=bindReporter(e,r,St,t.reportAllChanges);const n=runOnce(()=>{handleEntries(a.takeRecords()),a.disconnect(),s(!0)}),stopListeningWrapper=e=>{e.isTrusted&&(whenIdleOrHidden(n),removePageListener(e.type,stopListeningWrapper,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addPageListener(e,stopListeningWrapper,{capture:!0})}})})(e=>{instrument_triggerHandlers("lcp",{metric:e}),Ct=e},{reportAllChanges:!0})}function instrumentTtfb(){return((e,t={})=>{const n=initMetric("TTFB"),r=bindReporter(e,n,yt,t.reportAllChanges);whenReady(()=>{const e=getNavigationEntry();e&&(n.value=Math.max(e.responseStart-getActivationStart(),0),n.entries=[e],r(!0))})})(e=>{instrument_triggerHandlers("ttfb",{metric:e}),It=e})}function instrumentInp(){return onINP(e=>{instrument_triggerHandlers("inp",{metric:e}),At=e})}function addMetricObserver(e,t,n,r,s=!1){let i;return instrument_addHandler(e,t),Et[e]||(i=n(),Et[e]=!0),r&&t({metric:r}),getCleanupCallback(e,t,s?i:void 0)}function instrument_addHandler(e,t){Tt[e]=Tt[e]||[],Tt[e].push(t)}function getCleanupCallback(e,t,n){return()=>{n&&n();const r=Tt[e];if(!r)return;const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}function hasSpansEnabled_hasSpansEnabled(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||currentScopes_getClient()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function should_ignore_span_logIgnoredSpan(e){Q.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function should_ignore_span_shouldIgnoreSpan(e,t){if(!t?.length)return!1;for(const n of t){if(should_ignore_span_isStringOrRegExp(n)){if(e.description&&isMatchingPattern(e.description,n))return Y&&should_ignore_span_logIgnoredSpan(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&&isMatchingPattern(e.description,n.name),s=!n.op||e.op&&isMatchingPattern(e.op,n.op),i=!n.attributes||Object.entries(n.attributes).every(([t,n])=>should_ignore_span_matchesAttributeValue(e.attributes?.[t],n));if(r&&s&&i)return Y&&should_ignore_span_logIgnoredSpan(e),!0}return!1}function should_ignore_span_matchesAttributeValue(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?isMatchingPattern(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function should_ignore_span_isStringOrRegExp(e){return"string"==typeof e||e instanceof RegExp}function hasSpanStreamingEnabled_hasSpanStreamingEnabled(e){return"stream"===e.getOptions().traceLifecycle}function parseSampleRate_parseSampleRate(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}const kt="sentry-";function parseBaggageHeader(e){if(e&&(is_isString(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{const n=baggageHeaderToObject(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):baggageHeaderToObject(e)}function baggageHeaderToObject(e){return e.split(",").map(e=>{const t=e.indexOf("=");if(-1===t)return[];return[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),{})}const xt=/^o(\d+)\./;function dsn_dsnToString(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:a,protocol:o,publicKey:c}=e;return`${o}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${a}`}function extractOrgIdFromClient(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function extractOrgIdFromDsnHost(e){const t=e.match(xt);return t?.[1]}(n)),r}const Ot=Symbol.for("sentry.nonRecordingSpan");class SentryNonRecordingSpan{constructor(e={}){this._traceId=e.traceId||propagationContext_generateTraceId(),this._spanId=e.spanId||generateSpanId(),this.dropReason=e.dropReason,object_addNonEnumerableProperty(this,Ot,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}
29addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}function spanIsNonRecordingSpan(e){return!!e&&!0===e[Ot]}const Lt="_sentryScope",Rt="_sentryIsolationScope",Mt=Symbol.for("sentry.otelSourceInference"),Nt=Symbol.for("sentry.otelSourceExplicitlySet"),Pt=Symbol.for("sentry.tracerProviderSpan");function setCapturedScopesOnSpan(e,t,n){e&&(object_addNonEnumerableProperty(e,Rt,makeWeakRef(n)),object_addNonEnumerableProperty(e,Lt,t))}function utils_getCapturedScopesOnSpan(e){const t=e;return{scope:t[Lt],isolationScope:derefWeakRef(t[Rt])}}function spanShouldInferOtelSource(e){return!0===e[Mt]}function spanIsTracerProviderSpan(e){return!0===e[Pt]}const Ft="_frozenDsc";function freezeDscOnSpan(e,t){object_addNonEnumerableProperty(e,Ft,t)}function getDynamicSamplingContextFromClient(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||"production",release:n.release,public_key:r,trace_id:e,org_id:extractOrgIdFromClient(t)};return t.emit("createDsc",s),s}function getDynamicSamplingContextFromScope(e,t){const n=t.getPropagationContext();return n.dsc||getDynamicSamplingContextFromClient(n.traceId,e)}function getDynamicSamplingContextFromSpan(e){const t=currentScopes_getClient();if(!t)return{};const n=ot(e),r=spanUtils_spanToJSON(n),s=r.data,i=n.spanContext().traceState,a=i?.get("sentry.sample_rate")??s[Je]??s["sentry.previous_trace_sample_rate"];function applyLocalSampleRateToDsc(e){return"number"!=typeof a&&"string"!=typeof a||(e.sample_rate=`${a}`),e}const o=n[Ft];if(o)return applyLocalSampleRateToDsc(o);const c=spanIsNonRecordingSpan(n),l=c&&"ignored"===n.dropReason;if(c&&(!hasSpansEnabled_hasSpansEnabled(t.getOptions())||l)){const e=utils_getCapturedScopesOnSpan(n).scope;if(e){const n={...getDynamicSamplingContextFromScope(t,e)};return l&&(n.sampled="false"),applyLocalSampleRateToDsc(n)}}const u=i?.get("sentry.dsc"),d=u&&function baggage_baggageHeaderToDynamicSamplingContext(e){const t=parseBaggageHeader(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>(t.startsWith(kt)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}(u);if(d)return applyLocalSampleRateToDsc(d);const h=getDynamicSamplingContextFromClient(e.spanContext().traceId,t),p=s[Ge]??s["sentry.segment.name.source"],m=r.description;return"url"!==p&&m&&(h.transaction=m),hasSpansEnabled_hasSpansEnabled()&&(h.sampled=String(spanIsSampled(n)),h.sample_rand=i?.get("sentry.sample_rand")??utils_getCapturedScopesOnSpan(n).scope?.getPropagationContext().sampleRand.toString()),applyLocalSampleRateToDsc(h),t.emit("createDsc",h,n),h}function envelope_createSpanEnvelopeItem(e){return[{type:"span"},e]}function envelope_createSpanEnvelope(e,t){const n=getDynamicSamplingContextFromSpan(e[0]),r=t?.getDsn(),s=t?.getOptions().tunnel,i={sent_at:new Date(safeDateNow()).toISOString(),...function dscHasRequiredProps(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n},...!!s&&r&&{dsn:dsn_dsnToString(r)}},{beforeSendSpan:a,ignoreSpans:o}=t?.getOptions()||{},c=o?.length?e.filter(e=>{const t=spanUtils_spanToJSON(e);return!should_ignore_span_shouldIgnoreSpan({description:t.description,op:t.op,attributes:t.data},o)}):e,l=e.length-c.length;l&&t?.recordDroppedEvent("before_send","span",l);const u=a?e=>{const t=spanUtils_spanToJSON(e),n=function beforeSendSpan_isStreamedBeforeSendSpanCallback(e){return!!e&&"function"==typeof e&&"_streamed"in e&&!!e._streamed}(a)?t:a(t);return n||(function spanUtils_showSpanDropWarning(){st||(debug_logger_consoleSandbox(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),st=!0)}(),t)}:spanUtils_spanToJSON,d=[];for(const e of c){const t=u(e);t&&d.push(envelope_createSpanEnvelopeItem(t))}return function envelope_createEnvelope(e,t=[]){return[e,t]}(i,d)}function segmentSpanCaptureStrategy_getSegmentSpanCaptureStrategy(){return carrier_getSentryCarrier(getMainCarrier()).segmentSpanCaptureStrategy}class sentrySpan_SentrySpan{constructor(e={}){this._traceId=e.traceId||propagationContext_generateTraceId(),this._spanId=e.spanId||generateSpanId(),this._startTime=e.startTimestamp||time_timestampInSeconds(),this._links=e.links,this._attributes={},this.setAttributes({[Qe]:"manual",[Xe]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}
29addLink(e){return this._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return this._frozen||(void 0===t?delete this._attributes[e]:this._attributes[e]=t,e===Ge&&void 0!==t&&spanShouldInferOtelSource(this)&&function markSpanSourceAsExplicit(e){object_addNonEnumerableProperty(e,Nt,!0)}(this)),this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=spanTimeInputToSeconds(e))}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen||(this._name=e,spanShouldInferOtelSource(this)||this.setAttribute(Ge,"custom")),this}end(e){this._endTime||(this._endTime=spanTimeInputToSeconds(e),function logSpans_logSpanEnd(e){if(!Y)return;const{description:t="< unknown name >",op:n="< unknown op >"}=spanUtils_spanToJSON(e),{spanId:r}=e.spanContext(),s=`[Tracing] Finishing "${n}" ${ot(e)===e?"root ":""}span "${t}" with ID ${r}`;Q.log(s)}(this),this._onSpanEnded()),this._frozen=spanIsTracerProviderSpan(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Xe],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:getStatusMessage(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Qe],profile_id:this._attributes["sentry.profile_id"],exclusive_time:this._attributes[rt],measurements:measurement_timedEventsToMeasurements(this._events),is_segment:this._isStandaloneSpan&&ot(this)===this||void 0,segment_id:this._isStandaloneSpan?ot(this).spanContext().spanId:void 0,links:convertSpanLinksForEnvelope(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===ot(this),status:getSimpleStatus(this._status),attributes:addStatusMessageAttribute(this._attributes,this._status),links:getStreamedSpanLinks(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){if(this._frozen)return this;Y&&Q.log("[Tracing] Adding an event to span:",e);const r=sentrySpan_isSpanTimeInput(t)?t:n||time_timestampInSeconds(),s=sentrySpan_isSpanTimeInput(t)?{}:t||{},i={name:e,time:spanTimeInputToSeconds(r),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=currentScopes_getClient();e&&(e.emit("spanEnd",this),this._isStandaloneSpan||e.emit("afterSpanEnd",this));const t=ot(this),n=this._isStandaloneSpan||this===t;if(this._isStandaloneSpan)return void(this._sampled?function sentrySpan_sendSpanEnvelope(e){const t=currentScopes_getClient();if(!t)return;const n=e[1];if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");t.sendEnvelope(e)}(envelope_createSpanEnvelope([this],e)):(Y&&Q.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));if(!n){const e=segmentSpanCaptureStrategy_getSegmentSpanCaptureStrategy();if(e){const n=utils_getCapturedScopesOnSpan(this).scope||currentScopes_getCurrentScope();e.onChildSpanEnded(this,t,e=>this._convertSpanToTransaction(e),n)}return}if(e&&hasSpanStreamingEnabled_hasSpanStreamingEnabled(e))return void e.emit("afterSegmentSpanEnd",this);const r=utils_getCapturedScopesOnSpan(this).scope||currentScopes_getCurrentScope(),s=segmentSpanCaptureStrategy_getSegmentSpanCaptureStrategy();if(s)s.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),r);else{const e=this._convertSpanToTransaction();e&&r.captureEvent(e)}}_convertSpanToTransaction(e={}){if(!sentrySpan_isFullFinishedSpan(spanUtils_spanToJSON(this)))return;this._name||(Y&&Q.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=utils_getCapturedScopesOnSpan(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;e.onSpanCaptured?.(this);const s=[];for(const t of function getSpanDescendants(e){const t=new Set;return function addSpanChildren(e){if(!t.has(e)&&spanIsSampled(e)){t.add(e);const n=e[it]?Array.from(e[it]):[];for(const e of n)addSpanChildren(e)}}(e),Array.from(t)}(this)){if(t===this||sentrySpan_isStandaloneSpan(t)||e.isSpanAlreadyCaptured?.(t))continue;const n=spanUtils_spanToJSON(t);sentrySpan_isFullFinishedSpan(n)&&(e.onSpanCaptured?.(t),s.push(n))}const i=this._attributes[Ge];delete this._attributes[nt];let a=!1;
29s.forEach(e=>{delete e.data[nt],e.op?.startsWith("gen_ai.")&&(a=!0)});const o={contexts:{trace:spanToTransactionTraceContext(this)},spans:s.length>1e3?s.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:getDynamicSamplingContextFromSpan(this),hasGenAiSpans:a},request:r,...i&&{transaction_info:{source:i}}},c=measurement_timedEventsToMeasurements(this._events);return c&&Object.keys(c).length&&(Y&&Q.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),o.measurements=c),o}}function sentrySpan_isSpanTimeInput(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function sentrySpan_isFullFinishedSpan(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}function sentrySpan_isStandaloneSpan(e){return e instanceof sentrySpan_SentrySpan&&e.isStandaloneSpan()}const Dt="__SENTRY_SUPPRESS_TRACING__";function trace_startInactiveSpan(e){const t=trace_getAcs();return t.startInactiveSpan?t.startInactiveSpan(e):trace_startInactiveSpanImpl(e)}function trace_startInactiveSpanImpl(e){const t=trace_parseSentrySpanArguments(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?t=>currentScopes_withScope(e.scope,t):void 0!==r?e=>trace_withActiveSpan(r,e):e=>e())(()=>{const s=currentScopes_getCurrentScope(),i=trace_getParentSpan(s,r),a=currentScopes_getClient();return e.onlyIfParent&&!i?trace_startMissingRequiredParentSpan(s,a):trace_createChildOrRootSpan({parentSpan:i,spanArguments:t,forceTransaction:n,scope:s})})}function trace_withActiveSpan(e,t){const n=trace_getAcs();return n.withActiveSpan?n.withActiveSpan(e,t):currentScopes_withScope(n=>(spanOnScope_setSpanForScope(n,e||void 0),t(n)))}function trace_isTracingSuppressed(e=currentScopes_getCurrentScope()){const t=trace_getAcs();return t.isTracingSuppressed?t.isTracingSuppressed(e):!0===e.getScopeData().sdkProcessingMetadata[Dt]}function trace_startMissingRequiredParentSpan(e,t){t?.recordDroppedEvent("no_parent_span","span");const n=new SentryNonRecordingSpan({traceId:e.getPropagationContext().traceId});return setCapturedScopesOnSpan(n,e,currentScopes_getIsolationScope()),n}function trace_createChildOrRootSpan({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){const s=currentScopes_getIsolationScope();if(!hasSpansEnabled_hasSpansEnabled()){const t={...s.getPropagationContext(),...r.getPropagationContext()},i=e?e.spanContext().traceId:t.traceId,a=new SentryNonRecordingSpan({traceId:i});return e&&!n&&addChildSpanToSpan(e,a),setCapturedScopesOnSpan(a,r,s),a}const i=currentScopes_getClient();if(function trace_shouldIgnoreStreamedSpan(e,t){const n=e?.getOptions().ignoreSpans;if(!e||!hasSpanStreamingEnabled_hasSpanStreamingEnabled(e)||!n?.length)return!1;return should_ignore_span_shouldIgnoreSpan({description:t.name||"",op:t.attributes?.[Xe]||t.op,attributes:t.attributes},n)}(i,t)){trace_isTracingSuppressed(r)||i?.recordDroppedEvent("ignored","span");const t=new SentryNonRecordingSpan({dropReason:"ignored",traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return e&&!n&&addChildSpanToSpan(e,t),setCapturedScopesOnSpan(t,r,s),t}let a;if(e&&!n)a=function trace_startChildSpan(e,t,n,r){const{spanId:s,traceId:i}=e.spanContext(),a=trace_isTracingSuppressed(t),o=!a&&spanIsSampled(e),c=o?new sentrySpan_SentrySpan({...n,parentSpanId:s,traceId:i,sampled:o}):new SentryNonRecordingSpan({traceId:i});addChildSpanToSpan(e,c),setCapturedScopesOnSpan(c,t,r);const l=currentScopes_getClient();if(!l)return c;hasSpanStreamingEnabled_hasSpanStreamingEnabled(l)&&spanIsNonRecordingSpan(c)&&(spanIsNonRecordingSpan(e)&&e.dropReason?(c.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,"span")):a||(c.dropReason="sample_rate",l.recordDroppedEvent("sample_rate","span")));l.emit("spanStart",c),n.endTimestamp&&(l.emit("spanEnd",c),l.emit("afterSpanEnd",c));return c}(e,r,t,s),addChildSpanToSpan(e,a);else if(e){const n=getDynamicSamplingContextFromSpan(e),{traceId:i,spanId:o}=e.spanContext(),c=spanIsSampled(e);a=trace_startRootSpan({traceId:i,parentSpanId:o,...t},r,s,c),freezeDscOnSpan(a,n)}else{const{traceId:e,dsc:n,parentSpanId:i,sampled:o}={...s.getPropagationContext(),...r.getPropagationContext()};a=trace_startRootSpan({traceId:e,parentSpanId:i,...t},r,s,o),n&&freezeDscOnSpan(a,n)}return function logSpans_logSpanStart(e){if(!Y)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}
29=spanUtils_spanToJSON(e),{spanId:s}=e.spanContext(),i=spanIsSampled(e),a=ot(e),o=a===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${o?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&l.push(`parent ID: ${r}`),!o){const{op:e,description:t}=spanUtils_spanToJSON(a);l.push(`root ID: ${a.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}Q.log(`${c}\n ${l.join("\n ")}`)}(a),a}function trace_parseSentrySpanArguments(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=spanTimeInputToSeconds(e.startTime),delete n.startTime,n}return t}function trace_getAcs(){return asyncContext_getAsyncContextStrategy(getMainCarrier())}function trace_startRootSpan(e,t,n,r){const s=currentScopes_getClient(),i=s?.getOptions()||{},{name:a=""}=e,o={spanAttributes:{...e.attributes},spanName:a,parentSampled:r};s?.emit("beforeSampling",o,{decision:!1});const c=o.parentSampled??r,l=o.spanAttributes,u=t.getPropagationContext(),d=trace_isTracingSuppressed(t),[h,p,m]=d?[!1]:function sampling_sampleSpan(e,t,n){if(!hasSpansEnabled_hasSpansEnabled(e))return[!1];let r,s;"function"==typeof e.tracesSampler?(s=e.tracesSampler({...t,inheritOrSampleWith:e=>"number"==typeof t.parentSampleRate?t.parentSampleRate:"boolean"==typeof t.parentSampled?Number(t.parentSampled):e}),r=!0):void 0!==t.parentSampled?s=t.parentSampled:void 0!==e.tracesSampleRate&&(s=e.tracesSampleRate,r=!0);const i=parseSampleRate_parseSampleRate(s);if(void 0===i)return Y&&Q.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!i)return Y&&Q.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,i,r];const a=n<i;return a||Y&&Q.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[a,i,r]}(i,{name:a,parentSampled:c,attributes:l,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:parseSampleRate_parseSampleRate(u.dsc?.sample_rate)},u.sampleRand),g=new sentrySpan_SentrySpan({...e,attributes:{[Ge]:"custom",[Je]:void 0!==p&&m?p:void 0,...l},sampled:h});return h||!s||d||(Y&&Q.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),s.recordDroppedEvent("sample_rate",hasSpanStreamingEnabled_hasSpanStreamingEnabled(s)?"span":"transaction")),setCapturedScopesOnSpan(g,t,n),s&&s.emit("spanStart",g),g}function trace_getParentSpan(e,t){if(t)return t;if(null===t)return;const n=spanOnScope_getSpanForScope(e);if(!n)return;const r=currentScopes_getClient();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?ot(n):n}function isMeasurementValue(e){return"number"==typeof e&&isFinite(e)}function startAndEndSpan(e,t,n,{...r}){const s=spanUtils_spanToJSON(e).start_timestamp;return s&&s>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),trace_withActiveSpan(e,()=>{const e=trace_startInactiveSpan({startTime:t,...r});return e&&e.end(n),e})}function startStandaloneWebVitalSpan(e){const t=currentScopes_getClient();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:a,environment:o}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),l=t.getIntegrationByName("Replay"),u=l?.getReplayId(),d=currentScopes_getCurrentScope(),h=d.getUser(),p=void 0!==h?h.email||h.id||h.ip_address:void 0;let m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}return trace_startInactiveSpan({name:n,attributes:{release:a,environment:o,user:p||void 0,profile_id:m||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":se.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...s},startTime:i,experimental:{standalone:!0}})}function getBrowserPerformanceAPI(){return se.addEventListener&&se.performance}function msToSec(e){return e/1e3}function supportsWebVital(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function listenForWebVitalReportEvents(e,t){let n,r=!1;function _runCollectorCallbackOnce(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}(e=>{const onHiddenOrPageHide=t=>
29{"pagehide"!==t.type&&"hidden"!==se.document?.visibilityState||e(t)};addPageListener("visibilitychange",onHiddenOrPageHide,{capture:!0,once:!0}),addPageListener("pagehide",onHiddenOrPageHide,{capture:!0,once:!0})})(()=>{_runCollectorCallbackOnce("pagehide")});const s=e.on("beforeStartNavigationSpan",(e,t)=>{t?.isRedirect||(_runCollectorCallbackOnce("navigation"),s(),i())}),i=e.on("afterStartPageLoadSpan",e=>{n=e,i()})}function trackClsAsStandaloneSpan(e){let t,n=0;if(!supportsWebVital("layout-shift"))return;const r=addClsInstrumentationHandler(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);listenForWebVitalReportEvents(e,(e,s)=>{!function _sendStandaloneClsSpan(e,t,n,r){Me&&Q.log(`Sending CLS span (${e})`);const s=t?msToSec((browserPerformanceTimeOrigin()||0)+t.startTime):time_timestampInSeconds(),i=currentScopes_getCurrentScope().getScopeData().transactionName,a=t?htmlTreeAsString_htmlTreeAsString(t.sources[0]?.node):"Layout shift",o={[Qe]:"auto.http.browser.cls",[Xe]:"ui.webvital.cls",[rt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{o[`cls.source.${t+1}`]=htmlTreeAsString_htmlTreeAsString(e.node)});const c=startStandaloneWebVitalSpan({name:a,transaction:i,attributes:o,startTime:s});c&&(c.addEvent("cls",{[et]:"",[tt]:e}),c.end(s))}(n,t,s,e),r()})}function isValidLcpMetric(e){return null!=e&&e>0&&e<=6e4}function trackLcpAsStandaloneSpan(e){let t,n=0;if(!supportsWebVital("largest-contentful-paint"))return;const r=addLcpInstrumentationHandler(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&isValidLcpMetric(e.value)&&(n=e.value,t=r)},!0);listenForWebVitalReportEvents(e,(e,s)=>{!function _sendStandaloneLcpSpan(e,t,n,r){if(!isValidLcpMetric(e))return;Me&&Q.log(`Sending LCP span (${e})`);const s=msToSec((browserPerformanceTimeOrigin()||0)+(t?.startTime||0)),i=currentScopes_getCurrentScope().getScopeData().transactionName,a=t?htmlTreeAsString_htmlTreeAsString(t.element):"Largest contentful paint",o={[Qe]:"auto.http.browser.lcp",[Xe]:"ui.webvital.lcp",[rt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(o["lcp.element"]=htmlTreeAsString_htmlTreeAsString(t.element)),t.id&&(o["lcp.id"]=t.id),t.url&&(o["lcp.url"]=t.url),null!=t.loadTime&&(o["lcp.loadTime"]=t.loadTime),null!=t.renderTime&&(o["lcp.renderTime"]=t.renderTime),null!=t.size&&(o["lcp.size"]=t.size));const c=startStandaloneWebVitalSpan({name:a,transaction:i,attributes:o,startTime:s});c&&(c.addEvent("lcp",{[et]:"millisecond",[tt]:e}),c.end(s))}(n,t,s,e),r()})}function getAbsoluteTime(e){return e?((browserPerformanceTimeOrigin()||performance.timeOrigin)+e)/1e3:e}function resourceTimingToSpanAttributes(e){const t={};if(null!=e.nextHopProtocol){const{name:n,version:r}=function extractNetworkProtocol(e){let t="unknown",n="unknown",r="";for(const s of e){if("/"===s){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return browserPerformanceTimeOrigin()||getBrowserPerformanceAPI()?.timeOrigin?function dropUndefinedKeysFromObject(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>null!=e))}({...t,"http.request.redirect_start":getAbsoluteTime(e.redirectStart),"http.request.redirect_end":getAbsoluteTime(e.redirectEnd),"http.request.worker_start":getAbsoluteTime(e.workerStart),"http.request.fetch_start":getAbsoluteTime(e.fetchStart),"http.request.domain_lookup_start":getAbsoluteTime(e.domainLookupStart),"http.request.domain_lookup_end":getAbsoluteTime(e.domainLookupEnd),"http.request.connect_start":getAbsoluteTime(e.connectStart),"http.request.secure_connection_start":getAbsoluteTime(e.secureConnectionStart),"http.request.connection_end":getAbsoluteTime(e.connectEnd),"http.request.request_start":getAbsoluteTime(e.requestStart),"http.request.response_start":getAbsoluteTime(e.responseStart),"http.request.response_end":getAbsoluteTime(e.responseEnd),"http.request.time_to_first_byte":null!=e.responseStart?e.responseStart/1e3:void 0}):t}const Bt=2147483647;let Vt,Ht,Ut=0,$t={};function startTrackingWebVitals({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=getBrowserPerformanceAPI();if(r&&browserPerformanceTimeOrigin()){r.mark&&se.performance.mark("sentry-tracing-init");const s=t?trackLcpAsStandaloneSpan(n):!1===t?function _trackLCP(){return addLcpInstrumentationHandler(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&isValidLcpMetric(e.value)&&($t.lcp={value:e.value,unit:"millisecond"},Vt=t)},!0)}():void 0,i=e?trackClsAsStandaloneSpan(n):!1===e?function _trackCLS(){return addClsInstrumentationHandler(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&($t.cls={value:e.value,unit:""},Ht=t)},!0)}():void 0,a=function _trackTtfb(){return function addTtfbInstrumentationHandler(e){return addMetricObserver("ttfb",e,instrumentTtfb,It)}(({metric:e})=>{e.entries[e.entries.length-1]&&($t.ttfb={value:e.value,unit:"millisecond"})})}(),o=function _trackFpFcp(){return addPerformanceInstrumentationHandler("paint",({entries:e})=>{const t=getVisibilityWatcher();for(const n of e){const e=n.startTime<t.firstHiddenTime;"first-paint"===n.name&&e&&($t.fp={value:n.startTime,unit:"millisecond"}),"first-contentful-paint"===n.name&&e&&($t.fcp={value:n.startTime,unit:"millisecond"})}})}();return()=>{a(),o(),s?.(),i?.()}}return()=>{}}function addPerformanceEntries(e,t){const n=getBrowserPerformanceAPI(),r=browserPerformanceTimeOrigin();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:s,ignorePerformanceApiSpans:i,ignoreResourceSpans:a}=t,o=msToSec(r),c=n.getEntries(),{op:l,start_timestamp:u}=spanUtils_spanToJSON(e);c.slice(Ut).forEach(t=>{const n=msToSec(t.startTime),r=msToSec(Math.max(0,t.duration));if(!("navigation"===l&&u&&o+n<u))switch(t.entryType){case"navigation":!function _addNavigationSpans(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{_addPerformanceNavigationTiming(e,t,r,n)}),_addPerformanceNavigationTiming(e,t,"secureConnection",n,"TLS/SSL"),_addPerformanceNavigationTiming(e,t,"fetch",n,"cache"),_addPerformanceNavigationTiming(e,t,"domainLookup",n,"DNS"),function _addRequest(e,t,n){const r=n+msToSec(t.requestStart),s=n+msToSec(t.responseEnd),i=n+m
29sToSec(t.responseStart);t.responseEnd&&(startAndEndSpan(e,r,s,{op:"browser.request",name:t.name,attributes:{[Qe]:"auto.ui.browser.metrics"}}),startAndEndSpan(e,i,s,{op:"browser.response",name:t.name,attributes:{[Qe]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,t,o);break;case"mark":case"paint":case"measure":!function _addMeasureSpans(e,t,n,r,s,i){if(function isReact19MeasureEntry(e){if("measure"!==e?.entryType)return;try{return"Components â"===e.detail.devtools.track}catch{return}}(t))return;if(["mark","measure"].includes(t.entryType)&&function stringMatchesSomePattern(e,t=[],n=!1){for(const r of t)if(isMatchingPattern(e,r,n))return!0;return!1}(t.name,i))return;const a=getNavigationEntry(!1),o=msToSec(a?a.requestStart:0),c=s+Math.max(n,o),l=s+n,u=l+r,d={[Qe]:"auto.resource.browser.metrics"};c!==l&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c);(function _addDetailToSpanAttributes(e,t){try{const n=t.detail;if(!n)return;if("object"==typeof n){for(const[t,r]of Object.entries(n))if(r&&is_
29isPrimitive(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(void 0!==r)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(is_isPrimitive(n))return void(e["sentry.browser.measure.detail"]=n);try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}})(d,t),c<=u&&startAndEndSpan(e,c,u,{name:t.name,op:t.entryType,attributes:d})}(e,t,n,r,o,i);break;case"resource":!function _addResourceSpans(e,t,n,r,s,i,a){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const o=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(a?.includes(o))return;const c={[Qe]:"auto.resource.browser.metrics"},l=function url_parseUrl(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}}(n);l.protocol&&(c["url.scheme"]=l.protocol.split(":").pop());l.host&&(c["server.address"]=l.host);c["url.same_origin"]=n.includes(se.location.origin),c[Ee]=n,function _setResourceRequestAttributes(e,t,n){n.forEach(([n,r])=>{const s=e[n];null!=s&&("number"==typeof s&&s<Bt||"string"==typeof s)&&(t[r]=s)})}(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const u={...c,...resourceTimingToSpanAttributes(t)},d=i+r,h=d+s;startAndEndSpan(e,d,h,{name:n.replace(se.location.origin,""),op:o,attributes:u})}(e,t,t.name,n,r,o,a)}}),Ut=Math.max(c.length-1,0),function _trackNavigator(e,t){const n=se.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?"network.connection.type":"connectionType",r.type),isMeasurementValue(r.rtt)&&(t?e.setAttribute("network.connection.rtt",r.rtt):"pageload"===spanUtils_spanToJSON(e).op&&measurement_setMeasurement("connection.rtt",r.rtt,"millisecond")));isMeasurementValue(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`));isMeasurementValue(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}(e,s)}function addWebVitalsToSpan(e,t){const n=browserPerformanceTimeOrigin();if(!getBrowserPerformanceAPI()?.getEntries||!n)return void resetWebVitalState();const{spanStreamingEnabled:r,recordClsOnPageloadSpan:s,recordLcpOnPageloadSpan:i}=t,a=msToSec(n);if("pageload"===spanUtils_spanToJSON(e).op){if(function _addTtfbRequestTimeToMeasurements(e){const t=getNavigationEntry(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}($t),r){const setAttr=(t,n,r)=>{const s=r??`browser.web_vital.${t}.value`;e.setAttribute(s,n),Me&&Q.log("Setting web vital attribute",{[s]:n},"on pageload span")};["ttfb","fp","fcp"].forEach(e=>{$t[e]&&setAttr(e,$t[e].value)}),$t["ttfb.requestTime"]&&setAttr("ttfb.requestTime",$t["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else s||delete $t.cls,i||delete $t.lcp,Object.entries($t).forEach(([t,n])=>{measurement_setMeasurement(t,n.value,n.unit,e)}),function _setWebVitalAttributes(e,t){Vt&&t.recordLcpOnPageloadSpan&&(Vt.element&&e.setAttribute("lcp.element",htmlTreeAsString_htmlTreeAsString(Vt.element)),Vt.id&&e.setAttribute("lcp.id",Vt.id),Vt.url&&e.setAttribute("lcp.url",Vt.url.trim().slice(0,200)),null!=Vt.loadTime&&e.setAttribute("lcp.loadTime",Vt.loadTime),null!=Vt.renderTime&&e.setAttribute("lcp.renderTime",Vt.renderTime),e.setAttribute("lcp.size",Vt.size));Ht?.sources&&t.recordClsOnPageloadSpan&&Ht.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,htmlTreeAsString_htmlTreeAsString(t.node)))}(e,t);e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",a),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",getActivationStart())}resetWebVitalState()}function resetWebVitalState(){Vt=void 0,Ht=void 0,$t={}}function _addPerformanceNavigationTiming(e,t,n,r,s=n){const i=function _getEndPropertyNameForNavigationTiming(e){if("secureConnection"===e)return"connectEnd";if("fetch"===e)return"domainLookupStart";return`${e}End`}(n),a=t[i],o=t[`${n}Start`];o&&a&&startAndEndSpan(e,r+msToSec(o),r+msToSec(a),{op:`browser.${s}`,name:t.name,attributes:{[Qe]:"auto.ui.browser.metrics",..."redirect"===n&&null!=t.redirectCount?{"http.redirect_count":t.redirectCount}:{}}})}const qt=new WeakMap,jt=new WeakMap,Wt=["text/event-stream","application/x-ndjson","application/stream+json"],fetchStreamPerformanceIntegration=()=>({name:"FetchStreamPerformance",setup(){!function addFetchEndInstrumentationHandler(e){const t="fetch-body-resolved",n=addHandler(t,e);return maybeInstrument(t,()=>instrumentFetch(streamHandler)),n}(e=>{if(e.response){const t=qt.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);const n=jt.get(e.response);n&&clearTimeout(n)}}}),addFetchInstrumentationHandler(e=>{if(e.endTimestamp&&e.response){const t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!Wt.some(e=>
29t.startsWith(e)))return;const n=e.fetchData?.url||"",r=e.fetchData?.method||"GET",s=parseStringToURLObject(n),i=startInactiveSpan({name:`${r} ${n.startsWith("data:")?stripDataUrlContent(n):s?getSanitizedUrlStringFromUrlObject(s):n}`,startTime:e.endTimestamp,attributes:{url:stripDataUrlContent(n),"http.method":r,type:"fetch",[d.uT]:"http.client.stream",[d.JD]:"auto.http.browser.stream"}});qt.set(e.response,i);const a=setTimeout(()=>{i.isRecording()&&i.end()},9e4);jt.set(e.response,a)}})}});function node_isNodeEnv(){return!function env_isBrowserBundle(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}()&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function isBrowser_isBrowser(){return"undefined"!=typeof window&&(!node_isNodeEnv()||function isBrowser_isElectronNodeRenderer(){const e=J.process;return"renderer"===e?.type}())}const zt=[],Kt=new Map,Yt=new Map;function startTrackingINP(){if(getBrowserPerformanceAPI()&&browserPerformanceTimeOrigin()){const e=function _trackINP(){return addInpInstrumentationHandler(_onInp)}();return()=>{e()}}return()=>{}}const Gt={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};const _onInp=({metric:e})=>{if(null==e.value)return;const t=msToSec(e.value);if(t>60)return;const n=e.entries.find(t=>t.duration===e.value&&Gt[t.name]);if(!n)return;const{interactionId:r}=n,s=Gt[n.name],i=msToSec(browserPerformanceTimeOrigin()+n.startTime),a=spanUtils_getActiveSpan(),o=a?ot(a):void 0,c=null!=r?Kt.get(r):void 0,l=c?.span||o,u=l?spanUtils_spanToJSON(l).description:currentScopes_getCurrentScope().getScopeData().transactionName,d=startStandaloneWebVitalSpan({name:c?.elementName||htmlTreeAsString_htmlTreeAsString(n.target),transaction:u,attributes:{[Qe]:"auto.http.browser.inp",[Xe]:`ui.interaction.${s}`,[rt]:n.duration},startTime:i});d&&(d.addEvent("inp",{[et]:"millisecond",[tt]:e.value}),d.end(i+t))};function registerInpInteractionListener(){const e=Object.keys(Gt);function captureElementFromEvent(e){const t=e.target;if(!t)return;const n=htmlTreeAsString_htmlTreeAsString(t),r=Math.round(e.timeStamp);if(Yt.set(r,n),Yt.size>50){const e=Yt.keys().next().value;void 0!==e&&Yt.delete(e)}}isBrowser_isBrowser()&&e.forEach(e=>{se.addEventListener(e,captureElementFromEvent,{capture:!0,passive:!0})});const handleEntries=({entries:e})=>{const t=spanUtils_getActiveSpan(),n=t&&ot(t);e.forEach(e=>{if(!function isPerformanceEventTiming(e){return"duration"in e}(e))return;const t=e.interactionId;if(null==t)return;if(Kt.has(t))return;const r=e.target?htmlTreeAsString_htmlTreeAsString(e.target):function resolveElementNameFromEntry(e){const t=Math.round(e.startTime);let n=Yt.get(t);if(!n)for(let e=-5;e<=5;e++){const r=Yt.get(t+e);if(r){n=r;break}}return n||"<unknown>"}(e);if(zt.length>10){const e=zt.shift();Kt.delete(e)}zt.push(t),Kt.set(t,{span:n,elementName:r})})};addPerformanceInstrumentationHandler("event",handleEntries),addPerformanceInstrumentationHandler("first-input",handleEntries)}function _emitWebVitalSpan(e){const{name:t,op:n,origin:r,metricName:s,value:i,attributes:a,parentSpan:o,reportEvent:c,startTime:l,endTime:u}=e,d=currentScopes_getCurrentScope().getScopeData().transactionName,h={[Qe]:r,[Xe]:n,[rt]:0,[`browser.web_vital.${s}.value`]:i,[Te]:d,[ye]:d,"user_agent.original":se.navigator?.userAgent,...a};o&&"pageload"===spanUtils_spanToStreamedSpanJSON(o).attributes?.[Xe]&&(h["sentry.pageload.span_id"]=o.spanContext().spanId),c&&(h[`browser.web_vital.${s}.report_event`]=c);const p=trace_startInactiveSpan({name:t,attributes:h,startTime:l,parentSpan:o});p&&p.end(u??l)}function trackLcpAsSpan(e){let t,n=0;if(!supportsWebVital("largest-contentful-paint"))return;const r=addLcpInstrumentationHandler(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&isValidLcpMetric(e.value)&&(n=e.value,t=r)},!0);listenForWebVitalReportEvents(e,(e,s,i)=>{!function _sendLcpSpan(e,t,n,r){if(!isValidLcpMetric(e))return;Me&&Q.log(`Sending LCP span (${e})`);const s=browserPerformanceTimeOrigin()||0,i=msToSec(s),a=msToSec(s+(t?.startTime||0)),o=t?htmlTreeAsString_htmlTreeAsString(t.element):"Largest contentful paint",c={};t?.element&&(c["browser.web_vital.lcp.element"]=htmlTreeAsString_htmlTreeAsString(t.element)),t?.id&&(c["browser.web_vital.lcp.id"]=t.id),t?.url&&(c["browser.web_vital.lcp.url"]=t.url),null!=t?.loadTime&&(c["browser.web_vital.lcp.load_time"]=t.loadTime),null!=t?.renderTime&&(c["browser.web_vital.lcp.render_time"]=t.renderTime),null!=t?.size&&(c["browser.web_vital.lcp.size"]=t.size),_emitWebVitalSpan({name:o,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:i,endTime:a})}(n,t,i,e),r()})}function trackClsAsSpan(e){let t,n=0;if(!supportsWebVital("layout-shift"))return;const r=addClsInstrumentationHandler(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);listenForWebVitalReportEvents(e,(e,s,i)=>{!function _sendClsSpan(e,t,n,r){Me&&Q.log(`Sending CLS span (${e})`);const s=t?msToSec((browserPerformanceTimeOrigin()||0)+t.startTime):time_timestampInSeconds(),i=t?htmlTreeAsString_htmlTreeAsString(t.sources[0]?.node):"Layout shift",a={};
29t?.sources&&t.sources.forEach((e,t)=>{a[`browser.web_vital.cls.source.${t+1}`]=htmlTreeAsString_htmlTreeAsString(e.node)});_emitWebVitalSpan({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:a,parentSpan:n,reportEvent:r,startTime:s})}(n,t,i,e),r()})}function trackInpAsSpan(){if(!getBrowserPerformanceAPI()||!browserPerformanceTimeOrigin())return;addInpInstrumentationHandler(({metric:e})=>{if(null==e.value)return;if(msToSec(e.value)>60)return;const t=e.entries.find(t=>t.duration===e.value&&Gt[t.name]);t&&function _sendInpSpan(e,t){Me&&Q.log(`Sending INP span (${e})`);const n=msToSec(browserPerformanceTimeOrigin()+t.startTime),r=msToSec(e),s=Gt[t.name],i=function getCachedInteractionContext(e){return null!=e?Kt.get(e):void 0}(t.interactionId),a=spanUtils_getActiveSpan(),o=a?ot(a):void 0,c=i?.span||o,l=c?spanUtils_spanToStreamedSpanJSON(c).name:currentScopes_getCurrentScope().getScopeData().transactionName,u=i?.elementName||htmlTreeAsString_htmlTreeAsString(t.target);_emitWebVitalSpan({name:u,op:`ui.interaction.${s}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[rt]:t.duration,[Te]:l,[ye]:l},startTime:n,endTime:n+r,parentSpan:c})}(e.value,t)})}const Jt="WebVitals",webVitalsIntegration=(e={})=>{const t=new Set(e.ignore??[]);return{name:Jt,setup(n){const r=hasSpanStreamingEnabled(n),{enableStandaloneClsSpans:s,enableStandaloneLcpSpans:i}=e._experiments??{},a=r||t.has("cls")?void 0:s||!1,o=r||t.has("lcp")?void 0:i||!1,c=startTrackingWebVitals({recordClsStandaloneSpans:a,recordLcpStandaloneSpans:o,client:n}),l=new WeakSet;n.on("afterStartPageLoadSpan",e=>{l.add(e)}),n.on("spanEnd",e=>{l.delete(e)&&(c(),addWebVitalsToSpan(e,{recordClsOnPageloadSpan:!1===a,recordLcpOnPageloadSpan:!1===o,spanStreamingEnabled:r}))}),r?(t.has("lcp")||trackLcpAsSpan(n),t.has("cls")||trackClsAsSpan(n),t.has("inp")||trackInpAsSpan()):t.has("inp")||startTrackingINP()},afterAllSetup(){t.has("inp")||registerInpInteractionListener()}}};const Xt="sentry_previous_trace",Qt="sentry.previous_trace";function linkTraces(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const s="session-storage"===t;let i=s?function getPreviousTraceFromSessionStorage(){try{const e=H.sessionStorage?.getItem(Xt);return JSON.parse(e)}catch{return}}():void 0;e.on("spanStart",e=>{if((0,h.zU)(e)!==e)return;const t=(0,c.o5)().getPropagationContext();i=function addPreviousTraceSpanLink(e,t,n){const s=(0,h.et)(t);function getSampleRate(){try{const e=Number(s.data?.[d.sy]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}const i={spanContext:t.spanContext(),startTimestamp:s.start_timestamp,sampleRate:getSampleRate(),sampleRand:n.sampleRand};if(!e)return i;const a=e.spanContext;if(a.traceId===s.trace_id)return e;Date.now()/1e3-e.startTimestamp<=3600&&(ge&&r.Yz.log(`Adding previous_trace \`${JSON.stringify(a)}\` link to span \`${JSON.stringify({op:s.op,...t.spanContext()})}\``),t.addLink({context:a,attributes:{[d.Lc]:"previous_trace"}}),t.setAttribute(Qt,`${a.traceId}-${a.spanId}-${spanContextSampled(a)?1:0}`));return i}(i,e,t),s&&function storePreviousTraceInSessionStorage(e){try{H.sessionStorage.setItem(Xt,JSON.stringify(e))}catch(e){ge&&r.Yz.warn("Could not store previous trace in sessionStorage",e)}}(i)});let a=!0;n&&e.on("beforeSampling",e=>{if(!i)return;const t=(0,c.o5)(),n=t.getPropagationContext();a&&n.parentSpanId?a=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(spanContextSampled(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=spanContextSampled(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[d.Ef]:i.sampleRate})})}function spanContextSampled(e){return 1===e.traceFlags}var Zt=__webpack_require__(724);function getTraceData(e={}){const t=e.client||(0,c.KU)();if(!(0,B.Ol)()||!t)return{};const n=(0,b.EU)(),s=(0,$e.h)(n);if(s.getTraceData)return s.getTraceData(e);const i=e.scope||(0,c.o5)(),a=e.span||(0,h.Bk)(),o=(0,Be.h)(a)&&!(0,Fe.f)(t.getOptions());if(!a&&(0,c.Bi)())return{};const l=a&&!o?(0,h.Qh)(a):function scopeToTraceHeader(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();
29return(0,ze.TC)(t,r,n)}(i),u=a?(0,f.k1)(a):(0,f.ao)(t,i),d=(0,Zt.De)(u);if(!ze.MI.test(l))return r.Yz.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const p={"sentry-trace":l,baggage:d};return e.propagateTraceparent&&(p.traceparent=a&&!o?(0,h.G_)(a):function scopeToTraceparentHeader(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return(0,ze.Iy)(t,r,n)}(i)),p}function instrumentFetchRequest(e,t,n,r,s){if(!e.fetchData)return;const{method:i,url:a}=e.fetchData,o=(0,Fe.f)()&&t(a);if(e.endTimestamp){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(o&&(!function endSpan(e,t){if(t.response){(0,Ue.N8)(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:Ue.TJ,message:"internal_error"});e.end()}(n,e),function _callOnRequestSpanEnd(e,t,n){const r="object"==typeof n&&null!==n?n.onRequestSpanEnd:void 0;r?.(e,{headers:t.response?.headers,error:t.error})}(n,e,s)),delete r[t]))}const{spanOrigin:l="auto.http.browser",propagateTraceparent:u=!1}="object"==typeof s?s:{spanOrigin:s},d=(0,c.KU)(),p=!!(0,h.Bk)(),m=p||!!d&&hasSpanStreamingEnabled(d),g=o&&m?startInactiveSpan(function getSpanStartOptions(e,t,n){if(e.startsWith("data:")){return{name:`${t} ${stripDataUrlContent(e)}`,attributes:getFetchSpanAttributes(e,void 0,t,n)}}const r=parseStringToURLObject(e),s=r?getSanitizedUrlStringFromUrlObject(r):e;return{name:`${t} ${s}`,attributes:getFetchSpanAttributes(e,r,t,n)}}(a,i,l)):new Be.w,f=spanIsIgnored(g)&&p?void 0:g;if(o&&!m&&d?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=g.spanContext().spanId,r[g.spanContext().spanId]=g,n(e.fetchData.url)){const t=e.args[0],n={...e.args[1]||{}},r=function _INTERNAL_getTracingHeadersForFetchRequest(e,t,n,r){const s=getTraceData({span:n,propagateTraceparent:r}),i=s["sentry-trace"],a=s.baggage,o=s.traceparent;if(!i)return;const c=t.headers||((0,I.ks)(e)?e.headers:void 0);if(c){if(function isHeaders(e){return"undefined"!=typeof Headers&&(0,I.tH)(e,Headers)}(c)){const e=new Headers(c);if(e.get("sentry-trace")||e.set("sentry-trace",i),r&&o&&!e.get("traceparent")&&e.set("traceparent",o),a){const t=e.get("baggage");t?baggageHeaderHasSentryBaggageValues(t)||e.set("baggage",`${t},${a}`):e.set("baggage",a)}return e}if(function isHeadersInitTupleArray(e){if(!Array.isArray(e))return!1;return e.every(e=>Array.isArray(e)&&2===e.length&&"string"==typeof e[0])}(c)){const e=[...c];e.find(e=>"sentry-trace"===e[0])||e.push(["sentry-trace",i]),r&&o&&!e.find(e=>"traceparent"===e[0])&&e.push(["traceparent",o]);const t=c.find(e=>"baggage"===e[0]&&"string"==typeof e[1]&&baggageHeaderHasSentryBaggageValues(e[1]));return a&&!t&&e.push(["baggage",a]),e}{const e="sentry-trace"in c?c["sentry-trace"]:void 0,t="traceparent"in c?c.traceparent:void 0,n="baggage"in c?c.baggage:void 0,s=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>baggageHeaderHasSentryBaggageValues(e)):baggageHeaderHasSentryBaggageValues(n));a&&!l&&s.push(a);const u=Object.assign({},c,{"sentry-trace":e??i,...s.length>0&&{baggage:s.join(",")}});return r&&o&&!t&&(u.traceparent=o),u}}return{"sentry-trace":i,...a&&{baggage:a},...o&&{traceparent:o}}}(t,n,(0,Fe.f)()&&m?f:void 0,u);r&&(e.args[1]=n,n.headers=r)}if(d){const t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit("beforeOutgoingRequestSpan",g,t)}return g}function baggageHeaderHasSentryBaggageValues(e){return"string"==typeof e&&e.split(",").some(e=>e.trim().startsWith(Zt.sv))}function getFetchSpanAttributes(e,t,n,r){const s={url:stripDataUrlContent(e),type:"fetch","http.method":n,[d.JD]:r,[d.uT]:"http.client"};return t&&(isURLObjectRelative(t)||(s[Se]=stripDataUrlContent(t.href),s[Ee]=stripDataUrlContent(t.href),s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function parseXhrResponseHeaders(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return Me&&Q.error(t,"Failed to get xhr response headers",e),{}}return t?t.split("\r\n").reduce((e,t)=>
29{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{}):{}}function getFullURL(e){try{return new URL(e,H.location.origin).href}catch{return}}function createHeadersSafely(e){try{return new Headers(e)}catch{return}}const en={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function instrumentOutgoingRequests(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:o,onRequestSpanStart:l,onRequestSpanEnd:u}={...en,...t},p="function"==typeof s?s:e=>!0,shouldAttachHeadersWithTargets=e=>function shouldAttachHeaders(e,t){const n=getLocationHref();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return t?(0,a.Xr)(r.toString(),t)||i&&(0,a.Xr)(r.pathname,t):i}{const n=!!e.match(/^\/(?!\/)/);return t?(0,a.Xr)(e,t):n}}(e,o),m={},g=e.getOptions().propagateTraceparent;n&&addFetchInstrumentationHandler(t=>{const n=instrumentFetchRequest(t,p,shouldAttachHeadersWithTargets,m,{propagateTraceparent:g,onRequestSpanEnd:u});if(n){const r=getFullURL(t.fetchData.url),s=r?parseUrl(r).host:void 0,a=r?stripDataUrlContent(r):void 0;n.setAttributes({[Se]:a,[Ee]:a,"server.address":s}),i&&addHTTPTimings(n,e),l?.(n,{headers:t.headers})}}),r&&addXhrInstrumentationHandler(t=>{const n=function xhrCallback(e,t,n,r,s,i){const a=e.xhr,o=a?.[de];if(!a||a.__sentry_own_request__||!o)return;const{url:l,method:u}=o,p=(0,Fe.f)()&&t(l);if(e.endTimestamp){const t=a.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&(p&&void 0!==o.status_code&&((0,Ue.N8)(n,o.status_code),n.end(),i?.(n,{headers:createHeadersSafely(parseXhrResponseHeaders(a)),error:e.error})),delete r[t]))}const m=getFullURL(l),g=parseUrl(m||l),f=m?stripDataUrlContent(m):void 0,v=stripDataUrlContent(function stripUrlQueryAndFragment(e){return e.split(/[?#]/,1)[0]}(l)),b=(0,c.KU)(),_=!!(0,h.Bk)(),S=_||!!b&&hasSpanStreamingEnabled(b),y=p&&S?startInactiveSpan({name:`${u} ${v}`,attributes:{url:stripDataUrlContent(l),type:"xhr","http.method":u,"http.url":f,[Ee]:f,"server.address":g?.host,[d.JD]:"auto.http.browser",[d.uT]:"http.client",...g?.search&&{"http.query":g?.search},...g?.hash&&{"http.fragment":g?.hash}}}):new Be.w,T=spanIsIgnored(y)&&_?void 0:y;p&&!S&&b?.recordDroppedEvent("no_parent_span","span");a.__sentry_xhr_span_id__=y.spanContext().spanId,r[a.__sentry_xhr_span_id__]=y,n(l)&&function addTracingHeadersToXhrRequest(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:i}=getTraceData({span:t,propagateTraceparent:n});r&&function setHeaderOnXhr(e,t,n,r){const s=e.__sentry_xhr_v3__?.request_headers;if(s?.["sentry-trace"]||!e.setRequestHeader)return;try{if(e.setRequestHeader("sentry-trace",t),r&&!s?.traceparent&&e.setRequestHeader("traceparent",r),n){const t=s?.baggage;t&&function baggageHeaderHasSentryValues(e){return e.split(",").some(e=>e.trim().startsWith("sentry-"))}(t)||e.setRequestHeader("baggage",n)}}catch{}}(e,r,s,i)}(a,(0,Fe.f)()&&S?T:void 0,s);b&&b.emit("beforeOutgoingRequestSpan",y,e);return y}(t,p,shouldAttachHeadersWithTargets,m,g,u);n&&(i&&addHTTPTimings(n,e),l?.(n,{headers:createHeadersSafely(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}const tn=300;function addHTTPTimings(e,t){const{url:n}=(0,h.et)(e).data;if(!n||"string"!=typeof n)return;let onEntryFound=()=>{setTimeout(r)};if(hasSpanStreamingEnabled(t)){const t=e.end.bind(e);e.end=e=>{const n=e??(0,C.zf)();let s=!1;const endSpanAndCleanup=()=>{s||(s=!0,setTimeout(r),t(n),clearTimeout(i))};onEntryFound=endSpanAndCleanup;const i=setTimeout(endSpanAndCleanup,tn)}}const r=addPerformanceInstrumentationHandler("resource",({entries:t})=>{t.forEach(t=>{(function isPerformanceResourceTiming(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)})(t)&&t.name.endsWith(n)&&(e.setAttributes(resourceTimingToSpanAttributes(t)),onEntryFound())})})}const nn=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;const rn={...je,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroun
29dSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...en};function getMetaContent(e){const t=H.document,n=t?.querySelector(`meta[name=${e}]`);return n?.getAttribute("content")||void 0}function getServerTiming(e){const t=H.performance?.getEntriesByType?.("navigation")[0],n=t?.serverTiming?.find(t=>t.name===e);return n?.description}const sn="_sentry_idleSpan";function getActiveIdleSpan(e){return e[sn]}function setActiveIdleSpan(e,t){(0,l.my)(e,sn,t)}const an=1.5;const on=new Map,cn=new Set;function getMetadataForUrl(e,t){return function ensureMetadataStacksAreParsed(e){if(S.O._sentryModuleMetadata)for(const t of Object.keys(S.O._sentryModuleMetadata)){const n=S.O._sentryModuleMetadata[t];if(cn.has(t))continue;cn.add(t);const r=e(t);for(const e of r.reverse())if(e.filename){on.set(e.filename,n);break}}}(e),on.get(t)}const thirdPartyErrorFilterIntegration=e=>({name:"ThirdPartyErrorsFilter",setup(e){e.on("beforeEnvelope",e=>{forEachEnvelopeItem(e,(e,t)=>{if("event"===t){const t=Array.isArray(e)?e[1]:void 0;t&&(!function stripMetadataFromStackFrames(e){e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{delete e.module_metadata})})}(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;!function addMetadataToStackFrames(e,t){t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{if(!t.filename||t.module_metadata)return;const n=getMetadataForUrl(e,t.filename);n&&(t.module_metadata=n)})})}(e.getOptions().stackParser,t)})},preprocessEvent(t){e.ignoreSentryInternalFrames&&(S.O._sentryWrappedDepth??0)>0&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){const n=!!e.ignoreSentryInternalFrames&&(!0===t.sdkProcessingMetadata?.insideSentryWrapped&&1===t.exception?.values?.length),r=function getBundleKeysForAllFramesWithFilenames(e,t,n){const r=(0,p.RV)(e);if(!r)return;return r.filter((e,r)=>!!e.filename&&((null!=e.lineno||null!=e.colno||null!=e.instruction_addr)&&(!t||!function isSentryInternalFrame(e,t,n){if(0!==t)return!1;if(n&&function isLikelyMinifiedSentryWrappedFrame(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}(e))return!0;if("sentryWrapped"===e.function)return!0;if(!e.context_line||!e.filename)return!1;if(!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(dn))return!1;if(e.pre_context){const t=e.pre_context.length;for(let n=0;n<t;n++)if(e.pre_context[n]?.includes(un))return!0}return!1}(e,r,!!n)))).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(ln)).map(e=>e.slice(ln.length)):[])}(t,e.ignoreSentryInternalFrames,n);if(r){if(r["drop-error-if-contains-third-party-frames"===e.behaviour||"apply-tag-if-contains-third-party-frames"===e.behaviour?"some":"every"](t=>!t.some(t=>e.filterKeys.includes(t)))){if("drop-error-if-contains-third-party-frames"===e.behaviour||"drop-error-if-exclusively-contains-third-party-frames"===e.behaviour)return null;t.tags={...t.tags,third_party_code:!0}}}return t}});const ln="_sentryBundlerPluginAppKey:",un="Attempt to invoke user-land function",dn="fn.apply(this, wrappedArguments)";window.Stimulus=e.lg.start();const hn=__webpack_require__(5713);!function initEventListenersFromTurbo(){addEventListener("turbo:frame-render",e=>{const t=e.target;null!==(null==t?void 0:t.id)&&t.dispatchEvent(new CustomEvent("turbo:frame-render:"+t.id,{bubbles:!0}))})}(),function loadControllers(e){e.forEach(e=>window.Stimulus.register(e.name,e.constructor))}(function getControllersFromContext(e){return e.keys().map(t=>({name:t.split("/").pop().replace(".ts","").split("_").join("-").replace("-controller",""),constructor:e(t).default}))}(hn)),window.Stimulus.debug=!1,t.dZ.drive=!1,function init(e={}){const t=!e.skipBrowserExtensionCheck&&checkAndWarnIfIsEmbeddedBrowserExtension();let n=null==e.defaultIntegrations?function getDefaultIntegrations(e){return[inboundFiltersIntegration(),functionToStringIntegration(),conversationIdIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration(),cultureContextIntegration(),browserSessionIntegration()]}():e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(0,p.vk)(e.stackParser||Re),integrations:getIntegrationsToSetup({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||makeFetchTransport};return(0,m.Ip)(normalizeStringifyValue),initAndBind(BrowserClient,r)}({dsn:"https://5a5877585a827bd206221e450ced9ea3@o4509546971070464.ingest.de.sentry.io/4509688537350225",environment:"production",release:"2.54.4",integrations:[((e={})=>{"enableElementTiming"in e&&(0,r.pq)(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t={name:void 0,source:void 0},s=H.document,{enableInp:i,enableLongTask:a,enableLongAnimationFrame:o,_experiments:{enableInteractions:l,enableStandaloneClsSpans:u,enableStandaloneLcpSpans:p},beforeStartSpan:m,idleTimeout:g,finalTimeout:v,childSpanTimeout:b,markBackgroun
29dSpan:_,traceFetch:y,traceXHR:T,trackFetchStreamPerformance:E,shouldCreateSpanForRequest:w,enableHTTPTimings:I,ignoreResourceSpans:A,ignorePerformanceApiSpans:k,instrumentPageLoad:x,instrumentNavigation:O,detectRedirects:L,linkPreviousTrace:R,consistentTraceSampling:M,enableReportPageLoaded:N,onRequestSpanStart:P,onRequestSpanEnd:F}={...rn,...e},D=function isBotUserAgent(){const e=H.navigator;return!!e?.userAgent&&nn.test(e.userAgent)}();let B,V;function _createRouteSpan(e,n,r=!0,i){const a="pageload"===n.op,o=n.name,l=m?m(n):n,u=parseStringToURLObject(i||getLocationHref()),p={...u?.pathname&&{[we]:u.pathname},...u&&!isURLObjectRelative(u)&&{[Ee]:u.href},...l.attributes};if(o!==l.name&&(p[d.i_]="custom"),l.attributes=p,!r){const e=(0,C.lu)();return void startInactiveSpan({...l,startTime:e}).end(e)}t.name=l.name,t.source=p[d.i_];const _=startIdleSpan(l,{idleTimeout:g,finalTimeout:v,childSpanTimeout:b,disableAutoFinish:a,beforeSpanEnd:t=>{addPerformanceEntries(t,{ignoreResourceSpans:A,ignorePerformanceApiSpans:k,spanStreamingEnabled:hasSpanStreamingEnabled(e)}),setActiveIdleSpan(e,void 0);const n=(0,c.o5)(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:_.spanContext().traceId,sampled:(0,h.pK)(_),dsc:(0,f.k1)(t)}),a&&(V=void 0)},trimIdleSpanEndTimestamp:!N});function emitFinish(){s&&["interactive","complete"].includes(s.readyState)&&(e.emit("idleSpanEnableAutoFinish",_),s.removeEventListener("readystatechange",emitFinish))}a&&N&&(V=_),setActiveIdleSpan(e,_),a&&!N&&s&&(s.addEventListener("readystatechange",emitFinish),emitFinish())}return{name:"BrowserTracing",setup(e){if(D)ge&&r.Yz.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");else{if(function registerSpanErrorInstrumentation(){function errorCallback(){const e=(0,h.Bk)(),t=e&&(0,h.zU)(e);if(t){const e="internal_error";n.T&&r.Yz.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:Ue.TJ,message:e})}}We||(We=!0,addGlobalErrorInstrumentationHandler(errorCallback),addGlobalUnhandledRejectionInstrumentationHandler(errorCallback))}(),o&&S.O.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?function startTrackingLongAnimationFrames(){new PerformanceObserver(e=>{const t=spanUtils_getActiveSpan();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=msToSec(browserPerformanceTimeOrigin()+n.startTime),{start_timestamp:r,op:s}=spanUtils_spanToJSON(t);if("navigation"===s&&r&&e<r)continue;const i=msToSec(n.duration),a={[Qe]:"auto.ui.browser.metrics"},o=n.scripts[0],{invoker:c,invokerType:l,sourceURL:u,sourceFunctionName:d,sourceCharPosition:h}=o;a["browser.script.invoker"]=c,a["browser.script.invoker_type"]=l,u&&(a["code.filepath"]=u),d&&(a["code.function"]=d),-1!==h&&(a["browser.script.source_char_position"]=h),startAndEndSpan(t,e,e+i,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}}).observe({type:"long-animation-frame",buffered:!0})}():a&&function startTrackingLongTasks(){addPerformanceInstrumentationHandler("longtask",({entries:e})=>{const t=spanUtils_getActiveSpan();if(!t)return;const{op:n,start_timestamp:r}=spanUtils_spanToJSON(t);for(const s of e){const e=msToSec(browserPerformanceTimeOrigin()+s.startTime),i=msToSec(s.duration);"navigation"===n&&r&&e<r||startAndEndSpan(t,e,e+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[Qe]:"auto.ui.browser.metrics"}})}})}(),l&&function startTrackingInteractions(){addPerformanceInstrumentationHandler("event",({entries:e})=>{const t=spanUtils_getActiveSpan();if(t)for(const n of e)if("click"===n.name){const e=msToSec(browserPerformanceTimeOrigin()+n.startTime),r=msToSec(n.duration),s={name:htmlTreeAsString_htmlTreeAsString(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[Qe]:"auto.ui.browser.metrics"}},i=browser_getComponentName(n.target);i&&(s.attributes["ui.component_name"]=i),startAndEndSpan(t,e,e+r,s)}})}(),L&&s){const interactionHandler=()=>{B=(0,C.zf)()};addEventListener("click",interactionHandler,{capture:!0}),addEventListener("keydown",interactionHandler,{capture:!0,passive:!0})}e.on("startNavigationSpan",(t,n)=>{if((0,c.KU)()!==e)return;if(n?.isRedirect)return ge&&r.Yz.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void _createRouteSpan(e,{op:"navigation.redirect",...t},!1,n.url);B=void 0,maybeEndActiveSpan(),(0,c.rm)().setPropagationContext({traceId:(0,Ve.e)(),sampleRand:Math.random(),propagationSpanId:(0,Fe.f)()?void 0:(0,Ve.Z)()});const s=(0,c.o5)();s.setPropagationContext({traceId:(0,Ve.e)(),sampleRand:Math.random(),propagationSpanId:(0,Fe.f)()?void 0:(0,Ve.Z)()}),s.setSDKProcessingMetadata({normalizedRequest:void 0}),_createRouteSpan(e,{op:"navigation",...t,parentSpan:null,forceTransaction:!0},!0,n?.url)}),e.on("startPageLoadSpan",(t,n={})=>
29{if((0,c.KU)()!==e)return;maybeEndActiveSpan();const r=n.sentryTrace||getMetaContent("sentry-trace")||getServerTiming("sentry-trace"),s=n.baggage||getMetaContent("baggage")||getServerTiming("baggage"),i=(0,ze.kM)(r,s),a=(0,c.o5)();a.setPropagationContext(i),(0,Fe.f)()||(a.getPropagationContext().propagationSpanId=(0,Ve.Z)()),a.setSDKProcessingMetadata({normalizedRequest:getHttpRequestData()}),_createRouteSpan(e,{op:"pageload",...t})}),e.on("endPageloadSpan",()=>{N&&V&&(V.setAttribute(d.fs,"reportPageLoaded"),V.end())})}function maybeEndActiveSpan(){const t=getActiveIdleSpan(e);t&&!(0,h.et)(t).timestamp&&(ge&&r.Yz.log(`[Tracing] Finishing current active span with op: ${(0,h.et)(t).op}`),t.setAttribute(d.fs,"cancelled"),t.end())}},afterAllSetup(e){if(D)return;e.addIntegration&&!e.getIntegrationByName?.(Jt)&&e.addIntegration(webVitalsIntegration({ignore:i?[]:["inp"],_experiments:{enableStandaloneClsSpans:u,enableStandaloneLcpSpans:p}}));let n=getLocationHref();if("off"!==R&&linkTraces(e,{linkPreviousTrace:R,consistentTraceSampling:M}),H.location){if(x){const t=(0,C.k3)();!function startBrowserTracingPageLoadSpan(e,t,n){e.emit("startPageLoadSpan",t,n),(0,c.o5)().setTransactionName(t.name);const r=getActiveIdleSpan(e);r&&e.emit("afterStartPageLoadSpan",r);return r}(e,{name:H.location.pathname,startTime:t?t/1e3:void 0,attributes:{[d.i_]:"url",[d.JD]:"auto.pageload.browser"}})}O&&addHistoryInstrumentationHandler(({to:t,from:r})=>{if(void 0===r&&-1!==n?.indexOf(t))return void(n=void 0);n=void 0;const s=parseStringToURLObject(t),i=getActiveIdleSpan(e),a=i&&L&&function isRedirect(e,t){const n=(0,h.et)(e),r=(0,C.lu)(),s=n.start_timestamp;if(r-s>an)return!1;if(t&&r-t<=an)return!1;return!0}(i,B);!function startBrowserTracingNavigationSpan(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s,url:r}),e.emit("startNavigationSpan",t,{isRedirect:s,url:r});const i=(0,c.o5)();i.setTransactionName(t.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{...getHttpRequestData(),url:r}});return getActiveIdleSpan(e)}(e,{name:s?.pathname||H.location.pathname,attributes:{[d.i_]:"url",[d.JD]:"auto.navigation.browser"}},{url:t,isRedirect:a})})}_&&function registerBackgroundTabDetection(){H.document?H.document.addEventListener("visibilitychange",()=>{const e=(0,h.Bk)();if(!e)return;const t=(0,h.zU)(e);if(H.document.hidden&&t){const e="cancelled",{op:n,status:s}=(0,h.et)(t);ge&&r.Yz.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),s||t.setStatus({code:Ue.TJ,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):ge&&r.Yz.warn("[Tracing] Could not set up background tab detection due to lack of global document")}(),l&&function registerInteractionListener(e,t,n,s,i){const a=H.document;let o;const registerInteractionTransaction=()=>{const a="ui.action.click",c=getActiveIdleSpan(e);if(c){const e=(0,h.et)(c).op;if(["navigation","pageload"].includes(e))return void(ge&&r.Yz.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`))}o&&(o.setAttribute(d.fs,"interactionInterrupted"),o.end(),o=void 0),i.name?o=startIdleSpan({name:i.name,op:a,attributes:{[d.i_]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:s}):ge&&r.Yz.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`)};a&&addEventListener("click",registerInteractionTransaction,{capture:!0})}(e,g,v,b,t),instrumentOutgoingRequests(e,{traceFetch:y,traceXHR:T,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:w,enableHTTPTimings:I,onRequestSpanStart:P,onRequestSpanEnd:F}),E&&e.addIntegration(fetchStreamPerformanceIntegration())}}})(),thirdPartyErrorFilterIntegration({filterKeys:["hellowork-web"],behaviour:"drop-error-if-contains-third-party-frames"})],sampleRate:.02,tracesSampleRate:.02,tracePropagationTargets:["https://www.hellowork.com","https://hellowork-preprod.hellowork.com/"],beforeSend(e,t){var n,r,s;const i=(null===(s=null===(r=null===(n=null==e?void 0:e.exception)||void 0===n?void 0:n.values)||void 0===r?void 0:r[0])||void 0===s?void 0:s.value)||"";return/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:update, ParamCount:4$/.test(i)?null:e}})})()})(); 30//# sourceMappingURL=stimulus.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.