From cd9636511723f87bdd4c7afef3fab2acbb54e6af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannik=20R=C3=B6del?= Date: Fri, 5 Jun 2026 15:54:22 +0200 Subject: [PATCH] Update Typebot bundle version --- assets/vendor/typebot-0.10.2.js | 230 ++++++++++++++++++++++++++++++++ assets/vendor/typebot-0.2.56.js | 4 - sites/coderdojo/anmelden.md | 8 +- 3 files changed, 234 insertions(+), 8 deletions(-) create mode 100644 assets/vendor/typebot-0.10.2.js delete mode 100644 assets/vendor/typebot-0.2.56.js diff --git a/assets/vendor/typebot-0.10.2.js b/assets/vendor/typebot-0.10.2.js new file mode 100644 index 0000000..6422daa --- /dev/null +++ b/assets/vendor/typebot-0.10.2.js @@ -0,0 +1,230 @@ +// v0.10.2 +var ik=Object.create;var Na=Object.defineProperty;var ak=Object.getOwnPropertyDescriptor;var sk=Object.getOwnPropertyNames;var lk=Object.getPrototypeOf,ck=Object.prototype.hasOwnProperty;var dk=(e,t)=>()=>(e&&(t=e(e=0)),t);var vt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Dp=(e,t)=>{for(var r in t)Na(e,r,{get:t[r],enumerable:!0})},Mp=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of sk(t))!ck.call(e,o)&&o!==r&&Na(e,o,{get:()=>t[o],enumerable:!(n=ak(t,o))||n.enumerable});return e};var Lp=(e,t,r)=>(r=e!=null?ik(lk(e)):{},Mp(t||!e||!e.__esModule?Na(r,"default",{value:e,enumerable:!0}):r,e)),Da=e=>Mp(Na({},"__esModule",{value:!0}),e);var y0=vt(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});function Dl(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dl=function(t){return typeof t}:Dl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dl(e)}var g0="basil",T2=function(t){return t===3?"v3":t},h0="https://js.stripe.com",k2="".concat(h0,"/").concat(g0,"/stripe.js"),C2=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,S2=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,p0="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",E2=function(t){return C2.test(t)||S2.test(t)},P2=function(){for(var t=document.querySelectorAll('script[src^="'.concat(h0,'"]')),r=0;r element.");return o.appendChild(n),n},_2=function(t,r){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"7.4.0",startTime:r})},wa=null,Ol=null,Nl=null,I2=function(t){return function(r){t(new Error("Failed to load Stripe.js",{cause:r}))}},A2=function(t,r){return function(){window.Stripe?t(window.Stripe):r(new Error("Stripe.js not available"))}},R2=function(t){return wa!==null?wa:(wa=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&t&&console.warn(p0),window.Stripe){r(window.Stripe);return}try{var o=P2();if(o&&t)console.warn(p0);else if(!o)o=f0(t);else if(o&&Nl!==null&&Ol!==null){var i;o.removeEventListener("load",Nl),o.removeEventListener("error",Ol),(i=o.parentNode)===null||i===void 0||i.removeChild(o),o=f0(t)}Nl=A2(r,n),Ol=I2(n),o.addEventListener("load",Nl),o.addEventListener("error",Ol)}catch(a){n(a);return}}),wa.catch(function(r){return wa=null,Promise.reject(r)}))},O2=function(t,r,n){if(t===null)return null;var o=r[0],i=o.match(/^pk_test/),a=T2(t.version),s=g0;i&&a!==s&&console.warn("Stripe.js@".concat(a," was loaded on the page, but @stripe/stripe-js@").concat("7.4.0"," expected Stripe.js@").concat(s,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var l=t.apply(void 0,r);return _2(l,n),l},m0=function(t){var r=`invalid load parameters; expected object of shape + + {advancedFraudSignals: boolean} + +but received + + `.concat(JSON.stringify(t),` +`);if(t===null||Dl(t)!=="object")throw new Error(r);if(Object.keys(t).length===1&&typeof t.advancedFraudSignals=="boolean")return t;throw new Error(r)},Ml,Yu=!1,b0=function(){for(var t=arguments.length,r=new Array(t),n=0;n{"use strict";v0.exports=y0()});var ka={};Dp(ka,{__addDisposableResource:()=>nT,__assign:()=>$l,__asyncDelegator:()=>Y0,__asyncGenerator:()=>K0,__asyncValues:()=>Z0,__await:()=>ci,__awaiter:()=>z0,__classPrivateFieldGet:()=>eT,__classPrivateFieldIn:()=>rT,__classPrivateFieldSet:()=>tT,__createBinding:()=>Bl,__decorate:()=>M0,__disposeResources:()=>oT,__esDecorate:()=>$0,__exportStar:()=>H0,__extends:()=>N0,__generator:()=>G0,__importDefault:()=>Q0,__importStar:()=>J0,__makeTemplateObject:()=>X0,__metadata:()=>V0,__param:()=>L0,__propKey:()=>B0,__read:()=>ep,__rest:()=>D0,__rewriteRelativeImportExtension:()=>iT,__runInitializers:()=>F0,__setFunctionName:()=>U0,__spread:()=>j0,__spreadArray:()=>q0,__spreadArrays:()=>W0,__values:()=>Fl,default:()=>eR});function N0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ju(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function D0(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function L0(e,t){return function(r,n){t(r,n,e)}}function $0(e,t,r,n,o,i){function a(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}for(var s=n.kind,l=s==="getter"?"get":s==="setter"?"set":"value",c=!t&&e?n.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),u,m=!1,f=r.length-1;f>=0;f--){var h={};for(var g in n)h[g]=g==="access"?{}:n[g];for(var g in n.access)h.access[g]=n.access[g];h.addInitializer=function(w){if(m)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(w||null))};var y=(0,r[f])(s==="accessor"?{get:d.get,set:d.set}:d[l],h);if(s==="accessor"){if(y===void 0)continue;if(y===null||typeof y!="object")throw new TypeError("Object expected");(u=a(y.get))&&(d.get=u),(u=a(y.set))&&(d.set=u),(u=a(y.init))&&o.unshift(u)}else(u=a(y))&&(s==="field"?o.unshift(u):d[l]=u)}c&&Object.defineProperty(c,n.name,d),m=!0}function F0(e,t,r){for(var n=arguments.length>2,o=0;o0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ep(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function j0(){for(var e=[],t=0;t1||l(f,g)})},h&&(o[f]=h(o[f])))}function l(f,h){try{c(n[f](h))}catch(g){m(i[0][3],g)}}function c(f){f.value instanceof ci?Promise.resolve(f.value.v).then(d,u):m(i[0][2],f)}function d(f){l("next",f)}function u(f){l("throw",f)}function m(f,h){f(h),i.shift(),i.length&&l(i[0][0],i[0][1])}}function Y0(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(a){return(r=!r)?{value:ci(e[o](a)),done:!1}:i?i(a):a}:i}}function Z0(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Fl=="function"?Fl(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(a){return new Promise(function(s,l){a=e[i](a),o(s,l,a.done,a.value)})}}function o(i,a,s,l){Promise.resolve(l).then(function(c){i({value:c,done:s})},a)}}function X0(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function J0(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Qu(e),n=0;n{"use strict";Ju=function(e,t){return Ju=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Ju(e,t)};$l=function(){return $l=Object.assign||function(t){for(var r,n=1,o=arguments.length;n{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.WebmBase=void 0;var tp=class{constructor(t="Unknown",r=0){this.name=t,this.start=r}getType(){return"Unknown"}updateBySource(){}setSource(t){this.source=t,this.updateBySource()}updateByData(){}setData(t){this.data=t,this.updateByData()}getValue(){return this.data}setValue(t){this.setData(t)}};Ul.WebmBase=tp});var zl=vt(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.SectionType=void 0;var aT;(function(e){e.Container="Container",e.Uint="Uint",e.Int="Int",e.Float="Float",e.String="String",e.Date="Date",e.Binary="Binary"})(aT||(Vl.SectionType=aT={}))});var rp=vt(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.sections=void 0;var x=zl();Gl.sections={172351395:{name:"EBML",type:x.SectionType.Container},646:{name:"EBMLVersion",type:x.SectionType.Uint},759:{name:"EBMLReadVersion",type:x.SectionType.Uint},754:{name:"EBMLMaxIDLength",type:x.SectionType.Uint},755:{name:"EBMLMaxSizeLength",type:x.SectionType.Uint},642:{name:"DocType",type:x.SectionType.String},647:{name:"DocTypeVersion",type:x.SectionType.Uint},645:{name:"DocTypeReadVersion",type:x.SectionType.Uint},108:{name:"Void",type:x.SectionType.Binary},63:{name:"CRC-32",type:x.SectionType.Binary},190023271:{name:"SignatureSlot",type:x.SectionType.Container},16010:{name:"SignatureAlgo",type:x.SectionType.Uint},16026:{name:"SignatureHash",type:x.SectionType.Uint},16037:{name:"SignaturePublicKey",type:x.SectionType.Binary},16053:{name:"Signature",type:x.SectionType.Binary},15963:{name:"SignatureElements",type:x.SectionType.Container},15995:{name:"SignatureElementList",type:x.SectionType.Container},9522:{name:"SignedElement",type:x.SectionType.Binary},139690087:{name:"Segment",type:x.SectionType.Container},21863284:{name:"SeekHead",type:x.SectionType.Container},3515:{name:"Seek",type:x.SectionType.Container},5035:{name:"SeekID",type:x.SectionType.Binary},5036:{name:"SeekPosition",type:x.SectionType.Uint},88713574:{name:"Info",type:x.SectionType.Container},13220:{name:"SegmentUID",type:x.SectionType.Binary},13188:{name:"SegmentFilename",type:x.SectionType.String},1882403:{name:"PrevUID",type:x.SectionType.Binary},1868715:{name:"PrevFilename",type:x.SectionType.String},2013475:{name:"NextUID",type:x.SectionType.Binary},1999803:{name:"NextFilename",type:x.SectionType.String},1092:{name:"SegmentFamily",type:x.SectionType.Binary},10532:{name:"ChapterTranslate",type:x.SectionType.Container},10748:{name:"ChapterTranslateEditionUID",type:x.SectionType.Uint},10687:{name:"ChapterTranslateCodec",type:x.SectionType.Uint},10661:{name:"ChapterTranslateID",type:x.SectionType.Binary},710577:{name:"TimecodeScale",type:x.SectionType.Uint},1161:{name:"Duration",type:x.SectionType.Float},1121:{name:"DateUTC",type:x.SectionType.Date},15273:{name:"Title",type:x.SectionType.String},3456:{name:"MuxingApp",type:x.SectionType.String},5953:{name:"WritingApp",type:x.SectionType.String},103:{name:"Timecode",type:x.SectionType.Uint},6228:{name:"SilentTracks",type:x.SectionType.Container},6359:{name:"SilentTrackNumber",type:x.SectionType.Uint},39:{name:"Position",type:x.SectionType.Uint},43:{name:"PrevSize",type:x.SectionType.Uint},35:{name:"SimpleBlock",type:x.SectionType.Binary},32:{name:"BlockGroup",type:x.SectionType.Container},33:{name:"Block",type:x.SectionType.Binary},34:{name:"BlockVirtual",type:x.SectionType.Binary},13729:{name:"BlockAdditions",type:x.SectionType.Container},38:{name:"BlockMore",type:x.SectionType.Container},110:{name:"BlockAddID",type:x.SectionType.Uint},37:{name:"BlockAdditional",type:x.SectionType.Binary},27:{name:"BlockDuration",type:x.SectionType.Uint},122:{name:"ReferencePriority",type:x.SectionType.Uint},123:{name:"ReferenceBlock",type:x.SectionType.Int},125:{name:"ReferenceVirtual",type:x.SectionType.Int},36:{name:"CodecState",type:x.SectionType.Binary},13730:{name:"DiscardPadding",type:x.SectionType.Int},14:{name:"Slices",type:x.SectionType.Container},104:{name:"TimeSlice",type:x.SectionType.Container},76:{name:"LaceNumber",type:x.SectionType.Uint},77:{name:"FrameNumber",type:x.SectionType.Uint},75:{name:"BlockAdditionID",type:x.SectionType.Uint},78:{name:"Delay",type:x.SectionType.Uint},79:{name:"SliceDuration",type:x.SectionType.Uint},72:{name:"ReferenceFrame",type:x.SectionType.Container},73:{name:"ReferenceOffset",type:x.SectionType.Uint},74:{name:"ReferenceTimeCode",type:x.SectionType.Uint},47:{name:"EncryptedBlock",type:x.SectionType.Binary},106212971:{name:"Tracks",type:x.SectionType.Container},46:{name:"TrackEntry",type:x.SectionType.Container},87:{name:"TrackNumber",type:x.SectionType.Uint},13253:{name:"TrackUID",type:x.SectionType.Uint},3:{name:"TrackType",type:x.SectionType.Uint},57:{name:"FlagEnabled",type:x.SectionType.Uint},8:{name:"FlagDefault",type:x.SectionType.Uint},5546:{name:"FlagForced",type:x.SectionType.Uint},28:{name:"FlagLacing",type:x.SectionType.Uint},11751:{name:"MinCache",type:x.SectionType.Uint},11768:{name:"MaxCache",type:x.SectionType.Uint},254851:{name:"DefaultDuration",type:x.SectionType.Uint},216698:{name:"DefaultDecodedFieldDuration",type:x.SectionType.Uint},209231:{name:"TrackTimecodeScale",type:x.SectionType.Float},4991:{name:"TrackOffset",type:x.SectionType.Int},5614:{name:"MaxBlockAdditionID",type:x.SectionType.Uint},4974:{name:"Name",type:x.SectionType.String},177564:{name:"Language",type:x.SectionType.String},6:{name:"CodecID",type:x.SectionType.String},9122:{name:"CodecPrivate",type:x.SectionType.Binary},362120:{name:"CodecName",type:x.SectionType.String},13382:{name:"AttachmentLink",type:x.SectionType.Uint},1742487:{name:"CodecSettings",type:x.SectionType.String},1785920:{name:"CodecInfoURL",type:x.SectionType.String},438848:{name:"CodecDownloadURL",type:x.SectionType.String},42:{name:"CodecDecodeAll",type:x.SectionType.Uint},12203:{name:"TrackOverlay",type:x.SectionType.Uint},5802:{name:"CodecDelay",type:x.SectionType.Uint},5819:{name:"SeekPreRoll",type:x.SectionType.Uint},9764:{name:"TrackTranslate",type:x.SectionType.Container},9980:{name:"TrackTranslateEditionUID",type:x.SectionType.Uint},9919:{name:"TrackTranslateCodec",type:x.SectionType.Uint},9893:{name:"TrackTranslateTrackID",type:x.SectionType.Binary},96:{name:"Video",type:x.SectionType.Container},26:{name:"FlagInterlaced",type:x.SectionType.Uint},5048:{name:"StereoMode",type:x.SectionType.Uint},5056:{name:"AlphaMode",type:x.SectionType.Uint},5049:{name:"OldStereoMode",type:x.SectionType.Uint},48:{name:"PixelWidth",type:x.SectionType.Uint},58:{name:"PixelHeight",type:x.SectionType.Uint},5290:{name:"PixelCropBottom",type:x.SectionType.Uint},5307:{name:"PixelCropTop",type:x.SectionType.Uint},5324:{name:"PixelCropLeft",type:x.SectionType.Uint},5341:{name:"PixelCropRight",type:x.SectionType.Uint},5296:{name:"DisplayWidth",type:x.SectionType.Uint},5306:{name:"DisplayHeight",type:x.SectionType.Uint},5298:{name:"DisplayUnit",type:x.SectionType.Uint},5299:{name:"AspectRatioType",type:x.SectionType.Uint},963876:{name:"ColourSpace",type:x.SectionType.Binary},1029411:{name:"GammaValue",type:x.SectionType.Float},230371:{name:"FrameRate",type:x.SectionType.Float},97:{name:"Audio",type:x.SectionType.Container},53:{name:"SamplingFrequency",type:x.SectionType.Float},14517:{name:"OutputSamplingFrequency",type:x.SectionType.Float},31:{name:"Channels",type:x.SectionType.Uint},15739:{name:"ChannelPositions",type:x.SectionType.Binary},8804:{name:"BitDepth",type:x.SectionType.Uint},98:{name:"TrackOperation",type:x.SectionType.Container},99:{name:"TrackCombinePlanes",type:x.SectionType.Container},100:{name:"TrackPlane",type:x.SectionType.Container},101:{name:"TrackPlaneUID",type:x.SectionType.Uint},102:{name:"TrackPlaneType",type:x.SectionType.Uint},105:{name:"TrackJoinBlocks",type:x.SectionType.Container},109:{name:"TrackJoinUID",type:x.SectionType.Uint},64:{name:"TrickTrackUID",type:x.SectionType.Uint},65:{name:"TrickTrackSegmentUID",type:x.SectionType.Binary},70:{name:"TrickTrackFlag",type:x.SectionType.Uint},71:{name:"TrickMasterTrackUID",type:x.SectionType.Uint},68:{name:"TrickMasterTrackSegmentUID",type:x.SectionType.Binary},11648:{name:"ContentEncodings",type:x.SectionType.Container},8768:{name:"ContentEncoding",type:x.SectionType.Container},4145:{name:"ContentEncodingOrder",type:x.SectionType.Uint},4146:{name:"ContentEncodingScope",type:x.SectionType.Uint},4147:{name:"ContentEncodingType",type:x.SectionType.Uint},4148:{name:"ContentCompression",type:x.SectionType.Container},596:{name:"ContentCompAlgo",type:x.SectionType.Uint},597:{name:"ContentCompSettings",type:x.SectionType.Binary},4149:{name:"ContentEncryption",type:x.SectionType.Container},2017:{name:"ContentEncAlgo",type:x.SectionType.Uint},2018:{name:"ContentEncKeyID",type:x.SectionType.Binary},2019:{name:"ContentSignature",type:x.SectionType.Binary},2020:{name:"ContentSigKeyID",type:x.SectionType.Binary},2021:{name:"ContentSigAlgo",type:x.SectionType.Uint},2022:{name:"ContentSigHashAlgo",type:x.SectionType.Uint},206814059:{name:"Cues",type:x.SectionType.Container},59:{name:"CuePoint",type:x.SectionType.Container},51:{name:"CueTime",type:x.SectionType.Uint},55:{name:"CueTrackPositions",type:x.SectionType.Container},119:{name:"CueTrack",type:x.SectionType.Uint},113:{name:"CueClusterPosition",type:x.SectionType.Uint},112:{name:"CueRelativePosition",type:x.SectionType.Uint},50:{name:"CueDuration",type:x.SectionType.Uint},4984:{name:"CueBlockNumber",type:x.SectionType.Uint},106:{name:"CueCodecState",type:x.SectionType.Uint},91:{name:"CueReference",type:x.SectionType.Container},22:{name:"CueRefTime",type:x.SectionType.Uint},23:{name:"CueRefCluster",type:x.SectionType.Uint},4959:{name:"CueRefNumber",type:x.SectionType.Uint},107:{name:"CueRefCodecState",type:x.SectionType.Uint},155296873:{name:"Attachments",type:x.SectionType.Container},8615:{name:"AttachedFile",type:x.SectionType.Container},1662:{name:"FileDescription",type:x.SectionType.String},1646:{name:"FileName",type:x.SectionType.String},1632:{name:"FileMimeType",type:x.SectionType.String},1628:{name:"FileData",type:x.SectionType.Binary},1710:{name:"FileUID",type:x.SectionType.Uint},1653:{name:"FileReferral",type:x.SectionType.Binary},1633:{name:"FileUsedStartTime",type:x.SectionType.Uint},1634:{name:"FileUsedEndTime",type:x.SectionType.Uint},4433776:{name:"Chapters",type:x.SectionType.Container},1465:{name:"EditionEntry",type:x.SectionType.Container},1468:{name:"EditionUID",type:x.SectionType.Uint},1469:{name:"EditionFlagHidden",type:x.SectionType.Uint},1499:{name:"EditionFlagDefault",type:x.SectionType.Uint},1501:{name:"EditionFlagOrdered",type:x.SectionType.Uint},54:{name:"ChapterAtom",type:x.SectionType.Container},13252:{name:"ChapterUID",type:x.SectionType.Uint},5716:{name:"ChapterStringUID",type:x.SectionType.String},17:{name:"ChapterTimeStart",type:x.SectionType.Uint},18:{name:"ChapterTimeEnd",type:x.SectionType.Uint},24:{name:"ChapterFlagHidden",type:x.SectionType.Uint},1432:{name:"ChapterFlagEnabled",type:x.SectionType.Uint},11879:{name:"ChapterSegmentUID",type:x.SectionType.Binary},11964:{name:"ChapterSegmentEditionUID",type:x.SectionType.Uint},9155:{name:"ChapterPhysicalEquiv",type:x.SectionType.Uint},15:{name:"ChapterTrack",type:x.SectionType.Container},9:{name:"ChapterTrackNumber",type:x.SectionType.Uint},0:{name:"ChapterDisplay",type:x.SectionType.Container},5:{name:"ChapString",type:x.SectionType.String},892:{name:"ChapLanguage",type:x.SectionType.String},894:{name:"ChapCountry",type:x.SectionType.String},10564:{name:"ChapProcess",type:x.SectionType.Container},10581:{name:"ChapProcessCodecID",type:x.SectionType.Uint},1293:{name:"ChapProcessPrivate",type:x.SectionType.Binary},10513:{name:"ChapProcessCommand",type:x.SectionType.Container},10530:{name:"ChapProcessTime",type:x.SectionType.Uint},10547:{name:"ChapProcessData",type:x.SectionType.Binary},39109479:{name:"Tags",type:x.SectionType.Container},13171:{name:"Tag",type:x.SectionType.Container},9152:{name:"Targets",type:x.SectionType.Container},10442:{name:"TargetTypeValue",type:x.SectionType.Uint},9162:{name:"TargetType",type:x.SectionType.String},9157:{name:"TagTrackUID",type:x.SectionType.Uint},9161:{name:"TagEditionUID",type:x.SectionType.Uint},9156:{name:"TagChapterUID",type:x.SectionType.Uint},9158:{name:"TagAttachmentUID",type:x.SectionType.Uint},10184:{name:"SimpleTag",type:x.SectionType.Container},1443:{name:"TagName",type:x.SectionType.String},1146:{name:"TagLanguage",type:x.SectionType.String},1156:{name:"TagDefault",type:x.SectionType.Uint},1159:{name:"TagString",type:x.SectionType.String},1157:{name:"TagBinary",type:x.SectionType.Binary},5552:{name:"Colour",type:x.SectionType.Container},5553:{name:"MatrixCoefficients",type:x.SectionType.Uint},5554:{name:"BitsPerChannel",type:x.SectionType.Uint},5555:{name:"ChromaSubsamplingHorz",type:x.SectionType.Uint},5556:{name:"ChromaSubsamplingVert",type:x.SectionType.Uint},5557:{name:"CbSubsamplingHorz",type:x.SectionType.Uint},5558:{name:"CbSubsamplingVert",type:x.SectionType.Uint},5559:{name:"ChromaSitingHorz",type:x.SectionType.Uint},5560:{name:"ChromaSitingVert",type:x.SectionType.Uint},5561:{name:"Range",type:x.SectionType.Uint},5562:{name:"TransferCharacteristics",type:x.SectionType.Uint},5563:{name:"Primaries",type:x.SectionType.Uint},5564:{name:"MaxCLL",type:x.SectionType.Uint},5565:{name:"MaxFALL",type:x.SectionType.Uint}}});var op=vt(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.WebmUint=void 0;var tR=di();function sT(e){return e.length%2===1?"0"+e:e}var np=class extends tR.WebmBase{constructor(t,r=0){super(t,r)}getType(){return"Uint"}updateBySource(){this.data="";for(let t=0;t{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.WebmFloat=void 0;var rR=di(),ip=class extends rR.WebmBase{constructor(t,r=0){super(t,r)}getType(){return"Float"}getFloatArrayType(){return this.source&&this.source.length===4?Float32Array:Float64Array}updateBySource(){let t=this.source.reverse(),r=this.getFloatArrayType(),n=new r(t.buffer);this.data=n[0]}updateByData(){let t=this.getFloatArrayType(),r=new t([this.data]),n=new Uint8Array(r.buffer);this.source=n.reverse()}};jl.WebmFloat=ip});var lp=vt(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.WebmString=void 0;var nR=di(),sp=class extends nR.WebmBase{constructor(t,r=0){super(t,r)}getType(){return"String"}updateBySource(){this.data=this.source}updateByData(){this.source=this.data}getValue(){let t="";return this.source.forEach(r=>{t+=String.fromCharCode(r)}),t}};Wl.WebmString=sp});var dp=vt(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.WebmContainer=void 0;var lT=di(),oR=rp(),ql=zl(),iR=op(),aR=ap(),sR=lp(),cp=class e extends lT.WebmBase{constructor(t,r=!1,n=0){super(t,n),this.isInfinite=r,this.offset=0}getType(){return"Container"}readByte(){return this.source[this.offset++]}readUint(){let t=this.readByte(),r=8-t.toString(2).length,n=t-(1<<7-r);for(let o=0;o=0&&(r=Math.min(this.offset+s,r));let l=this.source.slice(this.offset,r),c;switch(a){case ql.SectionType.Container:c=new e(i,s<0,n);break;case ql.SectionType.Uint:c=new iR.WebmUint(i,n);break;case ql.SectionType.Float:c=new aR.WebmFloat(i,n);break;case ql.SectionType.String:c=new sR.WebmString(i,n);break;default:c=new lT.WebmBase(i,n);break}c.setSource(l),this.data.push({id:o,idHex:o.toString(16),data:c})}}writeUint(t,r=!1){let n;for(n=1;(t<0||t>=1<<7*n)&&n<8;n++);if(!r){for(let o=0;o>8*(n-1-o)&255;this.source[this.offset]&=(1<<8-n)-1,this.source[this.offset]|=1<<8-n}this.offset+=n}writeSections(t=!1){this.offset=0;for(let r=0;r{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});Yl.WebmFile=void 0;var lR=(Ca(),Da(ka)),cR=dp(),up=class e extends cR.WebmContainer{constructor(t){super("File"),this.setSource(t)}getType(){return"File"}toBlob(t="video/webm"){return new Blob([this.source.buffer],{type:t})}static blobToArray(t){return new Promise((r,n)=>{try{let o=new FileReader;o.onloadend=()=>{try{r(new Uint8Array(o.result))}catch(i){n(i)}},o.readAsArrayBuffer(t)}catch(o){n(o)}})}static fromBlob(t){return lR.__awaiter(this,void 0,void 0,function*(){let r=yield e.blobToArray(t);return new e(r)})}};Yl.WebmFile=up});var uT=vt(dT=>{"use strict";Object.defineProperty(dT,"__esModule",{value:!0})});var pp=vt(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});var Wr=(Ca(),Da(ka));Wr.__exportStar(di(),or);Wr.__exportStar(dp(),or);Wr.__exportStar(cT(),or);Wr.__exportStar(ap(),or);Wr.__exportStar(lp(),or);Wr.__exportStar(op(),or);Wr.__exportStar(zl(),or);Wr.__exportStar(uT(),or);Wr.__exportStar(rp(),or)});var fp=vt(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.fixParsedWebmDuration=void 0;var dR=pp(),uR=(e,t,r={})=>{let n=r.logger;n===void 0?n=l=>console.debug(l):n||(n=()=>{});let o=e.getSectionById(139690087);if(!o)return n("[fix-webm-duration] Segment section is missing"),!1;let i=o.getSectionById(88713574);if(!i)return n("[fix-webm-duration] Info section is missing"),!1;let a=i.getSectionById(710577);if(!a)return n("[fix-webm-duration] TimecodeScale section is missing"),!1;let s=i.getSectionById(1161);if(s)if(s.getValue()<=0)n(`[fix-webm-duration] Duration section is present, but the value is ${s.getValue()}`),s.setValue(t);else return n(`[fix-webm-duration] Duration section is present, and the value is ${s.getValue()}`),!1;else n("[fix-webm-duration] Duration section is missing"),s=new dR.WebmFloat("Duration"),s.setValue(t),i.data.push({id:1161,data:s});return a.setValue(1e6),i.updateByData(),o.updateByData(),e.updateByData(),!0};Zl.fixParsedWebmDuration=uR});var pT=vt(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.fixWebmDuration=void 0;var pR=(Ca(),Da(ka)),fR=pp(),mR=fp(),gR=(e,t,r)=>pR.__awaiter(void 0,void 0,void 0,function*(){try{let n=yield fR.WebmFile.fromBlob(e);if((0,mR.fixParsedWebmDuration)(n,t,r))return n.toBlob(e.type)}catch{}return e});Xl.fixWebmDuration=gR});var mT=vt(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var fT=(Ca(),Da(ka));fT.__exportStar(pT(),Jl);fT.__exportStar(fp(),Jl)});function uk(e){return Object.keys(e).reduce((r,n)=>{let o=e[n];return r[n]=Object.assign({},o),Bp(o.value)&&!hk(o.value)&&!Array.isArray(o.value)&&(r[n].value=Object.assign({},o.value)),Array.isArray(o.value)&&(r[n].value=o.value.slice(0)),r},{})}function pk(e){return e?Object.keys(e).reduce((r,n)=>{let o=e[n];return r[n]=Bp(o)&&"value"in o?o:{value:o},r[n].attribute||(r[n].attribute=gk(n)),r[n].parse="parse"in r[n]?r[n].parse:typeof r[n].value!="string",r},{}):{}}function fk(e){return Object.keys(e).reduce((r,n)=>(r[n]=e[n].value,r),{})}function mk(e,t){let r=uk(t);return Object.keys(t).forEach(o=>{let i=r[o],a=e.getAttribute(i.attribute),s=e[o];a!=null&&(i.value=i.parse?Fp(a):a),s!=null&&(i.value=Array.isArray(s)?s.slice(0):s),i.reflect&&$p(e,i.attribute,i.value,!!i.parse),Object.defineProperty(e,o,{get(){return i.value},set(l){let c=i.value;i.value=l,i.reflect&&$p(this,i.attribute,i.value,!!i.parse);for(let d=0,u=this.__propertyChangedCallbacks.length;ddelete e.__updating[t])}function gk(e){return e.replace(/\.?([A-Z]+)/g,(t,r)=>"-"+r.toLowerCase()).replace("_","-").replace(/^-/,"")}function Bp(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function hk(e){return Object.prototype.toString.call(e)==="[object Function]"}function bk(e){return typeof e=="function"&&e.toString().indexOf("class")===0}var pc;function yk(e,t){let r=Object.keys(t);return class extends e{static get observedAttributes(){return r.map(o=>t[o].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=mk(this,t);let o=fk(this.props),i=this.Component,a=pc;try{pc=this,this.__initialized=!0,bk(i)?new i(o,{element:this}):i(o,{element:this})}finally{pc=a}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let o=null;for(;o=this.__releaseCallbacks.pop();)o(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(o,i,a){if(this.__initialized&&!this.__updating[o]&&(o=this.lookupProp(o),o in t)){if(a==null&&!this[o])return;this[o]=t[o].parse?Fp(a):a}}lookupProp(o){if(t)return r.find(i=>o===i||o===t[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(o){this.__releaseCallbacks.push(o)}addPropertyChangedCallback(o){this.__propertyChangedCallbacks.push(o)}}}function Up(e,t={},r={}){let{BaseElement:n=HTMLElement,extension:o,customElements:i=window.customElements}=r;return a=>{if(!e)throw new Error("tag is required to register a Component");let s=i.get(e);return s?(s.prototype.Component=a,s):(s=yk(n,pk(t)),s.prototype.Component=a,s.prototype.registeredTag=e,i.define(e,s,o),s)}}var xe={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Vp(this.context.count)},getNextContextId(){return Vp(this.context.count++)}};function Vp(e){let t=String(e),r=t.length-1;return xe.context.id+(r?String.fromCharCode(96+r):"")+t}function mc(e){xe.context=e}function vk(){return{...xe.context,id:xe.getNextContextId(),count:0}}var wk=!1,xk=(e,t)=>e===t,mo=Symbol("solid-proxy"),Wp=typeof Proxy=="function",hi=Symbol("solid-track");var La={equals:xk},zp=null,qp=Jp,Bt=1,mi=2,Kp={owned:null,cleanups:null,context:null,owner:null};var be=null,q=null,bi=null,fo=null,De=null,Qe=null,pt=null,Ba=0;function Ft(e,t){let r=De,n=be,o=e.length===0,i=t===void 0?n:t,a=o?Kp:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=o?e:()=>e(()=>He(()=>Yr(a)));be=a,De=null;try{return sr(s,!0)}finally{De=r,be=n}}function N(e,t){t=t?Object.assign({},La,t):La;let r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=o=>(typeof o=="function"&&(q&&q.running&&q.sources.has(r)?o=o(r.tValue):o=o(r.value)),Xp(r,o));return[Zp.bind(r),n]}function D(e,t,r){let n=vc(e,t,!1,Bt);bi&&q&&q.running?Qe.push(n):yi(n)}function ye(e,t,r){qp=Sk;let n=vc(e,t,!1,Bt),o=gc&&xn(gc);o&&(n.suspense=o),(!r||!r.render)&&(n.user=!0),pt?pt.push(n):yi(n)}function K(e,t,r){r=r?Object.assign({},La,r):La;let n=vc(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,bi&&q&&q.running?(n.tState=Bt,Qe.push(n)):yi(n),Zp.bind(n)}function He(e){if(!fo&&De===null)return e();let t=De;De=null;try{return fo?fo.untrack(e):e()}finally{De=t}}function le(e){ye(()=>He(e))}function re(e){return be===null||(be.cleanups===null?be.cleanups=[e]:be.cleanups.push(e)),e}function go(){return be}function Yp(e,t){let r=be,n=De;be=e,De=null;try{return sr(t,!0)}catch(o){Va(o)}finally{be=r,De=n}}function Tk(e){if(q&&q.running)return e(),q.done;let t=De,r=be;return Promise.resolve().then(()=>{De=t,be=r;let n;return(bi||gc)&&(n=q||(q={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),n.done||(n.done=new Promise(o=>n.resolve=o)),n.running=!0),sr(e,!1),De=be=null,n?n.done:void 0})}var[mN,Gp]=N(!1);function ho(e,t){let r=Symbol("context");return{id:r,Provider:Pk(r),defaultValue:e}}function xn(e){let t;return be&&be.context&&(t=be.context[e.id])!==void 0?t:e.defaultValue}function Ua(e){let t=K(e),r=K(()=>hc(t()));return r.toArray=()=>{let n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}var gc;function Zp(){let e=q&&q.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Bt)yi(this);else{let t=Qe;Qe=null,sr(()=>$a(this),!1),Qe=t}if(De){let t=this.observers?this.observers.length:0;De.sources?(De.sources.push(this),De.sourceSlots.push(t)):(De.sources=[this],De.sourceSlots=[t]),this.observers?(this.observers.push(De),this.observerSlots.push(De.sources.length-1)):(this.observers=[De],this.observerSlots=[De.sources.length-1])}return e&&q.sources.has(this)?this.tValue:this.value}function Xp(e,t,r){let n=q&&q.running&&q.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(n,t)){if(q){let o=q.running;(o||!r&&q.sources.has(e))&&(q.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&sr(()=>{for(let o=0;o1e6)throw Qe=[],new Error},!1)}return t}function yi(e){if(!e.fn)return;Yr(e);let t=Ba;Hp(e,q&&q.running&&q.sources.has(e)?e.tValue:e.value,t),q&&!q.running&&q.sources.has(e)&&queueMicrotask(()=>{sr(()=>{q&&(q.running=!0),De=be=e,Hp(e,e.tValue,t),De=be=null},!1)})}function Hp(e,t,r){let n,o=be,i=De;De=be=e;try{n=e.fn(t)}catch(a){return e.pure&&(q&&q.running?(e.tState=Bt,e.tOwned&&e.tOwned.forEach(Yr),e.tOwned=void 0):(e.state=Bt,e.owned&&e.owned.forEach(Yr),e.owned=null)),e.updatedAt=r+1,Va(a)}finally{De=i,be=o}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?Xp(e,n,!0):q&&q.running&&e.pure?(q.sources.add(e),e.tValue=n):e.value=n,e.updatedAt=r)}function vc(e,t,r,n=Bt,o){let i={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:be,context:be?be.context:null,pure:r};if(q&&q.running&&(i.state=0,i.tState=n),be===null||be!==Kp&&(q&&q.running&&be.pure?be.tOwned?be.tOwned.push(i):be.tOwned=[i]:be.owned?be.owned.push(i):be.owned=[i]),fo&&i.fn){let[a,s]=N(void 0,{equals:!1}),l=fo.factory(i.fn,s);re(()=>l.dispose());let c=()=>Tk(s).then(()=>d.dispose()),d=fo.factory(i.fn,c);i.fn=u=>(a(),q&&q.running?d.track(u):l.track(u))}return i}function gi(e){let t=q&&q.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===mi)return $a(e);if(e.suspense&&He(e.suspense.inFallback))return e.suspense.effects.push(e);let r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;n--){if(e=r[n],t){let o=e,i=r[n+1];for(;(o=o.owner)&&o!==i;)if(q.disposed.has(o))return}if((t?e.tState:e.state)===Bt)yi(e);else if((t?e.tState:e.state)===mi){let o=Qe;Qe=null,sr(()=>$a(e,r[0]),!1),Qe=o}}}function sr(e,t){if(Qe)return e();let r=!1;t||(Qe=[]),pt?r=!0:pt=[],Ba++;try{let n=e();return kk(r),n}catch(n){r||(pt=null),Qe=null,Va(n)}}function kk(e){if(Qe&&(bi&&q&&q.running?Ck(Qe):Jp(Qe),Qe=null),e)return;let t;if(q){if(!q.promises.size&&!q.queue.size){let n=q.sources,o=q.disposed;pt.push.apply(pt,q.effects),t=q.resolve;for(let i of pt)"tState"in i&&(i.state=i.tState),delete i.tState;q=null,sr(()=>{for(let i of o)Yr(i);for(let i of n){if(i.value=i.tValue,i.owned)for(let a=0,s=i.owned.length;aqp(r),!1),t&&t()}function Jp(e){for(let t=0;t{n.delete(r),sr(()=>{q.running=!0,gi(r)},!1),q&&(q.running=!1)}))}}function Sk(e){let t,r=0;for(t=0;t=0;t--)Yr(e.tOwned[t]);delete e.tOwned}if(q&&q.running&&e.pure)ef(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Yr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}q&&q.running?e.tState=0:e.state=0}function ef(e,t){if(t||(e.tState=0,q.disposed.add(e)),e.owned)for(let r=0;ro=He(()=>(be.context={...be.context,[e]:n.value},Ua(()=>n.children))),void 0),o}}var bc=Symbol("fallback");function Fa(e){for(let t=0;t1?[]:null;return re(()=>Fa(i)),()=>{let l=e()||[],c=l.length,d,u;return l[hi],He(()=>{let f,h,g,y,w,v,C,b,T;if(c===0)a!==0&&(Fa(i),i=[],n=[],o=[],a=0,s&&(s=[])),r.fallback&&(n=[bc],o[0]=Ft(_=>(i[0]=_,r.fallback())),a=1);else if(a===0){for(o=new Array(c),u=0;u=v&&b>=v&&n[C]===l[b];C--,b--)g[b]=o[C],y[b]=i[C],s&&(w[b]=s[C]);for(f=new Map,h=new Array(b+1),u=b;u>=v;u--)T=l[u],d=f.get(T),h[u]=d===void 0?-1:d,f.set(T,u);for(d=v;d<=C;d++)T=n[d],u=f.get(T),u!==void 0&&u!==-1?(g[u]=o[d],y[u]=i[d],s&&(w[u]=s[d]),u=h[u],f.set(T,u)):i[d]();for(u=v;uFa(i)),()=>{let c=e()||[],d=c.length;return c[hi],He(()=>{if(d===0)return s!==0&&(Fa(i),i=[],n=[],o=[],s=0,a=[]),r.fallback&&(n=[bc],o[0]=Ft(m=>(i[0]=m,r.fallback())),s=1),o;for(n[0]===bc&&(i[0](),i=[],n=[],o=[],s=0),l=0;lc[l]):l>=n.length&&(o[l]=Ft(u));for(;le(t||{}));return mc(r),n}return He(()=>e(t||{}))}function Ma(){return!0}var yc={get(e,t,r){return t===mo?r:e.get(t)},has(e,t){return t===mo?!0:e.has(t)},set:Ma,deleteProperty:Ma,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ma,deleteProperty:Ma}},ownKeys(e){return e.keys()}};function fc(e){return(e=typeof e=="function"?e():e)?e:{}}function Ak(){for(let e=0,t=this.length;e=0;s--){let l=fc(e[s])[a];if(l!==void 0)return l}},has(a){for(let s=e.length-1;s>=0;s--)if(a in fc(e[s]))return!0;return!1},keys(){let a=[];for(let s=0;s=0;a--){let s=e[a];if(!s)continue;let l=Object.getOwnPropertyNames(s);for(let c=l.length-1;c>=0;c--){let d=l[c];if(d==="__proto__"||d==="constructor")continue;let u=Object.getOwnPropertyDescriptor(s,d);if(!n[d])n[d]=u.get?{enumerable:!0,configurable:!0,get:Ak.bind(r[d]=[u.get.bind(s)])}:u.value!==void 0?u:void 0;else{let m=r[d];m&&(u.get?m.push(u.get.bind(s)):u.value!==void 0&&m.push(()=>u.value))}}}let o={},i=Object.keys(n);for(let a=i.length-1;a>=0;a--){let s=i[a],l=n[s];l&&l.get?Object.defineProperty(o,s,l):o[s]=l?l.value:void 0}return o}function Ve(e,...t){let r=t.length;if(Wp&&mo in e){let o=r>1?t.flat():t[0],i=t.map(a=>new Proxy({get(s){return a.includes(s)?e[s]:void 0},has(s){return a.includes(s)&&s in e},keys(){return a.filter(s=>s in e)}},yc));return i.push(new Proxy({get(a){return o.includes(a)?void 0:e[a]},has(a){return o.includes(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.includes(a))}},yc)),i}let n=[];for(let o=0;o<=r;o++)n[o]={};for(let o of Object.getOwnPropertyNames(e)){let i=r;for(let l=0;l`Stale read from <${e}>.`;function ve(e){let t="fallback"in e&&{fallback:()=>e.fallback};return K(tf(()=>e.each,e.children,t||void 0))}function vi(e){let t="fallback"in e&&{fallback:()=>e.fallback};return K(_k(()=>e.each,e.children,t||void 0))}function U(e){let t=e.keyed,r=K(()=>e.when,void 0,void 0),n=t?r:K(r,void 0,{equals:(o,i)=>!o==!i});return K(()=>{let o=n();if(o){let i=e.children;return typeof i=="function"&&i.length>0?He(()=>i(t?o:()=>{if(!He(n))throw rf("Show");return r()})):i}return e.fallback},void 0,void 0)}function Re(e){let t=Ua(()=>e.children),r=K(()=>{let n=t(),o=Array.isArray(n)?n:[n],i=()=>{};for(let a=0;ac()?void 0:l.when,void 0,void 0),u=l.keyed?d:K(d,void 0,{equals:(m,f)=>!m==!f});i=()=>c()||(u()?[s,d,l]:void 0)}return i});return K(()=>{let n=r()();if(!n)return e.fallback;let[o,i,a]=n,s=a.children;return typeof s=="function"&&s.length>0?He(()=>s(a.keyed?i():()=>{if(He(r)()?.[0]!==o)throw rf("Match");return i()})):s},void 0,void 0)}function J(e){return e}var Ok=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Nk=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Ok]),Dk=new Set(["innerHTML","textContent","innerText","children"]),Mk=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Lk=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function $k(e,t){let r=Lk[e];return typeof r=="object"?r[t]?r.$:void 0:r}var Fk=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Bk=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Uk={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};var Q=e=>K(()=>e());function Vk(e,t,r){let n=r.length,o=t.length,i=n,a=0,s=0,l=t[o-1].nextSibling,c=null;for(;ad-s){let h=t[a];for(;s{let s=n?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return s.innerHTML=e,r?s.content.firstChild.firstChild:n?s.firstChild:s.content.firstChild},a=t?()=>He(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return a.cloneNode=a,a}function st(e,t=window.document){let r=t[nf]||(t[nf]=new Set);for(let n=0,o=e.length;no.call(e,r[1],i))}else e.addEventListener(t,r,typeof r!="function"&&r)}function Hk(e,t,r={}){let n=Object.keys(t||{}),o=Object.keys(r),i,a;for(i=0,a=o.length;io.children=yo(e,t.children,o.children)),D(()=>typeof t.ref=="function"&&fe(t.ref,e)),D(()=>jk(e,t,r,!0,o,!0)),o}function fe(e,t,r){return He(()=>e(t,r))}function k(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return yo(e,t,n,r);D(o=>yo(e,t(),o,r),n)}function jk(e,t,r,n,o={},i=!1){t||(t={});for(let a in o)if(!(a in t)){if(a==="children")continue;o[a]=af(e,a,null,o[a],r,i,t)}for(let a in t){if(a==="children"){n||yo(e,t.children);continue}let s=t[a];o[a]=af(e,a,s,o[a],r,i,t)}}function Wk(e){let t,r;return!Tn()||!(t=xe.registry.get(r=Yk()))?e():(xe.completed&&xe.completed.add(t),xe.registry.delete(r),t)}function Tn(e){return!!xe.context&&!xe.done&&(!e||e.isConnected)}function qk(e){return e.toLowerCase().replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function of(e,t,r){let n=t.trim().split(/\s+/);for(let o=0,i=n.length;o-1&&Uk[t.split(":")[0]];m?zk(e,m,t,r):j(e,Mk[t]||t,r)}return r}function Kk(e){if(xe.registry&&xe.events&&xe.events.find(([l,c])=>c===e))return;let t=e.target,r=`$$${e.type}`,n=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),a=()=>{let l=t[r];if(l&&!t.disabled){let c=t[`${r}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},s=()=>{for(;a()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),xe.registry&&!xe.done&&(xe.done=_$HY.done=!0),e.composedPath){let l=e.composedPath();i(l[0]);for(let c=0;c{let l=t();for(;typeof l=="function";)l=l();r=yo(e,l,r,n)}),()=>r;if(Array.isArray(t)){let l=[],c=r&&Array.isArray(r);if(wc(l,t,r,o))return D(()=>r=yo(e,l,r,n,!0)),()=>r;if(i){if(!l.length)return r;if(n===void 0)return r=[...e.childNodes];let d=l[0];if(d.parentNode!==e)return r;let u=[d];for(;(d=d.nextSibling)!==n;)u.push(d);return r=u}if(l.length===0){if(r=bo(e,r,n),s)return r}else c?r.length===0?sf(e,l,n):Vk(e,r,l):(r&&bo(e),sf(e,l));r=l}else if(t.nodeType){if(i&&t.parentNode)return r=s?[t]:t;if(Array.isArray(r)){if(s)return r=bo(e,r,n,t);bo(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}}return r}function wc(e,t,r,n){let o=!1;for(let i=0,a=t.length;i=0;a--){let s=t[a];if(o!==s){let l=s.parentNode===e;!i&&!a?l?e.replaceChild(o,s):e.insertBefore(o,r):l&&s.remove()}else i=!0}}else e.insertBefore(o,r);return[o]}function Yk(){return xe.getNextContextId()}var lf=!1;var Zk="http://www.w3.org/2000/svg";function cf(e,t=!1,r=void 0){return t?document.createElementNS(Zk,e):document.createElement(e,{is:r})}function za(e){let{useShadow:t}=e,r=document.createTextNode(""),n=()=>e.mount||document.body,o=go(),i,a=!!xe.context;return ye(()=>{a&&(go().user=a=!1),i||(i=Yp(o,()=>K(()=>e.children)));let s=n();if(s instanceof HTMLHeadElement){let[l,c]=N(!1),d=()=>c(!0);Ft(u=>k(s,()=>l()?u():i(),null)),re(d)}else{let l=cf(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return r.parentNode},configurable:!0}),k(c,i),s.appendChild(l),e.ref&&e.ref(l),re(()=>s.removeChild(l))}},void 0,{render:!a}),r}function Xk(e,t){let r=K(e);return K(()=>{let n=r();switch(typeof n){case"function":return He(()=>n(t));case"string":let o=Bk.has(n),i=xe.context?Wk():cf(n,o,He(()=>t.is));return we(i,t,o),i}})}function df(e){let[,t]=Ve(e,["component"]);return Xk(()=>e.component,t)}function Jk(e){let t=Object.keys(e),r={};for(let n=0;na)}})}return r}function Qk(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function eC(e){return(t,r)=>{let{element:n}=r;return Ft(o=>{let i=Jk(t);n.addPropertyChangedCallback((s,l)=>i[s]=l),n.addReleaseCallback(()=>{n.renderRoot.textContent="",o()});let a=e(i,r);return k(n.renderRoot,a)},Qk(n))}}function Ga(e,t,r){return arguments.length===2&&(r=t,t={}),Up(e,t)(eC(r))}var Ha={typebot:void 0,onNewInputBlock:void 0,onAnswer:void 0,onEnd:void 0,onInit:void 0,onNewLogs:void 0,onChatStatePersisted:void 0,onScriptExecutionSuccess:void 0,font:void 0,progressBarRef:void 0,isPreview:void 0,startFrom:void 0,prefilledVariables:void 0,apiHost:void 0,wsHost:void 0,resultId:void 0,sessionId:void 0},uf={...Ha,onClose:void 0,onOpen:void 0,theme:void 0,autoShowDelay:void 0,isOpen:void 0,defaultOpen:void 0},pf={...Ha,isOpen:void 0,onClose:void 0,onOpen:void 0,theme:void 0,previewMessage:void 0,onPreviewMessageClick:void 0,onPreviewMessageDismissed:void 0,autoShowDelay:void 0,inlineStyle:void 0},xi={xs:440,sm:640,md:768,lg:1024,xl:1280};var _e=()=>(e,t)=>Ve(e,t);var tC=Object.defineProperty,ff=e=>{throw TypeError(e)},rC=(e,t,r)=>t in e?tC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pr=(e,t,r)=>rC(e,typeof t!="symbol"?t+"":t,r),nC=(e,t,r)=>t.has(e)||ff("Cannot "+r),xc=(e,t,r)=>(nC(e,t,"read from private field"),r?r.call(e):t.get(e)),mf=(e,t,r)=>t.has(e)?ff("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);function gf(e){return e==null?[]:Array.isArray(e)?e:[e]}var hf=e=>e[0],bf=e=>e[e.length-1];var yf=(e,...t)=>e.concat(t),vf=(e,...t)=>e.filter(r=>!t.includes(r));var wf=e=>Array.from(new Set(e));function ja(e,t,r={}){let{step:n=1,loop:o=!0}=r,i=t+n,a=e.length,s=a-1;return t===-1?n>0?0:s:i<0?o?s:0:i>=a?o?0:t>a?a:t:i}function xf(e,t,r={}){return e[ja(e,t,r)]}function Tc(e,t,r={}){let{step:n=1,loop:o=!0}=r;return ja(e,t,{step:-n,loop:o})}function Tf(e,t,r={}){return e[Tc(e,t,r)]}var kf=e=>e?.constructor.name==="Array",oC=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(kf(e)&&kf(t))return oC(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;let r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;oArray.isArray(e);var Cf=e=>e!=null&&typeof e=="object",Wa=e=>Cf(e)&&!iC(e),Ti=e=>typeof e=="number"&&!Number.isNaN(e),_r=e=>typeof e=="string",ft=e=>typeof e=="function",Sf=e=>e==null,kn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),aC=e=>Object.prototype.toString.call(e),Ef=Function.prototype.toString,sC=Ef.call(Object),Pf=e=>{if(!Cf(e)||aC(e)!="[object Object]"||dC(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let r=kn(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Ef.call(r)==sC},lC=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,cC=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,dC=e=>lC(e)||cC(e);var ki=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,kc=e=>e;var _f=()=>{},Ir=(...e)=>(...t)=>{e.forEach(function(r){r?.(...t)})},qa=(()=>{let e=0;return()=>(e++,e.toString(36))})();function If(e,t=0){let r=0,n=null;return((...o)=>{let i=Date.now(),a=i-r;a>=t?(n&&(clearTimeout(n),n=null),e(...o),r=i):n||(n=setTimeout(()=>{e(...o),r=Date.now(),n=null},t-a))})}var{floor:uC,abs:MN,round:pC,min:fC,max:mC,pow:LN,sign:$N}=Math,gC=e=>Number.isNaN(e),Cn=e=>gC(e)?0:e;var Rf=(e,t)=>(e%t+t)%t;var Of=(e,t)=>Cn(e)>=t,Nf=(e,t)=>Cn(e)<=t,Df=(e,t,r)=>{let n=Cn(e),o=t==null||n>=t,i=r==null||n<=r;return o&&i};var lr=(e,t,r)=>fC(mC(Cn(e),t),r);var Mf=(e,t,r)=>(Cn(e)-t)/(r-t);var Sn=(e,t)=>typeof t=="number"?uC(e*t+.5)/t:pC(e);var Af=e=>{if(!Number.isFinite(e))return 0;let t=1,r=0;for(;Math.round(e*t)/t!==e;)t*=10,r+=1;return r},Lf=(e,t,r)=>{let n=t==="+"?e+r:e-r;if(e%1!==0||r%1!==0){let o=10**Math.max(Af(e),Af(r));e=Math.round(e*o),r=Math.round(r*o),n=t==="+"?e+r:e-r,n/=o}return n},$f=(e,t)=>Lf(Cn(e),"+",t),Ff=(e,t)=>Lf(Cn(e),"-",t);function En(e){if(!Pf(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(let n of t){let o=e[n];o!==void 0&&(r[n]=En(o))}return r}var Ka=()=>performance.now(),Ya,hC=class{constructor(e){this.onTick=e,Pr(this,"frameId",null),Pr(this,"pausedAtMs",null),Pr(this,"context"),Pr(this,"cancelFrame",()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),Pr(this,"setStartMs",t=>{this.context.startMs=t}),Pr(this,"start",()=>{if(this.frameId!==null)return;let t=Ka();this.pausedAtMs!==null?(this.context.startMs+=t-this.pausedAtMs,this.pausedAtMs=null):this.context.startMs=t,this.frameId=requestAnimationFrame(xc(this,Ya))}),Pr(this,"pause",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=Ka())}),Pr(this,"stop",()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),mf(this,Ya,t=>{if(this.context.now=t,this.context.deltaMs=t-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(xc(this,Ya))}),this.context={now:0,startMs:Ka(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs!==null?this.pausedAtMs-this.context.startMs:Ka()-this.context.startMs}};Ya=new WeakMap;function Za(e,t){let r=new hC(({deltaMs:n})=>{if(n>=t)return e(),!1});return r.start(),()=>r.stop()}function Xr(...e){let t=e.length===1?e[0]:e[1],r=e.length===2?e[0]:!0}function Bf(e,t){if(e==null)throw new Error(t())}function Xa(e,t,r){let n=[];for(let o of t)e[o]==null&&n.push(o);if(n.length>0)throw new Error(`[zag-js${r?` > ${r}`:""}] missing required props: ${n.join(", ")}`)}function bC(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ne(e={}){let{strict:t=!0,hookName:r="useContext",providerName:n="Provider",errorMessage:o,defaultValue:i}=e,a=ho(i);function s(){let l=xn(a);if(!l&&t){let c=new Error(o??bC(r,n));throw c.name="ContextError",kn(Error,"captureStackTrace")&&ft(Error.captureStackTrace)&&Error.captureStackTrace(c,s),c}return l}return[a.Provider,s,a]}var[Cc,Uf]=Ne({hookName:"useRenderStrategyContext",providerName:""}),Ci=e=>_e()(e,["lazyMount","unmountOnExit"]);var yC=e=>typeof e=="function",mt=(e,...t)=>yC(e)?e(...t):e;function Sc(e,t){let{state:r,send:n,context:o}=e,i=r.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:i,setNode(a){a&&n({type:"NODE.SET",node:a})},unmount(){n({type:"UNMOUNT"})}}}var vC=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),wC=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Vf=e=>{let t={},r;for(;r=wC.exec(e);)t[r[1]]=r[2];return t},xC=(e,t)=>{if(_r(e)){if(_r(t))return`${e};${t}`;e=Vf(e)}else _r(t)&&(t=Vf(t));return Object.assign({},e??{},t??{})};function Ja(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=Ir(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=vC(t[o],r[o]);continue}if(o==="style"){t[o]=xC(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);let n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function Si(e,t,r){let n=[],o;return i=>{let a=e(i);return(a.length!==n.length||a.some((l,c)=>!Zr(n[c],l)))&&(n=a,o=t(a,i),r?.onChange?.(o)),o}}var Pn=".",Gf="#",zf=new WeakMap,Hf=new WeakMap;function Pc(e){return e.join(Pn)}function TC(e){return e.includes(Pn)}function jf(e){return e.startsWith(Gf)}function kC(e){return jf(e)?e.slice(Gf.length):e}function Wf(e,t){return e?`${e}${Pn}${t}`:t}function CC(e){let t=new Map,r=new Map,n=(o,i)=>{t.set(o,i);let a=i.id;if(a){if(r.has(a))throw new Error(`Duplicate state id: ${a}`);r.set(a,o)}let s=i.states;if(s)for(let[l,c]of Object.entries(s)){if(!c)continue;let d=Wf(o,l);n(d,c)}};for(let[o,i]of Object.entries(e.states))i&&n(o,i);return{index:t,idIndex:r}}function vo(e){let t=zf.get(e);if(t)return t;let{index:r,idIndex:n}=CC(e);return zf.set(e,r),Hf.set(e,n),r}function SC(e,t){return vo(e),Hf.get(e)?.get(t)}function _c(e){return e?String(e).split(Pn).filter(Boolean):[]}function Qa(e,t){if(!t)return[];let r=vo(e),n=_c(t),o=[],i=[];for(let a of n){i.push(a);let s=Pc(i),l=r.get(s);if(!l)break;o.push({path:s,state:l})}return o}function Ec(e,t){let r=vo(e),n=_c(t);if(!n.length)return t;let o=[];for(let s of n){o.push(s);let l=Pc(o);if(!r.has(l))return t}let i=Pc(o),a=r.get(i);for(;a?.initial;){let s=`${i}${Pn}${a.initial}`,l=r.get(s);if(!l)break;i=s,a=l}return i}function EC(e,t){return vo(e).has(t)}function Ic(e,t,r){let n=String(t);if(jf(n)){let o=kC(n),i=SC(e,o);if(!i)throw new Error(`Unknown state id: ${o}`);return Ec(e,i)}if(!TC(n)&&r){let o=_c(r);for(let i=o.length;i>=1;i--){let a=o.slice(0,i).join(Pn),s=Wf(a,n);if(EC(e,s))return Ec(e,s)}}return Ec(e,n)}function qf(e,t,r){let n=Qa(e,t);for(let i=n.length-1;i>=0;i--){let s=n[i]?.state.on?.[r];if(s)return{transitions:s,source:n[i]?.path}}return{transitions:e.on?.[r],source:void 0}}function Kf(e,t,r,n){let o=t?Qa(e,t):[],i=Qa(e,r),a=0;for(;an.state.tags?.includes(r))}function Ei(){return{and:(...e)=>function(r){return e.every(n=>r.guard(n))},or:(...e)=>function(r){return e.some(n=>r.guard(n))},not:e=>function(r){return!r.guard(e)}}}function Ot(e){return vo(e),e}function es(){return{guards:Ei(),createMachine:e=>Ot(e),choose:e=>function({choose:r}){return r(e)?.actions}}}var _n=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(_n||{}),ts="__init__";var PC=Object.defineProperty,_C=(e,t,r)=>t in e?PC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rs=(e,t,r)=>_C(e,typeof t!="symbol"?t+"":t,r);function Ac(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch{}}var Xf=(e,t)=>e.map((r,n)=>e[(Math.max(t,0)+n)%e.length]);var Pi=()=>{},_i=e=>typeof e=="object"&&e!==null,Ii=2147483647,te=e=>e?"":void 0,cr=e=>e?"true":void 0;var IC=1,AC=9,RC=11,Me=e=>_i(e)&&e.nodeType===IC&&typeof e.nodeName=="string",Ai=e=>_i(e)&&e.nodeType===AC,OC=e=>_i(e)&&e===e.window;var Jf=e=>Me(e)?e.localName||"":"#document";function Qf(e){return["html","body","#document"].includes(Jf(e))}var NC=e=>_i(e)&&e.nodeType!==void 0,In=e=>NC(e)&&e.nodeType===RC&&"host"in e,DC=e=>Me(e)&&e.localName==="input",em=e=>!!e?.matches("a[href]"),tm=e=>Me(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ri(e){if(!e)return!1;let t=e.getRootNode();return dr(t)===e}var MC=/(textarea|select)/;function wo(e){if(e==null||!Me(e))return!1;try{return DC(e)&&e.selectionStart!=null||MC.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function nt(e,t){if(!e||!t||!Me(e)||!Me(t))return!1;let r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&In(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Fe(e){return Ai(e)?e:OC(e)?e.document:e?.ownerDocument??document}function LC(e){return Fe(e).documentElement}function Se(e){return In(e)?Se(e.host):Ai(e)?e.defaultView??window:Me(e)?e.ownerDocument?.defaultView??window:window}function dr(e){let t=e.activeElement;for(;t?.shadowRoot;){let r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}function rm(e){if(Jf(e)==="html")return e;let t=e.assignedSlot||e.parentNode||In(e)&&e.host||LC(e);return In(t)?t.host:t}function ns(e){let t;try{if(t=e.getRootNode({composed:!0}),Ai(t)||In(t))return t}catch{}return e.ownerDocument??document}var Rc=new WeakMap;function _t(e){return Rc.has(e)||Rc.set(e,Se(e).getComputedStyle(e)),Rc.get(e)}var Oc=new Set(["menu","listbox","dialog","grid","tree","region"]),$C=e=>Oc.has(e),nm=e=>e.getAttribute("aria-controls")?.split(" ")||[];function os(e,t){let r=new Set,n=ns(e),o=i=>{let a=i.querySelectorAll("[aria-controls]");for(let s of a){if(s.getAttribute("aria-expanded")!=="true")continue;let l=nm(s);for(let c of l){if(!c||r.has(c))continue;r.add(c);let d=n.getElementById(c);if(d){let u=d.getAttribute("role"),m=d.getAttribute("aria-modal")==="true";if(u&&$C(u)&&!m&&(d===t||d.contains(t)||o(d)))return!0}}}return!1};return o(e)}function Nc(e,t){let r=ns(e),n=new Set,o=i=>{let a=i.querySelectorAll("[aria-controls]");for(let s of a){if(s.getAttribute("aria-expanded")!=="true")continue;let l=nm(s);for(let c of l){if(!c||n.has(c))continue;n.add(c);let d=r.getElementById(c);if(d){let u=d.getAttribute("role"),m=d.getAttribute("aria-modal")==="true";u&&Oc.has(u)&&!m&&(t(d),o(d))}}}};o(e)}function om(e){let t=new Set;return Nc(e,r=>{e.contains(r)||t.add(r)}),Array.from(t)}function FC(e){let t=e.getAttribute("role");return!!(t&&Oc.has(t))}function BC(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function im(e){return BC(e)?!0:!!e.querySelector?.('[aria-controls][aria-expanded="true"]')}function am(e){if(!e.id)return!1;let t=ns(e),r=CSS.escape(e.id),n=`[aria-controls~="${r}"][aria-expanded="true"], [aria-controls="${r}"][aria-expanded="true"]`;return!!(t.querySelector(n)&&FC(e))}var is=()=>typeof document<"u";function UC(){return navigator.userAgentData?.platform??navigator.platform}function VC(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:r})=>`${t}/${r}`).join(" "):navigator.userAgent}var Dc=e=>is()&&e.test(UC()),sm=e=>is()&&e.test(VC()),zC=e=>is()&&e.test(navigator.vendor),Mc=()=>is()&&!!navigator.maxTouchPoints,GC=()=>Dc(/^iPhone/i),HC=()=>Dc(/^iPad/i)||An()&&navigator.maxTouchPoints>1,xo=()=>GC()||HC(),jC=()=>An()||xo(),An=()=>Dc(/^Mac/i),as=()=>jC()&&zC(/apple/i),lm=()=>sm(/Firefox/i);var cm=()=>sm(/Android/i);function WC(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function Be(e){return WC(e)?.[0]??e.target}function Lc(e){let t=e.currentTarget;if(!t||!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;let n=e.button===1,o=qC(e);return n||o}function $c(e){let t=e.currentTarget;if(!t)return!1;let r=t.localName;return e.altKey?r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit":!1}function um(e){return ZC(e).isComposing||e.keyCode===229}function qC(e){return An()?e.metaKey:e.ctrlKey}function pm(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function fm(e){return e.pointerType===""&&e.isTrusted?!0:cm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var To=e=>e.button===0,ss=e=>e.button===2||An()&&e.ctrlKey&&e.button===0,Oi=e=>e.ctrlKey||e.altKey||e.metaKey,KC=e=>"touches"in e&&e.touches.length>0,YC={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},dm={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Ni(e,t={}){let{dir:r="ltr",orientation:n="horizontal"}=t,o=e.key;return o=YC[o]??o,r==="rtl"&&n==="horizontal"&&o in dm&&(o=dm[o]),o}function ZC(e){return e.nativeEvent??e}var XC=new Set(["PageUp","PageDown"]),JC=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function mm(e){return e.ctrlKey||e.metaKey?.1:XC.has(e.key)||e.shiftKey&&JC.has(e.key)?10:1}function Kt(e,t="client"){let r=KC(e)?e.touches[0]||e.changedTouches[0]:e;return{x:r[`${t}X`],y:r[`${t}Y`]}}var Te=(e,t,r,n)=>{let o=typeof e=="function"?e():e;return o?.addEventListener(t,r,n),()=>{o?.removeEventListener(t,r,n)}};function QC(e,t){let{type:r="HTMLInputElement",property:n="value"}=t,o=Se(e)[r].prototype;return Object.getOwnPropertyDescriptor(o,n)??{}}function eS(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function gm(e,t,r="value"){if(!e)return;let n=eS(e);n&&QC(e,{type:n,property:r}).set?.call(e,t),e.setAttribute(r,t)}function tS(e){return e.matches("textarea, input, select, button")}function rS(e,t){if(!e)return;let r=tS(e)?e.form:e.closest("form"),n=o=>{o.defaultPrevented||t()};return r?.addEventListener("reset",n,{passive:!0}),()=>r?.removeEventListener("reset",n)}function nS(e,t){let r=e?.closest("fieldset");if(!r)return;t(r.disabled);let n=Se(r),o=new n.MutationObserver(()=>t(r.disabled));return o.observe(r,{attributes:!0,attributeFilter:["disabled"]}),()=>o.disconnect()}function hm(e,t){if(!e)return;let{onFieldsetDisabledChange:r,onFormReset:n}=t,o=[rS(e,n),nS(e,r)];return()=>o.forEach(i=>i?.())}var bm=e=>Me(e)&&e.tagName==="IFRAME",oS=/^(audio|video|details)$/;function ym(e){let t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var iS=e=>!Number.isNaN(ym(e)),aS=e=>ym(e)<0;function sS(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let r=t(e);return(r===!0?e.shadowRoot:r)||null}function vm(e,t,r){let n=[...e],o=[...e],i=new Set,a=new Map;e.forEach((l,c)=>a.set(l,c));let s=0;for(;s{a.set(f,m+h)});for(let f=m+d.length;f{a.set(f,m+h)})}o.push(...d)}}return n}var ls="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Fc=(e,t={})=>{if(!e)return[];let{includeContainer:r=!1,getShadowRoot:n}=t,o=Array.from(e.querySelectorAll(ls));(r==!0||r=="if-empty"&&o.length===0)&&Me(e)&&Nt(e)&&o.unshift(e);let a=[];for(let s of o)if(Nt(s)){if(bm(s)&&s.contentDocument){let l=s.contentDocument.body;a.push(...Fc(l,{getShadowRoot:n}));continue}a.push(s)}return n?vm(a,n,Nt):a};function Nt(e){return!Me(e)||e.closest("[inert]")?!1:e.matches(ls)&&tm(e)}function Qr(e,t={}){if(!e)return[];let{includeContainer:r,getShadowRoot:n}=t,o=Array.from(e.querySelectorAll(ls));r&&Jr(e)&&o.unshift(e);let i=[];for(let a of o)if(Jr(a)){if(bm(a)&&a.contentDocument){let s=a.contentDocument.body;i.push(...Qr(s,{getShadowRoot:n}));continue}i.push(a)}if(n){let a=vm(i,n,Jr);return!a.length&&r?o:a}return!i.length&&r?o:i}function Jr(e){return Me(e)&&e.tabIndex>0?!0:Nt(e)&&!aS(e)}function wm(e,t={}){let r=Qr(e,t),n=r[0]||null,o=r[r.length-1]||null;return[n,o]}function ko(e){return e.tabIndex<0&&(oS.test(e.localName)||wo(e))&&!iS(e)?0:e.tabIndex}function xm(e){let{root:t,getInitialEl:r,filter:n,enabled:o=!0}=e;if(!o)return;let i=null;if(i||(i=typeof r=="function"?r():r),i||(i=t?.querySelector("[data-autofocus],[autofocus]")),!i){let a=Qr(t);i=n?a.filter(n)[0]:a[0]}return i||t||void 0}function Tm(e){let t=e.currentTarget;if(!t)return!1;let[r,n]=wm(t);return!(Ri(r)&&e.shiftKey||Ri(n)&&!e.shiftKey||!r&&!n)}var Bc=class km{constructor(){rs(this,"id",null),rs(this,"fn_cleanup"),rs(this,"cleanup",()=>{this.cancel()})}static create(){return new km}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function pe(e){let t=Bc.create();return t.request(e),t.cleanup}function Co(e){let t=new Set;function r(n){let o=globalThis.requestAnimationFrame(n);t.add(()=>globalThis.cancelAnimationFrame(o))}return r(()=>r(e)),function(){t.forEach(o=>o())}}function Cm(e,t,r){let n=pe(()=>{e.removeEventListener(t,o,!0),r()}),o=()=>{n(),r()};return e.addEventListener(t,o,{once:!0,capture:!0}),n}function lS(e,t){if(!e)return;let{attributes:r,callback:n}=t,o=e.ownerDocument.defaultView||window,i=new o.MutationObserver(a=>{for(let s of a)s.type==="attributes"&&s.attributeName&&r.includes(s.attributeName)&&n(s)});return i.observe(e,{attributes:!0,attributeFilter:r}),()=>i.disconnect()}function cs(e,t){let{defer:r}=t,n=r?pe:i=>i(),o=[];return o.push(n(()=>{let i=typeof e=="function"?e():e;o.push(lS(i,t))})),()=>{o.forEach(i=>i?.())}}function Sm(e){let t=()=>{let r=Se(e);e.dispatchEvent(new r.MouseEvent("click"))};lm()?Cm(e,"keyup",t):queueMicrotask(t)}function ds(e){let t=rm(e);return Qf(t)?Fe(t).body:Me(t)&&Em(t)?t:ds(t)}var cS=/auto|scroll|overlay|hidden|clip/,dS=new Set(["inline","contents"]);function Em(e){let t=Se(e),{overflow:r,overflowX:n,overflowY:o,display:i}=t.getComputedStyle(e);return cS.test(r+o+n)&&!dS.has(i)}function uS(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Pm(e,t){let{rootEl:r,...n}=t||{};!e||!r||!Em(r)||!uS(r)||e.scrollIntoView(n)}function _m(e,t){let r=e.body,n="pointerLockElement"in e||"mozPointerLockElement"in e,o=()=>!!e.pointerLockElement;function i(){t?.(o())}function a(l){o()&&t?.(!1),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!n)return;try{r.requestPointerLock()}catch{}let s=[Te(e,"pointerlockchange",i,!1),Te(e,"pointerlockerror",a,!1)];return()=>{s.forEach(l=>l()),e.exitPointerLock()}}var So="default",Uc="",us=new WeakMap;function pS(e={}){let{target:t,doc:r}=e,n=r??document,o=n.documentElement;return xo()?(So==="default"&&(Uc=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),So="disabled"):t&&(us.set(t,t.style.userSelect),t.style.userSelect="none"),()=>fS({target:t,doc:n})}function fS(e={}){let{target:t,doc:r}=e,o=(r??document).documentElement;if(xo()){if(So!=="disabled")return;So="restoring",setTimeout(()=>{Co(()=>{So==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=Uc||""),Uc="",So="default")})},300)}else if(t&&us.has(t)){let i=us.get(t);t.style.userSelect==="none"&&(t.style.userSelect=i??""),t.getAttribute("style")===""&&t.removeAttribute("style"),us.delete(t)}}function Im(e={}){let{defer:t,target:r,...n}=e,o=t?pe:a=>a(),i=[];return i.push(o(()=>{let a=typeof r=="function"?r():r;i.push(pS({...n,target:a}))})),()=>{i.forEach(a=>a?.())}}function Am(e,t){let{onPointerMove:r,onPointerUp:n}=t,o=s=>{let l=Kt(s),c=Math.sqrt(l.x**2+l.y**2),d=s.pointerType==="touch"?10:5;if(!(c{let l=Kt(s);n({point:l,event:s})},a=[Te(e,"pointermove",o,!1),Te(e,"pointerup",i,!1),Te(e,"pointercancel",i,!1),Te(e,"contextmenu",i,!1),Im({doc:e})];return()=>{a.forEach(s=>s())}}function ps(e,t){return Array.from(e?.querySelectorAll(t)??[])}var fs=e=>e.id;function mS(e,t,r=fs){return e.find(n=>r(n)===t)}function Rm(e,t,r=fs){let n=mS(e,t,r);return n?e.indexOf(n):-1}function gS(e){let t=new WeakMap,r,n=new WeakMap,o=s=>r||(r=new s.ResizeObserver(l=>{for(let c of l){n.set(c.target,c);let d=t.get(c.target);if(d)for(let u of d)u(c)}}),r);return{observe:(s,l)=>{let c=t.get(s)||new Set;c.add(l),t.set(s,c);let d=Se(s);return o(d).observe(s,e),()=>{let u=t.get(s);u&&(u.delete(l),u.size===0&&(t.delete(s),o(d).unobserve(s)))}},unobserve:s=>{t.delete(s),r?.unobserve(s)}}}var Vc=gS({box:"border-box"});var hS=e=>e.split("").map(t=>{let r=t.charCodeAt(0);return r>0&&r<128?t:r>=128&&r<=255?`/x${r.toString(16)}`.replace("/","\\"):""}).join("").trim(),bS=e=>hS(e.dataset?.valuetext??e.textContent??""),yS=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function Om(e,t,r,n=fs){let o=r?Rm(e,r,n):-1,i=r?Xf(e,o):e;return t.length===1&&(i=i.filter(s=>n(s)!==r)),i.find(s=>yS(bS(s),t))}function Rn(e,t){if(!e)return Pi;let r=Object.keys(t).reduce((n,o)=>(n[o]=e.style.getPropertyValue(o),n),{});return vS(r,t)?Pi:(Object.assign(e.style,t),()=>{Object.assign(e.style,r),e.style.length===0&&e.removeAttribute("style")})}function Nm(e,t,r){if(!e)return Pi;let n=e.style.getPropertyValue(t);return n===r?Pi:(e.style.setProperty(t,r),()=>{e.style.setProperty(t,n),e.style.length===0&&e.removeAttribute("style")})}function vS(e,t){return Object.keys(e).every(r=>e[r]===t[r])}function wS(e,t){let{state:r,activeId:n,key:o,timeout:i=350,itemToId:a}=t,s=r.keysSoFar+o,c=s.length>1&&Array.from(s).every(h=>h===s[0])?s[0]:s,d=e.slice(),u=Om(d,c,n,a);function m(){clearTimeout(r.timer),r.timer=-1}function f(h){r.keysSoFar=h,m(),h!==""&&(r.timer=+setTimeout(()=>{f(""),m()},i))}return f(s),u}var ms=Object.assign(wS,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:xS});function xS(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function TS(e,t,r){let{signal:n}=t;return[new Promise((a,s)=>{let l=setTimeout(()=>{s(new Error(`Timeout of ${r}ms exceeded`))},r);n.addEventListener("abort",()=>{clearTimeout(l),s(new Error("Promise aborted"))}),e.then(c=>{n.aborted||(clearTimeout(l),a(c))}).catch(c=>{n.aborted||(clearTimeout(l),s(c))})}),()=>t.abort()]}function Dm(e,t){let{timeout:r,rootNode:n}=t,o=Se(n),i=Fe(n),a=new o.AbortController;return TS(new Promise(s=>{let l=e();if(l){s(l);return}let c=new o.MutationObserver(()=>{let d=e();d&&d.isConnected&&(c.disconnect(),s(d))});c.observe(i.body,{childList:!0,subtree:!0})}),a,r)}function Mm(e){let t=()=>e.getRootNode?.()??document,r=()=>Fe(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>dr(t()),isActiveElement:Ri,getById:a=>t().getElementById(a)}}var zc=Ot({props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["cleanupNode"],watch({track:e,prop:t,send:r}){e([()=>t("present")],()=>{r({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},invokeOnExitComplete:({prop:e,refs:t})=>{e("onExitComplete")?.();let r=t.get("node");if(!r)return;let n=Se(r),o=new n.CustomEvent("exitcomplete",{bubbles:!1});r.dispatchEvent(o)},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",_t(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:r,prop:n})=>{let o=n("present");if(o)return r({type:"MOUNT",src:"presence.changed"});let i=t.get("node");if(!o&&i?.ownerDocument.visibilityState==="hidden")return r({type:"UNMOUNT",src:"visibilitychange"});pe(()=>{let a=gs(t.get("styles"));e.set("unmountAnimationName",a),a==="none"||a===e.get("prevAnimationName")||t.get("styles")?.display==="none"||t.get("styles")?.animationDuration==="0s"?r({type:"UNMOUNT",src:"presence.changed"}):r({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{pe(()=>{e.set("prevAnimationName",gs(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:r,prop:n})=>{let o=t.get("node");if(!o)return;let i=c=>{(c.composedPath?.()?.[0]??c.target)===o&&e.set("prevAnimationName",gs(t.get("styles")))},a=c=>{let d=gs(t.get("styles"));Be(c)===o&&d===e.get("unmountAnimationName")&&!n("present")&&r({type:"UNMOUNT",src:"animationend"})},s=c=>{Be(c)===o&&!n("present")&&r({type:"UNMOUNT",src:"animationcancel"})};o.addEventListener("animationstart",i),o.addEventListener("animationcancel",s),o.addEventListener("animationend",a);let l=Rn(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",i),o.removeEventListener("animationcancel",s),o.removeEventListener("animationend",a),Co(()=>l())}}}}});function gs(e){return e?.animationName||"none"}function Lm(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var Gc=Symbol("fallback");function $m(e){for(let t of e)t.dispose()}function CS(e,t,r,n={}){if(lf){let a=e(),s=[];if(a&&a.length)for(let l=0,c=a.length;la[l],()=>l));else n.fallback&&(s=[n.fallback()]);return()=>s}let o=new Map;return re(()=>$m(o.values())),()=>{let a=e()||[];return a[hi],He(()=>{if(!a.length)return $m(o.values()),o.clear(),n.fallback?[Ft(u=>(o.set(Gc,{dispose:u}),n.fallback()))]:[];let s=new Array(a.length),l=o.get(Gc);if(!o.size||l){l?.dispose(),o.delete(Gc);for(let d=0;du)):i(s,u,d,m)}for(let d of c)o.get(d)?.dispose(),o.delete(d);return s})};function i(a,s,l,c){Ft(d=>{let[u,m]=N(s),f={setItem:m,dispose:d};if(r.length>1){let[h,g]=N(l);f.setIndex=g,f.mapped=r(u,h)}else f.mapped=r(u);o.set(c,f),a[l]=f.mapped})}}function Hc(e){let{by:t}=e;return K(CS(()=>e.each,typeof t=="function"?t:r=>r[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function Di(e){let t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n,o]=N(t),i=K(()=>e().value!=null),a={current:n()},s={current:void 0};ye(()=>{let d=i()?e().value:n();s.current=d,a.current=d});let l=d=>{let u=s.current,m=ft(d)?d(a.current):d;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:u}),i()||o(m),r(m,u)||e().onChange?.(m,u)};function c(){let d=i()?e().value:n;return ft(d)?d():d}return{initial:t,ref:a,get:c,set:l,invoke(d,u){e().onChange?.(d,u)},hash(d){return e().hash?.(d)??String(d)}}}Di.cleanup=e=>{re(()=>e())};Di.ref=e=>{let t=e;return{get:()=>t,set:r=>{t=r}}};function Fm(e){let t={current:e};return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}function jc(e){return ft(e)?e():e}var Bm=(e,t)=>{let r=[],n=!0;ye(()=>{if(n){r=e.map(i=>jc(i)),n=!1;return}let o=!1;for(let i=0;ijc(i)),t())})};function wt(e,t={}){let r=K(()=>{let{id:P,ids:A,getRootNode:$}=Wc(t);return Mm({id:P,ids:A,getRootNode:$})}),n=(...P)=>{e.debug&&console.log(...P)},o=K(()=>e.props?.({props:En(Wc(t)),scope:r()})??Wc(t)),i=SS(o),a=e.context?.({prop:i,bindable:Di,get scope(){return r()},flush:Um,getContext(){return s},getComputed(){return b},getRefs(){return h},getEvent(){return m()}}),s={get(P){return a?.[P].get()},set(P,A){a?.[P].set(A)},initial(P){return a?.[P].initial},hash(P){let A=a?.[P].get();return a?.[P].hash(A)}},l={current:new Map},c={current:null},d={current:null},u={current:{type:""}},m=()=>se(u.current,{current(){return u.current},previous(){return d.current}}),f=()=>se(T,{matches(...P){let A=T.get();return P.some($=>Yf(A,$))},hasTag(P){let A=T.get();return Zf(e,A,P)}}),h=Fm(e.refs?.({prop:i,context:s})??{}),g=()=>({state:f(),context:s,event:m(),prop:i,send:R,action:y,guard:w,track:Bm,refs:h,computed:b,flush:Um,get scope(){return r()},choose:C}),y=P=>{let A=ft(P)?P(g()):P;if(!A)return;let $=A.map(W=>{let I=e.implementations?.actions?.[W];return I||Xr(`[zag-js] No implementation found for action "${JSON.stringify(W)}"`),I});for(let W of $)W?.(g())},w=P=>ft(P)?P(g()):e.implementations?.guards?.[P](g()),v=P=>{let A=ft(P)?P(g()):P;if(!A)return;let $=A.map(I=>{let F=e.implementations?.effects?.[I];return F||Xr(`[zag-js] No implementation found for effect "${JSON.stringify(I)}"`),F}),W=[];for(let I of $){let F=I?.(g());F&&W.push(F)}return()=>W.forEach(I=>I?.())},C=P=>gf(P).find(A=>{let $=!A.guard;return _r(A.guard)?$=!!w(A.guard):ft(A.guard)&&($=A.guard(g())),$}),b=P=>{Bf(e.computed,()=>"[zag-js] No computed object found on machine");let A=e.computed[P];return A({context:s,event:u.current,prop:i,refs:h,scope:r(),computed:b})},T=Di(()=>({defaultValue:Ic(e,e.initialState({prop:i})),onChange(P,A){let{exiting:$,entering:W}=Kf(e,A,P,c.current?.reenter);if($.forEach(I=>{l.current.get(I.path)?.(),l.current.delete(I.path)}),$.forEach(I=>{y(I.state?.exit)}),y(c.current?.actions),W.forEach(I=>{let F=v(I.state?.effects);F&&l.current.set(I.path,F)}),A===ts){y(e.entry);let I=v(e.effects);I&&l.current.set(ts,I)}W.forEach(I=>{y(I.state?.entry)})}})),_=_n.NotStarted;le(()=>{let P=_===_n.Started;_=_n.Started,n(P?"rehydrating...":"initializing..."),T.invoke(T.initial,ts)}),re(()=>{n("unmounting..."),_=_n.Stopped,l.current.forEach(A=>A?.()),l.current=new Map,c.current=null,y(e.exit)});let R=P=>{queueMicrotask(()=>{if(_!==_n.Started)return;d.current=u.current,u.current=P;let A=He(()=>T.get()),{transitions:$,source:W}=qf(e,A,P.type),I=C($);if(!I)return;c.current=I;let F=Ic(e,I.target??A,W);n("transition",P.type,I.target||A,`(${I.actions})`),F!==A?T.set(F):I.reenter?T.invoke(A,A):y(I.actions)})};return e.watch?.(g()),{state:f(),send:R,context:s,prop:i,get scope(){return r()},refs:h,computed:b,event:m(),getStatus:()=>_}}function Um(e){e()}function Wc(e){return ft(e)?e():e}function SS(e){return function(r){return e()[r]}}function V(...e){let t={};for(let r=0;r=0;s--){let l,c=e[s];if(typeof c=="function"&&(c=c()),l=(c||{})[i],l!==void 0)return l}}})}}return t}var Vm={onFocus:"onFocusIn",onBlur:"onFocusOut",onDoubleClick:"onDblClick",onChange:"onInput",defaultChecked:"checked",defaultValue:"value",htmlFor:"for",className:"class"},ES=e=>e.startsWith("--")?e:OS(e);function PS(e){return e in Vm?Vm[e]:e}var xt=Lm(e=>{let t={};for(let r in e){let n=e[r];if(!(r==="readOnly"&&n===!1)){if(r==="style"&&Wa(n)){t.style=_S(n);continue}if(r==="children"){_r(n)&&(t.textContent=n);continue}t[PS(r)]=n}}return t});function _S(e){let t={};for(let r in e){let n=e[r];!_r(n)&&!Ti(n)||(t[ES(r)]=n)}return t}var IS=/[A-Z]/g,AS=/^ms-/;function RS(e){return"-"+e.toLowerCase()}var qc={};function OS(e){if(qc.hasOwnProperty(e))return qc[e];let t=e.replace(IS,RS);return qc[e]=AS.test(t)?"-"+t:t}var On=e=>{let[t,r]=Ci(mt(e)),[n,o]=N(!1),i=wt(zc,e),a=K(()=>Sc(i,xt));ye(()=>{a().present&&o(!0)});let s=l=>{l&&i.send({type:"NODE.SET",node:l})};return K(()=>({unmounted:!a().present&&!n()&&t.lazyMount||t.unmountOnExit&&!a().present&&n(),present:a().present,ref:s,presenceProps:{hidden:!a().present,"data-state":a().skip&&r.skipAnimationOnMount?void 0:r.present?"open":"closed"}}))};var NS=e=>typeof e=="function",zm=(e,t)=>{for(let r of e)NS(r)&&r(t)};function ur(...e){let t=null;return ye(()=>{zm(e,t)}),r=>{t=r,zm(e,r)}}var Kc=e=>r=>{let[n,o]=Ve(r,["asChild"]);if(n.asChild){let i=a=>{let[,s]=Ve(o,["ref"]);return V(s,a)};return n.asChild(i)}return p(df,se({component:e},o))};function DS(){let e=new Map;return new Proxy(Kc,{apply(t,r,n){return Kc(n[0])},get(t,r){let n=r;return e.has(n)||e.set(n,Kc(n)),e.get(n)}})}var H=DS();var Eo=e=>_e()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);var[Po,en]=Ne({hookName:"usePresenceContext",providerName:""});var[DL,Ut]=Ne({hookName:"useEnvironmentContext",providerName:"",strict:!1,defaultValue:()=>({dir:"ltr",locale:"en-US"})});var[MS,ot]=Ne({hookName:"useEnvironmentContext",providerName:"",strict:!1,defaultValue:()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})}),Nn=e=>{let[t,r]=N(),n=()=>mt(e.value)??t()?.getRootNode()??document,o=K(()=>({getRootNode:n,getDocument:()=>Fe(n()),getWindow:()=>Se(n())}));return p(MS,{value:o,get children(){return[Q(()=>e.children),p(U,{get when(){return!e.value},get children(){return p(H.span,{hidden:!0,ref:r})}})]}})};var LS=Object.defineProperty,gt=(e,t)=>{for(var r in t)LS(e,r,{get:t[r],enumerable:!0})};var Ye=(e,t=[])=>({parts:(...r)=>{if($S(t))return Ye(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>Ye(e,[...t,...r]),omit:(...r)=>Ye(e,t.filter(n=>!r.includes(n))),rename:r=>Ye(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${_o(e)}"][data-part="${_o(n)}"]`,`& [data-scope="${_o(e)}"][data-part="${_o(n)}"]`].join(", "),attrs:{"data-scope":_o(e),"data-part":_o(n)}}}),{})}),_o=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),$S=e=>e.length===0;var FS=Ye("fieldset").parts("root","errorText","helperText","legend"),Mi=FS.build();var[Gm,Io]=Ne({hookName:"useFieldsetContext",providerName:"",strict:!1}),BS=e=>e.children(Io()),US=e=>{let t=Io(),r=V(()=>t().getErrorTextProps(),e);return p(U,{get when(){return t().invalid},get children(){return p(H.span,r)}})},VS=e=>{let t=Io(),r=V(()=>t().getHelperTextProps(),e);return p(H.span,r)},zS=e=>{let t=Io(),r=V(()=>t().getLegendProps(),e);return p(H.legend,r)},GS=e=>{let t=ot(),r=se({disabled:!1,invalid:!1},mt(e)),[n,o]=N(void 0),i=r.id??Ae(),a=`fieldset::${i}::legend`,s=`fieldset::${i}::error-text`,l=`fieldset::${i}::helper-text`,[c,d]=N(!1),[u,m]=N(!1);le(()=>{let v=n();if(!v)return;let C=()=>{let _=t().getRootNode();d(!!_.getElementById(s)),m(!!_.getElementById(l))};C();let b=t().getWindow(),T=new b.MutationObserver(C);T.observe(v,{childList:!0,subtree:!0}),re(()=>T.disconnect())});let f=K(()=>{let v=[];return c()&&r.invalid&&v.push(s),u()&&v.push(l),v}),h=()=>({...Mi.root.attrs,disabled:r.disabled,"data-disabled":te(r.disabled),"data-invalid":te(r.invalid),"aria-labelledby":a,"aria-describedby":f().join(" ")||void 0}),g=()=>({id:a,...Mi.legend.attrs,"data-disabled":te(r.disabled),"data-invalid":te(r.invalid)}),y=()=>({id:l,...Mi.helperText.attrs}),w=()=>({id:s,...Mi.errorText.attrs,"aria-live":"polite"});return K(()=>({refs:{rootRef:o},ids:{legend:a,errorText:s,helperText:l},disabled:r.disabled,invalid:r.invalid,getRootProps:h,getLegendProps:g,getHelperTextProps:y,getErrorTextProps:w}))},Hm=e=>{let[t,r]=_e()(e,["id","disabled","invalid"]),n=GS(t),o=V(()=>n().getRootProps(),r);return p(Gm,{value:n,get children(){return p(H.fieldset,se(o,{ref(i){var a=ur(n().refs.rootRef,e.ref);typeof a=="function"&&a(i)}}))}})};Hm.displayName="FieldsetRoot";var HS=e=>{let[{value:t},r]=_e()(e,["value"]),n=V(()=>t().getRootProps(),r);return p(Gm,{value:t,get children(){return p(H.fieldset,n)}})},jS={};gt(jS,{Context:()=>BS,ErrorText:()=>US,HelperText:()=>VS,Legend:()=>zS,Root:()=>Hm,RootProvider:()=>HS});var WS=Ye("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator"),Ar=WS.build();var jm=e=>{if(!e)return;let t=_t(e),r=Se(e),n=Fe(e),o=()=>{requestAnimationFrame(()=>{e.style.height="auto";let c;t.boxSizing==="content-box"?c=e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):c=e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!=="none"&&c>parseFloat(t.maxHeight)?(t.overflowY==="hidden"&&(e.style.overflowY="scroll"),c=parseFloat(t.maxHeight)):t.overflowY!=="hidden"&&(e.style.overflowY="hidden"),e.style.height=`${c}px`})};e.addEventListener("input",o),e.form?.addEventListener("reset",o);let i=Object.getPrototypeOf(e),a=Object.getOwnPropertyDescriptor(i,"value");a&&Object.defineProperty(e,"value",{...a,set(c){let d=a.get?.call(this);a.set?.call(this,c),o(),d!==c&&queueMicrotask(()=>{e.dispatchEvent(new r.InputEvent("input",{bubbles:!0}))})}});let s=new r.ResizeObserver(()=>{requestAnimationFrame(()=>o())});s.observe(e);let l=new r.MutationObserver(()=>o());return l.observe(e,{attributes:!0,attributeFilter:["rows","placeholder"]}),n.fonts?.addEventListener("loadingdone",o),()=>{e.removeEventListener("input",o),e.form?.removeEventListener("reset",o),n.fonts?.removeEventListener("loadingdone",o),s.disconnect(),l.disconnect()}};var[Wm,Yt]=Ne({hookName:"useFieldContext",providerName:"",strict:!1}),qS=e=>e.children(Yt()),KS=e=>{let t=Yt(),r=V(()=>t().getErrorTextProps(),e);return p(U,{get when(){return t?.().invalid},get children(){return p(H.span,r)}})},YS=e=>{let t=Yt(),r=V(()=>t().getHelperTextProps(),e);return p(H.span,r)},ZS=e=>{let t=Yt(),r=V(()=>t?.().getInputProps(),e);return p(H.input,r)},XS=e=>{let t=Yt(),r=V(()=>t?.().getLabelProps(),e);return p(H.label,r)},JS=e=>{let t=Yt(),r=V(()=>t().getRequiredIndicatorProps(),e);return p(U,{get when(){return t().required},get fallback(){return e.fallback},get children(){return p(H.span,se(r,{get children(){return e.children??"*"}}))}})},QS=e=>{let t=Io(),r=ot(),n=se({disabled:!!t?.().disabled,required:!1,invalid:!1,readOnly:!1},e),[o,i]=N(!1),[a,s]=N(!1),l=n.id??Ae(),[c,d]=N(void 0),u=n.ids?.control??`field::${l}`,m=n.ids?.errorText??`field::${l}::error-text`,f=n.ids?.helperText??`field::${l}::helper-text`,h=n.ids?.label??`field::${l}::label`;le(()=>{let A=c();if(!A)return;let $=()=>{let F=r().getRootNode();i(!!F.getElementById(m)),s(!!F.getElementById(f))};$();let W=r().getWindow(),I=new W.MutationObserver($);I.observe(A,{childList:!0,subtree:!0}),re(()=>I.disconnect())});let g=()=>({...Ar.root.attrs,id:u,role:"group","data-disabled":te(n.disabled),"data-invalid":te(n.invalid),"data-readonly":te(n.readOnly)}),y=()=>({...Ar.label.attrs,id:h,"data-disabled":te(n.disabled),"data-invalid":te(n.invalid),"data-readonly":te(n.readOnly),"data-required":te(n.required),htmlFor:l}),w=K(()=>{let A=[];return o()&&n.invalid&&A.push(m),a()&&A.push(f),A}),v=()=>({"aria-describedby":w().join(" ")||void 0,"aria-invalid":cr(n.invalid),"data-invalid":te(n.invalid),"data-required":te(n.required),"data-readonly":te(n.readOnly),id:l,required:n.required,disabled:n.disabled,readOnly:n.readOnly||void 0}),C=()=>({...v(),...Ar.input.attrs}),b=()=>({...v(),...Ar.textarea.attrs}),T=()=>({...v(),...Ar.select.attrs}),_=()=>({id:f,...Ar.helperText.attrs,"data-disabled":te(n.disabled)}),R=()=>({id:m,...Ar.errorText.attrs,"aria-live":"polite"}),P=()=>({"aria-hidden":!0,...Ar.requiredIndicator.attrs});return K(()=>({ariaDescribedby:w().join(" "),ids:{control:l,label:h,errorText:m,helperText:f},refs:{rootRef:d},disabled:n.disabled,invalid:n.invalid,readOnly:n.readOnly,required:n.required,getLabelProps:y,getRootProps:g,getInputProps:C,getTextareaProps:b,getSelectProps:T,getHelperTextProps:_,getErrorTextProps:R,getRequiredIndicatorProps:P}))},eE=e=>{let[t,r]=_e()(e,["id","ids","disabled","invalid","readOnly","required"]),n=QS(t),o=V(()=>n().getRootProps(),r);return p(Wm,{value:n,get children(){return p(H.div,se(o,{ref(i){var a=ur(n().refs.rootRef,e.ref);typeof a=="function"&&a(i)}}))}})},tE=e=>{let[{value:t},r]=_e()(e,["value"]),n=V(()=>t().getRootProps(),r);return p(Wm,{value:t,get children(){return p(H.div,n)}})},rE=e=>{let t=Yt(),r=V(()=>t?.().getSelectProps(),e);return p(H.select,r)},nE=e=>{let t=Yt(),r,[n,o]=Ve(e,["autoresize"]),i=V(()=>t?.().getTextareaProps(),()=>({style:{resize:n.autoresize?"none":void 0}}),o);return le(()=>{if(!n.autoresize)return;let a=jm(r);re(()=>a?.())}),p(H.textarea,se(i,{ref(a){var s=ur(l=>r=l,e.ref);typeof s=="function"&&s(a)}}))},oE={};gt(oE,{Context:()=>qS,ErrorText:()=>KS,HelperText:()=>YS,Input:()=>ZS,Label:()=>XS,RequiredIndicator:()=>JS,Root:()=>eE,RootProvider:()=>tE,Select:()=>rE,Textarea:()=>nE});function qm(e){let t={each(r){for(let n=0;n{try{i.document.addEventListener(r,n,o)}catch{}}),()=>{try{t.removeEventListener(r,n,o)}catch{}}},removeEventListener(r,n,o){t.each(i=>{try{i.document.removeEventListener(r,n,o)}catch{}})}};return t}function Km(e){let t=e.frameElement!=null?e.parent:null;return{addEventListener:(r,n,o)=>{try{t?.addEventListener(r,n,o)}catch{}return()=>{try{t?.removeEventListener(r,n,o)}catch{}}},removeEventListener:(r,n,o)=>{try{t?.removeEventListener(r,n,o)}catch{}}}}var Ym="pointerdown.outside",Zm="focus.outside";function iE(e){for(let t of e)if(Me(t)&&Nt(t))return!0;return!1}var Qm=e=>"clientY"in e;function aE(e,t){if(!Qm(t)||!e)return!1;let r=e.getBoundingClientRect();return r.width===0||r.height===0?!1:r.top<=t.clientY&&t.clientY<=r.top+r.height&&r.left<=t.clientX&&t.clientX<=r.left+r.width}function sE(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Xm(e,t){if(!t||!Qm(e))return!1;let r=t.scrollHeight>t.clientHeight,n=r&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,i=o&&e.clientY>t.offsetTop+t.clientHeight,a={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(r?16:0),height:t.clientHeight+(o?16:0)},s={x:e.clientX,y:e.clientY};return sE(a,s)?n||i:!1}function lE(e,t){let{exclude:r,onFocusOutside:n,onPointerDownOutside:o,onInteractOutside:i,defer:a,followControlledElements:s=!0}=t;if(!e)return;let l=Fe(e),c=Se(e),d=qm(c),u=Km(c);function m(C,b){if(!Me(b)||!b.isConnected||nt(e,b)||aE(e,C)||s&&os(e,b))return!1;let T=l.querySelector(`[aria-controls="${e.id}"]`);if(T){let R=ds(T);if(Xm(C,R))return!1}let _=ds(e);return Xm(C,_)?!1:!r?.(b)}let f=new Set,h=In(e?.getRootNode());function g(C){function b(T){let _=a&&!Mc()?pe:A=>A(),R=T??C,P=R?.composedPath?.()??[R?.target];_(()=>{let A=h?P[0]:Be(C);if(!(!e||!m(C,A))){if(o||i){let $=Ir(o,i);e.addEventListener(Ym,$,{once:!0})}Jm(e,Ym,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:ss(R),focusable:iE(P),target:A}})}})}C.pointerType==="touch"?(f.forEach(T=>T()),f.add(Te(l,"click",b,{once:!0})),f.add(u.addEventListener("click",b,{once:!0})),f.add(d.addEventListener("click",b,{once:!0}))):b()}let y=new Set,w=setTimeout(()=>{y.add(Te(l,"pointerdown",g,!0)),y.add(u.addEventListener("pointerdown",g,!0)),y.add(d.addEventListener("pointerdown",g,!0))},0);function v(C){(a?pe:T=>T())(()=>{let T=C?.composedPath?.()??[C?.target],_=h?T[0]:Be(C);if(!(!e||!m(C,_))){if(n||i){let R=Ir(n,i);e.addEventListener(Zm,R,{once:!0})}Jm(e,Zm,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Nt(_),target:_}})}})}return Mc()||(y.add(Te(l,"focusin",v,!0)),y.add(u.addEventListener("focusin",v,!0)),y.add(d.addEventListener("focusin",v,!0))),()=>{clearTimeout(w),f.forEach(C=>C()),y.forEach(C=>C())}}function eg(e,t){let{defer:r}=t,n=r?pe:i=>i(),o=[];return o.push(n(()=>{let i=typeof e=="function"?e():e;o.push(lE(i,t))})),()=>{o.forEach(i=>i?.())}}function Jm(e,t,r){let n=e.ownerDocument.defaultView||window,o=new n.CustomEvent(t,r);return e.dispatchEvent(o)}var cE=Ye("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),tn=cE.build();var tg=e=>`toast-group:${e}`,Yc=(e,t)=>e.getById(`toast-group:${t}`),Zc=e=>`toast:${e.id}`,Xc=e=>e.getById(Zc(e)),Jc=e=>`toast:${e.id}:title`,Qc=e=>`toast:${e.id}:description`,rg=e=>`toast${e.id}:close`;var ng={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function bs(e,t){return e??ng[t]??ng.DEFAULT}var dE=e=>typeof e=="string"?{left:e,right:e,bottom:e,top:e}:e;function og(e,t){let{prop:r,computed:n,context:o}=e,{offsets:i,gap:a}=r("store").attrs,s=o.get("heights"),l=dE(i),c=r("dir")==="rtl",d=t.replace("-start",c?"-right":"-left").replace("-end",c?"-left":"-right"),u=d.includes("right"),m=d.includes("left"),f={position:"fixed",pointerEvents:n("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${a}px`,"--first-height":`${s[0]?.height||0}px`,"--viewport-offset-left":l.left,"--viewport-offset-right":l.right,"--viewport-offset-top":l.top,"--viewport-offset-bottom":l.bottom,zIndex:Ii},h="center";if(u&&(h="flex-end"),m&&(h="flex-start"),f.alignItems=h,d.includes("top")){let g=l.top;f.top=`max(env(safe-area-inset-top, 0px), ${g})`}if(d.includes("bottom")){let g=l.bottom;f.bottom=`max(env(safe-area-inset-bottom, 0px), ${g})`}if(!d.includes("left")){let g=l.right;f.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${g})`}if(!d.includes("right")){let g=l.left;f.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${g})`}return f}function ig(e,t){let{prop:r,context:n,computed:o}=e,i=r("parent"),a=i.computed("placement"),{gap:s}=i.prop("store").attrs,[l]=a.split("-"),c=n.get("mounted"),d=n.get("remainingTime"),u=o("height"),m=o("frontmost"),f=!m,h=!r("stacked"),g=r("stacked"),w=r("type")==="loading"?Number.MAX_SAFE_INTEGER:d,v=o("heightIndex")*s+o("heightBefore"),C={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${r("removeDelay")}ms`,"--duration":`${w}ms`,"--initial-height":`${u}px`,"--offset":`${v}px`,"--index":r("index"),"--z-index":o("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},b=T=>Object.assign(C,T);return l==="top"?b({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):l==="bottom"&&b({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),c&&(b({"--y":"0","--opacity":"1"}),g&&b({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||b({"--opacity":"0",pointerEvents:"none"}),f&&h&&(b({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||b({"--y":"calc(var(--sign) * 40%)"})),f&&g&&!t&&b({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),m&&!t&&b({"--y":"calc(var(--lift) * -100%)"}),C}function ag(e,t){let{computed:r}=e,n={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},o=i=>Object.assign(n,i);return r("frontmost")&&!t&&o({height:"calc(var(--initial-height) + 80%)"}),n}function sg(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function lg(e,t){let{context:r,prop:n,send:o,refs:i,computed:a}=e;return{getCount(){return r.get("toasts").length},getToasts(){return r.get("toasts")},getGroupProps(s={}){let{label:l="Notifications"}=s,{hotkey:c}=n("store").attrs,d=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),u=a("placement"),[m,f="center"]=u.split("-");return t.element({...tn.group.attrs,dir:n("dir"),tabIndex:-1,"aria-label":`${u} ${l} ${d}`,id:tg(u),"data-placement":u,"data-side":m,"data-align":f,"aria-live":"polite",role:"region",style:og(e,u),onMouseEnter(){i.get("ignoreMouseTimer").isActive()||o({type:"REGION.POINTER_ENTER",placement:u})},onMouseMove(){i.get("ignoreMouseTimer").isActive()||o({type:"REGION.POINTER_ENTER",placement:u})},onMouseLeave(){i.get("ignoreMouseTimer").isActive()||o({type:"REGION.POINTER_LEAVE",placement:u})},onFocus(h){o({type:"REGION.FOCUS",target:h.relatedTarget})},onBlur(h){i.get("isFocusWithin")&&!nt(h.currentTarget,h.relatedTarget)&&queueMicrotask(()=>o({type:"REGION.BLUR"}))}})},subscribe(s){return n("store").subscribe(()=>s(r.get("toasts")))}}}function cg(e,t){let r=n=>{n.key==="Escape"&&(n.isComposing||t?.(n))};return Te(Fe(e),"keydown",r,{capture:!0})}var dg="layer:request-dismiss",ht={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){let t=this.indexOf(e),r=this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1;return tt.type===e)},getNestedLayersByType(e,t){let r=this.indexOf(e);return r===-1?[]:this.layers.slice(r+1).filter(n=>n.type===t)},getParentLayerOfType(e,t){let r=this.indexOf(e);if(!(r<=0))return this.layers.slice(0,r).reverse().find(n=>n.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(n=>nt(n.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>nt(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.recentlyRemoved.add(e),Co(()=>this.recentlyRemoved.delete(e)),tht.dismiss(n.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);let n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let r=this.indexOf(e);if(r===-1)return;let n=this.layers[r];pE(e,dg,o=>{n.requestDismiss?.(o),o.defaultPrevented||n?.dismiss()}),uE(e,dg,{originalLayer:e,targetLayer:t,originalIndex:r,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function uE(e,t,r){let n=e.ownerDocument.defaultView||window,o=new n.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:r});return e.dispatchEvent(o)}function pE(e,t,r){e.addEventListener(t,r,{once:!0})}var ug;function ed(){ht.layers.forEach(({node:e})=>{e.style.pointerEvents=ht.isBelowPointerBlockingLayer(e)?"none":"auto"})}function pg(e){e.style.pointerEvents=""}function fg(e,t){let r=Fe(e),n=[];return ht.hasPointerBlockingLayer()&&!r.body.hasAttribute("data-inert")&&(ug=document.body.style.pointerEvents,queueMicrotask(()=>{r.body.style.pointerEvents="none",r.body.setAttribute("data-inert","")})),t?.forEach(o=>{let[i,a]=Dm(()=>{let s=o();return Me(s)?s:null},{timeout:1e3});i.then(s=>n.push(Rn(s,{pointerEvents:"auto"}))),n.push(a)}),()=>{ht.hasPointerBlockingLayer()||(queueMicrotask(()=>{r.body.style.pointerEvents=ug,r.body.removeAttribute("data-inert"),r.body.style.length===0&&r.body.removeAttribute("style")}),n.forEach(o=>o()))}}function fE(e,t){let{warnOnMissingNode:r=!0}=t;if(r&&!e){Xr("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:n,onRequestDismiss:o,pointerBlocking:i,exclude:a,debug:s,type:l="dialog"}=t,c={dismiss:n,node:e,type:l,pointerBlocking:i,requestDismiss:o};ht.add(c),ed();function d(g){let y=Be(g.detail.originalEvent);ht.isBelowPointerBlockingLayer(e)||ht.isInBranch(y)||(t.onPointerDownOutside?.(g),t.onInteractOutside?.(g),!g.defaultPrevented&&(s&&console.log("onPointerDownOutside:",g.detail.originalEvent),n?.()))}function u(g){let y=Be(g.detail.originalEvent);ht.isInBranch(y)||(t.onFocusOutside?.(g),t.onInteractOutside?.(g),!g.defaultPrevented&&(s&&console.log("onFocusOutside:",g.detail.originalEvent),n?.()))}function m(g){ht.isTopMost(e)&&(t.onEscapeKeyDown?.(g),!g.defaultPrevented&&n&&(g.preventDefault(),n()))}function f(g){if(!e)return!1;let y=typeof a=="function"?a():a,w=Array.isArray(y)?y:[y],v=t.persistentElements?.map(C=>C()).filter(Me);return v&&w.push(...v),w.some(C=>nt(C,g))||ht.isInNestedLayer(e,g)}let h=[i?fg(e,t.persistentElements):void 0,cg(e,m),eg(e,{exclude:f,onFocusOutside:u,onPointerDownOutside:d,defer:t.defer})];return()=>{ht.remove(e),ed(),pg(e),h.forEach(g=>g?.())}}function ys(e,t){let{defer:r}=t,n=r?pe:i=>i(),o=[];return o.push(n(()=>{let i=ft(e)?e():e;o.push(fE(i,t))})),()=>{o.forEach(i=>i?.())}}function mg(e,t={}){let{defer:r}=t,n=r?pe:i=>i(),o=[];return o.push(n(()=>{let i=ft(e)?e():e;if(!i){Xr("[@zag-js/dismissable] branch node is `null` or `undefined`");return}ht.addBranch(i),o.push(()=>{ht.removeBranch(i)})})),()=>{o.forEach(i=>i?.())}}var{guards:mE,createMachine:gE}=es(),{and:hE}=mE,gg=gE({props({props:e}){return{dir:"ltr",id:qa(),...e,store:e.store}},initialState({prop:e}){return e("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:Bc.create(),dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:t=>t.map(r=>r.id).join(",")})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get("toasts").length,overlap:({prop:e})=>e("store").attrs.overlap,placement:({prop:e})=>e("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:e,context:t,action:r}){e([()=>t.hash("toasts")],()=>{queueMicrotask(()=>{r(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl","clearMouseEventTimer"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:hE("isOverlapping","isPointerOut"),target:"overlap",actions:["collapseToasts","resumeToasts","restoreFocusIfPointerOut"]},{guard:"isPointerOut",target:"stack",actions:["resumeToasts","restoreFocusIfPointerOut"]},{actions:["clearFocusWithin"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight","ignoreMouseEventsTemporarily"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["clearPointerWithin","resumeToasts","collapseToasts"]},{actions:["clearPointerWithin","resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["setPointerWithin","pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["setPointerWithin","pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e("overlap"),isPointerOut:({refs:e})=>!e.get("isPointerWithin")},effects:{subscribeToStore({context:e,prop:t}){let r=t("store");return e.set("toasts",r.getVisibleToasts()),r.subscribe(n=>{if(n.dismiss){e.set("toasts",o=>o.filter(i=>i.id!==n.id));return}e.set("toasts",o=>{let i=o.findIndex(a=>a.id===n.id);return i!==-1?[...o.slice(0,i),{...o[i],...n},...o.slice(i+1)]:[n,...o]})})},trackHotKeyPress({prop:e,send:t}){return Te(document,"keydown",n=>{let{hotkey:o}=e("store").attrs;o.every(a=>n[a]||n.code===a)&&t({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:r}){let{pauseOnPageIdle:n}=e("store").attrs;if(!n)return;let o=r.getDoc();return Te(o,"visibilitychange",()=>{let i=o.visibilityState==="hidden";t({type:i?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:r,scope:n}){let o=t.get("toasts"),i=r("placement"),a=o.length>0;if(!a){e.get("dismissableCleanup")?.();return}if(a&&e.get("dismissableCleanup"))return;let l=mg(()=>Yc(n,i),{defer:!0});e.set("dismissableCleanup",l)},clearDismissableBranch({refs:e}){e.get("dismissableCleanup")?.()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{Yc(e,t("placement"))?.focus()})},pauseToasts({prop:e}){e("store").pause()},resumeToasts({prop:e}){e("store").resume()},expandToasts({prop:e}){e("store").expand()},collapseToasts({prop:e}){e("store").collapse()},removeToast({prop:e,event:t}){e("store").remove(t.id)},removeHeight({event:e,context:t}){e?.id!=null&&queueMicrotask(()=>{t.set("heights",r=>r.filter(n=>n.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t("overlap")||t("count")>1||e({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:e,event:t}){e.get("isFocusWithin")||!t.target||(e.set("isFocusWithin",!0),e.set("lastFocusedEl",t.target))},restoreFocusIfPointerOut({refs:e}){!e.get("lastFocusedEl")||e.get("isPointerWithin")||(e.get("lastFocusedEl")?.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},setPointerWithin({refs:e}){e.set("isPointerWithin",!0)},clearPointerWithin({refs:e}){e.set("isPointerWithin",!1),e.get("lastFocusedEl")&&!e.get("isFocusWithin")&&(e.get("lastFocusedEl")?.focus({preventScroll:!0}),e.set("lastFocusedEl",null))},clearFocusWithin({refs:e}){e.set("isFocusWithin",!1)},clearLastFocusedEl({refs:e}){e.get("lastFocusedEl")&&(e.get("lastFocusedEl")?.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},ignoreMouseEventsTemporarily({refs:e}){e.get("ignoreMouseTimer").request()},clearMouseEventTimer({refs:e}){e.get("ignoreMouseTimer").cancel()}}}});function td(e,t){let{state:r,send:n,prop:o,scope:i,context:a,computed:s}=e,l=r.hasTag("visible"),c=r.hasTag("paused"),d=a.get("mounted"),u=s("frontmost"),m=o("parent").computed("placement"),f=o("type"),h=o("stacked"),g=o("title"),y=o("description"),w=o("action"),[v,C="center"]=m.split("-");return{type:f,title:g,description:y,placement:m,visible:l,paused:c,closable:!!o("closable"),pause(){n({type:"PAUSE"})},resume(){n({type:"RESUME"})},dismiss(){n({type:"DISMISS",src:"programmatic"})},getRootProps(){return t.element({...tn.root.attrs,dir:o("dir"),id:Zc(i),"data-state":l?"open":"closed","data-type":f,"data-placement":m,"data-align":C,"data-side":v,"data-mounted":te(d),"data-paused":te(c),"data-first":te(u),"data-sibling":te(!u),"data-stack":te(h),"data-overlap":te(!h),role:"status","aria-atomic":"true","aria-describedby":y?Qc(i):void 0,"aria-labelledby":g?Jc(i):void 0,tabIndex:0,style:ig(e,l),onKeyDown(b){b.defaultPrevented||b.key=="Escape"&&(n({type:"DISMISS",src:"keyboard"}),b.preventDefault())}})},getGhostBeforeProps(){return t.element({"data-ghost":"before",style:ag(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":"after",style:sg()})},getTitleProps(){return t.element({...tn.title.attrs,id:Jc(i)})},getDescriptionProps(){return t.element({...tn.description.attrs,id:Qc(i)})},getActionTriggerProps(){return t.button({...tn.actionTrigger.attrs,type:"button",onClick(b){b.defaultPrevented||(w?.onClick?.(),n({type:"DISMISS",src:"user"}))}})},getCloseTriggerProps(){return t.button({id:rg(i),...tn.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(b){b.defaultPrevented||n({type:"DISMISS",src:"user"})}})}}}var{not:bE}=Ei(),rd=Ot({props({props:e}){return Xa(e,["id","type","parent","removeDelay"],"toast"),{closable:!0,...e,duration:bs(e.duration,e.type)}},initialState({prop:e}){return e("type")==="loading"||e("duration")===1/0?"visible:persist":"visible"},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:bs(e("duration"),e("type"))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{let t=e("parent").context.get("toasts"),r=t.findIndex(n=>n.id===e("id"));return t.length-r},height:({prop:e})=>e("parent").context.get("heights").find(n=>n.id===e("id"))?.height??0,heightIndex:({prop:e})=>e("parent").context.get("heights").findIndex(r=>r.id===e("id")),frontmost:({prop:e})=>e("index")===0,heightBefore:({prop:e})=>{let t=e("parent").context.get("heights"),r=t.findIndex(n=>n.id===e("id"));return t.reduce((n,o,i)=>i>=r?n:n+o.height,0)},shouldPersist:({prop:e})=>e("type")==="loading"||e("duration")===1/0},watch({track:e,prop:t,send:r}){e([()=>t("message")],()=>{let n=t("message");n&&r({type:n,src:"programmatic"})}),e([()=>t("type"),()=>t("duration")],()=>{r({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:bE("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return Za(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay"))},waitForDuration({send:e,context:t,computed:r}){if(!r("shouldPersist"))return Za(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick({send:e}){return Za(()=>{e({type:"SHOW",src:"timer"})},0)},trackHeight({scope:e,prop:t}){let r;return pe(()=>{let n=Xc(e);if(!n)return;let o=()=>{let s=n.style.height;n.style.height="auto";let l=n.getBoundingClientRect().height;n.style.height=s;let c={id:t("id"),height:l};hg(t("parent"),c)},i=e.getWin(),a=new i.MutationObserver(o);a.observe(n,{childList:!0,subtree:!0,characterData:!0}),r=()=>a.disconnect()}),()=>r?.()}},guards:{isLoadingType:({prop:e})=>e("type")==="loading",shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){pe(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:r}){queueMicrotask(()=>{let n=Xc(e);if(!n)return;let o=n.style.height;n.style.height="auto";let i=n.getBoundingClientRect().height;n.style.height=o,r.set("initialHeight",i);let a={id:t("id"),height:i};hg(t("parent"),a)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:r}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",bs(r("duration"),r("type")))},syncRemainingTime({context:e,refs:t}){e.set("remainingTime",r=>{let n=t.get("closeTimerStartTime"),o=Date.now()-n;return t.set("lastCloseStartTimerStartTime",Date.now()),r-o})},notifyParentToRemove({prop:e}){e("parent").send({type:"TOAST.REMOVE",id:e("id")})},invokeOnDismiss({prop:e,event:t}){e("onStatusChange")?.({status:"dismissing",src:t.src})},invokeOnUnmount({prop:e}){e("onStatusChange")?.({status:"unmounted"})},invokeOnVisible({prop:e}){e("onStatusChange")?.({status:"visible"})}}}});function hg(e,t){let{id:r,height:n}=t;e.context.set("heights",o=>o.find(a=>a.id===r)?o.map(a=>a.id===r?{...a,height:n}:a):[{id:r,height:n},...o])}var yE=(e,t)=>({...t,...En(e)});function nd(e={}){let t=yE(e,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0}),r=[],n=[],o=new Set,i=[],a=I=>(r.push(I),()=>{let F=r.indexOf(I);r.splice(F,1)}),s=I=>(r.forEach(F=>F(I)),I),l=I=>{if(n.length>=t.max){i.push(I);return}s(I),n.unshift(I)},c=()=>{for(;i.length>0&&n.length{let F=I.id??`toast:${qa()}`,O=n.find(L=>L.id===F);return o.has(F)&&o.delete(F),O?n=n.map(L=>L.id===F?s({...L,...I,id:F}):L):l({id:F,duration:t.duration,removeDelay:t.removeDelay,type:"info",...I,stacked:!t.overlap,gap:t.gap}),F},u=I=>(o.add(I),I?(r.forEach(F=>F({id:I,dismiss:!0})),n=n.filter(F=>F.id!==I),c()):(n.forEach(F=>{r.forEach(O=>O({id:F.id,dismiss:!0}))}),n=[],i=[]),I);return{attrs:t,subscribe:a,create:d,update:(I,F)=>d({id:I,...F}),remove:u,dismiss:I=>{I!=null?n=n.map(F=>F.id===I?s({...F,message:"DISMISS"}):F):n=n.map(F=>s({...F,message:"DISMISS"}))},error:I=>d({...I,type:"error"}),success:I=>d({...I,type:"success"}),info:I=>d({...I,type:"info"}),warning:I=>d({...I,type:"warning"}),loading:I=>d({...I,type:"loading"}),getVisibleToasts:()=>n.filter(I=>!o.has(I.id)),getCount:()=>n.length,promise:(I,F,O={})=>{if(!F||!F.loading){Xr("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}let L=d({...O,...F.loading,promise:I,type:"loading"}),B=!0,Y,M=ki(I).then(async Ie=>{if(Y=["resolve",Ie],vE(Ie)&&!Ie.ok){B=!1;let ge=ki(F.error,`HTTP Error! status: ${Ie.status}`);d({...O,...ge,id:L,type:"error"})}else if(F.success!==void 0){B=!1;let ge=ki(F.success,Ie);d({...O,...ge,id:L,type:"success"})}}).catch(async Ie=>{if(Y=["reject",Ie],F.error!==void 0){B=!1;let ge=ki(F.error,Ie);d({...O,...ge,id:L,type:"error"})}}).finally(()=>{B&&u(L),F.finally?.()});return{id:L,unwrap:()=>new Promise((Ie,ge)=>M.then(()=>Y[0]==="reject"?ge(Y[1]):Ie(Y[1])).catch(ge))}},pause:I=>{I!=null?n=n.map(F=>F.id===I?s({...F,message:"PAUSE"}):F):n=n.map(F=>s({...F,message:"PAUSE"}))},resume:I=>{I!=null?n=n.map(F=>F.id===I?s({...F,message:"RESUME"}):F):n=n.map(F=>s({...F,message:"RESUME"}))},isVisible:I=>!o.has(I)&&!!n.find(F=>F.id===I),isDismissed:I=>o.has(I),expand:()=>{n=n.map(I=>s({...I,stacked:!0}))},collapse:()=>{n=n.map(I=>s({...I,stacked:!1}))}}}var vE=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number";var od={connect:lg,machine:gg};var id=e=>nd(e),[xE,Dn]=Ne({hookName:"useToastContext",providerName:""}),bg=e=>{let t=Dn(),r=V(()=>t().getActionTriggerProps(),e);return p(H.button,r)},yg=e=>{let t=Dn(),r=V(()=>t().getCloseTriggerProps(),e);return p(H.button,r)},vg=e=>e.children(Dn()),wg=e=>{let t=Dn(),r=V(()=>t().getDescriptionProps(),e);return p(H.div,r)},xg=e=>{let t=Dn(),r=V(()=>t().getRootProps(),e);return p(H.div,se(r,{get children(){return[p(H.div,se(()=>t().getGhostBeforeProps())),Q(()=>e.children),p(H.div,se(()=>t().getGhostAfterProps()))]}}))},Tg=e=>{let t=Dn(),r=V(()=>t().getTitleProps(),e);return p(H.div,r)},ad=e=>{let[t,r]=Ve(e,["toaster","children"]),n=Ut(),o=ot(),i=wt(od.machine,()=>({store:t.toaster,id:Ae(),dir:n()?.dir,getRootNode:o()?.getRootNode})),a=K(()=>od.connect(i,xt)),s=K(()=>a().getToasts()),l=V(()=>a().getGroupProps(),r);return p(H.div,se(l,{get children(){return p(Hc,{get each(){return s()},by:"id",children:(c,d)=>p(TE,{value:c,index:d,parent:i,children:u=>t.children(u)})})}}))},TE=e=>{let t=ot(),r=K(()=>({...e.value(),parent:e.parent,index:e.index(),getRootNode:t().getRootNode})),n=wt(rd,r),o=K(()=>td(n,xt));return p(xE,{value:o,get children(){return e.children(e.value)}})},Mn={};gt(Mn,{ActionTrigger:()=>bg,CloseTrigger:()=>yg,Context:()=>vg,Description:()=>wg,Root:()=>xg,Title:()=>Tg});function kE(e){return!(e.metaKey||!An()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var CE=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function SE(e,t,r){let n=r?Be(r):null,o=Fe(n),i=Se(n),a=dr(o);return e=e||a instanceof i.HTMLInputElement&&!CE.has(a?.type)||a instanceof i.HTMLTextAreaElement||a instanceof i.HTMLElement&&a.isContentEditable,!(e&&t==="keyboard"&&r instanceof i.KeyboardEvent&&!Reflect.has(EE,r.key))}var Rr=null,sd=new Set,vs=new Map,Ln=!1,ld=!1,Cg=!1,EE={Tab:!0,Escape:!0};function xs(e,t){for(let r of sd)r(e,t)}function ws(e){Ln=!0,kE(e)&&(Rr="keyboard",xs("keyboard",e))}function Vt(e){Rr="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Ln=!0,xs("pointer",e))}function Sg(e){fm(e)&&(Ln=!0,Rr="virtual")}function Eg(e){let t=Be(e);t===Se(t)||t===Fe(t)||Cg||!e.isTrusted||(!Ln&&!ld&&(Rr="virtual",xs("virtual",e)),Ln=!1,ld=!1)}function Pg(){Cg||(Ln=!1,ld=!0)}function PE(e){if(typeof window>"u"||vs.get(Se(e)))return;let t=Se(e),r=Fe(e),n=t.HTMLElement.prototype.focus;function o(){Ln=!0,n.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:o})}catch{}r.addEventListener("keydown",ws,!0),r.addEventListener("keyup",ws,!0),r.addEventListener("click",Sg,!0),t.addEventListener("focus",Eg,!0),t.addEventListener("blur",Pg,!1),typeof t.PointerEvent<"u"?(r.addEventListener("pointerdown",Vt,!0),r.addEventListener("pointermove",Vt,!0),r.addEventListener("pointerup",Vt,!0)):(r.addEventListener("mousedown",Vt,!0),r.addEventListener("mousemove",Vt,!0),r.addEventListener("mouseup",Vt,!0)),t.addEventListener("beforeunload",()=>{_E(e)},{once:!0}),vs.set(t,{focus:n})}var _E=(e,t)=>{let r=Se(e),n=Fe(e);t&&n.removeEventListener("DOMContentLoaded",t);let o=vs.get(r);if(o){try{Object.defineProperty(r.HTMLElement.prototype,"focus",{configurable:!0,value:o.focus})}catch{}n.removeEventListener("keydown",ws,!0),n.removeEventListener("keyup",ws,!0),n.removeEventListener("click",Sg,!0),r.removeEventListener("focus",Eg,!0),r.removeEventListener("blur",Pg,!1),typeof r.PointerEvent<"u"?(n.removeEventListener("pointerdown",Vt,!0),n.removeEventListener("pointermove",Vt,!0),n.removeEventListener("pointerup",Vt,!0)):(n.removeEventListener("mousedown",Vt,!0),n.removeEventListener("mousemove",Vt,!0),n.removeEventListener("mouseup",Vt,!0)),vs.delete(r)}};function _g(){return Rr}function Ig(e){Rr=e,xs(e,null)}function kg(){return Rr==="keyboard"||Rr==="virtual"}function Ag(e={}){let{isTextInput:t,autoFocus:r,onChange:n,root:o}=e;PE(o),n?.({isFocusVisible:r||kg(),modality:Rr});let i=(a,s)=>{SE(!!t,a,s)&&n?.({isFocusVisible:kg(),modality:a})};return sd.add(i),()=>{sd.delete(i)}}var Ng=["top","right","bottom","left"];var pr=Math.min,Tt=Math.max,$i=Math.round,Fi=Math.floor,Zt=e=>({x:e,y:e}),IE={left:"right",right:"left",bottom:"top",top:"bottom"};function ks(e,t,r){return Tt(e,pr(t,r))}function fr(e,t){return typeof e=="function"?e(t):e}function mr(e){return e.split("-")[0]}function $n(e){return e.split("-")[1]}function Cs(e){return e==="x"?"y":"x"}function Ss(e){return e==="y"?"height":"width"}function Xt(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Es(e){return Cs(Xt(e))}function Dg(e,t,r){r===void 0&&(r=!1);let n=$n(e),o=Es(e),i=Ss(o),a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Li(a)),[a,Li(a)]}function Mg(e){let t=Li(e);return[Ts(e),t,Ts(t)]}function Ts(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Rg=["left","right"],Og=["right","left"],AE=["top","bottom"],RE=["bottom","top"];function OE(e,t,r){switch(e){case"top":case"bottom":return r?t?Og:Rg:t?Rg:Og;case"left":case"right":return t?AE:RE;default:return[]}}function Lg(e,t,r,n){let o=$n(e),i=OE(mr(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ts)))),i}function Li(e){let t=mr(e);return IE[t]+e.slice(t.length)}function NE(e){return{top:0,right:0,bottom:0,left:0,...e}}function cd(e){return typeof e!="number"?NE(e):{top:e,right:e,bottom:e,left:e}}function Fn(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function $g(e,t,r){let{reference:n,floating:o}=e,i=Xt(t),a=Es(t),s=Ss(a),l=mr(t),c=i==="y",d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,m=n[s]/2-o[s]/2,f;switch(l){case"top":f={x:d,y:n.y-o.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-o.width,y:u};break;default:f={x:n.x,y:n.y}}switch($n(t)){case"start":f[a]-=m*(r&&c?-1:1);break;case"end":f[a]+=m*(r&&c?-1:1);break}return f}async function Ug(e,t){var r;t===void 0&&(t={});let{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=fr(t,e),h=cd(f),y=s[m?u==="floating"?"reference":"floating":u],w=Fn(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),v=u==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},T=Fn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:C,strategy:l}):v);return{top:(w.top-T.top+h.top)/b.y,bottom:(T.bottom-w.bottom+h.bottom)/b.y,left:(w.left-T.left+h.left)/b.x,right:(T.right-w.right+h.right)/b.x}}var DE=50,Vg=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=a.detectOverflow?a:{...a,detectOverflow:Ug},l=await(a.isRTL==null?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=$g(c,n,l),m=n,f=0,h={};for(let g=0;g({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=fr(e,t)||{};if(c==null)return{};let u=cd(d),m={x:r,y:n},f=Es(o),h=Ss(f),g=await a.getDimensions(c),y=f==="y",w=y?"top":"left",v=y?"bottom":"right",C=y?"clientHeight":"clientWidth",b=i.reference[h]+i.reference[f]-m[f]-i.floating[h],T=m[f]-i.reference[f],_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c)),R=_?_[C]:0;(!R||!await(a.isElement==null?void 0:a.isElement(_)))&&(R=s.floating[C]||i.floating[h]);let P=b/2-T/2,A=R/2-g[h]/2-1,$=pr(u[w],A),W=pr(u[v],A),I=$,F=R-g[h]-W,O=R/2-g[h]/2+P,L=ks(I,O,F),B=!l.arrow&&$n(o)!=null&&O!==L&&i.reference[h]/2-(OO<=0)){var W,I;let O=(((W=i.flip)==null?void 0:W.index)||0)+1,L=R[O];if(L&&(!(u==="alignment"?v!==Xt(L):!1)||$.every(M=>Xt(M.placement)===v?M.overflows[0]>0:!0)))return{data:{index:O,overflows:$},reset:{placement:L}};let B=(I=$.filter(Y=>Y.overflows[0]<=0).sort((Y,M)=>Y.overflows[1]-M.overflows[1])[0])==null?void 0:I.placement;if(!B)switch(f){case"bestFit":{var F;let Y=(F=$.filter(M=>{if(_){let Ce=Xt(M.placement);return Ce===v||Ce==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(Ce=>Ce>0).reduce((Ce,Ie)=>Ce+Ie,0)]).sort((M,Ce)=>M[1]-Ce[1])[0])==null?void 0:F[0];Y&&(B=Y);break}case"initialPlacement":B=s;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function Fg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bg(e){return Ng.some(t=>e[t]>=0)}var Hg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:n}=t,{strategy:o="referenceHidden",...i}=fr(e,t);switch(o){case"referenceHidden":{let a=await n.detectOverflow(t,{...i,elementContext:"reference"}),s=Fg(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Bg(s)}}}case"escaped":{let a=await n.detectOverflow(t,{...i,altBoundary:!0}),s=Fg(a,r.floating);return{data:{escapedOffsets:s,escaped:Bg(s)}}}default:return{}}}}};var jg=new Set(["left","top"]);async function ME(e,t){let{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=mr(r),s=$n(r),l=Xt(r)==="y",c=jg.has(a)?-1:1,d=i&&l?-1:1,u=fr(t,e),{mainAxis:m,crossAxis:f,alignmentAxis:h}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*d,y:m*c}:{x:m*c,y:f*d}}var Wg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:i,placement:a,middlewareData:s}=t,l=await ME(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},qg=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:w=>{let{x:v,y:C}=w;return{x:v,y:C}}},...c}=fr(e,t),d={x:r,y:n},u=await i.detectOverflow(t,c),m=Xt(mr(o)),f=Cs(m),h=d[f],g=d[m];if(a){let w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",C=h+u[w],b=h-u[v];h=ks(C,h,b)}if(s){let w=m==="y"?"top":"left",v=m==="y"?"bottom":"right",C=g+u[w],b=g-u[v];g=ks(C,g,b)}let y=l.fn({...t,[f]:h,[m]:g});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[f]:a,[m]:s}}}}}},Kg=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=fr(e,t),d={x:r,y:n},u=Xt(o),m=Cs(u),f=d[m],h=d[u],g=fr(s,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){let C=m==="y"?"height":"width",b=i.reference[m]-i.floating[C]+y.mainAxis,T=i.reference[m]+i.reference[C]-y.mainAxis;fT&&(f=T)}if(c){var w,v;let C=m==="y"?"width":"height",b=jg.has(mr(o)),T=i.reference[u]-i.floating[C]+(b&&((w=a.offset)==null?void 0:w[u])||0)+(b?0:y.crossAxis),_=i.reference[u]+i.reference[C]+(b?0:((v=a.offset)==null?void 0:v[u])||0)-(b?y.crossAxis:0);h_&&(h=_)}return{[m]:f,[u]:h}}}},Yg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=fr(e,t),d=await a.detectOverflow(t,c),u=mr(o),m=$n(o),f=Xt(o)==="y",{width:h,height:g}=i.floating,y,w;u==="top"||u==="bottom"?(y=u,w=m===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(w=u,y=m==="end"?"top":"bottom");let v=g-d.top-d.bottom,C=h-d.left-d.right,b=pr(g-d[y],v),T=pr(h-d[w],C),_=!t.middlewareData.shift,R=b,P=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(R=v),_&&!m){let $=Tt(d.left,0),W=Tt(d.right,0),I=Tt(d.top,0),F=Tt(d.bottom,0);f?P=h-2*($!==0||W!==0?$+W:Tt(d.left,d.right)):R=g-2*(I!==0||F!==0?I+F:Tt(d.top,d.bottom))}await l({...t,availableWidth:P,availableHeight:R});let A=await a.getDimensions(s.floating);return h!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function Ps(){return typeof window<"u"}function Un(e){return Xg(e)?(e.nodeName||"").toLowerCase():"#document"}function It(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jt(e){var t;return(t=(Xg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xg(e){return Ps()?e instanceof Node||e instanceof It(e).Node:!1}function zt(e){return Ps()?e instanceof Element||e instanceof It(e).Element:!1}function gr(e){return Ps()?e instanceof HTMLElement||e instanceof It(e).HTMLElement:!1}function Zg(e){return!Ps()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof It(e).ShadowRoot}function Ro(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=Gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function Jg(e){return/^(table|td|th)$/.test(Un(e))}function Bi(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var LE=/transform|translate|scale|rotate|perspective|filter/,$E=/paint|layout|strict|content/,Bn=e=>!!e&&e!=="none",dd;function _s(e){let t=zt(e)?Gt(e):e;return Bn(t.transform)||Bn(t.translate)||Bn(t.scale)||Bn(t.rotate)||Bn(t.perspective)||!Is()&&(Bn(t.backdropFilter)||Bn(t.filter))||LE.test(t.willChange||"")||$E.test(t.contain||"")}function Qg(e){let t=Or(e);for(;gr(t)&&!Vn(t);){if(_s(t))return t;if(Bi(t))return null;t=Or(t)}return null}function Is(){return dd==null&&(dd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),dd}function Vn(e){return/^(html|body|#document)$/.test(Un(e))}function Gt(e){return It(e).getComputedStyle(e)}function Ui(e){return zt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Or(e){if(Un(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Zg(e)&&e.host||Jt(e);return Zg(t)?t.host:t}function eh(e){let t=Or(e);return Vn(t)?e.ownerDocument?e.ownerDocument.body:e.body:gr(t)&&Ro(t)?t:eh(t)}function Ao(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=eh(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=It(o);if(i){let s=As(a);return t.concat(a,a.visualViewport||[],Ro(o)?o:[],s&&r?Ao(s):[])}else return t.concat(o,Ao(o,[],r))}function As(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oh(e){let t=Gt(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=gr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=$i(r)!==i||$i(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function pd(e){return zt(e)?e:e.contextElement}function Oo(e){let t=pd(e);if(!gr(t))return Zt(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=oh(t),a=(i?$i(r.width):r.width)/n,s=(i?$i(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var FE=Zt(0);function ih(e){let t=It(e);return!Is()||!t.visualViewport?FE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function BE(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==It(e)?!1:t}function zn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),i=pd(e),a=Zt(1);t&&(n?zt(n)&&(a=Oo(n)):a=Oo(e));let s=BE(i,r,n)?ih(i):Zt(0),l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){let m=It(i),f=n&&zt(n)?It(n):n,h=m,g=As(h);for(;g&&n&&f!==h;){let y=Oo(g),w=g.getBoundingClientRect(),v=Gt(g),C=w.left+(g.clientLeft+parseFloat(v.paddingLeft))*y.x,b=w.top+(g.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,c*=y.y,d*=y.x,u*=y.y,l+=C,c+=b,h=It(g),g=As(h)}}return Fn({width:d,height:u,x:l,y:c})}function Rs(e,t){let r=Ui(e).scrollLeft;return t?t.left+r:zn(Jt(e)).left+r}function ah(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Rs(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function UE(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i=o==="fixed",a=Jt(n),s=t?Bi(t.floating):!1;if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Zt(1),d=Zt(0),u=gr(n);if((u||!u&&!i)&&((Un(n)!=="body"||Ro(a))&&(l=Ui(n)),u)){let f=zn(n);c=Oo(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}let m=a&&!u&&!i?ah(a,l):Zt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-l.scrollTop*c.y+d.y+m.y}}function VE(e){return Array.from(e.getClientRects())}function zE(e){let t=Jt(e),r=Ui(e),n=e.ownerDocument.body,o=Tt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Tt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+Rs(e),s=-r.scrollTop;return Gt(n).direction==="rtl"&&(a+=Tt(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}var th=25;function GE(e,t){let r=It(e),n=Jt(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;let d=Is();(!d||d&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}let c=Rs(n);if(c<=0){let d=n.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(n.clientWidth-u.clientWidth-f);h<=th&&(i-=h)}else c<=th&&(i+=c);return{width:i,height:a,x:s,y:l}}function HE(e,t){let r=zn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=gr(e)?Oo(e):Zt(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:a,height:s,x:l,y:c}}function rh(e,t,r){let n;if(t==="viewport")n=GE(e,r);else if(t==="document")n=zE(Jt(e));else if(zt(t))n=HE(t,r);else{let o=ih(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Fn(n)}function sh(e,t){let r=Or(e);return r===t||!zt(r)||Vn(r)?!1:Gt(r).position==="fixed"||sh(r,t)}function jE(e,t){let r=t.get(e);if(r)return r;let n=Ao(e,[],!1).filter(s=>zt(s)&&Un(s)!=="body"),o=null,i=Gt(e).position==="fixed",a=i?Or(e):e;for(;zt(a)&&!Vn(a);){let s=Gt(a),l=_s(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ro(a)&&!l&&sh(e,a))?n=n.filter(d=>d!==a):o=s,a=Or(a)}return t.set(e,n),n}function WE(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,a=[...r==="clippingAncestors"?Bi(t)?[]:jE(t,this._c):[].concat(r),n],s=rh(t,a[0],o),l=s.top,c=s.right,d=s.bottom,u=s.left;for(let m=1;m{a(!1,1e-7)},1e3)}R===1&&!ch(c,e.getBoundingClientRect())&&a(),b=!1}try{r=new IntersectionObserver(T,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(T,C)}r.observe(e)}return a(!0),i}function dh(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=pd(e),d=o||i?[...c?Ao(c):[],...t?Ao(t):[]]:[];d.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),i&&w.addEventListener("resize",r)});let u=c&&s?JE(c,r):null,m=-1,f=null;a&&(f=new ResizeObserver(w=>{let[v]=w;v&&v.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=f)==null||C.observe(t)})),r()}),c&&!l&&f.observe(c),t&&f.observe(t));let h,g=l?zn(e):null;l&&y();function y(){let w=zn(e);g&&!ch(g,w)&&r(),g=w,h=requestAnimationFrame(y)}return r(),()=>{var w;d.forEach(v=>{o&&v.removeEventListener("scroll",r),i&&v.removeEventListener("resize",r)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(h)}}var uh=Wg;var ph=qg,fh=Gg,mh=Yg,gh=Hg,hh=zg;var bh=Kg,yh=(e,t,r)=>{let n=new Map,o={platform:XE,...r},i={...o.platform,_c:n};return Vg(e,t,{...o,platform:i})};function vh(e=0,t=0,r=0,n=0){if(typeof DOMRect=="function")return new DOMRect(e,t,r,n);let o={x:e,y:t,width:r,height:n,top:t,right:e+r,bottom:t+n,left:e};return{...o,toJSON:()=>o}}function QE(e){if(!e)return vh();let{x:t,y:r,width:n,height:o}=e;return vh(t,r,n,o)}function wh(e,t){return{contextElement:Me(e)?e:e?.contextElement,getBoundingClientRect:()=>{let r=e,n=t?.(r);return n||!r?QE(n):r.getBoundingClientRect()}}}var Vi=e=>({variable:e,reference:`var(${e})`}),hr={arrowSize:Vi("--arrow-size"),arrowSizeHalf:Vi("--arrow-size-half"),arrowBg:Vi("--arrow-background"),transformOrigin:Vi("--transform-origin"),arrowOffset:Vi("--arrow-offset")},eP=e=>e==="top"||e==="bottom"?"y":"x";function xh(e,t){return{name:"transformOrigin",fn(r){let{elements:n,middlewareData:o,placement:i,rects:a,y:s}=r,l=i.split("-")[0],c=eP(l),d=o.arrow?.x||0,u=o.arrow?.y||0,m=t?.clientWidth||0,f=t?.clientHeight||0,h=d+m/2,g=u+f/2,y=Math.abs(o.shift?.y||0),w=a.reference.height/2,v=f/2,C=e.offset?.mainAxis??e.gutter,b=typeof C=="number"?C+v:C??v,T=y>b,_={top:`${h}px calc(100% + ${b}px)`,bottom:`${h}px ${-b}px`,left:`calc(100% + ${b}px) ${g}px`,right:`${-b}px ${g}px`}[l],R=`${h}px ${a.reference.y+w-s}px`,P=!!e.overlap&&c==="y"&&T;return n.floating.style.setProperty(hr.transformOrigin.variable,P?R:_),{data:{transformOrigin:P?R:_}}}}}var Th={name:"rects",fn({rects:e}){return{data:e}}},kh=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:r}){if(!r.arrow)return{};let{x:n,y:o}=r.arrow,i=t.split("-")[0];return Object.assign(e.style,{left:n!=null?`${n}px`:"",top:o!=null?`${o}px`:"",[i]:`calc(100% + ${hr.arrowOffset.reference})`}),{}}}};function Ch(e){let[t,r]=e.split("-");return{side:t,align:r,hasAlign:r!=null}}function fd(e){return e.split("-")[0]}var tP={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Sh(e,t){let r=e.devicePixelRatio||1;return Math.round(t*r)/r}function No(e,t){return e!=null&&Math.abs(e-t)<.5}function md(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function rP(e,t,r){let n=e||t.createElement("div");return hh({element:n,padding:r.arrowPadding})}function nP(e,t){if(!Sf(t.offset??t.gutter))return uh(({placement:r})=>{let n=(e?.clientHeight||0)/2,o=t.offset?.mainAxis??t.gutter,i=typeof o=="number"?o+n:o??n,{hasAlign:a}=Ch(r),s=a?void 0:t.shift,l=t.offset?.crossAxis??s;return En({crossAxis:l,mainAxis:i,alignmentAxis:t.shift})})}function oP(e){if(!e.flip)return;let t=md(e.boundary);return fh({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function iP(e){if(!e.slide&&!e.overlap)return;let t=md(e.boundary);return ph({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:bh()})}function aP(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,r,n,o;return mh({padding:e.overflowPadding,apply({elements:i,rects:a,availableHeight:s,availableWidth:l}){let c=i.floating,d=Math.round(a.reference.width),u=Math.round(a.reference.height);l=Math.floor(l),s=Math.floor(s),No(t,d)||(c.style.setProperty("--reference-width",`${d}px`),t=d),No(r,u)||(c.style.setProperty("--reference-height",`${u}px`),r=u),No(n,l)||(c.style.setProperty("--available-width",`${l}px`),n=l),No(o,s)||(c.style.setProperty("--available-height",`${s}px`),o=s)}})}function sP(e){if(e.hideWhenDetached)return gh({strategy:"referenceHidden",boundary:md(e.boundary)??"clippingAncestors"})}function lP(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function cP(e,t,r={}){let n=r.getAnchorElement?.()??e,o=wh(n,r.getAnchorRect);if(!t||!o)return;let i=Object.assign({},tP,r),a=t.querySelector("[data-part=arrow]"),s=[nP(a,i),oP(i),iP(i),rP(a,t.ownerDocument,i),kh(a),xh({gutter:i.gutter,offset:i.offset,overlap:i.overlap},a),aP(i),sP(i),Th],{placement:l,strategy:c,onComplete:d,onPositioned:u}=i,m,f,h=!1,g=async()=>{if(!o||!t)return;let C=await yh(o,t,{placement:l,middleware:s,strategy:c});d?.(C);let b=Se(t),T=Sh(b,C.x),_=Sh(b,C.y);if(t.style.transform=`translate3d(${T}px, ${_}px, 0)`,No(m,T)||(t.style.setProperty("--x",`${T}px`),m=T),No(f,_)||(t.style.setProperty("--y",`${_}px`),f=_),i.hideWhenDetached&&(C.middlewareData.hide?.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events"))),!h){let R=t.firstElementChild;R&&(t.style.setProperty("--z-index",_t(R).zIndex),h=!0)}},y=async()=>{r.updatePosition?(await r.updatePosition({updatePosition:g,floatingElement:t}),u?.({placed:!0})):await g()},w=lP(i.listeners),v=i.listeners?dh(o,t,y,w):_f;return y(),()=>{v?.(),u?.({placed:!1})}}function Os(e,t,r={}){let{defer:n,...o}=r,i=n?pe:s=>s(),a=[];return a.push(i(()=>{let s=typeof e=="function"?e():e,l=typeof t=="function"?t():t;a.push(cP(s,l,o))})),()=>{a.forEach(s=>s?.())}}var dP={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function gd(e={}){let{placement:t,sameWidth:r,fitViewport:n,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:hr.arrowSize.reference,height:hr.arrowSize.reference,[hr.arrowSizeHalf.variable]:`calc(${hr.arrowSize.reference} / 2)`,[hr.arrowOffset.variable]:`calc(${hr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?dP[t.split("-")[0]]:void 0,background:hr.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:r?void 0:"max-content",width:r?"var(--reference-width)":void 0,maxWidth:n?"var(--available-width)":void 0,maxHeight:n?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var uP=Object.defineProperty,pP=(e,t,r)=>t in e?uP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ze=(e,t,r)=>pP(e,typeof t!="symbol"?t+"":t,r);var Eh={activateTrap(e,t){if(e.length>0){let n=e[e.length-1];n!==t&&n.pause()}let r=e.indexOf(t);r===-1||e.splice(r,1),e.push(t)},deactivateTrap(e,t){let r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},fP=[],_h=class{constructor(e,t){ze(this,"trapStack"),ze(this,"config"),ze(this,"doc"),ze(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),ze(this,"portalContainers",new Set),ze(this,"listenerCleanups",[]),ze(this,"handleFocus",n=>{let o=Be(n),i=this.findContainerIndex(o,n)>=0;if(i||Ai(o))i&&(this.state.mostRecentlyFocusedNode=o);else{n.stopImmediatePropagation();let a,s=!0;if(this.state.mostRecentlyFocusedNode)if(ko(this.state.mostRecentlyFocusedNode)>0){let l=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:c}=this.state.containerGroups[l];if(c.length>0){let d=c.findIndex(u=>u===this.state.mostRecentlyFocusedNode);d>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?d+1=0&&(a=c[d-1],s=!1))}}else this.state.containerGroups.some(l=>l.tabbableNodes.some(c=>ko(c)>0))||(s=!1);else s=!1;s&&(a=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),a?this.tryFocus(a):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),ze(this,"handlePointerDown",n=>{let o=Be(n);if(!(this.findContainerIndex(o,n)>=0)){if(zi(this.config.clickOutsideDeactivates,n)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}zi(this.config.allowOutsideClick,n)||n.preventDefault()}}),ze(this,"handleClick",n=>{let o=Be(n);this.findContainerIndex(o,n)>=0||zi(this.config.clickOutsideDeactivates,n)||zi(this.config.allowOutsideClick,n)||(n.preventDefault(),n.stopImmediatePropagation())}),ze(this,"handleTabKey",n=>{if(this.config.isKeyForward(n)||this.config.isKeyBackward(n)){this.state.recentNavEvent=n;let o=this.config.isKeyBackward(n),i=this.findNextNavNode({event:n,isBackward:o});if(!i)return;hd(n)&&n.preventDefault(),this.tryFocus(i)}}),ze(this,"handleEscapeKey",n=>{hP(n)&&zi(this.config.escapeDeactivates,n)!==!1&&(n.preventDefault(),this.deactivate())}),ze(this,"_mutationObserver"),ze(this,"setupMutationObserver",()=>{let n=this.doc.defaultView||window;this._mutationObserver=new n.MutationObserver(o=>{o.some(s=>Array.from(s.removedNodes).some(c=>c===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(s=>s.type==="attributes"&&(s.attributeName==="aria-controls"||s.attributeName==="aria-expanded")?!0:s.type==="childList"&&s.addedNodes.length>0?Array.from(s.addedNodes).some(l=>{if(l.nodeType!==Node.ELEMENT_NODE)return!1;let c=l;return im(c)?!0:c.id&&!this.state.containers.some(d=>d.contains(c))?am(c):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),ze(this,"updateObservedNodes",()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(n=>{this._mutationObserver?.observe(n,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(n=>{this.observePortalContainer(n)}))}),ze(this,"getInitialFocusNode",()=>{let n=this.getNodeForOption("initialFocus",{hasFallback:!0});if(n===!1)return!1;if(n===void 0||n&&!Nt(n)){let o=dr(this.doc);if(o&&this.findContainerIndex(o)>=0)n=o;else{let i=this.state.tabbableGroups[0];n=i&&i.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else n===null&&(n=this.getNodeForOption("fallbackFocus"));if(!n)throw new Error("Your focus-trap needs to have at least one focusable element");return n.isConnected||(n=this.getNodeForOption("fallbackFocus")),n}),ze(this,"tryFocus",n=>{if(n!==!1&&n!==dr(this.doc)){if(!n||!n.focus){this.tryFocus(this.getInitialFocusNode());return}n.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=n,bP(n)&&n.select()}}),ze(this,"deactivate",n=>{if(!this.state.active)return this;let o={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...n};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Eh.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let i=this.getOption(o,"onDeactivate"),a=this.getOption(o,"onPostDeactivate"),s=this.getOption(o,"checkCanReturnFocus"),l=this.getOption(o,"returnFocus","returnFocusOnDeactivate");i?.();let c=()=>{Ph(()=>{if(l){let d=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(d)}a?.()})};if(l&&s){let d=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return s(d).then(c,c),this}return c(),this}),ze(this,"pause",n=>{if(this.state.paused||!this.state.active)return this;let o=this.getOption(n,"onPause"),i=this.getOption(n,"onPostPause");return this.state.paused=!0,o?.(),this.removeListeners(),this.updateObservedNodes(),i?.(),this}),ze(this,"unpause",n=>{if(!this.state.paused||!this.state.active)return this;let o=this.getOption(n,"onUnpause"),i=this.getOption(n,"onPostUnpause");return this.state.paused=!1,o?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),i?.(),this}),ze(this,"updateContainerElements",n=>(this.state.containers=Array.isArray(n)?n.filter(Boolean):[n].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),ze(this,"getReturnFocusNode",n=>{let o=this.getNodeForOption("setReturnFocus",{params:[n]});return o||(o===!1?!1:n)}),ze(this,"getOption",(n,o,i)=>n&&n[o]!==void 0?n[o]:this.config[i||o]),ze(this,"getNodeForOption",(n,{hasFallback:o=!1,params:i=[]}={})=>{let a=this.config[n];if(typeof a=="function"&&(a=a(...i)),a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error(`\`${n}\` was specified but was not a node, or did not return a node`)}let s=a;if(typeof a=="string"){try{s=this.doc.querySelector(a)}catch(l){throw new Error(`\`${n}\` appears to be an invalid selector; error="${l.message}"`)}if(!s&&!o)throw new Error(`\`${n}\` as selector refers to no known node`)}return s}),ze(this,"findNextNavNode",n=>{let{event:o,isBackward:i=!1}=n,a=n.target||Be(o);this.updateTabbableNodes();let s=null;if(this.state.tabbableGroups.length>0){let l=this.findContainerIndex(a,o),c=l>=0?this.state.containerGroups[l]:void 0;if(l<0)i?s=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:s=this.state.tabbableGroups[0].firstTabbableNode;else if(i){let d=this.state.tabbableGroups.findIndex(({firstTabbableNode:u})=>a===u);if(d<0&&(c?.container===a||Nt(a)&&!Jr(a)&&!c?.nextTabbableNode(a,!1))&&(d=l),d>=0){let u=d===0?this.state.tabbableGroups.length-1:d-1,m=this.state.tabbableGroups[u];s=ko(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else hd(o)||(s=c?.nextTabbableNode(a,!1))}else{let d=this.state.tabbableGroups.findIndex(({lastTabbableNode:u})=>a===u);if(d<0&&(c?.container===a||Nt(a)&&!Jr(a)&&!c?.nextTabbableNode(a))&&(d=l),d>=0){let u=d===this.state.tabbableGroups.length-1?0:d+1,m=this.state.tabbableGroups[u];s=ko(a)>=0?m.firstTabbableNode:m.firstDomTabbableNode}else hd(o)||(s=c?.nextTabbableNode(a))}}else s=this.getNodeForOption("fallbackFocus");return s}),this.trapStack=t.trapStack||fP;let r={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:mP,isKeyBackward:gP,...t};this.doc=r.document||Fe(Array.isArray(e)?e[0]:e),this.config=r,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{om(e).forEach(r=>{this.addPortalContainer(r)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let r=typeof t?.composedPath=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:n,tabbableNodes:o})=>n.contains(e)||r?.includes(n)||o.find(i=>i===e)||this.isControlledElement(n,e))}isControlledElement(e,t){return this.config.followControlledElements?os(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=Qr(e,{getShadowRoot:this.config.getShadowRoot}),r=Fc(e,{getShadowRoot:this.config.getShadowRoot}),n=t[0],o=t[t.length-1],i=n,a=o,s=!1;for(let c=0;c0){s=!0;break}function l(c,d=!0){let u=t.indexOf(c);if(u>=0)return t[u+(d?1:-1)];let m=r.indexOf(c);if(!(m<0)){if(d){for(let f=m+1;f=0;f--)if(Jr(r[f]))return r[f]}}return{container:e,tabbableNodes:t,focusableNodes:r,posTabIndexesFound:s,firstTabbableNode:n,lastTabbableNode:o,firstDomTabbableNode:i,lastDomTabbableNode:a,nextTabbableNode:l}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return Eh.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Ph(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Te(this.doc,"focusin",this.handleFocus,!0),Te(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Te(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Te(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Te(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Te(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;let t=this.getOption(e,"onActivate"),r=this.getOption(e,"onPostActivate"),n=this.getOption(e,"checkCanFocusTrap");n||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=dr(this.doc),t?.();let o=()=>{n&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),r?.()};return n?(n(this.state.containers.concat()).then(o,o),this):(o(),this)}},bd=e=>e?.type==="keydown",hd=e=>bd(e)&&e?.key==="Tab",mP=e=>bd(e)&&e.key==="Tab"&&!e?.shiftKey,gP=e=>bd(e)&&e.key==="Tab"&&e?.shiftKey,zi=(e,...t)=>typeof e=="function"?e(...t):e,hP=e=>!e.isComposing&&e.key==="Escape",Ph=e=>setTimeout(e,0),bP=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Ih(e,t={}){let r,n=pe(()=>{let i=(Array.isArray(e)?e:[e]).map(s=>typeof s=="function"?s():s).filter(s=>s!=null);if(i.length===0)return;let a=i[0];r=new _h(i,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a,...t,document:Fe(a)});try{r.activate()}catch{}});return function(){r?.deactivate(),n()}}var yP=Ye("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange"),br=yP.build();var Ah=e=>e.ids?.root??`progress-${e.id}`,Rh=e=>e.ids?.track??`progress-${e.id}-track`,Oh=e=>e.ids?.label??`progress-${e.id}-label`,Nh=e=>e.ids?.circle??`progress-${e.id}-circle`;function yd(e,t){let{context:r,computed:n,prop:o,send:i,scope:a}=e,s=n("percent"),l=n("isIndeterminate")?"":n("formatter").format(s/100),c=o("max"),d=o("min"),u=o("orientation"),m=o("translations"),f=n("isIndeterminate"),h=r.get("value"),g=m?.value({value:h,max:c,percent:s,min:d,formatter:n("formatter")})??"",y=wP(h,c),w={role:"progressbar","aria-label":g,"data-max":c,"aria-valuemin":d,"aria-valuemax":c,"aria-valuenow":h??void 0,"data-orientation":u,"data-state":y},v=TP(e);return{value:h,valueAsString:g,min:d,max:c,percent:s,percentAsString:l,indeterminate:f,setValue(C){i({type:"VALUE.SET",value:C})},setToMax(){i({type:"VALUE.SET",value:c})},setToMin(){i({type:"VALUE.SET",value:d})},getRootProps(){return t.element({dir:o("dir"),...br.root.attrs,id:Ah(a),"data-max":c,"data-value":h??void 0,"data-state":y,"data-orientation":u,style:{"--percent":f?void 0:s}})},getLabelProps(){return t.element({dir:o("dir"),id:Oh(a),...br.label.attrs,"data-orientation":u})},getValueTextProps(){return t.element({dir:o("dir"),"aria-live":"polite",...br.valueText.attrs})},getTrackProps(){return t.element({dir:o("dir"),id:Rh(a),...br.track.attrs,...w})},getRangeProps(){return t.element({dir:o("dir"),...br.range.attrs,"data-orientation":u,"data-state":y,style:{[n("isHorizontal")?"width":"height"]:f?void 0:`${s}%`}})},getCircleProps(){return t.element({dir:o("dir"),id:Nh(a),...br.circle.attrs,...w,...v.root})},getCircleTrackProps(){return t.element({dir:o("dir"),"data-orientation":u,...br.circleTrack.attrs,...v.track})},getCircleRangeProps(){return t.element({dir:o("dir"),...br.circleRange.attrs,...v.range,"data-state":y})},getViewProps(C){return t.element({dir:o("dir"),...br.view.attrs,"data-state":C.state,hidden:C.state!==y})}}}function wP(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}var Dh={style:{"--radius":"calc(var(--size) / 2 - var(--thickness) / 2)",cx:"calc(var(--size) / 2)",cy:"calc(var(--size) / 2)",r:"var(--radius)",fill:"transparent",strokeWidth:"var(--thickness)"}},xP={style:{width:"var(--size)",height:"var(--size)"}};function TP(e){let{context:t,computed:r}=e;return{root:xP,track:Dh,range:{opacity:t.get("value")===0?0:void 0,style:{...Dh.style,"--percent":r("percent"),"--circumference":"calc(2 * 3.14159 * var(--radius))","--offset":"calc(var(--circumference) * (100 - var(--percent)) / 100)",strokeDashoffset:"calc(var(--circumference) * ((100 - var(--percent)) / 100))",strokeDasharray:r("isIndeterminate")?void 0:"var(--circumference)",transformOrigin:"center",transform:"rotate(-90deg)"}}}}var vd=Ot({props({props:e}){let t=e.min??0,r=e.max??100;return{orientation:"horizontal",...e,max:r,min:t,defaultValue:e.defaultValue!==void 0?e.defaultValue:SP(t,r),formatOptions:{style:"percent",...e.formatOptions},translations:{value:({value:n,percent:o,formatter:i})=>{if(n===null)return"loading...";if(i){let s=i.resolvedOptions().style==="percent"?o/100:n;return i.format(s)}return n.toString()},...e.translations}}},initialState(){return"idle"},entry:["validateContext"],context({bindable:e,prop:t}){return{value:e(()=>({defaultValue:t("defaultValue"),value:t("value"),onChange(r){t("onValueChange")?.({value:r})}}))}},computed:{isIndeterminate:({context:e})=>e.get("value")===null,percent({context:e,prop:t}){let r=e.get("value");return Ti(r)?Mf(r,t("min"),t("max"))*100:-1},formatter:Si(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>new Intl.NumberFormat(e,t)),isHorizontal:({prop:e})=>e("orientation")==="horizontal"},states:{idle:{on:{"VALUE.SET":{actions:["setValue"]}}}},implementations:{actions:{setValue:({context:e,event:t,prop:r})=>{let n=t.value===null?null:Math.max(0,Math.min(t.value,r("max")));e.set("value",n)},validateContext:({context:e,prop:t})=>{let r=t("max"),n=t("min"),o=e.get("value");if(o!=null){if(!wd(r))throw new Error(`[progress] The max value passed \`${r}\` is not a valid number`);if(!kP(o,r))throw new Error(`[progress] The value passed \`${o}\` exceeds the max value \`${r}\``);if(!CP(o,n))throw new Error(`[progress] The value passed \`${o}\` exceeds the min value \`${n}\``)}}}}}),wd=e=>Ti(e)&&!isNaN(e),kP=(e,t)=>wd(e)&&e<=t,CP=(e,t)=>wd(e)&&e>=t,SP=(e,t)=>e+(t-e)/2;var[Mh,yr]=Ne({hookName:"useProgressContext",providerName:""}),Lh=e=>{let t=yr(),r=V(()=>t().getCircleProps(),e);return p(H.svg,r)},$h=e=>{let t=yr(),r=V(()=>t().getCircleRangeProps(),e);return p(H.circle,r)},Fh=e=>{let t=yr(),r=V(()=>t().getCircleTrackProps(),e);return p(H.circle,r)},Bh=e=>e.children(yr()),Uh=e=>{let t=yr(),r=V(()=>t().getLabelProps(),e);return p(H.span,r)},Vh=e=>{let t=yr(),r=V(()=>t().getRangeProps(),e);return p(H.div,r)},zh=e=>{let t=Ae(),r=Ut(),n=ot(),o=K(()=>({id:t,dir:r().dir,locale:r().locale,getRootNode:n().getRootNode,...mt(e)})),i=wt(vd,o);return K(()=>yd(i,xt))},Gh=e=>{let[t,r]=_e()(e,["defaultValue","formatOptions","id","ids","locale","max","min","onValueChange","orientation","translations","value"]),n=zh(t),o=V(()=>n().getRootProps(),r);return p(Mh,{value:n,get children(){return p(H.div,o)}})},Hh=e=>{let[{value:t},r]=_e()(e,["value"]),n=V(()=>t().getRootProps(),r);return p(Mh,{value:t,get children(){return p(H.div,n)}})},jh=e=>{let t=yr(),r=V(()=>t().getTrackProps(),e);return p(H.div,r)},Wh=e=>{let t=yr(),r=V(()=>t().getValueTextProps(),e);return p(H.span,se(r,{get children(){return e.children||t().percentAsString}}))},qh=e=>{let[t,r]=_e()(e,["state"]),n=yr(),o=V(()=>n().getViewProps(t),r);return p(H.span,o)},Gn={};gt(Gn,{Circle:()=>Lh,CircleRange:()=>$h,CircleTrack:()=>Fh,Context:()=>Bh,Label:()=>Uh,Range:()=>Vh,Root:()=>Gh,RootProvider:()=>Hh,Track:()=>jh,ValueText:()=>Wh,View:()=>qh});var Do=new WeakMap,Ns=new WeakMap,Ds={},xd=0,Kh=e=>e&&(e.host||Kh(e.parentNode)),PP=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=Kh(r);return n&&e.contains(n)?n:(console.error("[zag-js > ariaHidden] target",r,"in not contained inside",e,". Doing nothing"),null)}).filter(r=>!!r),_P=new Set(["script","output","status","next-route-announcer"]),IP=e=>_P.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Yh=(e,t)=>{let{parentNode:r,markerName:n,controlAttribute:o,explicitBooleanValue:i,followControlledElements:a=!0}=t,s=PP(r,Array.isArray(e)?e:[e]);Ds[n]||(Ds[n]=new WeakMap);let l=Ds[n],c=[],d=new Set,u=new Set(s),m=h=>{!h||d.has(h)||(d.add(h),m(h.parentNode))};s.forEach(h=>{m(h),a&&Me(h)&&Nc(h,g=>{m(g)})});let f=h=>{!h||u.has(h)||Array.prototype.forEach.call(h.children,g=>{if(d.has(g))f(g);else try{if(IP(g))return;let y=g.getAttribute(o),w=i?y==="true":y!==null&&y!=="false",v=(Do.get(g)||0)+1,C=(l.get(g)||0)+1;Do.set(g,v),l.set(g,C),c.push(g),v===1&&w&&Ns.set(g,!0),C===1&&g.setAttribute(n,""),w||g.setAttribute(o,i?"true":"")}catch(y){console.error("[zag-js > ariaHidden] cannot operate on ",g,y)}})};return f(r),d.clear(),xd++,()=>{c.forEach(h=>{let g=Do.get(h)-1,y=l.get(h)-1;Do.set(h,g),l.set(h,y),g||(Ns.has(h)||h.removeAttribute(o),Ns.delete(h)),y||h.removeAttribute(n)}),xd--,xd||(Do=new WeakMap,Do=new WeakMap,Ns=new WeakMap,Ds={})}};var AP=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,Zh=(e,t=AP(e),r="data-aria-hidden",n=!0)=>{if(t)return Yh(e,{parentNode:t,markerName:r,controlAttribute:"aria-hidden",explicitBooleanValue:!0,followControlledElements:n})};var RP=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Xh(e,t={}){let{defer:r=!0}=t,n=r?RP:i=>i(),o=[];return o.push(n(()=>{let a=(typeof e=="function"?e():e).filter(Boolean);a.length!==0&&o.push(Zh(a))})),()=>{o.forEach(i=>i?.())}}var Td="data-scroll-lock";function OP(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Jh(e){let r=_t(e)?.scrollbarGutter;return r==="stable"||r?.startsWith("stable ")===!0}function Qh(e){let t=e??document,r=t.defaultView??window,{documentElement:n,body:o}=t;if(o.hasAttribute(Td))return;let a=Jh(n)||Jh(o),s=r.innerWidth-n.clientWidth;o.setAttribute(Td,"");let l=()=>Nm(n,"--scrollbar-width",`${s}px`),c=OP(n),d=()=>{let f={overflow:"hidden"};return!a&&s>0&&(f[c]=`${s}px`),Rn(o,f)},u=()=>{let{scrollX:f,scrollY:h,visualViewport:g}=r,y=g?.offsetLeft??0,w=g?.offsetTop??0,v={position:"fixed",overflow:"hidden",top:`${-(h-Math.floor(w))}px`,left:`${-(f-Math.floor(y))}px`,right:"0"};!a&&s>0&&(v[c]=`${s}px`);let C=Rn(o,v);return()=>{C?.(),r.scrollTo({left:f,top:h,behavior:"instant"})}},m=[l(),xo()?u():d()];return()=>{m.forEach(f=>f?.()),o.removeAttribute(Td)}}var NP=Ye("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),bt=NP.build();var Mo=e=>e.ids?.trigger??`menu:${e.id}:trigger`,kd=e=>e.ids?.contextTrigger??`menu:${e.id}:ctx-trigger`,Hn=e=>e.ids?.content??`menu:${e.id}:content`,eb=e=>e.ids?.arrow??`menu:${e.id}:arrow`,Cd=e=>e.ids?.positioner??`menu:${e.id}:popper`,tb=(e,t)=>e.ids?.group?.(t)??`menu:${e.id}:group:${t}`,jn=(e,t)=>`${e.id}/${t}`,rn=e=>e?.dataset.value??null,Sd=(e,t)=>e.ids?.groupLabel?.(t)??`menu:${e.id}:group-label:${t}`,vr=e=>e.getById(Hn(e)),Ed=e=>e.getById(Cd(e)),Gi=e=>e.getById(Mo(e)),rb=(e,t)=>t?e.getById(jn(e,t)):null;var Ms=e=>e.getById(kd(e)),Hi=e=>{let r=`[role^="menuitem"][data-ownedby=${CSS.escape(Hn(e))}]:not([data-disabled])`;return ps(vr(e),r)},nb=e=>hf(Hi(e)),ob=e=>bf(Hi(e)),Pd=(e,t)=>t?e.id===t||e.dataset.value===t:!1,ib=(e,t)=>{let r=Hi(e),n=r.findIndex(o=>Pd(o,t.value));return xf(r,n,{loop:t.loop??t.loopFocus})},ab=(e,t)=>{let r=Hi(e),n=r.findIndex(o=>Pd(o,t.value));return Tf(r,n,{loop:t.loop??t.loopFocus})},sb=(e,t)=>{let r=Hi(e),n=r.find(o=>Pd(o,t.value));return ms(r,{state:t.typeaheadState,key:t.key,activeId:n?.id??null})},ji=e=>Me(e)&&(e.dataset.disabled===""||e.hasAttribute("disabled")),_d=e=>!!e?.getAttribute("role")?.startsWith("menuitem")&&!!e?.hasAttribute("data-controls");var Ls="menu:select";function lb(e,t){if(!e)return;let r=Se(e),n=new r.CustomEvent(Ls,{detail:{value:t}});e.dispatchEvent(n)}function Id(e,t){let{context:r,send:n,state:o,computed:i,prop:a,scope:s}=e,l=o.hasTag("open"),c=r.get("isSubmenu"),d=i("isTypingAhead"),u=a("composite"),m=r.get("currentPlacement"),f=r.get("anchorPoint"),h=r.get("highlightedValue"),g=gd({...a("positioning"),placement:f?"bottom":m});function y(b){return{id:jn(s,b.value),disabled:!!b.disabled,highlighted:h===b.value}}function w(b){let T=b.valueText??b.value;return{...b,id:b.value,valueText:T}}function v(b){return{...y(w(b)),checked:!!b.checked}}function C(b){let{closeOnSelect:T,valueText:_,value:R}=b,P=y(b),A=jn(s,R);return t.element({...bt.item.attrs,id:A,role:"menuitem","aria-disabled":cr(P.disabled),"data-disabled":te(P.disabled),"data-ownedby":Hn(s),"data-highlighted":te(P.highlighted),"data-value":R,"data-valuetext":_,onDragStart($){$.currentTarget.matches("a[href]")&&$.preventDefault()},onPointerMove($){if(P.disabled||$.pointerType!=="mouse")return;let W=$.currentTarget;if(P.highlighted)return;let I=Kt($);n({type:"ITEM_POINTERMOVE",id:A,target:W,closeOnSelect:T,point:I})},onPointerLeave($){if(P.disabled||$.pointerType!=="mouse"||!e.event.previous()?.type.includes("POINTER"))return;let I=$.currentTarget;n({type:"ITEM_POINTERLEAVE",id:A,target:I,closeOnSelect:T})},onPointerDown($){if(P.disabled)return;let W=$.currentTarget;n({type:"ITEM_POINTERDOWN",target:W,id:A,closeOnSelect:T})},onClick($){if($c($)||Lc($)||P.disabled)return;let W=$.currentTarget;n({type:"ITEM_CLICK",target:W,id:A,closeOnSelect:T})}})}return{highlightedValue:h,open:l,setOpen(b){o.hasTag("open")!==b&&n({type:b?"OPEN":"CLOSE"})},setHighlightedValue(b){n({type:"HIGHLIGHTED.SET",value:b})},setParent(b){n({type:"PARENT.SET",value:b,id:b.prop("id")})},setChild(b){n({type:"CHILD.SET",value:b,id:b.prop("id")})},reposition(b={}){n({type:"POSITIONING.SET",options:b})},addItemListener(b){let T=s.getById(b.id);if(!T)return;let _=()=>b.onSelect?.();return T.addEventListener(Ls,_),()=>T.removeEventListener(Ls,_)},getContextTriggerProps(){return t.element({...bt.contextTrigger.attrs,dir:a("dir"),id:kd(s),"data-state":l?"open":"closed",onPointerDown(b){if(b.pointerType==="mouse")return;let T=Kt(b);n({type:"CONTEXT_MENU_START",point:T})},onPointerCancel(b){b.pointerType!=="mouse"&&n({type:"CONTEXT_MENU_CANCEL"})},onPointerMove(b){b.pointerType!=="mouse"&&n({type:"CONTEXT_MENU_CANCEL"})},onPointerUp(b){b.pointerType!=="mouse"&&n({type:"CONTEXT_MENU_CANCEL"})},onContextMenu(b){let T=Kt(b);n({type:"CONTEXT_MENU",point:T}),b.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}})},getTriggerItemProps(b){let T=b.getTriggerProps();return Ja(C({value:T.id}),T)},getTriggerProps(){return t.button({...c?bt.triggerItem.attrs:bt.trigger.attrs,"data-placement":r.get("currentPlacement"),type:"button",dir:a("dir"),id:Mo(s),"data-uid":a("id"),"aria-haspopup":u?"menu":"dialog","aria-controls":Hn(s),"data-controls":Hn(s),"aria-expanded":l||void 0,"data-state":l?"open":"closed",onPointerMove(b){if(b.pointerType!=="mouse"||ji(b.currentTarget)||!c)return;let _=Kt(b);n({type:"TRIGGER_POINTERMOVE",target:b.currentTarget,point:_})},onPointerLeave(b){if(ji(b.currentTarget)||b.pointerType!=="mouse"||!c)return;let T=Kt(b);n({type:"TRIGGER_POINTERLEAVE",target:b.currentTarget,point:T})},onPointerDown(b){ji(b.currentTarget)||ss(b)||b.preventDefault()},onClick(b){b.defaultPrevented||ji(b.currentTarget)||n({type:"TRIGGER_CLICK",target:b.currentTarget})},onBlur(){n({type:"TRIGGER_BLUR"})},onFocus(){n({type:"TRIGGER_FOCUS"})},onKeyDown(b){if(b.defaultPrevented)return;let T={ArrowDown(){n({type:"ARROW_DOWN"})},ArrowUp(){n({type:"ARROW_UP"})},Enter(){n({type:"ARROW_DOWN",src:"enter"})},Space(){n({type:"ARROW_DOWN",src:"space"})}},_=Ni(b,{orientation:"vertical",dir:a("dir")}),R=T[_];R&&(b.preventDefault(),R(b))}})},getIndicatorProps(){return t.element({...bt.indicator.attrs,dir:a("dir"),"data-state":l?"open":"closed"})},getPositionerProps(){return t.element({...bt.positioner.attrs,dir:a("dir"),id:Cd(s),style:g.floating})},getArrowProps(){return t.element({id:eb(s),...bt.arrow.attrs,dir:a("dir"),style:g.arrow})},getArrowTipProps(){return t.element({...bt.arrowTip.attrs,dir:a("dir"),style:g.arrowTip})},getContentProps(){return t.element({...bt.content.attrs,id:Hn(s),"aria-label":a("aria-label"),hidden:!l,"data-state":l?"open":"closed",role:u?"menu":"dialog",tabIndex:0,dir:a("dir"),"aria-activedescendant":i("highlightedId")||void 0,"aria-labelledby":Mo(s),"data-placement":m,onPointerEnter(b){b.pointerType==="mouse"&&n({type:"MENU_POINTERENTER"})},onKeyDown(b){if(b.defaultPrevented||!nt(b.currentTarget,Be(b)))return;let T=Be(b);if(!(T?.closest("[role=menu]")===b.currentTarget||T===b.currentTarget))return;if(b.key==="Tab"&&!Tm(b)){b.preventDefault();return}let R={ArrowDown(){n({type:"ARROW_DOWN"})},ArrowUp(){n({type:"ARROW_UP"})},ArrowLeft(){n({type:"ARROW_LEFT"})},ArrowRight(){n({type:"ARROW_RIGHT"})},Enter(){n({type:"ENTER"})},Space($){d?n({type:"TYPEAHEAD",key:$.key}):R.Enter?.($)},Home(){n({type:"HOME"})},End(){n({type:"END"})}},P=Ni(b,{dir:a("dir")}),A=R[P];if(A){A(b),b.stopPropagation(),b.preventDefault();return}a("typeahead")&&pm(b)&&(Oi(b)||wo(T)||(n({type:"TYPEAHEAD",key:b.key}),b.preventDefault()))}})},getSeparatorProps(){return t.element({...bt.separator.attrs,role:"separator",dir:a("dir"),"aria-orientation":"horizontal"})},getItemState:y,getItemProps:C,getOptionItemState:v,getOptionItemProps(b){let{type:T,disabled:_,closeOnSelect:R}=b,P=w(b),A=v(b);return{...C(P),...t.element({"data-type":T,...bt.item.attrs,dir:a("dir"),"data-value":P.value,role:`menuitem${T}`,"aria-checked":!!A.checked,"data-state":A.checked?"checked":"unchecked",onClick($){if(_||$c($)||Lc($))return;let W=$.currentTarget;n({type:"ITEM_CLICK",target:W,option:P,closeOnSelect:R})}})}},getItemIndicatorProps(b){let T=v(kc(b)),_=T.checked?"checked":"unchecked";return t.element({...bt.itemIndicator.attrs,dir:a("dir"),"data-disabled":te(T.disabled),"data-highlighted":te(T.highlighted),"data-state":kn(b,"checked")?_:void 0,hidden:kn(b,"checked")?!T.checked:void 0})},getItemTextProps(b){let T=v(kc(b)),_=T.checked?"checked":"unchecked";return t.element({...bt.itemText.attrs,dir:a("dir"),"data-disabled":te(T.disabled),"data-highlighted":te(T.highlighted),"data-state":kn(b,"checked")?_:void 0})},getItemGroupLabelProps(b){return t.element({...bt.itemGroupLabel.attrs,id:Sd(s,b.htmlFor),dir:a("dir")})},getItemGroupProps(b){return t.element({id:tb(s,b.id),...bt.itemGroup.attrs,dir:a("dir"),"aria-labelledby":Sd(s,b.id),role:"group"})}}}var Wi=(e,t)=>({x:e,y:t});function db(e){let{x:t,y:r,width:n,height:o}=e,i=t+n/2,a=r+o/2;return{x:t,y:r,width:n,height:o,minX:t,minY:r,maxX:t+n,maxY:r+o,midX:i,midY:a,center:Wi(i,a)}}function ub(e){let t=Wi(e.minX,e.minY),r=Wi(e.maxX,e.minY),n=Wi(e.maxX,e.maxY),o=Wi(e.minX,e.maxY);return{top:t,right:r,bottom:n,left:o}}function pb(e,t){let r=db(e),{top:n,right:o,left:i,bottom:a}=ub(r),[s]=t.split("-");return{top:[i,n,o,a],right:[n,o,a,i],bottom:[n,i,a,o],left:[o,n,i,a]}[s]}function Ad(e,t){let{x:r,y:n}=t,o=!1;for(let i=0,a=e.length-1;in!=d>n&&r<(c-s)*(n-l)/(d-l)+s&&(o=!o)}return o}var{not:Ht,and:Lo,or:DP}=Ei(),Rd=Ot({props({props:e}){return{closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(t){Sm(t.node)},...e,positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},context({bindable:e,prop:t}){return{suspendPointer:e(()=>({defaultValue:!1})),highlightedValue:e(()=>({defaultValue:t("defaultHighlightedValue")||null,value:t("highlightedValue"),onChange(r){t("onHighlightChange")?.({highlightedValue:r})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash(r){return`x: ${r?.x}, y: ${r?.y}`}})),isSubmenu:e(()=>({defaultValue:!1}))}},refs(){return{parent:null,children:{},typeaheadState:{...ms.defaultOptions},positioningOverride:{}}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar!=="",highlightedId:({context:e,scope:t,refs:r})=>LP(r.get("children"),e.get("highlightedValue"),t)},watch({track:e,action:t,context:r,prop:n}){e([()=>r.get("isSubmenu")],()=>{t(["setSubmenuPlacement"])}),e([()=>r.hash("anchorPoint")],()=>{r.get("anchorPoint")&&t(["reposition"])}),e([()=>n("open")],()=>{t(["toggleVisibility"])})},on:{"PARENT.SET":{actions:["setParentMenu"]},"CHILD.SET":{actions:["setChildMenu"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"HIGHLIGHTED.RESTORE":{actions:["restoreHighlightedItem"]},"HIGHLIGHTED.SET":{actions:["setHighlightedItem"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_FOCUS:{guard:Ht("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],effects:["waitForLongPress"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"LONG_PRESS.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},opening:{tags:["closed"],effects:["waitForOpenDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},BLUR:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"DELAY.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},closing:{tags:["open"],effects:["trackPointerMove","trackInteractOutside","waitForCloseDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]},MENU_POINTERENTER:{target:"open",actions:["clearIntentPolygon"]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]}],"DELAY.CLOSE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem","invokeOnClose"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","resumePointer","clearAnchorPoint"],on:{"CONTROLLED.OPEN":[{guard:DP("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:["highlightFirstItem"]},{guard:"isArrowUpEvent",target:"open",actions:["highlightLastItem"]},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:{target:"idle"},ARROW_DOWN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackInteractOutside","trackFocusVisible","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:Lo(Ht("isTriggerItem"),"isOpenControlled"),actions:["invokeOnClose"]},{guard:Ht("isTriggerItem"),target:"closed",actions:["invokeOnClose"]}],CONTEXT_MENU:{actions:["setAnchorPoint","focusMenu"]},ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:Lo("isSubmenu","isOpenControlled"),actions:["invokeOnClose"]},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},ENTER:[{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},{actions:["clickHighlightedItem"]}],ITEM_POINTERMOVE:[{guard:Ht("isPointerSuspended"),actions:["setHighlightedItem","focusMenu","closeSiblingMenus"]},{actions:["setLastHighlightedItem","closeSiblingMenus"]}],ITEM_POINTERLEAVE:{guard:Lo(Ht("isPointerSuspended"),Ht("isTriggerItem")),actions:["clearHighlightedItem"]},ITEM_CLICK:[{guard:Lo(Ht("isTriggerItemHighlighted"),Ht("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:Lo(Ht("isTriggerItemHighlighted"),Ht("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:Lo(Ht("isTriggerItemHighlighted"),Ht("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:["setHighlightedItem"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",actions:["setIntentPolygon"]},TRIGGER_POINTERLEAVE:{target:"closing",actions:["setIntentPolygon"]},ITEM_POINTERDOWN:{actions:["setHighlightedItem"]},TYPEAHEAD:{actions:["highlightMatchedItem"]},FOCUS_MENU:{actions:["focusMenu"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>!!(t?.closeOnSelect??e("closeOnSelect")),isTriggerItem:({event:e})=>_d(e.target),isTriggerItemHighlighted:({event:e,scope:t,computed:r})=>!!(e.target??t.getById(r("highlightedId")))?.hasAttribute("data-controls"),isSubmenu:({context:e})=>e.get("isSubmenu"),isPointerSuspended:({context:e})=>e.get("suspendPointer"),isHighlightedItemEditable:({scope:e,computed:t})=>wo(e.getById(t("highlightedId"))),isOpenControlled:({prop:e})=>e("open")!==void 0,isArrowLeftEvent:({event:e})=>e.previousEvent?.type==="ARROW_LEFT",isArrowUpEvent:({event:e})=>e.previousEvent?.type==="ARROW_UP",isArrowDownEvent:({event:e})=>e.previousEvent?.type==="ARROW_DOWN",isOpenAutoFocusEvent:({event:e})=>e.previousEvent?.type==="OPEN_AUTOFOCUS"},effects:{waitForOpenDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.OPEN"})},200);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){let t=setTimeout(()=>{e({type:"DELAY.CLOSE"})},100);return()=>clearTimeout(t)},waitForLongPress({send:e}){let t=setTimeout(()=>{e({type:"LONG_PRESS.OPEN"})},700);return()=>clearTimeout(t)},trackFocusVisible({scope:e}){return Ag({root:e.getRootNode?.()})},trackPositioning({context:e,prop:t,scope:r,refs:n}){if(Ms(r))return;let o={...t("positioning"),...n.get("positioningOverride")};e.set("currentPlacement",o.placement);let i=()=>Ed(r);return Os(Gi(r),i,{...o,defer:!0,onComplete(a){e.set("currentPlacement",a.placement)}})},trackInteractOutside({refs:e,scope:t,prop:r,context:n,send:o}){let i=()=>vr(t),a=!0;return ys(i,{type:"menu",defer:!0,exclude:[Gi(t)],onInteractOutside:r("onInteractOutside"),onRequestDismiss:r("onRequestDismiss"),onFocusOutside(s){r("onFocusOutside")?.(s);let l=Be(s.detail.originalEvent);if(nt(Ms(t),l)){s.preventDefault();return}},onEscapeKeyDown(s){r("onEscapeKeyDown")?.(s),n.get("isSubmenu")&&s.preventDefault(),fb({parent:e.get("parent")})},onPointerDownOutside(s){r("onPointerDownOutside")?.(s);let l=Be(s.detail.originalEvent);if(nt(Ms(t),l)&&s.detail.contextmenu){s.preventDefault();return}a=!s.detail.focusable},onDismiss(){o({type:"CLOSE",src:"interact-outside",restoreFocus:a})}})},trackPointerMove({context:e,scope:t,send:r,refs:n,flush:o}){let i=n.get("parent");o(()=>{i.context.set("suspendPointer",!0)});let a=t.getDoc();return Te(a,"pointermove",s=>{MP(e.get("intentPolygon"),{x:s.clientX,y:s.clientY})||(r({type:"POINTER_MOVED_AWAY_FROM_SUBMENU"}),i.context.set("suspendPointer",!1))})},scrollToHighlightedItem({scope:e,computed:t}){let r=()=>{if(_g()==="pointer")return;let i=e.getById(t("highlightedId")),a=vr(e);Pm(i,{rootEl:a,block:"nearest"})};return pe(()=>{Ig("virtual"),r()}),cs(()=>vr(e),{defer:!0,attributes:["aria-activedescendant"],callback:r})}},actions:{setAnchorPoint({context:e,event:t}){e.set("anchorPoint",r=>Zr(r,t.point)?r:t.point)},setSubmenuPlacement({context:e,computed:t,refs:r}){if(!e.get("isSubmenu"))return;let n=t("isRtl")?"left-start":"right-start";r.set("positioningOverride",{placement:n,gutter:0})},reposition({context:e,scope:t,prop:r,event:n,refs:o}){let i=()=>Ed(t),a=e.get("anchorPoint"),s=a?()=>({width:0,height:0,...a}):void 0,l={...r("positioning"),...o.get("positioningOverride")};Os(Gi(t),i,{...l,defer:!0,getAnchorRect:s,...n.options??{},listeners:!1,onComplete(c){e.set("currentPlacement",c.placement)}})},setOptionState({event:e}){if(!e.option)return;let{checked:t,onCheckedChange:r,type:n}=e.option;n==="radio"?r?.(!0):n==="checkbox"&&r?.(!t)},clickHighlightedItem({scope:e,computed:t,prop:r,context:n}){let o=e.getById(t("highlightedId"));if(!o||o.dataset.disabled)return;let i=n.get("highlightedValue");em(o)?r("navigate")?.({value:i,node:o,href:o.href}):queueMicrotask(()=>o.click())},setIntentPolygon({context:e,scope:t,event:r}){let n=vr(t),o=e.get("currentPlacement");if(!n||!o)return;let i=n.getBoundingClientRect(),a=pb(i,o);if(!a)return;let l=fd(o)==="right"?-5:5;e.set("intentPolygon",[{...r.point,x:r.point.x+l},...a])},clearIntentPolygon({context:e}){e.set("intentPolygon",null)},clearAnchorPoint({context:e}){e.set("anchorPoint",null)},resumePointer({refs:e,flush:t}){let r=e.get("parent");r&&t(()=>{r.context.set("suspendPointer",!1)})},setHighlightedItem({context:e,event:t}){let r=t.value||rn(t.target);e.set("highlightedValue",r)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},focusMenu({scope:e}){pe(()=>{let t=vr(e);xm({root:t,enabled:!nt(t,e.getActiveElement()),filter(n){return!n.role?.startsWith("menuitem")}})?.focus({preventScroll:!0})})},highlightFirstItem({context:e,scope:t}){(vr(t)?queueMicrotask:pe)(()=>{let n=nb(t);n&&e.set("highlightedValue",rn(n))})},highlightLastItem({context:e,scope:t}){(vr(t)?queueMicrotask:pe)(()=>{let n=ob(t);n&&e.set("highlightedValue",rn(n))})},highlightNextItem({context:e,scope:t,event:r,prop:n}){let o=ib(t,{loop:r.loop,value:e.get("highlightedValue"),loopFocus:n("loopFocus")});e.set("highlightedValue",rn(o))},highlightPrevItem({context:e,scope:t,event:r,prop:n}){let o=ab(t,{loop:r.loop,value:e.get("highlightedValue"),loopFocus:n("loopFocus")});e.set("highlightedValue",rn(o))},invokeOnSelect({context:e,prop:t,scope:r}){let n=e.get("highlightedValue");if(n==null)return;let o=rb(r,n);lb(o,n),t("onSelect")?.({value:n})},focusTrigger({scope:e,context:t,event:r}){t.get("isSubmenu")||t.get("anchorPoint")||r.restoreFocus===!1||queueMicrotask(()=>Gi(e)?.focus({preventScroll:!0}))},highlightMatchedItem({scope:e,context:t,event:r,refs:n}){let o=sb(e,{key:r.key,value:t.get("highlightedValue"),typeaheadState:n.get("typeaheadState")});o&&t.set("highlightedValue",rn(o))},setParentMenu({refs:e,event:t,context:r}){e.set("parent",t.value),r.set("isSubmenu",!0)},setChildMenu({refs:e,event:t}){let r=e.get("children");r[t.id]=t.value,e.set("children",r)},closeSiblingMenus({refs:e,event:t,scope:r}){let n=t.target;if(!_d(n))return;let o=n?.getAttribute("data-uid"),i=e.get("children");for(let a in i){if(a===o)continue;let s=i[a],l=s.context.get("intentPolygon");l&&t.point&&Ad(l,t.point)||(vr(r)?.focus({preventScroll:!0}),s.send({type:"CLOSE"}))}},closeRootMenu({refs:e}){fb({parent:e.get("parent")})},openSubmenu({refs:e,scope:t,computed:r}){let o=t.getById(r("highlightedId"))?.getAttribute("data-uid"),i=e.get("children");(o?i[o]:null)?.send({type:"OPEN_AUTOFOCUS"})},focusParentMenu({refs:e}){e.get("parent")?.send({type:"FOCUS_MENU"})},setLastHighlightedItem({context:e,event:t}){e.set("lastHighlightedValue",rn(t.target))},restoreHighlightedItem({context:e}){e.get("lastHighlightedValue")&&(e.set("highlightedValue",e.get("lastHighlightedValue")),e.set("lastHighlightedValue",null))},restoreParentHighlightedItem({refs:e}){e.get("parent")?.send({type:"HIGHLIGHTED.RESTORE"})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},toggleVisibility({prop:e,event:t,send:r}){r({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}});function fb(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}function MP(e,t){return e?Ad(e,t):!1}function LP(e,t,r){let n=Object.keys(e).length>0;if(!t)return null;if(!n)return jn(r,t);for(let o in e){let i=e[o],a=Mo(i.scope);if(a===t)return a}return jn(r,t)}var[mb,Xe]=Ne({hookName:"useMenuContext",providerName:"",strict:!1}),gb=e=>{let t=Xe(),r=V(()=>t().getArrowProps(),e);return p(H.div,r)},hb=e=>{let t=Xe(),r=V(()=>t().getArrowTipProps(),e);return p(H.div,r)},[Od,bb]=Ne({hookName:"useMenuItemContext",providerName:""}),[$s,yb]=Ne({hookName:"useMenuItemPropsContext",providerName:""}),vb=e=>{let[t,r]=_e()(e,["checked","closeOnSelect","disabled","onCheckedChange","value","valueText"]),n=V(t,{type:"checkbox"}),o=Xe(),i=V(()=>o().getOptionItemProps(n),r),a=K(()=>o().getOptionItemState(n));return p($s,{value:n,get children(){return p(Od,{value:a,get children(){return p(H.div,i)}})}})},wb=e=>{let t=Xe(),r=en(),n=V(()=>t().getContentProps(),()=>r().presenceProps,e);return p(U,{get when(){return!r().unmounted},get children(){return p(H.div,se(n,{ref(o){var i=ur(r().ref,e.ref);typeof i=="function"&&i(o)}}))}})},xb=e=>e.children(Xe()),Tb=e=>{let t=Xe(),r=V(()=>t().getContextTriggerProps(),e);return p(H.button,r)},kb=e=>{let t=Xe(),r=V(()=>t().getIndicatorProps(),e);return p(H.div,r)},Cb=e=>{let[t,r]=_e()(e,["closeOnSelect","disabled","value","valueText","onSelect"]),n=Xe(),o=V(()=>n().getItemProps(t),r),i=K(()=>n().getItemState(t));return ye(()=>{let a=n().addItemListener({id:i().id,onSelect:t.onSelect});re(()=>a?.())}),p($s,{value:t,get children(){return p(Od,{value:i,get children(){return p(H.div,o)}})}})},Sb=e=>e.children(bb()),[Eb,Pb]=Ne({hookName:"useMenuItemGroupContext",providerName:""}),_b=e=>{let[t,r]=_e()(e,["id"]),n=V({id:Ae()},t),o=Xe(),i=V(()=>o().getItemGroupProps(n),r);return p(Eb,{value:n,get children(){return p(H.div,i)}})},Ib=e=>{let t=Xe(),r=Pb(),n=V(t().getItemGroupLabelProps({htmlFor:r.id}),e);return p(H.div,n)},Ab=e=>{let t=Xe(),r=yb(),n=V(()=>t().getItemIndicatorProps(r),e);return p(H.div,n)},Rb=e=>{let t=Xe(),r=yb(),n=V(()=>t().getItemTextProps(r),e);return p(H.div,n)},Ob=e=>{let t=Xe(),r=en(),n=V(()=>t().getPositionerProps(),e);return p(U,{get when(){return!r().unmounted},get children(){return p(H.div,n)}})},Nb=e=>{let[t,r]=_e()(e,["closeOnSelect","disabled","value","valueText"]),n=Xe(),o=Pb(),i=V(t,()=>({type:"radio",checked:o.value===t.value,onCheckedChange:()=>o.onValueChange?.({value:t.value})})),a=V(()=>n().getOptionItemProps(i),r),s=K(()=>n().getOptionItemState(i));return p($s,{value:i,get children(){return p(Od,{value:s,get children(){return p(H.div,a)}})}})},Db=e=>{let[t,r]=_e()(e,["id","onValueChange","value"]),n=Xe(),o=V({id:Ae()},t),i=V(()=>n().getItemGroupProps(o),r);return p(Eb,{value:o,get children(){return p(H.div,i)}})},Mb=e=>{let t=Ae(),r=Ut(),n=ot(),o=K(()=>({id:t,dir:r().dir,getRootNode:n().getRootNode,...mt(e)})),i=wt(Rd,o);return{api:K(()=>Id(i,xt)),service:i}},[Lb,$b]=Ne({hookName:"useMenuMachineContext",providerName:"",strict:!1}),[Fb,FP]=Ne({hookName:"useMenuMachineContext",providerName:"",strict:!1}),Bb=e=>{let[t,r]=Eo(e),[n,o]=_e()(r,["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]),i=Xe(),a=$b(),s=Mb(n),l=On(V(t,()=>({present:s.api().open})));return le(()=>{a&&(i?.().setChild(s.service),s.api().setParent(a))}),p(Fb,{value:()=>i?.().getTriggerItemProps(s.api()),get children(){return p(Lb,{get value(){return s.service},get children(){return p(mb,{get value(){return s.api},get children(){return p(Po,{value:l,get children(){return o.children}})}})}})}})},Ub=e=>{let t=Xe(),r=$b(),[n,o]=Eo(e),i=On(V(n,()=>({present:o.value.api().open})));return ye(()=>{r&&(t?.().setChild(o.value.service),o.value.api().setParent(r))}),p(Fb,{value:()=>t?.().getTriggerItemProps(o.value.api()),get children(){return p(Lb,{get value(){return o.value.service},get children(){return p(mb,{get value(){return o.value.api},get children(){return p(Po,{value:i,get children(){return o.children}})}})}})}})},Vb=e=>{let t=Xe(),r=V(()=>t().getSeparatorProps(),e);return p(H.hr,r)},zb=e=>{let t=Xe(),r=en(),n=V(()=>t().getTriggerProps(),()=>({"aria-controls":r().unmounted&&null}),e);return p(H.button,n)},Gb=e=>{let t=FP(),r=V(()=>t?.(),e);return p($s,{get value(){return{value:r["data-value"]}},get children(){return p(H.div,r)}})},Nr={};gt(Nr,{Arrow:()=>gb,ArrowTip:()=>hb,CheckboxItem:()=>vb,Content:()=>wb,Context:()=>xb,ContextTrigger:()=>Tb,Indicator:()=>kb,Item:()=>Cb,ItemContext:()=>Sb,ItemGroup:()=>_b,ItemGroupLabel:()=>Ib,ItemIndicator:()=>Ab,ItemText:()=>Rb,Positioner:()=>Ob,RadioItem:()=>Nb,RadioItemGroup:()=>Db,Root:()=>Bb,RootProvider:()=>Ub,Separator:()=>Vb,Trigger:()=>zb,TriggerItem:()=>Gb});var BP=Ye("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber"),Dr=BP.build();function qi(e,t){if(!(!e||!t.isActiveElement(e)))try{let{selectionStart:r,selectionEnd:n,value:o}=e;return r==null||n==null?void 0:{start:r,end:n,value:o}}catch{return}}function jb(e,t,r){if(!(!e||!r.isActiveElement(e))){if(!t){let n=e.value.length;e.setSelectionRange(n,n);return}try{let n=e.value,{start:o,end:i,value:a}=t;if(n===a){e.setSelectionRange(o,i);return}let s=Hb(a,n,o),l=o===i?s:Hb(a,n,i),c=Math.max(0,Math.min(s,n.length)),d=Math.max(c,Math.min(l,n.length));e.setSelectionRange(c,d)}catch{let n=e.value.length;e.setSelectionRange(n,n)}}}function Hb(e,t,r){let n=e.slice(0,r),o=e.slice(r),i=0,a=Math.min(n.length,t.length);for(let c=0;c0&&i>=n.length)return i;if(s>=o.length)return t.length-s;if(i>0)return i;if(s>0)return t.length-s;if(r===0&&i===0&&s===0)return t.length;if(e.length>0){let c=r/e.length;return Math.round(c*t.length)}return t.length}var Wb=e=>e.ids?.root??`number-input:${e.id}`,$o=e=>e.ids?.input??`number-input:${e.id}:input`,Nd=e=>e.ids?.incrementTrigger??`number-input:${e.id}:inc`,Dd=e=>e.ids?.decrementTrigger??`number-input:${e.id}:dec`,qb=e=>e.ids?.scrubber??`number-input:${e.id}:scrubber`,Kb=e=>`number-input:${e.id}:cursor`,Yb=e=>e.ids?.label??`number-input:${e.id}:label`,Mr=e=>e.getById($o(e)),UP=e=>e.getById(Nd(e)),VP=e=>e.getById(Dd(e));var Md=e=>e.getDoc().getElementById(Kb(e)),Zb=(e,t)=>{let r=null;return t==="increment"&&(r=UP(e)),t==="decrement"&&(r=VP(e)),r},Xb=(e,t)=>{if(!as())return zP(e,t),()=>{Md(e)?.remove()}},Jb=e=>{let t=e.getDoc(),r=t.documentElement,n=t.body;return n.style.pointerEvents="none",r.style.userSelect="none",r.style.cursor="ew-resize",()=>{n.style.pointerEvents="",r.style.userSelect="",r.style.cursor="",r.style.length||r.removeAttribute("style"),n.style.length||n.removeAttribute("style")}},Qb=(e,t)=>{let{point:r,isRtl:n,event:o}=t,i=e.getWin(),a=Sn(o.movementX,i.devicePixelRatio),s=Sn(o.movementY,i.devicePixelRatio),l=a>0?"increment":a<0?"decrement":null;n&&l==="increment"&&(l="decrement"),n&&l==="decrement"&&(l="increment");let c={x:r.x+a,y:r.y+s},d=i.innerWidth,u=Sn(7.5,i.devicePixelRatio);return c.x=Rf(c.x+u,d)-u,{hint:l,point:c}},zP=(e,t)=>{let r=e.getDoc(),n=r.createElement("div");n.className="scrubber--cursor",n.id=Kb(e),Object.assign(n.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:Ii,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),n.innerHTML=` + + + + + + `,r.body.appendChild(n)};function Ld(e,t){let{state:r,send:n,prop:o,scope:i,computed:a}=e,s=r.hasTag("focus"),l=a("isDisabled"),c=!!o("readOnly"),d=!!o("required"),u=r.matches("scrubbing"),m=a("isValueEmpty"),f=o("invalid")!==void 0?!!o("invalid"):a("isOutOfRange"),h=l||!a("canIncrement")||c,g=l||!a("canDecrement")||c,y=o("translations");return{focused:s,invalid:f,empty:m,value:a("formattedValue"),valueAsNumber:a("valueAsNumber"),setValue(w){n({type:"VALUE.SET",value:w})},clearValue(){n({type:"VALUE.CLEAR"})},increment(){n({type:"VALUE.INCREMENT"})},decrement(){n({type:"VALUE.DECREMENT"})},setToMax(){n({type:"VALUE.SET",value:o("max")})},setToMin(){n({type:"VALUE.SET",value:o("min")})},focus(){Mr(i)?.focus()},getRootProps(){return t.element({id:Wb(i),...Dr.root.attrs,dir:o("dir"),"data-disabled":te(l),"data-focus":te(s),"data-invalid":te(f),"data-scrubbing":te(u)})},getLabelProps(){return t.label({...Dr.label.attrs,dir:o("dir"),"data-disabled":te(l),"data-focus":te(s),"data-invalid":te(f),"data-required":te(d),"data-scrubbing":te(u),id:Yb(i),htmlFor:$o(i),onClick(){pe(()=>{Ac(Mr(i))})}})},getControlProps(){return t.element({...Dr.control.attrs,dir:o("dir"),role:"group","aria-disabled":l,"data-focus":te(s),"data-disabled":te(l),"data-invalid":te(f),"data-scrubbing":te(u),"aria-invalid":cr(f)})},getValueTextProps(){return t.element({...Dr.valueText.attrs,dir:o("dir"),"data-disabled":te(l),"data-invalid":te(f),"data-focus":te(s),"data-scrubbing":te(u)})},getInputProps(){return t.input({...Dr.input.attrs,dir:o("dir"),name:o("name"),form:o("form"),id:$o(i),role:"spinbutton",defaultValue:a("formattedValue"),pattern:o("formatOptions")?void 0:o("pattern"),inputMode:o("inputMode"),"aria-invalid":cr(f),"data-invalid":te(f),disabled:l,"data-disabled":te(l),readOnly:c,required:o("required"),autoComplete:"off",autoCorrect:"off",spellCheck:"false",type:"text","aria-roledescription":"numberfield","aria-valuemin":o("min"),"aria-valuemax":o("max"),"aria-valuenow":Number.isNaN(a("valueAsNumber"))?void 0:a("valueAsNumber"),"aria-valuetext":a("valueText"),"data-scrubbing":te(u),onFocus(){n({type:"INPUT.FOCUS"})},onBlur(){n({type:"INPUT.BLUR"})},onInput(w){let v=qi(w.currentTarget,i);n({type:"INPUT.CHANGE",target:w.currentTarget,hint:"set",selection:v})},onBeforeInput(w){try{let{selectionStart:v,selectionEnd:C,value:b}=w.currentTarget,T=b.slice(0,v)+(w.data??"")+b.slice(C);a("parser").isValidPartialNumber(T)||w.preventDefault()}catch{}},onKeyDown(w){if(w.defaultPrevented||c||um(w))return;let v=mm(w)*o("step"),b={ArrowUp(){n({type:"INPUT.ARROW_UP",step:v}),w.preventDefault()},ArrowDown(){n({type:"INPUT.ARROW_DOWN",step:v}),w.preventDefault()},Home(){Oi(w)||(n({type:"INPUT.HOME"}),w.preventDefault())},End(){Oi(w)||(n({type:"INPUT.END"}),w.preventDefault())},Enter(T){let _=qi(T.currentTarget,i);n({type:"INPUT.ENTER",selection:_})}}[w.key];b?.(w)}})},getDecrementTriggerProps(){return t.button({...Dr.decrementTrigger.attrs,dir:o("dir"),id:Dd(i),disabled:g,"data-disabled":te(g),"aria-label":y.decrementLabel,type:"button",tabIndex:-1,"aria-controls":$o(i),"data-scrubbing":te(u),onPointerDown(w){g||To(w)&&(n({type:"TRIGGER.PRESS_DOWN",hint:"decrement",pointerType:w.pointerType}),w.pointerType==="mouse"&&w.preventDefault(),w.pointerType==="touch"&&w.currentTarget?.focus({preventScroll:!0}))},onPointerUp(w){n({type:"TRIGGER.PRESS_UP",hint:"decrement",pointerType:w.pointerType})},onPointerLeave(){g||n({type:"TRIGGER.PRESS_UP",hint:"decrement"})}})},getIncrementTriggerProps(){return t.button({...Dr.incrementTrigger.attrs,dir:o("dir"),id:Nd(i),disabled:h,"data-disabled":te(h),"aria-label":y.incrementLabel,type:"button",tabIndex:-1,"aria-controls":$o(i),"data-scrubbing":te(u),onPointerDown(w){h||!To(w)||(n({type:"TRIGGER.PRESS_DOWN",hint:"increment",pointerType:w.pointerType}),w.pointerType==="mouse"&&w.preventDefault(),w.pointerType==="touch"&&w.currentTarget?.focus({preventScroll:!0}))},onPointerUp(w){n({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:w.pointerType})},onPointerLeave(w){n({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:w.pointerType})}})},getScrubberProps(){return t.element({...Dr.scrubber.attrs,dir:o("dir"),"data-disabled":te(l),id:qb(i),role:"presentation","data-scrubbing":te(u),onMouseDown(w){if(l||!To(w))return;let v=Kt(w),b=Se(w.currentTarget).devicePixelRatio;v.x=v.x-Sn(7.5,b),v.y=v.y-Sn(7.5,b),n({type:"SCRUBBER.PRESS_DOWN",point:v}),w.preventDefault(),pe(()=>{Ac(Mr(i))})},style:{cursor:l?void 0:"ew-resize"}})}}}var $d=new Map,Fd=!1;try{Fd=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}var Fs=!1;try{Fs=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}var ty={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}},Bs=class{format(t){let r="";if(!Fd&&this.options.signDisplay!=null?r=HP(this.numberFormatter,this.options.signDisplay,t):r=this.numberFormatter.format(t),this.options.style==="unit"&&!Fs){var n;let{unit:o,unitDisplay:i="short",locale:a}=this.resolvedOptions();if(!o)return r;let s=(n=ty[o])===null||n===void 0?void 0:n[i];r+=s[a]||s.default}return r}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,r);if(r= start date");return`${this.format(t)} \u2013 ${this.format(r)}`}formatRangeToParts(t,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,r);if(r= start date");let n=this.numberFormatter.formatToParts(t),o=this.numberFormatter.formatToParts(r);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!Fd&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Fs&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,r={}){this.numberFormatter=GP(t,r),this.options=r}};function GP(e,t={}){let{numberingSystem:r}=t;if(r&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${r}`),t.style==="unit"&&!Fs){var n;let{unit:a,unitDisplay:s="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((n=ty[a])===null||n===void 0)&&n[s]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${s}`);t={...t,style:"decimal"}}let o=e+(t?Object.entries(t).sort((a,s)=>a[0]0||Object.is(r,0):t==="exceptZero"&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),n){let o=e.format(-r),i=e.format(r),a=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(a,"+").replace("!!!",i)}else return e.format(r)}}var jP=new RegExp("^.*\\(.*\\).*$"),WP=["latn","arab","hanidec","deva","beng","fullwide"],Bo=class{parse(t){return Bd(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,r,n){return Bd(this.locale,this.options,t).isValidPartialNumber(t,r,n)}getNumberingSystem(t){return Bd(this.locale,this.options,t).options.numberingSystem}constructor(t,r={}){this.locale=t,this.options=r}},ry=new Map;function Bd(e,t,r){let n=ny(e,t);if(!e.includes("-nu-")&&!n.isValidPartialNumber(r)){for(let o of WP)if(o!==n.options.numberingSystem){let i=ny(e+(e.includes("-u-")?"-nu-":"-u-nu-")+o,t);if(i.isValidPartialNumber(r))return i}}return n}function ny(e,t){let r=e+(t?Object.entries(t).sort((o,i)=>o[0]-1&&(r=`-${r}`)}let n=r?+r:NaN;if(isNaN(n))return NaN;if(this.options.style==="percent"){var o,i;let a={...this.options,style:"decimal",minimumFractionDigits:Math.min(((o=this.options.minimumFractionDigits)!==null&&o!==void 0?o:0)+2,20),maximumFractionDigits:Math.min(((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)+2,20)};return new Bo(this.locale,a).parse(new Bs(this.locale,a).format(n))}return this.options.currencySign==="accounting"&&jP.test(t)&&(n=-1*n),n}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("\u060C",this.symbols.decimal)),this.symbols.group&&(t=Fo(t,".",this.symbols.group))),this.symbols.group==="\u2019"&&t.includes("'")&&(t=Fo(t,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(t=Fo(t," ",this.symbols.group),t=Fo(t,/\u00A0/g,this.symbols.group)),t}isValidPartialNumber(t,r=-1/0,n=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&r<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&n>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=Fo(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,r={}){this.locale=t,r.roundingIncrement!==1&&r.roundingIncrement!=null&&(r.maximumFractionDigits==null&&r.minimumFractionDigits==null?(r.maximumFractionDigits=0,r.minimumFractionDigits=0):r.maximumFractionDigits==null?r.maximumFractionDigits=r.minimumFractionDigits:r.minimumFractionDigits==null&&(r.minimumFractionDigits=r.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(t,r),this.options=this.formatter.resolvedOptions(),this.symbols=KP(t,this.formatter,this.options,r);var n,o;this.options.style==="percent"&&(((n=this.options.minimumFractionDigits)!==null&&n!==void 0?n:0)>18||((o=this.options.maximumFractionDigits)!==null&&o!==void 0?o:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}},oy=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),qP=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function KP(e,t,r,n){var o,i,a,s;let l=new Intl.NumberFormat(e,{...r,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),c=l.formatToParts(-10000.111),d=l.formatToParts(10000.111),u=qP.map($=>l.formatToParts($));var m;let f=(m=(o=c.find($=>$.type==="minusSign"))===null||o===void 0?void 0:o.value)!==null&&m!==void 0?m:"-",h=(i=d.find($=>$.type==="plusSign"))===null||i===void 0?void 0:i.value;!h&&(n?.signDisplay==="exceptZero"||n?.signDisplay==="always")&&(h="+");let y=(a=new Intl.NumberFormat(e,{...r,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find($=>$.type==="decimal"))===null||a===void 0?void 0:a.value,w=(s=c.find($=>$.type==="group"))===null||s===void 0?void 0:s.value,v=c.filter($=>!oy.has($.type)).map($=>iy($.value)),C=u.flatMap($=>$.filter(W=>!oy.has(W.type)).map(W=>iy(W.value))),b=[...new Set([...v,...C])].sort(($,W)=>W.length-$.length),T=b.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${b.join("|")}|[\\p{White_Space}]`,"gu"),_=[...new Intl.NumberFormat(r.locale,{useGrouping:!1}).format(9876543210)].reverse(),R=new Map(_.map(($,W)=>[$,W])),P=new RegExp(`[${_.join("")}]`,"g");return{minusSign:f,plusSign:h,decimal:y,group:w,literals:T,numeral:P,index:$=>String(R.get($))}}function Fo(e,t,r){return e.replaceAll?e.replaceAll(t,r):e.split(t).join(r)}function iy(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var ay=(e,t={})=>new Intl.NumberFormat(e,t),sy=(e,t={})=>new Bo(e,t),Us=(e,t)=>{let{prop:r,computed:n}=t;return r("formatOptions")?e===""?Number.NaN:n("parser").parse(e):parseFloat(e)},nn=(e,t)=>{let{prop:r,computed:n}=t;return Number.isNaN(e)?"":r("formatOptions")?n("formatter").format(e):e.toString()},ly=(e,t)=>{let r=e!==void 0&&!Number.isNaN(e)?e:1;return t?.style==="percent"&&(e===void 0||Number.isNaN(e))&&(r=.01),r};var{choose:YP,guards:ZP,createMachine:XP}=es(),{not:cy,and:dy}=ZP,Vd=XP({props({props:e}){let t=ly(e.step,e.formatOptions);return{dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:t,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0,...e,translations:{incrementLabel:"increment value",decrementLabel:"decrease value",...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getComputed:r}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){let o=r(),i=Us(n,{computed:o,prop:e});e("onValueChange")?.({value:n,valueAsNumber:i})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(n){return n?`x:${n.x}, y:${n.y}`:""}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",valueAsNumber:({context:e,computed:t,prop:r})=>Us(e.get("value"),{computed:t,prop:r}),formattedValue:({computed:e,prop:t})=>nn(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>Nf(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>Of(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!Df(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>e.get("value")==="",isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>e("translations").valueText?.(t.get("value")),formatter:Si(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>ay(e,t)),parser:Si(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>sy(e,t))},watch({track:e,action:t,context:r,computed:n,prop:o}){e([()=>r.get("value"),()=>o("locale"),()=>JSON.stringify(o("formatOptions"))],()=>{t(["syncInputElement"])}),e([()=>n("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>r.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:dy("clampValueOnBlur",cy("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]},{guard:cy("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid","invokeOnValueCommit"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnValueCommit"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:YP([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:dy("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="decrement",isIncrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="increment",isTouchPointer:({event:e})=>e.pointerType==="touch"},effects:{waitForChangeDelay({send:e}){let t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){let t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){let r=Mr(t);return hm(r,{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){let r=e.get("scrubberCursorPoint");return Xb(t,r)},preventTextSelection({scope:e}){return Jb(e)},trackButtonDisabled({context:e,scope:t,send:r}){let n=e.get("hint"),o=Zb(t,n);return cs(o,{attributes:["disabled"],callback(){r({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:r}){let n=Mr(e);if(!n||!e.isActiveElement(n)||!r("allowMouseWheel"))return;function o(i){i.preventDefault();let a=Math.sign(i.deltaY)*-1;a===1?t({type:"VALUE.INCREMENT"}):a===-1&&t({type:"VALUE.DECREMENT"})}return Te(n,"wheel",o,{passive:!1})},activatePointerLock({scope:e}){if(!as())return _m(e.getDoc())},trackMousemove({scope:e,send:t,context:r,computed:n}){let o=e.getDoc();function i(s){let l=r.get("scrubberCursorPoint"),c=n("isRtl"),d=Qb(e,{point:l,isRtl:c,event:s});d.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:d.hint,point:d.point})}function a(){t({type:"SCRUBBER.POINTER_UP"})}return Ir(Te(o,"mousemove",i,!1),Te(o,"mouseup",a,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;let r=Mr(e);e.isActiveElement(r)||pe(()=>r?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:r,computed:n}){let o=$f(n("valueAsNumber"),t.step??r("step"));r("allowOverflow")||(o=lr(o,r("min"),r("max"))),e.set("value",nn(o,{computed:n,prop:r}))},decrement({context:e,event:t,prop:r,computed:n}){let o=Ff(n("valueAsNumber"),t.step??r("step"));r("allowOverflow")||(o=lr(o,r("min"),r("max"))),e.set("value",nn(o,{computed:n,prop:r}))},setClampedValue({context:e,prop:t,computed:r}){let n=lr(r("valueAsNumber"),t("min"),t("max"));e.set("value",nn(n,{computed:r,prop:t}))},setRawValue({context:e,event:t,prop:r,computed:n}){let o=Us(t.value,{computed:n,prop:r});r("allowOverflow")||(o=lr(o,r("min"),r("max"))),e.set("value",nn(o,{computed:n,prop:r}))},setValue({context:e,event:t}){let r=t.target?.value??t.value;e.set("value",r)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:r}){let n=nn(t("max"),{computed:r,prop:t});e.set("value",n)},decrementToMin({context:e,prop:t,computed:r}){let n=nn(t("min"),{computed:r,prop:t});e.set("value",n)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){t("onFocusChange")?.({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){t("onFocusChange")?.({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:r}){if(r.type==="INPUT.CHANGE")return;let n=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";t("onValueInvalid")?.({reason:n,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnValueCommit({computed:e,prop:t}){t("onValueCommit")?.({value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:r,scope:n}){let o=t.type.endsWith("CHANGE")?e.get("value"):r("formattedValue"),i=Mr(n),a=t.selection??qi(i,n);pe(()=>{gm(i,o),jb(i,a,n)})},setFormattedValue({context:e,computed:t,action:r}){e.set("value",t("formattedValue")),r(["syncInputElement"])},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){let r=Md(t),n=e.get("scrubberCursorPoint");!r||!n||(r.style.transform=`translate3d(${n.x}px, ${n.y}px, 0px)`)}}}});var[uy,Lr]=Ne({hookName:"useNumberInputContext",providerName:""}),py=e=>e.children(Lr()),fy=e=>{let t=Lr(),r=V(()=>t().getControlProps(),e);return p(H.div,r)},my=e=>{let t=Lr(),r=V(()=>t().getDecrementTriggerProps(),e);return p(H.button,r)},gy=e=>{let t=Lr(),r=V(()=>t().getIncrementTriggerProps(),e);return p(H.button,r)},hy=e=>{let t=Lr(),r=V(()=>t().getInputProps(),e),n=Yt();return p(H.input,se({get"aria-describedby"(){return n?.().ariaDescribedby}},r))},by=e=>{let t=Lr(),r=V(()=>t().getLabelProps(),e);return p(H.label,r)},Vs=e=>{let t=Ae(),r=Ut(),n=ot(),o=Yt(),i=K(()=>({id:t,ids:{label:o?.().ids.label,input:o?.().ids.control},disabled:o?.().disabled,readOnly:o?.().readOnly,required:o?.().required,invalid:o?.().invalid,dir:r().dir,locale:r().locale,getRootNode:n().getRootNode,...mt(e)})),a=wt(Vd,i);return K(()=>Ld(a,xt))},yy=e=>{let[t,r]=_e()(e,["allowMouseWheel","allowOverflow","clampValueOnBlur","defaultValue","disabled","focusInputOnChange","form","formatOptions","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueCommit","onValueInvalid","pattern","readOnly","required","spinOnPress","step","translations","value"]),n=Vs(t),o=V(()=>n().getRootProps(),r);return p(uy,{value:n,get children(){return p(H.div,o)}})},vy=e=>{let[{value:t},r]=_e()(e,["value"]),n=V(()=>t().getRootProps(),r);return p(uy,{value:t,get children(){return p(H.div,n)}})},wy=e=>{let t=Lr(),r=V(()=>t().getScrubberProps(),e);return p(H.div,r)},xy=e=>{let t=Lr(),r=V(()=>t().getValueTextProps(),e);return p(H.span,r)},on={};gt(on,{Context:()=>py,Control:()=>fy,DecrementTrigger:()=>my,IncrementTrigger:()=>gy,Input:()=>hy,Label:()=>by,Root:()=>yy,RootProvider:()=>vy,Scrubber:()=>wy,ValueText:()=>xy});var QP=Ye("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),an=QP.build();var zd=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,Gd=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,zs=e=>e.ids?.content??`dialog:${e.id}:content`,Hd=e=>e.ids?.trigger??`dialog:${e.id}:trigger`,Gs=e=>e.ids?.title??`dialog:${e.id}:title`,Hs=e=>e.ids?.description??`dialog:${e.id}:description`,jd=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,Ki=e=>e.getById(zs(e)),Ty=e=>e.getById(zd(e)),ky=e=>e.getById(Gd(e)),Cy=e=>e.getById(Hd(e)),Sy=e=>e.getById(Gs(e)),Ey=e=>e.getById(Hs(e)),Py=e=>e.getById(jd(e));function Wd(e,t){let{state:r,send:n,context:o,prop:i,scope:a}=e,s=i("aria-label"),l=r.matches("open");return{open:l,setOpen(c){r.matches("open")!==c&&n({type:c?"OPEN":"CLOSE"})},getTriggerProps(){return t.button({...an.trigger.attrs,dir:i("dir"),id:Hd(a),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":zs(a),onClick(c){c.defaultPrevented||n({type:"TOGGLE"})}})},getBackdropProps(){return t.element({...an.backdrop.attrs,dir:i("dir"),hidden:!l,id:Gd(a),"data-state":l?"open":"closed"})},getPositionerProps(){return t.element({...an.positioner.attrs,dir:i("dir"),id:zd(a),style:{pointerEvents:l?void 0:"none"}})},getContentProps(){let c=o.get("rendered");return t.element({...an.content.attrs,dir:i("dir"),role:i("role"),hidden:!l,id:zs(a),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":s||void 0,"aria-labelledby":s||!c.title?void 0:Gs(a),"aria-describedby":c.description?Hs(a):void 0})},getTitleProps(){return t.element({...an.title.attrs,dir:i("dir"),id:Gs(a)})},getDescriptionProps(){return t.element({...an.description.attrs,dir:i("dir"),id:Hs(a)})},getCloseTriggerProps(){return t.button({...an.closeTrigger.attrs,dir:i("dir"),id:jd(a),type:"button",onClick(c){c.defaultPrevented||(c.stopPropagation(),n({type:"CLOSE"}))}})}}}var qd=Ot({props({props:e,scope:t}){let r=e.role==="alertdialog",n=r?()=>Py(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return{role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:o&&!r,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:n,...e}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:r}){e([()=>r("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:r}){return ys(()=>Ki(e),{type:"dialog",defer:!0,pointerBlocking:r("modal"),exclude:[Cy(e)],onInteractOutside(o){r("onInteractOutside")?.(o),r("closeOnInteractOutside")||o.preventDefault()},persistentElements:r("persistentElements"),onFocusOutside:r("onFocusOutside"),onPointerDownOutside:r("onPointerDownOutside"),onRequestDismiss:r("onRequestDismiss"),onEscapeKeyDown(o){r("onEscapeKeyDown")?.(o),r("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return Qh(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Ih(()=>Ki(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:n=>t("finalFocusEl")?.()??n,getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?Xh(()=>[Ki(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){pe(()=>{e.set("rendered",{title:!!Sy(t),description:!!Ey(t)})})},syncZIndex({scope:e}){pe(()=>{let t=Ki(e);if(!t)return;let r=_t(t);[Ty(e),ky(e)].forEach(o=>{o?.style.setProperty("--z-index",r.zIndex),o?.style.setProperty("--layer-index",r.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},toggleVisibility({prop:e,send:t,event:r}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:r})}}}});var[Iy,$r]=Ne({hookName:"useDialogContext",providerName:""}),Ay=e=>{let t=$r(),r=Uf(),n=On(V(r,()=>({present:t().open}))),o=V(()=>t().getBackdropProps(),()=>n().presenceProps,e);return p(U,{get when(){return!n().unmounted},get children(){return p(H.div,se(o,{ref(i){var a=ur(n().ref,e.ref);typeof a=="function"&&a(i)}}))}})},Ry=e=>{let t=$r(),r=V(()=>t().getCloseTriggerProps(),e);return p(H.button,r)},Oy=e=>{let t=$r(),r=en(),n=V(()=>t().getContentProps(),()=>r().presenceProps,e);return p(U,{get when(){return!r().unmounted},get children(){return p(H.div,se(n,{ref(o){var i=ur(r().ref,e.ref);typeof i=="function"&&i(o)}}))}})},Ny=e=>e.children($r()),Dy=e=>{let t=$r(),r=V(()=>t().getDescriptionProps(),e);return p(H.div,r)},My=e=>{let t=$r(),r=en(),n=V(()=>t().getPositionerProps(),e);return p(U,{get when(){return!r().unmounted},get children(){return p(H.div,n)}})},Ly=e=>{let t=Ae(),r=Ut(),n=ot(),o=K(()=>({id:t,dir:r().dir,getRootNode:n().getRootNode,...mt(e)})),i=wt(qd,o);return K(()=>Wd(i,xt))},$y=e=>{let[t,r]=Eo(e),[n]=Ci(t),[o,i]=_e()(r,["aria-label","closeOnEscape","closeOnInteractOutside","defaultOpen","finalFocusEl","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),a=Ly(o),s=On(V(t,()=>({present:a().open})));return p(Iy,{value:a,get children(){return p(Cc,{value:n,get children(){return p(Po,{value:s,get children(){return i.children}})}})}})},Fy=e=>{let[t,r]=Eo(e),[n]=Ci(t),o=On(V(t,()=>({present:r.value().open})));return p(Iy,{get value(){return r.value},get children(){return p(Cc,{value:n,get children(){return p(Po,{value:o,get children(){return r.children}})}})}})},By=e=>{let t=$r(),r=V(()=>t().getTitleProps(),e);return p(H.h2,r)},Uy=e=>{let t=$r(),r=en(),n=V(()=>t().getTriggerProps(),()=>({"aria-controls":r().unmounted&&null}),e);return p(H.button,n)},sn={};gt(sn,{Backdrop:()=>Ay,CloseTrigger:()=>Ry,Content:()=>Oy,Context:()=>Ny,Description:()=>Dy,Positioner:()=>My,Root:()=>$y,RootProvider:()=>Fy,Title:()=>By,Trigger:()=>Uy});var t1=Symbol("store-raw"),r1=Symbol("store-node"),Uo=Symbol("store-has"),n1=Symbol("store-self");function Yi(e){let t;return e!=null&&typeof e=="object"&&(e[mo]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Kd(e,t=new Set){let r,n,o,i;if(r=e!=null&&e[t1])return r;if(!Yi(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let a=0,s=e.length;ar),Array.isArray(e)&&e.length!==i){for(let l=e.length;l=u&&f>=u&&(i[m]===e[f]||o&&i[m]&&e[f]&&i[m][o]&&i[m][o]===e[f][o]);m--,f--)w[f]=i[m];if(u>f||u>m){for(d=u;d<=f;d++)ln(i,d,e[d]);for(;de.length&&ln(i,"length",e.length);return}for(g=new Array(f+1),d=f;d>=u;d--)h=e[d],y=o&&h?h[o]:h,c=v.get(y),g[d]=c===void 0?-1:c,v.set(y,d);for(c=u;c<=m;c++)h=i[c],y=o&&h?h[o]:h,d=v.get(y),d!==void 0&&d!==-1&&(w[d]=i[c],d=g[d],v.set(y,d));for(d=u;de.length&&ln(i,"length",e.length);return}let s=Object.keys(e);for(let c=0,d=s.length;c{if(!Yi(i)||!Yi(o))return o;let a=Vo(o,{[Yd]:i},Yd,r,n);return a===void 0?i:a}}var js=Ye("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger","progressText"),Qt=js.build();var Gy=e=>e.ids?.root??`carousel:${e.id}`,Hy=(e,t)=>e.ids?.item?.(t)??`carousel:${e.id}:item:${t}`,Zi=e=>e.ids?.itemGroup??`carousel:${e.id}:item-group`,jy=e=>e.ids?.nextTrigger??`carousel:${e.id}:next-trigger`,Wy=e=>e.ids?.prevTrigger??`carousel:${e.id}:prev-trigger`,qy=e=>e.ids?.indicatorGroup??`carousel:${e.id}:indicator-group`,Zd=(e,t)=>e.ids?.indicator?.(t)??`carousel:${e.id}:indicator:${t}`;var yt=e=>e.getById(Zi(e));var Xd=e=>ps(yt(e),"[data-part=item]"),Ky=(e,t)=>e.getById(Zd(e,t)),Jd=e=>{let t=yt(e);if(!t)return;let r=Qr(t);t.setAttribute("tabindex",r.length>0?"-1":"0")};function Qd(e,t){let{state:r,context:n,computed:o,send:i,scope:a,prop:s}=e,l=r.matches("autoplay"),c=r.matches("dragging"),d=o("canScrollNext"),u=o("canScrollPrev"),m=o("isHorizontal"),f=s("autoSize"),h=Array.from(n.get("pageSnapPoints")),g=n.get("page"),y=h.length?lr(g,0,h.length-1):0,w=s("slidesPerPage"),v=s("padding"),C=s("translations");return{isPlaying:l,isDragging:c,page:y,pageSnapPoints:h,canScrollNext:d,canScrollPrev:u,getProgress(){return y/h.length},getProgressText(){let b={page:y+1,totalPages:h.length};return C.progressText?.(b)??""},scrollToIndex(b,T){i({type:"INDEX.SET",index:b,instant:T})},scrollTo(b,T){i({type:"PAGE.SET",index:b,instant:T})},scrollNext(b){i({type:"PAGE.NEXT",instant:b})},scrollPrev(b){i({type:"PAGE.PREV",instant:b})},play(){i({type:"AUTOPLAY.START"})},pause(){i({type:"AUTOPLAY.PAUSE"})},isInView(b){return Array.from(n.get("slidesInView")).includes(b)},refresh(){i({type:"SNAP.REFRESH"})},getRootProps(){return t.element({...Qt.root.attrs,id:Gy(a),role:"region","aria-roledescription":"carousel","data-orientation":s("orientation"),dir:s("dir"),style:{"--slides-per-page":w,"--slide-spacing":s("spacing"),"--slide-item-size":f?"auto":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}})},getItemGroupProps(){return t.element({...Qt.itemGroup.attrs,id:Zi(a),"data-orientation":s("orientation"),"data-dragging":te(c),dir:s("dir"),"aria-live":l?"off":"polite",onFocus(b){nt(b.currentTarget,Be(b))&&i({type:"VIEWPORT.FOCUS"})},onBlur(b){nt(b.currentTarget,b.relatedTarget)||i({type:"VIEWPORT.BLUR"})},onMouseDown(b){if(b.defaultPrevented||!s("allowMouseDrag")||!To(b))return;let T=Be(b);Nt(T)&&T!==b.currentTarget||(b.preventDefault(),i({type:"DRAGGING.START"}))},onWheel:If(b=>{let T=s("orientation")==="horizontal"?"deltaX":"deltaY";b[T]<0&&!o("canScrollPrev")||b[T]>0&&!o("canScrollNext")||i({type:"USER.SCROLL"})},150),onTouchStart(){i({type:"USER.SCROLL"})},style:{display:f?"flex":"grid",gap:"var(--slide-spacing)",scrollSnapType:[m?"x":"y",s("snapType")].join(" "),gridAutoFlow:m?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[m?"gridAutoColumns":"gridAutoRows"]:f?void 0:"var(--slide-item-size)",[m?"scrollPaddingInline":"scrollPaddingBlock"]:v,[m?"paddingInline":"paddingBlock"]:v,[m?"overflowX":"overflowY"]:"auto"}})},getItemProps(b){let T=n.get("slidesInView").includes(b.index);return t.element({...Qt.item.attrs,id:Hy(a,b.index),dir:s("dir"),role:"group","data-index":b.index,"data-inview":te(T),"aria-roledescription":"slide","data-orientation":s("orientation"),"aria-label":C.item(b.index,s("slideCount")),"aria-hidden":cr(!T),style:{flex:"0 0 auto",[m?"maxWidth":"maxHeight"]:"100%",scrollSnapAlign:(()=>{let _=b.snapAlign??"start",R=s("slidesPerMove"),P=R==="auto"?Math.floor(s("slidesPerPage")):R;return(b.index+P)%P===0?_:void 0})()}})},getControlProps(){return t.element({...Qt.control.attrs,"data-orientation":s("orientation")})},getPrevTriggerProps(){return t.button({...Qt.prevTrigger.attrs,id:Wy(a),type:"button",disabled:!u,dir:s("dir"),"aria-label":C.prevTrigger,"data-orientation":s("orientation"),"aria-controls":Zi(a),onClick(b){b.defaultPrevented||i({type:"PAGE.PREV",src:"trigger"})}})},getNextTriggerProps(){return t.button({...Qt.nextTrigger.attrs,dir:s("dir"),id:jy(a),type:"button","aria-label":C.nextTrigger,"data-orientation":s("orientation"),"aria-controls":Zi(a),disabled:!d,onClick(b){b.defaultPrevented||i({type:"PAGE.NEXT",src:"trigger"})}})},getIndicatorGroupProps(){return t.element({...Qt.indicatorGroup.attrs,dir:s("dir"),id:qy(a),"data-orientation":s("orientation"),onKeyDown(b){if(b.defaultPrevented)return;let T="indicator",_={ArrowDown(A){m||(i({type:"PAGE.NEXT",src:T}),A.preventDefault())},ArrowUp(A){m||(i({type:"PAGE.PREV",src:T}),A.preventDefault())},ArrowRight(A){m&&(i({type:"PAGE.NEXT",src:T}),A.preventDefault())},ArrowLeft(A){m&&(i({type:"PAGE.PREV",src:T}),A.preventDefault())},Home(A){i({type:"PAGE.SET",index:0,src:T}),A.preventDefault()},End(A){i({type:"PAGE.SET",index:h.length-1,src:T}),A.preventDefault()}},R=Ni(b,{dir:s("dir"),orientation:s("orientation")}),P=_[R];P?.(b)}})},getIndicatorProps(b){return t.button({...Qt.indicator.attrs,dir:s("dir"),id:Zd(a,b.index),type:"button","data-orientation":s("orientation"),"data-index":b.index,"data-readonly":te(b.readOnly),"data-current":te(b.index===y),"aria-label":C.indicator(b.index),onClick(T){T.defaultPrevented||b.readOnly||i({type:"PAGE.SET",index:b.index,src:"indicator"})}})},getAutoplayTriggerProps(){return t.button({...Qt.autoplayTrigger.attrs,type:"button","data-orientation":s("orientation"),"data-pressed":te(l),"aria-label":l?C.autoplayStop:C.autoplayStart,onClick(b){b.defaultPrevented||i({type:l?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}})},getProgressTextProps(){return t.element({...Qt.progressText.attrs})}}}var ru=e=>_t(e).direction;function Zy(e){let t=_t(e),r=e.getBoundingClientRect(),n=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),i=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function s(m,f){let h=parseFloat(m);return/%/.test(m)&&(h/=100,h*=f),Number.isNaN(h)?0:h}let l=s(n,r.width),c=s(o,r.height),d=s(i,r.width),u=s(a,r.height);return{x:{before:l,after:d},y:{before:c,after:u}}}function i1(e,t,r="both"){return r==="x"&&e.right>=t.left&&e.left<=t.right||r==="y"&&e.bottom>=t.top&&e.top<=t.bottom||r==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function Xy(e){let t=[];for(let r of e.children)t=t.concat(r,Xy(r));return t}function Jy(e,t=!1){let r=e.getBoundingClientRect(),o=ru(e)==="rtl",i={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},a=t?Xy(e):e.children;for(let s of["x","y"]){let l=s==="x"?"y":"x",c=s==="x"?"left":"top",d=s==="x"?"right":"bottom",u=s==="x"?"width":"height",m=s==="x"?"scrollLeft":"scrollTop",f=o&&s==="x";for(let h of a){let g=h.getBoundingClientRect();if(!i1(r,g,l))continue;let y=_t(h),[w,v]=y.getPropertyValue("scroll-snap-align").split(" ");typeof v>"u"&&(v=w);let C=s==="x"?v:w,b,T,_;if(f){let R=Math.abs(e[m]),P=r[d]-g[d]+R;b=P,T=P+g[u],_=P+g[u]/2}else b=g[c]-r[c]+e[m],T=b+g[u],_=b+g[u]/2;switch(C){case"none":break;case"start":i[s].start.push({node:h,position:b});break;case"center":i[s].center.push({node:h,position:_});break;case"end":i[s].end.push({node:h,position:T});break}}}return i}function Qy(e){let t=ru(e),r=e.getBoundingClientRect(),n=Zy(e),o=Jy(e),i={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight},a=t==="rtl",s=a&&e.scrollLeft<=0,l;return a?(l=eu([...o.x.start.map(c=>c.position-n.x.after),...o.x.center.map(c=>c.position-r.width/2),...o.x.end.map(c=>c.position-r.width+n.x.before)].map(tu(0,i.x))),s&&(l=l.map(c=>-c))):l=eu([...o.x.start.map(c=>c.position-n.x.before),...o.x.center.map(c=>c.position-r.width/2),...o.x.end.map(c=>c.position-r.width+n.x.after)].map(tu(0,i.x))),{x:l,y:eu([...o.y.start.map(c=>c.position-n.y.before),...o.y.center.map(c=>c.position-r.height/2),...o.y.end.map(c=>c.position-r.height+n.y.after)].map(tu(0,i.y)))}}function ev(e,t,r){let n=ru(e),o=Zy(e),i=Jy(e),a=[...i[t].start,...i[t].center,...i[t].end],s=n==="rtl",l=s&&t==="x"&&e.scrollLeft<=0;for(let c of a)if(r(c.node)){let d;return t==="x"&&s?(d=c.position-o.x.after,l&&(d=-d)):d=c.position-(t==="x"?o.x.before:o.y.before),d}}var eu=e=>[...new Set(e)],tu=(e,t)=>r=>Math.max(e,Math.min(t,r));var nu=Ot({props({props:e}){return Xa(e,["slideCount"],"carousel"),{dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6,autoSize:!1,...e,translations:{nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,r)=>`${t+1} of ${r}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation",progressText:({page:t,totalPages:r})=>`${t} / ${r}`,...e.translations}}},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:r}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(n){let i=r().get("pageSnapPoints");e("onPageChange")?.({page:n,pageSnapPoint:i[n]})}})),pageSnapPoints:t(()=>({defaultValue:e("autoSize")?Array.from({length:e("slideCount")},(n,o)=>o):a1(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{let t=e("autoplay");return Wa(t)?t.delay:4e3}},watch({track:e,action:t,context:r,prop:n,send:o}){e([()=>n("slidesPerPage"),()=>n("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>r.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>n("orientation"),()=>n("autoSize"),()=>n("dir")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>n("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!n("autoplay")],()=>{o({type:n("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"settling",actions:["endDragging"]}}},settling:{effects:["trackSettlingScroll"],on:{"DRAGGING.START":{target:"dragging",actions:["clearScrollEndTimer","invokeDragStart"]},"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["clearScrollEndTimer","setClosestPage","invokeDraggingEnd"]},{target:"idle",actions:["clearScrollEndTimer","setClosestPage","invokeDraggingEnd"]}]}},userScroll:{effects:["trackScroll"],on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(yt(e))},effects:{autoUpdateSlide({computed:e,send:t}){let r=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(r)},trackSlideMutation({scope:e,send:t}){let r=yt(e);if(!r)return;let n=e.getWin(),o=new n.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Jd(e)});return Jd(e),o.observe(r,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){let r=yt(e);if(!r)return;let n=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};pe(()=>{n(),pe(()=>{t({type:"PAGE.SCROLL",instant:!0})})});let o=Xd(e);o.forEach(n);let i=[Vc.observe(r,n),...o.map(a=>Vc.observe(a,n))];return Ir(...i)},trackSlideIntersections({scope:e,prop:t,context:r}){let n=yt(e),o=e.getWin(),i=new o.IntersectionObserver(a=>{let s=a.reduce((l,c)=>{let d=c.target,u=Number(d.dataset.index??"-1");return u==null||Number.isNaN(u)||u===-1?l:c.isIntersecting?yf(l,u):vf(l,u)},r.get("slidesInView"));r.set("slidesInView",wf(s))},{root:n,threshold:t("inViewThreshold")});return Xd(e).forEach(a=>i.observe(a)),()=>i.disconnect()},trackScroll({send:e,refs:t,scope:r}){let n=yt(r);return n?Te(n,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackSettlingScroll({send:e,refs:t,scope:r}){let n=yt(r);if(!n)return;let o=()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},200))};o();let a=Te(n,"scroll",()=>{o()},{passive:!0});return()=>{a(),clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0)}},trackDocumentVisibility({scope:e,send:t}){let r=e.getDoc();return Te(r,"visibilitychange",()=>{r.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){let r=e.getDoc();return Am(r,{onPointerMove({event:n}){t({type:"DRAGGING",left:-n.movementX,top:-n.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:r}){let n=e.getWin();return Te(n,"keydown",i=>{switch(i.key){case"ArrowRight":i.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":i.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":i.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":i.preventDefault(),t({type:"PAGE.SET",index:r.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:r,computed:n,flush:o}){let i=t.instant?"instant":"smooth",a=lr(t.index??e.get("page"),0,e.get("pageSnapPoints").length-1),s=yt(r);if(!s)return;let l=n("isHorizontal")?"left":"top";o(()=>{s.scrollTo({[l]:e.get("pageSnapPoints")[a],behavior:i})})},setClosestPage({context:e,scope:t,computed:r}){let n=yt(t);if(!n)return;let o=r("isHorizontal")?n.scrollLeft:n.scrollTop,i=e.get("pageSnapPoints");if(!i.length)return;let a=i.reduce((s,l,c)=>{let d=Math.abs(l-o),u=Math.abs(i[s]-o);return ds.dataset.index===t.index.toString());if(i==null)return;let a=e.get("pageSnapPoints").findIndex(s=>Math.abs(s-i)<1);e.set("page",a)},setPage({context:e,event:t}){let r=t.index??e.get("page");e.set("page",r)},setSnapPoints({context:e,computed:t,scope:r}){let n=yt(r);if(!n)return;let o=Qy(n),i=t("isHorizontal")?o.x:o.y;if(e.set("pageSnapPoints",i),!i.length)return;let a=lr(e.get("page"),0,i.length-1);e.set("page",a)},disableScrollSnap({scope:e}){let t=yt(e);if(!t)return;let r=getComputedStyle(t);t.dataset.scrollSnapType=r.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){yt(e)?.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:r}){let n=yt(e);if(!n)return;let o=r("isHorizontal"),i=o?n.scrollLeft:n.scrollTop,a=t.get("pageSnapPoints");if(!a.length)return;let s=a.reduce((l,c)=>Math.abs(c-i){n.scrollTo({left:o?s:n.scrollLeft,top:o?n.scrollTop:s,behavior:"smooth"});let l=n.dataset.scrollSnapType;l&&(n.style.setProperty("scroll-snap-type",l),delete n.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:r}){if(t.src!=="indicator")return;let n=Ky(r,e.get("page"));n&&pe(()=>n.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){t("onDragStatusChange")?.({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){t("onDragStatusChange")?.({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){t("onDragStatusChange")?.({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){t("onAutoplayStatusChange")?.({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){t("onAutoplayStatusChange")?.({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){t("onAutoplayStatusChange")?.({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}});function a1(e,t,r){if(e==null||r<=0)return[];let n=[],o=t==="auto"?Math.floor(r):t;if(o<=0)return[];for(let i=0;ie);i+=o)n.push(i);return n}var ou=js.extendWith("progressText","autoplayIndicator");var[tv,jt]=Ne({hookName:"useCarouselContext",providerName:""}),l1=ou.build(),rv=e=>{let t=jt();return p(H.span,se(()=>l1.autoplayIndicator.attrs,e,{get children(){return p(U,{get when(){return t().isPlaying},get fallback(){return e.fallback},get children(){return e.children}})}}))},c1=ou.build(),nv=e=>{let t=jt(),r=K(()=>{let n=t().page+1,o=t().pageSnapPoints.length;return`${n} / ${o}`});return p(H.span,se(()=>c1.progressText.attrs,e,{get children(){return e.children||r()}}))},ov=e=>{let t=jt(),r=V(()=>t().getAutoplayTriggerProps(),e);return p(H.button,r)},iv=e=>e.children(jt()),av=e=>{let t=jt(),r=V(()=>t().getControlProps(),e);return p(H.div,r)},sv=e=>{let[t,r]=_e()(e,["index","readOnly"]),n=jt(),o=V(()=>n().getIndicatorProps(t),r);return p(H.button,o)},lv=e=>{let t=jt(),r=V(()=>t().getIndicatorGroupProps(),e);return p(H.div,r)},cv=e=>{let[t,r]=_e()(e,["index","snapAlign"]),n=jt(),o=V(()=>n().getItemProps(t),r);return p(H.div,o)},dv=e=>{let t=jt(),r=V(()=>t().getItemGroupProps(),e);return p(H.div,r)},uv=e=>{let t=jt(),r=V(()=>t().getNextTriggerProps(),e);return p(H.button,r)},pv=e=>{let t=jt(),r=V(()=>t().getPrevTriggerProps(),e);return p(H.button,r)},fv=e=>{let t=Ae(),r=Ut(),n=ot(),o=K(()=>({id:t,dir:r().dir,getRootNode:n().getRootNode,...mt(e)})),i=wt(nu,o);return K(()=>Qd(i,xt))},mv=e=>{let[t,r]=_e()(e,["allowMouseDrag","autoplay","autoSize","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),n=fv(t),o=V(()=>n().getRootProps(),r);return p(tv,{value:n,get children(){return p(H.div,o)}})},gv=e=>{let[{value:t},r]=_e()(e,["value"]),n=V(()=>t().getRootProps(),r);return p(tv,{value:t,get children(){return p(H.div,n)}})},Fr={};gt(Fr,{AutoplayIndicator:()=>rv,AutoplayTrigger:()=>ov,Context:()=>iv,Control:()=>av,Indicator:()=>sv,IndicatorGroup:()=>lv,Item:()=>cv,ItemGroup:()=>dv,NextTrigger:()=>uv,PrevTrigger:()=>pv,ProgressText:()=>nv,Root:()=>mv,RootProvider:()=>gv});var hv=async e=>{let t;try{let r=typeof e=="string"?e:e.url;t=await fetch(r,{method:typeof e=="string"?"GET":e.method,mode:"cors",headers:typeof e!="string"&&ue(e.body)?{"Content-Type":"application/json"}:void 0,body:typeof e!="string"&&ue(e.body)?JSON.stringify(e.body):void 0});let n=await t.json();if(!t.ok)throw"error"in n?n.error:n;return{data:n,response:t}}catch(r){return console.error(r),{error:r,response:t}}},ue=e=>e!=null,et=e=>e==null,Ue=e=>e==null||e==="",ke=e=>e!=null&&e!=="";var bv=e=>{e.split("").forEach(r=>{let[n,o]=r.split("