@embedreach/components 0.2.17 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -50,7 +50,7 @@ const Xu=su("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2
50
50
  *
51
51
  * This source code is licensed under the ISC license.
52
52
  * See the LICENSE file in the root directory of this source tree.
53
- */function yd(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=bd(e))&&(r&&(r+=" "),r+=t);return r}const bd=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bd(e[r]))&&(n&&(n+=" "),n+=t);return n};function xd(e,...t){let n,r,o,i=function(s){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:hd(e.cacheSize),parseClassName:md(e),...id(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(vd);let s="";for(let l=a.length-1;l>=0;l-=1){const e=a[l],{modifiers:t,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(e);let p=Boolean(d),f=r(p?u.substring(0,d):u);if(!f){if(!p){s=e+(s.length>0?" "+s:s);continue}if(f=r(u),!f){s=e+(s.length>0?" "+s:s);continue}p=!1}const h=gd(t).join(":"),m=c?h+"!":h,g=m+f;if(i.includes(g))continue;i.push(g);const v=o(f,p);for(let n=0;n<v.length;++n)i.push(m+v[n]);s=e+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(yd.apply(null,arguments))}}const wd=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},_d=/^\[(?:([a-z-]+):)?(.+)\]$/i,Sd=/^\d+\/\d+$/,Ed=new Set(["px","full","screen"]),Td=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ad=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Nd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Od=e=>kd(e)||Ed.has(e)||Sd.test(e),Pd=e=>qd(e,"length",Gd),kd=e=>Boolean(e)&&!Number.isNaN(Number(e)),Md=e=>qd(e,"number",kd),jd=e=>Boolean(e)&&Number.isInteger(Number(e)),Ld=e=>e.endsWith("%")&&kd(e.slice(0,-1)),Dd=e=>_d.test(e),Id=e=>Td.test(e),Fd=new Set(["length","size","percentage"]),Ud=e=>qd(e,Fd,Kd),$d=e=>qd(e,"position",Kd),Vd=new Set(["image","url"]),Bd=e=>qd(e,Vd,Yd),zd=e=>qd(e,"",Wd),Hd=()=>!0,qd=(e,t,n)=>{const r=_d.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Gd=e=>Cd.test(e)&&!Ad.test(e),Kd=()=>!1,Wd=e=>Nd.test(e),Yd=e=>Rd.test(e),Xd=xd((()=>{const e=wd("colors"),t=wd("spacing"),n=wd("blur"),r=wd("brightness"),o=wd("borderColor"),i=wd("borderRadius"),a=wd("borderSpacing"),s=wd("borderWidth"),l=wd("contrast"),c=wd("grayscale"),u=wd("hueRotate"),d=wd("invert"),p=wd("gap"),f=wd("gradientColorStops"),h=wd("gradientColorStopPositions"),m=wd("inset"),g=wd("margin"),v=wd("opacity"),y=wd("padding"),b=wd("saturate"),x=wd("scale"),w=wd("sepia"),_=wd("skew"),S=wd("space"),E=wd("translate"),T=()=>["auto",Dd,t],C=()=>[Dd,t],A=()=>["",Od,Pd],N=()=>["auto",kd,Dd],R=()=>["","0",Dd],O=()=>[kd,Dd];return{cacheSize:500,separator:":",theme:{colors:[Hd],spacing:[Od,Pd],blur:["none","",Id,Dd],brightness:O(),borderColor:[e],borderRadius:["none","","full",Id,Dd],borderSpacing:C(),borderWidth:A(),contrast:O(),grayscale:R(),hueRotate:O(),invert:R(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Ld,Pd],inset:T(),margin:T(),opacity:O(),padding:C(),saturate:O(),scale:O(),sepia:R(),skew:O(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",Dd]}],container:["container"],columns:[{columns:[Id]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Dd]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",jd,Dd]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Dd]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",jd,Dd]}],"grid-cols":[{"grid-cols":[Hd]}],"col-start-end":[{col:["auto",{span:["full",jd,Dd]},Dd]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[Hd]}],"row-start-end":[{row:["auto",{span:[jd,Dd]},Dd]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Dd]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Dd]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Dd,t]}],"min-w":[{"min-w":[Dd,t,"min","max","fit"]}],"max-w":[{"max-w":[Dd,t,"none","full","min","max","fit","prose",{screen:[Id]},Id]}],h:[{h:[Dd,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Dd,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Dd,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Dd,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Id,Pd]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Md]}],"font-family":[{font:[Hd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Dd]}],"line-clamp":[{"line-clamp":["none",kd,Md]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Od,Dd]}],"list-image":[{"list-image":["none",Dd]}],"list-style-type":[{list:["none","disc","decimal",Dd]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Od,Pd]}],"underline-offset":[{"underline-offset":["auto",Od,Dd]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Dd]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Dd]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",$d]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ud]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Bd]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Od,Dd]}],"outline-w":[{outline:[Od,Pd]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Od,Pd]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Id,zd]}],"shadow-color":[{shadow:[Hd]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Id,Dd]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Dd]}],duration:[{duration:O()}],ease:[{ease:["linear","in","out","in-out",Dd]}],delay:[{delay:O()}],animate:[{animate:["none","spin","ping","pulse","bounce",Dd]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[jd,Dd]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Dd]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Dd]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Dd]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Od,Pd,Md]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function Zd(...e){return Xd(eu(e))}const Qd=Gc,Jd=i.forwardRef((({className:e,...n},r)=>t.jsx(Kc,{ref:r,className:Zd("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-0 sm:right-0 sm:bottom-auto sm:flex-col md:max-w-[420px]",e),...n})));Jd.displayName=Kc.displayName;const ep=ru("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-muted text-muted-foreground",success:"border bg-green-100 text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),tp=i.forwardRef((({className:e,variant:n,...r},o)=>t.jsx(Wc,{ref:o,className:Zd(ep({variant:n}),e),...r})));tp.displayName=Wc.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx(Zc,{ref:r,className:Zd("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...n}))).displayName=Zc.displayName;const np=i.forwardRef((({className:e,...n},r)=>t.jsx(Qc,{ref:r,className:Zd("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...n,children:t.jsx(rd,{className:"h-4 w-4"})})));np.displayName=Qc.displayName;const rp=i.forwardRef((({className:e,...n},r)=>t.jsx(Yc,{ref:r,className:Zd("text-sm font-semibold [&+div]:text-xs",e),...n})));rp.displayName=Yc.displayName;const op=i.forwardRef((({className:e,...n},r)=>t.jsx(Xc,{ref:r,className:Zd("text-sm opacity-90",e),...n})));function ip(){const{toasts:e}=jl();return t.jsxs(Qd,{children:[e.map((function({id:e,title:n,description:r,action:o,...i}){return t.jsxs(tp,{...i,children:[t.jsxs("div",{className:"grid gap-1",children:[n&&t.jsx(rp,{children:n}),r&&t.jsx(op,{children:r})]}),o,t.jsx(np,{})]},e)})),t.jsx(Jd,{})]})}op.displayName=Xc.displayName;const ap=(e,r,o,i)=>{const a=n.createContext({state:o});return{Context:a,Provider:({children:s})=>{const[l,c]=n.useReducer(e,o),u=n.useMemo((()=>Object.keys(r).reduce(((e,t)=>({...e,[t]:r[t](c)})),{})),[c]);n.useEffect((()=>{const e=[];return i?.length&&i.forEach((({eventName:t,handler:n})=>{const r=n(c),o=be.subscribe(t,r);e.push(o)})),()=>e.forEach((e=>e()))}),[c]);const d=n.useMemo((()=>({state:l,...u})),[l,u]);return t.jsx(a.Provider,{value:d,children:s})}}},sp=[{eventName:xe,handler:e=>()=>{e({type:"SET_AUTHENTICATED",payload:!1}),e({type:"SET_REAUTHING",payload:!0})}},{eventName:we,handler:e=>()=>{e({type:"SET_AUTHENTICATED",payload:!0})}},{eventName:"iframe:token-reauthenticated",handler:e=>t=>{t&&"string"==typeof t.token&&(Ne(t.token),e({type:"SET_AUTHENTICATED",payload:!0}))}}],{Context:lp,Provider:cp}=ap(((e,t)=>{switch(t.type){case"SET_AUTHENTICATED":return{...e,isAuthenticated:t.payload,error:null,reauthing:!1};case"SET_LOADING":return{...e,loading:t.payload};case"SET_ERROR":return{...e,error:t.payload,isAuthenticated:!1,reauthing:!1};case"SET_REAUTHING":return e.reauthing&&t.payload?e:{...e,reauthing:t.payload};default:return e}}),{handleReauth:e=>async t=>{if(t){e({type:"SET_REAUTHING",payload:!0});try{const n=await t();n&&(Ne(n),e({type:"SET_AUTHENTICATED",payload:!0}))}catch(n){e({type:"SET_ERROR",payload:n instanceof Error?n.message:"Reauthorization failed"})}}else e({type:"SET_ERROR",payload:"No reauth callback provided"})}},{isAuthenticated:!1,loading:!1,error:null,reauthing:!1},sp),up={background:"0 0% 100%",foreground:"225 15% 16%",card:"0 0% 100%","card-foreground":"225 15% 16%",popover:"0 0% 100%","popover-foreground":"225 15% 16%",primary:"210 30% 25%","primary-foreground":"0 0% 100%",secondary:"210 15% 94%","secondary-foreground":"210 30% 25%",muted:"210 10% 96%","muted-foreground":"220 10% 45%",accent:"210 15% 94%","accent-foreground":"210 30% 25%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 100%",border:"220 13% 90%",input:"220 13% 90%",ring:"210 30% 25%","chart-1":"210 50% 50%","chart-2":"260 50% 55%","chart-3":"150 50% 45%","chart-4":"325 50% 55%","chart-5":"45 80% 55%",radius:"0.625rem","font-body":'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',"font-heading":'"Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},dp=(e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),o=Math.min(e,t,n);let i=0,a=0;const s=(r+o)/2;if(r!==o){const l=r-o;switch(a=s>.5?l/(2-r-o):l/(r+o),r){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4}i*=60}return`${Math.round(i)} ${Math.round(100*a)}% ${Math.round(100*s)}%`},pp=e=>{if(/^\d+\s+\d+(?:\.\d+)?%\s+\d+(?:\.\d+)?%$/.test(e.trim()))return e.trim();try{const t=(e=>{const t=document.createElement("div");t.style.color=e,document.body.appendChild(t);const n=window.getComputedStyle(t).color;return document.body.removeChild(t),n})(e),[n,r,o]=(e=>{const t=e.match(/\d+/g);if(!t||t.length<3)throw new Error(`Invalid RGB color format: ${e}`);return[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)]})(t);return dp(n,r,o)}catch(t){return e}},fp=e=>{const t=document.getElementById("reach-theme-styles");t&&t.remove();const n=document.createElement("style");n.id="reach-theme-styles";const r=`\n [data-reach-root] {\n ${Object.entries(up).map((([t,n])=>{const r=e[t];let o=n;if(void 0!==r)if("radius"===t||"font-body"===t||"font-heading"===t)o=r;else if((e=>{if(/^\d+\s+\d+(?:\.\d+)?%\s+\d+(?:\.\d+)?%$/.test(e.trim()))return!0;if(["bg-","text-","border-","ring-","accent-","fill-","stroke-"].some((t=>e.trim().startsWith(t))))return!0;const t=document.createElement("div"),n=t.style.color;return t.style.color=e,t.style.color!==n})(r)){if(/^bg-/.test(r.trim())&&"bg-inherit"!==r.trim()&&"bg-current"!==r.trim()&&"bg-transparent"!==r.trim()){o=(e=>{if("bg-black"===e)return dp(0,0,0);if("bg-white"===e)return dp(255,255,255);const t=e.match(/^bg-([a-z]+)-(\d{2,3})$/);if(!t)throw new Error(`Invalid tailwind color class: ${e}`);const[,n,r]=t,o={red:{50:[254,242,242],100:[254,226,226],200:[254,202,202],300:[252,165,165],400:[248,113,113],500:[239,68,68],600:[220,38,38],700:[185,28,28],800:[153,27,27],900:[127,29,29],950:[69,10,10]},orange:{50:[255,247,237],100:[255,237,213],200:[254,215,170],300:[253,186,116],400:[251,146,60],500:[249,115,22],600:[234,88,12],700:[194,65,12],800:[154,52,18],900:[124,45,18],950:[67,20,7]},amber:{50:[255,251,235],100:[254,243,199],200:[253,230,138],300:[252,211,77],400:[251,191,36],500:[245,158,11],600:[217,119,6],700:[180,83,9],800:[146,64,14],900:[120,53,15],950:[69,26,3]},yellow:{50:[254,252,232],100:[254,249,195],200:[254,240,138],300:[253,224,71],400:[250,204,21],500:[234,179,8],600:[202,138,4],700:[161,98,7],800:[133,77,14],900:[113,63,18],950:[66,32,6]},lime:{50:[247,254,231],100:[236,252,203],200:[217,249,157],300:[190,242,100],400:[163,230,53],500:[132,204,22],600:[101,163,13],700:[77,124,15],800:[63,98,18],900:[54,83,20],950:[26,46,5]},green:{50:[240,253,244],100:[220,252,231],200:[187,247,208],300:[134,239,172],400:[74,222,128],500:[34,197,94],600:[22,163,74],700:[21,128,61],800:[22,101,52],900:[20,83,45],950:[5,46,22]},emerald:{50:[236,253,245],100:[209,250,229],200:[167,243,208],300:[110,231,183],400:[52,211,153],500:[16,185,129],600:[5,150,105],700:[4,120,87],800:[6,95,70],900:[6,78,59],950:[2,44,34]},teal:{50:[240,253,250],100:[204,251,241],200:[153,246,228],300:[94,234,212],400:[45,212,191],500:[20,184,166],600:[13,148,136],700:[15,118,110],800:[17,94,89],900:[19,78,74],950:[4,47,46]},cyan:{50:[236,254,255],100:[207,250,254],200:[165,243,252],300:[103,232,249],400:[34,211,238],500:[6,182,212],600:[8,145,178],700:[14,116,144],800:[21,94,117],900:[22,78,99],950:[8,51,68]},sky:{50:[240,249,255],100:[224,242,254],200:[186,230,253],300:[125,211,252],400:[56,189,248],500:[14,165,233],600:[2,132,199],700:[3,105,161],800:[7,89,133],900:[12,74,110],950:[8,47,73]},blue:{50:[239,246,255],100:[219,234,254],200:[191,219,254],300:[147,197,253],400:[96,165,250],500:[59,130,246],600:[37,99,235],700:[29,78,216],800:[30,64,175],900:[30,58,138],950:[23,37,84]},indigo:{50:[238,242,255],100:[224,231,255],200:[199,210,254],300:[165,180,252],400:[129,140,248],500:[99,102,241],600:[79,70,229],700:[67,56,202],800:[55,48,163],900:[49,46,129],950:[30,27,75]},violet:{50:[245,243,255],100:[237,233,254],200:[221,214,254],300:[196,181,253],400:[167,139,250],500:[139,92,246],600:[124,58,237],700:[109,40,217],800:[91,33,182],900:[76,29,149],950:[46,16,101]},purple:{50:[250,245,255],100:[243,232,255],200:[233,213,255],300:[216,180,254],400:[192,132,252],500:[168,85,247],600:[147,51,234],700:[126,34,206],800:[107,33,168],900:[88,28,135],950:[59,7,100]},fuchsia:{50:[253,244,255],100:[250,232,255],200:[245,208,254],300:[240,171,252],400:[232,121,249],500:[217,70,239],600:[192,38,211],700:[162,28,175],800:[134,25,143],900:[112,26,117],950:[74,4,78]},pink:{50:[253,242,248],100:[252,231,243],200:[251,207,232],300:[249,168,212],400:[244,114,182],500:[236,72,153],600:[219,39,119],700:[190,24,93],800:[157,23,77],900:[131,24,67],950:[80,7,36]},rose:{50:[255,241,242],100:[255,228,230],200:[254,205,211],300:[253,164,175],400:[251,113,133],500:[244,63,94],600:[225,29,72],700:[190,18,60],800:[159,18,57],900:[136,19,55],950:[76,5,25]},slate:{50:[248,250,252],100:[241,245,249],200:[226,232,240],300:[203,213,225],400:[148,163,184],500:[100,116,139],600:[71,85,105],700:[51,65,85],800:[30,41,59],900:[15,23,42],950:[2,6,23]},gray:{50:[249,250,251],100:[243,244,246],200:[229,231,235],300:[209,213,219],400:[156,163,175],500:[107,114,128],600:[75,85,99],700:[55,65,81],800:[31,41,55],900:[17,24,39],950:[3,7,18]},zinc:{50:[250,250,250],100:[244,244,245],200:[228,228,231],300:[212,212,216],400:[161,161,170],500:[113,113,122],600:[82,82,91],700:[63,63,70],800:[39,39,42],900:[24,24,27],950:[9,9,11]},neutral:{50:[250,250,250],100:[245,245,245],200:[229,229,229],300:[212,212,212],400:[163,163,163],500:[115,115,115],600:[82,82,82],700:[64,64,64],800:[38,38,38],900:[23,23,23],950:[10,10,10]},stone:{50:[250,250,249],100:[245,245,244],200:[231,229,228],300:[214,211,209],400:[168,162,158],500:[120,113,108],600:[87,83,78],700:[68,64,60],800:[41,37,36],900:[28,25,23],950:[12,10,9]}};if(!o[n]||!o[n][r])throw new Error(`Unsupported color or shade: ${e}`);const[i,a,s]=o[n][r];return dp(i,a,s)})(r.replace(/['"]/g,"").trim())}else try{o=pp(r)}catch(i){}}return`--reach-${t}: ${o};`})).join("\n")}\n }\n\n /* Apply font families directly */\n [data-reach-root] {\n font-family: var(--reach-font-body);\n }\n \n [data-reach-root] h1,\n [data-reach-root] h2,\n [data-reach-root] h3,\n [data-reach-root] h4,\n [data-reach-root] h5,\n [data-reach-root] h6 {\n font-family: var(--reach-font-heading);\n }\n `;n.textContent=r,document.head.appendChild(n)},{Context:hp,Provider:mp}=ap(((e,t)=>{switch(t.type){case"set_theme":return{...e,loading:!1,error:null,theme:t.payload};case"set_loading":return{...e,loading:t.payload};case"set_error":return{...e,loading:!1,error:t.payload};default:return e}}),{setTheme:e=>t=>e({type:"set_theme",payload:t}),setLoading:e=>t=>e({type:"set_loading",payload:t}),setError:e=>t=>e({type:"set_error",payload:t})},{theme:null,loading:!0,error:null}),gp=({initialTheme:e,children:r})=>{const{setTheme:o,setLoading:i}=n.useContext(hp),a=n.useRef(!1);return n.useEffect((()=>{e&&!a.current?(fp(e.styles),o(e),a.current=!0):i(!1)}),[e,o,i]),t.jsx(t.Fragment,{children:r})},vp=({initialTheme:e,children:n})=>t.jsx(mp,{children:t.jsx(gp,{initialTheme:e,children:n})}),yp=({reauthCallback:e})=>((e=>{const t=n.useContext(lp),r=n.useRef(!1),o=n.useRef(e);if(n.useEffect((()=>{o.current=e}),[e]),void 0===t)throw new Error("useAuthContext must be used within an AuthProvider");const{state:i,handleReauth:a}=t;n.useEffect((()=>{if(!i.isAuthenticated&&i.reauthing&&!r.current){r.current=!0,o.current&&a(o.current);const e=setTimeout((()=>{r.current=!1}),1e4);return()=>clearTimeout(e)}}),[i.isAuthenticated,i.reauthing,a]),n.useEffect((()=>{i.isAuthenticated&&r.current&&(r.current=!1)}),[i.isAuthenticated])})(e),null),bp=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,xp={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},wp=e=>xp[e];let _p={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(bp,wp)};const Sp={type:"3rdParty",init(e){((e={})=>{_p={..._p,...e}})(e.options.react)}},Ep=n.createContext();function Tp({i18n:e,defaultNS:t,children:r}){const o=n.useMemo((()=>({i18n:e,defaultNS:t})),[e,t]);return n.createElement(Ep.Provider,{value:o},r)}const Cp=e=>"string"==typeof e,Ap=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},Np=e=>null==e?"":""+e,Rp=/###/g,Op=e=>e&&e.indexOf("###")>-1?e.replace(Rp,"."):e,Pp=e=>!e||Cp(e),kp=(e,t,n)=>{const r=Cp(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Pp(e))return{};const t=Op(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Pp(e)?{}:{obj:e,k:Op(r[o])}},Mp=(e,t,n)=>{const{obj:r,k:o}=kp(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=kp(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=kp(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},jp=(e,t)=>{const{obj:n,k:r}=kp(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Lp=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Cp(e[r])||e[r]instanceof String||Cp(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Lp(e[r],t[r],n):e[r]=t[r]);return e},Dp=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ip={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Fp=e=>Cp(e)?e.replace(/[&<>"'\/]/g,(e=>Ip[e])):e;const Up=[" ",",","?","!",";"],$p=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Vp=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||"object"!=typeof o)return;let e,t="";for(let a=i;a<r.length;++a)if(a!==i&&(t+=n),t+=r[a],e=o[t],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&a<r.length-1)continue;i+=a-i+1;break}o=e}return o},Bp=e=>e?.replace("_","-"),zp={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){}};class Hp{constructor(e){this.init(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||zp,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(Cp(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Hp(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Hp(this.logger,e)}}var qp=new Hp;class Gp{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let o=0;o<r;o++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,o]=t;for(let i=0;i<o;i++)r.apply(r,[e,...n])}))}}}class Kp extends Gp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):Cp(n)&&o?a.push(...n.split(o)):a.push(n)));const s=jp(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&Cp(n)?Vp(this.data?.[e]?.[t],n,o):s}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Mp(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const o in n)(Cp(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=jp(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Lp(s,n,o):s={...s,...n},Mp(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var Wp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{t=this.processors[e]?.process(t,n,r,o)??t})),t}};const Yp={};class Xp extends Gp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{n[e]&&(r[e]=n[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=qp.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){if(null==e)return!1;const t=this.resolve(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});return void 0!==t?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Up.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=$p.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Cp(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:Cp(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===l?.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const u=this.resolve(e,t);let d=u?.res;const p=u?.usedKey||i,f=u?.exactUsedKey||i,h=Object.prototype.toString.apply(d),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!Cp(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(g&&d&&v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0)||Cp(m)&&Array.isArray(d))if(g&&Cp(m)&&Array.isArray(d))d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const c=void 0!==t.count&&!Cp(t.count),p=Xp.hasDefaultValue(t),f=c?this.pluralResolver.getSuffix(l,t.count,t):"",h=t.ordinal&&c?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",m=c&&!t.ordinal&&0===t.count,g=m&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${f}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&p&&(r=!0,d=g),this.isValidLookup(d)||(a=!0,d=i);const v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=p&&g!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",l,s,i,y?g:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=p&&r!==d?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);m&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||g)}))})):r(e,i,g))}d=this.extendTranslation(d,e,t,u,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?d:void 0))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?f:p;for(const i in d)if(Object.prototype.hasOwnProperty.call(d,i)){const e=`${r}${o}${i}`;n[i]=this.translate(e,{...t,joinArrays:!1,ns:a}),n[i]===e&&(n[i]=d[i])}d=n}}return r?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=Cp(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let l=n.replace&&!Cp(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o?.[0]!==r[0]||n.context?i.translate(...r,t):(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=Cp(a)?[a]:a;return null!=e&&s?.length&&!1!==n.applyPostProcessor&&(e=Wp.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Cp(e)&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),l=s.key;n=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==a.count&&!Cp(a.count),d=u&&!a.ordinal&&0===a.count,p=void 0!==a.context&&(Cp(a.context)||"number"==typeof a.context)&&""!==a.context,f=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(i=e,Yp[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(i)||(Yp[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${f.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,n,e,a);else{let e;u&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.push(l+e),a.ordinal&&0===e.indexOf(r)&&i.push(l+e.replace(r,this.options.pluralSeparator)),d&&i.push(l+t)),p){const n=`${l}${this.options.contextSeparator}${a.context}`;i.push(n),u&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Cp(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class Zp{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=qp.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Bp(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Bp(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Cp(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch(t){}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Cp(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Cp(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):Cp(e)&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}const Qp={zero:0,one:1,two:2,few:3,many:4,other:5},Jp={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ef{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=qp.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Bp("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(a){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Jp;if(!e.match(/-|_/))return Jp;const n=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(n,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){return this.getSuffixes(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort(((e,t)=>Qp[e]-Qp[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const tf=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=jp(e,n);return void 0!==r?r:jp(t,n)})(e,t,n);return!i&&o&&Cp(n)&&(i=Vp(e,n,r),void 0===i&&(i=Vp(t,n,r))),i},nf=e=>e.replace(/\$/g,"$$$$");class rf{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=qp.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:m,maxReplaces:g,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Fp,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Dp(o):i||"{{",this.suffix=a?Dp(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Dp(d):p||Dp("$t("),this.nestingSuffix=f?Dp(f):h||Dp(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=tf(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(tf(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>nf(e)},{regex:this.regexp,safeValue:e=>nf(this.escapeValue?this.escape(e):e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,o,r);i=Cp(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(u){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else Cp(i)||this.useRawValueToEscape||(i=Np(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),u?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(l){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,l),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&!Cp(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,l=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&!Cp(r))return r;Cp(r)||(r=Np(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),l&&(r=s.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const of=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(Bp(r),o),t[a]=s),s(n)}};class af{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=qp.create("formatter"),this.options=e,this.formats={number:of(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:of(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:of(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:of(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:of(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){this.formatSeparator=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=of(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce(((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{};t=this.formats[o](e,a.locale||a.lng||r.locale||r.lng||n,{...i,...r,...a})}catch(a){this.logger.warn(a)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}class sf extends Gp{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=qp.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:r,k:o}=kp(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(l){a(l)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Cp(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Cp(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const l={...i,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let o;o=5===c.length?c(e,t,n,r,l):c(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(s){a(s)}else c(e,t,n,r,a,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const lf=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Cp(e[1])&&(t.defaultValue=e[1]),Cp(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),cf=e=>(Cp(e.ns)&&(e.ns=[e.ns]),Cp(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Cp(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),uf=()=>{};class df extends Gp{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=cf(e),this.services={},this.logger=qp,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(Cp(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=lf();this.options={...r,...this.options,...cf(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;qp.init(this.modules.logger?o(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:af;const n=new Zp(this.options);this.store=new Kp(this.options.resources,this.options);const i=this.services;i.logger=qp,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new ef(n,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new rf(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new sf(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Xp(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=uf),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=Ap(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:uf;const n=Cp(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload?.forEach?.((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=Ap();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=uf),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Wp.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=Ap();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Cp(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];i=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const c=r.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map((e=>`${i.keyPrefix}${c}${e}`)):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,r.t(u,i)};return Cp(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.translate(...t)}exists(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=Ap();return this.options.ns?(Cp(e)&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Ap();Cp(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services?.languageUtils||new Zp(lf());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new df(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:uf;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new df(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=Object.keys(this.store.data).reduce(((e,t)=>(e[t]={...this.store.data[t]},Object.keys(e[t]).reduce(((n,r)=>(n[r]={...e[t][r]},n)),{}))),{});o.store=new Kp(e,r),o.services.resourceStore=o.store}return o.translator=new Xp(o.services,r),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)})),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const pf=df.createInstance();pf.createInstance=df.createInstance;const ff=pf.t,{slice:hf,forEach:mf}=[];const gf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,vf={create(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!gf.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!gf.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r}(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let e=n[r];for(;" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(t))return e.substring(t.length,e.length)}return null},remove(e){this.create(e,"",-1)}};var yf={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return vf.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&vf.create(n,e,r,o,i)}},bf={name:"querystring",lookup(e){let t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const r=e.substring(1).split("&");for(let o=0;o<r.length;o++){const e=r[o].indexOf("=");if(e>0){r[o].substring(0,e)===n&&(t=r[o].substring(e+1))}}}return t}};let xf=null;const wf=()=>{if(null!==xf)return xf;try{xf="undefined"!==window&&null!==window.localStorage;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){xf=!1}return xf};var _f={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&wf())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&wf()&&window.localStorage.setItem(n,e)}};let Sf=null;const Ef=()=>{if(null!==Sf)return Sf;try{Sf="undefined"!==window&&null!==window.sessionStorage;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Sf=!1}return Sf};var Tf={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Ef())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Ef()&&window.sessionStorage.setItem(n,e)}},Cf={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let o=0;o<e.length;o++)t.push(e[o]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Af={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Nf={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const r="number"==typeof t?t:0;return n[r]?.replace("/","")}},Rf={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,r="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Of=!1;try{document,Of=!0}catch(JSe){}const Pf=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Of||Pf.splice(1,1);class kf{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(e){return mf.call(hf.call(arguments,1),(t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])})),e}(e,this.options||{},{order:Pf,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=t,this.addDetector(yf),this.addDetector(bf),this.addDetector(_f),this.addDetector(Tf),this.addDetector(Cf),this.addDetector(Af),this.addDetector(Nf),this.addDetector(Rf)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach((t=>{if(this.detectors[t]){let n=this.detectors[t].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(e=e.concat(n))}})),e=e.map((e=>this.options.convertDetectedLanguage(e))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?e:e.length>0?e[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)})))}}kf.type="languageDetector";const Mf={en:{common:{ad_spend:"Ad Spend",date:"Date",close:"Close",continue:"Continue",connected:"Connected",connecting:"Connecting...",reauthenticate:"Reauthenticate",account_settings:"Account Settings",manage_account_settings:"Manage your account settings",copy:"Copy",copied:"Copied",error:"An error occurred",filter:"Filter",finishingUp:"Finishing up...",loading:"Loading...",need_help:"Need help? let us know",next:"Next",next_steps:"Next steps:",number:"{{number}}",previous:"Previous",revenue:"Revenue",revenue_from_ads:"Revenue From Ads",roas:"ROAS",return_on_ad_spend:"Return on Ad Spend",select_dates:"Select dates",total_ads_spend:"Total Ads Spend",measure:{dashboard:{title:"Marketing ROI Dashboard",subtitle:"Track and analyze how your marketing efforts are driving sales",application_status_banner_title:"We are experiencing some issues",application_status_banner_description:"We are aware of an issue affecting the dashboard. We are working on it and will have it resolved soon.",no_metrics_banner_title:"We are unable to display any metrics for this date range",no_metrics_banner_description:"If you have just connected your ad accounts, your metrics should begin populating within the next 24 hours. Please check back soon.",reach_managed_campaign_banner:"Your ads are being managed by Reach. We’ll automatically optimize them to drive the best results."}},authentication:{required:"Authentication required",failed:"Authentication failed",connect_account_title:"Connect Your {{provider}} Account",connect_account_description:"To create and manage ad campaigns, please connect your {{provider}} account",connect_account_button:"Continue with {{provider}}",connect_account_TOS:"By connecting, you agree to our Terms of Service and Privacy Policy"},theme:{loading:"Loading theme...",error:"Error loading theme: {{message}}"},dates:{last_week:"Last week",last_month:"Last month",last_quarter:"Last quarter",last_year:"Last year"},campaigns:{setup:{card_header:"Run paid digital ads to get new leads & customers",title:"Create your first AI-driven Ad campaign in 4 simple clicks",description:"Welcome to the future of advertising! Our AI-powered campaign builder helps you effortlessly design and manage ads that reach your target audience with precision. Get started now to unlock the potential of automated, data-driven advertising.",button:"Set up paid ads",next_steps_description:"Already running ads? Track Your Marketing Results with a few clicks.",link_to_analytics:"Connect your existing accounts to get instant insights into your marketing performance."},how_it_works:{dialog_title:"How It Works",title:"Setup your ad campaign",step1:{title:"Set up budget & review your ads",description:"Define how much you want to spend, review the ad designs, and configure who you want to reach."},step2:{title:"We’ll publish & optimize your ads on Google",description:"We’ll do the hard work of publishing & continuously optimizing your ads on Google making sure you’re getting the best possible return on investment."},step3:{title:"See Customers & Results",description:"When a customer buys from you, we’ll notify you and show you the total revenue driven to your business from each dollar invested in ads. "}},ads_builder:{dialog_trigger:"New campaign",title:"Ads Builder",description:"Create your new ad campaign",review_ad_themes:"Review Ad Themes",example_ad_preview:"Example Ad Preview",example_ad_preview_description:"Here's an example of how prospective customers might see your ads. We will automagically tweak the copy based on your products offered, and improve targeting based on what results in the most dollars to your business."}},analytics:{setup_analytics:"Setup analytics",setup_analytics_description:"Let's get you started with analytics. Connect your data sources to start tracking your customers.",connect_data:{title:"Connect Your Data",description:"We bring all of your ads data together to give you a clear view of which customers are coming in from where."},install_pixel:{copied_to_clipboard:"Copied to clipboard",copied_to_clipboard_description:"The tracking pixel code has been copied to your clipboard.",title:"Install our Tracking Pixel",description:"In order to get a complete picture of how users are interacting with your website, it’s important for the Reach analytics code to be on every page of your website and within as many third-party tools that you use as possible.",card_title:"Install the Snippet inside the <HEAD> of every page",third_party_pages_your_tracking_pixel:"Your Tracking Pixel:",card_description:"Copy this following text and insert it inside of the <HEAD> tags on all pages.",error_generating_pixel_code:"Error generating pixel code - please contact your administrator",third_party_pages_question:"Do you use any websites or landing pages for marketing your business?",third_party_pages_yes:"Yes, I have marketing websites",third_party_pages_no:"No, I don't use any websites",third_party_pages_why_asking:"Why We're Asking For This",third_party_pages_why_asking_description:"Adding our tracking pixel to your website allows us to:",third_party_pages_why_asking_list_1:"Understand how visitors interact with your pages",third_party_pages_why_asking_list_2:"Measure which ads are driving visitors to your site",third_party_pages_why_asking_list_3:"Track conversions from your campaigns",third_party_pages_enter_marketing_website:"Enter your marketing website:",third_party_pages_we_will_use_this_to_help_you_install_the_tracking_pixel:"We'll use this to help you install the tracking pixel",third_party_pages_select_your_website_platform:"Select your website platform:"},third_party_installation_guides:{title:"Installation Guides",description:"These guides will help you add the Reach analytics snippet to your website. The process works with any website builder or platform and most third-party tools.",installation_guide:"{{name}} Installation Guide",official_guide:"Official Guide",shopify:{step_1:"From your Shopify admin, go to Online Store > Themes",step_2:"Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code",step_3:'Open "theme.liquid"',step_4:"Find the </head> tag",step_5:"Paste the code snippet from the section above just before it"},google_tag_manager:{step_1:"Go to https://tagmanager.google.com",step_2:"Sign in to your Google Account",step_3:"Click the Accounts tab, then select Create Account",step_4:"Enter an account name and select your country location",step_5:"In Container Setup, enter a container name (e.g., your website URL)",step_6:'Select "Web" as the container type',step_7:"Click Create and agree to the Terms of Service",step_8:"Once created, you'll receive two code snippets to install:",step_9:"• Place the first snippet in the <head> of your page",step_10:"• Place the second snippet immediately after the opening <body> tag",step_11:"In the Tags tab, click the + button to create a new tag",step_12:'Select "Google Analytics: Universal Analytics" as the tag type',special_note:"Make sure you have the Google Tag Manager container code already installed on your site before adding this tag."},hubspot:{step_1:"Go to Settings → Content → Pages",step_2:'In the upper left, select a domain to edit its settings. Or select "Default settings for all domains"',step_3:'Paste the code from the section above to the "Site Header HTML" field',step_4:'Click "Save"'},wordpress:{step_1:"We recommend using the popular WPCode Plugin",step_2:'In the plugin, select "+ Add Snippet"',step_3:'When presented with a menu of options, navigate to "Add Your Custom Code (New Snippet)" and select "Use snippet"',step_4:"Paste the code snippet from the section above",step_5:'For Insert Method, choose "Auto Insert"',step_6:'For Location, select "Site Wide Header"',step_7:"Be sure to save your snippet"},squarespace:{step_1:"Go to Settings → Advanced → Code Injection",step_2:'Paste the code from the section above into the "Header" field',step_3:'Click "Save"'},wix:{step_1:"Go to Settings → Custom Code",step_2:'Click "+ Add Custom Code"',step_3:"Paste the code from the section above",step_4:'Click "Apply"',step_5:'Set "Add Code to Pages" to "All Pages"'},webflow:{step_1:"Open your project settings",step_2:'Navigate to "Custom Code"',step_3:'Paste the code from the section above into the "Head Code" section',step_4:'Click "Save Changes"'},third_party_systems:{step_1:"Check if your third-party tools (lead forms, scheduling tools, etc.) allow custom code injection",step_2:'Look for options labeled "Custom Code", "Embed Code", or "Advanced Settings"',step_3:"Paste the same tracking code into these sections where available",step_4:"Common locations include:",step_5:"• Head section of your website (for tracking scripts and styles)",step_6:"• Footer section of your website (for tracking scripts and styles)",special_note:"This helps ensure consistent tracking across all your customer touchpoints, even when using external tools."},custom:{step_1:"Locate your website's HTML template or main layout file",step_2:"Find the </head> tag in your HTML",step_3:"Paste the code snippet just before the </head> tag",step_4:"Save the file and deploy your changes"}},success:{title:"Success!",description:"You have successfully connected your data sources and installed our tracking pixel.",what_next:"What happens next?",step_1:"Your ad data will start syncing automatically",step_2:"The pixel will begin tracking conversions on your site",step_3:"You'll see your first analytics reports within 24 hours"}},dashboard:{banners:{metrics_crunching:{title:"Crunching your data",description:"You have successfully connected your ad accounts. We're now crunching your data. Check back soon for relevant metrics."},revoked_accounts:{title:"Your ad accounts have been revoked",description:"Please reconnect your ad accounts to continue using the dashboard."}},roas_chart:{title:"Ad Spend vs Revenue Over Time",campaign_not_available:"Chart is not available for individual campaigns yet"},customer_acquisition:{title:"Client Acquisition",description:"See how many new clients you acquired from each channel",client:"Client",source:"Source",total_spent:"Total Spent",total_revenue:"Total Revenue",status:"Status",no_data:"No data available",source_breakdown:"Source",payment_status:"Payment Status",paid:"Paid",unpaid:"Unpaid",invoice_details:"Invoice Details",amount:"Amount",service:"Service",invoice_date:"Invoice Date"},channel_performance:{title:"Channel Performance",description:"See how each channel performs",channel:"Channel",spend:"Spend",revenue:"Revenue",roas:"ROAS",new_customers:"New Customers"},traffic_conversion:{title:"Traffic Conversion Funnel"},tabs:{overview:"Overview",channel_performance:"Channel Performance",campaign_performance:"Campaign Performance",customer_acquisition:"Customer Acquisition",traffic_conversion:"Traffic Conversion"},metrics:{ads_spend:"Ads Spend",ads_spend_description:"The amount spent on ads in a given period. Sum of all sub-ads accounts (e.g. insta, google). Excluding agency fees",direct_measured_revenue:"Direct Measured Revenue",direct_measured_revenue_description:"The amount of revenue directly measured from ads",measured_revenue:"Measured Revenue",measured_revenue_description:"The amount of revenue measured from ads",direct_measured_conversions:"Direct Measured Conversions",direct_measured_conversions_description:"The amount of conversions directly measured from ads",measured_conversions:"Measured Conversions",measured_conversions_description:"The amount of conversions measured from ads",roas:"ROAS",roas_description:"This is the ratio of the revenue to the ads spend",impressions:"Impressions",impressions_description:"Number of times your ads were shown to potential customers",clicks:"Clicks/Actions",clicks_description:"Total interactions with your ads, including clicks and other actions",website_visitors:"Website Visitors",website_visitors_description:"Unique visitors to your website from advertising campaigns",new_leads:"New Leads",new_leads_description:"New potential customers who provided contact information",customer_ltv:"Customer LTV",customer_ltv_description:"Average lifetime value of customers acquired through ads",new_customers:"New Customers",new_customers_description:"New customers who made a purchase or took an action",new_leads_conversion_rate:"New Leads Conversion Rate",new_leads_conversion_rate_description:"The ratio of new leads to the total number of leads",new_customers_conversion_rate:"New Customers Conversion Rate",new_customers_conversion_rate_description:"The ratio of new customers to the total number of customers",cost_per_click:"Cost Per Click",cost_per_click_description:"The amount spent per click on your ads",click_conversion_rate:"Click Conversion Rate",click_conversion_rate_description:"The ratio of clicks to the total number of clicks",click_through_rate:"Click Through Rate",click_through_rate_description:"The ratio of clicks to the total number of impressions",conversion_rate:"Conversion Rate",conversion_rate_description:"The ratio of conversions to the total number of clicks",total_conversion:"Total Conversion",total_conversion_description:"The total number of conversions from your ads",cac:"CAC",cac_description:"The amount spent per customer acquisition",revenue_per_click:"Revenue Per Click",revenue_per_click_description:"The amount of revenue generated per click on your ads",revenue_per_new_customer:"Revenue Per New Customer",revenue_per_new_customer_description:"The amount of revenue generated per new customer",reengaged_customers:"Reengaged Customers",reengaged_customers_description:"The number of customers who have been reengaged with your ads",expected_revenue:"Expected Revenue",expected_revenue_description:"The amount of revenue you expect to generate from your ads",estimated_revenue:"Estimated Revenue",estimated_revenue_description:"The amount of revenue you expect to generate from your ads"},title:"Marketing Revenue Dashboard",settings_sheet:{setup:"Setup",connected_accounts:"Connected Accounts",setup_analytics:"Setup analytics",setup_analytics_description:"Configure your analytics tracking",setup_campaigns:"Setup campaigns",setup_campaigns_description:"Set up your first campaign",legal:"Legal",terms_of_service:"Terms of Service",privacy_policy:"Privacy Policy"}},setup:{how_it_works:{title:"How It Works",dialog_title:"Setup Marketing Insights",connect_ads_title:"Connect your Ads Accounts",connect_ads_description:"Link your advertising accounts from platforms like Google and Meta to consolidate all your campaign data in one place. This enables comprehensive tracking and analysis of your marketing spend.",install_pixel_title:"Install Our Tracking Pixel",install_pixel_description:"Add our lightweight tracking code to your website to accurately measure customer interactions and conversions. This simple integration helps identify which ads are driving real results for your business.",see_customers_results_title:"See Customers & Results",see_customers_results_description:"Get clear insights into your marketing performance with detailed analytics on customer acquisition, conversion rates, and return on ad spend. Make data-driven decisions to optimize your campaigns and grow your business.",still_have_more_questions:"Still have more questions?",get_started:"Get Started"},initial_setup:{wizard_title:"Connect your ad accounts and see exactly how your campaigns drive revenue",title:"Unlock Clear Insights into Your Marketing Performance",description:"Stop guessing and start knowing. Our performance dashboard gives you a complete view of your marketing efforts, including ad spend, conversions, and return on ad spend (ROAS).",description_2:"With a simple setup process, you’ll have actionable insights at your fingertips to help you make smarter decisions and grow your business.",setup_performance_analytics:"Setup Performance Analytics",next_steps_description:"If you're not running ads yet, you can launch your first AI-powered ad campaign in minutes.",next_steps_link:"We will prompt you to connect your ad accounts and set up your first campaign."}},oauth:{selectAccount:{title:"Select {{platform}} Account",description:"Choose the {{platform}} account you want to connect.",loading:"Loading accounts...",loadingPlatform:"Loading {{platform}} accounts...",loadingDescription:"Please wait while we fetch your available accounts...",noAccounts:"No {{platform}} accounts were found for your account.",noAccountsDescription:"Please make sure you have access to a {{platform}} account and try again.",selectAccountPlaceholder:"Select an account",searchPlaceholder:"Search accounts...",fetchAccounts:"Fetching accounts...",noAccountSelected:"No account selected",enableTrackingParams:"Enable Tracking Parameters",enableTrackingParamsDescription:"Append the reach campaign id parameter to your ad platform tracking settings. We will not overwrite any existing tracking parameters. Required for accurate tracking.",google:{selectAccountDescription:"Select the Google Ads account you want to connect to view your data. These will be linked to our MCC for optimal tracking.",mccAccounts:"MCC Accounts",directAccounts:"Direct Accounts"},meta:{selectAccountDescription:"Choose the Meta Ads account you want to connect to view your data."}},success:{connection:{title:"Connected successfully",description:"Your {{provider}} account has been connected."},revoke:{title:"Account revoked",description:"Your {{provider}} account has been revoked."}},error:{title:"Connection failed",description:"Failed to connect account"},revoke:{title:"Revoke access",description:"Are you sure? Revoking access will remove the connection you have and you will be unable to view your ad metrics.",cancel:"Cancel",revoke:"Revoke",error:{title:"Error",description:"Failed to revoke access"}}},magic_link:{get_started:"Get Started",description:"Reach will be embedded within your platform dashboard but until then, you can get started with a magic link. Log in to your account and start creating AI-powered campaigns or measuring your ad spend and performance.",create_campaigns:"Create AI-generated ad campaigns in minutes",unlock_insights:"Unlock insights into your ad spend and performance",save_time:"Save time with automated campaign optimization",request_new_magic_link:"Request New Magic Link",go_to_dashboard:"Go to Dashboard",continuation_disclaimer:"By continuing, you agree to our <terms_of_service>Terms of Service</terms_of_service> and <privacy_policy>Privacy Policy</privacy_policy>."},empty_state:{analytics:{title:"You haven't connected any ad accounts yet",description:"You can connect your ad accounts in minutes and start driving more customers to your business.",button_text:"Setup analytics"}}},engage:{user:"User",user_other:"Users",automation:"Automation",automation_other:"Automations",segment:"Segment",segment_other:"Segments",one_time:"One Time",trigger_based:"Trigger Based",insight:"Insight",insight_other:"Insights"}},es:{common:{ad_spend:"Gasto en anuncios",date:"Fecha",close:"Cerrar",continue:"Continuar",connected:"Conectado",connecting:"Conectando...",reauthenticate:"Reautenticar",account_settings:"Configuración de cuenta",manage_account_settings:"Configuración de tu cuenta",copy:"Copiar",copied:"Copiado",error:"Se produjo un error",filter:"Filtrar",finishingUp:"Finalizando...",loading:"Cargando...",need_help:"¿Necesitas ayuda? Háznoslo saber",next:"Siguiente",next_steps:"Siguientes pasos:",number:"{{number}}",previous:"Anterior",revenue:"Ingresos",revenue_from_ads:"Ingresos de anuncios",roas:"ROAS",return_on_ad_spend:"Retorno de inversión en anuncios",select_dates:"Selecciona fechas",total_ads_spend:"Gasto total en anuncios",measure:{dashboard:{title:"Panel de ingresos de marketing",subtitle:"Rastrea y analiza cómo tus esfuerzos de marketing están generando ventas",application_status_banner_title:"Estamos experimentando algunos problemas",application_status_banner_description:"Estamos al tanto de un problema que está afectando al panel. Estamos trabajando en ello y lo resolveremos pronto.",no_metrics_banner_title:"No podemos mostrar ninguna métrica para este rango de fechas",no_metrics_banner_description:"Si has conectado tus cuentas de anuncios recientemente, tus métricas deberían comenzar a poblarse en las próximas 24 horas. Por favor, vuelve pronto.",reach_managed_campaign_banner:"Tus anuncios están siendo gestionados por Reach. Automáticamente los optimizaremos para obtener los mejores resultados."}},authentication:{required:"Se requiere autenticación",failed:"Error de autenticación",connect_account_title:"Conecta tu cuenta de {{provider}}",connect_account_description:"Para crear y gestionar campañas de anuncios, por favor conecta tu cuenta de {{provider}}",connect_account_button:"Continuar con {{provider}}",connect_account_TOS:"Al conectarte, aceptas nuestros Términos de Servicio y Política de Privacidad"},theme:{loading:"Cargando tema...",error:"Error al cargar el tema: {{message}}"},dates:{last_week:"Semana pasada",last_month:"Mes pasado",last_quarter:"Trimestre pasado",last_year:"Año pasado"},campaigns:{setup:{card_header:"Lanza anuncios pagados para obtener nuevos leads y clientes",title:"Crea tu primera campaña de anuncios AI en 4 clicks",description:"Bienvenido al futuro del marketing! Nuestro creador de campañas AI te ayuda a diseñar y gestionar anuncios que alcanzan a tu audiencia con precisión. ¡Comienza ahora para desbloquear el potencial de anuncios automatizados y basados en datos.",button:"Configura tus anuncios pagados",next_steps_description:"¿Ya tienes anuncios? Rastrea tus resultados de marketing con solo unos clicks.",link_to_analytics:"Conecta tus cuentas existentes para obtener insights instantáneos sobre tu rendimiento de marketing."},how_it_works:{dialog_title:"Cómo funciona",title:"Configura tu campaña de anuncios",step1:{title:"Configura tu presupuesto y revisa tus anuncios",description:"Define cuánto quieres gastar, revisa los diseños de anuncios y configura quién quieres llegar."},step2:{title:"Publicaremos y optimizaremos tus anuncios en Google",description:"Haremos el trabajo duro de publicar y optimizar tus anuncios en Google para asegurarnos de que obtengas el mejor retorno de inversión posible."},step3:{title:"Ver clientes y resultados",description:"Cuando un cliente compra de ti, te notificaremos y te mostraremos el total de ingresos generados para tu negocio por cada dólar invertido en anuncios."}},ads_builder:{dialog_trigger:"Nueva campaña",title:"Ads Builder",description:"Crea tu nueva campaña de anuncios",review_ad_themes:"Revisa temas de anuncios",example_ad_preview:"Ejemplo de anuncio",example_ad_preview_description:"Aquí tienes un ejemplo de cómo los clientes potenciales podrían ver tus anuncios. Automáticamente ajustaremos el texto basándonos en tus productos ofrecidos y mejoraremos el targeting basándonos en lo que resulta en más dinero para tu negocio."}},analytics:{setup_analytics:"Configura analytics",setup_analytics_description:"Vamos a empezar con analytics. Conecta tus fuentes de datos para empezar a rastrear tus clientes.",connect_data:{title:"Conecta tus datos",description:"Juntamos todos tus datos de anuncios para darte una visión clara de qué clientes están llegando de dónde."},install_pixel:{copied_to_clipboard:"Copiado al portapapeles",copied_to_clipboard_description:"El código del pixel de seguimiento ha sido copiado a tu portapapeles.",title:"Instala nuestro pixel de seguimiento",description:"Para obtener una visión completa de cómo los usuarios interactúan con tu sitio web, es importante que el código de analytics de Reach esté en cada página de tu sitio web y dentro de tantos terceros como puedas usar.",card_title:"Instala el fragmento dentro del <HEAD> de cada página",third_party_pages_your_tracking_pixel:"Tu pixel de seguimiento:",card_description:"Copia este texto y insertalo dentro de las etiquetas <HEAD> en todas las páginas.",error_generating_pixel_code:"Error generando código del pixel - por favor contacta a tu administrador",third_party_pages_question:"¿Utilizas alguna página web o landing page para promocionar tu negocio?",third_party_pages_yes:"Sí, tengo páginas web de marketing",third_party_pages_no:"No, no utilizo ninguna página web",third_party_pages_why_asking:"¿Por qué te pedimos esto?",third_party_pages_why_asking_description:"Añadir nuestro pixel de seguimiento a tu sitio web nos permite:",third_party_pages_why_asking_list_1:"Entender cómo los visitantes interactúan con tus páginas",third_party_pages_why_asking_list_2:"Medir qué anuncios están llevando visitantes a tu sitio",third_party_pages_why_asking_list_3:"Rastrear conversiones desde tus campañas",third_party_pages_enter_marketing_website:"Ingresa tu página web de marketing:",third_party_pages_we_will_use_this_to_help_you_install_the_tracking_pixel:"Usaremos esto para ayudarte a instalar el pixel de seguimiento",third_party_pages_select_your_website_platform:"Selecciona tu plataforma de sitio web:"},third_party_installation_guides:{title:"Guías de instalación",description:"Estas guías te ayudarán a agregar el fragmento de analytics de Reach a tu sitio web. El proceso funciona con cualquier constructor de sitios web o plataforma y la mayoría de las herramientas de terceros.",installation_guide:"Guía de instalación de {{name}}",official_guide:"Guía oficial",shopify:{step_1:"Desde tu Shopify admin, ve a Online Store > Themes",step_2:"Encuentra el tema que quieres editar, haz click en el botón … para abrir el menú de acciones y luego haz click en Editar código",step_3:'Abre "theme.liquid"',step_4:"Encuentra la etiqueta </head>",step_5:"Pega el fragmento de código de la sección anterior justo antes de ella"},google_tag_manager:{step_1:"Ve a https://tagmanager.google.com",step_2:"Inicia sesión en tu cuenta de Google",step_3:"Haz click en la pestaña de Cuentas y selecciona Crear cuenta",step_4:"Ingresa un nombre para tu cuenta y selecciona tu ubicación",step_5:"En Container Setup, ingresa un nombre para tu contenedor (e.g., tu URL de sitio web)",step_6:'Selecciona "Web" como tipo de contenedor',step_7:"Haz click en Crear y acepta los Términos de Servicio",step_8:"Una vez creado, recibirás dos fragmentos de código para instalar:",step_9:"• Coloca el primer fragmento en la etiqueta <head> de tu página",step_10:"• Coloca el segundo fragmento justo después de la etiqueta <body>",step_11:"En la pestaña de Etiquetas, haz click en el botón + para crear una nueva etiqueta",step_12:'Selecciona "Google Analytics: Universal Analytics" como tipo de etiqueta',special_note:"Asegúrate de tener el código del contenedor de Google Tag Manager instalado en tu sitio web antes de agregar esta etiqueta."},hubspot:{step_1:"Ve a Configuración → Contenido → Páginas",step_2:'En la esquina superior izquierda, selecciona un dominio para editar sus ajustes. O selecciona "Ajustes predeterminados para todos los dominios"',step_3:'Pega el código de la sección anterior en el campo "HTML del encabezado del sitio"',step_4:'Haz click en "Guardar"'},wordpress:{step_1:"Recomendamos usar el plugin WPCode",step_2:'En el plugin, selecciona "+ Añadir fragmento"',step_3:'Cuando se te presente un menú de opciones, navega a "Añadir tu código personalizado (nuevo fragmento)" y selecciona "Usar fragmento"',step_4:"Pega el fragmento de código de la sección anterior",step_5:'Para el método de inserción, elige "Auto insertar"',step_6:'Para la ubicación, selecciona "Encabezado del sitio"',step_7:"Asegúrate de guardar tu fragmento"},squarespace:{step_1:"Ve a Configuración → Avanzado → Inyección de código",step_2:'Pega el código de la sección anterior en el campo "Encabezado"',step_3:'Haz click en "Guardar"'},wix:{step_1:"Ve a Configuración → Código personalizado",step_2:'Haz click en "+ Añadir código personalizado"',step_3:"Pega el código de la sección anterior",step_4:'Haz click en "Aplicar"',step_5:'Establece "Añadir código a páginas" a "Todas las páginas"'},webflow:{step_1:"Abre tus ajustes de proyecto",step_2:'Navega a "Código personalizado"',step_3:'Pega el código de la sección anterior en la sección "Código de encabezado"',step_4:'Haz click en "Guardar cambios"'},third_party_systems:{step_1:"Revisa si tus herramientas de terceros (formularios de leads, herramientas de programación, etc.) permiten la inyección de código personalizado",step_2:'Busca opciones etiquetadas como "Código personalizado", "Código incrustado" o "Ajustes avanzados"',step_3:"Pega el mismo código de seguimiento en estas secciones donde esté disponible",step_4:"Los lugares comunes incluyen:",step_5:"• Sección de encabezado de tu sitio web (para scripts y estilos de seguimiento)",step_6:"• Sección de pie de página de tu sitio web (para scripts y estilos de seguimiento)",special_note:"Esto asegura un seguimiento consistente en todos tus puntos de contacto con clientes, incluso cuando usas herramientas externas."},custom:{step_1:"Localiza tu plantilla HTML o archivo de diseño principal",step_2:"Encuentra la etiqueta </head> en tu HTML",step_3:"Pega el fragmento de código justo antes de la etiqueta </head>",step_4:"Guarda el archivo y desplíalo"}},success:{title:"¡Éxito!",description:"Has conectado tus fuentes de datos y instalado nuestro pixel de seguimiento.",what_next:"¿Qué pasa a continuación?",step_1:"Tus datos de anuncios comenzarán a sincronizarse automáticamente",step_2:"El pixel comenzará a rastrear conversiones en tu sitio",step_3:"Verás tus primeros informes de analytics en 24 horas"}},dashboard:{banners:{metrics_crunching:{title:"Trabajando en tus datos",description:"Has conectado tus cuentas de anuncios. Estamos ahora trabajando en tus datos. Vuelve pronto para ver tus métricas relevantes."},revoked_accounts:{title:"Tus cuentas de anuncios han sido revocadas",description:"Por favor, reconecta tus cuentas de anuncios para continuar usando el panel."}},roas_chart:{title:"Gasto en anuncios vs ingresos en el tiempo",campaign_not_available:"El gráfico no está disponible para campañas individuales todavía"},customer_acquisition:{title:"Adquisición de clientes",description:"Ver cómo adquieres nuevos clientes desde cada canal",client:"Cliente",source:"Fuente",total_spent:"Total gastado",total_revenue:"Ingresos totales",status:"Estado",no_data:"No hay datos disponibles",source_breakdown:"Desglose de fuentes",payment_status:"Estado de pago",paid:"Pagado",unpaid:"No pagado",invoice_details:"Detalles de la factura",amount:"Cantidad",service:"Servicio",invoice_date:"Fecha de la factura"},channel_performance:{title:"Rendimiento de canales",description:"Ver cómo cada canal se desempeña",channel:"Canal",spend:"Gasto",revenue:"Ingresos",roas:"ROAS",new_customers:"Nuevos clientes"},traffic_conversion:{title:"Traffic Conversion Funnel"},tabs:{overview:"Resumen",channel_performance:"Rendimiento de canales",campaign_performance:"Rendimiento de campañas",customer_acquisition:"Adquisición de clientes",traffic_conversion:"Conversión de tráfico"},metrics:{ads_spend:"Gasto en anuncios",ads_spend_description:"El gasto en anuncios en un período determinado. Suma de todos los sub-cuentas de anuncios (e.g. insta, google). Excluyendo comisiones de agencias",direct_measured_revenue:"Ingresos medidos directamente",direct_measured_revenue_description:"La cantidad de ingresos medidos directamente desde anuncios",measured_revenue:"Ingresos medidos",measured_revenue_description:"La cantidad de ingresos medidos desde anuncios",direct_measured_conversions:"Conversiones medidas directamente",direct_measured_conversions_description:"La cantidad de conversiones medidas directamente desde anuncios",measured_conversions:"Conversiones medidas",measured_conversions_description:"La cantidad de conversiones medidas desde anuncios",roas:"ROAS",roas_description:"Este es el ratio de los ingresos a los gastos en anuncios",impressions:"Impresiones",impressions_description:"Número de veces que tus anuncios fueron mostrados a potenciales clientes",clicks:"Clicks/Acciones",clicks_description:"Total de interacciones con tus anuncios, incluyendo clicks y otras acciones",website_visitors:"Visitantes web",website_visitors_description:"Visitantes únicos a tu sitio web desde campañas de anuncios",new_leads:"Nuevos leads",new_leads_description:"Nuevos potenciales clientes que proporcionaron información de contacto",customer_ltv:"LTV de cliente",customer_ltv_description:"Valor promedio de vida de clientes adquiridos a través de anuncios",new_customers:"Nuevos clientes",new_customers_description:"Nuevos clientes que hicieron una compra o tomaron una acción",new_leads_conversion_rate:"Tasa de conversión de leads nuevos",new_leads_conversion_rate_description:"El ratio de leads nuevos al total de leads",new_customers_conversion_rate:"Tasa de conversión de nuevos clientes",new_customers_conversion_rate_description:"El ratio de nuevos clientes al total de clientes",cost_per_click:"Costo por click",cost_per_click_description:"El gasto por click en tus anuncios",click_conversion_rate:"Tasa de conversión de clicks",click_conversion_rate_description:"El ratio de clicks al total de clicks",click_through_rate:"Tasa de clics",click_through_rate_description:"El ratio de clicks al total de impresiones",conversion_rate:"Tasa de conversión",conversion_rate_description:"El ratio de conversiones al total de clicks",total_conversion:"Total de conversiones",total_conversion_description:"El número total de conversiones desde tus anuncios",cac:"CAC",cac_description:"El gasto por cliente adquirido",revenue_per_click:"Ingresos por click",revenue_per_click_description:"El ingreso generado por cada click en tus anuncios",revenue_per_new_customer:"Ingresos por nuevo cliente",revenue_per_new_customer_description:"El ingreso generado por cada nuevo cliente",reengaged_customers:"Clientes reactivados",reengaged_customers_description:"El número de clientes que han sido reactivados con tus anuncios",expected_revenue:"Ingresos esperados",expected_revenue_description:"El ingreso que esperas generar desde tus anuncios",estimated_revenue:"Ingresos estimados",estimated_revenue_description:"El ingreso que estimas generar desde tus anuncios"},title:"Panel de ingresos de marketing",settings_sheet:{setup:"Configuración",connected_accounts:"Cuentas conectadas",setup_analytics:"Configurar analytics",setup_analytics_description:"Configura tu tracking de analytics",setup_campaigns:"Configurar campañas",setup_campaigns_description:"Configura tu primera campaña",legal:"Legal",terms_of_service:"Términos de servicio",privacy_policy:"Política de privacidad"}},setup:{how_it_works:{title:"Cómo funciona",dialog_title:"Configura Marketing Insights",connect_ads_title:"Conecta tus cuentas de anuncios",connect_ads_description:"Conecta tus cuentas de anuncios de plataformas como Google y Meta para consolidar todos tus datos de campañas en un solo lugar. Esto te permite rastrear y analizar tu gasto en marketing de manera completa.",install_pixel_title:"Instala nuestro pixel de seguimiento",install_pixel_description:"Añade nuestro código de seguimiento ligero a tu sitio web para medir las interacciones y conversiones de los clientes. Esta integración simple ayuda a identificar qué anuncios están generando resultados reales para tu negocio.",see_customers_results_title:"Ver clientes y resultados",see_customers_results_description:"Obtén una visión clara de tu rendimiento en marketing con análisis detallados sobre adquisición de clientes, tasas de conversión y retorno de inversión en anuncios. Haz decisiones basadas en datos para optimizar tus campañas y crecer tu negocio.",still_have_more_questions:"¿Tienes más preguntas?",get_started:"Comenzar"},initial_setup:{wizard_title:"Conecta tus cuentas de anuncios y ver cómo tus campañas generan ingresos",title:"Desbloquea insights claros en tu rendimiento de marketing",description:"Para empezar, conecta tus cuentas de anuncios de Google y Meta. Esto te permitirá rastrear y analizar tu gasto en marketing de manera completa.",description_2:"Con un proceso de configuración simple, tendrás insights accionables a tu disposición para ayudarte a tomar mejores decisiones y crecer tu negocio.",setup_performance_analytics:"Configura analytics de rendimiento",next_steps_description:"Si no tienes anuncios aún, puedes lanzar tu primera campaña de anuncios AI en minutos.",next_steps_link:"Te pediremos que conectes tus cuentas de anuncios y configures tu primera campaña."}},oauth:{selectAccount:{title:"Cuenta de {{platform}}",description:"Elige la cuenta de {{platform}} que quieres conectar.",loading:"Cargando cuentas...",loadingPlatform:"Cargando cuentas de {{platform}}...",loadingDescription:"Por favor, espera mientras obtenemos tus cuentas disponibles...",noAccounts:"No se encontraron cuentas de {{platform}} para tu cuenta.",noAccountsDescription:"Por favor, asegúrate de tener acceso a una cuenta de {{platform}} y vuelve a intentarlo.",selectAccountPlaceholder:"Selecciona una cuenta",searchPlaceholder:"Buscar cuentas...",fetchAccounts:"Buscando cuentas...",noAccountSelected:"No hay cuenta seleccionada",enableTrackingParams:"Habilitar parámetros de seguimiento",enableTrackingParamsDescription:"Añada el parámetro de ID de campaña de alcance a la configuración de seguimiento de su plataforma publicitaria. No sobrescribiremos ningún parámetro de seguimiento existente. Necesario para un seguimiento preciso.",google:{selectAccountDescription:"Elige la cuenta de Google Ads que quieres conectar para ver tus datos. Estas serán vinculadas a nuestra MCC para un seguimiento óptimo.",mccAccounts:"Cuentas MCC",directAccounts:"Cuentas Directas"},meta:{selectAccountDescription:"Elige la cuenta de Meta Ads que quieres conectar para ver tus datos."}},success:{connection:{title:"Conectado correctamente",description:"Tu cuenta de {{provider}} ha sido conectada."},revoke:{title:"Cuenta revocada",description:"Tu cuenta de {{provider}} ha sido revocada."}},error:{title:"Error al conectar",description:"Error al conectar cuenta"},revoke:{title:"Revocar acceso",description:"¿Estás seguro? Revocar acceso eliminará la conexión que tienes y no podrás ver tus métricas de anuncios.",cancel:"Cancelar",revoke:"Revocar",error:{title:"Error",description:"Error al revocar acceso"}}},magic_link:{get_started:"Comenzar",description:"Reach estará incrustado en tu panel de control pero hasta entonces, puedes comenzar con un enlace mágico. Inicia sesión en tu cuenta y comienza a crear campañas AI o mide tu gasto en anuncios y rendimiento.",create_campaigns:"Crea campañas de anuncios AI en minutos",unlock_insights:"Desbloquea insights en tu gasto en anuncios y rendimiento",save_time:"Ahorra tiempo con optimización de campañas automatizadas",request_new_magic_link:"Solicitar nuevo enlace mágico",go_to_dashboard:"Ir al panel de control",continuation_disclaimer:"Al continuar, aceptas nuestros <terms_of_service>Términos de servicio</terms_of_service> y <privacy_policy>Política de privacidad</privacy_policy>."},empty_state:{analytics:{title:"No tienes ninguna cuenta de anuncios conectada",description:"Puedes conectar tus cuentas de anuncios en minutos y empezar a atraer más clientes a tu negocio.",button_text:"Configurar analytics"}}},engage:{user:"Usuario",user_other:"Usuarios",automation:"Automatización",automation_other:"Automatizaciones",segment:"Segmento",segment_other:"Segmentos",one_time:"Una vez",trigger_based:"Basado en un disparador",insight:"Estadísticas",insight_other:"Estadísticas"}}};pf.use(kf).use(Sp).init({resources:Mf,fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},defaultNS:"common",ns:["common"],load:"languageOnly",detection:{order:["querystring","localStorage","navigator"],lookupQuerystring:"lang",lookupLocalStorage:"i18nextLng",caches:["localStorage"],convertDetectedLanguage:e=>e.split("-")[0]}});const jf={ad_spend:"Ad Spend",date:"Date",close:"Close",continue:"Continue",connected:"Connected",connecting:"Connecting...",reauthenticate:"Reauthenticate",account_settings:"Account Settings",manage_account_settings:"Manage your account settings",copy:"Copy",copied:"Copied",error:"An error occurred",filter:"Filter",finishingUp:"Finishing up...",loading:"Loading...",need_help:"Need help? let us know",next:"Next",next_steps:"Next steps:",number:"{{number}}",previous:"Previous",revenue:"Revenue",revenue_from_ads:"Revenue From Ads",roas:"ROAS",return_on_ad_spend:"Return on Ad Spend",select_dates:"Select dates",total_ads_spend:"Total Ads Spend",measure:{dashboard:{title:"Marketing ROI Dashboard",subtitle:"Track and analyze how your marketing efforts are driving sales",application_status_banner_title:"We are experiencing some issues",application_status_banner_description:"We are aware of an issue affecting the dashboard. We are working on it and will have it resolved soon.",no_metrics_banner_title:"We are unable to display any metrics for this date range",no_metrics_banner_description:"If you have just connected your ad accounts, your metrics should begin populating within the next 24 hours. Please check back soon.",reach_managed_campaign_banner:"Your ads are being managed by Reach. We’ll automatically optimize them to drive the best results."}},authentication:{required:"Authentication required",failed:"Authentication failed",connect_account_title:"Connect Your {{provider}} Account",connect_account_description:"To create and manage ad campaigns, please connect your {{provider}} account",connect_account_button:"Continue with {{provider}}",connect_account_TOS:"By connecting, you agree to our Terms of Service and Privacy Policy"},theme:{loading:"Loading theme...",error:"Error loading theme: {{message}}"},dates:{last_week:"Last week",last_month:"Last month",last_quarter:"Last quarter",last_year:"Last year"},campaigns:{setup:{card_header:"Run paid digital ads to get new leads & customers",title:"Create your first AI-driven Ad campaign in 4 simple clicks",description:"Welcome to the future of advertising! Our AI-powered campaign builder helps you effortlessly design and manage ads that reach your target audience with precision. Get started now to unlock the potential of automated, data-driven advertising.",button:"Set up paid ads",next_steps_description:"Already running ads? Track Your Marketing Results with a few clicks.",link_to_analytics:"Connect your existing accounts to get instant insights into your marketing performance."},how_it_works:{dialog_title:"How It Works",title:"Setup your ad campaign",step1:{title:"Set up budget & review your ads",description:"Define how much you want to spend, review the ad designs, and configure who you want to reach."},step2:{title:"We’ll publish & optimize your ads on Google",description:"We’ll do the hard work of publishing & continuously optimizing your ads on Google making sure you’re getting the best possible return on investment."},step3:{title:"See Customers & Results",description:"When a customer buys from you, we’ll notify you and show you the total revenue driven to your business from each dollar invested in ads. "}},ads_builder:{dialog_trigger:"New campaign",title:"Ads Wizard",description:"Create your new ad campaign",review_ad_themes:"Review Ad Themes",example_ad_preview:"Example Ad Preview",example_ad_preview_description:"Here's an example of how prospective customers might see your ads. We will automagically tweak the copy based on your products offered, and improve targeting based on what results in the most dollars to your business."}},analytics:{setup_analytics:"Setup analytics",setup_analytics_description:"Let's get you started with analytics. Connect your data sources to start tracking your customers.",connect_data:{title:"Connect Your Data",description:"We bring all of your ads data together to give you a clear view of which customers are coming in from where."},install_pixel:{copied_to_clipboard:"Copied to clipboard",copied_to_clipboard_description:"The tracking pixel code has been copied to your clipboard.",title:"Install our Tracking Pixel",description:"In order to get a complete picture of how users are interacting with your website, it’s important for the Reach analytics code to be on every page of your website and within as many third-party tools that you use as possible.",card_title:"Install the Snippet inside the <HEAD> of every page",third_party_pages_your_tracking_pixel:"Your Tracking Pixel:",card_description:"Copy this following text and insert it inside of the <HEAD> tags on all pages.",error_generating_pixel_code:"Error generating pixel code - please contact your administrator",third_party_pages_question:"Do you use any websites or landing pages for marketing your business?",third_party_pages_yes:"Yes, I have marketing websites",third_party_pages_no:"No, I don't use any websites",third_party_pages_why_asking:"Why We're Asking For This",third_party_pages_why_asking_description:"Adding our tracking pixel to your website allows us to:",third_party_pages_why_asking_list_1:"Understand how visitors interact with your pages",third_party_pages_why_asking_list_2:"Measure which ads are driving visitors to your site",third_party_pages_why_asking_list_3:"Track conversions from your campaigns",third_party_pages_enter_marketing_website:"Enter your marketing website:",third_party_pages_we_will_use_this_to_help_you_install_the_tracking_pixel:"We'll use this to help you install the tracking pixel",third_party_pages_select_your_website_platform:"Select your website platform:"},third_party_installation_guides:{title:"Installation Guides",description:"These guides will help you add the Reach analytics snippet to your website. The process works with any website builder or platform and most third-party tools.",installation_guide:"{{name}} Installation Guide",official_guide:"Official Guide",shopify:{step_1:"From your Shopify admin, go to Online Store > Themes",step_2:"Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code",step_3:'Open "theme.liquid"',step_4:"Find the </head> tag",step_5:"Paste the code snippet from the section above just before it"},google_tag_manager:{step_1:"Go to https://tagmanager.google.com",step_2:"Sign in to your Google Account",step_3:"Click the Accounts tab, then select Create Account",step_4:"Enter an account name and select your country location",step_5:"In Container Setup, enter a container name (e.g., your website URL)",step_6:'Select "Web" as the container type',step_7:"Click Create and agree to the Terms of Service",step_8:"Once created, you'll receive two code snippets to install:",step_9:"• Place the first snippet in the <head> of your page",step_10:"• Place the second snippet immediately after the opening <body> tag",step_11:"In the Tags tab, click the + button to create a new tag",step_12:'Select "Google Analytics: Universal Analytics" as the tag type',special_note:"Make sure you have the Google Tag Manager container code already installed on your site before adding this tag."},hubspot:{step_1:"Go to Settings → Content → Pages",step_2:'In the upper left, select a domain to edit its settings. Or select "Default settings for all domains"',step_3:'Paste the code from the section above to the "Site Header HTML" field',step_4:'Click "Save"'},wordpress:{step_1:"We recommend using the popular WPCode Plugin",step_2:'In the plugin, select "+ Add Snippet"',step_3:'When presented with a menu of options, navigate to "Add Your Custom Code (New Snippet)" and select "Use snippet"',step_4:"Paste the code snippet from the section above",step_5:'For Insert Method, choose "Auto Insert"',step_6:'For Location, select "Site Wide Header"',step_7:"Be sure to save your snippet"},squarespace:{step_1:"Go to Settings → Advanced → Code Injection",step_2:'Paste the code from the section above into the "Header" field',step_3:'Click "Save"'},wix:{step_1:"Go to Settings → Custom Code",step_2:'Click "+ Add Custom Code"',step_3:"Paste the code from the section above",step_4:'Click "Apply"',step_5:'Set "Add Code to Pages" to "All Pages"'},webflow:{step_1:"Open your project settings",step_2:'Navigate to "Custom Code"',step_3:'Paste the code from the section above into the "Head Code" section',step_4:'Click "Save Changes"'},third_party_systems:{step_1:"Check if your third-party tools (lead forms, scheduling tools, etc.) allow custom code injection",step_2:'Look for options labeled "Custom Code", "Embed Code", or "Advanced Settings"',step_3:"Paste the same tracking code into these sections where available",step_4:"Common locations include:",step_5:"• Head section of your website (for tracking scripts and styles)",step_6:"• Footer section of your website (for tracking scripts and styles)",special_note:"This helps ensure consistent tracking across all your customer touchpoints, even when using external tools."},custom:{step_1:"Locate your website's HTML template or main layout file",step_2:"Find the </head> tag in your HTML",step_3:"Paste the code snippet just before the </head> tag",step_4:"Save the file and deploy your changes"}},success:{title:"Success!",description:"You have successfully connected your data sources and installed our tracking pixel.",what_next:"What happens next?",step_1:"Your ad data will start syncing automatically",step_2:"The pixel will begin tracking conversions on your site",step_3:"You'll see your first analytics reports within 24 hours"}},dashboard:{banners:{metrics_crunching:{title:"Crunching your data",description:"You have successfully connected your ad accounts. We're now crunching your data. Check back soon for relevant metrics."},revoked_accounts:{title:"Your ad accounts have been revoked",description:"Please reconnect your ad accounts to continue using the dashboard."}},roas_chart:{title:"Ad Spend vs Revenue Over Time",campaign_not_available:"Chart is not available for individual campaigns yet"},customer_acquisition:{title:"Client Acquisition",description:"See how many new clients you acquired from each channel",client:"Client",source:"Source",total_spent:"Total Spent",total_revenue:"Total Revenue",status:"Status",no_data:"No data available",source_breakdown:"Source",payment_status:"Payment Status",paid:"Paid",unpaid:"Unpaid",invoice_details:"Invoice Details",amount:"Amount",service:"Service",invoice_date:"Invoice Date"},channel_performance:{title:"Channel Performance",description:"See how each channel performs",channel:"Channel",spend:"Spend",revenue:"Revenue",roas:"ROAS",new_customers:"New Customers"},traffic_conversion:{title:"Traffic Conversion Funnel"},tabs:{overview:"Overview",channel_performance:"Channel Performance",campaign_performance:"Campaign Performance",customer_acquisition:"Customer Acquisition",traffic_conversion:"Traffic Conversion"},metrics:{ads_spend:"Ads Spend",ads_spend_description:"The amount spent on ads in a given period. Sum of all sub-ads accounts (e.g. insta, google). Excluding agency fees",direct_measured_revenue:"Direct Measured Revenue",direct_measured_revenue_description:"The amount of revenue directly measured from ads",measured_revenue:"Measured Revenue",measured_revenue_description:"The amount of revenue measured from ads",direct_measured_conversions:"Direct Measured Conversions",direct_measured_conversions_description:"The amount of conversions directly measured from ads",measured_conversions:"Measured Conversions",measured_conversions_description:"The amount of conversions measured from ads",roas:"ROAS",roas_description:"This is the ratio of the revenue to the ads spend",impressions:"Impressions",impressions_description:"Number of times your ads were shown to potential customers",clicks:"Clicks/Actions",clicks_description:"Total interactions with your ads, including clicks and other actions",website_visitors:"Website Visitors",website_visitors_description:"Unique visitors to your website from advertising campaigns",new_leads:"New Leads",new_leads_description:"New potential customers who provided contact information",customer_ltv:"Customer LTV",customer_ltv_description:"Average lifetime value of customers acquired through ads",new_customers:"New Customers",new_customers_description:"New customers who made a purchase or took an action",new_leads_conversion_rate:"New Leads Conversion Rate",new_leads_conversion_rate_description:"The ratio of new leads to the total number of leads",new_customers_conversion_rate:"New Customers Conversion Rate",new_customers_conversion_rate_description:"The ratio of new customers to the total number of customers",cost_per_click:"Cost Per Click",cost_per_click_description:"The amount spent per click on your ads",click_conversion_rate:"Click Conversion Rate",click_conversion_rate_description:"The ratio of clicks to the total number of clicks",click_through_rate:"Click Through Rate",click_through_rate_description:"The ratio of clicks to the total number of impressions",conversion_rate:"Conversion Rate",conversion_rate_description:"The ratio of conversions to the total number of clicks",total_conversion:"Total Conversion",total_conversion_description:"The total number of conversions from your ads",cac:"CAC",cac_description:"The amount spent per customer acquisition",revenue_per_click:"Revenue Per Click",revenue_per_click_description:"The amount of revenue generated per click on your ads",revenue_per_new_customer:"Revenue Per New Customer",revenue_per_new_customer_description:"The amount of revenue generated per new customer",reengaged_customers:"Reengaged Customers",reengaged_customers_description:"The number of customers who have been reengaged with your ads",expected_revenue:"Expected Revenue",expected_revenue_description:"The amount of revenue you expect to generate from your ads",estimated_revenue:"Estimated Revenue",estimated_revenue_description:"The amount of revenue you expect to generate from your ads"},title:"Marketing Revenue Dashboard",settings_sheet:{setup:"Setup",connected_accounts:"Connected Accounts",setup_analytics:"Setup analytics",setup_analytics_description:"Configure your analytics tracking",setup_campaigns:"Setup campaigns",setup_campaigns_description:"Set up your first campaign",legal:"Legal",terms_of_service:"Terms of Service",privacy_policy:"Privacy Policy"}},setup:{how_it_works:{title:"How It Works",dialog_title:"Setup Marketing Insights",connect_ads_title:"Connect your Ads Accounts",connect_ads_description:"Link your advertising accounts from platforms like Google and Meta to consolidate all your campaign data in one place. This enables comprehensive tracking and analysis of your marketing spend.",install_pixel_title:"Install Our Tracking Pixel",install_pixel_description:"Add our lightweight tracking code to your website to accurately measure customer interactions and conversions. This simple integration helps identify which ads are driving real results for your business.",see_customers_results_title:"See Customers & Results",see_customers_results_description:"Get clear insights into your marketing performance with detailed analytics on customer acquisition, conversion rates, and return on ad spend. Make data-driven decisions to optimize your campaigns and grow your business.",still_have_more_questions:"Still have more questions?",get_started:"Get Started"},initial_setup:{wizard_title:"Connect your ad accounts and see exactly how your campaigns drive revenue",title:"Unlock Clear Insights into Your Marketing Performance",description:"Stop guessing and start knowing. Our performance dashboard gives you a complete view of your marketing efforts, including ad spend, conversions, and return on ad spend (ROAS).",description_2:"With a simple setup process, you’ll have actionable insights at your fingertips to help you make smarter decisions and grow your business.",setup_performance_analytics:"Setup Performance Analytics",next_steps_description:"If you're not running ads yet, you can launch your first AI-powered ad campaign in minutes.",next_steps_link:"We will prompt you to connect your ad accounts and set up your first campaign."}},oauth:{selectAccount:{title:"Select {{platform}} Account",description:"Choose the {{platform}} account you want to connect.",loading:"Loading accounts...",loadingPlatform:"Loading {{platform}} accounts...",loadingDescription:"Please wait while we fetch your available accounts...",noAccounts:"No {{platform}} accounts were found for your account.",noAccountsDescription:"Please make sure you have access to a {{platform}} account and try again.",selectAccountPlaceholder:"Select an account",searchPlaceholder:"Search accounts...",fetchAccounts:"Fetching accounts...",noAccountSelected:"No account selected",enableTrackingParams:"Enable Tracking Parameters",enableTrackingParamsDescription:"Append the reach campaign id parameter to your ad platform tracking settings. We will not overwrite any existing tracking parameters. Required for accurate tracking.",google:{selectAccountDescription:"Select the Google Ads account you want to connect to view your data. These will be linked to our MCC for optimal tracking.",mccAccounts:"MCC Accounts",directAccounts:"Direct Accounts"},meta:{selectAccountDescription:"Choose the Meta Ads account you want to connect to view your data."}},success:{connection:{title:"Connected successfully",description:"Your {{provider}} account has been connected."},revoke:{title:"Account revoked",description:"Your {{provider}} account has been revoked."}},error:{title:"Connection failed",description:"Failed to connect account"},revoke:{title:"Revoke access",description:"Are you sure? Revoking access will remove the connection you have and you will be unable to view your ad metrics.",cancel:"Cancel",revoke:"Revoke",error:{title:"Error",description:"Failed to revoke access"}}},magic_link:{get_started:"Get Started",description:"Reach will be embedded within your platform dashboard but until then, you can get started with a magic link. Log in to your account and start creating AI-powered campaigns or measuring your ad spend and performance.",create_campaigns:"Create AI-generated ad campaigns in minutes",unlock_insights:"Unlock insights into your ad spend and performance",save_time:"Save time with automated campaign optimization",request_new_magic_link:"Request New Magic Link",go_to_dashboard:"Go to Dashboard",continuation_disclaimer:"By continuing, you agree to our <terms_of_service>Terms of Service</terms_of_service> and <privacy_policy>Privacy Policy</privacy_policy>."},empty_state:{analytics:{title:"You haven't connected any ad accounts yet",description:"You can connect your ad accounts in minutes and start driving more customers to your business.",button_text:"Setup analytics"}}},Lf=({children:e,language:r,initialLanguage:o})=>(n.useEffect((()=>{o&&pf.changeLanguage(o)}),[o]),n.useEffect((()=>{if(r?.overrides){const e=(e,t)=>{const n=r?.overrides?.[e]?.[t];return n?{...jf,...Object.entries(n).reduce(((e,[t,n])=>({...e,[t]:n})),{})}:jf};Object.keys(r.overrides).forEach((t=>{const n=e(t,"en"),r=e(t,"es");pf.addResourceBundle("en",t,n,!0,!0),pf.addResourceBundle("es",t,r,!0,!0)}))}}),[r?.overrides]),t.jsx(Tp,{i18n:pf,children:e}));var Df={},If={},Ff="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Uf="1.8.0",$f=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;var Vf=function(e){var t=new Set([e]),n=new Set,r=e.match($f);if(!r)return function(){return!1};var o=+r[1],i=+r[2],a=+r[3];if(null!=r[4])return function(t){return t===e};function s(e){return n.add(e),!1}function l(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var r=e.match($f);if(!r)return s(e);var c=+r[2],u=+r[3];return null!=r[4]||o!==+r[1]?s(e):0===o?i===c&&a<=u?l(e):s(e):i<=c?l(e):s(e)}}(Uf),Bf=Uf.split(".")[0],zf=Symbol.for("opentelemetry.js.api."+Bf),Hf=Ff;function qf(e,t,n,r){var o;void 0===r&&(r=!1);var i=Hf[zf]=null!==(o=Hf[zf])&&void 0!==o?o:{version:Uf};if(!r&&i[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(a.stack||a.message),!1}if(i.version!==Uf){a=new Error("@opentelemetry/api: Registration of version v"+i.version+" for "+e+" does not match previously registered API v"+Uf);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+Uf+"."),!0}function Gf(e){var t,n,r=null===(t=Hf[zf])||void 0===t?void 0:t.version;if(r&&Vf(r))return null===(n=Hf[zf])||void 0===n?void 0:n[e]}function Kf(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Uf+".");var n=Hf[zf];n&&delete n[e]}var Wf,Yf,Xf=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zf("debug",this._namespace,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zf("error",this._namespace,e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zf("info",this._namespace,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zf("warn",this._namespace,e)},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zf("verbose",this._namespace,e)},e}();function Zf(e,t,n){var r=Gf("diag");if(r)return n.unshift(t),r[e].apply(r,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(n),!1))}(Yf=Wf||(Wf={}))[Yf.NONE=0]="NONE",Yf[Yf.ERROR=30]="ERROR",Yf[Yf.WARN=50]="WARN",Yf[Yf.INFO=60]="INFO",Yf[Yf.DEBUG=70]="DEBUG",Yf[Yf.VERBOSE=80]="VERBOSE",Yf[Yf.ALL=9999]="ALL";var Qf=function(){function e(){function e(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=Gf("diag");if(r)return r[e].apply(r,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(t),!1))}}var t=this;t.setLogger=function(e,n){var r,o,i;if(void 0===n&&(n={logLevel:Wf.INFO}),e===t){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!==(r=a.stack)&&void 0!==r?r:a.message),!1}"number"==typeof n&&(n={logLevel:n});var s=Gf("diag"),l=function(e,t){function n(n,r){var o=t[n];return"function"==typeof o&&e>=r?o.bind(t):function(){}}return e<Wf.NONE?e=Wf.NONE:e>Wf.ALL&&(e=Wf.ALL),t=t||{},{error:n("error",Wf.ERROR),warn:n("warn",Wf.WARN),info:n("info",Wf.INFO),debug:n("debug",Wf.DEBUG),verbose:n("verbose",Wf.VERBOSE)}}(null!==(o=n.logLevel)&&void 0!==o?o:Wf.INFO,e);if(s&&!n.suppressOverrideMessage){var c=null!==(i=(new Error).stack)&&void 0!==i?i:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from "+c),l.warn("Current logger will overwrite one already registered from "+c)}return qf("diag",l,t,!0)},t.disable=function(){Kf("diag",t)},t.createComponentLogger=function(e){return new Xf(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),Jf=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2);return[t[0],t[1]]}))},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=new e(this._entries);try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),s=a.next();!s.done;s=a.next()){i._entries.delete(s.value)}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},e.prototype.clear=function(){return new e},e}(),eh=Symbol("BaggageEntryMetadata"),th=Qf.instance();function nh(e){return void 0===e&&(e={}),new Jf(new Map(Object.entries(e)))}function rh(e){return"string"!=typeof e&&(th.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:eh,toString:function(){return e}}}function oh(e){return Symbol.for(e)}var ih,ah,sh=new(function(){return function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var o=new e(n._currentContext);return o._currentContext.set(t,r),o},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}}}()),lh=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],ch=function(){return function(){function e(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(console){var r=console[e];if("function"!=typeof r&&(r=console.log),"function"==typeof r)return r.apply(console,t)}}}for(var t=0;t<lh.length;t++)this[lh[t].n]=e(lh[t].c)}}(),uh=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dh=function(){function e(){}return e.prototype.createHistogram=function(e,t){return _h},e.prototype.createCounter=function(e,t){return wh},e.prototype.createUpDownCounter=function(e,t){return Sh},e.prototype.createObservableGauge=function(e,t){return Th},e.prototype.createObservableCounter=function(e,t){return Eh},e.prototype.createObservableUpDownCounter=function(e,t){return Ch},e.prototype.addBatchObservableCallback=function(e,t){},e.prototype.removeBatchObservableCallback=function(e){},e}(),ph=function(){return function(){}}(),fh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t.prototype.add=function(e,t){},t}(ph),hh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t.prototype.add=function(e,t){},t}(ph),mh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t.prototype.record=function(e,t){},t}(ph),gh=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.removeCallback=function(e){},e}(),vh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t}(gh),yh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t}(gh),bh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t}(gh),xh=new dh,wh=new fh,_h=new mh,Sh=new hh,Eh=new vh,Th=new yh,Ch=new bh;(ah=ih||(ih={}))[ah.INT=0]="INT",ah[ah.DOUBLE=1]="DOUBLE";var Ah,Nh,Rh={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},Oh={set:function(e,t,n){null!=e&&(e[t]=n)}},Ph=function(){function e(){}return e.prototype.active=function(){return sh},e.prototype.with=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];return t.call.apply(t,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([n],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(r),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),kh="context",Mh=new Ph,jh=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return qf(kh,e,Qf.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,t,n){for(var r,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(r=this._getContextManager()).with.apply(r,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e,t,n],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(o),!1))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return Gf(kh)||Mh},e.prototype.disable=function(){this._getContextManager().disable(),Kf(kh,Qf.instance())},e}();(Nh=Ah||(Ah={}))[Nh.NONE=0]="NONE",Nh[Nh.SAMPLED=1]="SAMPLED";var Lh="0000000000000000",Dh="00000000000000000000000000000000",Ih={traceId:Dh,spanId:Lh,traceFlags:Ah.NONE},Fh=function(){function e(e){void 0===e&&(e=Ih),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}(),Uh=oh("OpenTelemetry Context Key SPAN");function $h(e){return e.getValue(Uh)||void 0}function Vh(){return $h(jh.getInstance().active())}function Bh(e,t){return e.setValue(Uh,t)}function zh(e){return e.deleteValue(Uh)}function Hh(e,t){return Bh(e,new Fh(t))}function qh(e){var t;return null===(t=$h(e))||void 0===t?void 0:t.spanContext()}var Gh=/^([0-9a-f]{32})$/i,Kh=/^[0-9a-f]{16}$/i;function Wh(e){return Gh.test(e)&&e!==Dh}function Yh(e){return Kh.test(e)&&e!==Lh}function Xh(e){return Wh(e.traceId)&&Yh(e.spanId)}function Zh(e){return new Fh(e)}var Qh=jh.getInstance(),Jh=function(){function e(){}return e.prototype.startSpan=function(e,t,n){if(void 0===n&&(n=Qh.active()),Boolean(null==t?void 0:t.root))return new Fh;var r,o=n&&qh(n);return"object"==typeof(r=o)&&"string"==typeof r.spanId&&"string"==typeof r.traceId&&"number"==typeof r.traceFlags&&Xh(o)?new Fh(o):new Fh},e.prototype.startActiveSpan=function(e,t,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=t:3===arguments.length?(o=t,a=n):(o=t,i=n,a=r);var s=null!=i?i:Qh.active(),l=this.startSpan(e,o,s),c=Bh(s,l);return Qh.with(c,a,void 0,l)}},e}();var em,tm,nm,rm,om,im,am=new Jh,sm=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):am},e}(),lm=new(function(){function e(){}return e.prototype.getTracer=function(e,t,n){return new Jh},e}()),cm=function(){function e(){}return e.prototype.getTracer=function(e,t,n){var r;return null!==(r=this.getDelegateTracer(e,t,n))&&void 0!==r?r:new sm(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:lm},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getTracer(e,t,n)},e}();(tm=em||(em={}))[tm.NOT_RECORD=0]="NOT_RECORD",tm[tm.RECORD=1]="RECORD",tm[tm.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED",(rm=nm||(nm={}))[rm.INTERNAL=0]="INTERNAL",rm[rm.SERVER=1]="SERVER",rm[rm.CLIENT=2]="CLIENT",rm[rm.PRODUCER=3]="PRODUCER",rm[rm.CONSUMER=4]="CONSUMER",(im=om||(om={}))[im.UNSET=0]="UNSET",im[im.OK=1]="OK",im[im.ERROR=2]="ERROR";var um="[_0-9a-z-*/]",dm=new RegExp("^(?:"+("[a-z]"+um+"{0,255}")+"|"+("[a-z0-9]"+um+"{0,240}@[a-z]"+um+"{0,13}")+")$"),pm=/^[ -~]{0,255}[!-~]$/,fm=/,|=/;var hm=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,t.length);(function(e){return dm.test(e)})(o)&&function(e){return pm.test(e)&&!fm.test(e)}(i)&&e.set(o,i)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}();var mm=jh.getInstance(),gm=Qf.instance(),vm=new(function(){function e(){}return e.prototype.getMeter=function(e,t,n){return xh},e}()),ym="metrics",bm=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(e){return qf(ym,e,Qf.instance())},e.prototype.getMeterProvider=function(){return Gf(ym)||vm},e.prototype.getMeter=function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)},e.prototype.disable=function(){Kf(ym,Qf.instance())},e}().getInstance(),xm=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}(),wm=oh("OpenTelemetry Baggage Key");function _m(e){return e.getValue(wm)||void 0}function Sm(){return _m(jh.getInstance().active())}function Em(e,t){return e.setValue(wm,t)}function Tm(e){return e.deleteValue(wm)}var Cm="propagation",Am=new xm,Nm=function(){function e(){this.createBaggage=nh,this.getBaggage=_m,this.getActiveBaggage=Sm,this.setBaggage=Em,this.deleteBaggage=Tm}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return qf(Cm,e,Qf.instance())},e.prototype.inject=function(e,t,n){return void 0===n&&(n=Oh),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return void 0===n&&(n=Rh),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){Kf(Cm,Qf.instance())},e.prototype._getGlobalPropagator=function(){return Gf(Cm)||Am},e}().getInstance(),Rm="trace",Om=function(){function e(){this._proxyTracerProvider=new cm,this.wrapSpanContext=Zh,this.isSpanContextValid=Xh,this.deleteSpan=zh,this.getSpan=$h,this.getActiveSpan=Vh,this.getSpanContext=qh,this.setSpan=Bh,this.setSpanContext=Hh}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=qf(Rm,this._proxyTracerProvider,Qf.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return Gf(Rm)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){Kf(Rm,Qf.instance()),this._proxyTracerProvider=new cm},e}().getInstance();const Pm={context:mm,diag:gm,metrics:bm,propagation:Nm,trace:Om},km=Object.freeze(Object.defineProperty({__proto__:null,DiagConsoleLogger:ch,get DiagLogLevel(){return Wf},INVALID_SPANID:Lh,INVALID_SPAN_CONTEXT:Ih,INVALID_TRACEID:Dh,ProxyTracer:sm,ProxyTracerProvider:cm,ROOT_CONTEXT:sh,get SamplingDecision(){return em},get SpanKind(){return nm},get SpanStatusCode(){return om},get TraceFlags(){return Ah},get ValueType(){return ih},baggageEntryMetadataFromString:rh,context:mm,createContextKey:oh,createNoopMeter:function(){return xh},createTraceState:function(e){return new hm(e)},default:Pm,defaultTextMapGetter:Rh,defaultTextMapSetter:Oh,diag:gm,isSpanContextValid:Xh,isValidSpanId:Yh,isValidTraceId:Wh,metrics:bm,propagation:Nm,trace:Om},Symbol.toStringTag,{value:"Module"}));var Mm=function(){function e(){}return e.prototype.emit=function(e){},e}(),jm=new(function(){function e(){}return e.prototype.getLogger=function(e,t,n){return new Mm},e}()),Lm="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Dm=Symbol.for("io.opentelemetry.js.api.logs"),Im=Lm;var Fm=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(e){return Im[Dm]?this.getLoggerProvider():(Im[Dm]=(t=1,n=e,r=jm,function(e){return e===t?n:r}),e);var t,n,r},e.prototype.getLoggerProvider=function(){var e,t;return null!==(t=null===(e=Im[Dm])||void 0===e?void 0:e.call(Im,1))&&void 0!==t?t:jm},e.prototype.getLogger=function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)},e.prototype.disable=function(){delete Im[Dm]},e}().getInstance();function Um(e){void 0===e&&(e=[]);for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];if(Array.isArray(o)){var i=Um(o);t=t.concat(i.instrumentations)}else"function"==typeof o?t.push(new o):o.instrumentationName&&t.push(o)}return{instrumentations:t}}function $m(e){return"function"==typeof e}var Vm=function(){}.bind();function Bm(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function zm(e){e&&e.logger&&($m(e.logger)?Vm=e.logger:Vm("new logger isn't a function, not replacing"))}function Hm(e,t,n){if(e&&e[t]){if(!n)return Vm("no wrapper function"),void Vm((new Error).stack);if($m(e[t])&&$m(n)){var r=e[t],o=n(r,t);return Bm(o,"__original",r),Bm(o,"__unwrap",(function(){e[t]===o&&Bm(e,t,r)})),Bm(o,"__wrapped",!0),Bm(e,t,o),o}Vm("original object and wrapper must be functions")}else Vm("no original function "+t+" to wrap")}function qm(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void Vm("no original to unwrap to -- has "+t+" already been unwrapped?"):(Vm("no function to unwrap."),void Vm((new Error).stack))}zm.wrap=Hm,zm.massWrap=function(e,t,n){if(!e)return Vm("must provide one or more modules to patch"),void Vm((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){Hm(e,t,n)}))})):Vm("must provide one or more functions to wrap on modules")},zm.unwrap=qm,zm.massUnwrap=function(e,t){if(!e)return Vm("must provide one or more modules to patch"),void Vm((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){qm(e,t)}))})):Vm("must provide one or more functions to unwrap on modules")};var Gm=zm,Km=function(){return Km=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Km.apply(this,arguments)},Wm=function(){function e(e,t,n){void 0===n&&(n={}),this.instrumentationName=e,this.instrumentationVersion=t,this._wrap=Gm.wrap,this._unwrap=Gm.unwrap,this._massWrap=Gm.massWrap,this._massUnwrap=Gm.massUnwrap,this._config=Km({enabled:!0},n),this._diag=gm.createComponentLogger({namespace:e}),this._tracer=Om.getTracer(e,t),this._meter=bm.getMeter(e,t),this._logger=Fm.getLogger(e,t),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var e,t=null!==(e=this.init())&&void 0!==e?e:[];return Array.isArray(t)?t:[t]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(e){void 0===e&&(e={}),this._config=Object.assign({},e)},e.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e}(),Ym=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xm=function(e){function t(t,n,r){void 0===r&&(r={});var o=e.call(this,t,n,r)||this;return o._config.enabled&&o.enable(),o}return Ym(t,e),t}(Wm);var Zm=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Qm=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};const Jm=Object.freeze(Object.defineProperty({__proto__:null,InstrumentationBase:Xm,InstrumentationNodeModuleDefinition:function(){return function(e,t,n,r,o){this.name=e,this.supportedVersions=t,this.patch=n,this.unpatch=r,this.files=o||[]}}(),InstrumentationNodeModuleFile:function(){return function(e,t,n,r){var o;this.supportedVersions=t,this.patch=n,this.unpatch=r,this.name=(o=e,gm.warn("Path normalization is not implemented for this platform. To silence this warning, ensure no node-specific instrumentations are loaded, and node-specific types (e.g. InstrumentationNodeModuleFile), are not used in a browser context)"),o)}}(),isWrapped:function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped},registerInstrumentations:function(e){var t=Um(e.instrumentations).instrumentations,n=e.tracerProvider||Om.getTracerProvider(),r=e.meterProvider||bm.getMeterProvider(),o=e.loggerProvider||Fm.getLoggerProvider();return function(e,t,n,r){for(var o=0,i=e.length;o<i;o++){var a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}(t,n,r,o),function(){!function(e){e.forEach((function(e){return e.disable()}))}(t)}},safeExecuteInTheMiddle:function(e,t,n){var r,o;try{o=e()}catch(JSe){r=JSe}finally{if(t(r,o),r&&!n)throw r;return o}},safeExecuteInTheMiddleAsync:function(e,t,n){return Zm(this,void 0,void 0,(function(){var r,o,i;return Qm(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),[4,e()];case 1:return o=a.sent(),[3,4];case 2:return i=a.sent(),r=i,[3,4];case 3:if(t(r,o),r&&!n)throw r;return[2,o];case 4:return[2]}}))}))}},Symbol.toStringTag,{value:"Module"})),eg=Wa(Jm);function tg(e){for(var t={},n=e.length,r=0;r<n;r++){var o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var ng="aws.lambda.invoked_arn",rg="db.system",og="db.connection_string",ig="db.user",ag="db.jdbc.driver_classname",sg="db.name",lg="db.statement",cg="db.operation",ug="db.mssql.instance_name",dg="db.cassandra.keyspace",pg="db.cassandra.page_size",fg="db.cassandra.consistency_level",hg="db.cassandra.table",mg="db.cassandra.idempotence",gg="db.cassandra.speculative_execution_count",vg="db.cassandra.coordinator.id",yg="db.cassandra.coordinator.dc",bg="db.hbase.namespace",xg="db.redis.database_index",wg="db.mongodb.collection",_g="db.sql.table",Sg="exception.type",Eg="exception.message",Tg="exception.stacktrace",Cg="exception.escaped",Ag="faas.trigger",Ng="faas.execution",Rg="faas.document.collection",Og="faas.document.operation",Pg="faas.document.time",kg="faas.document.name",Mg="faas.time",jg="faas.cron",Lg="faas.coldstart",Dg="faas.invoked_name",Ig="faas.invoked_provider",Fg="faas.invoked_region",Ug="net.transport",$g="net.peer.ip",Vg="net.peer.port",Bg="net.peer.name",zg="net.host.ip",Hg="net.host.port",qg="net.host.name",Gg="net.host.connection.type",Kg="net.host.connection.subtype",Wg="net.host.carrier.name",Yg="net.host.carrier.mcc",Xg="net.host.carrier.mnc",Zg="net.host.carrier.icc",Qg="peer.service",Jg="enduser.id",ev="enduser.role",tv="enduser.scope",nv="thread.id",rv="thread.name",ov="code.function",iv="code.namespace",av="code.filepath",sv="code.lineno",lv="http.method",cv="http.url",uv="http.target",dv="http.host",pv="http.scheme",fv="http.status_code",hv="http.flavor",mv="http.user_agent",gv="http.request_content_length",vv="http.request_content_length_uncompressed",yv="http.response_content_length",bv="http.response_content_length_uncompressed",xv="http.server_name",wv="http.route",_v="http.client_ip",Sv="aws.dynamodb.table_names",Ev="aws.dynamodb.consumed_capacity",Tv="aws.dynamodb.item_collection_metrics",Cv="aws.dynamodb.provisioned_read_capacity",Av="aws.dynamodb.provisioned_write_capacity",Nv="aws.dynamodb.consistent_read",Rv="aws.dynamodb.projection",Ov="aws.dynamodb.limit",Pv="aws.dynamodb.attributes_to_get",kv="aws.dynamodb.index_name",Mv="aws.dynamodb.select",jv="aws.dynamodb.global_secondary_indexes",Lv="aws.dynamodb.local_secondary_indexes",Dv="aws.dynamodb.exclusive_start_table",Iv="aws.dynamodb.table_count",Fv="aws.dynamodb.scan_forward",Uv="aws.dynamodb.segment",$v="aws.dynamodb.total_segments",Vv="aws.dynamodb.count",Bv="aws.dynamodb.scanned_count",zv="aws.dynamodb.attribute_definitions",Hv="aws.dynamodb.global_secondary_index_updates",qv="messaging.system",Gv="messaging.destination",Kv="messaging.destination_kind",Wv="messaging.temp_destination",Yv="messaging.protocol",Xv="messaging.protocol_version",Zv="messaging.url",Qv="messaging.message_id",Jv="messaging.conversation_id",ey="messaging.message_payload_size_bytes",ty="messaging.message_payload_compressed_size_bytes",ny="messaging.operation",ry="messaging.consumer_id",oy="messaging.rabbitmq.routing_key",iy="messaging.kafka.message_key",ay="messaging.kafka.consumer_group",sy="messaging.kafka.client_id",ly="messaging.kafka.partition",cy="messaging.kafka.tombstone",uy="rpc.system",dy="rpc.service",py="rpc.method",fy="rpc.grpc.status_code",hy="rpc.jsonrpc.version",my="rpc.jsonrpc.request_id",gy="rpc.jsonrpc.error_code",vy="rpc.jsonrpc.error_message",yy="message.type",by="message.id",xy="message.compressed_size",wy="message.uncompressed_size",_y=ng,Sy=rg,Ey=og,Ty=ig,Cy=ag,Ay=sg,Ny=lg,Ry=cg,Oy=ug,Py=dg,ky=pg,My=fg,jy=hg,Ly=mg,Dy=gg,Iy=vg,Fy=yg,Uy=bg,$y=xg,Vy=wg,By=_g,zy=Sg,Hy=Eg,qy=Tg,Gy=Cg,Ky=Ag,Wy=Ng,Yy=Rg,Xy=Og,Zy=Pg,Qy=kg,Jy=Mg,eb=jg,tb=Lg,nb=Dg,rb=Ig,ob=Fg,ib=Ug,ab=$g,sb=Vg,lb=Bg,cb=zg,ub=Hg,db=qg,pb=Gg,fb=Kg,hb=Wg,mb=Yg,gb=Xg,vb=Zg,yb=Qg,bb=Jg,xb=ev,wb=tv,_b=nv,Sb=rv,Eb=ov,Tb=iv,Cb=av,Ab=sv,Nb=lv,Rb=cv,Ob=uv,Pb=dv,kb=pv,Mb=fv,jb=hv,Lb=mv,Db=gv,Ib=vv,Fb=yv,Ub=bv,$b=xv,Vb=wv,Bb=_v,zb=Sv,Hb=Ev,qb=Tv,Gb=Cv,Kb=Av,Wb=Nv,Yb=Rv,Xb=Ov,Zb=Pv,Qb=kv,Jb=Mv,ex=jv,tx=Lv,nx=Dv,rx=Iv,ox=Fv,ix=Uv,ax=$v,sx=Vv,lx=Bv,cx=zv,ux=Hv,dx=qv,px=Gv,fx=Kv,hx=Wv,mx=Yv,gx=Xv,vx=Zv,yx=Qv,bx=Jv,xx=ey,wx=ty,_x=ny,Sx=ry,Ex=oy,Tx=iy,Cx=ay,Ax=sy,Nx=ly,Rx=cy,Ox=uy,Px=dy,kx=py,Mx=fy,jx=hy,Lx=my,Dx=gy,Ix=vy,Fx=yy,Ux=by,$x=xy,Vx=wy,Bx=tg([ng,rg,og,ig,ag,sg,lg,cg,ug,dg,pg,fg,hg,mg,gg,vg,yg,bg,xg,wg,_g,Sg,Eg,Tg,Cg,Ag,Ng,Rg,Og,Pg,kg,Mg,jg,Lg,Dg,Ig,Fg,Ug,$g,Vg,Bg,zg,Hg,qg,Gg,Kg,Wg,Yg,Xg,Zg,Qg,Jg,ev,tv,nv,rv,ov,iv,av,sv,lv,cv,uv,dv,pv,fv,hv,mv,gv,vv,yv,bv,xv,wv,_v,Sv,Ev,Tv,Cv,Av,Nv,Rv,Ov,Pv,kv,Mv,jv,Lv,Dv,Iv,Fv,Uv,$v,Vv,Bv,zv,Hv,qv,Gv,Kv,Wv,Yv,Xv,Zv,Qv,Jv,ey,ty,ny,ry,oy,iy,ay,sy,ly,cy,uy,dy,py,fy,hy,my,gy,vy,yy,by,xy,wy]),zx="other_sql",Hx="mssql",qx="mysql",Gx="oracle",Kx="postgresql",Wx="redshift",Yx="hive",Xx="cloudscape",Zx="hsqldb",Qx="progress",Jx="maxdb",ew="hanadb",tw="ingres",nw="firstsql",rw="cache",ow="adabas",iw="firebird",aw="derby",sw="filemaker",lw="informix",cw="instantdb",uw="interbase",dw="mariadb",pw="netezza",fw="pervasive",hw="pointbase",mw="sqlite",gw="sybase",vw="teradata",yw="vertica",bw="coldfusion",xw="cassandra",ww="hbase",_w="mongodb",Sw="redis",Ew="couchbase",Tw="couchdb",Cw="cosmosdb",Aw="dynamodb",Nw="neo4j",Rw="geode",Ow="elasticsearch",Pw="memcached",kw="cockroachdb",Mw=zx,jw=Hx,Lw=qx,Dw=Gx,Iw=Kx,Fw=Wx,Uw=Yx,$w=Xx,Vw=Zx,Bw=Qx,zw=Jx,Hw=ew,qw=tw,Gw=nw,Kw=rw,Ww=ow,Yw=iw,Xw=aw,Zw=sw,Qw=lw,Jw=cw,e_=uw,t_=dw,n_=pw,r_=fw,o_=hw,i_=mw,a_=gw,s_=vw,l_=yw,c_=bw,u_=xw,d_=ww,p_=_w,f_=Sw,h_=Ew,m_=Tw,g_=Cw,v_=Aw,y_=Nw,b_=Rw,x_=Ow,w_=Pw,__=kw,S_=tg([zx,Hx,qx,Gx,"db2",Kx,Wx,Yx,Xx,Zx,Qx,Jx,ew,tw,nw,"edb",rw,ow,iw,aw,sw,lw,cw,uw,dw,pw,fw,hw,mw,gw,vw,yw,"h2",bw,xw,ww,_w,Sw,Ew,Tw,Cw,Aw,Nw,Rw,Ow,Pw,kw]),E_="each_quorum",T_="quorum",C_="local_quorum",A_="three",N_="local_one",R_="serial",O_="local_serial",P_=E_,k_=T_,M_=C_,j_=A_,L_=N_,D_=R_,I_=O_,F_=tg(["all",E_,T_,C_,"one","two",A_,N_,"any",R_,O_]),U_="datasource",$_="http",V_="pubsub",B_="timer",z_="other",H_=U_,q_=$_,G_=V_,K_=B_,W_=z_,Y_=tg([U_,$_,V_,B_,z_]),X_="insert",Z_="edit",Q_="delete",J_=X_,eS=Z_,tS=Q_,nS=tg([X_,Z_,Q_]),rS="alibaba_cloud",oS="azure",iS=rS,aS=oS,sS=tg([rS,"aws",oS,"gcp"]),lS="ip_tcp",cS="ip_udp",uS="unix",dS="pipe",pS="inproc",fS="other",hS=lS,mS=cS,gS=uS,vS=dS,yS=pS,bS=fS,xS=tg([lS,cS,"ip",uS,dS,pS,fS]),wS="wifi",_S="wired",SS="cell",ES="unavailable",TS="unknown",CS=wS,AS=_S,NS=SS,RS=ES,OS=TS,PS=tg([wS,_S,SS,ES,TS]),kS="gprs",MS="edge",jS="umts",LS="cdma",DS="evdo_0",IS="evdo_a",FS="cdma2000_1xrtt",US="hsdpa",$S="hsupa",VS="hspa",BS="iden",zS="evdo_b",HS="ehrpd",qS="hspap",GS="td_scdma",KS="iwlan",WS="nrnsa",YS="lte_ca",XS=kS,ZS=MS,QS=jS,JS=LS,eE=DS,tE=IS,nE=FS,rE=US,oE=$S,iE=VS,aE=BS,sE=zS,lE=HS,cE=qS,uE=GS,dE=KS,pE=WS,fE=YS,hE=tg([kS,MS,jS,LS,DS,IS,FS,US,$S,VS,BS,zS,"lte",HS,qS,"gsm",GS,KS,"nr",WS,YS]),mE="SPDY",gE="QUIC",vE=mE,yE=gE,bE={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:mE,QUIC:gE},xE="queue",wE="topic",_E=xE,SE=wE,EE=tg([xE,wE]),TE="receive",CE="process",AE=TE,NE=CE,RE=tg([TE,CE]),OE={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16},PE="SENT",kE="RECEIVED",ME=PE,jE=kE,LE=tg([PE,kE]),DE="cloud.provider",IE="cloud.account.id",FE="cloud.region",UE="cloud.availability_zone",$E="cloud.platform",VE="aws.ecs.container.arn",BE="aws.ecs.cluster.arn",zE="aws.ecs.launchtype",HE="aws.ecs.task.arn",qE="aws.ecs.task.family",GE="aws.ecs.task.revision",KE="aws.eks.cluster.arn",WE="aws.log.group.names",YE="aws.log.group.arns",XE="aws.log.stream.names",ZE="aws.log.stream.arns",QE="container.name",JE="container.id",eT="container.runtime",tT="container.image.name",nT="container.image.tag",rT="deployment.environment",oT="device.id",iT="device.model.identifier",aT="device.model.name",sT="faas.name",lT="faas.id",cT="faas.version",uT="faas.instance",dT="faas.max_memory",pT="host.id",fT="host.name",hT="host.type",mT="host.arch",gT="host.image.name",vT="host.image.id",yT="host.image.version",bT="k8s.cluster.name",xT="k8s.node.name",wT="k8s.node.uid",_T="k8s.namespace.name",ST="k8s.pod.uid",ET="k8s.pod.name",TT="k8s.container.name",CT="k8s.replicaset.uid",AT="k8s.replicaset.name",NT="k8s.deployment.uid",RT="k8s.deployment.name",OT="k8s.statefulset.uid",PT="k8s.statefulset.name",kT="k8s.daemonset.uid",MT="k8s.daemonset.name",jT="k8s.job.uid",LT="k8s.job.name",DT="k8s.cronjob.uid",IT="k8s.cronjob.name",FT="os.type",UT="os.description",$T="os.name",VT="os.version",BT="process.pid",zT="process.executable.name",HT="process.executable.path",qT="process.command",GT="process.command_line",KT="process.command_args",WT="process.owner",YT="process.runtime.name",XT="process.runtime.version",ZT="process.runtime.description",QT="service.name",JT="service.namespace",eC="service.instance.id",tC="service.version",nC="telemetry.sdk.name",rC="telemetry.sdk.language",oC="telemetry.sdk.version",iC="telemetry.auto.version",aC="webengine.name",sC="webengine.version",lC="webengine.description",cC=DE,uC=IE,dC=FE,pC=UE,fC=$E,hC=VE,mC=BE,gC=zE,vC=HE,yC=qE,bC=GE,xC=KE,wC=WE,_C=YE,SC=XE,EC=ZE,TC=QE,CC=JE,AC=eT,NC=tT,RC=nT,OC=rT,PC=oT,kC=iT,MC=aT,jC=sT,LC=lT,DC=cT,IC=uT,FC=dT,UC=pT,$C=fT,VC=hT,BC=mT,zC=gT,HC=vT,qC=yT,GC=bT,KC=xT,WC=wT,YC=_T,XC=ST,ZC=ET,QC=TT,JC=CT,eA=AT,tA=NT,nA=RT,rA=OT,oA=PT,iA=kT,aA=MT,sA=jT,lA=LT,cA=DT,uA=IT,dA=FT,pA=UT,fA=$T,hA=VT,mA=BT,gA=zT,vA=HT,yA=qT,bA=GT,xA=KT,wA=WT,_A=YT,SA=XT,EA=ZT,TA=QT,CA=JT,AA=eC,NA=tC,RA=nC,OA=rC,PA=oC,kA=iC,MA=aC,jA=sC,LA=lC,DA=tg([DE,IE,FE,UE,$E,VE,BE,zE,HE,qE,GE,KE,WE,YE,XE,ZE,QE,JE,eT,tT,nT,rT,oT,iT,aT,sT,lT,cT,uT,dT,pT,fT,hT,mT,gT,vT,yT,bT,xT,wT,_T,ST,ET,TT,CT,AT,NT,RT,OT,PT,kT,MT,jT,LT,DT,IT,FT,UT,$T,VT,BT,zT,HT,qT,GT,KT,WT,YT,XT,ZT,QT,JT,eC,tC,nC,rC,oC,iC,aC,sC,lC]),IA="alibaba_cloud",FA="azure",UA=IA,$A=FA,VA=tg([IA,"aws",FA,"gcp"]),BA="alibaba_cloud_ecs",zA="alibaba_cloud_fc",HA="aws_ec2",qA="aws_ecs",GA="aws_eks",KA="aws_lambda",WA="aws_elastic_beanstalk",YA="azure_vm",XA="azure_container_instances",ZA="azure_aks",QA="azure_functions",JA="azure_app_service",eN="gcp_compute_engine",tN="gcp_cloud_run",nN="gcp_kubernetes_engine",rN="gcp_cloud_functions",oN="gcp_app_engine",iN=BA,aN=zA,sN=HA,lN=qA,cN=GA,uN=KA,dN=WA,pN=YA,fN=XA,hN=ZA,mN=QA,gN=JA,vN=eN,yN=tN,bN=nN,xN=rN,wN=oN,_N=tg([BA,zA,HA,qA,GA,KA,WA,YA,XA,ZA,QA,JA,eN,tN,nN,rN,oN]),SN="fargate",EN=SN,TN=tg(["ec2",SN]),CN="amd64",AN="arm32",NN="arm64",RN="ia64",ON="ppc32",PN="ppc64",kN=CN,MN=AN,jN=NN,LN=RN,DN=ON,IN=PN,FN=tg([CN,AN,NN,RN,ON,PN,"x86"]),UN="windows",$N="linux",VN="darwin",BN="freebsd",zN="netbsd",HN="openbsd",qN="dragonflybsd",GN="hpux",KN="solaris",WN="z_os",YN=UN,XN=$N,ZN=VN,QN=BN,JN=zN,eR=HN,tR=qN,nR=GN,rR=KN,oR=WN,iR=tg([UN,$N,VN,BN,zN,HN,qN,GN,"aix",KN,WN]),aR="dotnet",sR="erlang",lR="java",cR="nodejs",uR="python",dR="ruby",pR="webjs",fR=aR,hR=sR,mR=lR,gR=cR,vR=uR,yR=dR,bR=pR,xR=tg(["cpp",aR,sR,"go",lR,cR,"php",uR,dR,pR]);const wR=Object.freeze(Object.defineProperty({__proto__:null,AWSECSLAUNCHTYPEVALUES_EC2:"ec2",AWSECSLAUNCHTYPEVALUES_FARGATE:EN,AwsEcsLaunchtypeValues:TN,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:iN,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:aN,CLOUDPLATFORMVALUES_AWS_EC2:sN,CLOUDPLATFORMVALUES_AWS_ECS:lN,CLOUDPLATFORMVALUES_AWS_EKS:cN,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:dN,CLOUDPLATFORMVALUES_AWS_LAMBDA:uN,CLOUDPLATFORMVALUES_AZURE_AKS:hN,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:gN,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:fN,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:mN,CLOUDPLATFORMVALUES_AZURE_VM:pN,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:wN,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:xN,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:yN,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:vN,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:bN,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:UA,CLOUDPROVIDERVALUES_AWS:"aws",CLOUDPROVIDERVALUES_AZURE:$A,CLOUDPROVIDERVALUES_GCP:"gcp",CloudPlatformValues:_N,CloudProviderValues:VA,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:"all",DBCASSANDRACONSISTENCYLEVELVALUES_ANY:"any",DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:P_,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:L_,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:M_,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:I_,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:"one",DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:k_,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:D_,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:j_,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:"two",DBSYSTEMVALUES_ADABAS:Ww,DBSYSTEMVALUES_CACHE:Kw,DBSYSTEMVALUES_CASSANDRA:u_,DBSYSTEMVALUES_CLOUDSCAPE:$w,DBSYSTEMVALUES_COCKROACHDB:__,DBSYSTEMVALUES_COLDFUSION:c_,DBSYSTEMVALUES_COSMOSDB:g_,DBSYSTEMVALUES_COUCHBASE:h_,DBSYSTEMVALUES_COUCHDB:m_,DBSYSTEMVALUES_DB2:"db2",DBSYSTEMVALUES_DERBY:Xw,DBSYSTEMVALUES_DYNAMODB:v_,DBSYSTEMVALUES_EDB:"edb",DBSYSTEMVALUES_ELASTICSEARCH:x_,DBSYSTEMVALUES_FILEMAKER:Zw,DBSYSTEMVALUES_FIREBIRD:Yw,DBSYSTEMVALUES_FIRSTSQL:Gw,DBSYSTEMVALUES_GEODE:b_,DBSYSTEMVALUES_H2:"h2",DBSYSTEMVALUES_HANADB:Hw,DBSYSTEMVALUES_HBASE:d_,DBSYSTEMVALUES_HIVE:Uw,DBSYSTEMVALUES_HSQLDB:Vw,DBSYSTEMVALUES_INFORMIX:Qw,DBSYSTEMVALUES_INGRES:qw,DBSYSTEMVALUES_INSTANTDB:Jw,DBSYSTEMVALUES_INTERBASE:e_,DBSYSTEMVALUES_MARIADB:t_,DBSYSTEMVALUES_MAXDB:zw,DBSYSTEMVALUES_MEMCACHED:w_,DBSYSTEMVALUES_MONGODB:p_,DBSYSTEMVALUES_MSSQL:jw,DBSYSTEMVALUES_MYSQL:Lw,DBSYSTEMVALUES_NEO4J:y_,DBSYSTEMVALUES_NETEZZA:n_,DBSYSTEMVALUES_ORACLE:Dw,DBSYSTEMVALUES_OTHER_SQL:Mw,DBSYSTEMVALUES_PERVASIVE:r_,DBSYSTEMVALUES_POINTBASE:o_,DBSYSTEMVALUES_POSTGRESQL:Iw,DBSYSTEMVALUES_PROGRESS:Bw,DBSYSTEMVALUES_REDIS:f_,DBSYSTEMVALUES_REDSHIFT:Fw,DBSYSTEMVALUES_SQLITE:i_,DBSYSTEMVALUES_SYBASE:a_,DBSYSTEMVALUES_TERADATA:s_,DBSYSTEMVALUES_VERTICA:l_,DbCassandraConsistencyLevelValues:F_,DbSystemValues:S_,FAASDOCUMENTOPERATIONVALUES_DELETE:tS,FAASDOCUMENTOPERATIONVALUES_EDIT:eS,FAASDOCUMENTOPERATIONVALUES_INSERT:J_,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:iS,FAASINVOKEDPROVIDERVALUES_AWS:"aws",FAASINVOKEDPROVIDERVALUES_AZURE:aS,FAASINVOKEDPROVIDERVALUES_GCP:"gcp",FAASTRIGGERVALUES_DATASOURCE:H_,FAASTRIGGERVALUES_HTTP:q_,FAASTRIGGERVALUES_OTHER:W_,FAASTRIGGERVALUES_PUBSUB:G_,FAASTRIGGERVALUES_TIMER:K_,FaasDocumentOperationValues:nS,FaasInvokedProviderValues:sS,FaasTriggerValues:Y_,HOSTARCHVALUES_AMD64:kN,HOSTARCHVALUES_ARM32:MN,HOSTARCHVALUES_ARM64:jN,HOSTARCHVALUES_IA64:LN,HOSTARCHVALUES_PPC32:DN,HOSTARCHVALUES_PPC64:IN,HOSTARCHVALUES_X86:"x86",HTTPFLAVORVALUES_HTTP_1_0:"1.0",HTTPFLAVORVALUES_HTTP_1_1:"1.1",HTTPFLAVORVALUES_HTTP_2_0:"2.0",HTTPFLAVORVALUES_QUIC:yE,HTTPFLAVORVALUES_SPDY:vE,HostArchValues:FN,HttpFlavorValues:bE,MESSAGETYPEVALUES_RECEIVED:jE,MESSAGETYPEVALUES_SENT:ME,MESSAGINGDESTINATIONKINDVALUES_QUEUE:_E,MESSAGINGDESTINATIONKINDVALUES_TOPIC:SE,MESSAGINGOPERATIONVALUES_PROCESS:NE,MESSAGINGOPERATIONVALUES_RECEIVE:AE,MessageTypeValues:LE,MessagingDestinationKindValues:EE,MessagingOperationValues:RE,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:JS,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:nE,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:ZS,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:lE,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:eE,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:tE,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:sE,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:XS,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:"gsm",NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:rE,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:iE,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:cE,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:oE,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:aE,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:dE,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:"lte",NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:fE,NETHOSTCONNECTIONSUBTYPEVALUES_NR:"nr",NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:pE,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:uE,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:QS,NETHOSTCONNECTIONTYPEVALUES_CELL:NS,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:RS,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:OS,NETHOSTCONNECTIONTYPEVALUES_WIFI:CS,NETHOSTCONNECTIONTYPEVALUES_WIRED:AS,NETTRANSPORTVALUES_INPROC:yS,NETTRANSPORTVALUES_IP:"ip",NETTRANSPORTVALUES_IP_TCP:hS,NETTRANSPORTVALUES_IP_UDP:mS,NETTRANSPORTVALUES_OTHER:bS,NETTRANSPORTVALUES_PIPE:vS,NETTRANSPORTVALUES_UNIX:gS,NetHostConnectionSubtypeValues:hE,NetHostConnectionTypeValues:PS,NetTransportValues:xS,OSTYPEVALUES_AIX:"aix",OSTYPEVALUES_DARWIN:ZN,OSTYPEVALUES_DRAGONFLYBSD:tR,OSTYPEVALUES_FREEBSD:QN,OSTYPEVALUES_HPUX:nR,OSTYPEVALUES_LINUX:XN,OSTYPEVALUES_NETBSD:JN,OSTYPEVALUES_OPENBSD:eR,OSTYPEVALUES_SOLARIS:rR,OSTYPEVALUES_WINDOWS:YN,OSTYPEVALUES_Z_OS:oR,OsTypeValues:iR,RPCGRPCSTATUSCODEVALUES_ABORTED:10,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:6,RPCGRPCSTATUSCODEVALUES_CANCELLED:1,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:15,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:4,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:9,RPCGRPCSTATUSCODEVALUES_INTERNAL:13,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:3,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:5,RPCGRPCSTATUSCODEVALUES_OK:0,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:11,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:7,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:8,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:16,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:14,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:12,RPCGRPCSTATUSCODEVALUES_UNKNOWN:2,RpcGrpcStatusCodeValues:OE,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:Zb,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:cx,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:Wb,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:Hb,SEMATTRS_AWS_DYNAMODB_COUNT:sx,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:nx,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:ex,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:ux,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:Qb,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:qb,SEMATTRS_AWS_DYNAMODB_LIMIT:Xb,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:tx,SEMATTRS_AWS_DYNAMODB_PROJECTION:Yb,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:Gb,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:Kb,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:lx,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:ox,SEMATTRS_AWS_DYNAMODB_SEGMENT:ix,SEMATTRS_AWS_DYNAMODB_SELECT:Jb,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:rx,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:zb,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:ax,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:_y,SEMATTRS_CODE_FILEPATH:Cb,SEMATTRS_CODE_FUNCTION:Eb,SEMATTRS_CODE_LINENO:Ab,SEMATTRS_CODE_NAMESPACE:Tb,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:My,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:Fy,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:Iy,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:Ly,SEMATTRS_DB_CASSANDRA_KEYSPACE:Py,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:ky,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:Dy,SEMATTRS_DB_CASSANDRA_TABLE:jy,SEMATTRS_DB_CONNECTION_STRING:Ey,SEMATTRS_DB_HBASE_NAMESPACE:Uy,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:Cy,SEMATTRS_DB_MONGODB_COLLECTION:Vy,SEMATTRS_DB_MSSQL_INSTANCE_NAME:Oy,SEMATTRS_DB_NAME:Ay,SEMATTRS_DB_OPERATION:Ry,SEMATTRS_DB_REDIS_DATABASE_INDEX:$y,SEMATTRS_DB_SQL_TABLE:By,SEMATTRS_DB_STATEMENT:Ny,SEMATTRS_DB_SYSTEM:Sy,SEMATTRS_DB_USER:Ty,SEMATTRS_ENDUSER_ID:bb,SEMATTRS_ENDUSER_ROLE:xb,SEMATTRS_ENDUSER_SCOPE:wb,SEMATTRS_EXCEPTION_ESCAPED:Gy,SEMATTRS_EXCEPTION_MESSAGE:Hy,SEMATTRS_EXCEPTION_STACKTRACE:qy,SEMATTRS_EXCEPTION_TYPE:zy,SEMATTRS_FAAS_COLDSTART:tb,SEMATTRS_FAAS_CRON:eb,SEMATTRS_FAAS_DOCUMENT_COLLECTION:Yy,SEMATTRS_FAAS_DOCUMENT_NAME:Qy,SEMATTRS_FAAS_DOCUMENT_OPERATION:Xy,SEMATTRS_FAAS_DOCUMENT_TIME:Zy,SEMATTRS_FAAS_EXECUTION:Wy,SEMATTRS_FAAS_INVOKED_NAME:nb,SEMATTRS_FAAS_INVOKED_PROVIDER:rb,SEMATTRS_FAAS_INVOKED_REGION:ob,SEMATTRS_FAAS_TIME:Jy,SEMATTRS_FAAS_TRIGGER:Ky,SEMATTRS_HTTP_CLIENT_IP:Bb,SEMATTRS_HTTP_FLAVOR:jb,SEMATTRS_HTTP_HOST:Pb,SEMATTRS_HTTP_METHOD:Nb,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:Db,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:Ib,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:Fb,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:Ub,SEMATTRS_HTTP_ROUTE:Vb,SEMATTRS_HTTP_SCHEME:kb,SEMATTRS_HTTP_SERVER_NAME:$b,SEMATTRS_HTTP_STATUS_CODE:Mb,SEMATTRS_HTTP_TARGET:Ob,SEMATTRS_HTTP_URL:Rb,SEMATTRS_HTTP_USER_AGENT:Lb,SEMATTRS_MESSAGE_COMPRESSED_SIZE:$x,SEMATTRS_MESSAGE_ID:Ux,SEMATTRS_MESSAGE_TYPE:Fx,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:Vx,SEMATTRS_MESSAGING_CONSUMER_ID:Sx,SEMATTRS_MESSAGING_CONVERSATION_ID:bx,SEMATTRS_MESSAGING_DESTINATION:px,SEMATTRS_MESSAGING_DESTINATION_KIND:fx,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:Ax,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:Cx,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:Tx,SEMATTRS_MESSAGING_KAFKA_PARTITION:Nx,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:Rx,SEMATTRS_MESSAGING_MESSAGE_ID:yx,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:wx,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:xx,SEMATTRS_MESSAGING_OPERATION:_x,SEMATTRS_MESSAGING_PROTOCOL:mx,SEMATTRS_MESSAGING_PROTOCOL_VERSION:gx,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:Ex,SEMATTRS_MESSAGING_SYSTEM:dx,SEMATTRS_MESSAGING_TEMP_DESTINATION:hx,SEMATTRS_MESSAGING_URL:vx,SEMATTRS_NET_HOST_CARRIER_ICC:vb,SEMATTRS_NET_HOST_CARRIER_MCC:mb,SEMATTRS_NET_HOST_CARRIER_MNC:gb,SEMATTRS_NET_HOST_CARRIER_NAME:hb,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:fb,SEMATTRS_NET_HOST_CONNECTION_TYPE:pb,SEMATTRS_NET_HOST_IP:cb,SEMATTRS_NET_HOST_NAME:db,SEMATTRS_NET_HOST_PORT:ub,SEMATTRS_NET_PEER_IP:ab,SEMATTRS_NET_PEER_NAME:lb,SEMATTRS_NET_PEER_PORT:sb,SEMATTRS_NET_TRANSPORT:ib,SEMATTRS_PEER_SERVICE:yb,SEMATTRS_RPC_GRPC_STATUS_CODE:Mx,SEMATTRS_RPC_JSONRPC_ERROR_CODE:Dx,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:Ix,SEMATTRS_RPC_JSONRPC_REQUEST_ID:Lx,SEMATTRS_RPC_JSONRPC_VERSION:jx,SEMATTRS_RPC_METHOD:kx,SEMATTRS_RPC_SERVICE:Px,SEMATTRS_RPC_SYSTEM:Ox,SEMATTRS_THREAD_ID:_b,SEMATTRS_THREAD_NAME:Sb,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:mC,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:hC,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:gC,SEMRESATTRS_AWS_ECS_TASK_ARN:vC,SEMRESATTRS_AWS_ECS_TASK_FAMILY:yC,SEMRESATTRS_AWS_ECS_TASK_REVISION:bC,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:xC,SEMRESATTRS_AWS_LOG_GROUP_ARNS:_C,SEMRESATTRS_AWS_LOG_GROUP_NAMES:wC,SEMRESATTRS_AWS_LOG_STREAM_ARNS:EC,SEMRESATTRS_AWS_LOG_STREAM_NAMES:SC,SEMRESATTRS_CLOUD_ACCOUNT_ID:uC,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:pC,SEMRESATTRS_CLOUD_PLATFORM:fC,SEMRESATTRS_CLOUD_PROVIDER:cC,SEMRESATTRS_CLOUD_REGION:dC,SEMRESATTRS_CONTAINER_ID:CC,SEMRESATTRS_CONTAINER_IMAGE_NAME:NC,SEMRESATTRS_CONTAINER_IMAGE_TAG:RC,SEMRESATTRS_CONTAINER_NAME:TC,SEMRESATTRS_CONTAINER_RUNTIME:AC,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:OC,SEMRESATTRS_DEVICE_ID:PC,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:kC,SEMRESATTRS_DEVICE_MODEL_NAME:MC,SEMRESATTRS_FAAS_ID:LC,SEMRESATTRS_FAAS_INSTANCE:IC,SEMRESATTRS_FAAS_MAX_MEMORY:FC,SEMRESATTRS_FAAS_NAME:jC,SEMRESATTRS_FAAS_VERSION:DC,SEMRESATTRS_HOST_ARCH:BC,SEMRESATTRS_HOST_ID:UC,SEMRESATTRS_HOST_IMAGE_ID:HC,SEMRESATTRS_HOST_IMAGE_NAME:zC,SEMRESATTRS_HOST_IMAGE_VERSION:qC,SEMRESATTRS_HOST_NAME:$C,SEMRESATTRS_HOST_TYPE:VC,SEMRESATTRS_K8S_CLUSTER_NAME:GC,SEMRESATTRS_K8S_CONTAINER_NAME:QC,SEMRESATTRS_K8S_CRONJOB_NAME:uA,SEMRESATTRS_K8S_CRONJOB_UID:cA,SEMRESATTRS_K8S_DAEMONSET_NAME:aA,SEMRESATTRS_K8S_DAEMONSET_UID:iA,SEMRESATTRS_K8S_DEPLOYMENT_NAME:nA,SEMRESATTRS_K8S_DEPLOYMENT_UID:tA,SEMRESATTRS_K8S_JOB_NAME:lA,SEMRESATTRS_K8S_JOB_UID:sA,SEMRESATTRS_K8S_NAMESPACE_NAME:YC,SEMRESATTRS_K8S_NODE_NAME:KC,SEMRESATTRS_K8S_NODE_UID:WC,SEMRESATTRS_K8S_POD_NAME:ZC,SEMRESATTRS_K8S_POD_UID:XC,SEMRESATTRS_K8S_REPLICASET_NAME:eA,SEMRESATTRS_K8S_REPLICASET_UID:JC,SEMRESATTRS_K8S_STATEFULSET_NAME:oA,SEMRESATTRS_K8S_STATEFULSET_UID:rA,SEMRESATTRS_OS_DESCRIPTION:pA,SEMRESATTRS_OS_NAME:fA,SEMRESATTRS_OS_TYPE:dA,SEMRESATTRS_OS_VERSION:hA,SEMRESATTRS_PROCESS_COMMAND:yA,SEMRESATTRS_PROCESS_COMMAND_ARGS:xA,SEMRESATTRS_PROCESS_COMMAND_LINE:bA,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:gA,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:vA,SEMRESATTRS_PROCESS_OWNER:wA,SEMRESATTRS_PROCESS_PID:mA,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:EA,SEMRESATTRS_PROCESS_RUNTIME_NAME:_A,SEMRESATTRS_PROCESS_RUNTIME_VERSION:SA,SEMRESATTRS_SERVICE_INSTANCE_ID:AA,SEMRESATTRS_SERVICE_NAME:TA,SEMRESATTRS_SERVICE_NAMESPACE:CA,SEMRESATTRS_SERVICE_VERSION:NA,SEMRESATTRS_TELEMETRY_AUTO_VERSION:kA,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:OA,SEMRESATTRS_TELEMETRY_SDK_NAME:RA,SEMRESATTRS_TELEMETRY_SDK_VERSION:PA,SEMRESATTRS_WEBENGINE_DESCRIPTION:LA,SEMRESATTRS_WEBENGINE_NAME:MA,SEMRESATTRS_WEBENGINE_VERSION:jA,SemanticAttributes:Bx,SemanticResourceAttributes:DA,TELEMETRYSDKLANGUAGEVALUES_CPP:"cpp",TELEMETRYSDKLANGUAGEVALUES_DOTNET:fR,TELEMETRYSDKLANGUAGEVALUES_ERLANG:hR,TELEMETRYSDKLANGUAGEVALUES_GO:"go",TELEMETRYSDKLANGUAGEVALUES_JAVA:mR,TELEMETRYSDKLANGUAGEVALUES_NODEJS:gR,TELEMETRYSDKLANGUAGEVALUES_PHP:"php",TELEMETRYSDKLANGUAGEVALUES_PYTHON:vR,TELEMETRYSDKLANGUAGEVALUES_RUBY:yR,TELEMETRYSDKLANGUAGEVALUES_WEBJS:bR,TelemetrySdkLanguageValues:xR},Symbol.toStringTag,{value:"Module"}));var _R=oh("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function SR(e){return e.setValue(_R,!0)}function ER(e){return!0===e.getValue(_R)}var TR=",",CR="baggage";function AR(e){return e.reduce((function(e,t){var n=""+e+(""!==e?TR:"")+t;return n.length>8192?e:n}),"")}function NR(e){return e.getAllEntries().map((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),n=t[1],r=encodeURIComponent(t[0])+"="+encodeURIComponent(n.value);return void 0!==n.metadata&&(r+=";"+n.metadata.toString()),r}))}function RR(e){var t=e.split(";");if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var o,i=decodeURIComponent(n.substring(0,r).trim()),a=decodeURIComponent(n.substring(r+1).trim());return t.length>0&&(o=rh(t.join(";"))),{key:i,value:a,metadata:o}}}}}function OR(e){return"string"!=typeof e||0===e.length?{}:e.split(TR).map((function(e){return RR(e)})).filter((function(e){return void 0!==e&&e.value.length>0})).reduce((function(e,t){return e[t.key]=t.value,e}),{})}const PR=Object.freeze(Object.defineProperty({__proto__:null,getKeyPairs:NR,parseKeyPairsIntoRecord:OR,parsePairKeyValue:RR,serializeKeyPairs:AR},Symbol.toStringTag,{value:"Module"}));var kR=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Nm.getBaggage(e);if(r&&!ER(e)){var o=AR(NR(r).filter((function(e){return e.length<=4096})).slice(0,180));o.length>0&&n.set(t,CR,o)}},e.prototype.extract=function(e,t,n){var r=n.get(t,CR),o=Array.isArray(r)?r.join(TR):r;if(!o)return e;var i={};return 0===o.length?e:(o.split(TR).forEach((function(e){var t=RR(e);if(t){var n={value:t.value};t.metadata&&(n.metadata=t.metadata),i[t.key]=n}})),0===Object.entries(i).length?e:Nm.setBaggage(e,Nm.createBaggage(i)))},e.prototype.fields=function(){return[CR]},e}(),MR=function(){function e(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}return e.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},e}(),jR=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},LR=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function DR(e){var t,n,r={};if("object"!=typeof e||null==e)return r;try{for(var o=jR(Object.entries(e)),i=o.next();!i.done;i=o.next()){var a=LR(i.value,2),s=a[0],l=a[1];IR(s)?FR(l)?r[s]=Array.isArray(l)?l.slice():l:gm.warn("Invalid attribute value set for key: "+s):gm.warn("Invalid attribute key: "+s)}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function IR(e){return"string"==typeof e&&e.length>0}function FR(e){return null==e||(Array.isArray(e)?function(e){var t,n,r;try{for(var o=jR(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(UR(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!0}(e):UR(e))}function UR(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function $R(){return function(e){gm.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){var t={},n=e;for(;null!==n;)Object.getOwnPropertyNames(n).forEach((function(e){if(!t[e]){var r=n[e];r&&(t[e]=String(r))}})),n=Object.getPrototypeOf(n);return t}(e))}(e))}}var VR,BR,zR=$R();function HR(e){try{zR(e)}catch(t){}}(BR=VR||(VR={})).AlwaysOff="always_off",BR.AlwaysOn="always_on",BR.ParentBasedAlwaysOff="parentbased_always_off",BR.ParentBasedAlwaysOn="parentbased_always_on",BR.ParentBasedTraceIdRatio="parentbased_traceidratio",BR.TraceIdRatio="traceidratio";var qR=["OTEL_SDK_DISABLED"];function GR(e){return qR.indexOf(e)>-1}var KR=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function WR(e){return KR.indexOf(e)>-1}var YR=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function XR(e){return YR.indexOf(e)>-1}var ZR=1/0,QR=128,JR={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Wf.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:ZR,OTEL_ATTRIBUTE_COUNT_LIMIT:QR,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:ZR,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:QR,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:ZR,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:QR,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:VR.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function eO(e,t,n){if(void 0!==n[e]){var r=String(n[e]);t[e]="true"===r.toLowerCase()}}function tO(e,t,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[e]){var i=Number(n[e]);isNaN(i)||(t[e]=i<r?r:i>o?o:i)}}function nO(e,t,n,r){void 0===r&&(r=",");var o=n[e];"string"==typeof o&&(t[e]=o.split(r).map((function(e){return e.trim()})))}var rO={ALL:Wf.ALL,VERBOSE:Wf.VERBOSE,DEBUG:Wf.DEBUG,INFO:Wf.INFO,WARN:Wf.WARN,ERROR:Wf.ERROR,NONE:Wf.NONE};function oO(e,t,n){var r=n[e];if("string"==typeof r){var o=rO[r.toUpperCase()];null!=o&&(t[e]=o)}}function iO(e){var t={};for(var n in JR){var r=n;if("OTEL_LOG_LEVEL"===r)oO(r,t,e);else if(GR(r))eO(r,t,e);else if(WR(r))tO(r,t,e);else if(XR(r))nO(r,t,e);else{var o=e[r];null!=o&&(t[r]=String(o))}}return t}var aO="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{};function sO(){var e=iO(aO);return Object.assign({},JR,e)}function lO(){return iO(aO)}function cO(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function uO(e){for(var t=new Uint8Array(e.length/2),n=0,r=0;r<e.length;r+=2){var o=cO(e.charCodeAt(r)),i=cO(e.charCodeAt(r+1));t[n++]=o<<4|i}return t}var dO=function(){return function(){this.generateTraceId=fO(16),this.generateSpanId=fO(8)}}(),pO=Array(32);function fO(e){return function(){for(var t=0;t<2*e;t++)pO[t]=Math.floor(16*Math.random())+48,pO[t]>=58&&(pO[t]+=39);return String.fromCharCode.apply(null,pO.slice(0,2*e))}}var hO,mO=performance,gO="1.24.1",vO=((hO={})[DA.TELEMETRY_SDK_NAME]="opentelemetry",hO[DA.PROCESS_RUNTIME_NAME]="browser",hO[DA.TELEMETRY_SDK_LANGUAGE]=xR.WEBJS,hO[DA.TELEMETRY_SDK_VERSION]=gO,hO);function yO(e){}var bO,xO,wO=Math.pow(10,6),_O=Math.pow(10,9);function SO(e){return[Math.trunc(e/1e3),Math.round(e%1e3*wO)]}function EO(){var e=mO.timeOrigin;if("number"!=typeof e){e=mO.timing&&mO.timing.fetchStart}return e}function TO(e){return PO(SO(EO()),SO("number"==typeof e?e:mO.now()))}function CO(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=_O),[n,r]}function AO(e){return e[0]*_O+e[1]}function NO(e){return 1e6*e[0]+e[1]/1e3}function RO(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}function OO(e){return RO(e)||"number"==typeof e||e instanceof Date}function PO(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=_O&&(n[1]-=_O,n[0]+=1),n}(xO=bO||(bO={}))[xO.SUCCESS=0]="SUCCESS",xO[xO.FAILED=1]="FAILED";var kO=function(){function e(e){var t;void 0===e&&(e={}),this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((function(e){return"function"==typeof e.fields?e.fields():[]})).reduce((function(e,t){return e.concat(t)}),[])))}return e.prototype.inject=function(e,t,n){var r,o;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(e,t,n)}catch(l){gm.warn("Failed to inject with "+s.constructor.name+". Err: "+l.message)}}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},e.prototype.extract=function(e,t,n){return this._propagators.reduce((function(e,r){try{return r.extract(e,t,n)}catch(o){gm.warn("Failed to inject with "+r.constructor.name+". Err: "+o.message)}return e}),e)},e.prototype.fields=function(){return this._fields.slice()},e}(),MO="[_0-9a-z-*/]",jO=new RegExp("^(?:"+("[a-z]"+MO+"{0,255}")+"|"+("[a-z0-9]"+MO+"{0,240}@[a-z]"+MO+"{0,13}")+")$"),LO=/^[ -~]{0,255}[!-~]$/,DO=/,|=/;var IO=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,t.length);(function(e){return jO.test(e)})(o)&&function(e){return LO.test(e)&&!DO.test(e)}(i)&&e.set(o,i)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),FO="traceparent",UO="tracestate",$O=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function VO(e){var t=$O.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}var BO,zO=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Om.getSpanContext(e);if(r&&!ER(e)&&Xh(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||Ah.NONE).toString(16);n.set(t,FO,o),r.traceState&&n.set(t,UO,r.traceState.serialize())}},e.prototype.extract=function(e,t,n){var r=n.get(t,FO);if(!r)return e;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return e;var i=VO(o);if(!i)return e;i.isRemote=!0;var a=n.get(t,UO);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new IO("string"==typeof s?s:void 0)}return Om.setSpanContext(e,i)},e.prototype.fields=function(){return[FO,UO]},e}(),HO=oh("OpenTelemetry SDK Context Key RPC_METADATA");(BO||(BO={})).HTTP="http";var qO,GO,KO=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:em.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),WO=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:em.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),YO=function(){function e(e){var t,n,r,o;this._root=e.root,this._root||(HR(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new WO),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new WO,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new KO,this._localParentSampled=null!==(r=e.localParentSampled)&&void 0!==r?r:new WO,this._localParentNotSampled=null!==(o=e.localParentNotSampled)&&void 0!==o?o:new KO}return e.prototype.shouldSample=function(e,t,n,r,o,i){var a=Om.getSpanContext(e);return a&&Xh(a)?a.isRemote?a.traceFlags&Ah.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,o,i):this._remoteParentNotSampled.shouldSample(e,t,n,r,o,i):a.traceFlags&Ah.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,o,i):this._localParentNotSampled.shouldSample(e,t,n,r,o,i):this._root.shouldSample(e,t,n,r,o,i)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),XO=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:Wh(t)&&this._accumulate(t)<this._upperBound?em.RECORD_AND_SAMPLED:em.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n<e.length/8;n++){var r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t},e}(),ZO="[object Null]",QO="[object Undefined]",JO=Function.prototype.toString,eP=JO.call(Object),tP=(qO=Object.getPrototypeOf,GO=Object,function(e){return qO(GO(e))}),nP=Object.prototype,rP=nP.hasOwnProperty,oP=Symbol?Symbol.toStringTag:void 0,iP=nP.toString;function aP(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!==function(e){if(null==e)return void 0===e?QO:ZO;return oP&&oP in Object(e)?function(e){var t=rP.call(e,oP),n=e[oP],r=!1;try{e[oP]=void 0,r=!0}catch(JSe){}var o=iP.call(e);r&&(t?e[oP]=n:delete e[oP]);return o}(e):function(e){return iP.call(e)}(e)}(e))return!1;var t=tP(e);if(null===t)return!0;var n=rP.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&JO.call(n)===eP}function sP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=cP(n,e.shift(),0,r);return n}function lP(e){return dP(e)?e.slice():e}function cP(e,t,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,hP(e)||hP(t)||pP(t))o=lP(t);else if(dP(e)){if(o=e.slice(),dP(t))for(var i=0,a=t.length;i<a;i++)o.push(lP(t[i]));else if(fP(t))for(i=0,a=(s=Object.keys(t)).length;i<a;i++){o[l=s[i]]=lP(t[l])}}else if(fP(e))if(fP(t)){if(!function(e,t){if(!aP(e)||!aP(t))return!1;return!0}(e,t))return t;o=Object.assign({},e);var s;for(i=0,a=(s=Object.keys(t)).length;i<a;i++){var l,c=t[l=s[i]];if(hP(c))void 0===c?delete o[l]:o[l]=c;else{var u=o[l],d=c;if(uP(e,l,r)||uP(t,l,r))delete o[l];else{if(fP(u)&&fP(d)){var p=r.get(u)||[],f=r.get(d)||[];p.push({obj:e,key:l}),f.push({obj:t,key:l}),r.set(u,p),r.set(d,f)}o[l]=cP(o[l],c,n,r)}}}}else o=t;return o}}function uP(e,t,n){for(var r=n.get(e[t])||[],o=0,i=r.length;o<i;o++){var a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function dP(e){return Array.isArray(e)}function pP(e){return"function"==typeof e}function fP(e){return!hP(e)&&!dP(e)&&!pP(e)&&"object"==typeof e}function hP(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||void 0===e||e instanceof Date||e instanceof RegExp||null===e}var mP=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gP=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return mP(t,e),t}(Error);function vP(e,t){return"string"==typeof t?e===t:!!e.match(t)}var yP=function(){function e(){var e=this;this._promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolve(e)},e.prototype.reject=function(e){this._reject(e)},e}(),bP=function(){function e(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new yP}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var e,t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([this._that],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(n),!1))).then((function(e){return t._deferred.resolve(e)}),(function(e){return t._deferred.reject(e)}))}catch(o){this._deferred.reject(o)}}return this._deferred.promise},e}();var xP={_export:function(e,t){return new Promise((function(n){mm.with(SR(mm.active()),(function(){e.export(t,(function(e){n(e)}))}))}))}};const wP=Object.freeze(Object.defineProperty({__proto__:null,AlwaysOffSampler:KO,AlwaysOnSampler:WO,AnchoredClock:MR,BindOnceFuture:bP,CompositePropagator:kO,DEFAULT_ATTRIBUTE_COUNT_LIMIT:QR,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:ZR,DEFAULT_ENVIRONMENT:JR,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,get ExportResultCode(){return bO},ParentBasedSampler:YO,get RPCType(){return BO},RandomIdGenerator:dO,SDK_INFO:vO,TRACE_PARENT_HEADER:FO,TRACE_STATE_HEADER:UO,TimeoutError:gP,TraceIdRatioBasedSampler:XO,TraceState:IO,get TracesSamplerValues(){return VR},VERSION:gO,W3CBaggagePropagator:kR,W3CTraceContextPropagator:zO,_globalThis:aO,addHrTimes:PO,baggageUtils:PR,callWithTimeout:function(e,t){var n,r=new Promise((function(e,r){n=setTimeout((function(){r(new gP("Operation timed out."))}),t)}));return Promise.race([e,r]).then((function(e){return clearTimeout(n),e}),(function(e){throw clearTimeout(n),e}))},deleteRPCMetadata:function(e){return e.deleteValue(HO)},getEnv:sO,getEnvWithoutDefaults:lO,getRPCMetadata:function(e){return e.getValue(HO)},getTimeOrigin:EO,globalErrorHandler:HR,hexToBase64:function(e){return btoa(String.fromCharCode.apply(String,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(uO(e)),!1)))},hexToBinary:uO,hrTime:TO,hrTimeDuration:CO,hrTimeToMicroseconds:NO,hrTimeToMilliseconds:function(e){return 1e3*e[0]+e[1]/1e6},hrTimeToNanoseconds:AO,hrTimeToTimeStamp:function(e){var t=""+"0".repeat(9)+e[1]+"Z",n=t.substr(t.length-9-1);return new Date(1e3*e[0]).toISOString().replace("000Z",n)},internal:xP,isAttributeKey:IR,isAttributeValue:FR,isTimeInput:OO,isTimeInputHrTime:RO,isTracingSuppressed:ER,isUrlIgnored:function(e,t){var n,r;if(!t)return!1;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),i=o.next();!i.done;i=o.next()){if(vP(e,i.value))return!0}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1},isWrapped:function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped},loggingErrorHandler:$R,merge:sP,millisToHrTime:SO,otperformance:mO,parseEnvironment:iO,parseTraceParent:VO,sanitizeAttributes:DR,setGlobalErrorHandler:function(e){zR=e},setRPCMetadata:function(e,t){return e.setValue(HO,t)},suppressTracing:SR,timeInputToHrTime:function(e){if(RO(e))return e;if("number"==typeof e)return e<EO()?TO(e):SO(e);if(e instanceof Date)return SO(e.getTime());throw TypeError("Invalid input type")},unrefTimer:yO,unsuppressTracing:function(e){return e.deleteValue(_R)},urlMatches:vP},Symbol.toStringTag,{value:"Module"}));function _P(){return"unknown_service"}var SP=function(){return SP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},SP.apply(this,arguments)},EP=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},TP=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},CP=function(){function e(e,t){var n,r=this;this._attributes=e,this.asyncAttributesPending=null!=t,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==t?void 0:t.then((function(e){return r._attributes=Object.assign({},r._attributes,e),r.asyncAttributesPending=!1,e}),(function(e){return gm.debug("a resource's async attributes promise rejected: %s",e),r.asyncAttributesPending=!1,{}}))}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e(((t={})[TA]="unknown_service",t[OA]=vO[OA],t[RA]=vO[RA],t[PA]=vO[PA],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&gm.error("Accessing resource attributes before async attributes settled"),null!==(e=this._attributes)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return EP(this,void 0,void 0,(function(){return TP(this,(function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.merge=function(t){var n,r=this;if(!t)return this;var o=SP(SP({},this._syncAttributes),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes);return this._asyncAttributesPromise||t._asyncAttributesPromise?new e(o,Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then((function(e){var n,o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),i=o[0],a=o[1];return SP(SP(SP(SP({},r._syncAttributes),i),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes),a)}))):new e(o)},e.EMPTY=new e({}),e}(),AP=new(function(){function e(){}return e.prototype.detect=function(){return new CP({})},e}()),NP=new(function(){function e(){}return e.prototype.detect=function(){return Promise.resolve(AP.detect())},e}()),RP=NP,OP=AP,PP=NP,kP=AP,MP=NP,jP=NP,LP=AP,DP=function(){return DP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},DP.apply(this,arguments)},IP=new(function(){function e(){}return e.prototype.detect=function(e){var t,n,r,o;if(!("undefined"!=typeof navigator&&void 0===(null===(r=null===(n=global.process)||void 0===n?void 0:n.versions)||void 0===r?void 0:r.node)&&void 0===(null===(o=global.Bun)||void 0===o?void 0:o.version)))return CP.empty();var i=((t={})[DA.PROCESS_RUNTIME_NAME]="browser",t[DA.PROCESS_RUNTIME_DESCRIPTION]="Web Browser",t[DA.PROCESS_RUNTIME_VERSION]=navigator.userAgent,t);return this._getResourceAttributes(i,e)},e.prototype._getResourceAttributes=function(e,t){return""===e[DA.PROCESS_RUNTIME_VERSION]?(gm.debug("BrowserDetector failed: Unable to find required browser resources. "),CP.empty()):new CP(DP({},e))},e}()),FP=new(function(){function e(){}return e.prototype.detect=function(e){return Promise.resolve(IP.detect(e))},e}()),UP=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},$P=new(function(){function e(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}return e.prototype.detect=function(e){var t={},n=sO(),r=n.OTEL_RESOURCE_ATTRIBUTES,o=n.OTEL_SERVICE_NAME;if(r)try{var i=this._parseResourceAttributes(r);Object.assign(t,i)}catch(JSe){gm.debug("EnvDetector failed: "+JSe.message)}return o&&(t[TA]=o),new CP(t)},e.prototype._parseResourceAttributes=function(e){var t,n;if(!e)return{};var r={},o=e.split(this._COMMA_SEPARATOR,-1);try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),a=i.next();!a.done;a=i.next()){var s=a.value.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2===s.length){var l=UP(s,2),c=l[0],u=l[1];if(c=c.trim(),u=u.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(c))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(u))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);r[c]=decodeURIComponent(u)}}}catch(d){t={error:d}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},e.prototype._isValid=function(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)},e.prototype._isBaggageOctetString=function(e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(n<33||44===n||59===n||92===n||n>126)return!1}return!0},e.prototype._isValidAndNotEmpty=function(e){return e.length>0&&this._isValid(e)},e}()),VP=new(function(){function e(){}return e.prototype.detect=function(e){return Promise.resolve($P.detect(e))},e}()),BP=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},zP=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},HP=function(e){e.forEach((function(e){if(Object.keys(e.attributes).length>0){var t=JSON.stringify(e.attributes,null,4);gm.verbose(t)}}))};const qP=Wa(Object.freeze(Object.defineProperty({__proto__:null,Resource:CP,browserDetector:FP,browserDetectorSync:IP,defaultServiceName:_P,detectResources:function(e){return void 0===e&&(e={}),BP(void 0,void 0,void 0,(function(){var t;return zP(this,(function(n){switch(n.label){case 0:return[4,Promise.all((e.detectors||[]).map((function(t){return BP(void 0,void 0,void 0,(function(){var n,r;return zP(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,t.detect(e)];case 1:return n=o.sent(),gm.debug(t.constructor.name+" found resource.",n),[2,n];case 2:return r=o.sent(),gm.debug(t.constructor.name+" failed: "+r.message),[2,CP.empty()];case 3:return[2]}}))}))})))];case 1:return t=n.sent(),HP(t),[2,t.reduce((function(e,t){return e.merge(t)}),CP.empty())]}}))}))},detectResourcesSync:function(e){var t;void 0===e&&(e={});var n=(null!==(t=e.detectors)&&void 0!==t?t:[]).map((function(t){try{var n,r=t.detect(e);if(null!==(o=r)&&"object"==typeof o&&"function"==typeof o.then){n=new CP({},BP(void 0,void 0,void 0,(function(){return zP(this,(function(e){switch(e.label){case 0:return[4,r];case 1:return[2,e.sent().attributes]}}))})))}else n=r;return n.waitForAsyncAttributes?n.waitForAsyncAttributes().then((function(){return gm.debug(t.constructor.name+" found resource.",n)})):gm.debug(t.constructor.name+" found resource.",n),n}catch(JSe){return gm.error(t.constructor.name+" failed: "+JSe.message),CP.empty()}var o})),r=n.reduce((function(e,t){return e.merge(t)}),CP.empty());return r.waitForAsyncAttributes&&r.waitForAsyncAttributes().then((function(){HP(n)})),r},envDetector:VP,envDetectorSync:$P,hostDetector:RP,hostDetectorSync:OP,osDetector:PP,osDetectorSync:kP,processDetector:MP,processDetectorSync:jP,serviceInstanceIdDetectorSync:LP},Symbol.toStringTag,{value:"Module"})));var GP,KP=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},WP=function(){function e(e,t,n,r,o,i,a,s,l,c){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:om.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=i,this.kind=o,this.links=a;var u=Date.now();this._performanceStartTime=mO.now(),this._performanceOffset=u-(this._performanceStartTime+EO()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:u),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=c&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return null==t||this._isSpanEnded()?this:0===e.length?(gm.warn("Invalid attribute key: "+e),this):FR(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),this):(gm.warn("Invalid attribute value set for key: "+e),this)},e.prototype.setAttributes=function(e){var t,n;try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=r.next();!o.done;o=r.next()){var i=KP(o.value,2);this.setAttribute(i[0],i[1])}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.addEvent=function(e,t,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return gm.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&gm.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),OO(t)&&(OO(n)||(n=t),t=void 0);var r=DR(t);return this.events.push({name:e,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.setStatus=function(e){return this._isSpanEnded()||(this.status=e),this},e.prototype.updateName=function(e){return this._isSpanEnded()||(this.name=e),this},e.prototype.end=function(e){this._isSpanEnded()?gm.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(e),this._duration=CO(this.startTime,this.endTime),this._duration[0]<0&&(gm.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&gm.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this))},e.prototype._getTime=function(e){if("number"==typeof e&&e<mO.now())return TO(e+this._performanceOffset);if("number"==typeof e)return SO(e);if(e instanceof Date)return SO(e.getTime());if(RO(e))return e;if(this._startTimeProvided)return SO(Date.now());var t=mO.now()-this._performanceStartTime;return PO(this.startTime,SO(t))},e.prototype.isRecording=function(){return!1===this._ended},e.prototype.recordException=function(e,t){var n={};"string"==typeof e?n[Bx.EXCEPTION_MESSAGE]=e:e&&(e.code?n[Bx.EXCEPTION_TYPE]=e.code.toString():e.name&&(n[Bx.EXCEPTION_TYPE]=e.name),e.message&&(n[Bx.EXCEPTION_MESSAGE]=e.message),e.stack&&(n[Bx.EXCEPTION_STACKTRACE]=e.stack)),n[Bx.EXCEPTION_TYPE]||n[Bx.EXCEPTION_MESSAGE]?this.addEvent("exception",n,t):gm.warn("Failed to record an exception "+e)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&gm.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(e,t){return e.length<=t?e:e.substr(0,t)},e.prototype._truncateToSize=function(e){var t=this,n=this._attributeValueLengthLimit;return n<=0?(gm.warn("Attribute value limit must be positive, got "+n),e):"string"==typeof e?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map((function(e){return"string"==typeof e?t._truncateToLimitUtil(e,n):e})):e},e}();!function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(GP||(GP={}));var YP=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:GP.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),XP=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:GP.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),ZP=function(){function e(e){var t,n,r,o;this._root=e.root,this._root||(HR(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new XP),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new XP,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new YP,this._localParentSampled=null!==(r=e.localParentSampled)&&void 0!==r?r:new XP,this._localParentNotSampled=null!==(o=e.localParentNotSampled)&&void 0!==o?o:new YP}return e.prototype.shouldSample=function(e,t,n,r,o,i){var a=Om.getSpanContext(e);return a&&Xh(a)?a.isRemote?a.traceFlags&Ah.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,o,i):this._remoteParentNotSampled.shouldSample(e,t,n,r,o,i):a.traceFlags&Ah.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,o,i):this._localParentNotSampled.shouldSample(e,t,n,r,o,i):this._root.shouldSample(e,t,n,r,o,i)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),QP=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:Wh(t)&&this._accumulate(t)<this._upperBound?GP.RECORD_AND_SAMPLED:GP.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n<e.length/8;n++){var r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t},e}(),JP=sO(),ek=VR.AlwaysOn;function tk(){return{sampler:nk(JP),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:sO().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:sO().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:sO().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:sO().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:sO().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:sO().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:sO().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:sO().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function nk(e){switch(void 0===e&&(e=sO()),e.OTEL_TRACES_SAMPLER){case VR.AlwaysOn:return new XP;case VR.AlwaysOff:return new YP;case VR.ParentBasedAlwaysOn:return new ZP({root:new XP});case VR.ParentBasedAlwaysOff:return new ZP({root:new YP});case VR.TraceIdRatio:return new QP(rk(e));case VR.ParentBasedTraceIdRatio:return new ZP({root:new QP(rk(e))});default:return gm.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+ek+'".'),new XP}}function rk(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return gm.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(gm.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):t<0||t>1?(gm.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):t}var ok=function(){function e(e,t){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=sO();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new bP(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(gm.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&Ah.SAMPLED&&this._addToBuffer(e)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var e=this;return Promise.resolve().then((function(){return e.onShutdown()})).then((function(){return e._flushAll()})).then((function(){return e._exporter.shutdown()}))},e.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&gm.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(gm.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},e.prototype._flushAll=function(){var e=this;return new Promise((function(t,n){for(var r=[],o=0,i=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize);o<i;o++)r.push(e._flushOneBatch());Promise.all(r).then((function(){t()})).catch(n)}))},e.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(t,n){var r=setTimeout((function(){n(new Error("Timeout"))}),e._exportTimeoutMillis);mm.with(SR(mm.active()),(function(){var o;e._finishedSpans.length<=e._maxExportBatchSize?(o=e._finishedSpans,e._finishedSpans=[]):o=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var i=function(){return e._exporter.export(o,(function(e){var o;clearTimeout(r),e.code===bO.SUCCESS?t():n(null!==(o=e.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))},a=null,s=0,l=o.length;s<l;s++){var c=o[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(null!=a||(a=[]),a.push(c.resource.waitForAsyncAttributes()))}null===a?i():Promise.all(a).then(i,(function(e){HR(e),n(e)}))}))}))},e.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var t=function(){e._isExporting=!0,e._flushOneBatch().finally((function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())})).catch((function(t){e._isExporting=!1,HR(t)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return t();void 0===this._timer&&(this._timer=setTimeout((function(){return t()}),this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},e}(),ik=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ak=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.onInit(n),r}return ik(t,e),t.prototype.onInit=function(e){var t=this;!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&t.forceFlush()},this._pageHideListener=function(){t.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(ok),sk=function(){return function(){this.generateTraceId=ck(16),this.generateSpanId=ck(8)}}(),lk=Array(32);function ck(e){return function(){for(var t=0;t<2*e;t++)lk[t]=Math.floor(16*Math.random())+48,lk[t]>=58&&(lk[t]+=39);return String.fromCharCode.apply(null,lk.slice(0,2*e))}}var uk,dk,pk=function(){function e(e,t,n){this._tracerProvider=n;var r,o,i,a,s=(r=t,o={sampler:nk()},i=tk(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=t.idGenerator||new sk,this.resource=n.resource,this.instrumentationLibrary=e}return e.prototype.startSpan=function(e,t,n){var r,o,i;void 0===t&&(t={}),void 0===n&&(n=mm.active()),t.root&&(n=Om.deleteSpan(n));var a=Om.getSpan(n);if(ER(n))return gm.debug("Instrumentation suppressed, returning Noop Span"),Om.wrapSpanContext(Ih);var s,l,c,u=null==a?void 0:a.spanContext(),d=this._idGenerator.generateSpanId();u&&Om.isSpanContextValid(u)?(s=u.traceId,l=u.traceState,c=u.spanId):s=this._idGenerator.generateTraceId();var p=null!==(r=t.kind)&&void 0!==r?r:nm.INTERNAL,f=(null!==(o=t.links)&&void 0!==o?o:[]).map((function(e){return{context:e.context,attributes:DR(e.attributes)}})),h=DR(t.attributes),m=this._sampler.shouldSample(n,s,e,p,h,f);l=null!==(i=m.traceState)&&void 0!==i?i:l;var g={traceId:s,spanId:d,traceFlags:m.decision===em.RECORD_AND_SAMPLED?Ah.SAMPLED:Ah.NONE,traceState:l};if(m.decision===em.NOT_RECORD)return gm.debug("Recording is off, propagating context in a non-recording span"),Om.wrapSpanContext(g);var v=DR(Object.assign(h,m.attributes));return new WP(this,n,e,g,p,c,f,t.startTime,void 0,v)},e.prototype.startActiveSpan=function(e,t,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=t:3===arguments.length?(o=t,a=n):(o=t,i=n,a=r);var s=null!=i?i:mm.active(),l=this.startSpan(e,o,s),c=Om.setSpan(s,l);return mm.with(c,a,void 0,l)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),fk=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},hk=function(){function e(e){this._spanProcessors=e}return e.prototype.forceFlush=function(){var e,t,n=[];try{for(var r=fk(this._spanProcessors),o=r.next();!o.done;o=r.next()){n.push(o.value.forceFlush())}}catch(i){e={error:i}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e){Promise.all(n).then((function(){e()})).catch((function(t){HR(t||new Error("MultiSpanProcessor: forceFlush failed")),e()}))}))},e.prototype.onStart=function(e,t){var n,r;try{for(var o=fk(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(e,t)}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(e){var t,n;try{for(var r=fk(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(e)}}catch(i){t={error:i}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.shutdown=function(){var e,t,n=[];try{for(var r=fk(this._spanProcessors),o=r.next();!o.done;o=r.next()){n.push(o.value.shutdown())}}catch(i){e={error:i}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e,t){Promise.all(n).then((function(){e()}),t)}))},e}(),mk=function(){function e(){}return e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}();(dk=uk||(uk={}))[dk.resolved=0]="resolved",dk[dk.timeout=1]="timeout",dk[dk.error=2]="error",dk[dk.unresolved=3]="unresolved";var gk=function(){function e(e){var t;void 0===e&&(e={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=sP({},tk(),function(e){var t,n,r,o,i,a,s,l,c,u,d,p,f=Object.assign({},e.spanLimits),h=lO();return f.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(t=e.spanLimits)||void 0===t?void 0:t.attributeCountLimit)&&void 0!==n?n:null===(r=e.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:h.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:h.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:QR,f.attributeValueLengthLimit=null!==(p=null!==(d=null!==(u=null!==(l=null===(s=e.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==l?l:null===(c=e.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==u?u:h.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==d?d:h.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:ZR,Object.assign({},e,{spanLimits:f})}(e));this.resource=null!==(t=n.resource)&&void 0!==t?t:CP.empty(),this.resource=CP.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new ak(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new mk}return e.prototype.getTracer=function(e,t,n){var r=e+"@"+(t||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new pk({name:e,version:t,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},e.prototype.addSpanProcessor=function(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(e){return gm.error("Error while trying to shutdown current span processor",e)})),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new hk(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(e){void 0===e&&(e={}),Om.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&mm.setGlobalContextManager(e.contextManager),e.propagator&&Nm.setGlobalPropagator(e.propagator)},e.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map((function(t){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+e+" ms")),r=uk.timeout}),e);t.forceFlush().then((function(){clearTimeout(o),r!==uk.timeout&&n(r=uk.resolved)})).catch((function(e){clearTimeout(o),r=uk.error,n(e)}))}))}));return new Promise((function(e,n){Promise.all(t).then((function(t){var r=t.filter((function(e){return e!==uk.resolved}));r.length>0?n(r):e()})).catch((function(e){return n([e])}))}))},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(e){var t;return null===(t=this.constructor._registeredPropagators.get(e))||void 0===t?void 0:t()},e.prototype._getSpanExporter=function(e){var t;return null===(t=this.constructor._registeredExporters.get(e))||void 0===t?void 0:t()},e.prototype._buildPropagatorFromEnv=function(){var e=this,t=Array.from(new Set(sO().OTEL_PROPAGATORS)),n=t.map((function(t){var n=e._getPropagator(t);return n||gm.warn('Propagator "'+t+'" requested through environment variable is unavailable.'),n})).reduce((function(e,t){return t&&e.push(t),e}),[]);return 0===n.length?void 0:1===t.length?n[0]:new kO({propagators:n})},e.prototype._buildExporterFromEnv=function(){var e=sO().OTEL_TRACES_EXPORTER;if("none"!==e&&""!==e){var t=this._getSpanExporter(e);return t||gm.error('Exporter "'+e+'" requested through environment variable is unavailable.'),t}},e._registeredPropagators=new Map([["tracecontext",function(){return new zO}],["baggage",function(){return new kR}]]),e._registeredExporters=new Map,e}(),vk=function(){function e(){}return e.prototype.export=function(e,t){return this._sendSpans(e,t)},e.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype._exportInfo=function(e){var t;return{resource:{attributes:e.resource.attributes},traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:null===(t=e.spanContext().traceState)||void 0===t?void 0:t.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:NO(e.startTime),duration:NO(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},e.prototype._sendSpans=function(e,t){var n,r;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),i=o.next();!i.done;i=o.next());}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(t)return t({code:bO.SUCCESS})},e}(),yk=function(){function e(){this._finishedSpans=[],this._stopped=!1}return e.prototype.export=function(e,t){var n;if(this._stopped)return t({code:bO.FAILED,error:new Error("Exporter has been stopped")});(n=this._finishedSpans).push.apply(n,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e),!1)),setTimeout((function(){return t({code:bO.SUCCESS})}),0)},e.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.reset=function(){this._finishedSpans=[]},e.prototype.getFinishedSpans=function(){return this._finishedSpans},e}(),bk=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},xk=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},wk=function(){function e(e){this._exporter=e,this._shutdownOnce=new bP(this._shutdown,this),this._unresolvedExports=new Set}return e.prototype.forceFlush=function(){return bk(this,void 0,void 0,(function(){return xk(this,(function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){var t,n,r=this;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&Ah.SAMPLED){var o=function(){return xP._export(r._exporter,[e]).then((function(e){var t;e.code!==bO.SUCCESS&&HR(null!==(t=e.error)&&void 0!==t?t:new Error("SimpleSpanProcessor: span export failed (status "+e+")"))})).catch((function(e){HR(e)}))};if(e.resource.asyncAttributesPending){var i=null===(n=(t=e.resource).waitForAsyncAttributes)||void 0===n?void 0:n.call(t).then((function(){return null!=i&&r._unresolvedExports.delete(i),o()}),(function(e){return HR(e)}));null!=i&&this._unresolvedExports.add(i)}else o()}},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._exporter.shutdown()},e}();const _k=Wa(Object.freeze(Object.defineProperty({__proto__:null,AlwaysOffSampler:YP,AlwaysOnSampler:XP,BasicTracerProvider:gk,BatchSpanProcessor:ak,ConsoleSpanExporter:vk,get ForceFlushState(){return uk},InMemorySpanExporter:yk,NoopSpanProcessor:mk,ParentBasedSampler:ZP,RandomIdGenerator:sk,get SamplingDecision(){return GP},SimpleSpanProcessor:wk,Span:WP,TraceIdRatioBasedSampler:QP,Tracer:pk},Symbol.toStringTag,{value:"Module"})));var Sk=oh("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Ek(e){return e.setValue(Sk,!0)}function Tk(e){return!0===e.getValue(Sk)}var Ck="baggage";function Ak(e){return e.getAllEntries().map((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),n=t[1],r=encodeURIComponent(t[0])+"="+encodeURIComponent(n.value);return void 0!==n.metadata&&(r+=";"+n.metadata.toString()),r}))}var Nk=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Nm.getBaggage(e);if(r&&!Tk(e)){var o=function(e){return e.reduce((function(e,t){var n=e+(""!==e?",":"")+t;return n.length>8192?e:n}),"")}(Ak(r).filter((function(e){return e.length<=4096})).slice(0,180));o.length>0&&n.set(t,Ck,o)}},e.prototype.extract=function(e,t,n){var r=n.get(t,Ck),o=Array.isArray(r)?r.join(","):r;if(!o)return e;var i={};return 0===o.length?e:(o.split(",").forEach((function(e){var t=function(e){var t=e.split(";");if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var o,i=decodeURIComponent(n.substring(0,r).trim()),a=decodeURIComponent(n.substring(r+1).trim());return t.length>0&&(o=rh(t.join(";"))),{key:i,value:a,metadata:o}}}}}(e);if(t){var n={value:t.value};t.metadata&&(n.metadata=t.metadata),i[t.key]=n}})),0===Object.entries(i).length?e:Nm.setBaggage(e,Nm.createBaggage(i)))},e.prototype.fields=function(){return[Ck]},e}(),Rk=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ok=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Pk(e){var t,n,r={};if("object"!=typeof e||null==e)return r;try{for(var o=Rk(Object.entries(e)),i=o.next();!i.done;i=o.next()){var a=Ok(i.value,2),s=a[0],l=a[1];kk(s)?Mk(l)?r[s]=Array.isArray(l)?l.slice():l:gm.warn("Invalid attribute value set for key: "+s):gm.warn("Invalid attribute key: "+s)}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function kk(e){return"string"==typeof e&&e.length>0}function Mk(e){return null==e||(Array.isArray(e)?function(e){var t,n,r;try{for(var o=Rk(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(jk(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!0}(e):jk(e))}function jk(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}var Lk,Dk=function(e){gm.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){for(var t={},n=e;null!==n;)Object.getOwnPropertyNames(n).forEach((function(e){if(!t[e]){var r=n[e];r&&(t[e]=String(r))}})),n=Object.getPrototypeOf(n);return t}(e))}(e))};function Ik(e){try{Dk(e)}catch(t){}}!function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"}(Lk||(Lk={}));var Fk=["OTEL_SDK_DISABLED"];function Uk(e){return Fk.indexOf(e)>-1}var $k=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Vk(e){return $k.indexOf(e)>-1}var Bk=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function zk(e){return Bk.indexOf(e)>-1}var Hk=1/0,qk=128,Gk={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Wf.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Hk,OTEL_ATTRIBUTE_COUNT_LIMIT:qk,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Hk,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:qk,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Hk,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:qk,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Lk.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function Kk(e,t,n){if(void 0!==n[e]){var r=String(n[e]);t[e]="true"===r.toLowerCase()}}function Wk(e,t,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[e]){var i=Number(n[e]);isNaN(i)||(t[e]=i<r?r:i>o?o:i)}}function Yk(e,t,n,r){void 0===r&&(r=",");var o=n[e];"string"==typeof o&&(t[e]=o.split(r).map((function(e){return e.trim()})))}var Xk={ALL:Wf.ALL,VERBOSE:Wf.VERBOSE,DEBUG:Wf.DEBUG,INFO:Wf.INFO,WARN:Wf.WARN,ERROR:Wf.ERROR,NONE:Wf.NONE};function Zk(e,t,n){var r=n[e];if("string"==typeof r){var o=Xk[r.toUpperCase()];null!=o&&(t[e]=o)}}function Qk(e){var t={};for(var n in Gk){var r=n;if("OTEL_LOG_LEVEL"===r)Zk(r,t,e);else if(Uk(r))Kk(r,t,e);else if(Vk(r))Wk(r,t,e);else if(zk(r))Yk(r,t,e);else{var o=e[r];null!=o&&(t[r]=String(o))}}return t}var Jk="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{};function eM(){var e=Qk(Jk);return Object.assign({},Gk,e)}var tM=performance;function nM(e){for(var t={},n=e.length,r=0;r<n;r++){var o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var rM,oM=nM(["aws.lambda.invoked_arn","db.system","db.connection_string","db.user","db.jdbc.driver_classname","db.name","db.statement","db.operation","db.mssql.instance_name","db.cassandra.keyspace","db.cassandra.page_size","db.cassandra.consistency_level","db.cassandra.table","db.cassandra.idempotence","db.cassandra.speculative_execution_count","db.cassandra.coordinator.id","db.cassandra.coordinator.dc","db.hbase.namespace","db.redis.database_index","db.mongodb.collection","db.sql.table","exception.type","exception.message","exception.stacktrace","exception.escaped","faas.trigger","faas.execution","faas.document.collection","faas.document.operation","faas.document.time","faas.document.name","faas.time","faas.cron","faas.coldstart","faas.invoked_name","faas.invoked_provider","faas.invoked_region","net.transport","net.peer.ip","net.peer.port","net.peer.name","net.host.ip","net.host.port","net.host.name","net.host.connection.type","net.host.connection.subtype","net.host.carrier.name","net.host.carrier.mcc","net.host.carrier.mnc","net.host.carrier.icc","peer.service","enduser.id","enduser.role","enduser.scope","thread.id","thread.name","code.function","code.namespace","code.filepath","code.lineno","http.method","http.url","http.target","http.host","http.scheme","http.status_code","http.flavor","http.user_agent","http.request_content_length","http.request_content_length_uncompressed","http.response_content_length","http.response_content_length_uncompressed","http.server_name","http.route","http.client_ip","aws.dynamodb.table_names","aws.dynamodb.consumed_capacity","aws.dynamodb.item_collection_metrics","aws.dynamodb.provisioned_read_capacity","aws.dynamodb.provisioned_write_capacity","aws.dynamodb.consistent_read","aws.dynamodb.projection","aws.dynamodb.limit","aws.dynamodb.attributes_to_get","aws.dynamodb.index_name","aws.dynamodb.select","aws.dynamodb.global_secondary_indexes","aws.dynamodb.local_secondary_indexes","aws.dynamodb.exclusive_start_table","aws.dynamodb.table_count","aws.dynamodb.scan_forward","aws.dynamodb.segment","aws.dynamodb.total_segments","aws.dynamodb.count","aws.dynamodb.scanned_count","aws.dynamodb.attribute_definitions","aws.dynamodb.global_secondary_index_updates","messaging.system","messaging.destination","messaging.destination_kind","messaging.temp_destination","messaging.protocol","messaging.protocol_version","messaging.url","messaging.message_id","messaging.conversation_id","messaging.message_payload_size_bytes","messaging.message_payload_compressed_size_bytes","messaging.operation","messaging.consumer_id","messaging.rabbitmq.routing_key","messaging.kafka.message_key","messaging.kafka.consumer_group","messaging.kafka.client_id","messaging.kafka.partition","messaging.kafka.tombstone","rpc.system","rpc.service","rpc.method","rpc.grpc.status_code","rpc.jsonrpc.version","rpc.jsonrpc.request_id","rpc.jsonrpc.error_code","rpc.jsonrpc.error_message","message.type","message.id","message.compressed_size","message.uncompressed_size"]),iM="service.name",aM="telemetry.sdk.name",sM="telemetry.sdk.language",lM="telemetry.sdk.version",cM=iM,uM=aM,dM=sM,pM=lM,fM=nM(["cloud.provider","cloud.account.id","cloud.region","cloud.availability_zone","cloud.platform","aws.ecs.container.arn","aws.ecs.cluster.arn","aws.ecs.launchtype","aws.ecs.task.arn","aws.ecs.task.family","aws.ecs.task.revision","aws.eks.cluster.arn","aws.log.group.names","aws.log.group.arns","aws.log.stream.names","aws.log.stream.arns","container.name","container.id","container.runtime","container.image.name","container.image.tag","deployment.environment","device.id","device.model.identifier","device.model.name","faas.name","faas.id","faas.version","faas.instance","faas.max_memory","host.id","host.name","host.type","host.arch","host.image.name","host.image.id","host.image.version","k8s.cluster.name","k8s.node.name","k8s.node.uid","k8s.namespace.name","k8s.pod.uid","k8s.pod.name","k8s.container.name","k8s.replicaset.uid","k8s.replicaset.name","k8s.deployment.uid","k8s.deployment.name","k8s.statefulset.uid","k8s.statefulset.name","k8s.daemonset.uid","k8s.daemonset.name","k8s.job.uid","k8s.job.name","k8s.cronjob.uid","k8s.cronjob.name","os.type","os.description","os.name","os.version","process.pid","process.executable.name","process.executable.path","process.command","process.command_line","process.command_args","process.owner","process.runtime.name","process.runtime.version","process.runtime.description",iM,"service.namespace","service.instance.id","service.version",aM,sM,lM,"telemetry.auto.version","webengine.name","webengine.version","webengine.description"]),hM=nM(["cpp","dotnet","erlang","go","java","nodejs","php","python","ruby","webjs"]),mM=((rM={})[fM.TELEMETRY_SDK_NAME]="opentelemetry",rM[fM.PROCESS_RUNTIME_NAME]="browser",rM[fM.TELEMETRY_SDK_LANGUAGE]=hM.WEBJS,rM[fM.TELEMETRY_SDK_VERSION]="1.24.1",rM);var gM,vM=Math.pow(10,6),yM=Math.pow(10,9);function bM(e){return[Math.trunc(e/1e3),Math.round(e%1e3*vM)]}function xM(){var e=tM.timeOrigin;if("number"!=typeof e){e=tM.timing&&tM.timing.fetchStart}return e}function wM(e){return AM(bM(xM()),bM("number"==typeof e?e:tM.now()))}function _M(e){if(TM(e))return e;if("number"==typeof e)return e<xM()?wM(e):bM(e);if(e instanceof Date)return bM(e.getTime());throw TypeError("Invalid input type")}function SM(e){return e[0]*yM+e[1]}function EM(e){return 1e6*e[0]+e[1]/1e3}function TM(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}function CM(e){return TM(e)||"number"==typeof e||e instanceof Date}function AM(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=yM&&(n[1]-=yM,n[0]+=1),n}!function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"}(gM||(gM={}));var NM=function(){function e(e){var t;void 0===e&&(e={}),this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((function(e){return"function"==typeof e.fields?e.fields():[]})).reduce((function(e,t){return e.concat(t)}),[])))}return e.prototype.inject=function(e,t,n){var r,o;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(e,t,n)}catch(l){gm.warn("Failed to inject with "+s.constructor.name+". Err: "+l.message)}}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},e.prototype.extract=function(e,t,n){return this._propagators.reduce((function(e,r){try{return r.extract(e,t,n)}catch(o){gm.warn("Failed to inject with "+r.constructor.name+". Err: "+o.message)}return e}),e)},e.prototype.fields=function(){return this._fields.slice()},e}(),RM="[_0-9a-z-*/]",OM=new RegExp("^(?:"+("[a-z]"+RM+"{0,255}")+"|"+("[a-z0-9]"+RM+"{0,240}@[a-z]"+RM+"{0,13}")+")$"),PM=/^[ -~]{0,255}[!-~]$/,kM=/,|=/;var MM=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,t.length);(function(e){return OM.test(e)})(o)&&function(e){return PM.test(e)&&!kM.test(e)}(i)&&e.set(o,i)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),jM="traceparent",LM="tracestate",DM=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var IM=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Om.getSpanContext(e);if(r&&!Tk(e)&&Xh(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||Ah.NONE).toString(16);n.set(t,jM,o),r.traceState&&n.set(t,LM,r.traceState.serialize())}},e.prototype.extract=function(e,t,n){var r=n.get(t,jM);if(!r)return e;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return e;var i=function(e){var t=DM.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}(o);if(!i)return e;i.isRemote=!0;var a=n.get(t,LM);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new MM("string"==typeof s?s:void 0)}return Om.setSpanContext(e,i)},e.prototype.fields=function(){return[jM,LM]},e}(),FM="[object Null]",UM="[object Undefined]",$M=Function.prototype.toString,VM=$M.call(Object),BM=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),zM=Object.prototype,HM=zM.hasOwnProperty,qM=Symbol?Symbol.toStringTag:void 0,GM=zM.toString;function KM(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!==function(e){if(null==e)return void 0===e?UM:FM;return qM&&qM in Object(e)?function(e){var t=HM.call(e,qM),n=e[qM],r=!1;try{e[qM]=void 0,r=!0}catch(JSe){}var o=GM.call(e);r&&(t?e[qM]=n:delete e[qM]);return o}(e):function(e){return GM.call(e)}(e)}(e))return!1;var t=BM(e);if(null===t)return!0;var n=HM.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&$M.call(n)===VM}function WM(e){return ZM(e)?e.slice():e}function YM(e,t,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,ej(e)||ej(t)||QM(t))o=WM(t);else if(ZM(e)){if(o=e.slice(),ZM(t))for(var i=0,a=t.length;i<a;i++)o.push(WM(t[i]));else if(JM(t))for(i=0,a=(s=Object.keys(t)).length;i<a;i++){o[l=s[i]]=WM(t[l])}}else if(JM(e))if(JM(t)){if(!function(e,t){if(!KM(e)||!KM(t))return!1;return!0}(e,t))return t;o=Object.assign({},e);var s;for(i=0,a=(s=Object.keys(t)).length;i<a;i++){var l,c=t[l=s[i]];if(ej(c))void 0===c?delete o[l]:o[l]=c;else{var u=o[l],d=c;if(XM(e,l,r)||XM(t,l,r))delete o[l];else{if(JM(u)&&JM(d)){var p=r.get(u)||[],f=r.get(d)||[];p.push({obj:e,key:l}),f.push({obj:t,key:l}),r.set(u,p),r.set(d,f)}o[l]=YM(o[l],c,n,r)}}}}else o=t;return o}}function XM(e,t,n){for(var r=n.get(e[t])||[],o=0,i=r.length;o<i;o++){var a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function ZM(e){return Array.isArray(e)}function QM(e){return"function"==typeof e}function JM(e){return!ej(e)&&!ZM(e)&&!QM(e)&&"object"==typeof e}function ej(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||void 0===e||e instanceof Date||e instanceof RegExp||null===e}var tj=function(){function e(){var e=this;this._promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolve(e)},e.prototype.reject=function(e){this._reject(e)},e}(),nj=function(){function e(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new tj}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var e,t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([this._that],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(n),!1))).then((function(e){return t._deferred.resolve(e)}),(function(e){return t._deferred.reject(e)}))}catch(o){this._deferred.reject(o)}}return this._deferred.promise},e}();var rj,oj={_export:function(e,t){return new Promise((function(n){mm.with(Ek(mm.active()),(function(){e.export(t,(function(e){n(e)}))}))}))}},ij=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},aj=function(){function e(e,t,n,r,o,i,a,s,l,c){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:om.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=i,this.kind=o,this.links=a;var u=Date.now();this._performanceStartTime=tM.now(),this._performanceOffset=u-(this._performanceStartTime+xM()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:u),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=c&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return null==t||this._isSpanEnded()?this:0===e.length?(gm.warn("Invalid attribute key: "+e),this):Mk(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),this):(gm.warn("Invalid attribute value set for key: "+e),this)},e.prototype.setAttributes=function(e){var t,n;try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=r.next();!o.done;o=r.next()){var i=ij(o.value,2);this.setAttribute(i[0],i[1])}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.addEvent=function(e,t,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return gm.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&gm.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),CM(t)&&(CM(n)||(n=t),t=void 0);var r=Pk(t);return this.events.push({name:e,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.setStatus=function(e){return this._isSpanEnded()||(this.status=e),this},e.prototype.updateName=function(e){return this._isSpanEnded()||(this.name=e),this},e.prototype.end=function(e){this._isSpanEnded()?gm.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(e),this._duration=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=yM),[n,r]}(this.startTime,this.endTime),this._duration[0]<0&&(gm.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&gm.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this))},e.prototype._getTime=function(e){if("number"==typeof e&&e<tM.now())return wM(e+this._performanceOffset);if("number"==typeof e)return bM(e);if(e instanceof Date)return bM(e.getTime());if(TM(e))return e;if(this._startTimeProvided)return bM(Date.now());var t=tM.now()-this._performanceStartTime;return AM(this.startTime,bM(t))},e.prototype.isRecording=function(){return!1===this._ended},e.prototype.recordException=function(e,t){var n={};"string"==typeof e?n[oM.EXCEPTION_MESSAGE]=e:e&&(e.code?n[oM.EXCEPTION_TYPE]=e.code.toString():e.name&&(n[oM.EXCEPTION_TYPE]=e.name),e.message&&(n[oM.EXCEPTION_MESSAGE]=e.message),e.stack&&(n[oM.EXCEPTION_STACKTRACE]=e.stack)),n[oM.EXCEPTION_TYPE]||n[oM.EXCEPTION_MESSAGE]?this.addEvent("exception",n,t):gm.warn("Failed to record an exception "+e)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&gm.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(e,t){return e.length<=t?e:e.substr(0,t)},e.prototype._truncateToSize=function(e){var t=this,n=this._attributeValueLengthLimit;return n<=0?(gm.warn("Attribute value limit must be positive, got "+n),e):"string"==typeof e?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map((function(e){return"string"==typeof e?t._truncateToLimitUtil(e,n):e})):e},e}();!function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(rj||(rj={}));var sj=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:rj.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),lj=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:rj.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),cj=function(){function e(e){var t,n,r,o;this._root=e.root,this._root||(Ik(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new lj),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new lj,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new sj,this._localParentSampled=null!==(r=e.localParentSampled)&&void 0!==r?r:new lj,this._localParentNotSampled=null!==(o=e.localParentNotSampled)&&void 0!==o?o:new sj}return e.prototype.shouldSample=function(e,t,n,r,o,i){var a=Om.getSpanContext(e);return a&&Xh(a)?a.isRemote?a.traceFlags&Ah.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,o,i):this._remoteParentNotSampled.shouldSample(e,t,n,r,o,i):a.traceFlags&Ah.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,o,i):this._localParentNotSampled.shouldSample(e,t,n,r,o,i):this._root.shouldSample(e,t,n,r,o,i)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),uj=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:Wh(t)&&this._accumulate(t)<this._upperBound?rj.RECORD_AND_SAMPLED:rj.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n<e.length/8;n++){var r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t},e}(),dj=eM(),pj=Lk.AlwaysOn;function fj(){return{sampler:hj(dj),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:eM().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:eM().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:eM().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:eM().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:eM().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:eM().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:eM().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:eM().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function hj(e){switch(void 0===e&&(e=eM()),e.OTEL_TRACES_SAMPLER){case Lk.AlwaysOn:return new lj;case Lk.AlwaysOff:return new sj;case Lk.ParentBasedAlwaysOn:return new cj({root:new lj});case Lk.ParentBasedAlwaysOff:return new cj({root:new sj});case Lk.TraceIdRatio:return new uj(mj(e));case Lk.ParentBasedTraceIdRatio:return new cj({root:new uj(mj(e))});default:return gm.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+pj+'".'),new lj}}function mj(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return gm.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(gm.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):t<0||t>1?(gm.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):t}function gj(e){var t,n,r,o,i,a,s,l,c,u,d,p,f=Object.assign({},e.spanLimits),h=Qk(Jk);return f.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(t=e.spanLimits)||void 0===t?void 0:t.attributeCountLimit)&&void 0!==n?n:null===(r=e.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:h.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:h.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:qk,f.attributeValueLengthLimit=null!==(p=null!==(d=null!==(u=null!==(l=null===(s=e.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==l?l:null===(c=e.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==u?u:h.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==d?d:h.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:Hk,Object.assign({},e,{spanLimits:f})}var vj=function(){function e(e,t){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=eM();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new nj(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(gm.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&Ah.SAMPLED&&this._addToBuffer(e)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var e=this;return Promise.resolve().then((function(){return e.onShutdown()})).then((function(){return e._flushAll()})).then((function(){return e._exporter.shutdown()}))},e.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&gm.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(gm.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},e.prototype._flushAll=function(){var e=this;return new Promise((function(t,n){for(var r=[],o=0,i=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize);o<i;o++)r.push(e._flushOneBatch());Promise.all(r).then((function(){t()})).catch(n)}))},e.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(t,n){var r=setTimeout((function(){n(new Error("Timeout"))}),e._exportTimeoutMillis);mm.with(Ek(mm.active()),(function(){var o;e._finishedSpans.length<=e._maxExportBatchSize?(o=e._finishedSpans,e._finishedSpans=[]):o=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var i=function(){return e._exporter.export(o,(function(e){var o;clearTimeout(r),e.code===gM.SUCCESS?t():n(null!==(o=e.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))},a=null,s=0,l=o.length;s<l;s++){var c=o[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(null!=a||(a=[]),a.push(c.resource.waitForAsyncAttributes()))}null===a?i():Promise.all(a).then(i,(function(e){Ik(e),n(e)}))}))}))},e.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var t=function(){e._isExporting=!0,e._flushOneBatch().finally((function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())})).catch((function(t){e._isExporting=!1,Ik(t)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return t();void 0===this._timer&&(this._timer=setTimeout((function(){return t()}),this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},e}(),yj=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bj=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.onInit(n),r}return yj(t,e),t.prototype.onInit=function(e){var t=this;!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&t.forceFlush()},this._pageHideListener=function(){t.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(vj),xj=function(){return function(){this.generateTraceId=_j(16),this.generateSpanId=_j(8)}}(),wj=Array(32);function _j(e){return function(){for(var t=0;t<2*e;t++)wj[t]=Math.floor(16*Math.random())+48,wj[t]>=58&&(wj[t]+=39);return String.fromCharCode.apply(null,wj.slice(0,2*e))}}var Sj=function(){function e(e,t,n){this._tracerProvider=n;var r,o,i,a,s=(r=t,o={sampler:hj()},i=fj(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=t.idGenerator||new xj,this.resource=n.resource,this.instrumentationLibrary=e}return e.prototype.startSpan=function(e,t,n){var r,o,i;void 0===t&&(t={}),void 0===n&&(n=mm.active()),t.root&&(n=Om.deleteSpan(n));var a=Om.getSpan(n);if(Tk(n))return gm.debug("Instrumentation suppressed, returning Noop Span"),Om.wrapSpanContext(Ih);var s,l,c,u=null==a?void 0:a.spanContext(),d=this._idGenerator.generateSpanId();u&&Om.isSpanContextValid(u)?(s=u.traceId,l=u.traceState,c=u.spanId):s=this._idGenerator.generateTraceId();var p=null!==(r=t.kind)&&void 0!==r?r:nm.INTERNAL,f=(null!==(o=t.links)&&void 0!==o?o:[]).map((function(e){return{context:e.context,attributes:Pk(e.attributes)}})),h=Pk(t.attributes),m=this._sampler.shouldSample(n,s,e,p,h,f);l=null!==(i=m.traceState)&&void 0!==i?i:l;var g={traceId:s,spanId:d,traceFlags:m.decision===em.RECORD_AND_SAMPLED?Ah.SAMPLED:Ah.NONE,traceState:l};if(m.decision===em.NOT_RECORD)return gm.debug("Recording is off, propagating context in a non-recording span"),Om.wrapSpanContext(g);var v=Pk(Object.assign(h,m.attributes));return new aj(this,n,e,g,p,c,f,t.startTime,void 0,v)},e.prototype.startActiveSpan=function(e,t,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=t:3===arguments.length?(o=t,a=n):(o=t,i=n,a=r);var s=null!=i?i:mm.active(),l=this.startSpan(e,o,s),c=Om.setSpan(s,l);return mm.with(c,a,void 0,l)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}();var Ej,Tj=function(){return Tj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Tj.apply(this,arguments)},Cj=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Aj=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Nj=function(){function e(e,t){var n,r=this;this._attributes=e,this.asyncAttributesPending=null!=t,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==t?void 0:t.then((function(e){return r._attributes=Object.assign({},r._attributes,e),r.asyncAttributesPending=!1,e}),(function(e){return gm.debug("a resource's async attributes promise rejected: %s",e),r.asyncAttributesPending=!1,{}}))}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e(((t={})[cM]="unknown_service",t[dM]=mM[dM],t[uM]=mM[uM],t[pM]=mM[pM],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&gm.error("Accessing resource attributes before async attributes settled"),null!==(e=this._attributes)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return Cj(this,void 0,void 0,(function(){return Aj(this,(function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.merge=function(t){var n,r=this;if(!t)return this;var o=Tj(Tj({},this._syncAttributes),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes);return this._asyncAttributesPromise||t._asyncAttributesPromise?new e(o,Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then((function(e){var n,o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),i=o[0],a=o[1];return Tj(Tj(Tj(Tj({},r._syncAttributes),i),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes),a)}))):new e(o)},e.EMPTY=new e({}),e}(),Rj=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Oj=function(){function e(e){this._spanProcessors=e}return e.prototype.forceFlush=function(){var e,t,n=[];try{for(var r=Rj(this._spanProcessors),o=r.next();!o.done;o=r.next()){n.push(o.value.forceFlush())}}catch(i){e={error:i}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e){Promise.all(n).then((function(){e()})).catch((function(t){Ik(t||new Error("MultiSpanProcessor: forceFlush failed")),e()}))}))},e.prototype.onStart=function(e,t){var n,r;try{for(var o=Rj(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(e,t)}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(e){var t,n;try{for(var r=Rj(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(e)}}catch(i){t={error:i}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.shutdown=function(){var e,t,n=[];try{for(var r=Rj(this._spanProcessors),o=r.next();!o.done;o=r.next()){n.push(o.value.shutdown())}}catch(i){e={error:i}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e,t){Promise.all(n).then((function(){e()}),t)}))},e}(),Pj=function(){function e(){}return e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}();!function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"}(Ej||(Ej={}));var kj,Mj,jj,Lj=function(){function e(e){var t;void 0===e&&(e={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=YM(n,e.shift(),0,r);return n}({},fj(),gj(e));this.resource=null!==(t=n.resource)&&void 0!==t?t:Nj.empty(),this.resource=Nj.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new bj(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new Pj}return e.prototype.getTracer=function(e,t,n){var r=e+"@"+(t||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new Sj({name:e,version:t,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},e.prototype.addSpanProcessor=function(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(e){return gm.error("Error while trying to shutdown current span processor",e)})),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new Oj(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(e){void 0===e&&(e={}),Om.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&mm.setGlobalContextManager(e.contextManager),e.propagator&&Nm.setGlobalPropagator(e.propagator)},e.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map((function(t){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+e+" ms")),r=Ej.timeout}),e);t.forceFlush().then((function(){clearTimeout(o),r!==Ej.timeout&&n(r=Ej.resolved)})).catch((function(e){clearTimeout(o),r=Ej.error,n(e)}))}))}));return new Promise((function(e,n){Promise.all(t).then((function(t){var r=t.filter((function(e){return e!==Ej.resolved}));r.length>0?n(r):e()})).catch((function(e){return n([e])}))}))},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(e){var t;return null===(t=this.constructor._registeredPropagators.get(e))||void 0===t?void 0:t()},e.prototype._getSpanExporter=function(e){var t;return null===(t=this.constructor._registeredExporters.get(e))||void 0===t?void 0:t()},e.prototype._buildPropagatorFromEnv=function(){var e=this,t=Array.from(new Set(eM().OTEL_PROPAGATORS)),n=t.map((function(t){var n=e._getPropagator(t);return n||gm.warn('Propagator "'+t+'" requested through environment variable is unavailable.'),n})).reduce((function(e,t){return t&&e.push(t),e}),[]);return 0===n.length?void 0:1===t.length?n[0]:new NM({propagators:n})},e.prototype._buildExporterFromEnv=function(){var e=eM().OTEL_TRACES_EXPORTER;if("none"!==e&&""!==e){var t=this._getSpanExporter(e);return t||gm.error('Exporter "'+e+'" requested through environment variable is unavailable.'),t}},e._registeredPropagators=new Map([["tracecontext",function(){return new IM}],["baggage",function(){return new Nk}]]),e._registeredExporters=new Map,e}(),Dj=function(){function e(){}return e.prototype.export=function(e,t){return this._sendSpans(e,t)},e.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype._exportInfo=function(e){var t;return{resource:{attributes:e.resource.attributes},traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:null===(t=e.spanContext().traceState)||void 0===t?void 0:t.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:EM(e.startTime),duration:EM(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},e.prototype._sendSpans=function(e,t){var n,r;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),i=o.next();!i.done;i=o.next());}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(t)return t({code:gM.SUCCESS})},e}(),Ij=function(){function e(){this._finishedSpans=[],this._stopped=!1}return e.prototype.export=function(e,t){var n;if(this._stopped)return t({code:gM.FAILED,error:new Error("Exporter has been stopped")});(n=this._finishedSpans).push.apply(n,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e),!1)),setTimeout((function(){return t({code:gM.SUCCESS})}),0)},e.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.reset=function(){this._finishedSpans=[]},e.prototype.getFinishedSpans=function(){return this._finishedSpans},e}(),Fj=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Uj=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},$j=function(){function e(e){this._exporter=e,this._shutdownOnce=new nj(this._shutdown,this),this._unresolvedExports=new Set}return e.prototype.forceFlush=function(){return Fj(this,void 0,void 0,(function(){return Uj(this,(function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){var t,n,r=this;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&Ah.SAMPLED){var o=function(){return oj._export(r._exporter,[e]).then((function(e){var t;e.code!==gM.SUCCESS&&Ik(null!==(t=e.error)&&void 0!==t?t:new Error("SimpleSpanProcessor: span export failed (status "+e+")"))})).catch((function(e){Ik(e)}))};if(e.resource.asyncAttributesPending){var i=null===(n=(t=e.resource).waitForAsyncAttributes)||void 0===n?void 0:n.call(t).then((function(){return null!=i&&r._unresolvedExports.delete(i),o()}),(function(e){return Ik(e)}));null!=i&&this._unresolvedExports.add(i)}else o()}},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._exporter.shutdown()},e}(),Vj=function(){function e(){this._enabled=!1,this._currentContext=sh}return e.prototype._bindFunction=function(e,t){void 0===e&&(e=sh);var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(e,(function(){return t.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(e,t){return void 0===e&&(e=this.active()),"function"==typeof t?this._bindFunction(e,t):t},e.prototype.disable=function(){return this._currentContext=sh,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled||(this._enabled=!0,this._currentContext=sh),this},e.prototype.with=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._currentContext;this._currentContext=e||sh;try{return t.call.apply(t,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([n],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(r),!1))}finally{this._currentContext=i}},e}(),Bj=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zj=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;if(t.contextManager)throw"contextManager should be defined in register method not in constructor";if(t.propagator)throw"propagator should be defined in register method not in constructor";return n}return Bj(t,e),t.prototype.register=function(t){void 0===t&&(t={}),void 0===t.contextManager&&(t.contextManager=new Vj),t.contextManager&&t.contextManager.enable(),e.prototype.register.call(this,t)},t}(Lj);function Hj(e,t){return t in e}function qj(e,t,n,r){var o=void 0,i=void 0;Hj(n,t)&&"number"==typeof n[t]&&(o=n[t]);var a=r||kj.FETCH_START;if(Hj(n,a)&&"number"==typeof n[a]&&(i=n[a]),void 0!==o&&void 0!==i&&o>=i)return e.addEvent(t,o),e}function Gj(e,t){qj(e,kj.FETCH_START,t),qj(e,kj.DOMAIN_LOOKUP_START,t),qj(e,kj.DOMAIN_LOOKUP_END,t),qj(e,kj.CONNECT_START,t),Hj(t,"name")&&t.name.startsWith("https:")&&qj(e,kj.SECURE_CONNECTION_START,t),qj(e,kj.CONNECT_END,t),qj(e,kj.REQUEST_START,t),qj(e,kj.RESPONSE_START,t),qj(e,kj.RESPONSE_END,t);var n=t[kj.ENCODED_BODY_SIZE];void 0!==n&&e.setAttribute(oM.HTTP_RESPONSE_CONTENT_LENGTH,n);var r=t[kj.DECODED_BODY_SIZE];void 0!==r&&n!==r&&e.setAttribute(oM.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,r)}function Kj(e){return e.slice().sort((function(e,t){var n=e[kj.FETCH_START],r=t[kj.FETCH_START];return n>r?1:n<r?-1:0}))}function Wj(){return"undefined"!=typeof location?location.origin:void 0}function Yj(e){if("function"==typeof URL)return new URL(e,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var t=(jj||(jj=document.createElement("a")),jj);return t.href=e,t}function Xj(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var n=function(e,t){var n=e.nodeType,r=function(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var n=Array.from(e.parentNode.childNodes);if(n=n.filter((function(n){var r=n.localName;return t.indexOf(n.nodeType)>=0&&r===e.localName})),n.length>=1)return n.indexOf(e)+1;return 0}(e),o="";if(n===Node.ELEMENT_NODE){var i=e.getAttribute("id");if(t&&i)return'//*[@id="'+i+'"]';o=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)o="text()";else{if(n!==Node.COMMENT_NODE)return"";o="comment()"}if(o&&r>1)return"/"+o+"["+r+"]";return"/"+o}(e,t);if(t&&n.indexOf("@id")>0)return n;var r="";return e.parentNode&&(r+=Xj(e.parentNode,!1)),r+=n}(Mj=kj||(kj={})).CONNECT_END="connectEnd",Mj.CONNECT_START="connectStart",Mj.DECODED_BODY_SIZE="decodedBodySize",Mj.DOM_COMPLETE="domComplete",Mj.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",Mj.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",Mj.DOM_INTERACTIVE="domInteractive",Mj.DOMAIN_LOOKUP_END="domainLookupEnd",Mj.DOMAIN_LOOKUP_START="domainLookupStart",Mj.ENCODED_BODY_SIZE="encodedBodySize",Mj.FETCH_START="fetchStart",Mj.LOAD_EVENT_END="loadEventEnd",Mj.LOAD_EVENT_START="loadEventStart",Mj.NAVIGATION_START="navigationStart",Mj.REDIRECT_END="redirectEnd",Mj.REDIRECT_START="redirectStart",Mj.REQUEST_START="requestStart",Mj.RESPONSE_END="responseEnd",Mj.RESPONSE_START="responseStart",Mj.SECURE_CONNECTION_START="secureConnectionStart",Mj.UNLOAD_EVENT_END="unloadEventEnd",Mj.UNLOAD_EVENT_START="unloadEventStart";const Zj=Wa(Object.freeze(Object.defineProperty({__proto__:null,AlwaysOffSampler:sj,AlwaysOnSampler:lj,BasicTracerProvider:Lj,BatchSpanProcessor:bj,ConsoleSpanExporter:Dj,get ForceFlushState(){return Ej},InMemorySpanExporter:Ij,NoopSpanProcessor:Pj,ParentBasedSampler:cj,get PerformanceTimingNames(){return kj},RandomIdGenerator:xj,get SamplingDecision(){return rj},SimpleSpanProcessor:$j,Span:aj,StackContextManager:Vj,TraceIdRatioBasedSampler:uj,Tracer:Sj,WebTracerProvider:zj,addSpanNetworkEvent:qj,addSpanNetworkEvents:Gj,getElementXPath:Xj,getResource:function(e,t,n,r,o,i){void 0===o&&(o=new WeakSet);var a=Yj(e),s=function(e,t,n,r,o,i){var a=SM(t),s=SM(n),l=r.filter((function(t){var n=SM(_M(t[kj.FETCH_START])),r=SM(_M(t[kj.RESPONSE_END]));return t.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&t.name===e&&n>=a&&r<=s}));l.length>0&&(l=l.filter((function(e){return!o.has(e)})));return l}(e=a.toString(),t,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var l=Kj(s);if(a.origin!==Wj()&&l.length>1){var c=l[0],u=function(e,t,n){for(var r,o=SM(n),i=SM(_M(t)),a=e[1],s=e.length,l=1;l<s;l++){var c=e[l],u=SM(_M(c[kj.FETCH_START])),d=o-SM(_M(c[kj.RESPONSE_END]));u>=i&&(!r||d<r)&&(r=d,a=c)}return a}(l,c[kj.RESPONSE_END],n);return u[kj.FETCH_START]<c[kj.RESPONSE_END]&&(u=c,c=void 0),{corsPreFlightRequest:c,mainRequest:u}}return{mainRequest:s[0]}},hasKey:Hj,normalizeUrl:function(e){return Yj(e).href},parseUrl:Yj,shouldPropagateTraceHeaders:function(e,t){var n=t||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),Yj(e).origin===Wj()||n.some((function(t){return n=e,"string"==typeof(r=t)?n===r:!!n.match(r);var n,r}))},sortResources:Kj},Symbol.toStringTag,{value:"Module"}))),Qj=Wa(wR);var Jj={};Object.defineProperty(Jj,"__esModule",{value:!0}),Jj.SessionIdSpanProcessor=void 0;const eL=Array(32);function tL(e){for(var t={},n=e.length,r=0;r<n;r++){var o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}Jj.SessionIdSpanProcessor=class{constructor(){var e;this._idGenerator=(e=16,function(){for(let t=0;t<2*e;t++)eL[t]=Math.floor(16*Math.random())+48,eL[t]>=58&&(eL[t]+=39);return String.fromCharCode.apply(null,eL.slice(0,2*e))}),this._sessionId=this._idGenerator()}onStart(e){e.setAttribute("session.id",this._sessionId)}onEnd(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}};var nL,rL="service.name",oL="telemetry.sdk.name",iL="telemetry.sdk.language",aL="telemetry.sdk.version",sL=rL,lL=oL,cL=iL,uL=aL,dL=tL(["cloud.provider","cloud.account.id","cloud.region","cloud.availability_zone","cloud.platform","aws.ecs.container.arn","aws.ecs.cluster.arn","aws.ecs.launchtype","aws.ecs.task.arn","aws.ecs.task.family","aws.ecs.task.revision","aws.eks.cluster.arn","aws.log.group.names","aws.log.group.arns","aws.log.stream.names","aws.log.stream.arns","container.name","container.id","container.runtime","container.image.name","container.image.tag","deployment.environment","device.id","device.model.identifier","device.model.name","faas.name","faas.id","faas.version","faas.instance","faas.max_memory","host.id","host.name","host.type","host.arch","host.image.name","host.image.id","host.image.version","k8s.cluster.name","k8s.node.name","k8s.node.uid","k8s.namespace.name","k8s.pod.uid","k8s.pod.name","k8s.container.name","k8s.replicaset.uid","k8s.replicaset.name","k8s.deployment.uid","k8s.deployment.name","k8s.statefulset.uid","k8s.statefulset.name","k8s.daemonset.uid","k8s.daemonset.name","k8s.job.uid","k8s.job.name","k8s.cronjob.uid","k8s.cronjob.name","os.type","os.description","os.name","os.version","process.pid","process.executable.name","process.executable.path","process.command","process.command_line","process.command_args","process.owner","process.runtime.name","process.runtime.version","process.runtime.description",rL,"service.namespace","service.instance.id","service.version",oL,iL,aL,"telemetry.auto.version","webengine.name","webengine.version","webengine.description"]),pL=tL(["cpp","dotnet","erlang","go","java","nodejs","php","python","ruby","webjs"]),fL=((nL={})[dL.TELEMETRY_SDK_NAME]="opentelemetry",nL[dL.PROCESS_RUNTIME_NAME]="browser",nL[dL.TELEMETRY_SDK_LANGUAGE]=pL.WEBJS,nL[dL.TELEMETRY_SDK_VERSION]="1.24.1",nL);var hL=function(){return hL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hL.apply(this,arguments)},mL=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},gL=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},vL=function(){function e(e,t){var n,r=this;this._attributes=e,this.asyncAttributesPending=null!=t,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==t?void 0:t.then((function(e){return r._attributes=Object.assign({},r._attributes,e),r.asyncAttributesPending=!1,e}),(function(e){return gm.debug("a resource's async attributes promise rejected: %s",e),r.asyncAttributesPending=!1,{}}))}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e(((t={})[sL]="unknown_service",t[cL]=fL[cL],t[lL]=fL[lL],t[uL]=fL[uL],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&gm.error("Accessing resource attributes before async attributes settled"),null!==(e=this._attributes)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return mL(this,void 0,void 0,(function(){return gL(this,(function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.merge=function(t){var n,r=this;if(!t)return this;var o=hL(hL({},this._syncAttributes),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes);return this._asyncAttributesPromise||t._asyncAttributesPromise?new e(o,Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then((function(e){var n,o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),i=o[0],a=o[1];return hL(hL(hL(hL({},r._syncAttributes),i),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes),a)}))):new e(o)},e.EMPTY=new e({}),e}(),yL="browser.platform",bL="browser.brands",xL="browser.mobile",wL="browser.language",_L="browser.user_agent",SL=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},EL=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};var TL=new(function(){function e(){}return e.prototype.detect=function(e){return SL(this,void 0,void 0,(function(){var t;return EL(this,(function(n){return"undefined"!=typeof navigator?(t=function(){var e={},t=navigator.userAgentData;t?(e[yL]=t.platform,e[bL]=t.brands.map((function(e){return e.brand+" "+e.version})),e[xL]=t.mobile):e[_L]=navigator.userAgent;return e[wL]=navigator.language,e}(),[2,this._getResourceAttributes(t,e)]):[2,vL.empty()]}))}))},e.prototype._getResourceAttributes=function(e,t){return e[_L]||e[yL]?new vL(e):(gm.debug("BrowserDetector failed: Unable to find required browser resources. "),vL.empty())},e}());const CL=Wa(Object.freeze(Object.defineProperty({__proto__:null,browserDetector:TL},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(If,"__esModule",{value:!0}),If.WebSDK=void 0;const AL=eg,NL=qP,RL=_k,OL=Zj,PL=Qj,kL=Jj,ML=CL;If.WebSDK=class{constructor(e={}){var t,n,r,o;if(this._resource=null!==(t=e.resource)&&void 0!==t?t:new NL.Resource({}),this._resourceDetectors=null!==(n=e.resourceDetectors)&&void 0!==n?n:[ML.browserDetector],this._serviceName=e.serviceName,this._autoDetectResources=null===(r=e.autoDetectResources)||void 0===r||r,e.spanProcessor||e.traceExporter){const t={};e.sampler&&(t.sampler=e.sampler),e.spanLimits&&(t.spanLimits=e.spanLimits),e.idGenerator&&(t.idGenerator=e.idGenerator);const n=null!==(o=e.spanProcessor)&&void 0!==o?o:new RL.BatchSpanProcessor(e.traceExporter);this._tracerProviderConfig={tracerConfig:t,spanProcessor:n,contextManager:e.contextManager,textMapPropagator:e.textMapPropagator}}let i=[];e.instrumentations&&(i=e.instrumentations),this._instrumentations=i}start(){var e,t,n;if(this._disabled)return;if((0,AL.registerInstrumentations)({instrumentations:this._instrumentations}),this._autoDetectResources){this._resource=this._resource.merge((0,NL.detectResourcesSync)({detectors:this._resourceDetectors}))}this._resource=void 0===this._serviceName?this._resource:this._resource.merge(new NL.Resource({[PL.SEMRESATTRS_SERVICE_NAME]:this._serviceName}));const r=new OL.WebTracerProvider(Object.assign(Object.assign({},null===(e=this._tracerProviderConfig)||void 0===e?void 0:e.tracerConfig),{resource:this._resource}));this._tracerProvider=r,this._tracerProviderConfig&&r.addSpanProcessor(this._tracerProviderConfig.spanProcessor),r.register({contextManager:null===(t=this._tracerProviderConfig)||void 0===t?void 0:t.contextManager,propagator:null===(n=this._tracerProviderConfig)||void 0===n?void 0:n.textMapPropagator}),r.addSpanProcessor(new kL.SessionIdSpanProcessor)}getResourceAttributes(){return this._resource.attributes}shutdown(){const e=[];return this._tracerProvider&&e.push(this._tracerProvider.shutdown()),Promise.all(e).then((()=>{}))}};var jL={},LL={},DL={};Object.defineProperty(DL,"__esModule",{value:!0}),DL.VERSION=void 0,DL.VERSION="0.3.0",Object.defineProperty(LL,"__esModule",{value:!0}),LL.configureHoneycombResource=void 0;const IL=qP,FL=DL;LL.configureHoneycombResource=function(){return new IL.Resource({"honeycomb.distro.version":FL.VERSION,"honeycomb.distro.runtime_version":"browser"})};var UL={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.configureEntryPageResource=e.defaultConfig=void 0;const t=qP;function n(e,t){if(e)return t}e.defaultConfig={path:!0,hash:!0,hostname:!0,referrer:!0,url:!1,search:!1},e.configureEntryPageResource=function(r){if(!1===r||!(null===window||void 0===window?void 0:window.location))return new t.Resource({});const o=function(t){if(!t)return e.defaultConfig;return Object.assign(Object.assign({},e.defaultConfig),t)}(r),{href:i,pathname:a,search:s,hash:l,hostname:c}=window.location,u={"entry_page.url":n(o.url,i),"entry_page.path":n(o.path,a),"entry_page.search":n(o.search,s),"entry_page.hash":n(o.hash,l),"entry_page.hostname":n(o.hostname,c),"entry_page.referrer":n(o.referrer,document.referrer)};return new t.Resource(u)}}(UL);var $L,VL,BL={},zL={exports:{}};$L=zL,VL=zL.exports,function(e,t){var n="function",r="undefined",o="object",i="string",a="major",s="model",l="name",c="type",u="vendor",d="version",p="architecture",f="console",h="mobile",m="tablet",g="smarttv",v="wearable",y="embedded",b="Amazon",x="Apple",w="ASUS",_="BlackBerry",S="Browser",E="Chrome",T="Firefox",C="Google",A="Huawei",N="LG",R="Microsoft",O="Motorola",P="Opera",k="Samsung",M="Sharp",j="Sony",L="Xiaomi",D="Zebra",I="Facebook",F="Chromium OS",U="Mac OS",$=" Browser",V=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},B=function(e,t){return typeof e===i&&-1!==z(t).indexOf(z(e))},z=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===i)return e=e.replace(/^\s\s*/,""),typeof t===r?e:e.substring(0,500)},q=function(e,r){for(var i,a,s,l,c,u,d=0;d<r.length&&!c;){var p=r[d],f=r[d+1];for(i=a=0;i<p.length&&!c&&p[i];)if(c=p[i++].exec(e))for(s=0;s<f.length;s++)u=c[++a],typeof(l=f[s])===o&&l.length>0?2===l.length?this[l[0]]=typeof l[1]==n?l[1].call(this,u):l[1]:3===l.length?this[l[0]]=typeof l[1]!==n||l[1].exec&&l[1].test?u?u.replace(l[1],l[2]):t:u?l[1].call(this,u,l[2]):t:4===l.length&&(this[l[0]]=u?l[3].call(this,u.replace(l[1],l[2])):t):this[l]=u||t;d+=2}},G=function(e,n){for(var r in n)if(typeof n[r]===o&&n[r].length>0){for(var i=0;i<n[r].length;i++)if(B(n[r][i],e))return"?"===r?t:r}else if(B(n[r],e))return"?"===r?t:r;return n.hasOwnProperty("*")?n["*"]:e},K={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},W={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,d],[/opios[\/ ]+([\w\.]+)/i],[d,[l,P+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[d,[l,P+" GX"]],[/\bopr\/([\w\.]+)/i],[d,[l,P]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[d,[l,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[d,[l,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,d],[/quark(?:pc)?\/([-\w\.]+)/i],[d,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[d,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[l,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[d,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[d,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[d,[l,"Smart Lenovo "+S]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+S],d],[/\bfocus\/([\w\.]+)/i],[d,[l,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[d,[l,P+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[l,P+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[l,"MIUI"+$]],[/fxios\/([\w\.-]+)/i],[d,[l,T]],[/\bqihoobrowser\/?([\w\.]*)/i],[d,[l,"360"]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],d],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+$],d],[/samsungbrowser\/([\w\.]+)/i],[d,[l,k+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[d,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[l,d],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[d,l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,I],d],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[d,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[l,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,E+" WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[l,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,d],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[d,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[d,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[d,G,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],d],[/(wolvic|librewolf)\/([\w\.]+)/i],[l,d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[l,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,[d,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[d,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,z]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",z]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[u,k],[c,m]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[s,[u,k],[c,h]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[s,[u,x],[c,h]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[u,x],[c,m]],[/(macintosh);/i],[s,[u,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[u,M],[c,h]],[/(?:honor)([-\w ]+)[;\)]/i],[s,[u,"Honor"],[c,h]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[u,A],[c,m]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[s,[u,A],[c,h]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[s,/_/g," "],[u,L],[c,h]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[u,L],[c,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[u,"OPPO"],[c,h]],[/\b(opd2\d{3}a?) bui/i],[s,[u,"OPPO"],[c,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[u,"Vivo"],[c,h]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[s,[u,"Realme"],[c,h]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[u,O],[c,h]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[u,O],[c,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[u,N],[c,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[u,N],[c,h]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[u,"Lenovo"],[c,m]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[u,"Nokia"],[c,h]],[/(pixel c)\b/i],[s,[u,C],[c,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[u,C],[c,h]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[u,j],[c,h]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[u,j],[c,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[u,"OnePlus"],[c,h]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[u,b],[c,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[u,b],[c,h]],[/(playbook);[-\w\),; ]+(rim)/i],[s,u,[c,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[u,_],[c,h]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[u,w],[c,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[u,w],[c,h]],[/(nexus 9)/i],[s,[u,"HTC"],[c,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[s,/_/g," "],[c,h]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[s,[u,"TCL"],[c,m]],[/(itel) ((\w+))/i],[[u,z],s,[c,G,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[u,"Acer"],[c,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[u,"Meizu"],[c,h]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[s,[u,"Ulefone"],[c,h]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[s,[u,"Energizer"],[c,h]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[s,[u,"Cat"],[c,h]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[s,[u,"Smartfren"],[c,h]],[/droid.+; (a(?:015|06[35]|142p?))/i],[s,[u,"Nothing"],[c,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,s,[c,h]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,s,[c,m]],[/(surface duo)/i],[s,[u,R],[c,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[u,"Fairphone"],[c,h]],[/(u304aa)/i],[s,[u,"AT&T"],[c,h]],[/\bsie-(\w*)/i],[s,[u,"Siemens"],[c,h]],[/\b(rct\w+) b/i],[s,[u,"RCA"],[c,m]],[/\b(venue[\d ]{2,7}) b/i],[s,[u,"Dell"],[c,m]],[/\b(q(?:mv|ta)\w+) b/i],[s,[u,"Verizon"],[c,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[u,"Barnes & Noble"],[c,m]],[/\b(tm\d{3}\w+) b/i],[s,[u,"NuVision"],[c,m]],[/\b(k88) b/i],[s,[u,"ZTE"],[c,m]],[/\b(nx\d{3}j) b/i],[s,[u,"ZTE"],[c,h]],[/\b(gen\d{3}) b.+49h/i],[s,[u,"Swiss"],[c,h]],[/\b(zur\d{3}) b/i],[s,[u,"Swiss"],[c,m]],[/\b((zeki)?tb.*\b) b/i],[s,[u,"Zeki"],[c,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],s,[c,m]],[/\b(ns-?\w{0,9}) b/i],[s,[u,"Insignia"],[c,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[u,"NextBook"],[c,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],s,[c,h]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],s,[c,h]],[/\b(ph-1) /i],[s,[u,"Essential"],[c,h]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[u,"Envizen"],[c,m]],[/\b(trio[-\w\. ]+) b/i],[s,[u,"MachSpeed"],[c,m]],[/\btu_(1491) b/i],[s,[u,"Rotor"],[c,m]],[/(shield[\w ]+) b/i],[s,[u,"Nvidia"],[c,m]],[/(sprint) (\w+)/i],[u,s,[c,h]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[u,R],[c,h]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[u,D],[c,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[u,D],[c,h]],[/smart-tv.+(samsung)/i],[u,[c,g]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[u,k],[c,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,N],[c,g]],[/(apple) ?tv/i],[u,[s,x+" TV"],[c,g]],[/crkey/i],[[s,E+"cast"],[u,C],[c,g]],[/droid.+aft(\w+)( bui|\))/i],[s,[u,b],[c,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[s,[u,M],[c,g]],[/(bravia[\w ]+)( bui|\))/i],[s,[u,j],[c,g]],[/(mitv-\w{5}) bui/i],[s,[u,L],[c,g]],[/Hbbtv.*(technisat) (.*);/i],[u,s,[c,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[u,H],[s,H],[c,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,s,[c,f]],[/droid.+; (shield) bui/i],[s,[u,"Nvidia"],[c,f]],[/(playstation [345portablevi]+)/i],[s,[u,j],[c,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[u,R],[c,f]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[s,[u,k],[c,v]],[/((pebble))app/i],[u,s,[c,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[s,[u,x],[c,v]],[/droid.+; (glass) \d/i],[s,[u,C],[c,v]],[/droid.+; (wt63?0{2,3})\)/i],[s,[u,D],[c,v]],[/droid.+; (glass) \d/i],[s,[u,C],[c,v]],[/(pico) (4|neo3(?: link|pro)?)/i],[u,s,[c,v]],[/; (quest( \d| pro)?)/i],[s,[u,I],[c,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[c,y]],[/(aeobc)\b/i],[s,[u,b],[c,y]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[s,[c,h]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[c,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,m]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[c,h]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[l,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[l,d],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,d],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[d,G,K]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,G,K],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,U],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[d,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,d],[/\(bb(10);/i],[d,[l,_]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[l,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[d,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[d,[l,E+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,F],d],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,d],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,d]]},Y=function(f,g){if(typeof f===o&&(g=f,f=t),!(this instanceof Y))return new Y(f,g).getResult();var v=typeof e!==r&&e.navigator?e.navigator:t,y=f||(v&&v.userAgent?v.userAgent:""),b=v&&v.userAgentData?v.userAgentData:t,x=g?function(e,t){var n={};for(var r in e)n[r]=t[r]&&t[r].length%2==0?t[r].concat(e[r]):e[r];return n}(W,g):W,w=v&&v.userAgent==y;return this.getBrowser=function(){var e,r={};return r[l]=t,r[d]=t,q.call(r,y,x.browser),r[a]=typeof(e=r[d])===i?e.replace(/[^\d\.]/g,"").split(".")[0]:t,w&&v&&v.brave&&typeof v.brave.isBrave==n&&(r[l]="Brave"),r},this.getCPU=function(){var e={};return e[p]=t,q.call(e,y,x.cpu),e},this.getDevice=function(){var e={};return e[u]=t,e[s]=t,e[c]=t,q.call(e,y,x.device),w&&!e[c]&&b&&b.mobile&&(e[c]=h),w&&"Macintosh"==e[s]&&v&&typeof v.standalone!==r&&v.maxTouchPoints&&v.maxTouchPoints>2&&(e[s]="iPad",e[c]=m),e},this.getEngine=function(){var e={};return e[l]=t,e[d]=t,q.call(e,y,x.engine),e},this.getOS=function(){var e={};return e[l]=t,e[d]=t,q.call(e,y,x.os),w&&!e[l]&&b&&b.platform&&"Unknown"!=b.platform&&(e[l]=b.platform.replace(/chrome os/i,F).replace(/macos/i,U)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(e){return y=typeof e===i&&e.length>500?H(e,500):e,this},this.setUA(y),this};Y.VERSION="1.0.40",Y.BROWSER=V([l,d,a]),Y.CPU=V([p]),Y.DEVICE=V([s,u,c,f,h,g,m,v,y]),Y.ENGINE=Y.OS=V([l,d]),$L.exports&&(VL=$L.exports=Y),VL.UAParser=Y;var X=typeof e!==r&&(e.jQuery||e.Zepto);if(X&&!X.ua){var Z=new Y;X.ua=Z.getResult(),X.ua.get=function(){return Z.getUA()},X.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"==typeof window?window:Ga);var HL=zL.exports;!function(e){var t=Ga&&Ga.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.configureBrowserAttributesResource=e.computeDeviceProperties=e.computeNetworkType=e.computeScreenSize=void 0;const n=qP,r=t(HL);e.computeScreenSize=e=>e<=768?"small":e>768&&e<=1024?"medium":e>1024?"large":"unknown";e.computeNetworkType=e=>{var t;return null!==(t=null==e?void 0:e.effectiveType)&&void 0!==t?t:"unknown"};e.computeDeviceProperties=e=>{const t=new r.default(e),{name:n,version:o}=t.getBrowser();return{browserName:null!=n?n:"unknown",browserVersion:null!=o?o:"unknown",deviceType:(i=t.getDevice().type,a=n,i||a?i||"desktop":"unknown")};var i,a},e.configureBrowserAttributesResource=function(){const{browserName:t,browserVersion:r,deviceType:o}=(0,e.computeDeviceProperties)(navigator.userAgent);return new n.Resource({"user_agent.original":navigator.userAgent,"browser.mobile":navigator.userAgent.includes("Mobi"),"browser.touch_screen_enabled":navigator.maxTouchPoints>0,"browser.language":navigator.language,"browser.name":t,"browser.version":r,"device.type":o,"network.effectiveType":(0,e.computeNetworkType)(navigator.connection),"screen.width":window.screen.width,"screen.height":window.screen.height,"screen.size":(0,e.computeScreenSize)(window.screen.width)})}}(BL);var qL={};Object.defineProperty(qL,"__esModule",{value:!0}),qL.mergeResources=void 0;const GL=qP;function KL(e){return e instanceof GL.Resource?e:new GL.Resource(e||{})}qL.mergeResources=function(e){let t=KL(e[0]);for(let n=1;n<e.length;n++){if(!e[n])continue;const r=KL(e[n]);t=t.merge(r)}return t};var WL={};const YL=Wa(km);var XL={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getSampleRate=e.getTracesApiKey=e.getTracesEndpoint=e.maybeAppendTracesPath=e.isClassic=e.createHoneycombSDKLogMessage=e.defaultOptions=e.DEFAULT_SAMPLE_RATE=e.DEFAULT_SERVICE_NAME=e.DEFAULT_TRACES_ENDPOINT=e.TRACES_PATH=e.DEFAULT_API_ENDPOINT=void 0,e.DEFAULT_API_ENDPOINT="https://api.honeycomb.io",e.TRACES_PATH="v1/traces",e.DEFAULT_TRACES_ENDPOINT=`${e.DEFAULT_API_ENDPOINT}/${e.TRACES_PATH}`,e.DEFAULT_SERVICE_NAME="unknown_service",e.DEFAULT_SAMPLE_RATE=1,e.defaultOptions={apiKey:"",tracesApiKey:"",endpoint:e.DEFAULT_TRACES_ENDPOINT,tracesEndpoint:e.DEFAULT_TRACES_ENDPOINT,serviceName:e.DEFAULT_SERVICE_NAME,debug:!1,sampleRate:1,skipOptionsValidation:!1,localVisualizations:!1,webVitalsInstrumentationConfig:{enabled:!0}};e.createHoneycombSDKLogMessage=e=>`@honeycombio/opentelemetry-web: ${e}`;const t=/^[a-f0-9]*$/,n=/^hc[a-z]ic_[a-z0-9]*$/;function r(t){return t.endsWith(e.TRACES_PATH)||t.endsWith(`${e.TRACES_PATH}/`)?t:t.endsWith("/")?t+e.TRACES_PATH:t+"/"+e.TRACES_PATH}e.isClassic=function(e){return null!=e&&0!==e.length&&(32===e.length?t.test(e):64===e.length&&n.test(e))},e.maybeAppendTracesPath=r;e.getTracesEndpoint=t=>(null==t?void 0:t.tracesEndpoint)?t.tracesEndpoint:(null==t?void 0:t.endpoint)?r(t.endpoint):e.DEFAULT_TRACES_ENDPOINT;e.getTracesApiKey=e=>(null==e?void 0:e.tracesApiKey)||(null==e?void 0:e.apiKey);e.getSampleRate=t=>"number"==typeof(null==t?void 0:t.sampleRate)&&Number.isSafeInteger(null==t?void 0:t.sampleRate)&&(null==t?void 0:t.sampleRate)>=0?null==t?void 0:t.sampleRate:e.DEFAULT_SAMPLE_RATE}(XL);var ZL={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateOptionsWarnings=e.FAILED_AUTH_FOR_LOCAL_VISUALIZATIONS=e.MISSING_FIELDS_FOR_LOCAL_VISUALIZATIONS=e.SAMPLER_OVERRIDE_WARNING=e.SKIPPING_OPTIONS_VALIDATION_MSG=e.MISSING_DATASET_ERROR=e.IGNORED_DATASET_ERROR=e.MISSING_SERVICE_NAME_ERROR=e.MISSING_API_KEY_ERROR=void 0;const t=XL;e.MISSING_API_KEY_ERROR=(0,t.createHoneycombSDKLogMessage)("❌ Missing API Key. Set `apiKey` in HoneycombOptions. Telemetry will not be exported."),e.MISSING_SERVICE_NAME_ERROR=(0,t.createHoneycombSDKLogMessage)(`❌ Missing Service Name. Set \`serviceName\` in HoneycombOptions. Defaulting to '${t.defaultOptions.serviceName}'`),e.IGNORED_DATASET_ERROR=(0,t.createHoneycombSDKLogMessage)("🔕 Dataset is ignored in favor of service name."),e.MISSING_DATASET_ERROR=(0,t.createHoneycombSDKLogMessage)("❌ Missing dataset. Specify either HONEYCOMB_DATASET environment variable or dataset in the options parameter."),e.SKIPPING_OPTIONS_VALIDATION_MSG=(0,t.createHoneycombSDKLogMessage)("⏭️ Skipping options validation. To re-enable, set skipOptionsValidation option or HONEYCOMB_SKIP_OPTIONS_VALIDATION to false."),e.SAMPLER_OVERRIDE_WARNING=(0,t.createHoneycombSDKLogMessage)("🔨 Default deterministic sampler has been overridden. Honeycomb requires a resource attribute called SampleRate to properly show weighted values. Non-deterministic sampleRate could lead to missing spans in Honeycomb. See our docs for more details. https://docs.honeycomb.io/getting-data-in/opentelemetry/node-distro/#sampling-without-the-honeycomb-sdk"),e.MISSING_FIELDS_FOR_LOCAL_VISUALIZATIONS=(0,t.createHoneycombSDKLogMessage)("🔕 Disabling local visualizations - must have both service name and API key configured."),e.FAILED_AUTH_FOR_LOCAL_VISUALIZATIONS=(0,t.createHoneycombSDKLogMessage)("🔕 Failed to get proper auth response from Honeycomb. No local visualization available.");e.validateOptionsWarnings=e=>{if(!(null==e?void 0:e.skipOptionsValidation))return(null==e?void 0:e.apiKey)&&(0,t.isClassic)(null==e?void 0:e.apiKey),(null==e?void 0:e.apiKey)&&(0,t.isClassic)(null==e?void 0:e.apiKey),e}}(ZL),Object.defineProperty(WL,"__esModule",{value:!0}),WL.configureDebug=void 0;const QL=YL,JL=XL,eD=ZL;WL.configureDebug=function(e){if(!(null==e?void 0:e.debug))return;QL.diag.setLogger(new QL.DiagConsoleLogger,QL.DiagLogLevel.DEBUG),QL.diag.debug((0,JL.createHoneycombSDKLogMessage)("🐝 Honeycomb Web SDK Debug Mode Enabled 🐝"));const t=(0,JL.getTracesEndpoint)(e),n=Object.assign(Object.assign(Object.assign({},JL.defaultOptions),e),{tracesEndpoint:t});!function(e){const t=(0,JL.getTracesApiKey)(e)||"";if(!t)return void QL.diag.debug(eD.MISSING_API_KEY_ERROR);QL.diag.debug((0,JL.createHoneycombSDKLogMessage)(`API Key configured for traces: '${t}'`))}(n),function(e){const t=e.serviceName||JL.defaultOptions.serviceName;if(t===JL.defaultOptions.serviceName)return void QL.diag.debug(eD.MISSING_SERVICE_NAME_ERROR);QL.diag.debug(`@honeycombio/opentelemetry-web: Service Name configured for traces: '${t}'`)}(n),function(e){const t=(0,JL.getTracesEndpoint)(e);if(!t)return void QL.diag.debug((0,JL.createHoneycombSDKLogMessage)("No endpoint configured for traces"));QL.diag.debug((0,JL.createHoneycombSDKLogMessage)(`Endpoint configured for traces: '${t}'`))}(n),function(e){const t=(0,JL.getSampleRate)(e);if(!t)return void QL.diag.debug("No sampler configured for traces");QL.diag.debug((0,JL.createHoneycombSDKLogMessage)(`Sample Rate configured for traces: '${t}'`))}(n)};var tD={},nD={};Object.defineProperty(nD,"__esModule",{value:!0}),nD.BaggageSpanProcessor=void 0;const rD=YL;nD.BaggageSpanProcessor=class{constructor(){}onStart(e,t){var n,r;(null!==(r=null===(n=rD.propagation.getBaggage(t))||void 0===n?void 0:n.getAllEntries())&&void 0!==r?r:[]).forEach((t=>{e.setAttribute(t[0],t[1].value),rD.diag.debug(`@honeycombio/opentelemetry-web: 🚨 Baggage in all outgoing headers: ${t[0]}=${t[1].value} `)}))}onEnd(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}};var oD={};Object.defineProperty(oD,"__esModule",{value:!0}),oD.BrowserAttributesSpanProcessor=void 0;oD.BrowserAttributesSpanProcessor=class{constructor(){}onStart(e){const{href:t,pathname:n,search:r,hash:o,hostname:i}=window.location;e.setAttributes({"browser.width":window.innerWidth,"browser.height":window.innerHeight,"page.hash":o,"page.url":t,"page.route":n,"page.hostname":i,"page.search":r})}onEnd(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}};var iD={},aD=1e4;function sD(e){void 0===e&&(e={});var t={};return Object.entries(e).forEach((function(e){var n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),r=n[0],o=n[1];void 0!==o?t[r]=String(o):gm.warn('Header "'+r+'" has invalid value ('+o+") and will be ignored")})),t}function lD(e){return"number"==typeof e?e<=0?cD(e,1e4):e:(n=Number(null!==(t=sO().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)&&void 0!==t?t:sO().OTEL_EXPORTER_OTLP_TIMEOUT))<=0?cD(n,aD):n;var t,n}function cD(e,t){return gm.warn("Timeout must be greater than 0",e),t}var uD=function(){function e(e){void 0===e&&(e={}),this._sendingPromises=[],this.url=this.getDefaultUrl(e),"string"==typeof e.hostname&&(this.hostname=e.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new bP(this._shutdown,this),this._concurrencyLimit="number"==typeof e.concurrencyLimit?e.concurrencyLimit:30,this.timeoutMillis=lD(e.timeoutMillis),this.onInit(e)}return e.prototype.export=function(e,t){this._shutdownOnce.isCalled?t({code:bO.FAILED,error:new Error("Exporter has been shutdown")}):this._sendingPromises.length>=this._concurrencyLimit?t({code:bO.FAILED,error:new Error("Concurrent export limit reached")}):this._export(e).then((function(){t({code:bO.SUCCESS})})).catch((function(e){t({code:bO.FAILED,error:e})}))},e.prototype._export=function(e){var t=this;return new Promise((function(n,r){try{gm.debug("items to be sent",e),t.send(e,n,r)}catch(JSe){r(JSe)}}))},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype.forceFlush=function(){return Promise.all(this._sendingPromises).then((function(){}))},e.prototype._shutdown=function(){return gm.debug("shutdown started"),this.onShutdown(),this.forceFlush()},e}(),dD=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pD=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.name="OTLPExporterError",o.data=r,o.code=n,o}return dD(t,e),t}(Error),fD=function(){return fD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fD.apply(this,arguments)};function hD(e,t,n,r,o,i){var a,s,l=!1,c=setTimeout((function(){if(clearTimeout(a),l=!0,s.readyState===XMLHttpRequest.DONE){var e=new pD("Request Timeout");i(e)}else s.abort()}),r),u=function(r,d){void 0===r&&(r=5),void 0===d&&(d=1e3),(s=new XMLHttpRequest).open("POST",t);Object.entries(fD(fD({},{Accept:"application/json","Content-Type":"application/json"}),n)).forEach((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2);s.setRequestHeader(t[0],t[1])})),s.send(e),s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&!1===l)if(s.status>=200&&s.status<=299)gm.debug("xhr success",e),o(),clearTimeout(c),clearTimeout(a);else if(s.status&&[429,502,503,504].includes(s.status)&&r>0){var t=void 0;d*=1.5,t=s.getResponseHeader("Retry-After")?function(e){if(null==e)return-1;var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var n=new Date(e).getTime()-Date.now();return n>=0?n:0}(s.getResponseHeader("Retry-After")):Math.round(Math.random()*(5e3-d)+d),a=setTimeout((function(){u(r-1,d)}),t)}else{var n=new pD("Failed to export with XHR (status: "+s.status+")",s.status);i(n),clearTimeout(c),clearTimeout(a)}},s.onabort=function(){if(l){var e=new pD("Request Timeout");i(e)}clearTimeout(c),clearTimeout(a)},s.onerror=function(){if(l){var e=new pD("Request Timeout");i(e)}clearTimeout(c),clearTimeout(a)}};u()}var mD=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gD=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._useXHR=!1,n._useXHR=!!t.headers||"function"!=typeof navigator.sendBeacon,n._headers=n._useXHR?Object.assign({},sD(t.headers),OR(sO().OTEL_EXPORTER_OTLP_HEADERS)):{},n}return mD(t,e),t.prototype.onInit=function(){},t.prototype.onShutdown=function(){},t.prototype.send=function(e,t,n){var r=this;if(this._shutdownOnce.isCalled)gm.debug("Shutdown already started. Cannot send objects");else{var o=this.convert(e),i=JSON.stringify(o),a=new Promise((function(e,t){r._useXHR?hD(i,r.url,r._headers,r.timeoutMillis,e,t):function(e,t,n,r,o){navigator.sendBeacon(t,new Blob([e],n))?(gm.debug("sendBeacon - can send",e),r()):o(new pD("sendBeacon - cannot send "+e))}(i,r.url,{type:"application/json"},e,t)})).then(t,n);this._sendingPromises.push(a);var s=function(){var e=r._sendingPromises.indexOf(a);r._sendingPromises.splice(e,1)};a.then(s,s)}},t}(uD);function vD(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function yD(e){var t,n=vD(e);return t=n,{low:Number(BigInt.asUintN(32,t)),high:Number(BigInt.asUintN(32,t>>BigInt(32)))}}var bD="undefined"!=typeof BigInt?function(e){return vD(e).toString()}:AO;function xD(e){return e}function wD(e){if(void 0!==e)return uO(e)}var _D={encodeHrTime:yD,encodeSpanContext:uO,encodeOptionalSpanContext:wD};function SD(e){return Object.keys(e).map((function(t){return ED(t,e[t])}))}function ED(e,t){return{key:e,value:TD(t)}}function TD(e){var t=typeof e;return"string"===t?{stringValue:e}:"number"===t?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:"boolean"===t?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(TD)}}:"object"===t&&null!=e?{kvlistValue:{values:Object.entries(e).map((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2);return ED(t[0],t[1])}))}}:{}}function CD(e,t){var n,r=e.spanContext(),o=e.status;return{traceId:t.encodeSpanContext(r.traceId),spanId:t.encodeSpanContext(r.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:null===(n=r.traceState)||void 0===n?void 0:n.serialize(),name:e.name,kind:null==e.kind?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:SD(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map((function(e){return function(e,t){return{attributes:e.attributes?SD(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)})),droppedEventsCount:e.droppedEventsCount,status:{code:o.code,message:o.message},links:e.links.map((function(e){return function(e,t){var n;return{attributes:e.attributes?SD(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:null===(n=e.context.traceState)||void 0===n?void 0:n.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)})),droppedLinksCount:e.droppedLinksCount}}function AD(e){return{attributes:SD(e.attributes),droppedAttributesCount:0}}var ND=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function RD(e,t){var n=function(e){var t,n;if(void 0===e)return _D;var r=null===(t=e.useLongBits)||void 0===t||t,o=null!==(n=e.useHex)&&void 0!==n&&n;return{encodeHrTime:r?yD:bD,encodeSpanContext:o?xD:uO,encodeOptionalSpanContext:o?xD:wD}}(t);return{resourceSpans:PD(e,n)}}function OD(e){var t,n,r=new Map;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),i=o.next();!i.done;i=o.next()){var a=i.value,s=r.get(a.resource);s||r.set(a.resource,s=new Map);var l=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),c=s.get(l);c||s.set(l,c=[]),c.push(a)}}catch(u){t={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function PD(e,t){for(var n,r=[],o=OD(e).entries(),i=o.next();!i.done;){for(var a=ND(i.value,2),s=a[0],l=[],c=a[1].values(),u=c.next();!u.done;){var d=u.value;if(d.length>0){var p=d.map((function(e){return CD(e,t)}));l.push({scope:(n=d[0].instrumentationLibrary,{name:n.name,version:n.version}),spans:p,schemaUrl:d[0].instrumentationLibrary.schemaUrl})}u=c.next()}var f={resource:AD(s),scopeSpans:l,schemaUrl:void 0};r.push(f),i=o.next()}return r}var kD=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),MD="v1/traces",jD="http://localhost:4318/"+MD,LD=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._headers=Object.assign(n._headers,OR(sO().OTEL_EXPORTER_OTLP_TRACES_HEADERS)),n}return kD(t,e),t.prototype.convert=function(e){return RD(e,{useHex:!0,useLongBits:!1})},t.prototype.getDefaultUrl=function(e){return"string"==typeof e.url?e.url:sO().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length>0?function(e){try{var t=new URL(e);return""===t.pathname&&(t.pathname=t.pathname+"/"),t.toString()}catch(n){return gm.warn("Could not parse export URL: '"+e+"'"),e}}(sO().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT):sO().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?(t=sO().OTEL_EXPORTER_OTLP_ENDPOINT,n=MD,t.endsWith("/")||(t+="/"),t+n):jD;var t,n},t}(gD);const DD=Wa(Object.freeze(Object.defineProperty({__proto__:null,OTLPTraceExporter:LD},Symbol.toStringTag,{value:"Module"})));!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.configureHoneycombHttpJsonTraceExporter=e.DATASET_HEADER_KEY=e.TEAM_HEADER_KEY=void 0;const t=DD,n=XL;e.TEAM_HEADER_KEY="x-honeycomb-team",e.DATASET_HEADER_KEY="x-honeycomb-dataset",e.configureHoneycombHttpJsonTraceExporter=function(r){const o=(0,n.getTracesApiKey)(r);return new t.OTLPTraceExporter({url:(0,n.getTracesEndpoint)(r),headers:Object.assign({[e.TEAM_HEADER_KEY]:o,[e.DATASET_HEADER_KEY]:(0,n.isClassic)(o)?null==r?void 0:r.dataset:void 0},null==r?void 0:r.headers)})}}(iD);var ID={};const FD=Wa(wP);var UD=Ga&&Ga.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(ID,"__esModule",{value:!0}),ID.configureCompositeExporter=void 0;const $D=FD;ID.configureCompositeExporter=function(e){return new VD(e)};class VD{constructor(e){this._exporters=e}export(e,t){this._exporters.forEach((n=>n.export(e,t))),t({code:$D.ExportResultCode.SUCCESS})}shutdown(){return UD(this,void 0,void 0,(function*(){const e=[];this._exporters.forEach((t=>e.push(t.shutdown()))),yield Promise.all(e)}))}}var BD={};Object.defineProperty(BD,"__esModule",{value:!0}),BD.buildTraceUrl=BD.configureConsoleTraceLinkExporter=void 0;const zD=FD,HD=XL;BD.configureConsoleTraceLinkExporter=function(e){const t=(0,HD.getTracesApiKey)(e);return new qD(null==e?void 0:e.serviceName,t)};class qD{constructor(e,t){if(this._traceUrl="",!e||!t)return;fetch("https://api.honeycomb.io/1/auth",{headers:{"x-honeycomb-team":t}}).then((e=>{if(e.ok)return e.json();throw new Error})).then((n=>{var r,o,i;const a=n;if(!(null===(r=a.team)||void 0===r?void 0:r.slug))throw new Error;this._traceUrl=GD(t,e,null===(o=a.team)||void 0===o?void 0:o.slug,null===(i=a.environment)||void 0===i?void 0:i.slug)})).catch((()=>{}))}export(e,t){this._traceUrl&&e.forEach((e=>{})),t({code:zD.ExportResultCode.SUCCESS})}shutdown(){return Promise.resolve()}}function GD(e,t,n,r){let o=`https://ui.honeycomb.io/${n}`;return!(0,HD.isClassic)(e)&&r&&(o+=`/environments/${r}`),o+=`/datasets/${t}/trace?trace_id`,o}BD.buildTraceUrl=GD,Object.defineProperty(tD,"__esModule",{value:!0}),tD.CompositeSpanProcessor=tD.configureSpanProcessors=void 0;const KD=nD,WD=oD,YD=_k,XD=iD,ZD=ID,QD=BD;tD.configureSpanProcessors=e=>{const t=new JD,n=[];return(null==e?void 0:e.localVisualizations)&&n.push((0,QD.configureConsoleTraceLinkExporter)(e)),(null==e?void 0:e.traceExporter)&&n.push(null==e?void 0:e.traceExporter),t.addProcessor(new YD.BatchSpanProcessor((0,ZD.configureCompositeExporter)([(0,XD.configureHoneycombHttpJsonTraceExporter)(e),...n]))),t.addProcessor(new KD.BaggageSpanProcessor),t.addProcessor(new WD.BrowserAttributesSpanProcessor),(null==e?void 0:e.spanProcessor)&&t.addProcessor(null==e?void 0:e.spanProcessor),t};class JD{constructor(){this.spanProcessors=[]}addProcessor(e){this.spanProcessors.push(e)}getSpanProcessors(){return this.spanProcessors}onStart(e,t){this.spanProcessors.forEach((n=>{n.onStart(e,t)}))}onEnd(e){this.spanProcessors.forEach((t=>{t.onEnd(e)}))}forceFlush(){return Promise.all(this.spanProcessors.map((e=>e.forceFlush()))).then((()=>{}))}shutdown(){return Promise.all(this.spanProcessors.map((e=>e.forceFlush()))).then((()=>{}))}}tD.CompositeSpanProcessor=JD;var eI={};Object.defineProperty(eI,"__esModule",{value:!0}),eI.DeterministicSampler=eI.configureDeterministicSampler=void 0;const tI=_k,nI=XL;eI.configureDeterministicSampler=e=>{const t=(0,nI.getSampleRate)(e);return new rI(t)};class rI{constructor(e){switch(this._sampleRate=e,e){case 0:this._sampler=new tI.AlwaysOffSampler;break;case 1:this._sampler=new tI.AlwaysOnSampler;break;default:this._sampler=new tI.TraceIdRatioBasedSampler(1/e);break}}shouldSample(e,t,n,r,o,i){const a=this._sampler.shouldSample(e,t,n,r,o,i);return Object.assign(Object.assign({},a),{attributes:Object.assign(Object.assign({},a.attributes),{SampleRate:this._sampleRate})})}toString(){return`DeterministicSampler(${this._sampler.toString()})`}}eI.DeterministicSampler=rI;var oI={},iI={exports:{}};!function(e,t){!function(e){var t,n,r=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},o=function(e){if("loading"===document.readyState)return"loading";var t=r();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},i=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},a=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,o=r.id?"#"+r.id:i(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+o.length>(t||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;e=r.parentNode}}catch(a){}return n},s=-1,l=function(){return s},c=function(e){addEventListener("pageshow",(function(t){t.persisted&&(s=t.timeStamp,e(t))}),!0)},u=function(){var e=r();return e&&e.activationStart||0},d=function(e,t){var n=r(),o="navigate";return l()>=0?o="back-forward-cache":n&&(document.prerendering||u()>0?o="prerender":document.wasDiscarded?o="restore":n.type&&(o=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:o}},p=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(o){}},f=function(e,t,n,r){var o,i;return function(a){var s,l;t.value>=0&&(a||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=(s=t.value)>(l=n)[1]?"poor":s>l[0]?"needs-improvement":"good",e(t))}},h=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},m=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},g=function(e){var t=!1;return function(){t||(e(),t=!0)}},v=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},b=function(e){"hidden"===document.visibilityState&&v>-1&&(v="visibilitychange"===e.type?e.timeStamp:0,w())},x=function(){addEventListener("visibilitychange",b,!0),addEventListener("prerenderingchange",b,!0)},w=function(){removeEventListener("visibilitychange",b,!0),removeEventListener("prerenderingchange",b,!0)},_=function(){return v<0&&(v=y(),x(),c((function(){setTimeout((function(){v=y(),x()}),0)}))),{get firstHiddenTime(){return v}}},S=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},E=[1800,3e3],T=function(e,t){t=t||{},S((function(){var n,r=_(),o=d("FCP"),i=p("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-u(),0),o.entries.push(e),n(!0)))}))}));i&&(n=f(e,o,E,t.reportAllChanges),c((function(r){o=d("FCP"),n=f(e,o,E,t.reportAllChanges),h((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},C=[.1,.25],A=0,N=1/0,R=0,O=function(e){e.forEach((function(e){e.interactionId&&(N=Math.min(N,e.interactionId),R=Math.max(R,e.interactionId),A=R?(R-N)/7+1:0)}))},P=function(){return t?A:performance.interactionCount||0},k=function(){"interactionCount"in performance||t||(t=p("event",O,{type:"event",buffered:!0,durationThreshold:0}))},M=[],j=new Map,L=0,D=function(){var e=Math.min(M.length-1,Math.floor((P()-L)/50));return M[e]},I=[],F=function(e){if(I.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=M[M.length-1],n=j.get(e.interactionId);if(n||M.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};j.set(r.id,r),M.push(r)}M.sort((function(e,t){return t.latency-e.latency})),M.length>10&&M.splice(10).forEach((function(e){return j.delete(e.id)}))}}},U=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=g(e),"hidden"===document.visibilityState?e():(n=t(e),m(e)),n},$=[200,500],V=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},S((function(){var n;k();var r,o=d("INP"),i=function(e){U((function(){e.forEach(F);var t=D();t&&t.latency!==o.value&&(o.value=t.latency,o.entries=t.entries,r())}))},a=p("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=f(e,o,$,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),m((function(){i(a.takeRecords()),r(!0)})),c((function(){L=P(),M.length=0,j.clear(),o=d("INP"),r=f(e,o,$,t.reportAllChanges)})))})))},B=[],z=[],H=0,q=new WeakMap,G=new Map,K=-1,W=function(e){B=B.concat(e),Y()},Y=function(){K<0&&(K=U(X))},X=function(){G.size>10&&G.forEach((function(e,t){j.has(t)||G.delete(t)}));var e=M.map((function(e){return q.get(e.entries[0])})),t=z.length-50;z=z.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<z.length;r++){var o=z[r];te(o.startTime,o.processingEnd).forEach((function(e){n.add(e)}))}var i=B.length-1-50;B=B.filter((function(e,t){return e.startTime>H&&t>i||n.has(e)})),K=-1};I.push((function(e){e.interactionId&&e.target&&!G.has(e.interactionId)&&G.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;H=Math.max(H,e.processingEnd);for(var r=z.length-1;r>=0;r--){var o=z[r];if(Math.abs(n-o.renderTime)<=8){(t=o).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||z.push(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]}),(e.interactionId||"first-input"===e.entryType)&&q.set(e,t),Y()}));var Z,Q,J,ee,te=function(e,t){for(var n,r=[],o=0;n=B[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},ne=[2500,4e3],re={},oe=[800,1800],ie=function e(t){document.prerendering?S((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},ae=function(e,t){t=t||{};var n=d("TTFB"),o=f(e,n,oe,t.reportAllChanges);ie((function(){var i=r();i&&(n.value=Math.max(i.responseStart-u(),0),n.entries=[i],o(!0),c((function(){n=d("TTFB",0),(o=f(e,n,oe,t.reportAllChanges))(!0)})))}))},se={passive:!0,capture:!0},le=new Date,ce=function(e,t){Z||(Z=t,Q=e,J=new Date,pe(removeEventListener),ue())},ue=function(){if(Q>=0&&Q<J-le){var e={entryType:"first-input",name:Z.type,target:Z.target,cancelable:Z.cancelable,startTime:Z.timeStamp,processingStart:Z.timeStamp+Q};ee.forEach((function(t){t(e)})),ee=[]}},de=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(n=t,r=e,o=function(){ce(n,r),a()},i=function(){a()},a=function(){removeEventListener("pointerup",o,se),removeEventListener("pointercancel",i,se)},addEventListener("pointerup",o,se),addEventListener("pointercancel",i,se)):ce(t,e)}var n,r,o,i,a},pe=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,de,se)}))},fe=[100,300],he=function(e,t){t=t||{},S((function(){var n,r=_(),o=d("FID"),i=function(e){e.startTime<r.firstHiddenTime&&(o.value=e.processingStart-e.startTime,o.entries.push(e),n(!0))},a=function(e){e.forEach(i)},s=p("first-input",a);n=f(e,o,fe,t.reportAllChanges),s&&(m(g((function(){a(s.takeRecords()),s.disconnect()}))),c((function(){o=d("FID"),n=f(e,o,fe,t.reportAllChanges),ee=[],Q=-1,Z=null,pe(addEventListener),ee.push(i),ue()})))}))};e.CLSThresholds=C,e.FCPThresholds=E,e.FIDThresholds=fe,e.INPThresholds=$,e.LCPThresholds=ne,e.TTFBThresholds=oe,e.onCLS=function(e,t){var n,r;n=function(t){var n=function(e){var t,n={};if(e.entries.length){var r=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(r&&r.sources&&r.sources.length){var i=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(n={largestShiftTarget:a(i.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:i,largestShiftEntry:r,loadState:o(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)},r=(r=t)||{},T(g((function(){var e,t=d("CLS",0),o=0,i=[],a=function(n){n.forEach((function(e){e.hadRecentInput||(o&&e.startTime-i[i.length-1].startTime<1e3&&e.startTime-i[0].startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e]))})),o>t.value&&(t.value=o,t.entries=i,e())},s=p("layout-shift",a);s&&(e=f(n,t,C,r.reportAllChanges),m((function(){a(s.takeRecords()),e(!0)})),c((function(){o=0,t=d("CLS",0),e=f(n,t,C,r.reportAllChanges),h((function(){return e()}))})),setTimeout(e,0))})))},e.onFCP=function(e,t){T((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:o(l())};if(e.entries.length){var n=r(),i=e.entries[e.entries.length-1];if(n){var a=Math.max(0,n.responseStart-(n.activationStart||0));t={timeToFirstByte:a,firstByteToFCP:e.value-a,loadState:o(e.entries[0].startTime),navigationEntry:n,fcpEntry:i}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},e.onFID=function(e,t){he((function(t){var n,r,i,s=(i={eventTarget:a((r=(n=t).entries[0]).target),eventType:r.name,eventTime:r.startTime,eventEntry:r,loadState:o(r.startTime)},Object.assign(n,{attribution:i}));e(s)}),t)},e.onINP=function(e,t){n||(n=p("long-animation-frame",W)),V((function(t){var n,r,i,s,l,c,u,d,p,f,h,m,g=(i=q.get(r=(n=t).entries[0]),s=r.processingStart,l=i.processingEnd,c=i.entries.sort((function(e,t){return e.processingStart-t.processingStart})),u=te(r.startTime,l),d=n.entries.find((function(e){return e.target})),p=d&&d.target||G.get(r.interactionId),f=[r.startTime+r.duration,l].concat(u.map((function(e){return e.startTime+e.duration}))),h=Math.max.apply(Math,f),m={interactionTarget:a(p),interactionTargetElement:p,interactionType:r.name.startsWith("key")?"keyboard":"pointer",interactionTime:r.startTime,nextPaintTime:h,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:s-r.startTime,processingDuration:l-s,presentationDelay:Math.max(h-l,0),loadState:o(r.startTime)},Object.assign(n,{attribution:m}));e(g)}),t)},e.onLCP=function(e,t){var n,o;n=function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=r();if(n){var o=n.activationStart||0,i=e.entries[e.entries.length-1],s=i.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===i.url}))[0],l=Math.max(0,n.responseStart-o),c=Math.max(l,s?(s.requestStart||s.startTime)-o:0),u=Math.max(c,s?s.responseEnd-o:0),d=Math.max(u,i.startTime-o);t={element:a(i.element),timeToFirstByte:l,resourceLoadDelay:c-l,resourceLoadDuration:u-c,elementRenderDelay:d-u,navigationEntry:n,lcpEntry:i},i.url&&(t.url=i.url),s&&(t.lcpResourceEntry=s)}}return Object.assign(e,{attribution:t})}(t);e(n)},o=(o=t)||{},S((function(){var e,t=_(),r=d("LCP"),i=function(n){o.reportAllChanges||(n=n.slice(-1)),n.forEach((function(n){n.startTime<t.firstHiddenTime&&(r.value=Math.max(n.startTime-u(),0),r.entries=[n],e())}))},a=p("largest-contentful-paint",i);if(a){e=f(n,r,ne,o.reportAllChanges);var s=g((function(){re[r.id]||(i(a.takeRecords()),a.disconnect(),re[r.id]=!0,e(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return U(s)}),{once:!0,capture:!0})})),m(s),c((function(t){r=d("LCP"),e=f(n,r,ne,o.reportAllChanges),h((function(){r.value=performance.now()-t.timeStamp,re[r.id]=!0,e(!0)}))}))}}))},e.onTTFB=function(e,t){ae((function(t){var n=function(e){var t={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(e.entries.length){var n=e.entries[0],r=n.activationStart||0,o=Math.max((n.workerStart||n.fetchStart)-r,0),i=Math.max(n.domainLookupStart-r,0),a=Math.max(n.connectStart-r,0),s=Math.max(n.connectEnd-r,0);t={waitingDuration:o,cacheDuration:i-o,dnsDuration:a-i,connectionDuration:s-a,requestDuration:e.value-s,navigationEntry:n}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}}(t)}(0,iI.exports);var aI=iI.exports,sI=Ga&&Ga.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),lI=Ga&&Ga.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),cI=Ga&&Ga.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&sI(t,e,n);return lI(t,e),t};Object.defineProperty(oI,"__esModule",{value:!0}),oI.WebVitalsInstrumentation=oI.InstrumentationAbstract=void 0;const uI=aI,dI=DL,pI=YL,fI=cI(Gm);let hI=class{constructor(e,t,n={}){this.instrumentationName=e,this.instrumentationVersion=t,this._wrap=fI.wrap,this._unwrap=fI.unwrap,this._massWrap=fI.massWrap,this._massUnwrap=fI.massUnwrap,this._config=Object.assign({enabled:!0},n),this._diag=pI.diag.createComponentLogger({namespace:e}),this._tracer=pI.trace.getTracer(e,t),this._meter=pI.metrics.getMeter(e,t),this._updateMetricInstruments()}get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e={}){this._config=Object.assign({},e)}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}};oI.InstrumentationAbstract=hI;oI.WebVitalsInstrumentation=class extends hI{constructor({enabled:e=!0,vitalsToTrack:t=["CLS","LCP","INP"],lcp:n,cls:r,inp:o,fid:i,fcp:a,ttfb:s}={}){super("@honeycombio/instrumentation-web-vitals",dI.VERSION,{enabled:e,vitalsToTrack:t,lcp:n,cls:r,inp:o,fid:i,fcp:a,ttfb:s}),this.onReportCLS=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{largestShiftTarget:o,largestShiftTime:i,largestShiftValue:a,loadState:s,largestShiftEntry:l}=r,c=this.getAttrPrefix(n),u=this.tracer.startSpan(n);u.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${c}.largest_shift_target`]:o,[`${c}.element`]:o,[`${c}.largest_shift_time`]:i,[`${c}.largest_shift_value`]:a,[`${c}.load_state`]:s,[`${c}.had_recent_input`]:null==l?void 0:l.hadRecentInput})),t&&t(e,u),u.end()},this.onReportLCP=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{element:o,url:i,timeToFirstByte:a,resourceLoadDelay:s,resourceLoadDuration:l,elementRenderDelay:c}=r,u=this.getAttrPrefix(n),d=this.tracer.startSpan(n);d.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${u}.element`]:o,[`${u}.url`]:i,[`${u}.time_to_first_byte`]:a,[`${u}.resource_load_delay`]:s,[`${u}.resource_load_duration`]:l,[`${u}.element_render_delay`]:c,[`${u}.resource_load_time`]:l})),t&&t(e,d),d.end()},this.onReportINP=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{inputDelay:o,interactionTarget:i,interactionTime:a,interactionType:s,loadState:l,nextPaintTime:c,presentationDelay:u,processingDuration:d}=r,p=this.getAttrPrefix(n),f=this.tracer.startSpan(n);f.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${p}.input_delay`]:o,[`${p}.interaction_target`]:i,[`${p}.interaction_time`]:a,[`${p}.interaction_type`]:s,[`${p}.load_state`]:l,[`${p}.next_paint_time`]:c,[`${p}.presentation_delay`]:u,[`${p}.processing_duration`]:d,[`${p}.element`]:i,[`${p}.event_type`]:s})),t&&t(e,f),f.end()},this.onReportFCP=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{timeToFirstByte:o,firstByteToFCP:i,loadState:a}=r,s=this.getAttrPrefix(n),l=this.tracer.startSpan(n);l.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${s}.time_to_first_byte`]:o,[`${s}.time_since_first_byte`]:i,[`${s}.load_state`]:a})),t&&t(e,l),l.end()},this.onReportFID=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{eventTarget:o,eventType:i,loadState:a}=r,s=this.getAttrPrefix(n),l=this.tracer.startSpan(n);l.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${s}.element`]:o,[`${s}.event_type`]:i,[`${s}.load_state`]:a})),t&&t(e,l),l.end()},this.onReportTTFB=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{cacheDuration:o,connectionDuration:i,dnsDuration:a,requestDuration:s,waitingDuration:l}=r,c=this.getAttrPrefix(n),u=this.tracer.startSpan(n);u.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${c}.waiting_duration`]:l,[`${c}.dns_duration`]:a,[`${c}.connection_duration`]:i,[`${c}.request_duration`]:s,[`${c}.cache_duration`]:o,[`${c}.waiting_time`]:l,[`${c}.dns_time`]:a,[`${c}.connection_time`]:i,[`${c}.request_time`]:s})),t&&t(e,u),u.end()},this.vitalsToTrack=[...t],this.lcpOpts=n,this.clsOpts=r,this.inpOpts=o,this.fidOpts=i,this.fcpOpts=a,this.ttfbOpts=s,this._isEnabled=e,this._setupWebVitalsCallbacks()}init(){}_setupWebVitalsCallbacks(){this.vitalsToTrack.includes("CLS")&&(0,uI.onCLS)((e=>{var t;this.onReportCLS(e,null===(t=this.clsOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.clsOpts),this.vitalsToTrack.includes("LCP")&&(0,uI.onLCP)((e=>{var t;this.onReportLCP(e,null===(t=this.lcpOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.lcpOpts),this.vitalsToTrack.includes("INP")&&(0,uI.onINP)((e=>{var t;this.onReportINP(e,null===(t=this.inpOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.inpOpts),this.vitalsToTrack.includes("FID")&&(0,uI.onFID)((e=>{var t;this.onReportFID(e,null===(t=this.fidOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.fidOpts),this.vitalsToTrack.includes("TTFB")&&(0,uI.onTTFB)((e=>{var t;this.onReportTTFB(e,null===(t=this.ttfbOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.ttfbOpts),this.vitalsToTrack.includes("FCP")&&(0,uI.onFCP)((e=>{var t;this.onReportFCP(e,null===(t=this.fcpOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.fcpOpts)}getAttrPrefix(e){return e.toLowerCase()}getSharedAttributes(e){const{name:t,id:n,delta:r,rating:o,value:i,navigationType:a}=e,s=this.getAttrPrefix(t);return{[`${s}.id`]:n,[`${s}.delta`]:r,[`${s}.value`]:i,[`${s}.rating`]:o,[`${s}.navigation_type`]:a}}disable(){this.isEnabled()?(this._isEnabled=!1,this._diag.debug("Instrumentation disabled")):this._diag.debug("Instrumentation already disabled")}enable(){this.isEnabled()?this._diag.debug("Instrumentation already enabled"):(this._isEnabled=!0,this._diag.debug("Instrumentation enabled"),this._diag.debug(`Sending spans for ${this.vitalsToTrack.join(",")}`))}isEnabled(){return this._isEnabled}},Object.defineProperty(jL,"__esModule",{value:!0}),jL.HoneycombWebSDK=void 0;const mI=If,gI=LL,vI=UL,yI=BL,bI=qL,xI=WL,wI=tD,_I=eI,SI=ZL,EI=oI;jL.HoneycombWebSDK=class extends mI.WebSDK{constructor(e){var t;const n=[...(null==e?void 0:e.instrumentations)||[]];!1!==(null===(t=null==e?void 0:e.webVitalsInstrumentationConfig)||void 0===t?void 0:t.enabled)&&n.push(new EI.WebVitalsInstrumentation(null==e?void 0:e.webVitalsInstrumentationConfig)),super(Object.assign(Object.assign({},e),{instrumentations:n,resource:(0,bI.mergeResources)([(0,yI.configureBrowserAttributesResource)(),(0,vI.configureEntryPageResource)(null==e?void 0:e.entryPageAttributes),null==e?void 0:e.resource,null==e?void 0:e.resourceAttributes,(0,gI.configureHoneycombResource)()]),sampler:(0,_I.configureDeterministicSampler)(e),spanProcessor:(0,wI.configureSpanProcessors)(e)})),(0,SI.validateOptionsWarnings)(e),(null==e?void 0:e.debug)&&(0,xI.configureDebug)(e)}},function(e){var t=Ga&&Ga.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Ga&&Ga.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(If,e),n(jL,e),n(oI,e)}(Df);var TI=oh("OpenTelemetry SDK Context Key SUPPRESS_TRACING");var CI="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},AI=performance,NI="http.method",RI="http.url",OI="http.host",PI="http.scheme",kI="http.status_code",MI="http.user_agent",jI="http.request_content_length_uncompressed",LI="http.response_content_length",DI="http.response_content_length_uncompressed",II=Math.pow(10,6),FI=Math.pow(10,9);function UI(e){return[Math.trunc(e/1e3),Math.round(e%1e3*II)]}function $I(){var e=AI.timeOrigin;if("number"!=typeof e){e=AI.timing&&AI.timing.fetchStart}return e}function VI(e){return function(e,t){var n=[e[0]+t[0],e[1]+t[1]];n[1]>=FI&&(n[1]-=FI,n[0]+=1);return n}(UI($I()),UI("number"==typeof e?e:AI.now()))}function BI(e){if(t=e,Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1])return e;if("number"==typeof e)return e<$I()?VI(e):UI(e);if(e instanceof Date)return UI(e.getTime());throw TypeError("Invalid input type");var t}function zI(e){return e[0]*FI+e[1]}var HI="[_0-9a-z-*/]",qI=new RegExp("^(?:"+("[a-z]"+HI+"{0,255}")+"|"+("[a-z0-9]"+HI+"{0,240}@[a-z]"+HI+"{0,13}")+")$"),GI=/^[ -~]{0,255}[!-~]$/,KI=/,|=/;var WI=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,t.length);(function(e){return qI.test(e)})(o)&&function(e){return GI.test(e)&&!KI.test(e)}(i)&&e.set(o,i)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),YI="traceparent",XI="tracestate",ZI=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var QI=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Om.getSpanContext(e);if(r&&!function(e){return!0===e.getValue(TI)}(e)&&Xh(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||Ah.NONE).toString(16);n.set(t,YI,o),r.traceState&&n.set(t,XI,r.traceState.serialize())}},e.prototype.extract=function(e,t,n){var r=n.get(t,YI);if(!r)return e;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return e;var i=function(e){var t=ZI.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}(o);if(!i)return e;i.isRemote=!0;var a=n.get(t,XI);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new WI("string"==typeof s?s:void 0)}return Om.setSpanContext(e,i)},e.prototype.fields=function(){return[YI,XI]},e}();function JI(e,t){return"string"==typeof t?e===t:!!e.match(t)}function eF(e,t){var n,r;if(!t)return!1;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),i=o.next();!i.done;i=o.next()){if(JI(e,i.value))return!0}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}var tF=function(){function e(){}return e.prototype.emit=function(e){},e}(),nF=new tF,rF=new(function(){function e(){}return e.prototype.getLogger=function(e,t,n){return new tF},e}()),oF=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.emit=function(e){this._getLogger().emit(e)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):nF},e}(),iF=function(){function e(){}return e.prototype.getLogger=function(e,t,n){var r;return null!==(r=this.getDelegateLogger(e,t,n))&&void 0!==r?r:new oF(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:rF},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateLogger=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getLogger(e,t,n)},e}(),aF="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},sF=Symbol.for("io.opentelemetry.js.api.logs"),lF=aF;var cF,uF,dF=function(){function e(){this._proxyLoggerProvider=new iF}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(e){return lF[sF]?this.getLoggerProvider():(lF[sF]=(t=1,n=e,r=rF,function(e){return e===t?n:r}),this._proxyLoggerProvider.setDelegate(e),e);var t,n,r},e.prototype.getLoggerProvider=function(){var e,t;return null!==(t=null===(e=lF[sF])||void 0===e?void 0:e.call(lF,1))&&void 0!==t?t:this._proxyLoggerProvider},e.prototype.getLogger=function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)},e.prototype.disable=function(){delete lF[sF],this._proxyLoggerProvider=new iF},e}().getInstance(),pF=function(){return pF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pF.apply(this,arguments)},fF=function(){function e(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this._config={},this._wrap=Gm.wrap,this._unwrap=Gm.unwrap,this._massWrap=Gm.massWrap,this._massUnwrap=Gm.massUnwrap,this.setConfig(n),this._diag=gm.createComponentLogger({namespace:e}),this._tracer=Om.getTracer(e,t),this._meter=bm.getMeter(e,t),this._logger=dF.getLogger(e,t),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var e,t=null!==(e=this.init())&&void 0!==e?e:[];return Array.isArray(t)?t:[t]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(e){this._config=pF({enabled:!0},e)},e.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(e,t,n,r){if(e)try{e(n,r)}catch(JSe){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},JSe)}},e}(),hF=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mF=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o._config.enabled&&o.enable(),o}return hF(t,e),t}(fF);function gF(e,t,n){var r,o;try{o=e()}catch(JSe){r=JSe}finally{return t(r,o),o}}function vF(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}(uF=cF||(cF={})).DOCUMENT_LOAD="documentLoad",uF.DOCUMENT_FETCH="documentFetch",uF.RESOURCE_FETCH="resourceFetch";var yF,bF;(bF=yF||(yF={})).FIRST_PAINT="firstPaint",bF.FIRST_CONTENTFUL_PAINT="firstContentfulPaint";var xF={"first-paint":yF.FIRST_PAINT,"first-contentful-paint":yF.FIRST_CONTENTFUL_PAINT},wF=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_F=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,"@opentelemetry/instrumentation-document-load","0.44.1",t)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return wF(t,e),t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var e=this;window.setTimeout((function(){e._collectPerformance()}))},t.prototype._addResourcesSpans=function(e){var t,n,r=this,o=null===(n=(t=AI).getEntriesByType)||void 0===n?void 0:n.call(t,"resource");o&&o.forEach((function(t){r._initResourceSpan(t,e)}))},t.prototype._collectPerformance=function(){var e=this,t=Array.from(document.getElementsByTagName("meta")).find((function(e){return e.getAttribute("name")===YI})),n=function(){var e,t,n={},r=null===(t=(e=AI).getEntriesByType)||void 0===t?void 0:t.call(e,"navigation")[0];if(r)Object.values(kj).forEach((function(e){if(Hj(r,e)){var t=r[e];"number"==typeof t&&(n[e]=t)}}));else{var o=AI.timing;o&&Object.values(kj).forEach((function(e){if(Hj(o,e)){var t=o[e];"number"==typeof t&&(n[e]=t)}}))}return n}();mm.with(Nm.extract(sh,{traceparent:t&&t.content||""}),(function(){var t,r=e._startSpan(cF.DOCUMENT_LOAD,kj.FETCH_START,n);r&&(mm.with(Om.setSpan(mm.active(),r),(function(){var t=e._startSpan(cF.DOCUMENT_FETCH,kj.FETCH_START,n);t&&(t.setAttribute(RI,location.href),mm.with(Om.setSpan(mm.active(),t),(function(){var r;e.getConfig().ignoreNetworkEvents||Gj(t,n),e._addCustomAttributesOnSpan(t,null===(r=e.getConfig().applyCustomAttributesOnSpan)||void 0===r?void 0:r.documentFetch),e._endSpan(t,kj.RESPONSE_END,n)})))})),r.setAttribute(RI,location.href),r.setAttribute(MI,navigator.userAgent),e._addResourcesSpans(r),e.getConfig().ignoreNetworkEvents||(qj(r,kj.FETCH_START,n),qj(r,kj.UNLOAD_EVENT_START,n),qj(r,kj.UNLOAD_EVENT_END,n),qj(r,kj.DOM_INTERACTIVE,n),qj(r,kj.DOM_CONTENT_LOADED_EVENT_START,n),qj(r,kj.DOM_CONTENT_LOADED_EVENT_END,n),qj(r,kj.DOM_COMPLETE,n),qj(r,kj.LOAD_EVENT_START,n),qj(r,kj.LOAD_EVENT_END,n)),e.getConfig().ignorePerformancePaintEvents||function(e){var t,n,r=null===(n=(t=AI).getEntriesByType)||void 0===n?void 0:n.call(t,"paint");r&&r.forEach((function(t){var n=t.name,r=t.startTime;Hj(xF,n)&&e.addEvent(xF[n],r)}))}(r),e._addCustomAttributesOnSpan(r,null===(t=e.getConfig().applyCustomAttributesOnSpan)||void 0===t?void 0:t.documentLoad),e._endSpan(r,kj.LOAD_EVENT_END,n))}))},t.prototype._endSpan=function(e,t,n){e&&(Hj(n,t)?e.end(n[t]):e.end())},t.prototype._initResourceSpan=function(e,t){var n,r=this._startSpan(cF.RESOURCE_FETCH,kj.FETCH_START,e,t);r&&(r.setAttribute(RI,e.name),this.getConfig().ignoreNetworkEvents||Gj(r,e),this._addCustomAttributesOnResourceSpan(r,e,null===(n=this.getConfig().applyCustomAttributesOnSpan)||void 0===n?void 0:n.resourceFetch),this._endSpan(r,kj.RESPONSE_END,e))},t.prototype._startSpan=function(e,t,n,r){if(Hj(n,t)&&"number"==typeof n[t])return this.tracer.startSpan(e,{startTime:n[t]},r?Om.setSpan(mm.active(),r):void 0)},t.prototype._waitForPageLoad=function(){"complete"===window.document.readyState?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(e,t){var n=this;t&&gF((function(){return t(e)}),(function(e){e&&n._diag.error("addCustomAttributesOnSpan",e)}))},t.prototype._addCustomAttributesOnResourceSpan=function(e,t,n){var r=this;n&&gF((function(){return n(e,t)}),(function(e){e&&r._diag.error("addCustomAttributesOnResourceSpan",e)}))},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(mF),SF=function(){function e(){}return e.prototype.emit=function(e){},e}(),EF=new SF,TF=new(function(){function e(){}return e.prototype.getLogger=function(e,t,n){return new SF},e}()),CF=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.emit=function(e){this._getLogger().emit(e)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):EF},e}(),AF=function(){function e(){}return e.prototype.getLogger=function(e,t,n){var r;return null!==(r=this.getDelegateLogger(e,t,n))&&void 0!==r?r:new CF(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:TF},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateLogger=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getLogger(e,t,n)},e}(),NF="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},RF=Symbol.for("io.opentelemetry.js.api.logs"),OF=NF;var PF,kF,MF,jF=function(){function e(){this._proxyLoggerProvider=new AF}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(e){return OF[RF]?this.getLoggerProvider():(OF[RF]=(t=1,n=e,r=TF,function(e){return e===t?n:r}),this._proxyLoggerProvider.setDelegate(e),e);var t,n,r},e.prototype.getLoggerProvider=function(){var e,t;return null!==(t=null===(e=OF[RF])||void 0===e?void 0:e.call(OF,1))&&void 0!==t?t:this._proxyLoggerProvider},e.prototype.getLogger=function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)},e.prototype.disable=function(){delete OF[RF],this._proxyLoggerProvider=new AF},e}().getInstance(),LF=function(){return LF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},LF.apply(this,arguments)},DF=function(){function e(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this._config={},this._wrap=Gm.wrap,this._unwrap=Gm.unwrap,this._massWrap=Gm.massWrap,this._massUnwrap=Gm.massUnwrap,this.setConfig(n),this._diag=gm.createComponentLogger({namespace:e}),this._tracer=Om.getTracer(e,t),this._meter=bm.getMeter(e,t),this._logger=jF.getLogger(e,t),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var e,t=null!==(e=this.init())&&void 0!==e?e:[];return Array.isArray(t)?t:[t]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(e){this._config=LF({enabled:!0},e)},e.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(e,t,n,r){if(e)try{e(n,r)}catch(JSe){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},JSe)}},e}(),IF=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),FF=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o._config.enabled&&o.enable(),o}return IF(t,e),t}(DF);function UF(e,t){return t in e}function $F(e,t,n,r){var o=void 0,i=void 0;UF(n,t)&&"number"==typeof n[t]&&(o=n[t]);var a=PF.FETCH_START;if(UF(n,a)&&"number"==typeof n[a]&&(i=n[a]),void 0!==o&&void 0!==i&&o>=i)return e.addEvent(t,o),e}function VF(e,t,n){void 0===n&&(n=!1),n||($F(e,PF.FETCH_START,t),$F(e,PF.DOMAIN_LOOKUP_START,t),$F(e,PF.DOMAIN_LOOKUP_END,t),$F(e,PF.CONNECT_START,t),UF(t,"name")&&t.name.startsWith("https:")&&$F(e,PF.SECURE_CONNECTION_START,t),$F(e,PF.CONNECT_END,t),$F(e,PF.REQUEST_START,t),$F(e,PF.RESPONSE_START,t),$F(e,PF.RESPONSE_END,t));var r=t[PF.ENCODED_BODY_SIZE];void 0!==r&&e.setAttribute(LI,r);var o=t[PF.DECODED_BODY_SIZE];void 0!==o&&r!==o&&e.setAttribute(DI,o)}function BF(){return"undefined"!=typeof location?location.origin:void 0}function zF(e,t,n,r,o,i){void 0===o&&(o=new WeakSet);var a=HF(e),s=function(e,t,n,r,o,i){var a=zI(t),s=zI(n),l=r.filter((function(t){var n=zI(BI(t[PF.FETCH_START])),r=zI(BI(t[PF.RESPONSE_END]));return t.initiatorType.toLowerCase()===i&&t.name===e&&n>=a&&r<=s}));l.length>0&&(l=l.filter((function(e){return!o.has(e)})));return l}(e=a.toString(),t,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var l=function(e){return e.slice().sort((function(e,t){var n=e[PF.FETCH_START],r=t[PF.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==BF()&&l.length>1){var c=l[0],u=function(e,t,n){for(var r,o=zI(n),i=zI(BI(t)),a=e[1],s=e.length,l=1;l<s;l++){var c=e[l],u=zI(BI(c[PF.FETCH_START])),d=o-zI(BI(c[PF.RESPONSE_END]));u>=i&&(!r||d<r)&&(r=d,a=c)}return a}(l,c[PF.RESPONSE_END],n);return u[PF.FETCH_START]<c[PF.RESPONSE_END]&&(u=c,c=void 0),{corsPreFlightRequest:c,mainRequest:u}}return{mainRequest:s[0]}}function HF(e){if("function"==typeof URL)return new URL(e,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var t=(kF||(kF=document.createElement("a")),kF);return t.href=e,t}!function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"}(PF||(PF={})),function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"}(MF||(MF={}));var qF=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},GF=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},KF=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},WF=gm.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function YF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||"string"==typeof e[0]){var n=e[1];if(!(null==n?void 0:n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=function(e){if(!e.pipeThrough)return WF.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t,n=0,r=new Promise((function(e){t=e})),o=new TransformStream({start:function(){},transform:function(e,t){return qF(this,void 0,void 0,(function(){var r;return GF(this,(function(o){switch(o.label){case 0:return[4,e];case 1:return r=o.sent(),n+=r.byteLength,t.enqueue(e),[2]}}))}))},flush:function(){t(n)}});return{body:e.pipeThrough(o),length:r}}(n.body),o=r.length;return n.body=r.body,o}return Promise.resolve(function(e){if("undefined"!=typeof Document&&e instanceof Document)return(new XMLSerializer).serializeToString(document).length;if(e instanceof Blob)return e.size;if(void 0!==e.byteLength)return e.byteLength;if(e instanceof FormData)return function(e){var t,n,r=0;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e.entries()),i=o.next();!i.done;i=o.next()){var a=KF(i.value,2),s=a[1];r+=a[0].length,s instanceof Blob?r+=s.size:r+=s.length}}catch(l){t={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(e);if(e instanceof URLSearchParams)return ZF(e.toString());if("string"==typeof e)return ZF(e);return void WF.warn("unknown body type")}(n.body))}var i=e[0];return(null==i?void 0:i.body)?i.clone().text().then((function(e){return ZF(e)})):Promise.resolve()}var XF=new TextEncoder;function ZF(e){return XF.encode(e).byteLength}var QF,JF,eU="0.57.2",tU=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nU="object"==typeof process&&"node"===(null===(QF=process.release)||void 0===QF?void 0:QF.name),rU=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,"@opentelemetry/instrumentation-fetch",eU,t)||this;return n.component="fetch",n.version=eU,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return tU(t,e),t.prototype.init=function(){},t.prototype._addChildSpan=function(e,t){var n=this.tracer.startSpan("CORS Preflight",{startTime:t[PF.FETCH_START]},Om.setSpan(mm.active(),e));VF(n,t,this.getConfig().ignoreNetworkEvents),n.end(t[PF.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(e,t){var n=HF(t.url);e.setAttribute(kI,t.status),null!=t.statusText&&e.setAttribute(MF.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(OI,n.host),e.setAttribute(PI,n.protocol.replace(":","")),"undefined"!=typeof navigator&&e.setAttribute(MI,navigator.userAgent)},t.prototype._addHeaders=function(e,t){if(!function(e,t){var n=t||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),HF(e).origin===BF()||n.some((function(t){return JI(e,t)}))}(t,this.getConfig().propagateTraceHeaderCorsUrls)){var n={};return Nm.inject(mm.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(e instanceof Request)Nm.inject(mm.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else if(e.headers instanceof Headers)Nm.inject(mm.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else if(e.headers instanceof Map)Nm.inject(mm.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else{n={};Nm.inject(mm.active(),n),e.headers=Object.assign({},n,e.headers||{})}},t.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(e,t){var n;if(void 0===t&&(t={}),!eF(e,this.getConfig().ignoreUrls)){var r=(t.method||"GET").toUpperCase();return this.tracer.startSpan("HTTP "+r,{kind:nm.CLIENT,attributes:(n={},n[MF.COMPONENT]=this.moduleName,n[NI]=r,n[RI]=e,n)})}this._diag.debug("ignoring span as url matches ignored url")},t.prototype._findResourceAndAddNetworkEvents=function(e,t,n){var r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}var o=zF(t.spanUrl,t.startTime,n,r,this._usedResources,"fetch");if(o.mainRequest){var i=o.mainRequest;this._markResourceAsUsed(i);var a=o.corsPreFlightRequest;a&&(this._addChildSpan(e,a),this._markResourceAsUsed(a)),VF(e,i,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(e){this._usedResources.add(e)},t.prototype._endSpan=function(e,t,n){var r=this,o=UI(Date.now()),i=VI();this._addFinalSpanAttributes(e,n),setTimeout((function(){var n;null===(n=t.observer)||void 0===n||n.disconnect(),r._findResourceAndAddNetworkEvents(e,t,i),r._tasksCount--,r._clearResources(),e.end(o)}),300)},t.prototype._patchConstructor=function(){var e=this;return function(t){var n=e;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=this,i=HF(e[0]instanceof Request?e[0].url:String(e[0])).href,a=e[0]instanceof Request?e[0]:e[1]||{},s=n._createSpan(i,a);if(!s)return t.apply(this,e);var l=n._prepareSpanData(i);function c(e,t){n._applyAttributesAfterFetch(e,a,t),n._endSpan(e,l,{status:t.status||0,statusText:t.message,url:i})}function u(e,t){n._applyAttributesAfterFetch(e,a,t),n._endSpan(e,l,t.status>=200&&t.status<400?t:{status:t.status,statusText:t.statusText,url:i})}function d(e,t,n){try{var r=n.clone(),o=n.clone(),i=r.body;if(i){var a=i.getReader(),s=function(){a.read().then((function(t){t.done?u(e,o):s()}),(function(t){c(e,t)}))};s()}else u(e,n)}finally{t(n)}}function p(e,t,n){try{c(e,n)}finally{t(n)}}return n.getConfig().measureRequestSize&&YF.apply(void 0,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e),!1)).then((function(e){e&&s.setAttribute(jI,e)})).catch((function(e){n._diag.warn("getFetchBodyLength",e)})),new Promise((function(e,r){return mm.with(Om.setSpan(mm.active(),s),(function(){return n._addHeaders(a,i),n._tasksCount++,t.apply(o,a instanceof Request?[a]:[i,a]).then(d.bind(o,s,e),p.bind(o,s,r))}))}))}}},t.prototype._applyAttributesAfterFetch=function(e,t,n){var r=this,o=this.getConfig().applyCustomAttributesOnSpan;o&&function(e,t){var n,r;try{r=e()}catch(JSe){n=JSe}finally{return t(n,r),r}}((function(){return o(e,t,n)}),(function(e){e&&r._diag.error("applyCustomAttributesOnSpan",e)}))},t.prototype._prepareSpanData=function(e){var t=VI(),n=[];if("function"!=typeof PerformanceObserver)return{entries:n,startTime:t,spanUrl:e};var r=new PerformanceObserver((function(t){t.getEntries().forEach((function(t){"fetch"===t.initiatorType&&t.name===e&&n.push(t)}))}));return r.observe({entryTypes:["resource"]}),{entries:n,observer:r,startTime:t,spanUrl:e}},t.prototype.enable=function(){nU?this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()"):(function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}(fetch)&&(this._unwrap(CI,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(CI,"fetch",this._patchConstructor()))},t.prototype.disable=function(){nU||(this._unwrap(CI,"fetch"),this._usedResources=new WeakSet)},t}(FF);!function(e){e.EVENT_TYPE="event_type",e.TARGET_ELEMENT="target_element",e.TARGET_XPATH="target_xpath",e.HTTP_URL="http.url"}(JF||(JF={}));var oU="0.44.1",iU=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aU=["click"];function sU(){return!1}var lU=function(e){function t(t){var n;void 0===t&&(t={});var r=e.call(this,"@opentelemetry/instrumentation-user-interaction",oU,t)||this;return r.version=oU,r.moduleName="user-interaction",r._spansData=new WeakMap,r._wrappedListeners=new WeakMap,r._eventsSpanMap=new WeakMap,r._eventNames=new Set(null!==(n=null==t?void 0:t.eventNames)&&void 0!==n?n:aU),r._shouldPreventSpanCreation="function"==typeof(null==t?void 0:t.shouldPreventSpanCreation)?t.shouldPreventSpanCreation:sU,r}return iU(t,e),t.prototype.init=function(){},t.prototype._checkForTimeout=function(e,t){var n=this._spansData.get(t);n&&("setTimeout"===e.source?n.hrTimeLastTimeout=VI():"Promise.then"!==e.source&&"setTimeout"!==e.source&&(n.hrTimeLastTimeout=void 0))},t.prototype._allowEventName=function(e){return this._eventNames.has(e)},t.prototype._createSpan=function(e,t,n){var r;if(e instanceof HTMLElement&&e.getAttribute&&!e.hasAttribute("disabled")&&this._allowEventName(t)){var o=Xj(e,!0);try{var i=this.tracer.startSpan(t,{attributes:(r={},r[JF.EVENT_TYPE]=t,r[JF.TARGET_ELEMENT]=e.tagName,r[JF.TARGET_XPATH]=o,r[JF.HTTP_URL]=window.location.href,r)},n?Om.setSpan(mm.active(),n):void 0);if(!0===this._shouldPreventSpanCreation(t,e,i))return;return this._spansData.set(i,{taskCount:0}),i}catch(JSe){this._diag.error("failed to start create new user interaction span",JSe)}}},t.prototype._decrementTask=function(e){var t=this._spansData.get(e);t&&(t.taskCount--,0===t.taskCount&&this._tryToEndSpan(e,t.hrTimeLastTimeout))},t.prototype._getCurrentSpan=function(e){var t=e.get("OT_ZONE_CONTEXT");return t?Om.getSpan(t):t},t.prototype._incrementTask=function(e){var t=this._spansData.get(e);t&&t.taskCount++},t.prototype.addPatchedListener=function(e,t,n,r){var o=this._wrappedListeners.get(n);o||this._wrappedListeners.set(n,o=new Map);var i=o.get(t);return i||o.set(t,i=new Map),!i.has(e)&&(i.set(e,r),!0)},t.prototype.removePatchedListener=function(e,t,n){var r=this._wrappedListeners.get(n);if(r){var o=r.get(t);if(o){var i=o.get(e);return i&&(o.delete(e),0===o.size&&(r.delete(t),0===r.size&&this._wrappedListeners.delete(n))),i}}},t.prototype._invokeListener=function(e,t,n){return"function"==typeof e?e.apply(t,n):e.handleEvent(n[0])},t.prototype._patchAddEventListener=function(){var e=this;return function(t){return function(n,r,o){if(!r)return t.call(this,n,r,o);var i=o&&"object"==typeof o&&o.once,a=function(){for(var t,o=this,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=a[0],c=null==l?void 0:l.target;l&&(t=e._eventsSpanMap.get(l)),i&&e.removePatchedListener(this,n,r);var u=e._createSpan(c,n,t);return u?(l&&e._eventsSpanMap.set(l,u),mm.with(Om.setSpan(mm.active(),u),(function(){var t=e._invokeListener(r,o,a);return u.end(),t}))):e._invokeListener(r,this,a)};return e.addPatchedListener(this,n,r,a)?t.call(this,n,a,o):void 0}}},t.prototype._patchRemoveEventListener=function(){var e=this;return function(t){return function(n,r,o){var i=e.removePatchedListener(this,n,r);return t.call(this,n,i||r,o)}}},t.prototype._getPatchableEventTargets=function(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]},t.prototype._patchHistoryApi=function(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())},t.prototype._patchHistoryMethod=function(){var e=this;return function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=""+location.pathname+location.hash+location.search,i=t.apply(this,n),a=""+location.pathname+location.hash+location.search;return o!==a&&e._updateInteractionName(a),i}}},t.prototype._unpatchHistoryApi=function(){vF(history.replaceState)&&this._unwrap(history,"replaceState"),vF(history.pushState)&&this._unwrap(history,"pushState"),vF(history.back)&&this._unwrap(history,"back"),vF(history.forward)&&this._unwrap(history,"forward"),vF(history.go)&&this._unwrap(history,"go")},t.prototype._updateInteractionName=function(e){var t=Om.getSpan(mm.active());t&&"function"==typeof t.updateName&&t.updateName("Navigation: "+e)},t.prototype._patchZoneCancelTask=function(){var e=this;return function(t){return function(n){var r=Zone.current,o=e._getCurrentSpan(r);return o&&e._shouldCountTask(n,r)&&e._decrementTask(o),t.call(this,n)}}},t.prototype._patchZoneScheduleTask=function(){var e=this;return function(t){return function(n){var r=Zone.current,o=e._getCurrentSpan(r);return o&&e._shouldCountTask(n,r)&&(e._incrementTask(o),e._checkForTimeout(n,o)),t.call(this,n)}}},t.prototype._patchZoneRunTask=function(){var e=this;return function(t){return function(n,r,o){var i,a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,s=null==a?void 0:a.target,l=this;if(s){if(i=e._createSpan(s,n.eventName))return e._incrementTask(i),l.run((function(){try{return mm.with(Om.setSpan(mm.active(),i),(function(){var e=Zone.current;return n._zone=e,t.call(e,n,r,o)}))}finally{e._decrementTask(i)}}))}else i=e._getCurrentSpan(l);try{return t.call(l,n,r,o)}finally{i&&e._shouldCountTask(n,l)&&e._decrementTask(i)}}}},t.prototype._shouldCountTask=function(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;var n=this._getCurrentSpan(t);return!!n&&(!!this._spansData.get(n)&&("macroTask"===e.type||"microTask"===e.type))},t.prototype._tryToEndSpan=function(e,t){e&&(this._spansData.get(e)&&(e.end(t),this._spansData.delete(e)))},t.prototype.enable=function(){var e=this,t=this._getZoneWithPrototype();(this._diag.debug("applying patch to",this.moduleName,this.version,"zone:",!!t),t)?(vF(t.prototype.runTask)&&(this._unwrap(t.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),vF(t.prototype.scheduleTask)&&(this._unwrap(t.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),vF(t.prototype.cancelTask)&&(this._unwrap(t.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(t.prototype,"runTask",this._patchZoneRunTask()),this._wrap(t.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(t.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach((function(t){vF(t.addEventListener)&&(e._unwrap(t,"addEventListener"),e._diag.debug("removing previous patch from method addEventListener")),vF(t.removeEventListener)&&(e._unwrap(t,"removeEventListener"),e._diag.debug("removing previous patch from method removeEventListener")),e._wrap(t,"addEventListener",e._patchAddEventListener()),e._wrap(t,"removeEventListener",e._patchRemoveEventListener())})));this._patchHistoryApi()},t.prototype.disable=function(){var e=this,t=this._getZoneWithPrototype();(this._diag.debug("removing patch from",this.moduleName,this.version,"zone:",!!t),t&&this._zonePatched)?(vF(t.prototype.runTask)&&this._unwrap(t.prototype,"runTask"),vF(t.prototype.scheduleTask)&&this._unwrap(t.prototype,"scheduleTask"),vF(t.prototype.cancelTask)&&this._unwrap(t.prototype,"cancelTask")):this._getPatchableEventTargets().forEach((function(t){vF(t.addEventListener)&&e._unwrap(t,"addEventListener"),vF(t.removeEventListener)&&e._unwrap(t,"removeEventListener")}));this._unpatchHistoryApi()},t.prototype._getZoneWithPrototype=function(){return window.Zone},t}(mF),cU=function(){function e(){}return e.prototype.emit=function(e){},e}(),uU=new cU,dU=new(function(){function e(){}return e.prototype.getLogger=function(e,t,n){return new cU},e}()),pU=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.emit=function(e){this._getLogger().emit(e)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):uU},e}(),fU=function(){function e(){}return e.prototype.getLogger=function(e,t,n){var r;return null!==(r=this.getDelegateLogger(e,t,n))&&void 0!==r?r:new pU(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:dU},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateLogger=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getLogger(e,t,n)},e}(),hU="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},mU=Symbol.for("io.opentelemetry.js.api.logs"),gU=hU;var vU,yU,bU,xU=function(){function e(){this._proxyLoggerProvider=new fU}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(e){return gU[mU]?this.getLoggerProvider():(gU[mU]=(t=1,n=e,r=dU,function(e){return e===t?n:r}),this._proxyLoggerProvider.setDelegate(e),e);var t,n,r},e.prototype.getLoggerProvider=function(){var e,t;return null!==(t=null===(e=gU[mU])||void 0===e?void 0:e.call(gU,1))&&void 0!==t?t:this._proxyLoggerProvider},e.prototype.getLogger=function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)},e.prototype.disable=function(){delete gU[mU],this._proxyLoggerProvider=new fU},e}().getInstance(),wU=function(){return wU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},wU.apply(this,arguments)},_U=function(){function e(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this._config={},this._wrap=Gm.wrap,this._unwrap=Gm.unwrap,this._massWrap=Gm.massWrap,this._massUnwrap=Gm.massUnwrap,this.setConfig(n),this._diag=gm.createComponentLogger({namespace:e}),this._tracer=Om.getTracer(e,t),this._meter=bm.getMeter(e,t),this._logger=xU.getLogger(e,t),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var e,t=null!==(e=this.init())&&void 0!==e?e:[];return Array.isArray(t)?t:[t]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(e){this._config=wU({enabled:!0},e)},e.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(e,t,n,r){if(e)try{e(n,r)}catch(JSe){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},JSe)}},e}(),SU=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),EU=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o._config.enabled&&o.enable(),o}return SU(t,e),t}(_U);function TU(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}function CU(e,t){return t in e}function AU(e,t,n,r){var o=void 0,i=void 0;CU(n,t)&&"number"==typeof n[t]&&(o=n[t]);var a=vU.FETCH_START;if(CU(n,a)&&"number"==typeof n[a]&&(i=n[a]),void 0!==o&&void 0!==i&&o>=i)return e.addEvent(t,o),e}function NU(e,t,n){void 0===n&&(n=!1),n||(AU(e,vU.FETCH_START,t),AU(e,vU.DOMAIN_LOOKUP_START,t),AU(e,vU.DOMAIN_LOOKUP_END,t),AU(e,vU.CONNECT_START,t),CU(t,"name")&&t.name.startsWith("https:")&&AU(e,vU.SECURE_CONNECTION_START,t),AU(e,vU.CONNECT_END,t),AU(e,vU.REQUEST_START,t),AU(e,vU.RESPONSE_START,t),AU(e,vU.RESPONSE_END,t));var r=t[vU.ENCODED_BODY_SIZE];void 0!==r&&e.setAttribute(LI,r);var o=t[vU.DECODED_BODY_SIZE];void 0!==o&&r!==o&&e.setAttribute(DI,o)}function RU(){return"undefined"!=typeof location?location.origin:void 0}function OU(e,t,n,r,o,i){void 0===o&&(o=new WeakSet);var a=PU(e),s=function(e,t,n,r,o){var i=zI(t),a=zI(n),s=r.filter((function(t){var n=zI(BI(t[vU.FETCH_START])),r=zI(BI(t[vU.RESPONSE_END]));return"xmlhttprequest"===t.initiatorType.toLowerCase()&&t.name===e&&n>=i&&r<=a}));s.length>0&&(s=s.filter((function(e){return!o.has(e)})));return s}(e=a.toString(),t,n,r,o);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var l=function(e){return e.slice().sort((function(e,t){var n=e[vU.FETCH_START],r=t[vU.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==RU()&&l.length>1){var c=l[0],u=function(e,t,n){for(var r,o=zI(n),i=zI(BI(t)),a=e[1],s=e.length,l=1;l<s;l++){var c=e[l],u=zI(BI(c[vU.FETCH_START])),d=o-zI(BI(c[vU.RESPONSE_END]));u>=i&&(!r||d<r)&&(r=d,a=c)}return a}(l,c[vU.RESPONSE_END],n);return u[vU.FETCH_START]<c[vU.RESPONSE_END]&&(u=c,c=void 0),{corsPreFlightRequest:c,mainRequest:u}}return{mainRequest:s[0]}}function PU(e){if("function"==typeof URL)return new URL(e,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var t=(yU||(yU=document.createElement("a")),yU);return t.href=e,t}!function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"}(vU||(vU={})),function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"}(bU||(bU={}));var kU=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},MU=gm.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function jU(e){return"undefined"!=typeof Document&&e instanceof Document?(new XMLSerializer).serializeToString(document).length:e instanceof Blob?e.size:void 0!==e.byteLength?e.byteLength:e instanceof FormData?function(e){var t,n,r=0;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e.entries()),i=o.next();!i.done;i=o.next()){var a=kU(i.value,2),s=a[1];r+=a[0].length,s instanceof Blob?r+=s.size:r+=s.length}}catch(l){t={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(e):e instanceof URLSearchParams?DU(e.toString()):"string"==typeof e?DU(e):void MU.warn("unknown body type")}var LU=new TextEncoder;function DU(e){return LU.encode(e).byteLength}var IU,FU="0.57.2";!function(e){e.HTTP_STATUS_TEXT="http.status_text"}(IU||(IU={}));var UU=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$U=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,"@opentelemetry/instrumentation-xml-http-request",FU,t)||this;return n.component="xml-http-request",n.version=FU,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return UU(t,e),t.prototype.init=function(){},t.prototype._addHeaders=function(e,t){if(!function(e,t){var n=t||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),PU(e).origin===RU()||n.some((function(t){return JI(e,t)}))}(PU(t).href,this.getConfig().propagateTraceHeaderCorsUrls)){var n={};return Nm.inject(mm.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}var r={};Nm.inject(mm.active(),r),Object.keys(r).forEach((function(t){e.setRequestHeader(t,String(r[t]))}))},t.prototype._addChildSpan=function(e,t){var n=this;mm.with(Om.setSpan(mm.active(),e),(function(){var e=n.tracer.startSpan("CORS Preflight",{startTime:t[vU.FETCH_START]});NU(e,t,n.getConfig().ignoreNetworkEvents),e.end(t[vU.RESPONSE_END])}))},t.prototype._addFinalSpanAttributes=function(e,t,n){if("string"==typeof n){var r=PU(n);void 0!==t.status&&e.setAttribute(kI,t.status),void 0!==t.statusText&&e.setAttribute(IU.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(OI,r.host),e.setAttribute(PI,r.protocol.replace(":","")),e.setAttribute(MI,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(e,t){var n=this,r=this.getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&function(e,t){var n,r;try{r=e()}catch(JSe){n=JSe}finally{return t(n,r),r}}((function(){return r(e,t)}),(function(e){e&&n._diag.error("applyCustomAttributesOnSpan",e)}))},t.prototype._addResourceObserver=function(e,t){var n=this._xhrMem.get(e);n&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(n.createdResources={observer:new PerformanceObserver((function(e){var r=e.getEntries(),o=PU(t);r.forEach((function(e){"xmlhttprequest"===e.initiatorType&&e.name===o.href&&n.createdResources&&n.createdResources.entries.push(e)}))})),entries:[]},n.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(AI.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(e,t,n,r,o){if(n&&r&&o&&e.createdResources){var i=e.createdResources.entries;i&&i.length||(i=AI.getEntriesByType("resource"));var a=OU(PU(n).href,r,o,i,this._usedResources);if(a.mainRequest){var s=a.mainRequest;this._markResourceAsUsed(s);var l=a.corsPreFlightRequest;l&&(this._addChildSpan(t,l),this._markResourceAsUsed(l)),NU(t,s,this.getConfig().ignoreNetworkEvents)}}},t.prototype._cleanPreviousSpanInformation=function(e){var t=this._xhrMem.get(e);if(t){var n=t.callbackToRemoveEvents;n&&n(),this._xhrMem.delete(e)}},t.prototype._createSpan=function(e,t,n){var r;if(!eF(t,this.getConfig().ignoreUrls)){var o=n.toUpperCase(),i=this.tracer.startSpan(o,{kind:nm.CLIENT,attributes:(r={},r[NI]=n,r[RI]=PU(t).toString(),r)});return i.addEvent(bU.METHOD_OPEN),this._cleanPreviousSpanInformation(e),this._xhrMem.set(e,{span:i,spanUrl:t}),i}this._diag.debug("ignoring span as url matches ignored url")},t.prototype._markResourceAsUsed=function(e){this._usedResources.add(e)},t.prototype._patchOpen=function(){var e=this;return function(t){var n=e;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n._createSpan(this,e[1],e[0]),t.apply(this,e)}}},t.prototype._patchSend=function(){var e=this;function t(t,n){var r=e._xhrMem.get(n);if(r){r.status=n.status,r.statusText=n.statusText,e._xhrMem.delete(n),r.span&&e._applyAttributesAfterXHR(r.span,n);var o=VI(),i=Date.now();setTimeout((function(){!function(t,n,r,o){var i=n.callbackToRemoveEvents;"function"==typeof i&&i();var a=n.span,s=n.spanUrl;a&&(e._findResourceAndAddNetworkEvents(n,a,s,n.sendStartTime,r),a.addEvent(t,o),e._addFinalSpanAttributes(a,n,s),a.end(o),e._tasksCount--),e._clearResources()}(t,r,o,i)}),300)}}function n(){t(bU.EVENT_ERROR,this)}function r(){t(bU.EVENT_ABORT,this)}function o(){t(bU.EVENT_TIMEOUT,this)}function i(){t(this.status<299?bU.EVENT_LOAD:bU.EVENT_ERROR,this)}return function(t){return function(){for(var a=this,s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c=e._xhrMem.get(this);if(!c)return t.apply(this,s);var u=c.span,d=c.spanUrl;if(u&&d){if(e.getConfig().measureRequestSize&&(null==s?void 0:s[0])){var p=jU(s[0]);void 0!==p&&u.setAttribute(jI,p)}mm.with(Om.setSpan(mm.active(),u),(function(){e._tasksCount++,c.sendStartTime=VI(),u.addEvent(bU.METHOD_SEND),a.addEventListener("abort",r),a.addEventListener("error",n),a.addEventListener("load",i),a.addEventListener("timeout",o),c.callbackToRemoveEvents=function(){!function(t){t.removeEventListener("abort",r),t.removeEventListener("error",n),t.removeEventListener("load",i),t.removeEventListener("timeout",o);var a=e._xhrMem.get(t);a&&(a.callbackToRemoveEvents=void 0)}(a),c.createdResources&&c.createdResources.observer.disconnect()},e._addHeaders(a,d),e._addResourceObserver(a,d)}))}return t.apply(this,s)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),TU(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),TU(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},t.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},t}(EU),VU={"@opentelemetry/instrumentation-document-load":_F,"@opentelemetry/instrumentation-fetch":rU,"@opentelemetry/instrumentation-user-interaction":lU,"@opentelemetry/instrumentation-xml-http-request":$U};function BU(e){var t;void 0===e&&(e={});for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.prototype.hasOwnProperty.call(VU,o)||gm.error('Provided instrumentation name "'+o+'" not found')}for(var i=[],a=0,s=Object.keys(VU);a<s.length;a++){var l=s[a],c=VU[l],u=null!==(t=e[l])&&void 0!==t?t:{};if(!1!==u.enabled)try{gm.debug("Loading instrumentation for "+l),i.push(new c(u))}catch(JSe){gm.error(JSe)}else gm.debug("Disabling instrumentation for "+l)}return i}var zU=(e=>(e.ReactComponent="React Component",e.Iframe="Iframe",e.MagicLink="Magic Link",e))(zU||{});let HU=!1;const qU=[/.*launchdarkly\.com.*/i,/.*\/api\/telemetry.*/i,new RegExp(`^(?!${Se.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}/).*`)],GU={ignoreNetworkEvents:!0,propagateTraceHeaderCorsUrls:[new RegExp(Se)],ignoreUrls:qU},KU=({tenantExternalId:e,partnerId:t,configCallbacks:r,clientEntryPoint:o=zU.ReactComponent,debug:i})=>{const a=(()=>{const{ldClient:e}=n.useContext(al.reactContext);return e})(),s=a?.variation("show-fe-honeycomb-logs",!1);if(HU||!s)return null;try{Nm.setGlobalPropagator(new QI);const n=new Df.HoneycombWebSDK({tracesEndpoint:`${Se}/telemetry`,serviceName:"sdk-client",debug:i,skipOptionsValidation:!0,instrumentations:[BU({"@opentelemetry/instrumentation-xml-http-request":{...GU,ignoreUrls:qU},"@opentelemetry/instrumentation-fetch":{...GU,ignoreUrls:qU},"@opentelemetry/instrumentation-document-load":{enabled:!1},"@opentelemetry/instrumentation-user-interaction":{enabled:!1}})],resourceAttributes:{"tenant.externalId":e,"partner.id":t,"reach.client":o,"reach.configCallbacks":r}});n.start(),HU=!0,window.addEventListener("beforeunload",(()=>{n.shutdown().catch((e=>{}))}))}catch(JSe){return null}return null};function WU(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function YU(...e){return t=>{let n=!1;const r=e.map((e=>{const r=WU(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():WU(e[t],null)}}}}function XU(...e){return i.useCallback(YU(...e),e)}var ZU=i.forwardRef(((e,n)=>{const{children:r,...o}=e,a=i.Children.toArray(r),s=a.find(e$);if(s){const e=s.props.children,r=a.map((t=>t===s?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(QU,{...o,ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,r):null})}return t.jsx(QU,{...o,ref:n,children:r})}));ZU.displayName="Slot";var QU=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?YU(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));QU.displayName="SlotClone";var JU=({children:e})=>t.jsx(t.Fragment,{children:e});function e$(e){return i.isValidElement(e)&&e.type===JU}var t$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,n)=>{const r=i.forwardRef(((e,r)=>{const{asChild:o,...i}=e,a=o?ZU:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(a,{...i,ref:r})}));return r.displayName=`Primitive.${n}`,{...e,[n]:r}}),{}),n$=i.forwardRef(((e,n)=>t.jsx(t$.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));function r$(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function o$(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i$(...e){return t=>{let n=!1;const r=e.map((e=>{const r=o$(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():o$(e[t],null)}}}}function a$(...e){return i.useCallback(i$(...e),e)}function s$(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return i.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}n$.displayName="VisuallyHidden";var l$=globalThis?.document?i.useLayoutEffect:()=>{},c$=i[" useId ".trim().toString()]||(()=>{}),u$=0;function d$(e){const[t,n]=i.useState(c$());return l$((()=>{n((e=>e??String(u$++)))}),[e]),e||(t?`radix-${t}`:"")}function p$(e){const t=i.useRef(e);return i.useEffect((()=>{t.current=e})),i.useMemo((()=>(...e)=>t.current?.(...e)),[])}function f$({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=function({defaultProp:e,onChange:t}){const n=i.useState(e),[r]=n,o=i.useRef(r),a=p$(t);return i.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}({defaultProp:t,onChange:n}),a=void 0!==e,s=a?e:r,l=p$(n);return[s,i.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function h$(e){const n=m$(e),r=i.forwardRef(((e,r)=>{const{children:o,...a}=e,s=i.Children.toArray(o),l=s.find(v$);if(l){const e=l.props.children,o=s.map((t=>t===l?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(n,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})}));return r.displayName=`${e}.Slot`,r}function m$(e){const t=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?i$(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var g$=Symbol("radix.slottable");function v$(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===g$}var y$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,n)=>{const r=h$(`Primitive.${n}`),o=i.forwardRef(((e,o)=>{const{asChild:i,...a}=e,s=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...a,ref:o})}));return o.displayName=`Primitive.${n}`,{...e,[n]:o}}),{});var b$,x$="dismissableLayer.update",w$="dismissableLayer.pointerDownOutside",_$="dismissableLayer.focusOutside",S$=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),E$=i.forwardRef(((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=i.useContext(S$),[p,f]=i.useState(null),h=p?.ownerDocument??globalThis?.document,[,m]=i.useState({}),g=a$(n,(e=>f(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=p?v.indexOf(p):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,_=x>=b,S=function(e,t=globalThis?.document){const n=p$(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){C$(w$,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));_&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())}),h),E=function(e,t=globalThis?.document){const n=p$(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){C$(_$,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),h);return function(e,t=globalThis?.document){const n=p$(e);i.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{x===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),i.useEffect((()=>{if(p)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(b$=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),T$(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=b$)}}),[p,h,r,d]),i.useEffect((()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),T$())}),[p,d]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(x$,e),()=>document.removeEventListener(x$,e)}),[]),t.jsx(y$.div,{...u,ref:g,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:r$(e.onFocusCapture,E.onFocusCapture),onBlurCapture:r$(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:r$(e.onPointerDownCapture,S.onPointerDownCapture)})}));E$.displayName="DismissableLayer";function T$(){const e=new CustomEvent(x$);document.dispatchEvent(e)}function C$(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&a.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}i.forwardRef(((e,n)=>{const r=i.useContext(S$),o=i.useRef(null),a=a$(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.jsx(y$.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var A$="focusScope.autoFocusOnMount",N$="focusScope.autoFocusOnUnmount",R$={bubbles:!1,cancelable:!0},O$=i.forwardRef(((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[c,u]=i.useState(null),d=p$(a),p=p$(s),f=i.useRef(null),h=a$(n,(e=>u(e))),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect((()=>{if(o){let e=function(e){if(m.paused||!c)return;const t=e.target;c.contains(t)?f.current=t:j$(f.current,{select:!0})},t=function(e){if(m.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||j$(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&j$(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,c,m.paused]),i.useEffect((()=>{if(c){L$.add(m);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(A$,R$);c.addEventListener(A$,d),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(j$(r,{select:t}),document.activeElement!==n)return}((e=P$(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&j$(c))}return()=>{c.removeEventListener(A$,d),setTimeout((()=>{const e=new CustomEvent(N$,R$);c.addEventListener(N$,p),c.dispatchEvent(e),e.defaultPrevented||j$(t??document.body,{select:!0}),c.removeEventListener(N$,p),L$.remove(m)}),0)}}var e}),[c,d,p,m]);const g=i.useCallback((e=>{if(!r&&!o)return;if(m.paused)return;const t=document.activeElement;if("Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&t){const n=e.currentTarget,[o,i]=function(e){const t=P$(e),n=k$(t,e),r=k$(t.reverse(),e);return[n,r]}(n);o&&i?e.shiftKey||t!==i?e.shiftKey&&t===o&&(e.preventDefault(),r&&j$(i,{select:!0})):(e.preventDefault(),r&&j$(o,{select:!0})):t===n&&e.preventDefault()}}),[r,o,m.paused]);return t.jsx(y$.div,{tabIndex:-1,...l,ref:h,onKeyDown:g})}));function P$(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}function k$(e,t){for(const n of e)if(!M$(n,{upTo:t}))return n}function M$(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function j$(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}O$.displayName="FocusScope";var L$=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=D$(e,t),e.unshift(t)},remove(t){e=D$(e,t),e[0]?.resume()}}}();function D$(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var I$=i.forwardRef(((e,n)=>{const{container:o,...a}=e,[s,l]=i.useState(!1);l$((()=>l(!0)),[]);const c=o||s&&globalThis?.document?.body;return c?r.createPortal(t.jsx(y$.div,{...a,ref:n}),c):null}));I$.displayName="Portal";var F$=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return i.useReducer(((e,n)=>t[e][n]??e),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect((()=>{const e=U$(r.current);a.current="mounted"===l?e:"none"}),[l]),l$((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=U$(t);if(e)c("MOUNT");else if("none"===i||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,c]),l$((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=i=>{const a=U$(r.current).includes(i.animationName);if(i.target===t&&a&&(c("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(a.current=U$(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):i.Children.only(n),a=a$(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?i.cloneElement(o,{ref:a}):null};function U$(e){return e?.animationName||"none"}F$.displayName="Presence";var $$=0;function V$(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var B$=function(){return B$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},B$.apply(this,arguments)};function z$(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var H$="right-scroll-bar-position",q$="width-before-scroll-bar";function G$(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var K$="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,W$=new WeakMap;function Y$(e,t){var r=function(e,t){var r=n.useState((function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}}))[0];return r.callback=t,r.facade}(null,(function(t){return e.forEach((function(e){return G$(e,t)}))}));return K$((function(){var t=W$.get(r);if(t){var n=new Set(t),o=new Set(e),i=r.current;n.forEach((function(e){o.has(e)||G$(e,null)})),o.forEach((function(e){n.has(e)||G$(e,i)}))}W$.set(r,e)}),[e]),r}function X$(e){return e}var Z$=function(e){var t=e.sideCar,n=z$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,B$({},n))};Z$.isSideCarExport=!0;var Q$=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=X$);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=B$({async:!0,ssr:!1},e),t}(),J$=function(){},eV=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:J$,onWheelCapture:J$,onTouchMoveCapture:J$}),o=r[0],a=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,f=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=e.gapMode,x=z$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,_=Y$([n,t]),S=B$(B$({},x),o);return i.createElement(i.Fragment,null,d&&i.createElement(w,{sideCar:Q$,removeScrollBar:u,shards:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),s?i.cloneElement(i.Children.only(l),B$(B$({},S),{ref:_})):i.createElement(y,B$({},S,{className:c,ref:_}),l))}));eV.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},eV.classNames={fullWidth:q$,zeroRight:H$};function tV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var nV=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=tV())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},rV=function(){var e,t=(e=nV(),function(t,n){i.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){return t(e.styles,e.dynamic),null}},oV={left:0,top:0,right:0,gap:0},iV=function(e){return parseInt(e||"",10)||0},aV=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return oV;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[iV(t["padding"===e?"paddingLeft":"marginLeft"]),iV(n),iV(r)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},sV=rV(),lV="data-scroll-locked",cV=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(lV,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(H$," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(q$," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(H$," .").concat(H$," {\n right: 0 ").concat(r,";\n }\n \n .").concat(q$," .").concat(q$," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(lV,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},uV=function(){var e=parseInt(document.body.getAttribute(lV)||"0",10);return isFinite(e)?e:0},dV=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;i.useEffect((function(){return document.body.setAttribute(lV,(uV()+1).toString()),function(){var e=uV()-1;e<=0?document.body.removeAttribute(lV):document.body.setAttribute(lV,e.toString())}}),[]);var a=i.useMemo((function(){return aV(o)}),[o]);return i.createElement(sV,{styles:cV(a,!t,o,n?"":"!important")})},pV=!1;if("undefined"!=typeof window)try{var fV=Object.defineProperty({},"passive",{get:function(){return pV=!0,!0}});window.addEventListener("test",fV,fV),window.removeEventListener("test",fV,fV)}catch(eEe){pV=!1}var hV=!!pV&&{passive:!1},mV=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},gV=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),vV(e,r)){var o=yV(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vV=function(e,t){return"v"===e?function(e){return mV(e,"overflowY")}(t):function(e){return mV(e,"overflowX")}(t)},yV=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},bV=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xV=function(e){return[e.deltaX,e.deltaY]},wV=function(e){return e&&"current"in e?e.current:e},_V=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},SV=0,EV=[];function TV(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const CV=(AV=function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(SV++)[0],a=i.useState(rV)[0],s=i.useRef(e);i.useEffect((function(){s.current=e}),[e]),i.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(wV),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var o,i=bV(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=gV(d,u);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=gV(d,u)),!p)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var f=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,s=t.contains(a),l=!1,c=i>0,u=0,d=0;do{var p=yV(e,a),f=p[0],h=p[1]-p[2]-o*f;(f||h)&&vV(e,a)&&(u+=h,d+=f),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(f,t,e,"h"===f?l:c)}),[]),c=i.useCallback((function(e){var n=e;if(EV.length&&EV[EV.length-1]===a){var r="deltaY"in n?xV(n):bV(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta)[0]===(o=r)[0]&&t[1]===o[1];var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(s.current.shards||[]).map(wV).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=i.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:TV(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=i.useCallback((function(e){n.current=bV(e),r.current=void 0}),[]),p=i.useCallback((function(t){u(t.type,xV(t),t.target,l(t,e.lockRef.current))}),[]),f=i.useCallback((function(t){u(t.type,bV(t),t.target,l(t,e.lockRef.current))}),[]);i.useEffect((function(){return EV.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,hV),document.addEventListener("touchmove",c,hV),document.addEventListener("touchstart",d,hV),function(){EV=EV.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,hV),document.removeEventListener("touchmove",c,hV),document.removeEventListener("touchstart",d,hV)}}),[]);var h=e.removeScrollBar;return i.createElement(i.Fragment,null,e.inert?i.createElement(a,{styles:_V(o)}):null,h?i.createElement(dV,{gapMode:e.gapMode}):null)},Q$.useMedium(AV),Z$);var AV,NV=i.forwardRef((function(e,t){return i.createElement(eV,B$({},e,{ref:t,sideCar:CV}))}));NV.classNames=eV.classNames;var RV=new WeakMap,OV=new WeakMap,PV={},kV=0,MV=function(e){return e&&(e.host||MV(e.parentNode))},jV=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=MV(t);return n&&e.contains(n)?n:null})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);PV[n]||(PV[n]=new WeakMap);var i=PV[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(RV.get(e)||0)+1,c=(i.get(e)||0)+1;RV.set(e,l),i.set(e,c),a.push(e),1===l&&o&&OV.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(JSe){}}))};return u(t),s.clear(),kV++,function(){a.forEach((function(e){var t=RV.get(e)-1,o=i.get(e)-1;RV.set(e,t),i.set(e,o),t||(OV.has(e)||e.removeAttribute(r),OV.delete(e)),o||e.removeAttribute(n)})),--kV||(RV=new WeakMap,RV=new WeakMap,OV=new WeakMap,PV={})}},LV=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),jV(r,o,n,"aria-hidden")):function(){return null}},DV="Dialog",[IV,FV]=function(e,n=[]){let r=[];const o=()=>{const t=r.map((e=>i.createContext(e)));return function(n){const r=n?.[e]||t;return i.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(n,o){const a=i.createContext(o),s=r.length;r=[...r,o];const l=n=>{const{scope:r,children:o,...l}=n,c=r?.[e]?.[s]||a,u=i.useMemo((()=>l),Object.values(l));return t.jsx(c.Provider,{value:u,children:o})};return l.displayName=n+"Provider",[l,function(t,r){const l=i.useContext(r?.[e]?.[s]||a);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},s$(o,...n)]}(DV),[UV,$V]=IV(DV),VV=e=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,c=i.useRef(null),u=i.useRef(null),[d=!1,p]=f$({prop:o,defaultProp:a,onChange:s});return t.jsx(UV,{scope:n,triggerRef:c,contentRef:u,contentId:d$(),titleId:d$(),descriptionId:d$(),open:d,onOpenChange:p,onOpenToggle:i.useCallback((()=>p((e=>!e))),[p]),modal:l,children:r})};VV.displayName=DV;var BV="DialogTrigger";i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=$V(BV,r),a=a$(n,i.triggerRef);return t.jsx(y$.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":lB(i.open),...o,ref:a,onClick:r$(e.onClick,i.onOpenToggle)})})).displayName=BV;var zV="DialogPortal",[HV,qV]=IV(zV,{forceMount:void 0}),GV=e=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=e,s=$V(zV,n);return t.jsx(HV,{scope:n,forceMount:r,children:i.Children.map(o,(e=>t.jsx(F$,{present:r||s.open,children:t.jsx(I$,{asChild:!0,container:a,children:e})})))})};GV.displayName=zV;var KV="DialogOverlay",WV=i.forwardRef(((e,n)=>{const r=qV(KV,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,a=$V(KV,e.__scopeDialog);return a.modal?t.jsx(F$,{present:o||a.open,children:t.jsx(XV,{...i,ref:n})}):null}));WV.displayName=KV;var YV=h$("DialogOverlay.RemoveScroll"),XV=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=$V(KV,r);return t.jsx(NV,{as:YV,allowPinchZoom:!0,shards:[i.contentRef],children:t.jsx(y$.div,{"data-state":lB(i.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})})),ZV="DialogContent",QV=i.forwardRef(((e,n)=>{const r=qV(ZV,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,a=$V(ZV,e.__scopeDialog);return t.jsx(F$,{present:o||a.open,children:t.jsx(a.modal?JV:eB,{...i,ref:n})})}));QV.displayName=ZV;var JV=i.forwardRef(((e,n)=>{const r=$V(ZV,e.__scopeDialog),o=i.useRef(null),a=a$(n,r.contentRef,o);return i.useEffect((()=>{const e=o.current;if(e)return LV(e)}),[]),t.jsx(tB,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:r$(e.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:r$(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent;(2===t.button||0===t.button&&!0===t.ctrlKey)&&e.preventDefault()})),onFocusOutside:r$(e.onFocusOutside,(e=>e.preventDefault()))})})),eB=i.forwardRef(((e,n)=>{const r=$V(ZV,e.__scopeDialog),o=i.useRef(!1),a=i.useRef(!1);return t.jsx(tB,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const n=t.target,i=r.triggerRef.current?.contains(n);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),tB=i.forwardRef(((e,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=e,c=$V(ZV,r),u=i.useRef(null),d=a$(n,u);return i.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??V$()),document.body.insertAdjacentElement("beforeend",e[1]??V$()),$$++,()=>{1===$$&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),$$--}}),[]),t.jsxs(t.Fragment,{children:[t.jsx(O$,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:s,children:t.jsx(E$,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":lB(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),t.jsxs(t.Fragment,{children:[t.jsx(pB,{titleId:c.titleId}),t.jsx(fB,{contentRef:u,descriptionId:c.descriptionId})]})]})})),nB="DialogTitle",rB=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=$V(nB,r);return t.jsx(y$.h2,{id:i.titleId,...o,ref:n})}));rB.displayName=nB;var oB="DialogDescription",iB=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=$V(oB,r);return t.jsx(y$.p,{id:i.descriptionId,...o,ref:n})}));iB.displayName=oB;var aB="DialogClose",sB=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=$V(aB,r);return t.jsx(y$.button,{type:"button",...o,ref:n,onClick:r$(e.onClick,(()=>i.onOpenChange(!1)))})}));function lB(e){return e?"open":"closed"}sB.displayName=aB;var cB="DialogTitleWarning",[uB,dB]=function(e,n){const r=i.createContext(n),o=e=>{const{children:n,...o}=e,a=i.useMemo((()=>o),Object.values(o));return t.jsx(r.Provider,{value:a,children:n})};return o.displayName=e+"Provider",[o,function(t){const o=i.useContext(r);if(o)return o;if(void 0!==n)return n;throw new Error(`\`${t}\` must be used within \`${e}\``)}]}(cB,{contentName:ZV,titleName:nB,docsSlug:"dialog"}),pB=({titleId:e})=>{const t=dB(cB);return i.useEffect((()=>{if(e){document.getElementById(e)}}),[`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`,e]),null},fB=({contentRef:e,descriptionId:t})=>{const n=dB("DialogDescriptionWarning");return i.useEffect((()=>{const n=e.current?.getAttribute("aria-describedby");if(t&&n){document.getElementById(t)}}),[`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`,e,t]),null},hB=VV,mB=GV,gB=WV,vB=QV,yB=rB,bB=iB,xB=sB;function wB(...e){return Xd(eu(e))}const _B=hB,SB=({...e})=>t.jsx(mB,{children:t.jsx("div",{"data-reach-root":!0,children:e.children})}),EB=i.forwardRef((({className:e,...n},r)=>t.jsx(gB,{ref:r,className:wB("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n})));EB.displayName=gB.displayName;const TB=i.forwardRef((({className:e,children:n,hideCloseButton:r=!1,...o},i)=>t.jsxs(SB,{children:[t.jsx(EB,{}),t.jsxs(vB,{ref:i,className:wB("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),onInteractOutside:e=>{e.composedPath().some((e=>"classList"in e&&Array.from(e.classList).includes("pac-item")))&&e.preventDefault()},...o,children:[n,!r&&t.jsxs(xB,{className:"absolute right-6 top-6 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[t.jsx(rd,{className:"h-6 w-6"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));TB.displayName=vB.displayName;const CB=({className:e,...n})=>t.jsx("div",{className:wB("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});CB.displayName="DialogHeader";const AB=({className:e,...n})=>t.jsx("div",{className:wB("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});AB.displayName="DialogFooter";const NB=i.forwardRef((({className:e,...n},r)=>t.jsx(yB,{ref:r,className:wB("text-lg font-semibold leading-none tracking-tight text-foreground",e),...n})));NB.displayName=yB.displayName;const RB=i.forwardRef((({className:e,...n},r)=>t.jsx(bB,{ref:r,className:wB("text-sm text-muted-foreground",e),...n})));RB.displayName=bB.displayName;i.forwardRef((({className:e,children:n,...r},o)=>t.jsx(n$,{ref:o,className:wB(e),...r,children:n}))).displayName="DialogVisuallyHidden";const OB=n.createContext({});function PB(e){const t=n.useRef(null);return null===t.current&&(t.current=e()),t.current}const kB=n.createContext(null),MB=n.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class jB extends i.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=t.offsetParent,n=e instanceof HTMLElement&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function LB({children:e,isPresent:r,anchorX:o}){const a=n.useId(),s=n.useRef(null),l=n.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=n.useContext(MB);return n.useInsertionEffect((()=>{const{width:e,height:t,top:n,left:i,right:u}=l.current;if(r||!s.current||!e||!t)return;const d="left"===o?`left: ${i}`:`right: ${u}`;s.current.dataset.motionPopId=a;const p=document.createElement("style");return c&&(p.nonce=c),document.head.appendChild(p),p.sheet&&p.sheet.insertRule(`\n [data-motion-pop-id="${a}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${d}px !important;\n top: ${n}px !important;\n }\n `),()=>{document.head.removeChild(p)}}),[r]),t.jsx(jB,{isPresent:r,childRef:s,sizeRef:l,children:i.cloneElement(e,{ref:s})})}const DB=({children:e,initial:r,isPresent:o,onExitComplete:a,custom:s,presenceAffectsLayout:l,mode:c,anchorX:u})=>{const d=PB(IB),p=n.useId(),f=n.useCallback((e=>{d.set(e,!0);for(const t of d.values())if(!t)return;a&&a()}),[d,a]),h=n.useMemo((()=>({id:p,initial:r,isPresent:o,custom:s,onExitComplete:f,register:e=>(d.set(e,!1),()=>d.delete(e))})),l?[Math.random(),f]:[o,f]);return n.useMemo((()=>{d.forEach(((e,t)=>d.set(t,!1)))}),[o]),i.useEffect((()=>{!o&&!d.size&&a&&a()}),[o]),"popLayout"===c&&(e=t.jsx(LB,{isPresent:o,anchorX:u,children:e})),t.jsx(kB.Provider,{value:h,children:e})};function IB(){return new Map}function FB(e=!0){const t=n.useContext(kB);if(null===t)return[!0,null];const{isPresent:r,onExitComplete:o,register:i}=t,a=n.useId();n.useEffect((()=>{e&&i(a)}),[e]);const s=n.useCallback((()=>e&&o&&o(a)),[a,o,e]);return!r&&o?[!1,s]:[!0]}const UB=e=>e.key||"";function $B(e){const t=[];return n.Children.forEach(e,(e=>{n.isValidElement(e)&&t.push(e)})),t}const VB="undefined"!=typeof window,BB=VB?n.useLayoutEffect:n.useEffect,zB=({children:e,custom:r,initial:o=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:s="sync",propagate:l=!1,anchorX:c="left"})=>{const[u,d]=FB(l),p=n.useMemo((()=>$B(e)),[e]),f=l&&!u?[]:p.map(UB),h=n.useRef(!0),m=n.useRef(p),g=PB((()=>new Map)),[v,y]=n.useState(p),[b,x]=n.useState(p);BB((()=>{h.current=!1,m.current=p;for(let e=0;e<b.length;e++){const t=UB(b[e]);f.includes(t)?g.delete(t):!0!==g.get(t)&&g.set(t,!1)}}),[b,f.length,f.join("-")]);const w=[];if(p!==v){let e=[...p];for(let t=0;t<b.length;t++){const n=b[t],r=UB(n);f.includes(r)||(e.splice(t,0,n),w.push(n))}return"wait"===s&&w.length&&(e=w),x($B(e)),y(p),null}process;const{forceRender:_}=n.useContext(OB);return t.jsx(t.Fragment,{children:b.map((e=>{const n=UB(e),v=!(l&&!u)&&(p===b||f.includes(n));return t.jsx(DB,{isPresent:v,initial:!(h.current&&!o)&&void 0,custom:r,presenceAffectsLayout:a,mode:s,onExitComplete:v?void 0:()=>{if(!g.has(n))return;g.set(n,!0);let e=!0;g.forEach((t=>{t||(e=!1)})),e&&(null==_||_(),x(m.current),l&&(null==d||d()),i&&i())},anchorX:c,children:e},n)}))})},HB=e=>e;let qB=HB,GB=HB;function KB(e){let t;return()=>(void 0===t&&(t=e()),t)}"production"!==process.env.NODE_ENV&&(qB=(e,t)=>{},GB=(e,t)=>{if(!e)throw new Error(t)});const WB=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},YB=e=>1e3*e,XB=e=>e/1e3,ZB=!1,QB=["read","resolveKeyframes","update","preRender","render","postRender"],JB={value:null};function ez(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=QB.reduce(((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){a.has(t)&&(u.schedule(t),e()),l++,t(s)}const u={schedule:(e,t=!1,i=!1)=>{const s=i&&o?n:r;return t&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{s=e,o?i=!0:(o=!0,[n,r]=[r,n],n.forEach(c),t&&JB.value&&JB.value.frameloop[t].push(l),l=0,n.clear(),o=!1,i&&(i=!1,u.process(e)))}};return u}(i,t?n:void 0),e)),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))};return{schedule:QB.reduce(((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(f)),s.schedule(t,i,a)),t}),{}),cancel:e=>{for(let t=0;t<QB.length;t++)a[QB[t]].cancel(e)},state:o,steps:a}}const{schedule:tz,cancel:nz,state:rz,steps:oz}=ez("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:HB,!0),iz=n.createContext({strict:!1}),az={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},sz={};for(const nEe in az)sz[nEe]={isEnabled:e=>az[nEe].some((t=>!!e[t]))};const lz=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function cz(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lz.has(e)}let uz=e=>!cz(e);try{(dz=require("@emotion/is-prop-valid").default)&&(uz=e=>e.startsWith("on")?!cz(e):dz(e))}catch(tEe){}var dz;const pz=new Set;function fz(e,t,n){e||pz.has(t)||pz.add(t)}function hz(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>("production"!==process.env.NODE_ENV&&fz(!1,"motion() is deprecated. Use motion.create() instead."),e(...t))),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const mz=n.createContext({});function gz(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function vz(e){return"string"==typeof e||Array.isArray(e)}const yz=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bz=["initial",...yz];function xz(e){return gz(e.animate)||bz.some((t=>vz(e[t])))}function wz(e){return Boolean(xz(e)||e.variants)}function _z(e){const{initial:t,animate:r}=function(e,t){if(xz(e)){const{initial:t,animate:n}=e;return{initial:!1===t||vz(t)?t:void 0,animate:vz(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,n.useContext(mz));return n.useMemo((()=>({initial:t,animate:r})),[Sz(t),Sz(r)])}function Sz(e){return Array.isArray(e)?e.join(" "):e}const Ez=Symbol.for("motionComponentSymbol");function Tz(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Cz(e,t,r){return n.useCallback((n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&("function"==typeof r?r(n):Tz(r)&&(r.current=n))}),[t])}const Az=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Nz="data-"+Az("framerAppearId"),{schedule:Rz}=ez(queueMicrotask,!1),Oz=n.createContext({});function Pz(e,t,r,o,i){var a,s;const{visualElement:l}=n.useContext(mz),c=n.useContext(iz),u=n.useContext(kB),d=n.useContext(MB).reducedMotion,p=n.useRef(null);o=o||c.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:l,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const f=p.current,h=n.useContext(Oz);!f||f.projection||!i||"html"!==f.type&&"svg"!==f.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:kz(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&Tz(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(p.current,r,i,h);const m=n.useRef(!1);n.useInsertionEffect((()=>{f&&m.current&&f.update(r,u)}));const g=r[Nz],v=n.useRef(Boolean(g)&&!(null===(a=window.MotionHandoffIsComplete)||void 0===a?void 0:a.call(window,g))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,g)));return BB((()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Rz.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())})),n.useEffect((()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,g)})),v.current=!1))})),f}function kz(e){if(e)return!1!==e.options.allowProjection?e.projection:kz(e.parent)}function Mz({preloadedFeatures:e,createVisualElement:r,useRender:o,useVisualState:i,Component:a}){var s,l;function c(s,l){let c;const u={...n.useContext(MB),...s,layoutId:jz(s)},{isStatic:d}=u,p=_z(s),f=i(s,d);if(!d&&VB){!function(e,t){const r=n.useContext(iz).strict;if("production"!==process.env.NODE_ENV&&t&&r){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?qB(!1,t):GB(!1,t)}}(u,e);const t=function(e){const{drag:t,layout:n}=sz;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(u);c=t.MeasureLayout,p.visualElement=Pz(a,f,u,r,t.ProjectionNode)}return t.jsxs(mz.Provider,{value:p,children:[c&&p.visualElement?t.jsx(c,{visualElement:p.visualElement,...u}):null,o(a,s,Cz(f,p.visualElement,l),f,d,p.visualElement)]})}e&&function(e){for(const t in e)sz[t]={...sz[t],...e[t]}}(e),c.displayName=`motion.${"string"==typeof a?a:`create(${null!==(l=null!==(s=a.displayName)&&void 0!==s?s:a.name)&&void 0!==l?l:""})`}`;const u=n.forwardRef(c);return u[Ez]=a,u}function jz({layoutId:e}){const t=n.useContext(OB).id;return t&&void 0!==e?t+"-"+e:e}const Lz=e=>t=>"string"==typeof t&&t.startsWith(e),Dz=Lz("--"),Iz=Lz("var(--"),Fz=e=>!!Iz(e)&&Uz.test(e.split("/*")[0].trim()),Uz=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$z={};const Vz=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Bz=new Set(Vz);function zz(e,{layout:t,layoutId:n}){return Bz.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!$z[e]||"opacity"===e)}const Hz=e=>Boolean(e&&e.getVelocity),qz=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Gz=(e,t,n)=>n>t?t:n<e?e:n,Kz={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Wz={...Kz,transform:e=>Gz(0,1,e)},Yz={...Kz,default:1},Xz=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Zz=Xz("deg"),Qz=Xz("%"),Jz=Xz("px"),eH=Xz("vh"),tH=Xz("vw"),nH={...Qz,parse:e=>Qz.parse(e)/100,transform:e=>Qz.transform(100*e)},rH={borderWidth:Jz,borderTopWidth:Jz,borderRightWidth:Jz,borderBottomWidth:Jz,borderLeftWidth:Jz,borderRadius:Jz,radius:Jz,borderTopLeftRadius:Jz,borderTopRightRadius:Jz,borderBottomRightRadius:Jz,borderBottomLeftRadius:Jz,width:Jz,maxWidth:Jz,height:Jz,maxHeight:Jz,top:Jz,right:Jz,bottom:Jz,left:Jz,padding:Jz,paddingTop:Jz,paddingRight:Jz,paddingBottom:Jz,paddingLeft:Jz,margin:Jz,marginTop:Jz,marginRight:Jz,marginBottom:Jz,marginLeft:Jz,backgroundPositionX:Jz,backgroundPositionY:Jz},oH={rotate:Zz,rotateX:Zz,rotateY:Zz,rotateZ:Zz,scale:Yz,scaleX:Yz,scaleY:Yz,scaleZ:Yz,skew:Zz,skewX:Zz,skewY:Zz,distance:Jz,translateX:Jz,translateY:Jz,translateZ:Jz,x:Jz,y:Jz,z:Jz,perspective:Jz,transformPerspective:Jz,opacity:Wz,originX:nH,originY:nH,originZ:Jz},iH={...Kz,transform:Math.round},aH={...rH,...oH,zIndex:iH,size:Jz,fillOpacity:Wz,strokeOpacity:Wz,numOctaves:iH},sH={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lH=Vz.length;function cH(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const e=t[l];if(Bz.has(l))a=!0;else if(Dz(l))o[l]=e;else{const t=qz(e,aH[l]);l.startsWith("origin")?(s=!0,i[l]=t):r[l]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<lH;i++){const a=Vz[i],s=e[a];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=qz(s,aH[a]);l||(o=!1,r+=`${sH[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}const uH=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dH(e,t,n){for(const r in t)Hz(t[r])||zz(r,n)||(e[r]=t[r])}function pH(e,t){const r={};return dH(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t){return n.useMemo((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return cH(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),r}function fH(e,t){const n={},r=pH(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const hH=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function mH(e){return"string"==typeof e&&!e.includes("-")&&!!(hH.indexOf(e)>-1||/[A-Z]/u.test(e))}const gH={offset:"stroke-dashoffset",array:"stroke-dasharray"},vH={offset:"strokeDashoffset",array:"strokeDasharray"};function yH(e,t,n){return"string"==typeof e?e:Jz.transform(t+n*e)}function bH(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(cH(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:h}=e;p.transform&&(h&&(f.transform=p.transform),delete p.transform),h&&(void 0!==o||void 0!==i||f.transform)&&(f.transformOrigin=function(e,t,n){return`${yH(t,e.x,e.width)} ${yH(n,e.y,e.height)}`}(h,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(p.x=t),void 0!==n&&(p.y=n),void 0!==r&&(p.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?gH:vH;e[i.offset]=Jz.transform(-r);const a=Jz.transform(t),s=Jz.transform(n);e[i.array]=`${a} ${s}`}(p,a,s,l,!1)}const xH=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),wH=e=>"string"==typeof e&&"svg"===e.toLowerCase();function _H(e,t,r,o){const i=n.useMemo((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return bH(n,t,wH(o),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};dH(t,e.style,e),i.style={...t,...i.style}}return i}function SH(e=!1){return(t,r,o,{latestValues:i},a)=>{const s=(mH(t)?_H:fH)(r,i,a,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(uz(o)||!0===n&&cz(o)||!t&&!cz(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof t,e),c=t!==n.Fragment?{...l,...s,ref:o}:{},{children:u}=r,d=n.useMemo((()=>Hz(u)?u.get():u),[u]);return n.createElement(t,{...c,children:d})}}function EH(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function TH(e,t,n,r){if("function"==typeof t){const[o,i]=EH(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=EH(r);t=t(void 0!==n?n:e.custom,o,i)}return t}const CH=e=>Array.isArray(e);function AH(e){const t=Hz(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const NH=e=>(t,r)=>{const o=n.useContext(mz),i=n.useContext(kB),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:RH(r,o,i,e),renderState:t()};return n&&(a.onMount=e=>n({props:r,current:e,...a}),a.onUpdate=e=>n(e)),a}(e,t,o,i);return r?a():PB(a)};function RH(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=AH(i[p]);let{initial:a,animate:s}=e;const l=xz(e),c=wz(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!gz(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=TH(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(o[r]=e)}for(const r in e)o[r]=e[r]}}}return o}function OH(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Hz(o[a])||t.style&&Hz(t.style[a])||zz(a,e)||void 0!==(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return i}const PH={useVisualState:NH({scrapeMotionValuesFromProps:OH,createRenderState:uH})};function kH(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(JSe){t.dimensions={x:0,y:0,width:0,height:0}}}function MH(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const jH=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function LH(e,t,n,r){MH(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(jH.has(o)?o:Az(o),t.attrs[o])}function DH(e,t,n){const r=OH(e,t,n);for(const o in e)if(Hz(e[o])||Hz(t[o])){r[-1!==Vz.indexOf(o)?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o]=e[o]}return r}const IH=["x","y","width","height","cx","cy","r"],FH={useVisualState:NH({scrapeMotionValuesFromProps:DH,createRenderState:xH,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i)for(const s in o)if(Bz.has(s)){i=!0;break}if(!i)return;let a=!t;if(t)for(let s=0;s<IH.length;s++){const n=IH[s];e[n]!==t[n]&&(a=!0)}a&&tz.read((()=>{kH(n,r),tz.render((()=>{bH(r,o,wH(n.tagName),e.transformTemplate),LH(n,r)}))}))}})};function UH(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Mz({...mH(n)?FH:PH,preloadedFeatures:e,useRender:SH(r),createVisualElement:t,Component:n})}}function $H(e,t,n){const r=e.getProps();return TH(r,t,void 0!==n?n:r.custom,e)}const VH=KB((()=>void 0!==window.ScrollTimeline));class BH{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map((e=>"finished"in e?e.finished:e)))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>VH()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class zH extends BH{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function HH(e,t){return e?e[t]||e.default||e:void 0}const qH=2e4;function GH(e){let t=0;let n=e.next(t);for(;!n.done&&t<qH;)t+=50,n=e.next(t);return t>=qH?1/0:t}function KH(e){return"function"==typeof e}function WH(e,t){e.timeline=t,e.onfinish=null}const YH=e=>Array.isArray(e)&&"number"==typeof e[0],XH={linearEasing:void 0};function ZH(e,t){const n=KB(e);return()=>{var e;return null!==(e=XH[t])&&void 0!==e?e:n()}}const QH=ZH((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(JSe){return!1}return!0}),"linearEasing"),JH=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(WB(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function eq(e){return Boolean("function"==typeof e&&QH()||!e||"string"==typeof e&&(e in nq||QH())||YH(e)||Array.isArray(e)&&e.every(eq))}const tq=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,nq={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tq([0,.65,.55,1]),circOut:tq([.55,0,1,.45]),backIn:tq([.31,.01,.66,-.59]),backOut:tq([.33,1.53,.69,.99])};function rq(e,t){return e?"function"==typeof e&&QH()?JH(e,t):YH(e)?tq(e):Array.isArray(e)?e.map((e=>rq(e,t)||nq.easeOut)):nq[e]:void 0}const oq={x:!1,y:!1};function iq(){return oq.x||oq.y}function aq(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){const t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function sq(e){return!("touch"===e.pointerType||iq())}const lq=(e,t)=>!!t&&(e===t||lq(e,t.parentElement)),cq=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,uq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const dq=new WeakSet;function pq(e){return t=>{"Enter"===t.key&&e(t)}}function fq(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function hq(e){return cq(e)&&!iq()}function mq(e,t,n={}){const[r,o,i]=aq(e,n),a=e=>{const r=e.currentTarget;if(!hq(e)||dq.has(r))return;dq.add(r);const i=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),hq(e)&&dq.has(r)&&(dq.delete(r),"function"==typeof i&&i(e,{success:t}))},s=e=>{a(e,n.useGlobalTarget||lq(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach((e=>{(function(e){return uq.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0);(n.useGlobalTarget?window:e).addEventListener("pointerdown",a,o),e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=pq((()=>{if(dq.has(n))return;fq(n,"down");const e=pq((()=>{fq(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>fq(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,o)),o)})),i}const gq=new Set(["width","height","top","left","right","bottom",...Vz]);let vq;function yq(){vq=void 0}const bq={now:()=>(void 0===vq&&bq.set(rz.isProcessing||ZB?rz.timestamp:performance.now()),vq),set:e=>{vq=e,queueMicrotask(yq)}};function xq(e,t){-1===e.indexOf(t)&&e.push(t)}function wq(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _q{constructor(){this.subscriptions=[]}add(e){return xq(this.subscriptions,e),()=>wq(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Sq(e,t){return t?e*(1e3/t):0}class Eq{constructor(e,t={}){this.version="12.4.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=bq.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=bq.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&fz(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new _q);const n=this.events[e].add(t);return"change"===e?()=>{n(),tz.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=bq.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Sq(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Tq(e,t){return new Eq(e,t)}function Cq(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Tq(n))}function Aq(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Hz(r)&&r.add))return n.add(t);var r}function Nq(e){return e.props[Nz]}const Rq=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Oq(e,t,n,r){if(e===t&&n===r)return HB;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Rq(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n);return e=>0===e||1===e?e:Rq(o(e),t,r)}const Pq=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kq=e=>t=>1-e(1-t),Mq=Oq(.33,1.53,.69,.99),jq=kq(Mq),Lq=Pq(jq),Dq=e=>(e*=2)<1?.5*jq(e):.5*(2-Math.pow(2,-10*(e-1))),Iq=e=>1-Math.sin(Math.acos(e)),Fq=kq(Iq),Uq=Pq(Iq),$q=e=>/^0[^.\s]+$/u.test(e);const Vq=e=>Math.round(1e5*e)/1e5,Bq=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const zq=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hq=(e,t)=>n=>Boolean("string"==typeof n&&zq.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),qq=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(Bq);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Gq={...Kz,transform:e=>Math.round((e=>Gz(0,255,e))(e))},Kq={test:Hq("rgb","red"),parse:qq("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Gq.transform(e)+", "+Gq.transform(t)+", "+Gq.transform(n)+", "+Vq(Wz.transform(r))+")"};const Wq={test:Hq("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Kq.transform},Yq={test:Hq("hsl","hue"),parse:qq("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qz.transform(Vq(t))+", "+Qz.transform(Vq(n))+", "+Vq(Wz.transform(r))+")"},Xq={test:e=>Kq.test(e)||Wq.test(e)||Yq.test(e),parse:e=>Kq.test(e)?Kq.parse(e):Yq.test(e)?Yq.parse(e):Wq.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Kq.transform(e):Yq.transform(e)},Zq=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Qq="number",Jq="color",eG=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function tG(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(eG,(e=>(Xq.test(e)?(r.color.push(i),o.push(Jq),n.push(Xq.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Qq),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:a,indexes:r,types:o}}function nG(e){return tG(e).values}function rG(e){const{split:t,types:n}=tG(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Qq?Vq(e[i]):t===Jq?Xq.transform(e[i]):e[i]}return o}}const oG=e=>"number"==typeof e?0:e;const iG={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(Bq))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Zq))||void 0===n?void 0:n.length)||0)>0},parse:nG,createTransformer:rG,getAnimatableNone:function(e){const t=nG(e);return rG(e)(t.map(oG))}},aG=new Set(["brightness","contrast","saturate","opacity"]);function sG(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Bq)||[];if(!r)return e;const o=n.replace(r,"");let i=aG.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const lG=/\b([a-z-]*)\(.*?\)/gu,cG={...iG,getAnimatableNone:e=>{const t=e.match(lG);return t?t.map(sG).join(" "):e}},uG={...aH,color:Xq,backgroundColor:Xq,outlineColor:Xq,fill:Xq,stroke:Xq,borderColor:Xq,borderTopColor:Xq,borderRightColor:Xq,borderBottomColor:Xq,borderLeftColor:Xq,filter:cG,WebkitFilter:cG},dG=e=>uG[e];function pG(e,t){let n=dG(e);return n!==cG&&(n=iG),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fG=new Set(["auto","none","0"]);const hG=e=>e===Kz||e===Jz,mG=(e,t)=>parseFloat(e.split(", ")[t]),gG=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return mG(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?mG(t[1],e):0}},vG=new Set(["x","y","z"]),yG=Vz.filter((e=>!vG.has(e)));const bG={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:gG(4,13),y:gG(5,14)};bG.translateX=bG.x,bG.translateY=bG.y;const xG=new Set;let wG=!1,_G=!1;function SG(){if(_G){const e=Array.from(xG).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return yG.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}_G=!1,wG=!1,xG.forEach((e=>e.complete())),xG.clear()}function EG(){xG.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(_G=!0)}))}class TG{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(xG.add(this),wG||(wG=!0,tz.read(EG),tz.resolveKeyframes(SG))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),xG.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,xG.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const CG=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),AG=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function NG(e,t,n=1){GB(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=AG.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return CG(e)?parseFloat(e):e}return Fz(o)?NG(o,t,n+1):o}const RG=e=>t=>t.test(e),OG=[Kz,Jz,Qz,Zz,tH,eH,{test:e=>"auto"===e,parse:e=>e}],PG=e=>OG.find(RG(e));class kG extends TG{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),Fz(n))){const r=NG(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!gq.has(n)||2!==e.length)return;const[r,o]=e,i=PG(r),a=PG(o);if(i!==a)if(hG(i)&&hG(a))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let o=0;o<e.length;o++)("number"==typeof(r=e[o])?0===r:null===r||"none"===r||"0"===r||$q(r))&&n.push(o);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!fG.has(t)&&tG(t).values.length&&(r=e[o]),o++}if(r&&n)for(const i of t)e[i]=pG(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=bG[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=bG[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const MG=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!iG.test(e)&&"0"!==e||e.startsWith("url(")));const jG=e=>null!==e;function LG(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(jG),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class DG{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=bq.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(EG(),SG()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=bq.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:a,onUpdate:s,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=MG(o,t),s=MG(i,t);return qB(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||KH(n))&&r)}(e,n,r,o)){if(!i)return s&&s(LG(e,this.options,t)),a&&a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}const IG=(e,t,n)=>e+(t-e)*n;function FG(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function UG(e,t){return n=>n>0?t:e}const $G=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},VG=[Wq,Kq,Yq];function BG(e){const t=(n=e,VG.find((e=>e.test(n))));var n;if(qB(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===Yq&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=FG(s,r,e+1/3),i=FG(s,r,e),a=FG(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(r)),r}const zG=(e,t)=>{const n=BG(e),r=BG(t);if(!n||!r)return UG(e,t);const o={...n};return e=>(o.red=$G(n.red,r.red,e),o.green=$G(n.green,r.green,e),o.blue=$G(n.blue,r.blue,e),o.alpha=IG(n.alpha,r.alpha,e),Kq.transform(o))},HG=(e,t)=>n=>t(e(n)),qG=(...e)=>e.reduce(HG),GG=new Set(["none","hidden"]);function KG(e,t){return n=>IG(e,t,n)}function WG(e){return"number"==typeof e?KG:"string"==typeof e?Fz(e)?UG:Xq.test(e)?zG:ZG:Array.isArray(e)?YG:"object"==typeof e?Xq.test(e)?zG:XG:UG}function YG(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>WG(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function XG(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=WG(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const ZG=(e,t)=>{const n=iG.createTransformer(t),r=tG(e),o=tG(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?GG.has(e)&&!o.values.length||GG.has(t)&&!r.values.length?function(e,t){return GG.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):qG(YG(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=null!==(n=e.values[e.indexes[a][o[a]]])&&void 0!==n?n:0;r[i]=s,o[a]++}return r}(r,o),o.values),n):(qB(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),UG(e,t))};function QG(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return IG(e,t,n);return WG(e)(e,t)}function JG(e,t,n){const r=Math.max(t-5,0);return Sq(n-e(r),t-r)}const eK=100,tK=10,nK=1,rK=0,oK=800,iK=.3,aK=.3,sK={granular:.01,default:2},lK={granular:.005,default:.5},cK=.01,uK=10,dK=.05,pK=1;function fK({duration:e=oK,bounce:t=iK,velocity:n=rK,mass:r=nK}){let o,i;qB(e<=YB(uK),"Spring duration must be 10 seconds or less");let a=1-t;a=Gz(dK,pK,a),e=Gz(cK,uK,XB(e)),a<1?(o=t=>{const r=t*a,o=r*e;return.001-(r-n)/mK(t,a)*Math.exp(-o)},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=mK(Math.pow(t,2),a);return(.001-o(t)>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let o=1;o<hK;o++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=YB(e),isNaN(s))return{stiffness:eK,damping:tK,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}const hK=12;function mK(e,t){return e*Math.sqrt(1-t*t)}const gK=["duration","bounce"],vK=["stiffness","damping","mass"];function yK(e,t){return t.some((t=>void 0!==e[t]))}function bK(e=aK,t=iK){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=function(e){let t={velocity:rK,stiffness:eK,damping:tK,mass:nK,isResolvedFromDuration:!1,...e};if(!yK(e,vK)&&yK(e,gK))if(e.visualDuration){const n=2*Math.PI/(1.2*e.visualDuration),r=n*n,o=2*Gz(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:nK,stiffness:r,damping:o}}else{const n=fK(e);t={...t,...n,mass:nK},t.isResolvedFromDuration=!0}return t}({...n,velocity:-XB(n.velocity||0)}),h=p||0,m=c/(2*Math.sqrt(l*u)),g=a-i,v=XB(Math.sqrt(l/u)),y=Math.abs(g)<5;let b;if(r||(r=y?sK.granular:sK.default),o||(o=y?lK.granular:lK.default),m<1){const e=mK(v,m);b=t=>{const n=Math.exp(-m*v*t);return a-n*((h+m*v*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)b=e=>a-Math.exp(-v*e)*(g+(h+v*g)*e);else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return a-n*((h+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const x={calculatedDuration:f&&d||null,next:e=>{const t=b(e);if(f)s.done=e>=d;else{let n=0;m<1&&(n=0===e?YB(h):JG(b,e,t));const i=Math.abs(n)<=r,l=Math.abs(a-t)<=o;s.done=i&&l}return s.value=s.done?a:t,s},toString:()=>{const e=Math.min(GH(x),qH),t=JH((t=>x.next(e*t).value),e,30);return e+"ms "+t}};return x}function xK({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,g=void 0===a?m:a(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);p.done=Math.abs(t)<=c,p.value=p.done?g:n};let x,w;const _=e=>{var t;(t=p.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=bK({keyframes:[p.value,f(p.value)],velocity:JG(y,e,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),_(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),p)}}}const wK=Oq(.42,0,1,1),_K=Oq(0,0,.58,1),SK=Oq(.42,0,.58,1),EK={linear:HB,easeIn:wK,easeInOut:SK,easeOut:_K,circIn:Iq,circInOut:Uq,circOut:Fq,backIn:jq,backInOut:Lq,backOut:Mq,anticipate:Dq},TK=e=>{if(YH(e)){GB(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Oq(t,n,r,o)}return"string"==typeof e?(GB(void 0!==EK[e],`Invalid easing type '${e}'`),EK[e]):e};function CK(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(GB(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||QG,i=e.length-1;for(let a=0;a<i;a++){let n=o(e[a],e[a+1]);if(t){const e=Array.isArray(t)?t[a]||HB:t;n=qG(e,n)}r.push(n)}return r}(t,r,o),l=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);return s[r](WB(e[r],e[r+1],n))};return n?t=>c(Gz(e[0],e[i-1],t)):c}function AK(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++)e.push(IG(n,1,WB(0,t,r)))}(t,e.length-1),t}function NK({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(TK):TK(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:AK(t),e),s=CK(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||SK)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const RK=e=>{const t=({timestamp:t})=>e(t);return{start:()=>tz.update(t,!0),stop:()=>nz(t),now:()=>rz.isProcessing?rz.timestamp:bq.now()}},OK={decay:xK,inertia:xK,tween:NK,keyframes:NK,spring:bK},PK=e=>e/100;class kK extends DG{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new((null==r?void 0:r.KeyframeResolver)||TG)(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=KH(t)?t:OK[t]||NK;let s,l;a!==NK&&"number"!=typeof e[0]&&("production"!==process.env.NODE_ENV&&GB(2===e.length,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),s=qG(PK,QG(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});"mirror"===o&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=GH(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:p,repeatType:f,repeatDelay:h,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),this.currentTime=t?e:null!==this.holdTime?this.holdTime:Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,b=o;if(p){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,p+1);Boolean(t%2)&&("reverse"===f?(n=1-n,h&&(n-=h/u)):"mirror"===f&&(b=i)),y=Gz(0,1,n)*u}const x=v?{done:!1,value:s[0]}:b.next(y);a&&(x.value=a(x.value));let{done:w}=x;v||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return _&&void 0!==r&&(x.value=LG(s,this.options,r)),m&&m(x.value),_&&this.finish(),x}get duration(){const{resolved:e}=this;return e?XB(e.calculatedDuration):0}get time(){return XB(this.currentTime)}set time(e){this.currentTime=e=YB(e),null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=XB(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=RK,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const MK=new Set(["opacity","clipPath","filter","transform"]);function jK(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=rq(s,o);Array.isArray(u)&&(c.easing=u);return e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}const LK=KB((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const DK={anticipate:Dq,backInOut:Lq,circInOut:Uq};class IK extends DG{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new kG(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:i,motionValue:a,name:s,startTime:l}=this.options;if(!a.owner||!a.owner.current)return!1;var c;if("string"==typeof o&&QH()&&o in DK&&(o=DK[o]),KH((c=this.options).type)||"spring"===c.type||!eq(c.ease)){const{onComplete:t,onUpdate:a,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new kK({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,r=u.times,o=u.ease,i="keyframes"}const u=jK(a.owner.current,s,e,{...this.options,duration:n,times:r,ease:o});return u.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(WH(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(LG(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:r,type:i,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return XB(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return XB(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=YB(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return HB;const{animation:n}=t;WH(n,e)}else this.pendingTimeline=e;return HB}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,u=new kK({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),d=YB(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return LK()&&n&&MK.has(n)&&!s&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const FK={type:"spring",stiffness:500,damping:25,restSpeed:10},UK={type:"keyframes",duration:.8},$K={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},VK=(e,{keyframes:t})=>t.length>2?UK:Bz.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:FK:$K;const BK=(e,t,n,r={},o,i)=>a=>{const s=HH(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=YB(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||(u={...u,...VK(e,u)}),u.duration&&(u.duration=YB(u.duration)),u.repeatDelay&&(u.repeatDelay=YB(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!i&&void 0!==t.get()){const e=LG(u.keyframes,s);if(void 0!==e)return tz.update((()=>{u.onUpdate(e),u.onComplete()})),new zH([])}return!i&&IK.supports(u)?new IK(u):new kK(u)};function zK({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function HK(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const t=e.getValue(d,null!==(i=e.latestValues[d])&&void 0!==i?i:null),r=l[d];if(void 0===r||u&&zK(u,d))continue;const o={delay:n,...HH(a||{},d)};let s=!1;if(window.MotionHandoffAnimation){const t=Nq(e);if(t){const e=window.MotionHandoffAnimation(t,d,tz);null!==e&&(o.startTime=e,s=!0)}}Aq(e,d),t.start(BK(d,t,r,e.shouldReduceMotion&&gq.has(d)?{type:!1}:o,e,s));const p=t.animation;p&&c.push(p)}return s&&Promise.all(c).then((()=>{tz.update((()=>{s&&function(e,t){const n=$H(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i)Cq(e,s,CH(a=i[s])?a[a.length-1]||0:a);var a}(e,s)}))})),c}function qK(e,t,n={}){var r;const o=$H(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(HK(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(GK).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(qK(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then((()=>t()))}return Promise.all([a(),s(n.delay)])}function GK(e,t){return e.sortNodePosition(t)}function KK(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const WK=bz.length;function YK(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&YK(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<WK;n++){const r=bz[n],o=e.props[r];(vz(o)||!1===o)&&(t[r]=o)}return t}const XK=[...yz].reverse(),ZK=yz.length;function QK(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>qK(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=qK(e,t,n);else{const o="function"==typeof t?$H(e,t,n.custom):t;r=Promise.all(HK(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function JK(e){let t=QK(e),n=nW(),r=!0;const o=t=>(n,r)=>{var o;const i=$H(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:a}=e,s=YK(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<ZK;t++){const p=XK[t],f=n[p],h=void 0!==a[p]?a[p]:s[p],m=vz(h),g=p===i?f.isActive:null;!1===g&&(d=t);let v=h===s[p]&&h!==a[p]&&m;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...u},!f.isActive&&null===g||!h&&!f.prevProp||gz(h)||"boolean"==typeof h)continue;const y=eW(f.prevProp,h);let b=y||p===i&&f.isActive&&!v&&m||t>d&&m,x=!1;const w=Array.isArray(h)?h:[h];let _=w.reduce(o(p),{});!1===g&&(_={});const{prevResolvedValues:S={}}=f,E={...S,..._},T=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),f.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in E){const t=_[e],n=S[e];if(u.hasOwnProperty(e))continue;let r=!1;r=CH(t)&&CH(n)?!KK(t,n):t!==n,r?null!=t?T(e):c.add(e):void 0!==t&&c.has(e)?T(e):f.protectedKeys[e]=!0}f.prevProp=h,f.prevResolvedValues=_,f.isActive&&(u={...u,..._}),r&&e.blockInitialAnimation&&(b=!1);b&&(!(v&&y)||x)&&l.push(...w.map((e=>({animation:e,options:{type:p}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let p=Boolean(l.length);return!r||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=nW(),r=!0}}}function eW(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!KK(t,e)}function tW(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nW(){return{animate:tW(!0),whileInView:tW(),whileHover:tW(),whileTap:tW(),whileDrag:tW(),whileFocus:tW(),exit:tW()}}class rW{constructor(e){this.isMounted=!1,this.node=e}update(){}}let oW=0;const iW={animation:{Feature:class extends rW{constructor(e){super(e),e.animationState||(e.animationState=JK(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();gz(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends rW{constructor(){super(...arguments),this.id=oW++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>{t(this.id)}))}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function aW(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function sW(e){return{point:{x:e.pageX,y:e.pageY}}}function lW(e,t,n,r){return aW(e,t,(e=>t=>cq(t)&&e(t,sW(t)))(n),r)}const cW=(e,t)=>Math.abs(e-t);class uW{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=fW(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=cW(e.x,t.x),r=cW(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=rz;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=dW(t,this.transformPagePoint),tz.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=fW("pointercancel"===e.type?this.lastMoveEventInfo:dW(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!cq(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=dW(sW(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=rz;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,fW(i,this.history)),this.removeListeners=qG(lW(this.contextWindow,"pointermove",this.handlePointerMove),lW(this.contextWindow,"pointerup",this.handlePointerUp),lW(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),nz(this.updatePoint)}}function dW(e,t){return t?{point:t(e.point)}:e}function pW(e,t){return{x:e.x-t.x,y:e.y-t.y}}function fW({point:e},t){return{point:e,delta:pW(e,mW(t)),offset:pW(e,hW(t)),velocity:gW(t,.1)}}function hW(e){return e[0]}function mW(e){return e[e.length-1]}function gW(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=mW(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>YB(t)));)n--;if(!r)return{x:0,y:0};const i=XB(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function vW(e){return e.max-e.min}function yW(e,t,n,r=.5){e.origin=r,e.originPoint=IG(t.min,t.max,e.origin),e.scale=vW(n)/vW(t),e.translate=IG(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function bW(e,t,n,r){yW(e.x,t.x,n.x,r?r.originX:void 0),yW(e.y,t.y,n.y,r?r.originY:void 0)}function xW(e,t,n){e.min=n.min+t.min,e.max=e.min+vW(t)}function wW(e,t,n){e.min=t.min-n.min,e.max=e.min+vW(t)}function _W(e,t,n){wW(e.x,t.x,n.x),wW(e.y,t.y,n.y)}function SW(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function EW(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const TW=.35;function CW(e,t,n){return{min:AW(e,t),max:AW(e,n)}}function AW(e,t){return"number"==typeof e?e:e[t]||0}const NW=()=>({x:{min:0,max:0},y:{min:0,max:0}});function RW(e){return[e("x"),e("y")]}function OW({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function PW(e){return void 0===e||1===e}function kW({scale:e,scaleX:t,scaleY:n}){return!PW(e)||!PW(t)||!PW(n)}function MW(e){return kW(e)||jW(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function jW(e){return LW(e.x)||LW(e.y)}function LW(e){return e&&"0%"!==e}function DW(e,t,n){return n+t*(e-n)}function IW(e,t,n,r,o){return void 0!==o&&(e=DW(e,o,r)),DW(e,n,r)+t}function FW(e,t=0,n=1,r,o){e.min=IW(e.min,t,n,r,o),e.max=IW(e.max,t,n,r,o)}function UW(e,{x:t,y:n}){FW(e.x,t.translate,t.scale,t.originPoint),FW(e.y,n.translate,n.scale,n.originPoint)}const $W=.999999999999,VW=1.0000000000001;function BW(e,t){e.min=e.min+t,e.max=e.max+t}function zW(e,t,n,r,o=.5){FW(e,t,n,IG(e.min,e.max,o),r)}function HW(e,t){zW(e.x,t.x,t.scaleX,t.scale,t.originX),zW(e.y,t.y,t.scaleY,t.scale,t.originY)}function qW(e,t){return OW(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const GW=({current:e})=>e?e.ownerDocument.defaultView:null,KW=new WeakMap;class WW{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new uW(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(sW(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?oq[i]?null:(oq[i]=!0,()=>{oq[i]=!1}):oq.x||oq.y?null:(oq.x=oq.y=!0,()=>{oq.x=oq.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),RW((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Qz.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=vW(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&tz.postRender((()=>o(e,t))),Aq(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>RW((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:GW(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&tz.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!YW(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?IG(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?IG(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&Tz(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:SW(e.x,n,o),y:SW(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=TW){return!1===e?e=0:!0===e&&(e=TW),{x:CW(e,"left","right"),y:CW(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&RW((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Tz(e))return!1;const n=e.current;GB(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=qW(e,n),{scroll:o}=t;return o&&(BW(r.x,o.offset.x),BW(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:EW(e.x,t.x),y:EW(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=OW(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=RW((a=>{if(!YW(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c={type:"inertia",velocity:n?e[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,c)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Aq(this.visualElement,e),n.start(BK(e,n,0,t,this.visualElement,!1))}stopAnimation(){RW((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){RW((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){RW((t=>{const{drag:n}=this.getProps();if(!YW(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-IG(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Tz(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};RW((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=vW(e),o=vW(t);return o>r?n=WB(t.min,t.max-r,e.min):r>o&&(n=WB(e.min,e.max-o,t.min)),Gz(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),RW((t=>{if(!YW(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(IG(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;KW.set(this.visualElement,this);const e=lW(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Tz(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),tz.read(t);const o=aW(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(RW((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=TW,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function YW(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const XW=e=>(t,n)=>{e&&tz.postRender((()=>e(t,n)))};const ZW={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function QW(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const JW={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Jz.test(e))return e;e=parseFloat(e)}return`${QW(e,t.target.x)}% ${QW(e,t.target.y)}%`}},eY={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=iG.parse(e);if(o.length>5)return r;const i=iG.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=IG(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}};class tY extends n.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;!function(e){for(const t in e)$z[t]=e[t],Dz(t)&&($z[t].isCSSVariable=!0)}(rY),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ZW.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||tz.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Rz.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function nY(e){const[r,o]=FB(),i=n.useContext(OB);return t.jsx(tY,{...e,layoutGroup:i,switchLayoutGroup:n.useContext(Oz),isPresent:r,safeToRemove:o})}const rY={borderRadius:{...JW,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:JW,borderTopRightRadius:JW,borderBottomLeftRadius:JW,borderBottomRightRadius:JW,boxShadow:eY};const oY=(e,t)=>e.depth-t.depth;class iY{constructor(){this.children=[],this.isDirty=!1}add(e){xq(this.children,e),this.isDirty=!0}remove(e){wq(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(oY),this.isDirty=!1,this.children.forEach(e)}}const aY=["TopLeft","TopRight","BottomLeft","BottomRight"],sY=aY.length,lY=e=>"string"==typeof e?parseFloat(e):e,cY=e=>"number"==typeof e||Jz.test(e);function uY(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const dY=fY(0,.5,Fq),pY=fY(.5,.95,HB);function fY(e,t,n){return r=>r<e?0:r>t?1:n(WB(e,t,r))}function hY(e,t){e.min=t.min,e.max=t.max}function mY(e,t){hY(e.x,t.x),hY(e.y,t.y)}function gY(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function vY(e,t,n,r,o){return e=DW(e-=t,1/n,r),void 0!==o&&(e=DW(e,1/o,r)),e}function yY(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){Qz.test(t)&&(t=parseFloat(t),t=IG(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=IG(i.min,i.max,r);e===i&&(s-=t),e.min=vY(e.min,t,n,s,o),e.max=vY(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const bY=["x","scaleX","originX"],xY=["y","scaleY","originY"];function wY(e,t,n,r){yY(e.x,t,bY,n?n.x:void 0,r?r.x:void 0),yY(e.y,t,xY,n?n.y:void 0,r?r.y:void 0)}function _Y(e){return 0===e.translate&&1===e.scale}function SY(e){return _Y(e.x)&&_Y(e.y)}function EY(e,t){return e.min===t.min&&e.max===t.max}function TY(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function CY(e,t){return TY(e.x,t.x)&&TY(e.y,t.y)}function AY(e){return vW(e.x)/vW(e.y)}function NY(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class RY{constructor(){this.members=[]}add(e){xq(this.members,e),e.scheduleRender()}remove(e){if(wq(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const OY=["","X","Y","Z"],PY={visibility:"hidden"};let kY=0;function MY(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function jY(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Nq(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tz,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&jY(r)}function LY({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=kY++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(FY),this.nodes.forEach(qY),this.nodes.forEach(GY),this.nodes.forEach(UY)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new iY)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new _q),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=bq.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(nz(r),e(i-t))};return tz.read(r,!0),()=>nz(r)}(r,250),ZW.hasAnimatedSinceResize&&(ZW.hasAnimatedSinceResize=!1,this.nodes.forEach(HY))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||QY,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!CY(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...HH(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||HY(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,nz(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(KY),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jY(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const e=this.path[o];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(VY);this.isUpdating||this.nodes.forEach(BY),this.isUpdating=!1,this.nodes.forEach(zY),this.nodes.forEach(DY),this.nodes.forEach(IY),this.clearAllSnapshots();const e=bq.now();rz.delta=Gz(0,1e3/60,e-rz.timestamp),rz.timestamp=e,rz.isProcessing=!0,oz.update.process(rz),oz.preRender.process(rz),oz.render.process(rz),rz.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Rz.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($Y),this.sharedNodes.forEach(WY)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tz.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tz.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||vW(this.snapshot.measuredBox.x)||vW(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!SY(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||MW(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),tX((r=n).x),tX(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(rX))){const{scroll:e}=this.root;e&&(BW(n.x,e.offset.x),BW(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(mY(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:o,options:i}=t;t!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&mY(n,e),BW(n.x,o.offset.x),BW(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};mY(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&HW(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),MW(e.latestValues)&&HW(n,e.latestValues)}return MW(this.latestValues)&&HW(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};mY(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!MW(e.latestValues))continue;kW(e.latestValues)&&e.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};mY(r,e.measurePageBox()),wY(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return MW(this.latestValues)&&wY(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==rz.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=rz.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},_W(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),mY(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var a,s,l;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xW((a=this.target).x,(s=this.relativeTarget).x,(l=this.relativeParent.target).x),xW(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):mY(this.target,this.layout.layoutBox),UW(this.target,this.targetDelta)):mY(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},_W(this.relativeTargetOrigin,this.target,e.target),mY(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!kW(this.parent.latestValues)&&!jW(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===rz.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;mY(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&HW(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,UW(e,a)),r&&MW(i.latestValues)&&HW(e,i.latestValues))}t.x<VW&&t.x>$W&&(t.x=1),t.y<VW&&t.y>$W&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(gY(this.prevProjectionDelta.x,this.projectionDelta.x),gY(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),bW(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&NY(this.projectionDelta.x,this.prevProjectionDelta.x)&&NY(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(ZY));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,p,f,h,m,g;YY(i.x,e.x,n),YY(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_W(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),XY((f=this.relativeTarget).x,(h=this.relativeTargetOrigin).x,(m=a).x,g=n),XY(f.y,h.y,m.y,g),d&&(EY((l=this.relativeTarget).x,(p=d).x)&&EY(l.y,p.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),mY(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=IG(0,void 0!==n.opacity?n.opacity:1,dY(r)),e.opacityExit=IG(void 0!==t.opacity?t.opacity:1,0,pY(r))):i&&(e.opacity=IG(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let a=0;a<sY;a++){const o=`border${aY[a]}Radius`;let i=uY(t,o),s=uY(n,o);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||cY(i)===cY(s)?(e[o]=Math.max(IG(lY(i),lY(s),r),0),(Qz.test(s)||Qz.test(i))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=IG(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(nz(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tz.update((()=>{ZW.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Hz(e)?e:Tq(e);return r.start(BK("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&nX(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=vW(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=vW(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}mY(t,n),HW(t,o),bW(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new RY);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&MY("z",e,r,this.animationValues);for(let o=0;o<OY.length;o++)MY(`rotate${OY[o]}`,e,r,this.animationValues),MY(`skew${OY[o]}`,e,r,this.animationValues);e.render();for(const o in r)e.setStaticValue(o,r[o]),this.animationValues&&(this.animationValues[o]=r[o]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return PY;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=AH(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=AH(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!MW(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,r.opacity=i.animationValues?i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const c in $z){if(void 0===a[c])continue;const{correct:e,applyTo:t,isCSSVariable:n}=$z[c],o="none"===r.transform?a[c]:e(a[c],i);if(t){const e=t.length;for(let n=0;n<e;n++)r[t[n]]=o}else n?this.options.visualElement.renderState.vars[c]=o:r[c]=o}return this.options.layoutId&&(r.pointerEvents=i===this?AH(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(VY),this.root.sharedNodes.clear()}}}function DY(e){e.updateLayout()}function IY(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?RW((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=vW(r);r.min=t[e].min,r.max=r.min+o})):nX(o,n.layoutBox,t)&&RW((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=vW(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};bW(a,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?bW(s,e.applyTransform(r,!0),n.measuredBox):bW(s,t,n.layoutBox);const l=!SY(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};_W(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};_W(s,t,i.layoutBox),CY(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function FY(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function UY(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $Y(e){e.clearSnapshot()}function VY(e){e.clearMeasurements()}function BY(e){e.isLayoutDirty=!1}function zY(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function HY(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qY(e){e.resolveTargetDelta()}function GY(e){e.calcProjection()}function KY(e){e.resetSkewAndRotation()}function WY(e){e.removeLeadSnapshot()}function YY(e,t,n){e.translate=IG(t.translate,0,n),e.scale=IG(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function XY(e,t,n,r){e.min=IG(t.min,n.min,r),e.max=IG(t.max,n.max,r)}function ZY(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const QY={duration:.45,ease:[.4,0,.1,1]},JY=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),eX=JY("applewebkit/")&&!JY("chrome/")?Math.round:HB;function tX(e){e.min=eX(e.min),e.max=eX(e.max)}function nX(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=AY(t),o=AY(n),i=.2,!(Math.abs(r-o)<=i));var r,o,i}function rX(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const oX=LY({attachResizeListener:(e,t)=>aW(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),iX={current:void 0},aX=LY({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!iX.current){const e=new oX({});e.mount(window),e.setOptions({layoutScroll:!0}),iX.current=e}return iX.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),sX={pan:{Feature:class extends rW{constructor(){super(...arguments),this.removePointerDownListener=HB}onPointerDown(e){this.session=new uW(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:GW(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:XW(e),onStart:XW(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&tz.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=lW(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends rW{constructor(e){super(e),this.removeGroupControls=HB,this.removeListeners=HB,this.controls=new WW(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||HB}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:aX,MeasureLayout:nY}};function lX(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&tz.postRender((()=>o(t,sW(t))))}function cX(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&tz.postRender((()=>o(t,sW(t))))}const uX=new WeakMap,dX=new WeakMap,pX=e=>{const t=uX.get(e.target);t&&t(e)},fX=e=>{e.forEach(pX)};function hX(e,t,n){const r=function({root:e,...t}){const n=e||document;dX.has(n)||dX.set(n,{});const r=dX.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(fX,{root:e,...t})),r[o]}(t);return uX.set(e,n),r.observe(e),()=>{uX.delete(e),r.unobserve(e)}}const mX={some:0,all:1};const gX={inView:{Feature:class extends rW{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e;return hX(this.node.current,{root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:mX[r]},(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends rW{mount(){const{current:e}=this.node;e&&(this.unmount=mq(e,((e,t)=>(cX(this.node,t,"Start"),(e,{success:t})=>cX(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends rW{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(JSe){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=qG(aW(this.node.current,"focus",(()=>this.onFocus())),aW(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends rW{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=aq(e,n),a=e=>{if(!sq(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const i=e=>{sq(e)&&(r(e),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,o)};return r.forEach((e=>{e.addEventListener("pointerenter",a,o)})),i}(e,((e,t)=>(lX(this.node,t,"Start"),e=>lX(this.node,e,"End")))))}unmount(){}}}},vX={layout:{ProjectionNode:aX,MeasureLayout:nY}},yX={current:null},bX={current:!1};const xX=[...OG,Xq,iG],wX=new WeakMap;const _X=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class SX{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=TG,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=bq.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,tz.render(this.render,!1,!0))};const{latestValues:s,renderState:l,onUpdate:c}=i;this.onUpdate=c,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=xz(t),this.isVariantNode=wz(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const p in d){const e=d[p];void 0!==s[p]&&Hz(e)&&e.set(s[p],!1)}}mount(e){this.current=e,wX.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),bX.current||function(){if(bX.current=!0,VB)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yX.current=e.matches;e.addListener(t),t()}else yX.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||yX.current),"production"!==process.env.NODE_ENV&&fz(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),nz(this.notifyUpdate),nz(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Bz.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&tz.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),o(),i&&i(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in sz){const t=sz[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<_X.length;n++){const t=_X[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Hz(o))e.addValue(r,o),"development"===process.env.NODE_ENV&&fz("12.4.0"===o.version,`Attempting to mix Motion versions ${o.version} with 12.4.0 may not work as expected.`);else if(Hz(i))e.addValue(r,Tq(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,Tq(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Tq(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(CG(r)||$q(r))?r=parseFloat(r):!xX.find(RG(r))&&iG.test(t)&&(r=pG(e,t)),this.setBaseTarget(e,Hz(r)?r.get():r)),Hz(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=TH(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Hz(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new _q),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class EX extends SX{constructor(){super(...arguments),this.KeyframeResolver=kG}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Hz(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class TX extends EX{constructor(){super(...arguments),this.type="html",this.renderInstance=MH}readValueFromInstance(e,t){if(Bz.has(t)){const e=dG(t);return e&&e.default||0}{const n=window.getComputedStyle(e),r=(Dz(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return qW(e,t)}build(e,t,n){cH(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return OH(e,t,n)}}class CX extends EX{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=NW,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&kH(this.current,this.renderState)}}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Bz.has(t)){const e=dG(t);return e&&e.default||0}return t=jH.has(t)?t:Az(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return DH(e,t,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&tz.postRender(this.updateDimensions)}build(e,t,n){bH(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){LH(e,t,0,r)}mount(e){this.isSVGTag=wH(e.tagName),super.mount(e)}}const AX=hz(UH({...iW,...gX,...sX,...vX},((e,t)=>mH(e)?new CX(t):new TX(t,{allowProjection:e!==n.Fragment})))),NX="0123456789abcdef";class RX{constructor(e){this.bytes=e}static ofInner(e){if(16!==e.length)throw new TypeError("not 128-bit length");return new RX(e)}static fromFieldsV7(e,t,n,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||e<0||t<0||n<0||r<0||e>0xffffffffffff||t>4095||n>1073741823||r>4294967295)throw new RangeError("invalid field value");const o=new Uint8Array(16);return o[0]=e/2**40,o[1]=e/2**32,o[2]=e/2**24,o[3]=e/65536,o[4]=e/256,o[5]=e,o[6]=112|t>>>8,o[7]=t,o[8]=128|n>>>24,o[9]=n>>>16,o[10]=n>>>8,o[11]=n,o[12]=r>>>24,o[13]=r>>>16,o[14]=r>>>8,o[15]=r,new RX(o)}static parse(e){var t,n,r,o;let i;switch(e.length){case 32:i=null===(t=/^[0-9a-f]{32}$/i.exec(e))||void 0===t?void 0:t[0];break;case 36:i=null===(n=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(e))||void 0===n?void 0:n.slice(1,6).join("");break;case 38:i=null===(r=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(e))||void 0===r?void 0:r.slice(1,6).join("");break;case 45:i=null===(o=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(e))||void 0===o?void 0:o.slice(1,6).join("")}if(i){const e=new Uint8Array(16);for(let t=0;t<16;t+=4){const n=parseInt(i.substring(2*t,2*t+8),16);e[t+0]=n>>>24,e[t+1]=n>>>16,e[t+2]=n>>>8,e[t+3]=n}return new RX(e)}throw new SyntaxError("could not parse UUID string")}toString(){let e="";for(let t=0;t<this.bytes.length;t++)e+=NX.charAt(this.bytes[t]>>>4),e+=NX.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");return e}toHex(){let e="";for(let t=0;t<this.bytes.length;t++)e+=NX.charAt(this.bytes[t]>>>4),e+=NX.charAt(15&this.bytes[t]);return e}toJSON(){return this.toString()}getVariant(){const e=this.bytes[8]>>>4;if(e<0)throw new Error("unreachable");if(e<=7)return this.bytes.every((e=>0===e))?"NIL":"VAR_0";if(e<=11)return"VAR_10";if(e<=13)return"VAR_110";if(e<=15)return this.bytes.every((e=>255===e))?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return"VAR_10"===this.getVariant()?this.bytes[6]>>>4:void 0}clone(){return new RX(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(let t=0;t<16;t++){const n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0}}class OX{constructor(e){this.timestamp=0,this.counter=0,this.random=null!=e?e:PX()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(e,t){let n=this.generateOrAbortCore(e,t);return void 0===n&&(this.timestamp=0,n=this.generateOrAbortCore(e,t)),n}generateOrAbortCore(e,t){if(!Number.isInteger(e)||e<1||e>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit positive integer");if(t<0||t>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+t>=this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return RX.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}generateV4(){const e=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return e[6]=64|e[6]>>>4,e[8]=128|e[8]>>>2,RX.ofInner(e)}}const PX=()=>{if("undefined"!=typeof crypto&&void 0!==crypto.getRandomValues)return new kX;if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");return{nextUint32:()=>65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random())}};class kX{constructor(){this.buffer=new Uint32Array(8),this.cursor=65535}nextUint32(){return this.cursor>=this.buffer.length&&(crypto.getRandomValues(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}let MX;const jX=()=>(MX||(MX=new OX)).generate();function LX(e,t){throw new Error(`Unreachable case statement: ${JSON.stringify(e)}. Valid values are: ${Object.values(t).join(", ")}`)}const DX="automation_update_start",IX="automation_update_end",FX="communication_update_start",UX="communication_update_end",$X=[{eventName:DX,handler:e=>()=>{e({type:"UPDATE_AUTOMATION_START"})}},{eventName:IX,handler:e=>()=>{e({type:"UPDATE_AUTOMATION_END"})}},{eventName:FX,handler:e=>()=>{e({type:"UPDATE_COMMUNICATION_START"})}},{eventName:UX,handler:e=>()=>{e({type:"UPDATE_COMMUNICATION_END"})}}],{Context:VX,Provider:BX}=ap(((e,t)=>{switch(t.type){case"FETCH_AUTOMATION_START":return{...e,isFetchingAutomation:!0,isLoading:!0};case"FETCH_AUTOMATION_SUCCESS":return{...e,automation:t.payload,isFetchingAutomation:!1,isLoading:e.isUpdatingAutomation||e.isFetchingCommunication||e.isUpdatingCommunication};case"FETCH_COMMUNICATION_START":return{...e,isFetchingCommunication:!0,isLoading:!0};case"FETCH_COMMUNICATION_SUCCESS":return{...e,communicationGroup:t.payload,isFetchingCommunication:!1,isLoading:e.isFetchingAutomation||e.isUpdatingAutomation||e.isUpdatingCommunication};case"UPDATE_AUTOMATION_START":return{...e,isUpdatingAutomation:!0,isLoading:!0};case"UPDATE_AUTOMATION_END":return{...e,isUpdatingAutomation:!1,isLoading:e.isFetchingAutomation||e.isFetchingCommunication||e.isUpdatingCommunication};case"UPDATE_COMMUNICATION_START":return{...e,isUpdatingCommunication:!0,isLoading:!0};case"UPDATE_COMMUNICATION_END":return{...e,isUpdatingCommunication:!1,isLoading:e.isFetchingAutomation||e.isUpdatingAutomation||e.isFetchingCommunication};case"UPDATE_RECIPIENT_STATS":return{...e,recipientStats:t.payload};case"SET_EDIT_POPUP":return{...e,openEditPopup:t.payload};case"SET_ACTION_ID":return{...e,selectedActionId:t.payload};case"SET_SELECTED_COMMUNICATION_GROUP_ID":return{...e,selectedCommunicationGroupId:t.payload};default:return e}}),{setAutomation:e=>t=>{e({type:"FETCH_AUTOMATION_SUCCESS",payload:t})},setCommunicationGroup:e=>t=>{e({type:"FETCH_COMMUNICATION_SUCCESS",payload:t})},setRecipientStats:e=>t=>{e({type:"UPDATE_RECIPIENT_STATS",payload:t})},setEditPopup:e=>t=>{e({type:"SET_EDIT_POPUP",payload:t})},setActionId:e=>t=>{e({type:"SET_ACTION_ID",payload:t})},setSelectedCommunicationGroupId:e=>t=>{e({type:"SET_SELECTED_COMMUNICATION_GROUP_ID",payload:t})}},{automation:null,communicationGroup:null,recipientStats:null,isLoading:!1,isFetchingAutomation:!1,isUpdatingAutomation:!1,isFetchingCommunication:!1,isUpdatingCommunication:!1,openEditPopup:!1,selectedActionId:null,selectedCommunicationGroupId:null},$X),zX=async e=>(await Re(`${d}/${e}`)).data,HX=async e=>{if(!e){return{mergeFields:[]}}return(await Re(`${d}/${e}/merge-fields`)).data},qX={all:["communication-group"]},GX=e=>{const t=ve({queryKey:["communication-group",e],queryFn:()=>e?zX(e):null,enabled:!!e});return{communicationGroup:t.data,isGetting:t.isPending,getError:t.error,isGetSuccess:t.isSuccess}},KX=()=>{const e=ce(),t=ye({mutationFn:({groupId:e,params:t})=>(async(e,t)=>(await Re(`${d}/${e}`,{method:"PATCH",body:JSON.stringify(t)})).data)(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:qX.all})}});return{updateCommunicationGroup:t.mutate,isUpdating:t.isPending,updateError:t.error,isUpdateSuccess:t.isSuccess}},WX=()=>{const e=ye({mutationFn:({id:e,params:t})=>(async(e,t)=>(await Re(`${d}/${e}/test`,{method:"POST",body:JSON.stringify(t)})).data)(e,t)});return{sendTestCommunication:e.mutate,isSending:e.isPending,sendError:e.error,isSendSuccess:e.isSuccess}},YX=async e=>(await Re(`${l}/count`,{method:"POST",body:JSON.stringify(e)})).data,XX={all:["segments"],lists:e=>[...XX.all,"list",...e?.cursor?[e.cursor]:[],...e?.limit?[e.limit]:[],...e?.search?[e.search]:[]],detail:e=>[...XX.all,e]},ZX=()=>{const e=ce(),t=ye({mutationFn:e=>(async e=>(await Re(l,{method:"POST",body:JSON.stringify(e)})).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:["segments"]})}}),n=ve({queryKey:["segments-conditions"],queryFn:()=>(async()=>(await Re(`${l}/conditions`,{method:"GET"})).data)()});return{createSegment:t.mutate,isCreating:t.isPending,createError:t.error,isCreateSuccess:t.isSuccess,segmentsConditions:n.data,isFetching:n.isFetching,isLoading:n.isLoading,fetchError:n.error,refetchSegmentsConditions:n.refetch}},QX=e=>{const t=ve({queryKey:XX.lists(e),queryFn:()=>(async e=>{const t=new URLSearchParams;return e?.cursor&&t.append("cursor",e.cursor),e?.limit&&t.append("limit",e.limit.toString()),e?.search&&t.append("search",e.search),(await Re(`${l}${t.toString()?`?${t.toString()}`:""}`)).data})(e),placeholderData:P,..._e});return{segments:t.data?.results??[],nextCursor:t.data?.pagination.cursor??null,isLoading:t.isLoading,error:t.error,isFetching:t.isFetching,isPlaceholderData:t.isPlaceholderData}},JX=e=>{const t=ce(),n=ve({queryKey:["segments","recipients","count"],queryFn:()=>YX(e)});return{data:n.data,isFetching:n.isFetching,isLoading:n.isLoading,fetchError:n.error,refetchCount:()=>{t.invalidateQueries({queryKey:["segments","recipients","count"]})}}},eZ=e=>{const t=ve({queryKey:XX.detail(e),queryFn:()=>(async e=>e?(await Re(`${l}/${e}`)).data:null)(e),..._e,enabled:!!e});return{segment:t.data,isFetching:t.isFetching,isLoading:t.isLoading}},tZ=e=>{const t=ce(),n=ye({mutationFn:t=>(async(e,t)=>t?(await Re(`${l}/${t}`,{method:"PATCH",body:JSON.stringify(e)})).data:null)(t,e),onSuccess:()=>{t.invalidateQueries({queryKey:["segments",e]})}});return{updateSegment:n.mutate,isUpdating:n.isPending,updateError:n.error,isUpdateSuccess:n.isSuccess}};var nZ=(e=>(e.String="string",e.Number="number",e.Integer="integer",e.Boolean="boolean",e.Date="date",e.DateTime="date-time",e.Array="array",e.ReachResource="reach-resource",e))(nZ||{}),rZ=(e=>(e.ALL_USERS="all_users",e.MANAGED="managed",e.CUSTOM="custom",e))(rZ||{}),oZ=(e=>(e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.GREATER_THAN="greater_than",e.LESS_THAN="less_than",e.EXISTS="exists",e.EQUALS_MONTH_DAY="equals_month_day",e.EQUALS_MONTH_DAY_YEAR="equals_month_day_year",e.BETWEEN_MONTH_DAY="between_month_day",e.BETWEEN_MONTH_DAY_YEAR="between_month_day_year",e.ARRAY_CONTAINS="array_contains",e))(oZ||{});const iZ=()=>{const e=n.useContext(VX);if(void 0===e)throw new Error("useViewAutomationContext must be used within a ViewAutomationProvider");return e},aZ=()=>{const{state:e}=iZ();return e.automation},sZ=()=>{const{state:e}=iZ();return e.communicationGroup},lZ=e=>{const{setRecipientStats:t}=iZ(),{estimatedMatchesStats:r}=(e=>{const{data:t}=JX({includeSegments:e?.includeSegmentIds??[],excludeSegments:e?.excludeSegmentIds??[]}),r=n.useMemo((()=>t?.recipients?t.recipients.reduce(((e,t)=>({emails:e.emails+(t.email?1:0),phones:e.phones+(t.phone?1:0)})),{emails:0,phones:0}):{emails:0,phones:0}),[t?.recipients]);return{estimatedMatches:t,estimatedMatchesStats:r}})(e);n.useEffect((()=>{r&&t(r)}),[r,t])},cZ=({automationId:e,children:n})=>t.jsx(BX,{children:t.jsx(uZ,{automationId:e,children:n})}),uZ=({automationId:e,existingAutomation:r,children:o})=>((e=>{const{setAutomation:t}=n.useContext(VX),{automation:r}=ke(e);n.useEffect((()=>{r&&t(r)}),[r,t])})(e),(e=>{const{isUpdating:t}=Le(e);n.useEffect((()=>{be.emit(t?DX:IX,null)}),[t])})(e),(()=>{const{setCommunicationGroup:e,state:t}=n.useContext(VX),r=t.selectedCommunicationGroupId??t.automation?.actionData?.find((e=>"send_communication"===e.actionType))?.actionMetadata.communicationGroupId,{communicationGroup:o}=GX(r);n.useEffect((()=>{o&&e(o)}),[o,e])})(),(()=>{const{isUpdating:e}=KX();n.useEffect((()=>{be.emit(e?FX:UX,null)}),[e])})(),lZ(r),t.jsx(t.Fragment,{children:o})),dZ={all:["stripo"],token:()=>[...dZ.all,"token"],editorData:()=>[...dZ.all,"editorData"],templates:()=>[...dZ.all,"templates"],demoTemplate:()=>[...dZ.templates(),"demo"]},pZ=async()=>(await Re(`${p}/editor-data`)).data,fZ=async e=>{const{automationId:t,actionId:n}=e;return(await Re(`${p}/template/${t}/${n}`)).data},hZ=({text:e,textSpeed:r=2e3,textColor:o="text-muted-foreground"})=>{const[i,a]=n.useState(0),s=Array.isArray(e)?e:e?[e]:[];return n.useEffect((()=>{if(s.length<=1)return;if(i>=s.length-1)return;const e=setInterval((()=>{a((e=>e<s.length-1?e+1:e))}),r);return()=>clearInterval(e)}),[s.length,r,i]),t.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 @container",children:[t.jsxs("div",{className:"relative h-8 w-8",children:[t.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-primary/20"}),t.jsx("div",{className:"absolute inset-0 animate-spin rounded-full border-2 border-primary border-t-transparent"})]}),s.length>0&&t.jsx("div",{className:`text-center text-sm ${o} animate-fade-in min-w-[200px] max-w-[300px] px-4`,children:t.jsx("div",{className:"break-words",children:s[i]})},i),t.jsx("style",{children:"\n .animate-fade-in {\n animation: fadeIn 0.5s ease-in-out;\n }\n @keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(5px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n "})]})},mZ=({children:e,className:n})=>t.jsx(AX.div,{initial:{opacity:0,filter:"blur(8px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(8px)"},transition:{duration:.3,ease:"easeInOut"},className:n,children:e}),gZ=ru(["reach-styles-module__base___gfFyc"],{variants:{variant:{default:"reach-styles-module__default___ny1h7",destructive:"reach-styles-module__destructive___XjBvS",outline:"reach-styles-module__outline___gFp3i",secondary:"reach-styles-module__secondary___Pd-e3",ghost:"reach-styles-module__ghost___GcnJq",link:"reach-styles-module__link___EgS2H"},size:{default:"reach-styles-module__sizeDefault___8kU5A",sm:"reach-styles-module__sizeSm___zPIEh",lg:"reach-styles-module__sizeLg___D2G8z",icon:"reach-styles-module__sizeIcon___5XkYW"}},defaultVariants:{variant:"default",size:"default"}}),vZ=i.forwardRef((({className:e,variant:n,size:r,asChild:o=!1,...i},a)=>t.jsx(o?ZU:"button",{className:Zd(gZ({variant:n,size:r,className:e})),ref:a,...i})));vZ.displayName="Button";var yZ=(e=>(e.ChooseAutomationType="choose-automation-type",e.SetAutomationName="set-automation-name",e.OneTimeWizard="one-time-wizard",e))(yZ||{});const bZ=({onClose:e,currentStep:n,setCurrentStep:r,isDisabled:o,createAutomation:i,disableBackButton:a})=>t.jsx("div",{children:t.jsxs("div",{className:"flex justify-end space-x-4",children:[t.jsx(vZ,{variant:"secondary",className:"px-4 py-2",onClick:()=>{if(a)e?.(!1);else if(n===yZ.ChooseAutomationType)e?.(!1);else{if(n!==yZ.SetAutomationName)throw new Error("Invalid step");r(yZ.ChooseAutomationType)}},children:n===yZ.ChooseAutomationType||a?"Cancel":"Back"}),t.jsx(vZ,{className:"px-4 py-2",onClick:()=>{o||n!==yZ.SetAutomationName||i()},disabled:o,children:n===yZ.SetAutomationName?"Create":"Next"})]})}),xZ=({onClick:e,title:n,subtitle:r,icon:o,selected:i,disabled:a=!1})=>t.jsxs("button",{onClick:e,className:"flex flex-col items-center justify-center rounded-lg border-2 p-6 transition-all duration-300 ease-in-out hover:shadow-lg "+(a?"opacity-50 cursor-not-allowed hover:shadow-none":i?"scale-[1.02] hover:scale-[1.04] [border-color:hsl(var(--reach-primary))] shadow-lg":"border-gray-200 hover:[border-color:hsl(var(--reach-primary))] hover:bg-gray-50"),children:[o,t.jsxs("div",{className:"text-center mt-3",children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:n}),t.jsx("div",{className:"text-xs text-gray-500 mt-1",children:r})]})]}),wZ={CloseButton:rd,DropdownMenuTrigger:fu,UserIcon:ed,UsersIcon:td,UserEdit:Qu,ScheduleButton:du,SendButton:zu,BackButton:hu,NextButton:mu,MergeField:Ju,PlusIcon:Vu,AlertCircleIcon:yu,AudienceIcon:td,TriggerIcon:od,OneTimeBroadcast:Mu,PatronEntersList:Au,DateMilestone:du,RealtimeActivity:uu,EditIcon:Uu,DuplicateIcon:_u,EmailIcon:Ou,SmsIcon:ju,ExpandIcon:Pu,PreviewButton:$u,MessagesSent:Ru,LinksClicked:Du,OpenRate:Su,SpamComplies:Xu,TotalBounceRate:Xu,UnsubscribeRate:Gu,SalesAmount:cu,CommunicationIcon:Ou,WaitUntilNextFixedTimeIcon:Wu},_Z="text-3xl mb-8",SZ="grid grid-cols-2 gap-6",EZ="relative p-6 rounded-lg",TZ="mb-4 flex items-center justify-center text-primary",CZ="text-lg font-medium mb-2 text-primary",AZ="text-sm text-muted-foreground",NZ="absolute top-3 right-3 bg-gray-100 text-gray-600 text-xs px-2 py-1 rounded-full",RZ=({onNext:e})=>t.jsxs("div",{className:EZ,children:[t.jsx("h1",{className:_Z,children:"Choose Your Automation Type"}),t.jsxs("div",{className:SZ,children:[t.jsx(xZ,{onClick:()=>{e(Fe.ONE_TIME)},title:`${ff("engage:one_time")} Broadcast`,subtitle:"Send a single message to your current list, like announcing a sale or newsletter.",icon:t.jsx(wZ.OneTimeBroadcast,{}),selected:!1}),t.jsx(xZ,{onClick:()=>{},title:"Patron Enters a List",subtitle:"Send whenever someone becomes qualified, like welcoming new subscribers who meet specific criteria.",icon:t.jsx(wZ.PatronEntersList,{}),selected:!1,disabled:!0}),t.jsx(xZ,{onClick:()=>{},title:"Date Milestone",subtitle:"Send whenever someone becomes qualified, like welcoming new subscribers who meet specific criteria.",icon:t.jsx(wZ.DateMilestone,{}),selected:!1,disabled:!0}),t.jsx(xZ,{onClick:()=>{},title:"Realtime Activity",subtitle:"Send whenever someone becomes qualified, like welcoming new subscribers who meet specific criteria.",icon:t.jsx(wZ.RealtimeActivity,{}),selected:!1,disabled:!0})]})]}),OZ="reach-styles-module__container___6PQqs",PZ=ru(["reach-styles-module__base___WFahB"],{variants:{variant:{default:"reach-styles-module__default___zeGU1",secondary:"reach-styles-module__secondary___VQ4iH",destructive:"reach-styles-module__destructive___RLaRD",outline:"reach-styles-module__outline___L2VtW",google:"reach-styles-module__google___HcEij",date:"reach-styles-module__date___-6BC4",statusActive:"reach-styles-module__statusActive___-fNzR",statusCompleted:"reach-styles-module__statusCompleted___Z-Cdz",statusDraft:"reach-styles-module__statusDraft___3BUrD",statusDeactivated:"reach-styles-module__statusDeactivated___xVw1N",statusFailed:"reach-styles-module__statusFailed___VQiDA",statusRunning:"reach-styles-module__statusRunning___1iEjx",segmentAllUsers:"reach-styles-module__segmentAllUsers___1aXpc",segmentManaged:"reach-styles-module__segmentManaged___o0gOu",segmentCustom:"reach-styles-module__segmentCustom___xc3lG"},size:{default:"reach-styles-module__sizeDefault___iGTp4",sm:"reach-styles-module__sizeSm___6T2oK"},iconOnly:{true:"reach-styles-module__iconOnly___8vUSp",false:""}},compoundVariants:[{iconOnly:!0,size:"sm",class:"reach-styles-module__iconOnlySm___9ZKv9"}],defaultVariants:{variant:"default",size:"default",iconOnly:!1}}),kZ=i.forwardRef((({className:e,variant:n,size:r,iconOnly:o,truncate:i,...a},s)=>t.jsx("div",{ref:s,className:Zd(PZ({variant:n,size:r,iconOnly:o}),i&&"max-w-[90px]",e),...a})));kZ.displayName="Badge";i.forwardRef((({className:e,...n},r)=>t.jsx("div",{ref:r,className:Zd(OZ,e),...n}))).displayName="BadgeContainer";const MZ="reach-styles-module__stepIndicatorContainer___FoKXB",jZ="reach-styles-module__iconContainer___Ki-1n",LZ="reach-styles-module__checkIcon___-krUS",DZ="reach-styles-module__minusIcon___r5cKs",IZ="reach-styles-module__minusIconActive___-4JHM",FZ="reach-styles-module__minusIconInactive___JtvVB",UZ="reach-styles-module__label___tiCMA",$Z="reach-styles-module__labelActive___EXydD",VZ="reach-styles-module__labelInactive___g-J3r",BZ=({label:e,isCompleted:n,isActive:r,onClick:o})=>t.jsxs(o?"button":"div",{className:MZ,onClick:o,children:[t.jsx("div",n?{className:jZ,children:t.jsx(pu,{className:LZ})}:{className:jZ,children:t.jsx(Lu,{className:Zd(DZ,r?IZ:FZ)})}),t.jsx("span",{className:Zd(UZ,r?$Z:VZ),children:e})]}),zZ=i.forwardRef((({className:e,...n},r)=>t.jsx("div",{className:"relative w-full bg-primary rounded-lg",children:t.jsx("table",{ref:r,className:Zd("w-full caption-bottom text-sm",e),...n})})));zZ.displayName="Table";const HZ=i.forwardRef((({className:e,...n},r)=>t.jsx("thead",{ref:r,className:Zd("bg-gray-50 [&_tr]:border-b",e),...n})));HZ.displayName="TableHeader";const qZ=i.forwardRef((({className:e,...n},r)=>t.jsx("tbody",{ref:r,className:Zd("[&_tr:last-child]:border-0",e),...n})));qZ.displayName="TableBody";const GZ=i.forwardRef((({className:e,...n},r)=>t.jsx("tr",{ref:r,className:Zd("border-b border-gray-100 bg-card transition-colors hover:bg-card/90 data-[state=selected]:bg-muted",e),...n})));GZ.displayName="TableRow";const KZ=i.forwardRef((({className:e,...n},r)=>t.jsx("th",{ref:r,className:Zd("h-12 px-4 text-left align-middle font-medium text-card-foreground [&:has([role=checkbox])]:pr-0",e),...n})));KZ.displayName="TableHead";const WZ=i.forwardRef((({className:e,...n},r)=>t.jsx("td",{ref:r,className:Zd("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...n})));WZ.displayName="TableCell";
53
+ */function yd(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=bd(e))&&(r&&(r+=" "),r+=t);return r}const bd=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bd(e[r]))&&(n&&(n+=" "),n+=t);return n};function xd(e,...t){let n,r,o,i=function(s){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:hd(e.cacheSize),parseClassName:md(e),...id(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(vd);let s="";for(let l=a.length-1;l>=0;l-=1){const e=a[l],{modifiers:t,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(e);let p=Boolean(d),f=r(p?u.substring(0,d):u);if(!f){if(!p){s=e+(s.length>0?" "+s:s);continue}if(f=r(u),!f){s=e+(s.length>0?" "+s:s);continue}p=!1}const h=gd(t).join(":"),m=c?h+"!":h,g=m+f;if(i.includes(g))continue;i.push(g);const v=o(f,p);for(let n=0;n<v.length;++n)i.push(m+v[n]);s=e+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(yd.apply(null,arguments))}}const wd=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},_d=/^\[(?:([a-z-]+):)?(.+)\]$/i,Sd=/^\d+\/\d+$/,Ed=new Set(["px","full","screen"]),Td=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ad=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Nd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Od=e=>kd(e)||Ed.has(e)||Sd.test(e),Pd=e=>qd(e,"length",Gd),kd=e=>Boolean(e)&&!Number.isNaN(Number(e)),Md=e=>qd(e,"number",kd),jd=e=>Boolean(e)&&Number.isInteger(Number(e)),Ld=e=>e.endsWith("%")&&kd(e.slice(0,-1)),Dd=e=>_d.test(e),Id=e=>Td.test(e),Fd=new Set(["length","size","percentage"]),Ud=e=>qd(e,Fd,Kd),$d=e=>qd(e,"position",Kd),Vd=new Set(["image","url"]),Bd=e=>qd(e,Vd,Yd),zd=e=>qd(e,"",Wd),Hd=()=>!0,qd=(e,t,n)=>{const r=_d.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Gd=e=>Cd.test(e)&&!Ad.test(e),Kd=()=>!1,Wd=e=>Nd.test(e),Yd=e=>Rd.test(e),Xd=xd((()=>{const e=wd("colors"),t=wd("spacing"),n=wd("blur"),r=wd("brightness"),o=wd("borderColor"),i=wd("borderRadius"),a=wd("borderSpacing"),s=wd("borderWidth"),l=wd("contrast"),c=wd("grayscale"),u=wd("hueRotate"),d=wd("invert"),p=wd("gap"),f=wd("gradientColorStops"),h=wd("gradientColorStopPositions"),m=wd("inset"),g=wd("margin"),v=wd("opacity"),y=wd("padding"),b=wd("saturate"),x=wd("scale"),w=wd("sepia"),_=wd("skew"),S=wd("space"),E=wd("translate"),T=()=>["auto",Dd,t],C=()=>[Dd,t],A=()=>["",Od,Pd],N=()=>["auto",kd,Dd],R=()=>["","0",Dd],O=()=>[kd,Dd];return{cacheSize:500,separator:":",theme:{colors:[Hd],spacing:[Od,Pd],blur:["none","",Id,Dd],brightness:O(),borderColor:[e],borderRadius:["none","","full",Id,Dd],borderSpacing:C(),borderWidth:A(),contrast:O(),grayscale:R(),hueRotate:O(),invert:R(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Ld,Pd],inset:T(),margin:T(),opacity:O(),padding:C(),saturate:O(),scale:O(),sepia:R(),skew:O(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",Dd]}],container:["container"],columns:[{columns:[Id]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Dd]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",jd,Dd]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Dd]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",jd,Dd]}],"grid-cols":[{"grid-cols":[Hd]}],"col-start-end":[{col:["auto",{span:["full",jd,Dd]},Dd]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[Hd]}],"row-start-end":[{row:["auto",{span:[jd,Dd]},Dd]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Dd]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Dd]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Dd,t]}],"min-w":[{"min-w":[Dd,t,"min","max","fit"]}],"max-w":[{"max-w":[Dd,t,"none","full","min","max","fit","prose",{screen:[Id]},Id]}],h:[{h:[Dd,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Dd,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Dd,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Dd,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Id,Pd]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Md]}],"font-family":[{font:[Hd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Dd]}],"line-clamp":[{"line-clamp":["none",kd,Md]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Od,Dd]}],"list-image":[{"list-image":["none",Dd]}],"list-style-type":[{list:["none","disc","decimal",Dd]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Od,Pd]}],"underline-offset":[{"underline-offset":["auto",Od,Dd]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Dd]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Dd]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",$d]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ud]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Bd]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Od,Dd]}],"outline-w":[{outline:[Od,Pd]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Od,Pd]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Id,zd]}],"shadow-color":[{shadow:[Hd]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Id,Dd]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Dd]}],duration:[{duration:O()}],ease:[{ease:["linear","in","out","in-out",Dd]}],delay:[{delay:O()}],animate:[{animate:["none","spin","ping","pulse","bounce",Dd]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[jd,Dd]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Dd]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Dd]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Dd]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Od,Pd,Md]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}));function Zd(...e){return Xd(eu(e))}const Qd=Gc,Jd=i.forwardRef((({className:e,...n},r)=>t.jsx(Kc,{ref:r,className:Zd("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-0 sm:right-0 sm:bottom-auto sm:flex-col md:max-w-[420px]",e),...n})));Jd.displayName=Kc.displayName;const ep=ru("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-muted text-muted-foreground",success:"border bg-green-100 text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),tp=i.forwardRef((({className:e,variant:n,...r},o)=>t.jsx(Wc,{ref:o,className:Zd(ep({variant:n}),e),...r})));tp.displayName=Wc.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx(Zc,{ref:r,className:Zd("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...n}))).displayName=Zc.displayName;const np=i.forwardRef((({className:e,...n},r)=>t.jsx(Qc,{ref:r,className:Zd("absolute right-1 top-1 rounded-md p-1 text-foreground/50 hover:text-foreground focus:outline-none focus:ring-1 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...n,children:t.jsx(rd,{className:"h-4 w-4"})})));np.displayName=Qc.displayName;const rp=i.forwardRef((({className:e,...n},r)=>t.jsx(Yc,{ref:r,className:Zd("text-sm font-semibold [&+div]:text-xs",e),...n})));rp.displayName=Yc.displayName;const op=i.forwardRef((({className:e,...n},r)=>t.jsx(Xc,{ref:r,className:Zd("text-sm opacity-90",e),...n})));function ip(){const{toasts:e}=jl();return t.jsxs(Qd,{children:[e.map((function({id:e,title:n,description:r,action:o,...i}){return t.jsxs(tp,{...i,children:[t.jsxs("div",{className:"grid gap-1",children:[n&&t.jsx(rp,{children:n}),r&&t.jsx(op,{children:r})]}),o,t.jsx(np,{})]},e)})),t.jsx(Jd,{})]})}op.displayName=Xc.displayName;const ap=(e,r,o,i)=>{const a=n.createContext({state:o});return{Context:a,Provider:({children:s})=>{const[l,c]=n.useReducer(e,o),u=n.useMemo((()=>Object.keys(r).reduce(((e,t)=>({...e,[t]:r[t](c)})),{})),[c]);n.useEffect((()=>{const e=[];return i?.length&&i.forEach((({eventName:t,handler:n})=>{const r=n(c),o=be.subscribe(t,r);e.push(o)})),()=>e.forEach((e=>e()))}),[c]);const d=n.useMemo((()=>({state:l,...u})),[l,u]);return t.jsx(a.Provider,{value:d,children:s})}}},sp=[{eventName:xe,handler:e=>()=>{e({type:"SET_AUTHENTICATED",payload:!1}),e({type:"SET_REAUTHING",payload:!0})}},{eventName:we,handler:e=>()=>{e({type:"SET_AUTHENTICATED",payload:!0})}},{eventName:"iframe:token-reauthenticated",handler:e=>t=>{t&&"string"==typeof t.token&&(Ne(t.token),e({type:"SET_AUTHENTICATED",payload:!0}))}}],{Context:lp,Provider:cp}=ap(((e,t)=>{switch(t.type){case"SET_AUTHENTICATED":return{...e,isAuthenticated:t.payload,error:null,reauthing:!1};case"SET_LOADING":return{...e,loading:t.payload};case"SET_ERROR":return{...e,error:t.payload,isAuthenticated:!1,reauthing:!1};case"SET_REAUTHING":return e.reauthing&&t.payload?e:{...e,reauthing:t.payload};default:return e}}),{handleReauth:e=>async t=>{if(t){e({type:"SET_REAUTHING",payload:!0});try{const n=await t();n&&(Ne(n),e({type:"SET_AUTHENTICATED",payload:!0}))}catch(n){e({type:"SET_ERROR",payload:n instanceof Error?n.message:"Reauthorization failed"})}}else e({type:"SET_ERROR",payload:"No reauth callback provided"})}},{isAuthenticated:!1,loading:!1,error:null,reauthing:!1},sp),up={background:"0 0% 100%",foreground:"225 15% 16%",card:"0 0% 100%","card-foreground":"225 15% 16%",popover:"0 0% 100%","popover-foreground":"225 15% 16%",primary:"210 30% 25%","primary-foreground":"0 0% 100%",secondary:"210 15% 94%","secondary-foreground":"210 30% 25%",muted:"210 10% 96%","muted-foreground":"220 10% 45%",accent:"210 15% 94%","accent-foreground":"210 30% 25%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 100%",border:"220 13% 90%",input:"220 13% 90%",ring:"210 30% 25%","chart-1":"210 50% 50%","chart-2":"260 50% 55%","chart-3":"150 50% 45%","chart-4":"325 50% 55%","chart-5":"45 80% 55%",radius:"0.625rem","font-body":'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',"font-heading":'"Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},dp=(e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),o=Math.min(e,t,n);let i=0,a=0;const s=(r+o)/2;if(r!==o){const l=r-o;switch(a=s>.5?l/(2-r-o):l/(r+o),r){case e:i=(t-n)/l+(t<n?6:0);break;case t:i=(n-e)/l+2;break;case n:i=(e-t)/l+4}i*=60}return`${Math.round(i)} ${Math.round(100*a)}% ${Math.round(100*s)}%`},pp=e=>{if(/^\d+\s+\d+(?:\.\d+)?%\s+\d+(?:\.\d+)?%$/.test(e.trim()))return e.trim();try{const t=(e=>{const t=document.createElement("div");t.style.color=e,document.body.appendChild(t);const n=window.getComputedStyle(t).color;return document.body.removeChild(t),n})(e),[n,r,o]=(e=>{const t=e.match(/\d+/g);if(!t||t.length<3)throw new Error(`Invalid RGB color format: ${e}`);return[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)]})(t);return dp(n,r,o)}catch(t){return e}},fp=e=>{const t=document.getElementById("reach-theme-styles");t&&t.remove();const n=document.createElement("style");n.id="reach-theme-styles";const r=`\n [data-reach-root] {\n ${Object.entries(up).map((([t,n])=>{const r=e[t];let o=n;if(void 0!==r)if("radius"===t||"font-body"===t||"font-heading"===t)o=r;else if((e=>{if(/^\d+\s+\d+(?:\.\d+)?%\s+\d+(?:\.\d+)?%$/.test(e.trim()))return!0;if(["bg-","text-","border-","ring-","accent-","fill-","stroke-"].some((t=>e.trim().startsWith(t))))return!0;const t=document.createElement("div"),n=t.style.color;return t.style.color=e,t.style.color!==n})(r)){if(/^bg-/.test(r.trim())&&"bg-inherit"!==r.trim()&&"bg-current"!==r.trim()&&"bg-transparent"!==r.trim()){o=(e=>{if("bg-black"===e)return dp(0,0,0);if("bg-white"===e)return dp(255,255,255);const t=e.match(/^bg-([a-z]+)-(\d{2,3})$/);if(!t)throw new Error(`Invalid tailwind color class: ${e}`);const[,n,r]=t,o={red:{50:[254,242,242],100:[254,226,226],200:[254,202,202],300:[252,165,165],400:[248,113,113],500:[239,68,68],600:[220,38,38],700:[185,28,28],800:[153,27,27],900:[127,29,29],950:[69,10,10]},orange:{50:[255,247,237],100:[255,237,213],200:[254,215,170],300:[253,186,116],400:[251,146,60],500:[249,115,22],600:[234,88,12],700:[194,65,12],800:[154,52,18],900:[124,45,18],950:[67,20,7]},amber:{50:[255,251,235],100:[254,243,199],200:[253,230,138],300:[252,211,77],400:[251,191,36],500:[245,158,11],600:[217,119,6],700:[180,83,9],800:[146,64,14],900:[120,53,15],950:[69,26,3]},yellow:{50:[254,252,232],100:[254,249,195],200:[254,240,138],300:[253,224,71],400:[250,204,21],500:[234,179,8],600:[202,138,4],700:[161,98,7],800:[133,77,14],900:[113,63,18],950:[66,32,6]},lime:{50:[247,254,231],100:[236,252,203],200:[217,249,157],300:[190,242,100],400:[163,230,53],500:[132,204,22],600:[101,163,13],700:[77,124,15],800:[63,98,18],900:[54,83,20],950:[26,46,5]},green:{50:[240,253,244],100:[220,252,231],200:[187,247,208],300:[134,239,172],400:[74,222,128],500:[34,197,94],600:[22,163,74],700:[21,128,61],800:[22,101,52],900:[20,83,45],950:[5,46,22]},emerald:{50:[236,253,245],100:[209,250,229],200:[167,243,208],300:[110,231,183],400:[52,211,153],500:[16,185,129],600:[5,150,105],700:[4,120,87],800:[6,95,70],900:[6,78,59],950:[2,44,34]},teal:{50:[240,253,250],100:[204,251,241],200:[153,246,228],300:[94,234,212],400:[45,212,191],500:[20,184,166],600:[13,148,136],700:[15,118,110],800:[17,94,89],900:[19,78,74],950:[4,47,46]},cyan:{50:[236,254,255],100:[207,250,254],200:[165,243,252],300:[103,232,249],400:[34,211,238],500:[6,182,212],600:[8,145,178],700:[14,116,144],800:[21,94,117],900:[22,78,99],950:[8,51,68]},sky:{50:[240,249,255],100:[224,242,254],200:[186,230,253],300:[125,211,252],400:[56,189,248],500:[14,165,233],600:[2,132,199],700:[3,105,161],800:[7,89,133],900:[12,74,110],950:[8,47,73]},blue:{50:[239,246,255],100:[219,234,254],200:[191,219,254],300:[147,197,253],400:[96,165,250],500:[59,130,246],600:[37,99,235],700:[29,78,216],800:[30,64,175],900:[30,58,138],950:[23,37,84]},indigo:{50:[238,242,255],100:[224,231,255],200:[199,210,254],300:[165,180,252],400:[129,140,248],500:[99,102,241],600:[79,70,229],700:[67,56,202],800:[55,48,163],900:[49,46,129],950:[30,27,75]},violet:{50:[245,243,255],100:[237,233,254],200:[221,214,254],300:[196,181,253],400:[167,139,250],500:[139,92,246],600:[124,58,237],700:[109,40,217],800:[91,33,182],900:[76,29,149],950:[46,16,101]},purple:{50:[250,245,255],100:[243,232,255],200:[233,213,255],300:[216,180,254],400:[192,132,252],500:[168,85,247],600:[147,51,234],700:[126,34,206],800:[107,33,168],900:[88,28,135],950:[59,7,100]},fuchsia:{50:[253,244,255],100:[250,232,255],200:[245,208,254],300:[240,171,252],400:[232,121,249],500:[217,70,239],600:[192,38,211],700:[162,28,175],800:[134,25,143],900:[112,26,117],950:[74,4,78]},pink:{50:[253,242,248],100:[252,231,243],200:[251,207,232],300:[249,168,212],400:[244,114,182],500:[236,72,153],600:[219,39,119],700:[190,24,93],800:[157,23,77],900:[131,24,67],950:[80,7,36]},rose:{50:[255,241,242],100:[255,228,230],200:[254,205,211],300:[253,164,175],400:[251,113,133],500:[244,63,94],600:[225,29,72],700:[190,18,60],800:[159,18,57],900:[136,19,55],950:[76,5,25]},slate:{50:[248,250,252],100:[241,245,249],200:[226,232,240],300:[203,213,225],400:[148,163,184],500:[100,116,139],600:[71,85,105],700:[51,65,85],800:[30,41,59],900:[15,23,42],950:[2,6,23]},gray:{50:[249,250,251],100:[243,244,246],200:[229,231,235],300:[209,213,219],400:[156,163,175],500:[107,114,128],600:[75,85,99],700:[55,65,81],800:[31,41,55],900:[17,24,39],950:[3,7,18]},zinc:{50:[250,250,250],100:[244,244,245],200:[228,228,231],300:[212,212,216],400:[161,161,170],500:[113,113,122],600:[82,82,91],700:[63,63,70],800:[39,39,42],900:[24,24,27],950:[9,9,11]},neutral:{50:[250,250,250],100:[245,245,245],200:[229,229,229],300:[212,212,212],400:[163,163,163],500:[115,115,115],600:[82,82,82],700:[64,64,64],800:[38,38,38],900:[23,23,23],950:[10,10,10]},stone:{50:[250,250,249],100:[245,245,244],200:[231,229,228],300:[214,211,209],400:[168,162,158],500:[120,113,108],600:[87,83,78],700:[68,64,60],800:[41,37,36],900:[28,25,23],950:[12,10,9]}};if(!o[n]||!o[n][r])throw new Error(`Unsupported color or shade: ${e}`);const[i,a,s]=o[n][r];return dp(i,a,s)})(r.replace(/['"]/g,"").trim())}else try{o=pp(r)}catch(i){}}return`--reach-${t}: ${o};`})).join("\n")}\n }\n\n /* Apply font families directly */\n [data-reach-root] {\n font-family: var(--reach-font-body);\n }\n \n [data-reach-root] h1,\n [data-reach-root] h2,\n [data-reach-root] h3,\n [data-reach-root] h4,\n [data-reach-root] h5,\n [data-reach-root] h6 {\n font-family: var(--reach-font-heading);\n }\n `;n.textContent=r,document.head.appendChild(n)},{Context:hp,Provider:mp}=ap(((e,t)=>{switch(t.type){case"set_theme":return{...e,loading:!1,error:null,theme:t.payload};case"set_loading":return{...e,loading:t.payload};case"set_error":return{...e,loading:!1,error:t.payload};default:return e}}),{setTheme:e=>t=>e({type:"set_theme",payload:t}),setLoading:e=>t=>e({type:"set_loading",payload:t}),setError:e=>t=>e({type:"set_error",payload:t})},{theme:null,loading:!0,error:null}),gp=({initialTheme:e,children:r})=>{const{setTheme:o,setLoading:i}=n.useContext(hp),a=n.useRef(!1);return n.useEffect((()=>{e&&!a.current?(fp(e.styles),o(e),a.current=!0):i(!1)}),[e,o,i]),t.jsx(t.Fragment,{children:r})},vp=({initialTheme:e,children:n})=>t.jsx(mp,{children:t.jsx(gp,{initialTheme:e,children:n})}),yp=({reauthCallback:e})=>((e=>{const t=n.useContext(lp),r=n.useRef(!1),o=n.useRef(e);if(n.useEffect((()=>{o.current=e}),[e]),void 0===t)throw new Error("useAuthContext must be used within an AuthProvider");const{state:i,handleReauth:a}=t;n.useEffect((()=>{if(!i.isAuthenticated&&i.reauthing&&!r.current){r.current=!0,o.current&&a(o.current);const e=setTimeout((()=>{r.current=!1}),1e4);return()=>clearTimeout(e)}}),[i.isAuthenticated,i.reauthing,a]),n.useEffect((()=>{i.isAuthenticated&&r.current&&(r.current=!1)}),[i.isAuthenticated])})(e),null),bp=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,xp={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},wp=e=>xp[e];let _p={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(bp,wp)};const Sp={type:"3rdParty",init(e){((e={})=>{_p={..._p,...e}})(e.options.react)}},Ep=n.createContext();function Tp({i18n:e,defaultNS:t,children:r}){const o=n.useMemo((()=>({i18n:e,defaultNS:t})),[e,t]);return n.createElement(Ep.Provider,{value:o},r)}const Cp=e=>"string"==typeof e,Ap=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},Np=e=>null==e?"":""+e,Rp=/###/g,Op=e=>e&&e.indexOf("###")>-1?e.replace(Rp,"."):e,Pp=e=>!e||Cp(e),kp=(e,t,n)=>{const r=Cp(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Pp(e))return{};const t=Op(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Pp(e)?{}:{obj:e,k:Op(r[o])}},Mp=(e,t,n)=>{const{obj:r,k:o}=kp(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=kp(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=kp(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},jp=(e,t)=>{const{obj:n,k:r}=kp(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Lp=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Cp(e[r])||e[r]instanceof String||Cp(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Lp(e[r],t[r],n):e[r]=t[r]);return e},Dp=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ip={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Fp=e=>Cp(e)?e.replace(/[&<>"'\/]/g,(e=>Ip[e])):e;const Up=[" ",",","?","!",";"],$p=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Vp=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||"object"!=typeof o)return;let e,t="";for(let a=i;a<r.length;++a)if(a!==i&&(t+=n),t+=r[a],e=o[t],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&a<r.length-1)continue;i+=a-i+1;break}o=e}return o},Bp=e=>e?.replace("_","-"),zp={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){}};class Hp{constructor(e){this.init(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||zp,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(Cp(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Hp(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Hp(this.logger,e)}}var qp=new Hp;class Gp{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let o=0;o<r;o++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,o]=t;for(let i=0;i<o;i++)r.apply(r,[e,...n])}))}}}class Kp extends Gp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):Cp(n)&&o?a.push(...n.split(o)):a.push(n)));const s=jp(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&Cp(n)?Vp(this.data?.[e]?.[t],n,o):s}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Mp(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const o in n)(Cp(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=jp(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Lp(s,n,o):s={...s,...n},Mp(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var Wp={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{t=this.processors[e]?.process(t,n,r,o)??t})),t}};const Yp={};class Xp extends Gp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((e=>{n[e]&&(r[e]=n[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=qp.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){if(null==e)return!1;const t=this.resolve(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});return void 0!==t?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Up.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=$p.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Cp(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:Cp(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===l?.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const u=this.resolve(e,t);let d=u?.res;const p=u?.usedKey||i,f=u?.exactUsedKey||i,h=Object.prototype.toString.apply(d),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!Cp(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(g&&d&&v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0)||Cp(m)&&Array.isArray(d))if(g&&Cp(m)&&Array.isArray(d))d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const c=void 0!==t.count&&!Cp(t.count),p=Xp.hasDefaultValue(t),f=c?this.pluralResolver.getSuffix(l,t.count,t):"",h=t.ordinal&&c?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",m=c&&!t.ordinal&&0===t.count,g=m&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${f}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&p&&(r=!0,d=g),this.isValidLookup(d)||(a=!0,d=i);const v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=p&&g!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",l,s,i,y?g:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=p&&r!==d?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);m&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||g)}))})):r(e,i,g))}d=this.extendTranslation(d,e,t,u,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?d:void 0))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?f:p;for(const i in d)if(Object.prototype.hasOwnProperty.call(d,i)){const e=`${r}${o}${i}`;n[i]=this.translate(e,{...t,joinArrays:!1,ns:a}),n[i]===e&&(n[i]=d[i])}d=n}}return r?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=Cp(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let l=n.replace&&!Cp(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o?.[0]!==r[0]||n.context?i.translate(...r,t):(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=Cp(a)?[a]:a;return null!=e&&s?.length&&!1!==n.applyPostProcessor&&(e=Wp.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Cp(e)&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),l=s.key;n=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==a.count&&!Cp(a.count),d=u&&!a.ordinal&&0===a.count,p=void 0!==a.context&&(Cp(a.context)||"number"==typeof a.context)&&""!==a.context,f=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(i=e,Yp[`${f[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(i)||(Yp[`${f[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${f.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,n,e,a);else{let e;u&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.push(l+e),a.ordinal&&0===e.indexOf(r)&&i.push(l+e.replace(r,this.options.pluralSeparator)),d&&i.push(l+t)),p){const n=`${l}${this.options.contextSeparator}${a.context}`;i.push(n),u&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Cp(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class Zp{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=qp.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Bp(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Bp(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Cp(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch(t){}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Cp(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Cp(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):Cp(e)&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}const Qp={zero:0,one:1,two:2,few:3,many:4,other:5},Jp={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ef{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=qp.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Bp("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(a){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Jp;if(!e.match(/-|_/))return Jp;const n=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(n,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){return this.getSuffixes(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort(((e,t)=>Qp[e]-Qp[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const tf=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=jp(e,n);return void 0!==r?r:jp(t,n)})(e,t,n);return!i&&o&&Cp(n)&&(i=Vp(e,n,r),void 0===i&&(i=Vp(t,n,r))),i},nf=e=>e.replace(/\$/g,"$$$$");class rf{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=qp.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:h,nestingOptionsSeparator:m,maxReplaces:g,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Fp,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Dp(o):i||"{{",this.suffix=a?Dp(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Dp(d):p||Dp("$t("),this.nestingSuffix=f?Dp(f):h||Dp(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=tf(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(tf(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const c=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>nf(e)},{regex:this.regexp,safeValue:e=>nf(this.escapeValue?this.escape(e):e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,o,r);i=Cp(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(u){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else Cp(i)||this.useRawValueToEscape||(i=Np(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),u?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);((a?.length??0)%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(l){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,l),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&!Cp(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,l=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&!Cp(r))return r;Cp(r)||(r=Np(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),l&&(r=s.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const of=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(Bp(r),o),t[a]=s),s(n)}};class af{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=qp.create("formatter"),this.options=e,this.formats={number:of(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:of(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:of(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:of(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:of(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){this.formatSeparator=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=of(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce(((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r?.formatParams?.[r.interpolationkey]||{};t=this.formats[o](e,a.locale||a.lng||r.locale||r.lng||n,{...i,...r,...a})}catch(a){this.logger.warn(a)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}class sf extends Gp{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=qp.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:r,k:o}=kp(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(l){a(l)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Cp(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Cp(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const l={...i,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let o;o=5===c.length?c(e,t,n,r,l):c(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(s){a(s)}else c(e,t,n,r,a,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const lf=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Cp(e[1])&&(t.defaultValue=e[1]),Cp(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),cf=e=>(Cp(e.ns)&&(e.ns=[e.ns]),Cp(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Cp(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),uf=()=>{};class df extends Gp{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=cf(e),this.services={},this.logger=qp,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(Cp(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=lf();this.options={...r,...this.options,...cf(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;qp.init(this.modules.logger?o(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:af;const n=new Zp(this.options);this.store=new Kp(this.options.resources,this.options);const i=this.services;i.logger=qp,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new ef(n,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new rf(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new sf(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Xp(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=uf),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=Ap(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:uf;const n=Cp(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload?.forEach?.((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=Ap();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=uf),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Wp.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=Ap();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Cp(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];i=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const c=r.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map((e=>`${i.keyPrefix}${c}${e}`)):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,r.t(u,i)};return Cp(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.translate(...t)}exists(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=Ap();return this.options.ns?(Cp(e)&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Ap();Cp(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services?.languageUtils||new Zp(lf());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new df(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:uf;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new df(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=Object.keys(this.store.data).reduce(((e,t)=>(e[t]={...this.store.data[t]},Object.keys(e[t]).reduce(((n,r)=>(n[r]={...e[t][r]},n)),{}))),{});o.store=new Kp(e,r),o.services.resourceStore=o.store}return o.translator=new Xp(o.services,r),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)})),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const pf=df.createInstance();pf.createInstance=df.createInstance;const ff=pf.t,{slice:hf,forEach:mf}=[];const gf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,vf={create(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!gf.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!gf.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r}(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let e=n[r];for(;" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(t))return e.substring(t.length,e.length)}return null},remove(e){this.create(e,"",-1)}};var yf={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return vf.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&vf.create(n,e,r,o,i)}},bf={name:"querystring",lookup(e){let t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const r=e.substring(1).split("&");for(let o=0;o<r.length;o++){const e=r[o].indexOf("=");if(e>0){r[o].substring(0,e)===n&&(t=r[o].substring(e+1))}}}return t}};let xf=null;const wf=()=>{if(null!==xf)return xf;try{xf="undefined"!==window&&null!==window.localStorage;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){xf=!1}return xf};var _f={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&wf())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&wf()&&window.localStorage.setItem(n,e)}};let Sf=null;const Ef=()=>{if(null!==Sf)return Sf;try{Sf="undefined"!==window&&null!==window.sessionStorage;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Sf=!1}return Sf};var Tf={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Ef())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Ef()&&window.sessionStorage.setItem(n,e)}},Cf={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let o=0;o<e.length;o++)t.push(e[o]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Af={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Nf={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const r="number"==typeof t?t:0;return n[r]?.replace("/","")}},Rf={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,r="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Of=!1;try{document,Of=!0}catch(JSe){}const Pf=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Of||Pf.splice(1,1);class kf{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(e){return mf.call(hf.call(arguments,1),(t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])})),e}(e,this.options||{},{order:Pf,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=t,this.addDetector(yf),this.addDetector(bf),this.addDetector(_f),this.addDetector(Tf),this.addDetector(Cf),this.addDetector(Af),this.addDetector(Nf),this.addDetector(Rf)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach((t=>{if(this.detectors[t]){let n=this.detectors[t].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(e=e.concat(n))}})),e=e.map((e=>this.options.convertDetectedLanguage(e))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?e:e.length>0?e[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)})))}}kf.type="languageDetector";const Mf={en:{common:{ad_spend:"Ad Spend",date:"Date",close:"Close",continue:"Continue",connected:"Connected",connecting:"Connecting...",reauthenticate:"Reauthenticate",account_settings:"Account Settings",manage_account_settings:"Manage your account settings",copy:"Copy",copied:"Copied",error:"An error occurred",filter:"Filter",finishingUp:"Finishing up...",loading:"Loading...",need_help:"Need help? let us know",next:"Next",next_steps:"Next steps:",number:"{{number}}",previous:"Previous",revenue:"Revenue",revenue_from_ads:"Revenue From Ads",roas:"ROAS",return_on_ad_spend:"Return on Ad Spend",select_dates:"Select dates",total_ads_spend:"Total Ads Spend",measure:{dashboard:{title:"Marketing ROI Dashboard",subtitle:"Track and analyze how your marketing efforts are driving sales",application_status_banner_title:"We are experiencing some issues",application_status_banner_description:"We are aware of an issue affecting the dashboard. We are working on it and will have it resolved soon.",no_metrics_banner_title:"We are unable to display any metrics for this date range",no_metrics_banner_description:"If you have just connected your ad accounts, your metrics should begin populating within the next 24 hours. Please check back soon.",reach_managed_campaign_banner:"Your ads are being managed by Reach. We’ll automatically optimize them to drive the best results."}},authentication:{required:"Authentication required",failed:"Authentication failed",connect_account_title:"Connect Your {{provider}} Account",connect_account_description:"To create and manage ad campaigns, please connect your {{provider}} account",connect_account_button:"Continue with {{provider}}",connect_account_TOS:"By connecting, you agree to our Terms of Service and Privacy Policy"},theme:{loading:"Loading theme...",error:"Error loading theme: {{message}}"},dates:{last_week:"Last week",last_month:"Last month",last_quarter:"Last quarter",last_year:"Last year"},campaigns:{setup:{card_header:"Run paid digital ads to get new leads & customers",title:"Create your first AI-driven Ad campaign in 4 simple clicks",description:"Welcome to the future of advertising! Our AI-powered campaign builder helps you effortlessly design and manage ads that reach your target audience with precision. Get started now to unlock the potential of automated, data-driven advertising.",button:"Set up paid ads",next_steps_description:"Already running ads? Track Your Marketing Results with a few clicks.",link_to_analytics:"Connect your existing accounts to get instant insights into your marketing performance."},how_it_works:{dialog_title:"How It Works",title:"Setup your ad campaign",step1:{title:"Set up budget & review your ads",description:"Define how much you want to spend, review the ad designs, and configure who you want to reach."},step2:{title:"We’ll publish & optimize your ads on Google",description:"We’ll do the hard work of publishing & continuously optimizing your ads on Google making sure you’re getting the best possible return on investment."},step3:{title:"See Customers & Results",description:"When a customer buys from you, we’ll notify you and show you the total revenue driven to your business from each dollar invested in ads. "}},ads_builder:{dialog_trigger:"New campaign",title:"Ads Builder",description:"Create your new ad campaign",review_ad_themes:"Review Ad Themes",example_ad_preview:"Example Ad Preview",example_ad_preview_description:"Here's an example of how prospective customers might see your ads. We will automagically tweak the copy based on your products offered, and improve targeting based on what results in the most dollars to your business."}},analytics:{setup_analytics:"Setup analytics",setup_analytics_description:"Let's get you started with analytics. Connect your data sources to start tracking your customers.",connect_data:{title:"Connect Your Data",description:"We bring all of your ads data together to give you a clear view of which customers are coming in from where."},install_pixel:{copied_to_clipboard:"Copied to clipboard",copied_to_clipboard_description:"The tracking pixel code has been copied to your clipboard.",title:"Install our Tracking Pixel",description:"In order to get a complete picture of how users are interacting with your website, it’s important for the Reach analytics code to be on every page of your website and within as many third-party tools that you use as possible.",card_title:"Install the Snippet inside the <HEAD> of every page",third_party_pages_your_tracking_pixel:"Your Tracking Pixel:",card_description:"Copy this following text and insert it inside of the <HEAD> tags on all pages.",error_generating_pixel_code:"Error generating pixel code - please contact your administrator",third_party_pages_question:"Do you use any websites or landing pages for marketing your business?",third_party_pages_yes:"Yes, I have marketing websites",third_party_pages_no:"No, I don't use any websites",third_party_pages_why_asking:"Why We're Asking For This",third_party_pages_why_asking_description:"Adding our tracking pixel to your website allows us to:",third_party_pages_why_asking_list_1:"Understand how visitors interact with your pages",third_party_pages_why_asking_list_2:"Measure which ads are driving visitors to your site",third_party_pages_why_asking_list_3:"Track conversions from your campaigns",third_party_pages_enter_marketing_website:"Enter your marketing website:",third_party_pages_we_will_use_this_to_help_you_install_the_tracking_pixel:"We'll use this to help you install the tracking pixel",third_party_pages_select_your_website_platform:"Select your website platform:"},third_party_installation_guides:{title:"Installation Guides",description:"These guides will help you add the Reach analytics snippet to your website. The process works with any website builder or platform and most third-party tools.",installation_guide:"{{name}} Installation Guide",official_guide:"Official Guide",shopify:{step_1:"From your Shopify admin, go to Online Store > Themes",step_2:"Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code",step_3:'Open "theme.liquid"',step_4:"Find the </head> tag",step_5:"Paste the code snippet from the section above just before it"},google_tag_manager:{step_1:"Go to https://tagmanager.google.com",step_2:"Sign in to your Google Account",step_3:"Click the Accounts tab, then select Create Account",step_4:"Enter an account name and select your country location",step_5:"In Container Setup, enter a container name (e.g., your website URL)",step_6:'Select "Web" as the container type',step_7:"Click Create and agree to the Terms of Service",step_8:"Once created, you'll receive two code snippets to install:",step_9:"• Place the first snippet in the <head> of your page",step_10:"• Place the second snippet immediately after the opening <body> tag",step_11:"In the Tags tab, click the + button to create a new tag",step_12:'Select "Google Analytics: Universal Analytics" as the tag type',special_note:"Make sure you have the Google Tag Manager container code already installed on your site before adding this tag."},hubspot:{step_1:"Go to Settings → Content → Pages",step_2:'In the upper left, select a domain to edit its settings. Or select "Default settings for all domains"',step_3:'Paste the code from the section above to the "Site Header HTML" field',step_4:'Click "Save"'},wordpress:{step_1:"We recommend using the popular WPCode Plugin",step_2:'In the plugin, select "+ Add Snippet"',step_3:'When presented with a menu of options, navigate to "Add Your Custom Code (New Snippet)" and select "Use snippet"',step_4:"Paste the code snippet from the section above",step_5:'For Insert Method, choose "Auto Insert"',step_6:'For Location, select "Site Wide Header"',step_7:"Be sure to save your snippet"},squarespace:{step_1:"Go to Settings → Advanced → Code Injection",step_2:'Paste the code from the section above into the "Header" field',step_3:'Click "Save"'},wix:{step_1:"Go to Settings → Custom Code",step_2:'Click "+ Add Custom Code"',step_3:"Paste the code from the section above",step_4:'Click "Apply"',step_5:'Set "Add Code to Pages" to "All Pages"'},webflow:{step_1:"Open your project settings",step_2:'Navigate to "Custom Code"',step_3:'Paste the code from the section above into the "Head Code" section',step_4:'Click "Save Changes"'},third_party_systems:{step_1:"Check if your third-party tools (lead forms, scheduling tools, etc.) allow custom code injection",step_2:'Look for options labeled "Custom Code", "Embed Code", or "Advanced Settings"',step_3:"Paste the same tracking code into these sections where available",step_4:"Common locations include:",step_5:"• Head section of your website (for tracking scripts and styles)",step_6:"• Footer section of your website (for tracking scripts and styles)",special_note:"This helps ensure consistent tracking across all your customer touchpoints, even when using external tools."},custom:{step_1:"Locate your website's HTML template or main layout file",step_2:"Find the </head> tag in your HTML",step_3:"Paste the code snippet just before the </head> tag",step_4:"Save the file and deploy your changes"}},success:{title:"Success!",description:"You have successfully connected your data sources and installed our tracking pixel.",what_next:"What happens next?",step_1:"Your ad data will start syncing automatically",step_2:"The pixel will begin tracking conversions on your site",step_3:"You'll see your first analytics reports within 24 hours"}},dashboard:{banners:{metrics_crunching:{title:"Crunching your data",description:"You have successfully connected your ad accounts. We're now crunching your data. Check back soon for relevant metrics."},revoked_accounts:{title:"Your ad accounts have been revoked",description:"Please reconnect your ad accounts to continue using the dashboard."}},roas_chart:{title:"Ad Spend vs Revenue Over Time",campaign_not_available:"Chart is not available for individual campaigns yet"},customer_acquisition:{title:"Client Acquisition",description:"See how many new clients you acquired from each channel",client:"Client",source:"Source",total_spent:"Total Spent",total_revenue:"Total Revenue",status:"Status",no_data:"No data available",source_breakdown:"Source",payment_status:"Payment Status",paid:"Paid",unpaid:"Unpaid",invoice_details:"Invoice Details",amount:"Amount",service:"Service",invoice_date:"Invoice Date"},channel_performance:{title:"Channel Performance",description:"See how each channel performs",channel:"Channel",spend:"Spend",revenue:"Revenue",roas:"ROAS",new_customers:"New Customers"},traffic_conversion:{title:"Traffic Conversion Funnel"},tabs:{overview:"Overview",channel_performance:"Channel Performance",campaign_performance:"Campaign Performance",customer_acquisition:"Customer Acquisition",traffic_conversion:"Traffic Conversion"},metrics:{ads_spend:"Ads Spend",ads_spend_description:"The amount spent on ads in a given period. Sum of all sub-ads accounts (e.g. insta, google). Excluding agency fees",direct_measured_revenue:"Direct Measured Revenue",direct_measured_revenue_description:"The amount of revenue directly measured from ads",measured_revenue:"Measured Revenue",measured_revenue_description:"The amount of revenue measured from ads",direct_measured_conversions:"Direct Measured Conversions",direct_measured_conversions_description:"The amount of conversions directly measured from ads",measured_conversions:"Measured Conversions",measured_conversions_description:"The amount of conversions measured from ads",roas:"ROAS",roas_description:"This is the ratio of the revenue to the ads spend",impressions:"Impressions",impressions_description:"Number of times your ads were shown to potential customers",clicks:"Clicks/Actions",clicks_description:"Total interactions with your ads, including clicks and other actions",website_visitors:"Website Visitors",website_visitors_description:"Unique visitors to your website from advertising campaigns",new_leads:"New Leads",new_leads_description:"New potential customers who provided contact information",customer_ltv:"Customer LTV",customer_ltv_description:"Average lifetime value of customers acquired through ads",new_customers:"New Customers",new_customers_description:"New customers who made a purchase or took an action",new_leads_conversion_rate:"New Leads Conversion Rate",new_leads_conversion_rate_description:"The ratio of new leads to the total number of leads",new_customers_conversion_rate:"New Customers Conversion Rate",new_customers_conversion_rate_description:"The ratio of new customers to the total number of customers",cost_per_click:"Cost Per Click",cost_per_click_description:"The amount spent per click on your ads",click_conversion_rate:"Click Conversion Rate",click_conversion_rate_description:"The ratio of clicks to the total number of clicks",click_through_rate:"Click Through Rate",click_through_rate_description:"The ratio of clicks to the total number of impressions",conversion_rate:"Conversion Rate",conversion_rate_description:"The ratio of conversions to the total number of clicks",total_conversion:"Total Conversion",total_conversion_description:"The total number of conversions from your ads",cac:"CAC",cac_description:"The amount spent per customer acquisition",revenue_per_click:"Revenue Per Click",revenue_per_click_description:"The amount of revenue generated per click on your ads",revenue_per_new_customer:"Revenue Per New Customer",revenue_per_new_customer_description:"The amount of revenue generated per new customer",reengaged_customers:"Reengaged Customers",reengaged_customers_description:"The number of customers who have been reengaged with your ads",expected_revenue:"Expected Revenue",expected_revenue_description:"The amount of revenue you expect to generate from your ads",estimated_revenue:"Estimated Revenue",estimated_revenue_description:"The amount of revenue you expect to generate from your ads"},title:"Marketing Revenue Dashboard",settings_sheet:{setup:"Setup",connected_accounts:"Connected Accounts",setup_analytics:"Setup analytics",setup_analytics_description:"Configure your analytics tracking",setup_campaigns:"Setup campaigns",setup_campaigns_description:"Set up your first campaign",legal:"Legal",terms_of_service:"Terms of Service",privacy_policy:"Privacy Policy"}},setup:{how_it_works:{title:"How It Works",dialog_title:"Setup Marketing Insights",connect_ads_title:"Connect your Ads Accounts",connect_ads_description:"Link your advertising accounts from platforms like Google and Meta to consolidate all your campaign data in one place. This enables comprehensive tracking and analysis of your marketing spend.",install_pixel_title:"Install Our Tracking Pixel",install_pixel_description:"Add our lightweight tracking code to your website to accurately measure customer interactions and conversions. This simple integration helps identify which ads are driving real results for your business.",see_customers_results_title:"See Customers & Results",see_customers_results_description:"Get clear insights into your marketing performance with detailed analytics on customer acquisition, conversion rates, and return on ad spend. Make data-driven decisions to optimize your campaigns and grow your business.",still_have_more_questions:"Still have more questions?",get_started:"Get Started"},initial_setup:{wizard_title:"Connect your ad accounts and see exactly how your campaigns drive revenue",title:"Unlock Clear Insights into Your Marketing Performance",description:"Stop guessing and start knowing. Our performance dashboard gives you a complete view of your marketing efforts, including ad spend, conversions, and return on ad spend (ROAS).",description_2:"With a simple setup process, you’ll have actionable insights at your fingertips to help you make smarter decisions and grow your business.",setup_performance_analytics:"Setup Performance Analytics",next_steps_description:"If you're not running ads yet, you can launch your first AI-powered ad campaign in minutes.",next_steps_link:"We will prompt you to connect your ad accounts and set up your first campaign."}},oauth:{selectAccount:{title:"Select {{platform}} Account",description:"Choose the {{platform}} account you want to connect.",loading:"Loading accounts...",loadingPlatform:"Loading {{platform}} accounts...",loadingDescription:"Please wait while we fetch your available accounts...",noAccounts:"No {{platform}} accounts were found for your account.",noAccountsDescription:"Please make sure you have access to a {{platform}} account and try again.",selectAccountPlaceholder:"Select an account",searchPlaceholder:"Search accounts...",fetchAccounts:"Fetching accounts...",noAccountSelected:"No account selected",enableTrackingParams:"Enable Tracking Parameters",enableTrackingParamsDescription:"Append the reach campaign id parameter to your ad platform tracking settings. We will not overwrite any existing tracking parameters. Required for accurate tracking.",google:{selectAccountDescription:"Select the Google Ads account you want to connect to view your data. These will be linked to our MCC for optimal tracking.",mccAccounts:"MCC Accounts",directAccounts:"Direct Accounts"},meta:{selectAccountDescription:"Choose the Meta Ads account you want to connect to view your data."}},success:{connection:{title:"Connected successfully",description:"Your {{provider}} account has been connected."},revoke:{title:"Account revoked",description:"Your {{provider}} account has been revoked."}},error:{title:"Connection failed",description:"Failed to connect account"},revoke:{title:"Revoke access",description:"Are you sure? Revoking access will remove the connection you have and you will be unable to view your ad metrics.",cancel:"Cancel",revoke:"Revoke",error:{title:"Error",description:"Failed to revoke access"}}},magic_link:{get_started:"Get Started",description:"Reach will be embedded within your platform dashboard but until then, you can get started with a magic link. Log in to your account and start creating AI-powered campaigns or measuring your ad spend and performance.",create_campaigns:"Create AI-generated ad campaigns in minutes",unlock_insights:"Unlock insights into your ad spend and performance",save_time:"Save time with automated campaign optimization",request_new_magic_link:"Request New Magic Link",go_to_dashboard:"Go to Dashboard",continuation_disclaimer:"By continuing, you agree to our <terms_of_service>Terms of Service</terms_of_service> and <privacy_policy>Privacy Policy</privacy_policy>."},empty_state:{analytics:{title:"You haven't connected any ad accounts yet",description:"You can connect your ad accounts in minutes and start driving more customers to your business.",button_text:"Setup analytics"}}},engage:{user:"User",user_other:"Users",automation:"Automation",automation_other:"Automations",segment:"Segment",segment_other:"Segments",one_time:"One Time",trigger_based:"Trigger Based",insight:"Insight",insight_other:"Insights"}},es:{common:{ad_spend:"Gasto en anuncios",date:"Fecha",close:"Cerrar",continue:"Continuar",connected:"Conectado",connecting:"Conectando...",reauthenticate:"Reautenticar",account_settings:"Configuración de cuenta",manage_account_settings:"Configuración de tu cuenta",copy:"Copiar",copied:"Copiado",error:"Se produjo un error",filter:"Filtrar",finishingUp:"Finalizando...",loading:"Cargando...",need_help:"¿Necesitas ayuda? Háznoslo saber",next:"Siguiente",next_steps:"Siguientes pasos:",number:"{{number}}",previous:"Anterior",revenue:"Ingresos",revenue_from_ads:"Ingresos de anuncios",roas:"ROAS",return_on_ad_spend:"Retorno de inversión en anuncios",select_dates:"Selecciona fechas",total_ads_spend:"Gasto total en anuncios",measure:{dashboard:{title:"Panel de ingresos de marketing",subtitle:"Rastrea y analiza cómo tus esfuerzos de marketing están generando ventas",application_status_banner_title:"Estamos experimentando algunos problemas",application_status_banner_description:"Estamos al tanto de un problema que está afectando al panel. Estamos trabajando en ello y lo resolveremos pronto.",no_metrics_banner_title:"No podemos mostrar ninguna métrica para este rango de fechas",no_metrics_banner_description:"Si has conectado tus cuentas de anuncios recientemente, tus métricas deberían comenzar a poblarse en las próximas 24 horas. Por favor, vuelve pronto.",reach_managed_campaign_banner:"Tus anuncios están siendo gestionados por Reach. Automáticamente los optimizaremos para obtener los mejores resultados."}},authentication:{required:"Se requiere autenticación",failed:"Error de autenticación",connect_account_title:"Conecta tu cuenta de {{provider}}",connect_account_description:"Para crear y gestionar campañas de anuncios, por favor conecta tu cuenta de {{provider}}",connect_account_button:"Continuar con {{provider}}",connect_account_TOS:"Al conectarte, aceptas nuestros Términos de Servicio y Política de Privacidad"},theme:{loading:"Cargando tema...",error:"Error al cargar el tema: {{message}}"},dates:{last_week:"Semana pasada",last_month:"Mes pasado",last_quarter:"Trimestre pasado",last_year:"Año pasado"},campaigns:{setup:{card_header:"Lanza anuncios pagados para obtener nuevos leads y clientes",title:"Crea tu primera campaña de anuncios AI en 4 clicks",description:"Bienvenido al futuro del marketing! Nuestro creador de campañas AI te ayuda a diseñar y gestionar anuncios que alcanzan a tu audiencia con precisión. ¡Comienza ahora para desbloquear el potencial de anuncios automatizados y basados en datos.",button:"Configura tus anuncios pagados",next_steps_description:"¿Ya tienes anuncios? Rastrea tus resultados de marketing con solo unos clicks.",link_to_analytics:"Conecta tus cuentas existentes para obtener insights instantáneos sobre tu rendimiento de marketing."},how_it_works:{dialog_title:"Cómo funciona",title:"Configura tu campaña de anuncios",step1:{title:"Configura tu presupuesto y revisa tus anuncios",description:"Define cuánto quieres gastar, revisa los diseños de anuncios y configura quién quieres llegar."},step2:{title:"Publicaremos y optimizaremos tus anuncios en Google",description:"Haremos el trabajo duro de publicar y optimizar tus anuncios en Google para asegurarnos de que obtengas el mejor retorno de inversión posible."},step3:{title:"Ver clientes y resultados",description:"Cuando un cliente compra de ti, te notificaremos y te mostraremos el total de ingresos generados para tu negocio por cada dólar invertido en anuncios."}},ads_builder:{dialog_trigger:"Nueva campaña",title:"Ads Builder",description:"Crea tu nueva campaña de anuncios",review_ad_themes:"Revisa temas de anuncios",example_ad_preview:"Ejemplo de anuncio",example_ad_preview_description:"Aquí tienes un ejemplo de cómo los clientes potenciales podrían ver tus anuncios. Automáticamente ajustaremos el texto basándonos en tus productos ofrecidos y mejoraremos el targeting basándonos en lo que resulta en más dinero para tu negocio."}},analytics:{setup_analytics:"Configura analytics",setup_analytics_description:"Vamos a empezar con analytics. Conecta tus fuentes de datos para empezar a rastrear tus clientes.",connect_data:{title:"Conecta tus datos",description:"Juntamos todos tus datos de anuncios para darte una visión clara de qué clientes están llegando de dónde."},install_pixel:{copied_to_clipboard:"Copiado al portapapeles",copied_to_clipboard_description:"El código del pixel de seguimiento ha sido copiado a tu portapapeles.",title:"Instala nuestro pixel de seguimiento",description:"Para obtener una visión completa de cómo los usuarios interactúan con tu sitio web, es importante que el código de analytics de Reach esté en cada página de tu sitio web y dentro de tantos terceros como puedas usar.",card_title:"Instala el fragmento dentro del <HEAD> de cada página",third_party_pages_your_tracking_pixel:"Tu pixel de seguimiento:",card_description:"Copia este texto y insertalo dentro de las etiquetas <HEAD> en todas las páginas.",error_generating_pixel_code:"Error generando código del pixel - por favor contacta a tu administrador",third_party_pages_question:"¿Utilizas alguna página web o landing page para promocionar tu negocio?",third_party_pages_yes:"Sí, tengo páginas web de marketing",third_party_pages_no:"No, no utilizo ninguna página web",third_party_pages_why_asking:"¿Por qué te pedimos esto?",third_party_pages_why_asking_description:"Añadir nuestro pixel de seguimiento a tu sitio web nos permite:",third_party_pages_why_asking_list_1:"Entender cómo los visitantes interactúan con tus páginas",third_party_pages_why_asking_list_2:"Medir qué anuncios están llevando visitantes a tu sitio",third_party_pages_why_asking_list_3:"Rastrear conversiones desde tus campañas",third_party_pages_enter_marketing_website:"Ingresa tu página web de marketing:",third_party_pages_we_will_use_this_to_help_you_install_the_tracking_pixel:"Usaremos esto para ayudarte a instalar el pixel de seguimiento",third_party_pages_select_your_website_platform:"Selecciona tu plataforma de sitio web:"},third_party_installation_guides:{title:"Guías de instalación",description:"Estas guías te ayudarán a agregar el fragmento de analytics de Reach a tu sitio web. El proceso funciona con cualquier constructor de sitios web o plataforma y la mayoría de las herramientas de terceros.",installation_guide:"Guía de instalación de {{name}}",official_guide:"Guía oficial",shopify:{step_1:"Desde tu Shopify admin, ve a Online Store > Themes",step_2:"Encuentra el tema que quieres editar, haz click en el botón … para abrir el menú de acciones y luego haz click en Editar código",step_3:'Abre "theme.liquid"',step_4:"Encuentra la etiqueta </head>",step_5:"Pega el fragmento de código de la sección anterior justo antes de ella"},google_tag_manager:{step_1:"Ve a https://tagmanager.google.com",step_2:"Inicia sesión en tu cuenta de Google",step_3:"Haz click en la pestaña de Cuentas y selecciona Crear cuenta",step_4:"Ingresa un nombre para tu cuenta y selecciona tu ubicación",step_5:"En Container Setup, ingresa un nombre para tu contenedor (e.g., tu URL de sitio web)",step_6:'Selecciona "Web" como tipo de contenedor',step_7:"Haz click en Crear y acepta los Términos de Servicio",step_8:"Una vez creado, recibirás dos fragmentos de código para instalar:",step_9:"• Coloca el primer fragmento en la etiqueta <head> de tu página",step_10:"• Coloca el segundo fragmento justo después de la etiqueta <body>",step_11:"En la pestaña de Etiquetas, haz click en el botón + para crear una nueva etiqueta",step_12:'Selecciona "Google Analytics: Universal Analytics" como tipo de etiqueta',special_note:"Asegúrate de tener el código del contenedor de Google Tag Manager instalado en tu sitio web antes de agregar esta etiqueta."},hubspot:{step_1:"Ve a Configuración → Contenido → Páginas",step_2:'En la esquina superior izquierda, selecciona un dominio para editar sus ajustes. O selecciona "Ajustes predeterminados para todos los dominios"',step_3:'Pega el código de la sección anterior en el campo "HTML del encabezado del sitio"',step_4:'Haz click en "Guardar"'},wordpress:{step_1:"Recomendamos usar el plugin WPCode",step_2:'En el plugin, selecciona "+ Añadir fragmento"',step_3:'Cuando se te presente un menú de opciones, navega a "Añadir tu código personalizado (nuevo fragmento)" y selecciona "Usar fragmento"',step_4:"Pega el fragmento de código de la sección anterior",step_5:'Para el método de inserción, elige "Auto insertar"',step_6:'Para la ubicación, selecciona "Encabezado del sitio"',step_7:"Asegúrate de guardar tu fragmento"},squarespace:{step_1:"Ve a Configuración → Avanzado → Inyección de código",step_2:'Pega el código de la sección anterior en el campo "Encabezado"',step_3:'Haz click en "Guardar"'},wix:{step_1:"Ve a Configuración → Código personalizado",step_2:'Haz click en "+ Añadir código personalizado"',step_3:"Pega el código de la sección anterior",step_4:'Haz click en "Aplicar"',step_5:'Establece "Añadir código a páginas" a "Todas las páginas"'},webflow:{step_1:"Abre tus ajustes de proyecto",step_2:'Navega a "Código personalizado"',step_3:'Pega el código de la sección anterior en la sección "Código de encabezado"',step_4:'Haz click en "Guardar cambios"'},third_party_systems:{step_1:"Revisa si tus herramientas de terceros (formularios de leads, herramientas de programación, etc.) permiten la inyección de código personalizado",step_2:'Busca opciones etiquetadas como "Código personalizado", "Código incrustado" o "Ajustes avanzados"',step_3:"Pega el mismo código de seguimiento en estas secciones donde esté disponible",step_4:"Los lugares comunes incluyen:",step_5:"• Sección de encabezado de tu sitio web (para scripts y estilos de seguimiento)",step_6:"• Sección de pie de página de tu sitio web (para scripts y estilos de seguimiento)",special_note:"Esto asegura un seguimiento consistente en todos tus puntos de contacto con clientes, incluso cuando usas herramientas externas."},custom:{step_1:"Localiza tu plantilla HTML o archivo de diseño principal",step_2:"Encuentra la etiqueta </head> en tu HTML",step_3:"Pega el fragmento de código justo antes de la etiqueta </head>",step_4:"Guarda el archivo y desplíalo"}},success:{title:"¡Éxito!",description:"Has conectado tus fuentes de datos y instalado nuestro pixel de seguimiento.",what_next:"¿Qué pasa a continuación?",step_1:"Tus datos de anuncios comenzarán a sincronizarse automáticamente",step_2:"El pixel comenzará a rastrear conversiones en tu sitio",step_3:"Verás tus primeros informes de analytics en 24 horas"}},dashboard:{banners:{metrics_crunching:{title:"Trabajando en tus datos",description:"Has conectado tus cuentas de anuncios. Estamos ahora trabajando en tus datos. Vuelve pronto para ver tus métricas relevantes."},revoked_accounts:{title:"Tus cuentas de anuncios han sido revocadas",description:"Por favor, reconecta tus cuentas de anuncios para continuar usando el panel."}},roas_chart:{title:"Gasto en anuncios vs ingresos en el tiempo",campaign_not_available:"El gráfico no está disponible para campañas individuales todavía"},customer_acquisition:{title:"Adquisición de clientes",description:"Ver cómo adquieres nuevos clientes desde cada canal",client:"Cliente",source:"Fuente",total_spent:"Total gastado",total_revenue:"Ingresos totales",status:"Estado",no_data:"No hay datos disponibles",source_breakdown:"Desglose de fuentes",payment_status:"Estado de pago",paid:"Pagado",unpaid:"No pagado",invoice_details:"Detalles de la factura",amount:"Cantidad",service:"Servicio",invoice_date:"Fecha de la factura"},channel_performance:{title:"Rendimiento de canales",description:"Ver cómo cada canal se desempeña",channel:"Canal",spend:"Gasto",revenue:"Ingresos",roas:"ROAS",new_customers:"Nuevos clientes"},traffic_conversion:{title:"Traffic Conversion Funnel"},tabs:{overview:"Resumen",channel_performance:"Rendimiento de canales",campaign_performance:"Rendimiento de campañas",customer_acquisition:"Adquisición de clientes",traffic_conversion:"Conversión de tráfico"},metrics:{ads_spend:"Gasto en anuncios",ads_spend_description:"El gasto en anuncios en un período determinado. Suma de todos los sub-cuentas de anuncios (e.g. insta, google). Excluyendo comisiones de agencias",direct_measured_revenue:"Ingresos medidos directamente",direct_measured_revenue_description:"La cantidad de ingresos medidos directamente desde anuncios",measured_revenue:"Ingresos medidos",measured_revenue_description:"La cantidad de ingresos medidos desde anuncios",direct_measured_conversions:"Conversiones medidas directamente",direct_measured_conversions_description:"La cantidad de conversiones medidas directamente desde anuncios",measured_conversions:"Conversiones medidas",measured_conversions_description:"La cantidad de conversiones medidas desde anuncios",roas:"ROAS",roas_description:"Este es el ratio de los ingresos a los gastos en anuncios",impressions:"Impresiones",impressions_description:"Número de veces que tus anuncios fueron mostrados a potenciales clientes",clicks:"Clicks/Acciones",clicks_description:"Total de interacciones con tus anuncios, incluyendo clicks y otras acciones",website_visitors:"Visitantes web",website_visitors_description:"Visitantes únicos a tu sitio web desde campañas de anuncios",new_leads:"Nuevos leads",new_leads_description:"Nuevos potenciales clientes que proporcionaron información de contacto",customer_ltv:"LTV de cliente",customer_ltv_description:"Valor promedio de vida de clientes adquiridos a través de anuncios",new_customers:"Nuevos clientes",new_customers_description:"Nuevos clientes que hicieron una compra o tomaron una acción",new_leads_conversion_rate:"Tasa de conversión de leads nuevos",new_leads_conversion_rate_description:"El ratio de leads nuevos al total de leads",new_customers_conversion_rate:"Tasa de conversión de nuevos clientes",new_customers_conversion_rate_description:"El ratio de nuevos clientes al total de clientes",cost_per_click:"Costo por click",cost_per_click_description:"El gasto por click en tus anuncios",click_conversion_rate:"Tasa de conversión de clicks",click_conversion_rate_description:"El ratio de clicks al total de clicks",click_through_rate:"Tasa de clics",click_through_rate_description:"El ratio de clicks al total de impresiones",conversion_rate:"Tasa de conversión",conversion_rate_description:"El ratio de conversiones al total de clicks",total_conversion:"Total de conversiones",total_conversion_description:"El número total de conversiones desde tus anuncios",cac:"CAC",cac_description:"El gasto por cliente adquirido",revenue_per_click:"Ingresos por click",revenue_per_click_description:"El ingreso generado por cada click en tus anuncios",revenue_per_new_customer:"Ingresos por nuevo cliente",revenue_per_new_customer_description:"El ingreso generado por cada nuevo cliente",reengaged_customers:"Clientes reactivados",reengaged_customers_description:"El número de clientes que han sido reactivados con tus anuncios",expected_revenue:"Ingresos esperados",expected_revenue_description:"El ingreso que esperas generar desde tus anuncios",estimated_revenue:"Ingresos estimados",estimated_revenue_description:"El ingreso que estimas generar desde tus anuncios"},title:"Panel de ingresos de marketing",settings_sheet:{setup:"Configuración",connected_accounts:"Cuentas conectadas",setup_analytics:"Configurar analytics",setup_analytics_description:"Configura tu tracking de analytics",setup_campaigns:"Configurar campañas",setup_campaigns_description:"Configura tu primera campaña",legal:"Legal",terms_of_service:"Términos de servicio",privacy_policy:"Política de privacidad"}},setup:{how_it_works:{title:"Cómo funciona",dialog_title:"Configura Marketing Insights",connect_ads_title:"Conecta tus cuentas de anuncios",connect_ads_description:"Conecta tus cuentas de anuncios de plataformas como Google y Meta para consolidar todos tus datos de campañas en un solo lugar. Esto te permite rastrear y analizar tu gasto en marketing de manera completa.",install_pixel_title:"Instala nuestro pixel de seguimiento",install_pixel_description:"Añade nuestro código de seguimiento ligero a tu sitio web para medir las interacciones y conversiones de los clientes. Esta integración simple ayuda a identificar qué anuncios están generando resultados reales para tu negocio.",see_customers_results_title:"Ver clientes y resultados",see_customers_results_description:"Obtén una visión clara de tu rendimiento en marketing con análisis detallados sobre adquisición de clientes, tasas de conversión y retorno de inversión en anuncios. Haz decisiones basadas en datos para optimizar tus campañas y crecer tu negocio.",still_have_more_questions:"¿Tienes más preguntas?",get_started:"Comenzar"},initial_setup:{wizard_title:"Conecta tus cuentas de anuncios y ver cómo tus campañas generan ingresos",title:"Desbloquea insights claros en tu rendimiento de marketing",description:"Para empezar, conecta tus cuentas de anuncios de Google y Meta. Esto te permitirá rastrear y analizar tu gasto en marketing de manera completa.",description_2:"Con un proceso de configuración simple, tendrás insights accionables a tu disposición para ayudarte a tomar mejores decisiones y crecer tu negocio.",setup_performance_analytics:"Configura analytics de rendimiento",next_steps_description:"Si no tienes anuncios aún, puedes lanzar tu primera campaña de anuncios AI en minutos.",next_steps_link:"Te pediremos que conectes tus cuentas de anuncios y configures tu primera campaña."}},oauth:{selectAccount:{title:"Cuenta de {{platform}}",description:"Elige la cuenta de {{platform}} que quieres conectar.",loading:"Cargando cuentas...",loadingPlatform:"Cargando cuentas de {{platform}}...",loadingDescription:"Por favor, espera mientras obtenemos tus cuentas disponibles...",noAccounts:"No se encontraron cuentas de {{platform}} para tu cuenta.",noAccountsDescription:"Por favor, asegúrate de tener acceso a una cuenta de {{platform}} y vuelve a intentarlo.",selectAccountPlaceholder:"Selecciona una cuenta",searchPlaceholder:"Buscar cuentas...",fetchAccounts:"Buscando cuentas...",noAccountSelected:"No hay cuenta seleccionada",enableTrackingParams:"Habilitar parámetros de seguimiento",enableTrackingParamsDescription:"Añada el parámetro de ID de campaña de alcance a la configuración de seguimiento de su plataforma publicitaria. No sobrescribiremos ningún parámetro de seguimiento existente. Necesario para un seguimiento preciso.",google:{selectAccountDescription:"Elige la cuenta de Google Ads que quieres conectar para ver tus datos. Estas serán vinculadas a nuestra MCC para un seguimiento óptimo.",mccAccounts:"Cuentas MCC",directAccounts:"Cuentas Directas"},meta:{selectAccountDescription:"Elige la cuenta de Meta Ads que quieres conectar para ver tus datos."}},success:{connection:{title:"Conectado correctamente",description:"Tu cuenta de {{provider}} ha sido conectada."},revoke:{title:"Cuenta revocada",description:"Tu cuenta de {{provider}} ha sido revocada."}},error:{title:"Error al conectar",description:"Error al conectar cuenta"},revoke:{title:"Revocar acceso",description:"¿Estás seguro? Revocar acceso eliminará la conexión que tienes y no podrás ver tus métricas de anuncios.",cancel:"Cancelar",revoke:"Revocar",error:{title:"Error",description:"Error al revocar acceso"}}},magic_link:{get_started:"Comenzar",description:"Reach estará incrustado en tu panel de control pero hasta entonces, puedes comenzar con un enlace mágico. Inicia sesión en tu cuenta y comienza a crear campañas AI o mide tu gasto en anuncios y rendimiento.",create_campaigns:"Crea campañas de anuncios AI en minutos",unlock_insights:"Desbloquea insights en tu gasto en anuncios y rendimiento",save_time:"Ahorra tiempo con optimización de campañas automatizadas",request_new_magic_link:"Solicitar nuevo enlace mágico",go_to_dashboard:"Ir al panel de control",continuation_disclaimer:"Al continuar, aceptas nuestros <terms_of_service>Términos de servicio</terms_of_service> y <privacy_policy>Política de privacidad</privacy_policy>."},empty_state:{analytics:{title:"No tienes ninguna cuenta de anuncios conectada",description:"Puedes conectar tus cuentas de anuncios en minutos y empezar a atraer más clientes a tu negocio.",button_text:"Configurar analytics"}}},engage:{user:"Usuario",user_other:"Usuarios",automation:"Automatización",automation_other:"Automatizaciones",segment:"Segmento",segment_other:"Segmentos",one_time:"Una vez",trigger_based:"Basado en un disparador",insight:"Estadísticas",insight_other:"Estadísticas"}}};pf.use(kf).use(Sp).init({resources:Mf,fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},defaultNS:"common",ns:["common"],load:"languageOnly",detection:{order:["querystring","localStorage","navigator"],lookupQuerystring:"lang",lookupLocalStorage:"i18nextLng",caches:["localStorage"],convertDetectedLanguage:e=>e.split("-")[0]}});const jf={ad_spend:"Ad Spend",date:"Date",close:"Close",continue:"Continue",connected:"Connected",connecting:"Connecting...",reauthenticate:"Reauthenticate",account_settings:"Account Settings",manage_account_settings:"Manage your account settings",copy:"Copy",copied:"Copied",error:"An error occurred",filter:"Filter",finishingUp:"Finishing up...",loading:"Loading...",need_help:"Need help? let us know",next:"Next",next_steps:"Next steps:",number:"{{number}}",previous:"Previous",revenue:"Revenue",revenue_from_ads:"Revenue From Ads",roas:"ROAS",return_on_ad_spend:"Return on Ad Spend",select_dates:"Select dates",total_ads_spend:"Total Ads Spend",measure:{dashboard:{title:"Marketing ROI Dashboard",subtitle:"Track and analyze how your marketing efforts are driving sales",application_status_banner_title:"We are experiencing some issues",application_status_banner_description:"We are aware of an issue affecting the dashboard. We are working on it and will have it resolved soon.",no_metrics_banner_title:"We are unable to display any metrics for this date range",no_metrics_banner_description:"If you have just connected your ad accounts, your metrics should begin populating within the next 24 hours. Please check back soon.",reach_managed_campaign_banner:"Your ads are being managed by Reach. We’ll automatically optimize them to drive the best results."}},authentication:{required:"Authentication required",failed:"Authentication failed",connect_account_title:"Connect Your {{provider}} Account",connect_account_description:"To create and manage ad campaigns, please connect your {{provider}} account",connect_account_button:"Continue with {{provider}}",connect_account_TOS:"By connecting, you agree to our Terms of Service and Privacy Policy"},theme:{loading:"Loading theme...",error:"Error loading theme: {{message}}"},dates:{last_week:"Last week",last_month:"Last month",last_quarter:"Last quarter",last_year:"Last year"},campaigns:{setup:{card_header:"Run paid digital ads to get new leads & customers",title:"Create your first AI-driven Ad campaign in 4 simple clicks",description:"Welcome to the future of advertising! Our AI-powered campaign builder helps you effortlessly design and manage ads that reach your target audience with precision. Get started now to unlock the potential of automated, data-driven advertising.",button:"Set up paid ads",next_steps_description:"Already running ads? Track Your Marketing Results with a few clicks.",link_to_analytics:"Connect your existing accounts to get instant insights into your marketing performance."},how_it_works:{dialog_title:"How It Works",title:"Setup your ad campaign",step1:{title:"Set up budget & review your ads",description:"Define how much you want to spend, review the ad designs, and configure who you want to reach."},step2:{title:"We’ll publish & optimize your ads on Google",description:"We’ll do the hard work of publishing & continuously optimizing your ads on Google making sure you’re getting the best possible return on investment."},step3:{title:"See Customers & Results",description:"When a customer buys from you, we’ll notify you and show you the total revenue driven to your business from each dollar invested in ads. "}},ads_builder:{dialog_trigger:"New campaign",title:"Ads Wizard",description:"Create your new ad campaign",review_ad_themes:"Review Ad Themes",example_ad_preview:"Example Ad Preview",example_ad_preview_description:"Here's an example of how prospective customers might see your ads. We will automagically tweak the copy based on your products offered, and improve targeting based on what results in the most dollars to your business."}},analytics:{setup_analytics:"Setup analytics",setup_analytics_description:"Let's get you started with analytics. Connect your data sources to start tracking your customers.",connect_data:{title:"Connect Your Data",description:"We bring all of your ads data together to give you a clear view of which customers are coming in from where."},install_pixel:{copied_to_clipboard:"Copied to clipboard",copied_to_clipboard_description:"The tracking pixel code has been copied to your clipboard.",title:"Install our Tracking Pixel",description:"In order to get a complete picture of how users are interacting with your website, it’s important for the Reach analytics code to be on every page of your website and within as many third-party tools that you use as possible.",card_title:"Install the Snippet inside the <HEAD> of every page",third_party_pages_your_tracking_pixel:"Your Tracking Pixel:",card_description:"Copy this following text and insert it inside of the <HEAD> tags on all pages.",error_generating_pixel_code:"Error generating pixel code - please contact your administrator",third_party_pages_question:"Do you use any websites or landing pages for marketing your business?",third_party_pages_yes:"Yes, I have marketing websites",third_party_pages_no:"No, I don't use any websites",third_party_pages_why_asking:"Why We're Asking For This",third_party_pages_why_asking_description:"Adding our tracking pixel to your website allows us to:",third_party_pages_why_asking_list_1:"Understand how visitors interact with your pages",third_party_pages_why_asking_list_2:"Measure which ads are driving visitors to your site",third_party_pages_why_asking_list_3:"Track conversions from your campaigns",third_party_pages_enter_marketing_website:"Enter your marketing website:",third_party_pages_we_will_use_this_to_help_you_install_the_tracking_pixel:"We'll use this to help you install the tracking pixel",third_party_pages_select_your_website_platform:"Select your website platform:"},third_party_installation_guides:{title:"Installation Guides",description:"These guides will help you add the Reach analytics snippet to your website. The process works with any website builder or platform and most third-party tools.",installation_guide:"{{name}} Installation Guide",official_guide:"Official Guide",shopify:{step_1:"From your Shopify admin, go to Online Store > Themes",step_2:"Find the theme you want to edit, click the … button to open the actions menu, and then click Edit code",step_3:'Open "theme.liquid"',step_4:"Find the </head> tag",step_5:"Paste the code snippet from the section above just before it"},google_tag_manager:{step_1:"Go to https://tagmanager.google.com",step_2:"Sign in to your Google Account",step_3:"Click the Accounts tab, then select Create Account",step_4:"Enter an account name and select your country location",step_5:"In Container Setup, enter a container name (e.g., your website URL)",step_6:'Select "Web" as the container type',step_7:"Click Create and agree to the Terms of Service",step_8:"Once created, you'll receive two code snippets to install:",step_9:"• Place the first snippet in the <head> of your page",step_10:"• Place the second snippet immediately after the opening <body> tag",step_11:"In the Tags tab, click the + button to create a new tag",step_12:'Select "Google Analytics: Universal Analytics" as the tag type',special_note:"Make sure you have the Google Tag Manager container code already installed on your site before adding this tag."},hubspot:{step_1:"Go to Settings → Content → Pages",step_2:'In the upper left, select a domain to edit its settings. Or select "Default settings for all domains"',step_3:'Paste the code from the section above to the "Site Header HTML" field',step_4:'Click "Save"'},wordpress:{step_1:"We recommend using the popular WPCode Plugin",step_2:'In the plugin, select "+ Add Snippet"',step_3:'When presented with a menu of options, navigate to "Add Your Custom Code (New Snippet)" and select "Use snippet"',step_4:"Paste the code snippet from the section above",step_5:'For Insert Method, choose "Auto Insert"',step_6:'For Location, select "Site Wide Header"',step_7:"Be sure to save your snippet"},squarespace:{step_1:"Go to Settings → Advanced → Code Injection",step_2:'Paste the code from the section above into the "Header" field',step_3:'Click "Save"'},wix:{step_1:"Go to Settings → Custom Code",step_2:'Click "+ Add Custom Code"',step_3:"Paste the code from the section above",step_4:'Click "Apply"',step_5:'Set "Add Code to Pages" to "All Pages"'},webflow:{step_1:"Open your project settings",step_2:'Navigate to "Custom Code"',step_3:'Paste the code from the section above into the "Head Code" section',step_4:'Click "Save Changes"'},third_party_systems:{step_1:"Check if your third-party tools (lead forms, scheduling tools, etc.) allow custom code injection",step_2:'Look for options labeled "Custom Code", "Embed Code", or "Advanced Settings"',step_3:"Paste the same tracking code into these sections where available",step_4:"Common locations include:",step_5:"• Head section of your website (for tracking scripts and styles)",step_6:"• Footer section of your website (for tracking scripts and styles)",special_note:"This helps ensure consistent tracking across all your customer touchpoints, even when using external tools."},custom:{step_1:"Locate your website's HTML template or main layout file",step_2:"Find the </head> tag in your HTML",step_3:"Paste the code snippet just before the </head> tag",step_4:"Save the file and deploy your changes"}},success:{title:"Success!",description:"You have successfully connected your data sources and installed our tracking pixel.",what_next:"What happens next?",step_1:"Your ad data will start syncing automatically",step_2:"The pixel will begin tracking conversions on your site",step_3:"You'll see your first analytics reports within 24 hours"}},dashboard:{banners:{metrics_crunching:{title:"Crunching your data",description:"You have successfully connected your ad accounts. We're now crunching your data. Check back soon for relevant metrics."},revoked_accounts:{title:"Your ad accounts have been revoked",description:"Please reconnect your ad accounts to continue using the dashboard."}},roas_chart:{title:"Ad Spend vs Revenue Over Time",campaign_not_available:"Chart is not available for individual campaigns yet"},customer_acquisition:{title:"Client Acquisition",description:"See how many new clients you acquired from each channel",client:"Client",source:"Source",total_spent:"Total Spent",total_revenue:"Total Revenue",status:"Status",no_data:"No data available",source_breakdown:"Source",payment_status:"Payment Status",paid:"Paid",unpaid:"Unpaid",invoice_details:"Invoice Details",amount:"Amount",service:"Service",invoice_date:"Invoice Date"},channel_performance:{title:"Channel Performance",description:"See how each channel performs",channel:"Channel",spend:"Spend",revenue:"Revenue",roas:"ROAS",new_customers:"New Customers"},traffic_conversion:{title:"Traffic Conversion Funnel"},tabs:{overview:"Overview",channel_performance:"Channel Performance",campaign_performance:"Campaign Performance",customer_acquisition:"Customer Acquisition",traffic_conversion:"Traffic Conversion"},metrics:{ads_spend:"Ads Spend",ads_spend_description:"The amount spent on ads in a given period. Sum of all sub-ads accounts (e.g. insta, google). Excluding agency fees",direct_measured_revenue:"Direct Measured Revenue",direct_measured_revenue_description:"The amount of revenue directly measured from ads",measured_revenue:"Measured Revenue",measured_revenue_description:"The amount of revenue measured from ads",direct_measured_conversions:"Direct Measured Conversions",direct_measured_conversions_description:"The amount of conversions directly measured from ads",measured_conversions:"Measured Conversions",measured_conversions_description:"The amount of conversions measured from ads",roas:"ROAS",roas_description:"This is the ratio of the revenue to the ads spend",impressions:"Impressions",impressions_description:"Number of times your ads were shown to potential customers",clicks:"Clicks/Actions",clicks_description:"Total interactions with your ads, including clicks and other actions",website_visitors:"Website Visitors",website_visitors_description:"Unique visitors to your website from advertising campaigns",new_leads:"New Leads",new_leads_description:"New potential customers who provided contact information",customer_ltv:"Customer LTV",customer_ltv_description:"Average lifetime value of customers acquired through ads",new_customers:"New Customers",new_customers_description:"New customers who made a purchase or took an action",new_leads_conversion_rate:"New Leads Conversion Rate",new_leads_conversion_rate_description:"The ratio of new leads to the total number of leads",new_customers_conversion_rate:"New Customers Conversion Rate",new_customers_conversion_rate_description:"The ratio of new customers to the total number of customers",cost_per_click:"Cost Per Click",cost_per_click_description:"The amount spent per click on your ads",click_conversion_rate:"Click Conversion Rate",click_conversion_rate_description:"The ratio of clicks to the total number of clicks",click_through_rate:"Click Through Rate",click_through_rate_description:"The ratio of clicks to the total number of impressions",conversion_rate:"Conversion Rate",conversion_rate_description:"The ratio of conversions to the total number of clicks",total_conversion:"Total Conversion",total_conversion_description:"The total number of conversions from your ads",cac:"CAC",cac_description:"The amount spent per customer acquisition",revenue_per_click:"Revenue Per Click",revenue_per_click_description:"The amount of revenue generated per click on your ads",revenue_per_new_customer:"Revenue Per New Customer",revenue_per_new_customer_description:"The amount of revenue generated per new customer",reengaged_customers:"Reengaged Customers",reengaged_customers_description:"The number of customers who have been reengaged with your ads",expected_revenue:"Expected Revenue",expected_revenue_description:"The amount of revenue you expect to generate from your ads",estimated_revenue:"Estimated Revenue",estimated_revenue_description:"The amount of revenue you expect to generate from your ads"},title:"Marketing Revenue Dashboard",settings_sheet:{setup:"Setup",connected_accounts:"Connected Accounts",setup_analytics:"Setup analytics",setup_analytics_description:"Configure your analytics tracking",setup_campaigns:"Setup campaigns",setup_campaigns_description:"Set up your first campaign",legal:"Legal",terms_of_service:"Terms of Service",privacy_policy:"Privacy Policy"}},setup:{how_it_works:{title:"How It Works",dialog_title:"Setup Marketing Insights",connect_ads_title:"Connect your Ads Accounts",connect_ads_description:"Link your advertising accounts from platforms like Google and Meta to consolidate all your campaign data in one place. This enables comprehensive tracking and analysis of your marketing spend.",install_pixel_title:"Install Our Tracking Pixel",install_pixel_description:"Add our lightweight tracking code to your website to accurately measure customer interactions and conversions. This simple integration helps identify which ads are driving real results for your business.",see_customers_results_title:"See Customers & Results",see_customers_results_description:"Get clear insights into your marketing performance with detailed analytics on customer acquisition, conversion rates, and return on ad spend. Make data-driven decisions to optimize your campaigns and grow your business.",still_have_more_questions:"Still have more questions?",get_started:"Get Started"},initial_setup:{wizard_title:"Connect your ad accounts and see exactly how your campaigns drive revenue",title:"Unlock Clear Insights into Your Marketing Performance",description:"Stop guessing and start knowing. Our performance dashboard gives you a complete view of your marketing efforts, including ad spend, conversions, and return on ad spend (ROAS).",description_2:"With a simple setup process, you’ll have actionable insights at your fingertips to help you make smarter decisions and grow your business.",setup_performance_analytics:"Setup Performance Analytics",next_steps_description:"If you're not running ads yet, you can launch your first AI-powered ad campaign in minutes.",next_steps_link:"We will prompt you to connect your ad accounts and set up your first campaign."}},oauth:{selectAccount:{title:"Select {{platform}} Account",description:"Choose the {{platform}} account you want to connect.",loading:"Loading accounts...",loadingPlatform:"Loading {{platform}} accounts...",loadingDescription:"Please wait while we fetch your available accounts...",noAccounts:"No {{platform}} accounts were found for your account.",noAccountsDescription:"Please make sure you have access to a {{platform}} account and try again.",selectAccountPlaceholder:"Select an account",searchPlaceholder:"Search accounts...",fetchAccounts:"Fetching accounts...",noAccountSelected:"No account selected",enableTrackingParams:"Enable Tracking Parameters",enableTrackingParamsDescription:"Append the reach campaign id parameter to your ad platform tracking settings. We will not overwrite any existing tracking parameters. Required for accurate tracking.",google:{selectAccountDescription:"Select the Google Ads account you want to connect to view your data. These will be linked to our MCC for optimal tracking.",mccAccounts:"MCC Accounts",directAccounts:"Direct Accounts"},meta:{selectAccountDescription:"Choose the Meta Ads account you want to connect to view your data."}},success:{connection:{title:"Connected successfully",description:"Your {{provider}} account has been connected."},revoke:{title:"Account revoked",description:"Your {{provider}} account has been revoked."}},error:{title:"Connection failed",description:"Failed to connect account"},revoke:{title:"Revoke access",description:"Are you sure? Revoking access will remove the connection you have and you will be unable to view your ad metrics.",cancel:"Cancel",revoke:"Revoke",error:{title:"Error",description:"Failed to revoke access"}}},magic_link:{get_started:"Get Started",description:"Reach will be embedded within your platform dashboard but until then, you can get started with a magic link. Log in to your account and start creating AI-powered campaigns or measuring your ad spend and performance.",create_campaigns:"Create AI-generated ad campaigns in minutes",unlock_insights:"Unlock insights into your ad spend and performance",save_time:"Save time with automated campaign optimization",request_new_magic_link:"Request New Magic Link",go_to_dashboard:"Go to Dashboard",continuation_disclaimer:"By continuing, you agree to our <terms_of_service>Terms of Service</terms_of_service> and <privacy_policy>Privacy Policy</privacy_policy>."},empty_state:{analytics:{title:"You haven't connected any ad accounts yet",description:"You can connect your ad accounts in minutes and start driving more customers to your business.",button_text:"Setup analytics"}}},Lf=({children:e,language:r,initialLanguage:o})=>(n.useEffect((()=>{o&&pf.changeLanguage(o)}),[o]),n.useEffect((()=>{if(r?.overrides){const e=(e,t)=>{const n=r?.overrides?.[e]?.[t];return n?{...jf,...Object.entries(n).reduce(((e,[t,n])=>({...e,[t]:n})),{})}:jf};Object.keys(r.overrides).forEach((t=>{const n=e(t,"en"),r=e(t,"es");pf.addResourceBundle("en",t,n,!0,!0),pf.addResourceBundle("es",t,r,!0,!0)}))}}),[r?.overrides]),t.jsx(Tp,{i18n:pf,children:e}));var Df={},If={},Ff="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Uf="1.8.0",$f=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;var Vf=function(e){var t=new Set([e]),n=new Set,r=e.match($f);if(!r)return function(){return!1};var o=+r[1],i=+r[2],a=+r[3];if(null!=r[4])return function(t){return t===e};function s(e){return n.add(e),!1}function l(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var r=e.match($f);if(!r)return s(e);var c=+r[2],u=+r[3];return null!=r[4]||o!==+r[1]?s(e):0===o?i===c&&a<=u?l(e):s(e):i<=c?l(e):s(e)}}(Uf),Bf=Uf.split(".")[0],zf=Symbol.for("opentelemetry.js.api."+Bf),Hf=Ff;function qf(e,t,n,r){var o;void 0===r&&(r=!1);var i=Hf[zf]=null!==(o=Hf[zf])&&void 0!==o?o:{version:Uf};if(!r&&i[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(a.stack||a.message),!1}if(i.version!==Uf){a=new Error("@opentelemetry/api: Registration of version v"+i.version+" for "+e+" does not match previously registered API v"+Uf);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+Uf+"."),!0}function Gf(e){var t,n,r=null===(t=Hf[zf])||void 0===t?void 0:t.version;if(r&&Vf(r))return null===(n=Hf[zf])||void 0===n?void 0:n[e]}function Kf(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Uf+".");var n=Hf[zf];n&&delete n[e]}var Wf,Yf,Xf=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zf("debug",this._namespace,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zf("error",this._namespace,e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zf("info",this._namespace,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zf("warn",this._namespace,e)},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Zf("verbose",this._namespace,e)},e}();function Zf(e,t,n){var r=Gf("diag");if(r)return n.unshift(t),r[e].apply(r,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(n),!1))}(Yf=Wf||(Wf={}))[Yf.NONE=0]="NONE",Yf[Yf.ERROR=30]="ERROR",Yf[Yf.WARN=50]="WARN",Yf[Yf.INFO=60]="INFO",Yf[Yf.DEBUG=70]="DEBUG",Yf[Yf.VERBOSE=80]="VERBOSE",Yf[Yf.ALL=9999]="ALL";var Qf=function(){function e(){function e(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=Gf("diag");if(r)return r[e].apply(r,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(t),!1))}}var t=this;t.setLogger=function(e,n){var r,o,i;if(void 0===n&&(n={logLevel:Wf.INFO}),e===t){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!==(r=a.stack)&&void 0!==r?r:a.message),!1}"number"==typeof n&&(n={logLevel:n});var s=Gf("diag"),l=function(e,t){function n(n,r){var o=t[n];return"function"==typeof o&&e>=r?o.bind(t):function(){}}return e<Wf.NONE?e=Wf.NONE:e>Wf.ALL&&(e=Wf.ALL),t=t||{},{error:n("error",Wf.ERROR),warn:n("warn",Wf.WARN),info:n("info",Wf.INFO),debug:n("debug",Wf.DEBUG),verbose:n("verbose",Wf.VERBOSE)}}(null!==(o=n.logLevel)&&void 0!==o?o:Wf.INFO,e);if(s&&!n.suppressOverrideMessage){var c=null!==(i=(new Error).stack)&&void 0!==i?i:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from "+c),l.warn("Current logger will overwrite one already registered from "+c)}return qf("diag",l,t,!0)},t.disable=function(){Kf("diag",t)},t.createComponentLogger=function(e){return new Xf(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),Jf=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2);return[t[0],t[1]]}))},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=new e(this._entries);try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),s=a.next();!s.done;s=a.next()){i._entries.delete(s.value)}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},e.prototype.clear=function(){return new e},e}(),eh=Symbol("BaggageEntryMetadata"),th=Qf.instance();function nh(e){return void 0===e&&(e={}),new Jf(new Map(Object.entries(e)))}function rh(e){return"string"!=typeof e&&(th.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:eh,toString:function(){return e}}}function oh(e){return Symbol.for(e)}var ih,ah,sh=new(function(){return function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var o=new e(n._currentContext);return o._currentContext.set(t,r),o},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}}}()),lh=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],ch=function(){return function(){function e(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(console){var r=console[e];if("function"!=typeof r&&(r=console.log),"function"==typeof r)return r.apply(console,t)}}}for(var t=0;t<lh.length;t++)this[lh[t].n]=e(lh[t].c)}}(),uh=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dh=function(){function e(){}return e.prototype.createHistogram=function(e,t){return _h},e.prototype.createCounter=function(e,t){return wh},e.prototype.createUpDownCounter=function(e,t){return Sh},e.prototype.createObservableGauge=function(e,t){return Th},e.prototype.createObservableCounter=function(e,t){return Eh},e.prototype.createObservableUpDownCounter=function(e,t){return Ch},e.prototype.addBatchObservableCallback=function(e,t){},e.prototype.removeBatchObservableCallback=function(e){},e}(),ph=function(){return function(){}}(),fh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t.prototype.add=function(e,t){},t}(ph),hh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t.prototype.add=function(e,t){},t}(ph),mh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t.prototype.record=function(e,t){},t}(ph),gh=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.removeCallback=function(e){},e}(),vh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t}(gh),yh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t}(gh),bh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uh(t,e),t}(gh),xh=new dh,wh=new fh,_h=new mh,Sh=new hh,Eh=new vh,Th=new yh,Ch=new bh;(ah=ih||(ih={}))[ah.INT=0]="INT",ah[ah.DOUBLE=1]="DOUBLE";var Ah,Nh,Rh={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},Oh={set:function(e,t,n){null!=e&&(e[t]=n)}},Ph=function(){function e(){}return e.prototype.active=function(){return sh},e.prototype.with=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];return t.call.apply(t,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([n],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(r),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),kh="context",Mh=new Ph,jh=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return qf(kh,e,Qf.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,t,n){for(var r,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(r=this._getContextManager()).with.apply(r,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e,t,n],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(o),!1))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return Gf(kh)||Mh},e.prototype.disable=function(){this._getContextManager().disable(),Kf(kh,Qf.instance())},e}();(Nh=Ah||(Ah={}))[Nh.NONE=0]="NONE",Nh[Nh.SAMPLED=1]="SAMPLED";var Lh="0000000000000000",Dh="00000000000000000000000000000000",Ih={traceId:Dh,spanId:Lh,traceFlags:Ah.NONE},Fh=function(){function e(e){void 0===e&&(e=Ih),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}(),Uh=oh("OpenTelemetry Context Key SPAN");function $h(e){return e.getValue(Uh)||void 0}function Vh(){return $h(jh.getInstance().active())}function Bh(e,t){return e.setValue(Uh,t)}function zh(e){return e.deleteValue(Uh)}function Hh(e,t){return Bh(e,new Fh(t))}function qh(e){var t;return null===(t=$h(e))||void 0===t?void 0:t.spanContext()}var Gh=/^([0-9a-f]{32})$/i,Kh=/^[0-9a-f]{16}$/i;function Wh(e){return Gh.test(e)&&e!==Dh}function Yh(e){return Kh.test(e)&&e!==Lh}function Xh(e){return Wh(e.traceId)&&Yh(e.spanId)}function Zh(e){return new Fh(e)}var Qh=jh.getInstance(),Jh=function(){function e(){}return e.prototype.startSpan=function(e,t,n){if(void 0===n&&(n=Qh.active()),Boolean(null==t?void 0:t.root))return new Fh;var r,o=n&&qh(n);return"object"==typeof(r=o)&&"string"==typeof r.spanId&&"string"==typeof r.traceId&&"number"==typeof r.traceFlags&&Xh(o)?new Fh(o):new Fh},e.prototype.startActiveSpan=function(e,t,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=t:3===arguments.length?(o=t,a=n):(o=t,i=n,a=r);var s=null!=i?i:Qh.active(),l=this.startSpan(e,o,s),c=Bh(s,l);return Qh.with(c,a,void 0,l)}},e}();var em,tm,nm,rm,om,im,am=new Jh,sm=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):am},e}(),lm=new(function(){function e(){}return e.prototype.getTracer=function(e,t,n){return new Jh},e}()),cm=function(){function e(){}return e.prototype.getTracer=function(e,t,n){var r;return null!==(r=this.getDelegateTracer(e,t,n))&&void 0!==r?r:new sm(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:lm},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getTracer(e,t,n)},e}();(tm=em||(em={}))[tm.NOT_RECORD=0]="NOT_RECORD",tm[tm.RECORD=1]="RECORD",tm[tm.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED",(rm=nm||(nm={}))[rm.INTERNAL=0]="INTERNAL",rm[rm.SERVER=1]="SERVER",rm[rm.CLIENT=2]="CLIENT",rm[rm.PRODUCER=3]="PRODUCER",rm[rm.CONSUMER=4]="CONSUMER",(im=om||(om={}))[im.UNSET=0]="UNSET",im[im.OK=1]="OK",im[im.ERROR=2]="ERROR";var um="[_0-9a-z-*/]",dm=new RegExp("^(?:"+("[a-z]"+um+"{0,255}")+"|"+("[a-z0-9]"+um+"{0,240}@[a-z]"+um+"{0,13}")+")$"),pm=/^[ -~]{0,255}[!-~]$/,fm=/,|=/;var hm=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,t.length);(function(e){return dm.test(e)})(o)&&function(e){return pm.test(e)&&!fm.test(e)}(i)&&e.set(o,i)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}();var mm=jh.getInstance(),gm=Qf.instance(),vm=new(function(){function e(){}return e.prototype.getMeter=function(e,t,n){return xh},e}()),ym="metrics",bm=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(e){return qf(ym,e,Qf.instance())},e.prototype.getMeterProvider=function(){return Gf(ym)||vm},e.prototype.getMeter=function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)},e.prototype.disable=function(){Kf(ym,Qf.instance())},e}().getInstance(),xm=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}(),wm=oh("OpenTelemetry Baggage Key");function _m(e){return e.getValue(wm)||void 0}function Sm(){return _m(jh.getInstance().active())}function Em(e,t){return e.setValue(wm,t)}function Tm(e){return e.deleteValue(wm)}var Cm="propagation",Am=new xm,Nm=function(){function e(){this.createBaggage=nh,this.getBaggage=_m,this.getActiveBaggage=Sm,this.setBaggage=Em,this.deleteBaggage=Tm}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return qf(Cm,e,Qf.instance())},e.prototype.inject=function(e,t,n){return void 0===n&&(n=Oh),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return void 0===n&&(n=Rh),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){Kf(Cm,Qf.instance())},e.prototype._getGlobalPropagator=function(){return Gf(Cm)||Am},e}().getInstance(),Rm="trace",Om=function(){function e(){this._proxyTracerProvider=new cm,this.wrapSpanContext=Zh,this.isSpanContextValid=Xh,this.deleteSpan=zh,this.getSpan=$h,this.getActiveSpan=Vh,this.getSpanContext=qh,this.setSpan=Bh,this.setSpanContext=Hh}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=qf(Rm,this._proxyTracerProvider,Qf.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return Gf(Rm)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){Kf(Rm,Qf.instance()),this._proxyTracerProvider=new cm},e}().getInstance();const Pm={context:mm,diag:gm,metrics:bm,propagation:Nm,trace:Om},km=Object.freeze(Object.defineProperty({__proto__:null,DiagConsoleLogger:ch,get DiagLogLevel(){return Wf},INVALID_SPANID:Lh,INVALID_SPAN_CONTEXT:Ih,INVALID_TRACEID:Dh,ProxyTracer:sm,ProxyTracerProvider:cm,ROOT_CONTEXT:sh,get SamplingDecision(){return em},get SpanKind(){return nm},get SpanStatusCode(){return om},get TraceFlags(){return Ah},get ValueType(){return ih},baggageEntryMetadataFromString:rh,context:mm,createContextKey:oh,createNoopMeter:function(){return xh},createTraceState:function(e){return new hm(e)},default:Pm,defaultTextMapGetter:Rh,defaultTextMapSetter:Oh,diag:gm,isSpanContextValid:Xh,isValidSpanId:Yh,isValidTraceId:Wh,metrics:bm,propagation:Nm,trace:Om},Symbol.toStringTag,{value:"Module"}));var Mm=function(){function e(){}return e.prototype.emit=function(e){},e}(),jm=new(function(){function e(){}return e.prototype.getLogger=function(e,t,n){return new Mm},e}()),Lm="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Dm=Symbol.for("io.opentelemetry.js.api.logs"),Im=Lm;var Fm=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(e){return Im[Dm]?this.getLoggerProvider():(Im[Dm]=(t=1,n=e,r=jm,function(e){return e===t?n:r}),e);var t,n,r},e.prototype.getLoggerProvider=function(){var e,t;return null!==(t=null===(e=Im[Dm])||void 0===e?void 0:e.call(Im,1))&&void 0!==t?t:jm},e.prototype.getLogger=function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)},e.prototype.disable=function(){delete Im[Dm]},e}().getInstance();function Um(e){void 0===e&&(e=[]);for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];if(Array.isArray(o)){var i=Um(o);t=t.concat(i.instrumentations)}else"function"==typeof o?t.push(new o):o.instrumentationName&&t.push(o)}return{instrumentations:t}}function $m(e){return"function"==typeof e}var Vm=function(){}.bind();function Bm(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function zm(e){e&&e.logger&&($m(e.logger)?Vm=e.logger:Vm("new logger isn't a function, not replacing"))}function Hm(e,t,n){if(e&&e[t]){if(!n)return Vm("no wrapper function"),void Vm((new Error).stack);if($m(e[t])&&$m(n)){var r=e[t],o=n(r,t);return Bm(o,"__original",r),Bm(o,"__unwrap",(function(){e[t]===o&&Bm(e,t,r)})),Bm(o,"__wrapped",!0),Bm(e,t,o),o}Vm("original object and wrapper must be functions")}else Vm("no original function "+t+" to wrap")}function qm(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void Vm("no original to unwrap to -- has "+t+" already been unwrapped?"):(Vm("no function to unwrap."),void Vm((new Error).stack))}zm.wrap=Hm,zm.massWrap=function(e,t,n){if(!e)return Vm("must provide one or more modules to patch"),void Vm((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){Hm(e,t,n)}))})):Vm("must provide one or more functions to wrap on modules")},zm.unwrap=qm,zm.massUnwrap=function(e,t){if(!e)return Vm("must provide one or more modules to patch"),void Vm((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){qm(e,t)}))})):Vm("must provide one or more functions to unwrap on modules")};var Gm=zm,Km=function(){return Km=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Km.apply(this,arguments)},Wm=function(){function e(e,t,n){void 0===n&&(n={}),this.instrumentationName=e,this.instrumentationVersion=t,this._wrap=Gm.wrap,this._unwrap=Gm.unwrap,this._massWrap=Gm.massWrap,this._massUnwrap=Gm.massUnwrap,this._config=Km({enabled:!0},n),this._diag=gm.createComponentLogger({namespace:e}),this._tracer=Om.getTracer(e,t),this._meter=bm.getMeter(e,t),this._logger=Fm.getLogger(e,t),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var e,t=null!==(e=this.init())&&void 0!==e?e:[];return Array.isArray(t)?t:[t]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(e){void 0===e&&(e={}),this._config=Object.assign({},e)},e.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e}(),Ym=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xm=function(e){function t(t,n,r){void 0===r&&(r={});var o=e.call(this,t,n,r)||this;return o._config.enabled&&o.enable(),o}return Ym(t,e),t}(Wm);var Zm=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Qm=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};const Jm=Object.freeze(Object.defineProperty({__proto__:null,InstrumentationBase:Xm,InstrumentationNodeModuleDefinition:function(){return function(e,t,n,r,o){this.name=e,this.supportedVersions=t,this.patch=n,this.unpatch=r,this.files=o||[]}}(),InstrumentationNodeModuleFile:function(){return function(e,t,n,r){var o;this.supportedVersions=t,this.patch=n,this.unpatch=r,this.name=(o=e,gm.warn("Path normalization is not implemented for this platform. To silence this warning, ensure no node-specific instrumentations are loaded, and node-specific types (e.g. InstrumentationNodeModuleFile), are not used in a browser context)"),o)}}(),isWrapped:function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped},registerInstrumentations:function(e){var t=Um(e.instrumentations).instrumentations,n=e.tracerProvider||Om.getTracerProvider(),r=e.meterProvider||bm.getMeterProvider(),o=e.loggerProvider||Fm.getLoggerProvider();return function(e,t,n,r){for(var o=0,i=e.length;o<i;o++){var a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}(t,n,r,o),function(){!function(e){e.forEach((function(e){return e.disable()}))}(t)}},safeExecuteInTheMiddle:function(e,t,n){var r,o;try{o=e()}catch(JSe){r=JSe}finally{if(t(r,o),r&&!n)throw r;return o}},safeExecuteInTheMiddleAsync:function(e,t,n){return Zm(this,void 0,void 0,(function(){var r,o,i;return Qm(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),[4,e()];case 1:return o=a.sent(),[3,4];case 2:return i=a.sent(),r=i,[3,4];case 3:if(t(r,o),r&&!n)throw r;return[2,o];case 4:return[2]}}))}))}},Symbol.toStringTag,{value:"Module"})),eg=Wa(Jm);function tg(e){for(var t={},n=e.length,r=0;r<n;r++){var o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var ng="aws.lambda.invoked_arn",rg="db.system",og="db.connection_string",ig="db.user",ag="db.jdbc.driver_classname",sg="db.name",lg="db.statement",cg="db.operation",ug="db.mssql.instance_name",dg="db.cassandra.keyspace",pg="db.cassandra.page_size",fg="db.cassandra.consistency_level",hg="db.cassandra.table",mg="db.cassandra.idempotence",gg="db.cassandra.speculative_execution_count",vg="db.cassandra.coordinator.id",yg="db.cassandra.coordinator.dc",bg="db.hbase.namespace",xg="db.redis.database_index",wg="db.mongodb.collection",_g="db.sql.table",Sg="exception.type",Eg="exception.message",Tg="exception.stacktrace",Cg="exception.escaped",Ag="faas.trigger",Ng="faas.execution",Rg="faas.document.collection",Og="faas.document.operation",Pg="faas.document.time",kg="faas.document.name",Mg="faas.time",jg="faas.cron",Lg="faas.coldstart",Dg="faas.invoked_name",Ig="faas.invoked_provider",Fg="faas.invoked_region",Ug="net.transport",$g="net.peer.ip",Vg="net.peer.port",Bg="net.peer.name",zg="net.host.ip",Hg="net.host.port",qg="net.host.name",Gg="net.host.connection.type",Kg="net.host.connection.subtype",Wg="net.host.carrier.name",Yg="net.host.carrier.mcc",Xg="net.host.carrier.mnc",Zg="net.host.carrier.icc",Qg="peer.service",Jg="enduser.id",ev="enduser.role",tv="enduser.scope",nv="thread.id",rv="thread.name",ov="code.function",iv="code.namespace",av="code.filepath",sv="code.lineno",lv="http.method",cv="http.url",uv="http.target",dv="http.host",pv="http.scheme",fv="http.status_code",hv="http.flavor",mv="http.user_agent",gv="http.request_content_length",vv="http.request_content_length_uncompressed",yv="http.response_content_length",bv="http.response_content_length_uncompressed",xv="http.server_name",wv="http.route",_v="http.client_ip",Sv="aws.dynamodb.table_names",Ev="aws.dynamodb.consumed_capacity",Tv="aws.dynamodb.item_collection_metrics",Cv="aws.dynamodb.provisioned_read_capacity",Av="aws.dynamodb.provisioned_write_capacity",Nv="aws.dynamodb.consistent_read",Rv="aws.dynamodb.projection",Ov="aws.dynamodb.limit",Pv="aws.dynamodb.attributes_to_get",kv="aws.dynamodb.index_name",Mv="aws.dynamodb.select",jv="aws.dynamodb.global_secondary_indexes",Lv="aws.dynamodb.local_secondary_indexes",Dv="aws.dynamodb.exclusive_start_table",Iv="aws.dynamodb.table_count",Fv="aws.dynamodb.scan_forward",Uv="aws.dynamodb.segment",$v="aws.dynamodb.total_segments",Vv="aws.dynamodb.count",Bv="aws.dynamodb.scanned_count",zv="aws.dynamodb.attribute_definitions",Hv="aws.dynamodb.global_secondary_index_updates",qv="messaging.system",Gv="messaging.destination",Kv="messaging.destination_kind",Wv="messaging.temp_destination",Yv="messaging.protocol",Xv="messaging.protocol_version",Zv="messaging.url",Qv="messaging.message_id",Jv="messaging.conversation_id",ey="messaging.message_payload_size_bytes",ty="messaging.message_payload_compressed_size_bytes",ny="messaging.operation",ry="messaging.consumer_id",oy="messaging.rabbitmq.routing_key",iy="messaging.kafka.message_key",ay="messaging.kafka.consumer_group",sy="messaging.kafka.client_id",ly="messaging.kafka.partition",cy="messaging.kafka.tombstone",uy="rpc.system",dy="rpc.service",py="rpc.method",fy="rpc.grpc.status_code",hy="rpc.jsonrpc.version",my="rpc.jsonrpc.request_id",gy="rpc.jsonrpc.error_code",vy="rpc.jsonrpc.error_message",yy="message.type",by="message.id",xy="message.compressed_size",wy="message.uncompressed_size",_y=ng,Sy=rg,Ey=og,Ty=ig,Cy=ag,Ay=sg,Ny=lg,Ry=cg,Oy=ug,Py=dg,ky=pg,My=fg,jy=hg,Ly=mg,Dy=gg,Iy=vg,Fy=yg,Uy=bg,$y=xg,Vy=wg,By=_g,zy=Sg,Hy=Eg,qy=Tg,Gy=Cg,Ky=Ag,Wy=Ng,Yy=Rg,Xy=Og,Zy=Pg,Qy=kg,Jy=Mg,eb=jg,tb=Lg,nb=Dg,rb=Ig,ob=Fg,ib=Ug,ab=$g,sb=Vg,lb=Bg,cb=zg,ub=Hg,db=qg,pb=Gg,fb=Kg,hb=Wg,mb=Yg,gb=Xg,vb=Zg,yb=Qg,bb=Jg,xb=ev,wb=tv,_b=nv,Sb=rv,Eb=ov,Tb=iv,Cb=av,Ab=sv,Nb=lv,Rb=cv,Ob=uv,Pb=dv,kb=pv,Mb=fv,jb=hv,Lb=mv,Db=gv,Ib=vv,Fb=yv,Ub=bv,$b=xv,Vb=wv,Bb=_v,zb=Sv,Hb=Ev,qb=Tv,Gb=Cv,Kb=Av,Wb=Nv,Yb=Rv,Xb=Ov,Zb=Pv,Qb=kv,Jb=Mv,ex=jv,tx=Lv,nx=Dv,rx=Iv,ox=Fv,ix=Uv,ax=$v,sx=Vv,lx=Bv,cx=zv,ux=Hv,dx=qv,px=Gv,fx=Kv,hx=Wv,mx=Yv,gx=Xv,vx=Zv,yx=Qv,bx=Jv,xx=ey,wx=ty,_x=ny,Sx=ry,Ex=oy,Tx=iy,Cx=ay,Ax=sy,Nx=ly,Rx=cy,Ox=uy,Px=dy,kx=py,Mx=fy,jx=hy,Lx=my,Dx=gy,Ix=vy,Fx=yy,Ux=by,$x=xy,Vx=wy,Bx=tg([ng,rg,og,ig,ag,sg,lg,cg,ug,dg,pg,fg,hg,mg,gg,vg,yg,bg,xg,wg,_g,Sg,Eg,Tg,Cg,Ag,Ng,Rg,Og,Pg,kg,Mg,jg,Lg,Dg,Ig,Fg,Ug,$g,Vg,Bg,zg,Hg,qg,Gg,Kg,Wg,Yg,Xg,Zg,Qg,Jg,ev,tv,nv,rv,ov,iv,av,sv,lv,cv,uv,dv,pv,fv,hv,mv,gv,vv,yv,bv,xv,wv,_v,Sv,Ev,Tv,Cv,Av,Nv,Rv,Ov,Pv,kv,Mv,jv,Lv,Dv,Iv,Fv,Uv,$v,Vv,Bv,zv,Hv,qv,Gv,Kv,Wv,Yv,Xv,Zv,Qv,Jv,ey,ty,ny,ry,oy,iy,ay,sy,ly,cy,uy,dy,py,fy,hy,my,gy,vy,yy,by,xy,wy]),zx="other_sql",Hx="mssql",qx="mysql",Gx="oracle",Kx="postgresql",Wx="redshift",Yx="hive",Xx="cloudscape",Zx="hsqldb",Qx="progress",Jx="maxdb",ew="hanadb",tw="ingres",nw="firstsql",rw="cache",ow="adabas",iw="firebird",aw="derby",sw="filemaker",lw="informix",cw="instantdb",uw="interbase",dw="mariadb",pw="netezza",fw="pervasive",hw="pointbase",mw="sqlite",gw="sybase",vw="teradata",yw="vertica",bw="coldfusion",xw="cassandra",ww="hbase",_w="mongodb",Sw="redis",Ew="couchbase",Tw="couchdb",Cw="cosmosdb",Aw="dynamodb",Nw="neo4j",Rw="geode",Ow="elasticsearch",Pw="memcached",kw="cockroachdb",Mw=zx,jw=Hx,Lw=qx,Dw=Gx,Iw=Kx,Fw=Wx,Uw=Yx,$w=Xx,Vw=Zx,Bw=Qx,zw=Jx,Hw=ew,qw=tw,Gw=nw,Kw=rw,Ww=ow,Yw=iw,Xw=aw,Zw=sw,Qw=lw,Jw=cw,e_=uw,t_=dw,n_=pw,r_=fw,o_=hw,i_=mw,a_=gw,s_=vw,l_=yw,c_=bw,u_=xw,d_=ww,p_=_w,f_=Sw,h_=Ew,m_=Tw,g_=Cw,v_=Aw,y_=Nw,b_=Rw,x_=Ow,w_=Pw,__=kw,S_=tg([zx,Hx,qx,Gx,"db2",Kx,Wx,Yx,Xx,Zx,Qx,Jx,ew,tw,nw,"edb",rw,ow,iw,aw,sw,lw,cw,uw,dw,pw,fw,hw,mw,gw,vw,yw,"h2",bw,xw,ww,_w,Sw,Ew,Tw,Cw,Aw,Nw,Rw,Ow,Pw,kw]),E_="each_quorum",T_="quorum",C_="local_quorum",A_="three",N_="local_one",R_="serial",O_="local_serial",P_=E_,k_=T_,M_=C_,j_=A_,L_=N_,D_=R_,I_=O_,F_=tg(["all",E_,T_,C_,"one","two",A_,N_,"any",R_,O_]),U_="datasource",$_="http",V_="pubsub",B_="timer",z_="other",H_=U_,q_=$_,G_=V_,K_=B_,W_=z_,Y_=tg([U_,$_,V_,B_,z_]),X_="insert",Z_="edit",Q_="delete",J_=X_,eS=Z_,tS=Q_,nS=tg([X_,Z_,Q_]),rS="alibaba_cloud",oS="azure",iS=rS,aS=oS,sS=tg([rS,"aws",oS,"gcp"]),lS="ip_tcp",cS="ip_udp",uS="unix",dS="pipe",pS="inproc",fS="other",hS=lS,mS=cS,gS=uS,vS=dS,yS=pS,bS=fS,xS=tg([lS,cS,"ip",uS,dS,pS,fS]),wS="wifi",_S="wired",SS="cell",ES="unavailable",TS="unknown",CS=wS,AS=_S,NS=SS,RS=ES,OS=TS,PS=tg([wS,_S,SS,ES,TS]),kS="gprs",MS="edge",jS="umts",LS="cdma",DS="evdo_0",IS="evdo_a",FS="cdma2000_1xrtt",US="hsdpa",$S="hsupa",VS="hspa",BS="iden",zS="evdo_b",HS="ehrpd",qS="hspap",GS="td_scdma",KS="iwlan",WS="nrnsa",YS="lte_ca",XS=kS,ZS=MS,QS=jS,JS=LS,eE=DS,tE=IS,nE=FS,rE=US,oE=$S,iE=VS,aE=BS,sE=zS,lE=HS,cE=qS,uE=GS,dE=KS,pE=WS,fE=YS,hE=tg([kS,MS,jS,LS,DS,IS,FS,US,$S,VS,BS,zS,"lte",HS,qS,"gsm",GS,KS,"nr",WS,YS]),mE="SPDY",gE="QUIC",vE=mE,yE=gE,bE={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:mE,QUIC:gE},xE="queue",wE="topic",_E=xE,SE=wE,EE=tg([xE,wE]),TE="receive",CE="process",AE=TE,NE=CE,RE=tg([TE,CE]),OE={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16},PE="SENT",kE="RECEIVED",ME=PE,jE=kE,LE=tg([PE,kE]),DE="cloud.provider",IE="cloud.account.id",FE="cloud.region",UE="cloud.availability_zone",$E="cloud.platform",VE="aws.ecs.container.arn",BE="aws.ecs.cluster.arn",zE="aws.ecs.launchtype",HE="aws.ecs.task.arn",qE="aws.ecs.task.family",GE="aws.ecs.task.revision",KE="aws.eks.cluster.arn",WE="aws.log.group.names",YE="aws.log.group.arns",XE="aws.log.stream.names",ZE="aws.log.stream.arns",QE="container.name",JE="container.id",eT="container.runtime",tT="container.image.name",nT="container.image.tag",rT="deployment.environment",oT="device.id",iT="device.model.identifier",aT="device.model.name",sT="faas.name",lT="faas.id",cT="faas.version",uT="faas.instance",dT="faas.max_memory",pT="host.id",fT="host.name",hT="host.type",mT="host.arch",gT="host.image.name",vT="host.image.id",yT="host.image.version",bT="k8s.cluster.name",xT="k8s.node.name",wT="k8s.node.uid",_T="k8s.namespace.name",ST="k8s.pod.uid",ET="k8s.pod.name",TT="k8s.container.name",CT="k8s.replicaset.uid",AT="k8s.replicaset.name",NT="k8s.deployment.uid",RT="k8s.deployment.name",OT="k8s.statefulset.uid",PT="k8s.statefulset.name",kT="k8s.daemonset.uid",MT="k8s.daemonset.name",jT="k8s.job.uid",LT="k8s.job.name",DT="k8s.cronjob.uid",IT="k8s.cronjob.name",FT="os.type",UT="os.description",$T="os.name",VT="os.version",BT="process.pid",zT="process.executable.name",HT="process.executable.path",qT="process.command",GT="process.command_line",KT="process.command_args",WT="process.owner",YT="process.runtime.name",XT="process.runtime.version",ZT="process.runtime.description",QT="service.name",JT="service.namespace",eC="service.instance.id",tC="service.version",nC="telemetry.sdk.name",rC="telemetry.sdk.language",oC="telemetry.sdk.version",iC="telemetry.auto.version",aC="webengine.name",sC="webengine.version",lC="webengine.description",cC=DE,uC=IE,dC=FE,pC=UE,fC=$E,hC=VE,mC=BE,gC=zE,vC=HE,yC=qE,bC=GE,xC=KE,wC=WE,_C=YE,SC=XE,EC=ZE,TC=QE,CC=JE,AC=eT,NC=tT,RC=nT,OC=rT,PC=oT,kC=iT,MC=aT,jC=sT,LC=lT,DC=cT,IC=uT,FC=dT,UC=pT,$C=fT,VC=hT,BC=mT,zC=gT,HC=vT,qC=yT,GC=bT,KC=xT,WC=wT,YC=_T,XC=ST,ZC=ET,QC=TT,JC=CT,eA=AT,tA=NT,nA=RT,rA=OT,oA=PT,iA=kT,aA=MT,sA=jT,lA=LT,cA=DT,uA=IT,dA=FT,pA=UT,fA=$T,hA=VT,mA=BT,gA=zT,vA=HT,yA=qT,bA=GT,xA=KT,wA=WT,_A=YT,SA=XT,EA=ZT,TA=QT,CA=JT,AA=eC,NA=tC,RA=nC,OA=rC,PA=oC,kA=iC,MA=aC,jA=sC,LA=lC,DA=tg([DE,IE,FE,UE,$E,VE,BE,zE,HE,qE,GE,KE,WE,YE,XE,ZE,QE,JE,eT,tT,nT,rT,oT,iT,aT,sT,lT,cT,uT,dT,pT,fT,hT,mT,gT,vT,yT,bT,xT,wT,_T,ST,ET,TT,CT,AT,NT,RT,OT,PT,kT,MT,jT,LT,DT,IT,FT,UT,$T,VT,BT,zT,HT,qT,GT,KT,WT,YT,XT,ZT,QT,JT,eC,tC,nC,rC,oC,iC,aC,sC,lC]),IA="alibaba_cloud",FA="azure",UA=IA,$A=FA,VA=tg([IA,"aws",FA,"gcp"]),BA="alibaba_cloud_ecs",zA="alibaba_cloud_fc",HA="aws_ec2",qA="aws_ecs",GA="aws_eks",KA="aws_lambda",WA="aws_elastic_beanstalk",YA="azure_vm",XA="azure_container_instances",ZA="azure_aks",QA="azure_functions",JA="azure_app_service",eN="gcp_compute_engine",tN="gcp_cloud_run",nN="gcp_kubernetes_engine",rN="gcp_cloud_functions",oN="gcp_app_engine",iN=BA,aN=zA,sN=HA,lN=qA,cN=GA,uN=KA,dN=WA,pN=YA,fN=XA,hN=ZA,mN=QA,gN=JA,vN=eN,yN=tN,bN=nN,xN=rN,wN=oN,_N=tg([BA,zA,HA,qA,GA,KA,WA,YA,XA,ZA,QA,JA,eN,tN,nN,rN,oN]),SN="fargate",EN=SN,TN=tg(["ec2",SN]),CN="amd64",AN="arm32",NN="arm64",RN="ia64",ON="ppc32",PN="ppc64",kN=CN,MN=AN,jN=NN,LN=RN,DN=ON,IN=PN,FN=tg([CN,AN,NN,RN,ON,PN,"x86"]),UN="windows",$N="linux",VN="darwin",BN="freebsd",zN="netbsd",HN="openbsd",qN="dragonflybsd",GN="hpux",KN="solaris",WN="z_os",YN=UN,XN=$N,ZN=VN,QN=BN,JN=zN,eR=HN,tR=qN,nR=GN,rR=KN,oR=WN,iR=tg([UN,$N,VN,BN,zN,HN,qN,GN,"aix",KN,WN]),aR="dotnet",sR="erlang",lR="java",cR="nodejs",uR="python",dR="ruby",pR="webjs",fR=aR,hR=sR,mR=lR,gR=cR,vR=uR,yR=dR,bR=pR,xR=tg(["cpp",aR,sR,"go",lR,cR,"php",uR,dR,pR]);const wR=Object.freeze(Object.defineProperty({__proto__:null,AWSECSLAUNCHTYPEVALUES_EC2:"ec2",AWSECSLAUNCHTYPEVALUES_FARGATE:EN,AwsEcsLaunchtypeValues:TN,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:iN,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:aN,CLOUDPLATFORMVALUES_AWS_EC2:sN,CLOUDPLATFORMVALUES_AWS_ECS:lN,CLOUDPLATFORMVALUES_AWS_EKS:cN,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:dN,CLOUDPLATFORMVALUES_AWS_LAMBDA:uN,CLOUDPLATFORMVALUES_AZURE_AKS:hN,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:gN,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:fN,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:mN,CLOUDPLATFORMVALUES_AZURE_VM:pN,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:wN,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:xN,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:yN,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:vN,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:bN,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:UA,CLOUDPROVIDERVALUES_AWS:"aws",CLOUDPROVIDERVALUES_AZURE:$A,CLOUDPROVIDERVALUES_GCP:"gcp",CloudPlatformValues:_N,CloudProviderValues:VA,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:"all",DBCASSANDRACONSISTENCYLEVELVALUES_ANY:"any",DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:P_,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:L_,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:M_,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:I_,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:"one",DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:k_,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:D_,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:j_,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:"two",DBSYSTEMVALUES_ADABAS:Ww,DBSYSTEMVALUES_CACHE:Kw,DBSYSTEMVALUES_CASSANDRA:u_,DBSYSTEMVALUES_CLOUDSCAPE:$w,DBSYSTEMVALUES_COCKROACHDB:__,DBSYSTEMVALUES_COLDFUSION:c_,DBSYSTEMVALUES_COSMOSDB:g_,DBSYSTEMVALUES_COUCHBASE:h_,DBSYSTEMVALUES_COUCHDB:m_,DBSYSTEMVALUES_DB2:"db2",DBSYSTEMVALUES_DERBY:Xw,DBSYSTEMVALUES_DYNAMODB:v_,DBSYSTEMVALUES_EDB:"edb",DBSYSTEMVALUES_ELASTICSEARCH:x_,DBSYSTEMVALUES_FILEMAKER:Zw,DBSYSTEMVALUES_FIREBIRD:Yw,DBSYSTEMVALUES_FIRSTSQL:Gw,DBSYSTEMVALUES_GEODE:b_,DBSYSTEMVALUES_H2:"h2",DBSYSTEMVALUES_HANADB:Hw,DBSYSTEMVALUES_HBASE:d_,DBSYSTEMVALUES_HIVE:Uw,DBSYSTEMVALUES_HSQLDB:Vw,DBSYSTEMVALUES_INFORMIX:Qw,DBSYSTEMVALUES_INGRES:qw,DBSYSTEMVALUES_INSTANTDB:Jw,DBSYSTEMVALUES_INTERBASE:e_,DBSYSTEMVALUES_MARIADB:t_,DBSYSTEMVALUES_MAXDB:zw,DBSYSTEMVALUES_MEMCACHED:w_,DBSYSTEMVALUES_MONGODB:p_,DBSYSTEMVALUES_MSSQL:jw,DBSYSTEMVALUES_MYSQL:Lw,DBSYSTEMVALUES_NEO4J:y_,DBSYSTEMVALUES_NETEZZA:n_,DBSYSTEMVALUES_ORACLE:Dw,DBSYSTEMVALUES_OTHER_SQL:Mw,DBSYSTEMVALUES_PERVASIVE:r_,DBSYSTEMVALUES_POINTBASE:o_,DBSYSTEMVALUES_POSTGRESQL:Iw,DBSYSTEMVALUES_PROGRESS:Bw,DBSYSTEMVALUES_REDIS:f_,DBSYSTEMVALUES_REDSHIFT:Fw,DBSYSTEMVALUES_SQLITE:i_,DBSYSTEMVALUES_SYBASE:a_,DBSYSTEMVALUES_TERADATA:s_,DBSYSTEMVALUES_VERTICA:l_,DbCassandraConsistencyLevelValues:F_,DbSystemValues:S_,FAASDOCUMENTOPERATIONVALUES_DELETE:tS,FAASDOCUMENTOPERATIONVALUES_EDIT:eS,FAASDOCUMENTOPERATIONVALUES_INSERT:J_,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:iS,FAASINVOKEDPROVIDERVALUES_AWS:"aws",FAASINVOKEDPROVIDERVALUES_AZURE:aS,FAASINVOKEDPROVIDERVALUES_GCP:"gcp",FAASTRIGGERVALUES_DATASOURCE:H_,FAASTRIGGERVALUES_HTTP:q_,FAASTRIGGERVALUES_OTHER:W_,FAASTRIGGERVALUES_PUBSUB:G_,FAASTRIGGERVALUES_TIMER:K_,FaasDocumentOperationValues:nS,FaasInvokedProviderValues:sS,FaasTriggerValues:Y_,HOSTARCHVALUES_AMD64:kN,HOSTARCHVALUES_ARM32:MN,HOSTARCHVALUES_ARM64:jN,HOSTARCHVALUES_IA64:LN,HOSTARCHVALUES_PPC32:DN,HOSTARCHVALUES_PPC64:IN,HOSTARCHVALUES_X86:"x86",HTTPFLAVORVALUES_HTTP_1_0:"1.0",HTTPFLAVORVALUES_HTTP_1_1:"1.1",HTTPFLAVORVALUES_HTTP_2_0:"2.0",HTTPFLAVORVALUES_QUIC:yE,HTTPFLAVORVALUES_SPDY:vE,HostArchValues:FN,HttpFlavorValues:bE,MESSAGETYPEVALUES_RECEIVED:jE,MESSAGETYPEVALUES_SENT:ME,MESSAGINGDESTINATIONKINDVALUES_QUEUE:_E,MESSAGINGDESTINATIONKINDVALUES_TOPIC:SE,MESSAGINGOPERATIONVALUES_PROCESS:NE,MESSAGINGOPERATIONVALUES_RECEIVE:AE,MessageTypeValues:LE,MessagingDestinationKindValues:EE,MessagingOperationValues:RE,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:JS,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:nE,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:ZS,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:lE,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:eE,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:tE,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:sE,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:XS,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:"gsm",NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:rE,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:iE,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:cE,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:oE,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:aE,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:dE,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:"lte",NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:fE,NETHOSTCONNECTIONSUBTYPEVALUES_NR:"nr",NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:pE,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:uE,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:QS,NETHOSTCONNECTIONTYPEVALUES_CELL:NS,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:RS,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:OS,NETHOSTCONNECTIONTYPEVALUES_WIFI:CS,NETHOSTCONNECTIONTYPEVALUES_WIRED:AS,NETTRANSPORTVALUES_INPROC:yS,NETTRANSPORTVALUES_IP:"ip",NETTRANSPORTVALUES_IP_TCP:hS,NETTRANSPORTVALUES_IP_UDP:mS,NETTRANSPORTVALUES_OTHER:bS,NETTRANSPORTVALUES_PIPE:vS,NETTRANSPORTVALUES_UNIX:gS,NetHostConnectionSubtypeValues:hE,NetHostConnectionTypeValues:PS,NetTransportValues:xS,OSTYPEVALUES_AIX:"aix",OSTYPEVALUES_DARWIN:ZN,OSTYPEVALUES_DRAGONFLYBSD:tR,OSTYPEVALUES_FREEBSD:QN,OSTYPEVALUES_HPUX:nR,OSTYPEVALUES_LINUX:XN,OSTYPEVALUES_NETBSD:JN,OSTYPEVALUES_OPENBSD:eR,OSTYPEVALUES_SOLARIS:rR,OSTYPEVALUES_WINDOWS:YN,OSTYPEVALUES_Z_OS:oR,OsTypeValues:iR,RPCGRPCSTATUSCODEVALUES_ABORTED:10,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:6,RPCGRPCSTATUSCODEVALUES_CANCELLED:1,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:15,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:4,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:9,RPCGRPCSTATUSCODEVALUES_INTERNAL:13,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:3,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:5,RPCGRPCSTATUSCODEVALUES_OK:0,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:11,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:7,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:8,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:16,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:14,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:12,RPCGRPCSTATUSCODEVALUES_UNKNOWN:2,RpcGrpcStatusCodeValues:OE,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:Zb,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:cx,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:Wb,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:Hb,SEMATTRS_AWS_DYNAMODB_COUNT:sx,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:nx,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:ex,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:ux,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:Qb,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:qb,SEMATTRS_AWS_DYNAMODB_LIMIT:Xb,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:tx,SEMATTRS_AWS_DYNAMODB_PROJECTION:Yb,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:Gb,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:Kb,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:lx,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:ox,SEMATTRS_AWS_DYNAMODB_SEGMENT:ix,SEMATTRS_AWS_DYNAMODB_SELECT:Jb,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:rx,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:zb,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:ax,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:_y,SEMATTRS_CODE_FILEPATH:Cb,SEMATTRS_CODE_FUNCTION:Eb,SEMATTRS_CODE_LINENO:Ab,SEMATTRS_CODE_NAMESPACE:Tb,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:My,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:Fy,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:Iy,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:Ly,SEMATTRS_DB_CASSANDRA_KEYSPACE:Py,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:ky,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:Dy,SEMATTRS_DB_CASSANDRA_TABLE:jy,SEMATTRS_DB_CONNECTION_STRING:Ey,SEMATTRS_DB_HBASE_NAMESPACE:Uy,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:Cy,SEMATTRS_DB_MONGODB_COLLECTION:Vy,SEMATTRS_DB_MSSQL_INSTANCE_NAME:Oy,SEMATTRS_DB_NAME:Ay,SEMATTRS_DB_OPERATION:Ry,SEMATTRS_DB_REDIS_DATABASE_INDEX:$y,SEMATTRS_DB_SQL_TABLE:By,SEMATTRS_DB_STATEMENT:Ny,SEMATTRS_DB_SYSTEM:Sy,SEMATTRS_DB_USER:Ty,SEMATTRS_ENDUSER_ID:bb,SEMATTRS_ENDUSER_ROLE:xb,SEMATTRS_ENDUSER_SCOPE:wb,SEMATTRS_EXCEPTION_ESCAPED:Gy,SEMATTRS_EXCEPTION_MESSAGE:Hy,SEMATTRS_EXCEPTION_STACKTRACE:qy,SEMATTRS_EXCEPTION_TYPE:zy,SEMATTRS_FAAS_COLDSTART:tb,SEMATTRS_FAAS_CRON:eb,SEMATTRS_FAAS_DOCUMENT_COLLECTION:Yy,SEMATTRS_FAAS_DOCUMENT_NAME:Qy,SEMATTRS_FAAS_DOCUMENT_OPERATION:Xy,SEMATTRS_FAAS_DOCUMENT_TIME:Zy,SEMATTRS_FAAS_EXECUTION:Wy,SEMATTRS_FAAS_INVOKED_NAME:nb,SEMATTRS_FAAS_INVOKED_PROVIDER:rb,SEMATTRS_FAAS_INVOKED_REGION:ob,SEMATTRS_FAAS_TIME:Jy,SEMATTRS_FAAS_TRIGGER:Ky,SEMATTRS_HTTP_CLIENT_IP:Bb,SEMATTRS_HTTP_FLAVOR:jb,SEMATTRS_HTTP_HOST:Pb,SEMATTRS_HTTP_METHOD:Nb,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:Db,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:Ib,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:Fb,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:Ub,SEMATTRS_HTTP_ROUTE:Vb,SEMATTRS_HTTP_SCHEME:kb,SEMATTRS_HTTP_SERVER_NAME:$b,SEMATTRS_HTTP_STATUS_CODE:Mb,SEMATTRS_HTTP_TARGET:Ob,SEMATTRS_HTTP_URL:Rb,SEMATTRS_HTTP_USER_AGENT:Lb,SEMATTRS_MESSAGE_COMPRESSED_SIZE:$x,SEMATTRS_MESSAGE_ID:Ux,SEMATTRS_MESSAGE_TYPE:Fx,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:Vx,SEMATTRS_MESSAGING_CONSUMER_ID:Sx,SEMATTRS_MESSAGING_CONVERSATION_ID:bx,SEMATTRS_MESSAGING_DESTINATION:px,SEMATTRS_MESSAGING_DESTINATION_KIND:fx,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:Ax,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:Cx,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:Tx,SEMATTRS_MESSAGING_KAFKA_PARTITION:Nx,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:Rx,SEMATTRS_MESSAGING_MESSAGE_ID:yx,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:wx,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:xx,SEMATTRS_MESSAGING_OPERATION:_x,SEMATTRS_MESSAGING_PROTOCOL:mx,SEMATTRS_MESSAGING_PROTOCOL_VERSION:gx,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:Ex,SEMATTRS_MESSAGING_SYSTEM:dx,SEMATTRS_MESSAGING_TEMP_DESTINATION:hx,SEMATTRS_MESSAGING_URL:vx,SEMATTRS_NET_HOST_CARRIER_ICC:vb,SEMATTRS_NET_HOST_CARRIER_MCC:mb,SEMATTRS_NET_HOST_CARRIER_MNC:gb,SEMATTRS_NET_HOST_CARRIER_NAME:hb,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:fb,SEMATTRS_NET_HOST_CONNECTION_TYPE:pb,SEMATTRS_NET_HOST_IP:cb,SEMATTRS_NET_HOST_NAME:db,SEMATTRS_NET_HOST_PORT:ub,SEMATTRS_NET_PEER_IP:ab,SEMATTRS_NET_PEER_NAME:lb,SEMATTRS_NET_PEER_PORT:sb,SEMATTRS_NET_TRANSPORT:ib,SEMATTRS_PEER_SERVICE:yb,SEMATTRS_RPC_GRPC_STATUS_CODE:Mx,SEMATTRS_RPC_JSONRPC_ERROR_CODE:Dx,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:Ix,SEMATTRS_RPC_JSONRPC_REQUEST_ID:Lx,SEMATTRS_RPC_JSONRPC_VERSION:jx,SEMATTRS_RPC_METHOD:kx,SEMATTRS_RPC_SERVICE:Px,SEMATTRS_RPC_SYSTEM:Ox,SEMATTRS_THREAD_ID:_b,SEMATTRS_THREAD_NAME:Sb,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:mC,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:hC,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:gC,SEMRESATTRS_AWS_ECS_TASK_ARN:vC,SEMRESATTRS_AWS_ECS_TASK_FAMILY:yC,SEMRESATTRS_AWS_ECS_TASK_REVISION:bC,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:xC,SEMRESATTRS_AWS_LOG_GROUP_ARNS:_C,SEMRESATTRS_AWS_LOG_GROUP_NAMES:wC,SEMRESATTRS_AWS_LOG_STREAM_ARNS:EC,SEMRESATTRS_AWS_LOG_STREAM_NAMES:SC,SEMRESATTRS_CLOUD_ACCOUNT_ID:uC,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:pC,SEMRESATTRS_CLOUD_PLATFORM:fC,SEMRESATTRS_CLOUD_PROVIDER:cC,SEMRESATTRS_CLOUD_REGION:dC,SEMRESATTRS_CONTAINER_ID:CC,SEMRESATTRS_CONTAINER_IMAGE_NAME:NC,SEMRESATTRS_CONTAINER_IMAGE_TAG:RC,SEMRESATTRS_CONTAINER_NAME:TC,SEMRESATTRS_CONTAINER_RUNTIME:AC,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:OC,SEMRESATTRS_DEVICE_ID:PC,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:kC,SEMRESATTRS_DEVICE_MODEL_NAME:MC,SEMRESATTRS_FAAS_ID:LC,SEMRESATTRS_FAAS_INSTANCE:IC,SEMRESATTRS_FAAS_MAX_MEMORY:FC,SEMRESATTRS_FAAS_NAME:jC,SEMRESATTRS_FAAS_VERSION:DC,SEMRESATTRS_HOST_ARCH:BC,SEMRESATTRS_HOST_ID:UC,SEMRESATTRS_HOST_IMAGE_ID:HC,SEMRESATTRS_HOST_IMAGE_NAME:zC,SEMRESATTRS_HOST_IMAGE_VERSION:qC,SEMRESATTRS_HOST_NAME:$C,SEMRESATTRS_HOST_TYPE:VC,SEMRESATTRS_K8S_CLUSTER_NAME:GC,SEMRESATTRS_K8S_CONTAINER_NAME:QC,SEMRESATTRS_K8S_CRONJOB_NAME:uA,SEMRESATTRS_K8S_CRONJOB_UID:cA,SEMRESATTRS_K8S_DAEMONSET_NAME:aA,SEMRESATTRS_K8S_DAEMONSET_UID:iA,SEMRESATTRS_K8S_DEPLOYMENT_NAME:nA,SEMRESATTRS_K8S_DEPLOYMENT_UID:tA,SEMRESATTRS_K8S_JOB_NAME:lA,SEMRESATTRS_K8S_JOB_UID:sA,SEMRESATTRS_K8S_NAMESPACE_NAME:YC,SEMRESATTRS_K8S_NODE_NAME:KC,SEMRESATTRS_K8S_NODE_UID:WC,SEMRESATTRS_K8S_POD_NAME:ZC,SEMRESATTRS_K8S_POD_UID:XC,SEMRESATTRS_K8S_REPLICASET_NAME:eA,SEMRESATTRS_K8S_REPLICASET_UID:JC,SEMRESATTRS_K8S_STATEFULSET_NAME:oA,SEMRESATTRS_K8S_STATEFULSET_UID:rA,SEMRESATTRS_OS_DESCRIPTION:pA,SEMRESATTRS_OS_NAME:fA,SEMRESATTRS_OS_TYPE:dA,SEMRESATTRS_OS_VERSION:hA,SEMRESATTRS_PROCESS_COMMAND:yA,SEMRESATTRS_PROCESS_COMMAND_ARGS:xA,SEMRESATTRS_PROCESS_COMMAND_LINE:bA,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:gA,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:vA,SEMRESATTRS_PROCESS_OWNER:wA,SEMRESATTRS_PROCESS_PID:mA,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:EA,SEMRESATTRS_PROCESS_RUNTIME_NAME:_A,SEMRESATTRS_PROCESS_RUNTIME_VERSION:SA,SEMRESATTRS_SERVICE_INSTANCE_ID:AA,SEMRESATTRS_SERVICE_NAME:TA,SEMRESATTRS_SERVICE_NAMESPACE:CA,SEMRESATTRS_SERVICE_VERSION:NA,SEMRESATTRS_TELEMETRY_AUTO_VERSION:kA,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:OA,SEMRESATTRS_TELEMETRY_SDK_NAME:RA,SEMRESATTRS_TELEMETRY_SDK_VERSION:PA,SEMRESATTRS_WEBENGINE_DESCRIPTION:LA,SEMRESATTRS_WEBENGINE_NAME:MA,SEMRESATTRS_WEBENGINE_VERSION:jA,SemanticAttributes:Bx,SemanticResourceAttributes:DA,TELEMETRYSDKLANGUAGEVALUES_CPP:"cpp",TELEMETRYSDKLANGUAGEVALUES_DOTNET:fR,TELEMETRYSDKLANGUAGEVALUES_ERLANG:hR,TELEMETRYSDKLANGUAGEVALUES_GO:"go",TELEMETRYSDKLANGUAGEVALUES_JAVA:mR,TELEMETRYSDKLANGUAGEVALUES_NODEJS:gR,TELEMETRYSDKLANGUAGEVALUES_PHP:"php",TELEMETRYSDKLANGUAGEVALUES_PYTHON:vR,TELEMETRYSDKLANGUAGEVALUES_RUBY:yR,TELEMETRYSDKLANGUAGEVALUES_WEBJS:bR,TelemetrySdkLanguageValues:xR},Symbol.toStringTag,{value:"Module"}));var _R=oh("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function SR(e){return e.setValue(_R,!0)}function ER(e){return!0===e.getValue(_R)}var TR=",",CR="baggage";function AR(e){return e.reduce((function(e,t){var n=""+e+(""!==e?TR:"")+t;return n.length>8192?e:n}),"")}function NR(e){return e.getAllEntries().map((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),n=t[1],r=encodeURIComponent(t[0])+"="+encodeURIComponent(n.value);return void 0!==n.metadata&&(r+=";"+n.metadata.toString()),r}))}function RR(e){var t=e.split(";");if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var o,i=decodeURIComponent(n.substring(0,r).trim()),a=decodeURIComponent(n.substring(r+1).trim());return t.length>0&&(o=rh(t.join(";"))),{key:i,value:a,metadata:o}}}}}function OR(e){return"string"!=typeof e||0===e.length?{}:e.split(TR).map((function(e){return RR(e)})).filter((function(e){return void 0!==e&&e.value.length>0})).reduce((function(e,t){return e[t.key]=t.value,e}),{})}const PR=Object.freeze(Object.defineProperty({__proto__:null,getKeyPairs:NR,parseKeyPairsIntoRecord:OR,parsePairKeyValue:RR,serializeKeyPairs:AR},Symbol.toStringTag,{value:"Module"}));var kR=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Nm.getBaggage(e);if(r&&!ER(e)){var o=AR(NR(r).filter((function(e){return e.length<=4096})).slice(0,180));o.length>0&&n.set(t,CR,o)}},e.prototype.extract=function(e,t,n){var r=n.get(t,CR),o=Array.isArray(r)?r.join(TR):r;if(!o)return e;var i={};return 0===o.length?e:(o.split(TR).forEach((function(e){var t=RR(e);if(t){var n={value:t.value};t.metadata&&(n.metadata=t.metadata),i[t.key]=n}})),0===Object.entries(i).length?e:Nm.setBaggage(e,Nm.createBaggage(i)))},e.prototype.fields=function(){return[CR]},e}(),MR=function(){function e(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}return e.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},e}(),jR=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},LR=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function DR(e){var t,n,r={};if("object"!=typeof e||null==e)return r;try{for(var o=jR(Object.entries(e)),i=o.next();!i.done;i=o.next()){var a=LR(i.value,2),s=a[0],l=a[1];IR(s)?FR(l)?r[s]=Array.isArray(l)?l.slice():l:gm.warn("Invalid attribute value set for key: "+s):gm.warn("Invalid attribute key: "+s)}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function IR(e){return"string"==typeof e&&e.length>0}function FR(e){return null==e||(Array.isArray(e)?function(e){var t,n,r;try{for(var o=jR(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(UR(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!0}(e):UR(e))}function UR(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function $R(){return function(e){gm.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){var t={},n=e;for(;null!==n;)Object.getOwnPropertyNames(n).forEach((function(e){if(!t[e]){var r=n[e];r&&(t[e]=String(r))}})),n=Object.getPrototypeOf(n);return t}(e))}(e))}}var VR,BR,zR=$R();function HR(e){try{zR(e)}catch(t){}}(BR=VR||(VR={})).AlwaysOff="always_off",BR.AlwaysOn="always_on",BR.ParentBasedAlwaysOff="parentbased_always_off",BR.ParentBasedAlwaysOn="parentbased_always_on",BR.ParentBasedTraceIdRatio="parentbased_traceidratio",BR.TraceIdRatio="traceidratio";var qR=["OTEL_SDK_DISABLED"];function GR(e){return qR.indexOf(e)>-1}var KR=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function WR(e){return KR.indexOf(e)>-1}var YR=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function XR(e){return YR.indexOf(e)>-1}var ZR=1/0,QR=128,JR={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Wf.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:ZR,OTEL_ATTRIBUTE_COUNT_LIMIT:QR,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:ZR,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:QR,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:ZR,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:QR,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:VR.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function eO(e,t,n){if(void 0!==n[e]){var r=String(n[e]);t[e]="true"===r.toLowerCase()}}function tO(e,t,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[e]){var i=Number(n[e]);isNaN(i)||(t[e]=i<r?r:i>o?o:i)}}function nO(e,t,n,r){void 0===r&&(r=",");var o=n[e];"string"==typeof o&&(t[e]=o.split(r).map((function(e){return e.trim()})))}var rO={ALL:Wf.ALL,VERBOSE:Wf.VERBOSE,DEBUG:Wf.DEBUG,INFO:Wf.INFO,WARN:Wf.WARN,ERROR:Wf.ERROR,NONE:Wf.NONE};function oO(e,t,n){var r=n[e];if("string"==typeof r){var o=rO[r.toUpperCase()];null!=o&&(t[e]=o)}}function iO(e){var t={};for(var n in JR){var r=n;if("OTEL_LOG_LEVEL"===r)oO(r,t,e);else if(GR(r))eO(r,t,e);else if(WR(r))tO(r,t,e);else if(XR(r))nO(r,t,e);else{var o=e[r];null!=o&&(t[r]=String(o))}}return t}var aO="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{};function sO(){var e=iO(aO);return Object.assign({},JR,e)}function lO(){return iO(aO)}function cO(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function uO(e){for(var t=new Uint8Array(e.length/2),n=0,r=0;r<e.length;r+=2){var o=cO(e.charCodeAt(r)),i=cO(e.charCodeAt(r+1));t[n++]=o<<4|i}return t}var dO=function(){return function(){this.generateTraceId=fO(16),this.generateSpanId=fO(8)}}(),pO=Array(32);function fO(e){return function(){for(var t=0;t<2*e;t++)pO[t]=Math.floor(16*Math.random())+48,pO[t]>=58&&(pO[t]+=39);return String.fromCharCode.apply(null,pO.slice(0,2*e))}}var hO,mO=performance,gO="1.24.1",vO=((hO={})[DA.TELEMETRY_SDK_NAME]="opentelemetry",hO[DA.PROCESS_RUNTIME_NAME]="browser",hO[DA.TELEMETRY_SDK_LANGUAGE]=xR.WEBJS,hO[DA.TELEMETRY_SDK_VERSION]=gO,hO);function yO(e){}var bO,xO,wO=Math.pow(10,6),_O=Math.pow(10,9);function SO(e){return[Math.trunc(e/1e3),Math.round(e%1e3*wO)]}function EO(){var e=mO.timeOrigin;if("number"!=typeof e){e=mO.timing&&mO.timing.fetchStart}return e}function TO(e){return PO(SO(EO()),SO("number"==typeof e?e:mO.now()))}function CO(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=_O),[n,r]}function AO(e){return e[0]*_O+e[1]}function NO(e){return 1e6*e[0]+e[1]/1e3}function RO(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}function OO(e){return RO(e)||"number"==typeof e||e instanceof Date}function PO(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=_O&&(n[1]-=_O,n[0]+=1),n}(xO=bO||(bO={}))[xO.SUCCESS=0]="SUCCESS",xO[xO.FAILED=1]="FAILED";var kO=function(){function e(e){var t;void 0===e&&(e={}),this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((function(e){return"function"==typeof e.fields?e.fields():[]})).reduce((function(e,t){return e.concat(t)}),[])))}return e.prototype.inject=function(e,t,n){var r,o;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(e,t,n)}catch(l){gm.warn("Failed to inject with "+s.constructor.name+". Err: "+l.message)}}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},e.prototype.extract=function(e,t,n){return this._propagators.reduce((function(e,r){try{return r.extract(e,t,n)}catch(o){gm.warn("Failed to inject with "+r.constructor.name+". Err: "+o.message)}return e}),e)},e.prototype.fields=function(){return this._fields.slice()},e}(),MO="[_0-9a-z-*/]",jO=new RegExp("^(?:"+("[a-z]"+MO+"{0,255}")+"|"+("[a-z0-9]"+MO+"{0,240}@[a-z]"+MO+"{0,13}")+")$"),LO=/^[ -~]{0,255}[!-~]$/,DO=/,|=/;var IO=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,t.length);(function(e){return jO.test(e)})(o)&&function(e){return LO.test(e)&&!DO.test(e)}(i)&&e.set(o,i)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),FO="traceparent",UO="tracestate",$O=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function VO(e){var t=$O.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}var BO,zO=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Om.getSpanContext(e);if(r&&!ER(e)&&Xh(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||Ah.NONE).toString(16);n.set(t,FO,o),r.traceState&&n.set(t,UO,r.traceState.serialize())}},e.prototype.extract=function(e,t,n){var r=n.get(t,FO);if(!r)return e;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return e;var i=VO(o);if(!i)return e;i.isRemote=!0;var a=n.get(t,UO);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new IO("string"==typeof s?s:void 0)}return Om.setSpanContext(e,i)},e.prototype.fields=function(){return[FO,UO]},e}(),HO=oh("OpenTelemetry SDK Context Key RPC_METADATA");(BO||(BO={})).HTTP="http";var qO,GO,KO=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:em.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),WO=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:em.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),YO=function(){function e(e){var t,n,r,o;this._root=e.root,this._root||(HR(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new WO),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new WO,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new KO,this._localParentSampled=null!==(r=e.localParentSampled)&&void 0!==r?r:new WO,this._localParentNotSampled=null!==(o=e.localParentNotSampled)&&void 0!==o?o:new KO}return e.prototype.shouldSample=function(e,t,n,r,o,i){var a=Om.getSpanContext(e);return a&&Xh(a)?a.isRemote?a.traceFlags&Ah.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,o,i):this._remoteParentNotSampled.shouldSample(e,t,n,r,o,i):a.traceFlags&Ah.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,o,i):this._localParentNotSampled.shouldSample(e,t,n,r,o,i):this._root.shouldSample(e,t,n,r,o,i)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),XO=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:Wh(t)&&this._accumulate(t)<this._upperBound?em.RECORD_AND_SAMPLED:em.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n<e.length/8;n++){var r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t},e}(),ZO="[object Null]",QO="[object Undefined]",JO=Function.prototype.toString,eP=JO.call(Object),tP=(qO=Object.getPrototypeOf,GO=Object,function(e){return qO(GO(e))}),nP=Object.prototype,rP=nP.hasOwnProperty,oP=Symbol?Symbol.toStringTag:void 0,iP=nP.toString;function aP(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!==function(e){if(null==e)return void 0===e?QO:ZO;return oP&&oP in Object(e)?function(e){var t=rP.call(e,oP),n=e[oP],r=!1;try{e[oP]=void 0,r=!0}catch(JSe){}var o=iP.call(e);r&&(t?e[oP]=n:delete e[oP]);return o}(e):function(e){return iP.call(e)}(e)}(e))return!1;var t=tP(e);if(null===t)return!0;var n=rP.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&JO.call(n)===eP}function sP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=cP(n,e.shift(),0,r);return n}function lP(e){return dP(e)?e.slice():e}function cP(e,t,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,hP(e)||hP(t)||pP(t))o=lP(t);else if(dP(e)){if(o=e.slice(),dP(t))for(var i=0,a=t.length;i<a;i++)o.push(lP(t[i]));else if(fP(t))for(i=0,a=(s=Object.keys(t)).length;i<a;i++){o[l=s[i]]=lP(t[l])}}else if(fP(e))if(fP(t)){if(!function(e,t){if(!aP(e)||!aP(t))return!1;return!0}(e,t))return t;o=Object.assign({},e);var s;for(i=0,a=(s=Object.keys(t)).length;i<a;i++){var l,c=t[l=s[i]];if(hP(c))void 0===c?delete o[l]:o[l]=c;else{var u=o[l],d=c;if(uP(e,l,r)||uP(t,l,r))delete o[l];else{if(fP(u)&&fP(d)){var p=r.get(u)||[],f=r.get(d)||[];p.push({obj:e,key:l}),f.push({obj:t,key:l}),r.set(u,p),r.set(d,f)}o[l]=cP(o[l],c,n,r)}}}}else o=t;return o}}function uP(e,t,n){for(var r=n.get(e[t])||[],o=0,i=r.length;o<i;o++){var a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function dP(e){return Array.isArray(e)}function pP(e){return"function"==typeof e}function fP(e){return!hP(e)&&!dP(e)&&!pP(e)&&"object"==typeof e}function hP(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||void 0===e||e instanceof Date||e instanceof RegExp||null===e}var mP=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gP=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return mP(t,e),t}(Error);function vP(e,t){return"string"==typeof t?e===t:!!e.match(t)}var yP=function(){function e(){var e=this;this._promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolve(e)},e.prototype.reject=function(e){this._reject(e)},e}(),bP=function(){function e(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new yP}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var e,t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([this._that],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(n),!1))).then((function(e){return t._deferred.resolve(e)}),(function(e){return t._deferred.reject(e)}))}catch(o){this._deferred.reject(o)}}return this._deferred.promise},e}();var xP={_export:function(e,t){return new Promise((function(n){mm.with(SR(mm.active()),(function(){e.export(t,(function(e){n(e)}))}))}))}};const wP=Object.freeze(Object.defineProperty({__proto__:null,AlwaysOffSampler:KO,AlwaysOnSampler:WO,AnchoredClock:MR,BindOnceFuture:bP,CompositePropagator:kO,DEFAULT_ATTRIBUTE_COUNT_LIMIT:QR,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:ZR,DEFAULT_ENVIRONMENT:JR,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,get ExportResultCode(){return bO},ParentBasedSampler:YO,get RPCType(){return BO},RandomIdGenerator:dO,SDK_INFO:vO,TRACE_PARENT_HEADER:FO,TRACE_STATE_HEADER:UO,TimeoutError:gP,TraceIdRatioBasedSampler:XO,TraceState:IO,get TracesSamplerValues(){return VR},VERSION:gO,W3CBaggagePropagator:kR,W3CTraceContextPropagator:zO,_globalThis:aO,addHrTimes:PO,baggageUtils:PR,callWithTimeout:function(e,t){var n,r=new Promise((function(e,r){n=setTimeout((function(){r(new gP("Operation timed out."))}),t)}));return Promise.race([e,r]).then((function(e){return clearTimeout(n),e}),(function(e){throw clearTimeout(n),e}))},deleteRPCMetadata:function(e){return e.deleteValue(HO)},getEnv:sO,getEnvWithoutDefaults:lO,getRPCMetadata:function(e){return e.getValue(HO)},getTimeOrigin:EO,globalErrorHandler:HR,hexToBase64:function(e){return btoa(String.fromCharCode.apply(String,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(uO(e)),!1)))},hexToBinary:uO,hrTime:TO,hrTimeDuration:CO,hrTimeToMicroseconds:NO,hrTimeToMilliseconds:function(e){return 1e3*e[0]+e[1]/1e6},hrTimeToNanoseconds:AO,hrTimeToTimeStamp:function(e){var t=""+"0".repeat(9)+e[1]+"Z",n=t.substr(t.length-9-1);return new Date(1e3*e[0]).toISOString().replace("000Z",n)},internal:xP,isAttributeKey:IR,isAttributeValue:FR,isTimeInput:OO,isTimeInputHrTime:RO,isTracingSuppressed:ER,isUrlIgnored:function(e,t){var n,r;if(!t)return!1;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),i=o.next();!i.done;i=o.next()){if(vP(e,i.value))return!0}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1},isWrapped:function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped},loggingErrorHandler:$R,merge:sP,millisToHrTime:SO,otperformance:mO,parseEnvironment:iO,parseTraceParent:VO,sanitizeAttributes:DR,setGlobalErrorHandler:function(e){zR=e},setRPCMetadata:function(e,t){return e.setValue(HO,t)},suppressTracing:SR,timeInputToHrTime:function(e){if(RO(e))return e;if("number"==typeof e)return e<EO()?TO(e):SO(e);if(e instanceof Date)return SO(e.getTime());throw TypeError("Invalid input type")},unrefTimer:yO,unsuppressTracing:function(e){return e.deleteValue(_R)},urlMatches:vP},Symbol.toStringTag,{value:"Module"}));function _P(){return"unknown_service"}var SP=function(){return SP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},SP.apply(this,arguments)},EP=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},TP=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},CP=function(){function e(e,t){var n,r=this;this._attributes=e,this.asyncAttributesPending=null!=t,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==t?void 0:t.then((function(e){return r._attributes=Object.assign({},r._attributes,e),r.asyncAttributesPending=!1,e}),(function(e){return gm.debug("a resource's async attributes promise rejected: %s",e),r.asyncAttributesPending=!1,{}}))}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e(((t={})[TA]="unknown_service",t[OA]=vO[OA],t[RA]=vO[RA],t[PA]=vO[PA],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&gm.error("Accessing resource attributes before async attributes settled"),null!==(e=this._attributes)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return EP(this,void 0,void 0,(function(){return TP(this,(function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.merge=function(t){var n,r=this;if(!t)return this;var o=SP(SP({},this._syncAttributes),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes);return this._asyncAttributesPromise||t._asyncAttributesPromise?new e(o,Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then((function(e){var n,o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),i=o[0],a=o[1];return SP(SP(SP(SP({},r._syncAttributes),i),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes),a)}))):new e(o)},e.EMPTY=new e({}),e}(),AP=new(function(){function e(){}return e.prototype.detect=function(){return new CP({})},e}()),NP=new(function(){function e(){}return e.prototype.detect=function(){return Promise.resolve(AP.detect())},e}()),RP=NP,OP=AP,PP=NP,kP=AP,MP=NP,jP=NP,LP=AP,DP=function(){return DP=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},DP.apply(this,arguments)},IP=new(function(){function e(){}return e.prototype.detect=function(e){var t,n,r,o;if(!("undefined"!=typeof navigator&&void 0===(null===(r=null===(n=global.process)||void 0===n?void 0:n.versions)||void 0===r?void 0:r.node)&&void 0===(null===(o=global.Bun)||void 0===o?void 0:o.version)))return CP.empty();var i=((t={})[DA.PROCESS_RUNTIME_NAME]="browser",t[DA.PROCESS_RUNTIME_DESCRIPTION]="Web Browser",t[DA.PROCESS_RUNTIME_VERSION]=navigator.userAgent,t);return this._getResourceAttributes(i,e)},e.prototype._getResourceAttributes=function(e,t){return""===e[DA.PROCESS_RUNTIME_VERSION]?(gm.debug("BrowserDetector failed: Unable to find required browser resources. "),CP.empty()):new CP(DP({},e))},e}()),FP=new(function(){function e(){}return e.prototype.detect=function(e){return Promise.resolve(IP.detect(e))},e}()),UP=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},$P=new(function(){function e(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}return e.prototype.detect=function(e){var t={},n=sO(),r=n.OTEL_RESOURCE_ATTRIBUTES,o=n.OTEL_SERVICE_NAME;if(r)try{var i=this._parseResourceAttributes(r);Object.assign(t,i)}catch(JSe){gm.debug("EnvDetector failed: "+JSe.message)}return o&&(t[TA]=o),new CP(t)},e.prototype._parseResourceAttributes=function(e){var t,n;if(!e)return{};var r={},o=e.split(this._COMMA_SEPARATOR,-1);try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(o),a=i.next();!a.done;a=i.next()){var s=a.value.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2===s.length){var l=UP(s,2),c=l[0],u=l[1];if(c=c.trim(),u=u.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(c))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(u))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);r[c]=decodeURIComponent(u)}}}catch(d){t={error:d}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},e.prototype._isValid=function(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)},e.prototype._isBaggageOctetString=function(e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(n<33||44===n||59===n||92===n||n>126)return!1}return!0},e.prototype._isValidAndNotEmpty=function(e){return e.length>0&&this._isValid(e)},e}()),VP=new(function(){function e(){}return e.prototype.detect=function(e){return Promise.resolve($P.detect(e))},e}()),BP=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},zP=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},HP=function(e){e.forEach((function(e){if(Object.keys(e.attributes).length>0){var t=JSON.stringify(e.attributes,null,4);gm.verbose(t)}}))};const qP=Wa(Object.freeze(Object.defineProperty({__proto__:null,Resource:CP,browserDetector:FP,browserDetectorSync:IP,defaultServiceName:_P,detectResources:function(e){return void 0===e&&(e={}),BP(void 0,void 0,void 0,(function(){var t;return zP(this,(function(n){switch(n.label){case 0:return[4,Promise.all((e.detectors||[]).map((function(t){return BP(void 0,void 0,void 0,(function(){var n,r;return zP(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,t.detect(e)];case 1:return n=o.sent(),gm.debug(t.constructor.name+" found resource.",n),[2,n];case 2:return r=o.sent(),gm.debug(t.constructor.name+" failed: "+r.message),[2,CP.empty()];case 3:return[2]}}))}))})))];case 1:return t=n.sent(),HP(t),[2,t.reduce((function(e,t){return e.merge(t)}),CP.empty())]}}))}))},detectResourcesSync:function(e){var t;void 0===e&&(e={});var n=(null!==(t=e.detectors)&&void 0!==t?t:[]).map((function(t){try{var n,r=t.detect(e);if(null!==(o=r)&&"object"==typeof o&&"function"==typeof o.then){n=new CP({},BP(void 0,void 0,void 0,(function(){return zP(this,(function(e){switch(e.label){case 0:return[4,r];case 1:return[2,e.sent().attributes]}}))})))}else n=r;return n.waitForAsyncAttributes?n.waitForAsyncAttributes().then((function(){return gm.debug(t.constructor.name+" found resource.",n)})):gm.debug(t.constructor.name+" found resource.",n),n}catch(JSe){return gm.error(t.constructor.name+" failed: "+JSe.message),CP.empty()}var o})),r=n.reduce((function(e,t){return e.merge(t)}),CP.empty());return r.waitForAsyncAttributes&&r.waitForAsyncAttributes().then((function(){HP(n)})),r},envDetector:VP,envDetectorSync:$P,hostDetector:RP,hostDetectorSync:OP,osDetector:PP,osDetectorSync:kP,processDetector:MP,processDetectorSync:jP,serviceInstanceIdDetectorSync:LP},Symbol.toStringTag,{value:"Module"})));var GP,KP=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},WP=function(){function e(e,t,n,r,o,i,a,s,l,c){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:om.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=i,this.kind=o,this.links=a;var u=Date.now();this._performanceStartTime=mO.now(),this._performanceOffset=u-(this._performanceStartTime+EO()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:u),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=c&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return null==t||this._isSpanEnded()?this:0===e.length?(gm.warn("Invalid attribute key: "+e),this):FR(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),this):(gm.warn("Invalid attribute value set for key: "+e),this)},e.prototype.setAttributes=function(e){var t,n;try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=r.next();!o.done;o=r.next()){var i=KP(o.value,2);this.setAttribute(i[0],i[1])}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.addEvent=function(e,t,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return gm.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&gm.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),OO(t)&&(OO(n)||(n=t),t=void 0);var r=DR(t);return this.events.push({name:e,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.setStatus=function(e){return this._isSpanEnded()||(this.status=e),this},e.prototype.updateName=function(e){return this._isSpanEnded()||(this.name=e),this},e.prototype.end=function(e){this._isSpanEnded()?gm.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(e),this._duration=CO(this.startTime,this.endTime),this._duration[0]<0&&(gm.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&gm.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this))},e.prototype._getTime=function(e){if("number"==typeof e&&e<mO.now())return TO(e+this._performanceOffset);if("number"==typeof e)return SO(e);if(e instanceof Date)return SO(e.getTime());if(RO(e))return e;if(this._startTimeProvided)return SO(Date.now());var t=mO.now()-this._performanceStartTime;return PO(this.startTime,SO(t))},e.prototype.isRecording=function(){return!1===this._ended},e.prototype.recordException=function(e,t){var n={};"string"==typeof e?n[Bx.EXCEPTION_MESSAGE]=e:e&&(e.code?n[Bx.EXCEPTION_TYPE]=e.code.toString():e.name&&(n[Bx.EXCEPTION_TYPE]=e.name),e.message&&(n[Bx.EXCEPTION_MESSAGE]=e.message),e.stack&&(n[Bx.EXCEPTION_STACKTRACE]=e.stack)),n[Bx.EXCEPTION_TYPE]||n[Bx.EXCEPTION_MESSAGE]?this.addEvent("exception",n,t):gm.warn("Failed to record an exception "+e)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&gm.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(e,t){return e.length<=t?e:e.substr(0,t)},e.prototype._truncateToSize=function(e){var t=this,n=this._attributeValueLengthLimit;return n<=0?(gm.warn("Attribute value limit must be positive, got "+n),e):"string"==typeof e?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map((function(e){return"string"==typeof e?t._truncateToLimitUtil(e,n):e})):e},e}();!function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(GP||(GP={}));var YP=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:GP.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),XP=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:GP.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),ZP=function(){function e(e){var t,n,r,o;this._root=e.root,this._root||(HR(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new XP),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new XP,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new YP,this._localParentSampled=null!==(r=e.localParentSampled)&&void 0!==r?r:new XP,this._localParentNotSampled=null!==(o=e.localParentNotSampled)&&void 0!==o?o:new YP}return e.prototype.shouldSample=function(e,t,n,r,o,i){var a=Om.getSpanContext(e);return a&&Xh(a)?a.isRemote?a.traceFlags&Ah.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,o,i):this._remoteParentNotSampled.shouldSample(e,t,n,r,o,i):a.traceFlags&Ah.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,o,i):this._localParentNotSampled.shouldSample(e,t,n,r,o,i):this._root.shouldSample(e,t,n,r,o,i)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),QP=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:Wh(t)&&this._accumulate(t)<this._upperBound?GP.RECORD_AND_SAMPLED:GP.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n<e.length/8;n++){var r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t},e}(),JP=sO(),ek=VR.AlwaysOn;function tk(){return{sampler:nk(JP),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:sO().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:sO().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:sO().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:sO().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:sO().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:sO().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:sO().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:sO().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function nk(e){switch(void 0===e&&(e=sO()),e.OTEL_TRACES_SAMPLER){case VR.AlwaysOn:return new XP;case VR.AlwaysOff:return new YP;case VR.ParentBasedAlwaysOn:return new ZP({root:new XP});case VR.ParentBasedAlwaysOff:return new ZP({root:new YP});case VR.TraceIdRatio:return new QP(rk(e));case VR.ParentBasedTraceIdRatio:return new ZP({root:new QP(rk(e))});default:return gm.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+ek+'".'),new XP}}function rk(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return gm.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(gm.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):t<0||t>1?(gm.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):t}var ok=function(){function e(e,t){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=sO();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new bP(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(gm.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&Ah.SAMPLED&&this._addToBuffer(e)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var e=this;return Promise.resolve().then((function(){return e.onShutdown()})).then((function(){return e._flushAll()})).then((function(){return e._exporter.shutdown()}))},e.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&gm.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(gm.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},e.prototype._flushAll=function(){var e=this;return new Promise((function(t,n){for(var r=[],o=0,i=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize);o<i;o++)r.push(e._flushOneBatch());Promise.all(r).then((function(){t()})).catch(n)}))},e.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(t,n){var r=setTimeout((function(){n(new Error("Timeout"))}),e._exportTimeoutMillis);mm.with(SR(mm.active()),(function(){var o;e._finishedSpans.length<=e._maxExportBatchSize?(o=e._finishedSpans,e._finishedSpans=[]):o=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var i=function(){return e._exporter.export(o,(function(e){var o;clearTimeout(r),e.code===bO.SUCCESS?t():n(null!==(o=e.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))},a=null,s=0,l=o.length;s<l;s++){var c=o[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(null!=a||(a=[]),a.push(c.resource.waitForAsyncAttributes()))}null===a?i():Promise.all(a).then(i,(function(e){HR(e),n(e)}))}))}))},e.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var t=function(){e._isExporting=!0,e._flushOneBatch().finally((function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())})).catch((function(t){e._isExporting=!1,HR(t)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return t();void 0===this._timer&&(this._timer=setTimeout((function(){return t()}),this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},e}(),ik=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ak=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.onInit(n),r}return ik(t,e),t.prototype.onInit=function(e){var t=this;!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&t.forceFlush()},this._pageHideListener=function(){t.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(ok),sk=function(){return function(){this.generateTraceId=ck(16),this.generateSpanId=ck(8)}}(),lk=Array(32);function ck(e){return function(){for(var t=0;t<2*e;t++)lk[t]=Math.floor(16*Math.random())+48,lk[t]>=58&&(lk[t]+=39);return String.fromCharCode.apply(null,lk.slice(0,2*e))}}var uk,dk,pk=function(){function e(e,t,n){this._tracerProvider=n;var r,o,i,a,s=(r=t,o={sampler:nk()},i=tk(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=t.idGenerator||new sk,this.resource=n.resource,this.instrumentationLibrary=e}return e.prototype.startSpan=function(e,t,n){var r,o,i;void 0===t&&(t={}),void 0===n&&(n=mm.active()),t.root&&(n=Om.deleteSpan(n));var a=Om.getSpan(n);if(ER(n))return gm.debug("Instrumentation suppressed, returning Noop Span"),Om.wrapSpanContext(Ih);var s,l,c,u=null==a?void 0:a.spanContext(),d=this._idGenerator.generateSpanId();u&&Om.isSpanContextValid(u)?(s=u.traceId,l=u.traceState,c=u.spanId):s=this._idGenerator.generateTraceId();var p=null!==(r=t.kind)&&void 0!==r?r:nm.INTERNAL,f=(null!==(o=t.links)&&void 0!==o?o:[]).map((function(e){return{context:e.context,attributes:DR(e.attributes)}})),h=DR(t.attributes),m=this._sampler.shouldSample(n,s,e,p,h,f);l=null!==(i=m.traceState)&&void 0!==i?i:l;var g={traceId:s,spanId:d,traceFlags:m.decision===em.RECORD_AND_SAMPLED?Ah.SAMPLED:Ah.NONE,traceState:l};if(m.decision===em.NOT_RECORD)return gm.debug("Recording is off, propagating context in a non-recording span"),Om.wrapSpanContext(g);var v=DR(Object.assign(h,m.attributes));return new WP(this,n,e,g,p,c,f,t.startTime,void 0,v)},e.prototype.startActiveSpan=function(e,t,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=t:3===arguments.length?(o=t,a=n):(o=t,i=n,a=r);var s=null!=i?i:mm.active(),l=this.startSpan(e,o,s),c=Om.setSpan(s,l);return mm.with(c,a,void 0,l)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),fk=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},hk=function(){function e(e){this._spanProcessors=e}return e.prototype.forceFlush=function(){var e,t,n=[];try{for(var r=fk(this._spanProcessors),o=r.next();!o.done;o=r.next()){n.push(o.value.forceFlush())}}catch(i){e={error:i}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e){Promise.all(n).then((function(){e()})).catch((function(t){HR(t||new Error("MultiSpanProcessor: forceFlush failed")),e()}))}))},e.prototype.onStart=function(e,t){var n,r;try{for(var o=fk(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(e,t)}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(e){var t,n;try{for(var r=fk(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(e)}}catch(i){t={error:i}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.shutdown=function(){var e,t,n=[];try{for(var r=fk(this._spanProcessors),o=r.next();!o.done;o=r.next()){n.push(o.value.shutdown())}}catch(i){e={error:i}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e,t){Promise.all(n).then((function(){e()}),t)}))},e}(),mk=function(){function e(){}return e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}();(dk=uk||(uk={}))[dk.resolved=0]="resolved",dk[dk.timeout=1]="timeout",dk[dk.error=2]="error",dk[dk.unresolved=3]="unresolved";var gk=function(){function e(e){var t;void 0===e&&(e={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=sP({},tk(),function(e){var t,n,r,o,i,a,s,l,c,u,d,p,f=Object.assign({},e.spanLimits),h=lO();return f.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(t=e.spanLimits)||void 0===t?void 0:t.attributeCountLimit)&&void 0!==n?n:null===(r=e.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:h.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:h.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:QR,f.attributeValueLengthLimit=null!==(p=null!==(d=null!==(u=null!==(l=null===(s=e.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==l?l:null===(c=e.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==u?u:h.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==d?d:h.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:ZR,Object.assign({},e,{spanLimits:f})}(e));this.resource=null!==(t=n.resource)&&void 0!==t?t:CP.empty(),this.resource=CP.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new ak(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new mk}return e.prototype.getTracer=function(e,t,n){var r=e+"@"+(t||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new pk({name:e,version:t,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},e.prototype.addSpanProcessor=function(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(e){return gm.error("Error while trying to shutdown current span processor",e)})),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new hk(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(e){void 0===e&&(e={}),Om.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&mm.setGlobalContextManager(e.contextManager),e.propagator&&Nm.setGlobalPropagator(e.propagator)},e.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map((function(t){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+e+" ms")),r=uk.timeout}),e);t.forceFlush().then((function(){clearTimeout(o),r!==uk.timeout&&n(r=uk.resolved)})).catch((function(e){clearTimeout(o),r=uk.error,n(e)}))}))}));return new Promise((function(e,n){Promise.all(t).then((function(t){var r=t.filter((function(e){return e!==uk.resolved}));r.length>0?n(r):e()})).catch((function(e){return n([e])}))}))},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(e){var t;return null===(t=this.constructor._registeredPropagators.get(e))||void 0===t?void 0:t()},e.prototype._getSpanExporter=function(e){var t;return null===(t=this.constructor._registeredExporters.get(e))||void 0===t?void 0:t()},e.prototype._buildPropagatorFromEnv=function(){var e=this,t=Array.from(new Set(sO().OTEL_PROPAGATORS)),n=t.map((function(t){var n=e._getPropagator(t);return n||gm.warn('Propagator "'+t+'" requested through environment variable is unavailable.'),n})).reduce((function(e,t){return t&&e.push(t),e}),[]);return 0===n.length?void 0:1===t.length?n[0]:new kO({propagators:n})},e.prototype._buildExporterFromEnv=function(){var e=sO().OTEL_TRACES_EXPORTER;if("none"!==e&&""!==e){var t=this._getSpanExporter(e);return t||gm.error('Exporter "'+e+'" requested through environment variable is unavailable.'),t}},e._registeredPropagators=new Map([["tracecontext",function(){return new zO}],["baggage",function(){return new kR}]]),e._registeredExporters=new Map,e}(),vk=function(){function e(){}return e.prototype.export=function(e,t){return this._sendSpans(e,t)},e.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype._exportInfo=function(e){var t;return{resource:{attributes:e.resource.attributes},traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:null===(t=e.spanContext().traceState)||void 0===t?void 0:t.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:NO(e.startTime),duration:NO(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},e.prototype._sendSpans=function(e,t){var n,r;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),i=o.next();!i.done;i=o.next());}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(t)return t({code:bO.SUCCESS})},e}(),yk=function(){function e(){this._finishedSpans=[],this._stopped=!1}return e.prototype.export=function(e,t){var n;if(this._stopped)return t({code:bO.FAILED,error:new Error("Exporter has been stopped")});(n=this._finishedSpans).push.apply(n,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e),!1)),setTimeout((function(){return t({code:bO.SUCCESS})}),0)},e.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.reset=function(){this._finishedSpans=[]},e.prototype.getFinishedSpans=function(){return this._finishedSpans},e}(),bk=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},xk=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},wk=function(){function e(e){this._exporter=e,this._shutdownOnce=new bP(this._shutdown,this),this._unresolvedExports=new Set}return e.prototype.forceFlush=function(){return bk(this,void 0,void 0,(function(){return xk(this,(function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){var t,n,r=this;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&Ah.SAMPLED){var o=function(){return xP._export(r._exporter,[e]).then((function(e){var t;e.code!==bO.SUCCESS&&HR(null!==(t=e.error)&&void 0!==t?t:new Error("SimpleSpanProcessor: span export failed (status "+e+")"))})).catch((function(e){HR(e)}))};if(e.resource.asyncAttributesPending){var i=null===(n=(t=e.resource).waitForAsyncAttributes)||void 0===n?void 0:n.call(t).then((function(){return null!=i&&r._unresolvedExports.delete(i),o()}),(function(e){return HR(e)}));null!=i&&this._unresolvedExports.add(i)}else o()}},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._exporter.shutdown()},e}();const _k=Wa(Object.freeze(Object.defineProperty({__proto__:null,AlwaysOffSampler:YP,AlwaysOnSampler:XP,BasicTracerProvider:gk,BatchSpanProcessor:ak,ConsoleSpanExporter:vk,get ForceFlushState(){return uk},InMemorySpanExporter:yk,NoopSpanProcessor:mk,ParentBasedSampler:ZP,RandomIdGenerator:sk,get SamplingDecision(){return GP},SimpleSpanProcessor:wk,Span:WP,TraceIdRatioBasedSampler:QP,Tracer:pk},Symbol.toStringTag,{value:"Module"})));var Sk=oh("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Ek(e){return e.setValue(Sk,!0)}function Tk(e){return!0===e.getValue(Sk)}var Ck="baggage";function Ak(e){return e.getAllEntries().map((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),n=t[1],r=encodeURIComponent(t[0])+"="+encodeURIComponent(n.value);return void 0!==n.metadata&&(r+=";"+n.metadata.toString()),r}))}var Nk=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Nm.getBaggage(e);if(r&&!Tk(e)){var o=function(e){return e.reduce((function(e,t){var n=e+(""!==e?",":"")+t;return n.length>8192?e:n}),"")}(Ak(r).filter((function(e){return e.length<=4096})).slice(0,180));o.length>0&&n.set(t,Ck,o)}},e.prototype.extract=function(e,t,n){var r=n.get(t,Ck),o=Array.isArray(r)?r.join(","):r;if(!o)return e;var i={};return 0===o.length?e:(o.split(",").forEach((function(e){var t=function(e){var t=e.split(";");if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var o,i=decodeURIComponent(n.substring(0,r).trim()),a=decodeURIComponent(n.substring(r+1).trim());return t.length>0&&(o=rh(t.join(";"))),{key:i,value:a,metadata:o}}}}}(e);if(t){var n={value:t.value};t.metadata&&(n.metadata=t.metadata),i[t.key]=n}})),0===Object.entries(i).length?e:Nm.setBaggage(e,Nm.createBaggage(i)))},e.prototype.fields=function(){return[Ck]},e}(),Rk=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ok=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Pk(e){var t,n,r={};if("object"!=typeof e||null==e)return r;try{for(var o=Rk(Object.entries(e)),i=o.next();!i.done;i=o.next()){var a=Ok(i.value,2),s=a[0],l=a[1];kk(s)?Mk(l)?r[s]=Array.isArray(l)?l.slice():l:gm.warn("Invalid attribute value set for key: "+s):gm.warn("Invalid attribute key: "+s)}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function kk(e){return"string"==typeof e&&e.length>0}function Mk(e){return null==e||(Array.isArray(e)?function(e){var t,n,r;try{for(var o=Rk(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(jk(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!0}(e):jk(e))}function jk(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}var Lk,Dk=function(e){gm.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){for(var t={},n=e;null!==n;)Object.getOwnPropertyNames(n).forEach((function(e){if(!t[e]){var r=n[e];r&&(t[e]=String(r))}})),n=Object.getPrototypeOf(n);return t}(e))}(e))};function Ik(e){try{Dk(e)}catch(t){}}!function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"}(Lk||(Lk={}));var Fk=["OTEL_SDK_DISABLED"];function Uk(e){return Fk.indexOf(e)>-1}var $k=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Vk(e){return $k.indexOf(e)>-1}var Bk=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function zk(e){return Bk.indexOf(e)>-1}var Hk=1/0,qk=128,Gk={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:Wf.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Hk,OTEL_ATTRIBUTE_COUNT_LIMIT:qk,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Hk,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:qk,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Hk,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:qk,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Lk.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function Kk(e,t,n){if(void 0!==n[e]){var r=String(n[e]);t[e]="true"===r.toLowerCase()}}function Wk(e,t,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[e]){var i=Number(n[e]);isNaN(i)||(t[e]=i<r?r:i>o?o:i)}}function Yk(e,t,n,r){void 0===r&&(r=",");var o=n[e];"string"==typeof o&&(t[e]=o.split(r).map((function(e){return e.trim()})))}var Xk={ALL:Wf.ALL,VERBOSE:Wf.VERBOSE,DEBUG:Wf.DEBUG,INFO:Wf.INFO,WARN:Wf.WARN,ERROR:Wf.ERROR,NONE:Wf.NONE};function Zk(e,t,n){var r=n[e];if("string"==typeof r){var o=Xk[r.toUpperCase()];null!=o&&(t[e]=o)}}function Qk(e){var t={};for(var n in Gk){var r=n;if("OTEL_LOG_LEVEL"===r)Zk(r,t,e);else if(Uk(r))Kk(r,t,e);else if(Vk(r))Wk(r,t,e);else if(zk(r))Yk(r,t,e);else{var o=e[r];null!=o&&(t[r]=String(o))}}return t}var Jk="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{};function eM(){var e=Qk(Jk);return Object.assign({},Gk,e)}var tM=performance;function nM(e){for(var t={},n=e.length,r=0;r<n;r++){var o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var rM,oM=nM(["aws.lambda.invoked_arn","db.system","db.connection_string","db.user","db.jdbc.driver_classname","db.name","db.statement","db.operation","db.mssql.instance_name","db.cassandra.keyspace","db.cassandra.page_size","db.cassandra.consistency_level","db.cassandra.table","db.cassandra.idempotence","db.cassandra.speculative_execution_count","db.cassandra.coordinator.id","db.cassandra.coordinator.dc","db.hbase.namespace","db.redis.database_index","db.mongodb.collection","db.sql.table","exception.type","exception.message","exception.stacktrace","exception.escaped","faas.trigger","faas.execution","faas.document.collection","faas.document.operation","faas.document.time","faas.document.name","faas.time","faas.cron","faas.coldstart","faas.invoked_name","faas.invoked_provider","faas.invoked_region","net.transport","net.peer.ip","net.peer.port","net.peer.name","net.host.ip","net.host.port","net.host.name","net.host.connection.type","net.host.connection.subtype","net.host.carrier.name","net.host.carrier.mcc","net.host.carrier.mnc","net.host.carrier.icc","peer.service","enduser.id","enduser.role","enduser.scope","thread.id","thread.name","code.function","code.namespace","code.filepath","code.lineno","http.method","http.url","http.target","http.host","http.scheme","http.status_code","http.flavor","http.user_agent","http.request_content_length","http.request_content_length_uncompressed","http.response_content_length","http.response_content_length_uncompressed","http.server_name","http.route","http.client_ip","aws.dynamodb.table_names","aws.dynamodb.consumed_capacity","aws.dynamodb.item_collection_metrics","aws.dynamodb.provisioned_read_capacity","aws.dynamodb.provisioned_write_capacity","aws.dynamodb.consistent_read","aws.dynamodb.projection","aws.dynamodb.limit","aws.dynamodb.attributes_to_get","aws.dynamodb.index_name","aws.dynamodb.select","aws.dynamodb.global_secondary_indexes","aws.dynamodb.local_secondary_indexes","aws.dynamodb.exclusive_start_table","aws.dynamodb.table_count","aws.dynamodb.scan_forward","aws.dynamodb.segment","aws.dynamodb.total_segments","aws.dynamodb.count","aws.dynamodb.scanned_count","aws.dynamodb.attribute_definitions","aws.dynamodb.global_secondary_index_updates","messaging.system","messaging.destination","messaging.destination_kind","messaging.temp_destination","messaging.protocol","messaging.protocol_version","messaging.url","messaging.message_id","messaging.conversation_id","messaging.message_payload_size_bytes","messaging.message_payload_compressed_size_bytes","messaging.operation","messaging.consumer_id","messaging.rabbitmq.routing_key","messaging.kafka.message_key","messaging.kafka.consumer_group","messaging.kafka.client_id","messaging.kafka.partition","messaging.kafka.tombstone","rpc.system","rpc.service","rpc.method","rpc.grpc.status_code","rpc.jsonrpc.version","rpc.jsonrpc.request_id","rpc.jsonrpc.error_code","rpc.jsonrpc.error_message","message.type","message.id","message.compressed_size","message.uncompressed_size"]),iM="service.name",aM="telemetry.sdk.name",sM="telemetry.sdk.language",lM="telemetry.sdk.version",cM=iM,uM=aM,dM=sM,pM=lM,fM=nM(["cloud.provider","cloud.account.id","cloud.region","cloud.availability_zone","cloud.platform","aws.ecs.container.arn","aws.ecs.cluster.arn","aws.ecs.launchtype","aws.ecs.task.arn","aws.ecs.task.family","aws.ecs.task.revision","aws.eks.cluster.arn","aws.log.group.names","aws.log.group.arns","aws.log.stream.names","aws.log.stream.arns","container.name","container.id","container.runtime","container.image.name","container.image.tag","deployment.environment","device.id","device.model.identifier","device.model.name","faas.name","faas.id","faas.version","faas.instance","faas.max_memory","host.id","host.name","host.type","host.arch","host.image.name","host.image.id","host.image.version","k8s.cluster.name","k8s.node.name","k8s.node.uid","k8s.namespace.name","k8s.pod.uid","k8s.pod.name","k8s.container.name","k8s.replicaset.uid","k8s.replicaset.name","k8s.deployment.uid","k8s.deployment.name","k8s.statefulset.uid","k8s.statefulset.name","k8s.daemonset.uid","k8s.daemonset.name","k8s.job.uid","k8s.job.name","k8s.cronjob.uid","k8s.cronjob.name","os.type","os.description","os.name","os.version","process.pid","process.executable.name","process.executable.path","process.command","process.command_line","process.command_args","process.owner","process.runtime.name","process.runtime.version","process.runtime.description",iM,"service.namespace","service.instance.id","service.version",aM,sM,lM,"telemetry.auto.version","webengine.name","webengine.version","webengine.description"]),hM=nM(["cpp","dotnet","erlang","go","java","nodejs","php","python","ruby","webjs"]),mM=((rM={})[fM.TELEMETRY_SDK_NAME]="opentelemetry",rM[fM.PROCESS_RUNTIME_NAME]="browser",rM[fM.TELEMETRY_SDK_LANGUAGE]=hM.WEBJS,rM[fM.TELEMETRY_SDK_VERSION]="1.24.1",rM);var gM,vM=Math.pow(10,6),yM=Math.pow(10,9);function bM(e){return[Math.trunc(e/1e3),Math.round(e%1e3*vM)]}function xM(){var e=tM.timeOrigin;if("number"!=typeof e){e=tM.timing&&tM.timing.fetchStart}return e}function wM(e){return AM(bM(xM()),bM("number"==typeof e?e:tM.now()))}function _M(e){if(TM(e))return e;if("number"==typeof e)return e<xM()?wM(e):bM(e);if(e instanceof Date)return bM(e.getTime());throw TypeError("Invalid input type")}function SM(e){return e[0]*yM+e[1]}function EM(e){return 1e6*e[0]+e[1]/1e3}function TM(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}function CM(e){return TM(e)||"number"==typeof e||e instanceof Date}function AM(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=yM&&(n[1]-=yM,n[0]+=1),n}!function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"}(gM||(gM={}));var NM=function(){function e(e){var t;void 0===e&&(e={}),this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((function(e){return"function"==typeof e.fields?e.fields():[]})).reduce((function(e,t){return e.concat(t)}),[])))}return e.prototype.inject=function(e,t,n){var r,o;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(e,t,n)}catch(l){gm.warn("Failed to inject with "+s.constructor.name+". Err: "+l.message)}}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},e.prototype.extract=function(e,t,n){return this._propagators.reduce((function(e,r){try{return r.extract(e,t,n)}catch(o){gm.warn("Failed to inject with "+r.constructor.name+". Err: "+o.message)}return e}),e)},e.prototype.fields=function(){return this._fields.slice()},e}(),RM="[_0-9a-z-*/]",OM=new RegExp("^(?:"+("[a-z]"+RM+"{0,255}")+"|"+("[a-z0-9]"+RM+"{0,240}@[a-z]"+RM+"{0,13}")+")$"),PM=/^[ -~]{0,255}[!-~]$/,kM=/,|=/;var MM=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,t.length);(function(e){return OM.test(e)})(o)&&function(e){return PM.test(e)&&!kM.test(e)}(i)&&e.set(o,i)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),jM="traceparent",LM="tracestate",DM=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var IM=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Om.getSpanContext(e);if(r&&!Tk(e)&&Xh(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||Ah.NONE).toString(16);n.set(t,jM,o),r.traceState&&n.set(t,LM,r.traceState.serialize())}},e.prototype.extract=function(e,t,n){var r=n.get(t,jM);if(!r)return e;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return e;var i=function(e){var t=DM.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}(o);if(!i)return e;i.isRemote=!0;var a=n.get(t,LM);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new MM("string"==typeof s?s:void 0)}return Om.setSpanContext(e,i)},e.prototype.fields=function(){return[jM,LM]},e}(),FM="[object Null]",UM="[object Undefined]",$M=Function.prototype.toString,VM=$M.call(Object),BM=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),zM=Object.prototype,HM=zM.hasOwnProperty,qM=Symbol?Symbol.toStringTag:void 0,GM=zM.toString;function KM(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!==function(e){if(null==e)return void 0===e?UM:FM;return qM&&qM in Object(e)?function(e){var t=HM.call(e,qM),n=e[qM],r=!1;try{e[qM]=void 0,r=!0}catch(JSe){}var o=GM.call(e);r&&(t?e[qM]=n:delete e[qM]);return o}(e):function(e){return GM.call(e)}(e)}(e))return!1;var t=BM(e);if(null===t)return!0;var n=HM.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&$M.call(n)===VM}function WM(e){return ZM(e)?e.slice():e}function YM(e,t,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,ej(e)||ej(t)||QM(t))o=WM(t);else if(ZM(e)){if(o=e.slice(),ZM(t))for(var i=0,a=t.length;i<a;i++)o.push(WM(t[i]));else if(JM(t))for(i=0,a=(s=Object.keys(t)).length;i<a;i++){o[l=s[i]]=WM(t[l])}}else if(JM(e))if(JM(t)){if(!function(e,t){if(!KM(e)||!KM(t))return!1;return!0}(e,t))return t;o=Object.assign({},e);var s;for(i=0,a=(s=Object.keys(t)).length;i<a;i++){var l,c=t[l=s[i]];if(ej(c))void 0===c?delete o[l]:o[l]=c;else{var u=o[l],d=c;if(XM(e,l,r)||XM(t,l,r))delete o[l];else{if(JM(u)&&JM(d)){var p=r.get(u)||[],f=r.get(d)||[];p.push({obj:e,key:l}),f.push({obj:t,key:l}),r.set(u,p),r.set(d,f)}o[l]=YM(o[l],c,n,r)}}}}else o=t;return o}}function XM(e,t,n){for(var r=n.get(e[t])||[],o=0,i=r.length;o<i;o++){var a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function ZM(e){return Array.isArray(e)}function QM(e){return"function"==typeof e}function JM(e){return!ej(e)&&!ZM(e)&&!QM(e)&&"object"==typeof e}function ej(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||void 0===e||e instanceof Date||e instanceof RegExp||null===e}var tj=function(){function e(){var e=this;this._promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolve(e)},e.prototype.reject=function(e){this._reject(e)},e}(),nj=function(){function e(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new tj}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var e,t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([this._that],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(n),!1))).then((function(e){return t._deferred.resolve(e)}),(function(e){return t._deferred.reject(e)}))}catch(o){this._deferred.reject(o)}}return this._deferred.promise},e}();var rj,oj={_export:function(e,t){return new Promise((function(n){mm.with(Ek(mm.active()),(function(){e.export(t,(function(e){n(e)}))}))}))}},ij=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},aj=function(){function e(e,t,n,r,o,i,a,s,l,c){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:om.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=i,this.kind=o,this.links=a;var u=Date.now();this._performanceStartTime=tM.now(),this._performanceOffset=u-(this._performanceStartTime+xM()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:u),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=c&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return null==t||this._isSpanEnded()?this:0===e.length?(gm.warn("Invalid attribute key: "+e),this):Mk(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),this):(gm.warn("Invalid attribute value set for key: "+e),this)},e.prototype.setAttributes=function(e){var t,n;try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),o=r.next();!o.done;o=r.next()){var i=ij(o.value,2);this.setAttribute(i[0],i[1])}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.addEvent=function(e,t,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return gm.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&gm.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),CM(t)&&(CM(n)||(n=t),t=void 0);var r=Pk(t);return this.events.push({name:e,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.setStatus=function(e){return this._isSpanEnded()||(this.status=e),this},e.prototype.updateName=function(e){return this._isSpanEnded()||(this.name=e),this},e.prototype.end=function(e){this._isSpanEnded()?gm.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(e),this._duration=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=yM),[n,r]}(this.startTime,this.endTime),this._duration[0]<0&&(gm.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&gm.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this))},e.prototype._getTime=function(e){if("number"==typeof e&&e<tM.now())return wM(e+this._performanceOffset);if("number"==typeof e)return bM(e);if(e instanceof Date)return bM(e.getTime());if(TM(e))return e;if(this._startTimeProvided)return bM(Date.now());var t=tM.now()-this._performanceStartTime;return AM(this.startTime,bM(t))},e.prototype.isRecording=function(){return!1===this._ended},e.prototype.recordException=function(e,t){var n={};"string"==typeof e?n[oM.EXCEPTION_MESSAGE]=e:e&&(e.code?n[oM.EXCEPTION_TYPE]=e.code.toString():e.name&&(n[oM.EXCEPTION_TYPE]=e.name),e.message&&(n[oM.EXCEPTION_MESSAGE]=e.message),e.stack&&(n[oM.EXCEPTION_STACKTRACE]=e.stack)),n[oM.EXCEPTION_TYPE]||n[oM.EXCEPTION_MESSAGE]?this.addEvent("exception",n,t):gm.warn("Failed to record an exception "+e)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&gm.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(e,t){return e.length<=t?e:e.substr(0,t)},e.prototype._truncateToSize=function(e){var t=this,n=this._attributeValueLengthLimit;return n<=0?(gm.warn("Attribute value limit must be positive, got "+n),e):"string"==typeof e?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map((function(e){return"string"==typeof e?t._truncateToLimitUtil(e,n):e})):e},e}();!function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(rj||(rj={}));var sj=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:rj.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),lj=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:rj.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),cj=function(){function e(e){var t,n,r,o;this._root=e.root,this._root||(Ik(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new lj),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new lj,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new sj,this._localParentSampled=null!==(r=e.localParentSampled)&&void 0!==r?r:new lj,this._localParentNotSampled=null!==(o=e.localParentNotSampled)&&void 0!==o?o:new sj}return e.prototype.shouldSample=function(e,t,n,r,o,i){var a=Om.getSpanContext(e);return a&&Xh(a)?a.isRemote?a.traceFlags&Ah.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,o,i):this._remoteParentNotSampled.shouldSample(e,t,n,r,o,i):a.traceFlags&Ah.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,o,i):this._localParentNotSampled.shouldSample(e,t,n,r,o,i):this._root.shouldSample(e,t,n,r,o,i)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),uj=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:Wh(t)&&this._accumulate(t)<this._upperBound?rj.RECORD_AND_SAMPLED:rj.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n<e.length/8;n++){var r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t},e}(),dj=eM(),pj=Lk.AlwaysOn;function fj(){return{sampler:hj(dj),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:eM().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:eM().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:eM().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:eM().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:eM().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:eM().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:eM().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:eM().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function hj(e){switch(void 0===e&&(e=eM()),e.OTEL_TRACES_SAMPLER){case Lk.AlwaysOn:return new lj;case Lk.AlwaysOff:return new sj;case Lk.ParentBasedAlwaysOn:return new cj({root:new lj});case Lk.ParentBasedAlwaysOff:return new cj({root:new sj});case Lk.TraceIdRatio:return new uj(mj(e));case Lk.ParentBasedTraceIdRatio:return new cj({root:new uj(mj(e))});default:return gm.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+pj+'".'),new lj}}function mj(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return gm.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(gm.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):t<0||t>1?(gm.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):t}function gj(e){var t,n,r,o,i,a,s,l,c,u,d,p,f=Object.assign({},e.spanLimits),h=Qk(Jk);return f.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(t=e.spanLimits)||void 0===t?void 0:t.attributeCountLimit)&&void 0!==n?n:null===(r=e.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:h.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:h.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:qk,f.attributeValueLengthLimit=null!==(p=null!==(d=null!==(u=null!==(l=null===(s=e.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==l?l:null===(c=e.generalLimits)||void 0===c?void 0:c.attributeValueLengthLimit)&&void 0!==u?u:h.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==d?d:h.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:Hk,Object.assign({},e,{spanLimits:f})}var vj=function(){function e(e,t){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=eM();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new nj(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(gm.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&Ah.SAMPLED&&this._addToBuffer(e)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var e=this;return Promise.resolve().then((function(){return e.onShutdown()})).then((function(){return e._flushAll()})).then((function(){return e._exporter.shutdown()}))},e.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&gm.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(gm.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},e.prototype._flushAll=function(){var e=this;return new Promise((function(t,n){for(var r=[],o=0,i=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize);o<i;o++)r.push(e._flushOneBatch());Promise.all(r).then((function(){t()})).catch(n)}))},e.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(t,n){var r=setTimeout((function(){n(new Error("Timeout"))}),e._exportTimeoutMillis);mm.with(Ek(mm.active()),(function(){var o;e._finishedSpans.length<=e._maxExportBatchSize?(o=e._finishedSpans,e._finishedSpans=[]):o=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var i=function(){return e._exporter.export(o,(function(e){var o;clearTimeout(r),e.code===gM.SUCCESS?t():n(null!==(o=e.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))},a=null,s=0,l=o.length;s<l;s++){var c=o[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(null!=a||(a=[]),a.push(c.resource.waitForAsyncAttributes()))}null===a?i():Promise.all(a).then(i,(function(e){Ik(e),n(e)}))}))}))},e.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var t=function(){e._isExporting=!0,e._flushOneBatch().finally((function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())})).catch((function(t){e._isExporting=!1,Ik(t)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return t();void 0===this._timer&&(this._timer=setTimeout((function(){return t()}),this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},e}(),yj=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bj=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.onInit(n),r}return yj(t,e),t.prototype.onInit=function(e){var t=this;!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&t.forceFlush()},this._pageHideListener=function(){t.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(vj),xj=function(){return function(){this.generateTraceId=_j(16),this.generateSpanId=_j(8)}}(),wj=Array(32);function _j(e){return function(){for(var t=0;t<2*e;t++)wj[t]=Math.floor(16*Math.random())+48,wj[t]>=58&&(wj[t]+=39);return String.fromCharCode.apply(null,wj.slice(0,2*e))}}var Sj=function(){function e(e,t,n){this._tracerProvider=n;var r,o,i,a,s=(r=t,o={sampler:hj()},i=fj(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=t.idGenerator||new xj,this.resource=n.resource,this.instrumentationLibrary=e}return e.prototype.startSpan=function(e,t,n){var r,o,i;void 0===t&&(t={}),void 0===n&&(n=mm.active()),t.root&&(n=Om.deleteSpan(n));var a=Om.getSpan(n);if(Tk(n))return gm.debug("Instrumentation suppressed, returning Noop Span"),Om.wrapSpanContext(Ih);var s,l,c,u=null==a?void 0:a.spanContext(),d=this._idGenerator.generateSpanId();u&&Om.isSpanContextValid(u)?(s=u.traceId,l=u.traceState,c=u.spanId):s=this._idGenerator.generateTraceId();var p=null!==(r=t.kind)&&void 0!==r?r:nm.INTERNAL,f=(null!==(o=t.links)&&void 0!==o?o:[]).map((function(e){return{context:e.context,attributes:Pk(e.attributes)}})),h=Pk(t.attributes),m=this._sampler.shouldSample(n,s,e,p,h,f);l=null!==(i=m.traceState)&&void 0!==i?i:l;var g={traceId:s,spanId:d,traceFlags:m.decision===em.RECORD_AND_SAMPLED?Ah.SAMPLED:Ah.NONE,traceState:l};if(m.decision===em.NOT_RECORD)return gm.debug("Recording is off, propagating context in a non-recording span"),Om.wrapSpanContext(g);var v=Pk(Object.assign(h,m.attributes));return new aj(this,n,e,g,p,c,f,t.startTime,void 0,v)},e.prototype.startActiveSpan=function(e,t,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=t:3===arguments.length?(o=t,a=n):(o=t,i=n,a=r);var s=null!=i?i:mm.active(),l=this.startSpan(e,o,s),c=Om.setSpan(s,l);return mm.with(c,a,void 0,l)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}();var Ej,Tj=function(){return Tj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Tj.apply(this,arguments)},Cj=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Aj=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Nj=function(){function e(e,t){var n,r=this;this._attributes=e,this.asyncAttributesPending=null!=t,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==t?void 0:t.then((function(e){return r._attributes=Object.assign({},r._attributes,e),r.asyncAttributesPending=!1,e}),(function(e){return gm.debug("a resource's async attributes promise rejected: %s",e),r.asyncAttributesPending=!1,{}}))}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e(((t={})[cM]="unknown_service",t[dM]=mM[dM],t[uM]=mM[uM],t[pM]=mM[pM],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&gm.error("Accessing resource attributes before async attributes settled"),null!==(e=this._attributes)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return Cj(this,void 0,void 0,(function(){return Aj(this,(function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.merge=function(t){var n,r=this;if(!t)return this;var o=Tj(Tj({},this._syncAttributes),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes);return this._asyncAttributesPromise||t._asyncAttributesPromise?new e(o,Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then((function(e){var n,o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),i=o[0],a=o[1];return Tj(Tj(Tj(Tj({},r._syncAttributes),i),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes),a)}))):new e(o)},e.EMPTY=new e({}),e}(),Rj=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Oj=function(){function e(e){this._spanProcessors=e}return e.prototype.forceFlush=function(){var e,t,n=[];try{for(var r=Rj(this._spanProcessors),o=r.next();!o.done;o=r.next()){n.push(o.value.forceFlush())}}catch(i){e={error:i}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e){Promise.all(n).then((function(){e()})).catch((function(t){Ik(t||new Error("MultiSpanProcessor: forceFlush failed")),e()}))}))},e.prototype.onStart=function(e,t){var n,r;try{for(var o=Rj(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(e,t)}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(e){var t,n;try{for(var r=Rj(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(e)}}catch(i){t={error:i}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.shutdown=function(){var e,t,n=[];try{for(var r=Rj(this._spanProcessors),o=r.next();!o.done;o=r.next()){n.push(o.value.shutdown())}}catch(i){e={error:i}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e,t){Promise.all(n).then((function(){e()}),t)}))},e}(),Pj=function(){function e(){}return e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}();!function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"}(Ej||(Ej={}));var kj,Mj,jj,Lj=function(){function e(e){var t;void 0===e&&(e={}),this._registeredSpanProcessors=[],this._tracers=new Map;var n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=YM(n,e.shift(),0,r);return n}({},fj(),gj(e));this.resource=null!==(t=n.resource)&&void 0!==t?t:Nj.empty(),this.resource=Nj.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var r=this._buildExporterFromEnv();if(void 0!==r){var o=new bj(r);this.activeSpanProcessor=o}else this.activeSpanProcessor=new Pj}return e.prototype.getTracer=function(e,t,n){var r=e+"@"+(t||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new Sj({name:e,version:t,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},e.prototype.addSpanProcessor=function(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(e){return gm.error("Error while trying to shutdown current span processor",e)})),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new Oj(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(e){void 0===e&&(e={}),Om.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&mm.setGlobalContextManager(e.contextManager),e.propagator&&Nm.setGlobalPropagator(e.propagator)},e.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map((function(t){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+e+" ms")),r=Ej.timeout}),e);t.forceFlush().then((function(){clearTimeout(o),r!==Ej.timeout&&n(r=Ej.resolved)})).catch((function(e){clearTimeout(o),r=Ej.error,n(e)}))}))}));return new Promise((function(e,n){Promise.all(t).then((function(t){var r=t.filter((function(e){return e!==Ej.resolved}));r.length>0?n(r):e()})).catch((function(e){return n([e])}))}))},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(e){var t;return null===(t=this.constructor._registeredPropagators.get(e))||void 0===t?void 0:t()},e.prototype._getSpanExporter=function(e){var t;return null===(t=this.constructor._registeredExporters.get(e))||void 0===t?void 0:t()},e.prototype._buildPropagatorFromEnv=function(){var e=this,t=Array.from(new Set(eM().OTEL_PROPAGATORS)),n=t.map((function(t){var n=e._getPropagator(t);return n||gm.warn('Propagator "'+t+'" requested through environment variable is unavailable.'),n})).reduce((function(e,t){return t&&e.push(t),e}),[]);return 0===n.length?void 0:1===t.length?n[0]:new NM({propagators:n})},e.prototype._buildExporterFromEnv=function(){var e=eM().OTEL_TRACES_EXPORTER;if("none"!==e&&""!==e){var t=this._getSpanExporter(e);return t||gm.error('Exporter "'+e+'" requested through environment variable is unavailable.'),t}},e._registeredPropagators=new Map([["tracecontext",function(){return new IM}],["baggage",function(){return new Nk}]]),e._registeredExporters=new Map,e}(),Dj=function(){function e(){}return e.prototype.export=function(e,t){return this._sendSpans(e,t)},e.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype._exportInfo=function(e){var t;return{resource:{attributes:e.resource.attributes},traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:null===(t=e.spanContext().traceState)||void 0===t?void 0:t.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:EM(e.startTime),duration:EM(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},e.prototype._sendSpans=function(e,t){var n,r;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),i=o.next();!i.done;i=o.next());}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(t)return t({code:gM.SUCCESS})},e}(),Ij=function(){function e(){this._finishedSpans=[],this._stopped=!1}return e.prototype.export=function(e,t){var n;if(this._stopped)return t({code:gM.FAILED,error:new Error("Exporter has been stopped")});(n=this._finishedSpans).push.apply(n,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e),!1)),setTimeout((function(){return t({code:gM.SUCCESS})}),0)},e.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.reset=function(){this._finishedSpans=[]},e.prototype.getFinishedSpans=function(){return this._finishedSpans},e}(),Fj=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Uj=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},$j=function(){function e(e){this._exporter=e,this._shutdownOnce=new nj(this._shutdown,this),this._unresolvedExports=new Set}return e.prototype.forceFlush=function(){return Fj(this,void 0,void 0,(function(){return Uj(this,(function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){var t,n,r=this;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&Ah.SAMPLED){var o=function(){return oj._export(r._exporter,[e]).then((function(e){var t;e.code!==gM.SUCCESS&&Ik(null!==(t=e.error)&&void 0!==t?t:new Error("SimpleSpanProcessor: span export failed (status "+e+")"))})).catch((function(e){Ik(e)}))};if(e.resource.asyncAttributesPending){var i=null===(n=(t=e.resource).waitForAsyncAttributes)||void 0===n?void 0:n.call(t).then((function(){return null!=i&&r._unresolvedExports.delete(i),o()}),(function(e){return Ik(e)}));null!=i&&this._unresolvedExports.add(i)}else o()}},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._exporter.shutdown()},e}(),Vj=function(){function e(){this._enabled=!1,this._currentContext=sh}return e.prototype._bindFunction=function(e,t){void 0===e&&(e=sh);var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(e,(function(){return t.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(e,t){return void 0===e&&(e=this.active()),"function"==typeof t?this._bindFunction(e,t):t},e.prototype.disable=function(){return this._currentContext=sh,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled||(this._enabled=!0,this._currentContext=sh),this},e.prototype.with=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._currentContext;this._currentContext=e||sh;try{return t.call.apply(t,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([n],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(r),!1))}finally{this._currentContext=i}},e}(),Bj=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zj=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;if(t.contextManager)throw"contextManager should be defined in register method not in constructor";if(t.propagator)throw"propagator should be defined in register method not in constructor";return n}return Bj(t,e),t.prototype.register=function(t){void 0===t&&(t={}),void 0===t.contextManager&&(t.contextManager=new Vj),t.contextManager&&t.contextManager.enable(),e.prototype.register.call(this,t)},t}(Lj);function Hj(e,t){return t in e}function qj(e,t,n,r){var o=void 0,i=void 0;Hj(n,t)&&"number"==typeof n[t]&&(o=n[t]);var a=r||kj.FETCH_START;if(Hj(n,a)&&"number"==typeof n[a]&&(i=n[a]),void 0!==o&&void 0!==i&&o>=i)return e.addEvent(t,o),e}function Gj(e,t){qj(e,kj.FETCH_START,t),qj(e,kj.DOMAIN_LOOKUP_START,t),qj(e,kj.DOMAIN_LOOKUP_END,t),qj(e,kj.CONNECT_START,t),Hj(t,"name")&&t.name.startsWith("https:")&&qj(e,kj.SECURE_CONNECTION_START,t),qj(e,kj.CONNECT_END,t),qj(e,kj.REQUEST_START,t),qj(e,kj.RESPONSE_START,t),qj(e,kj.RESPONSE_END,t);var n=t[kj.ENCODED_BODY_SIZE];void 0!==n&&e.setAttribute(oM.HTTP_RESPONSE_CONTENT_LENGTH,n);var r=t[kj.DECODED_BODY_SIZE];void 0!==r&&n!==r&&e.setAttribute(oM.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,r)}function Kj(e){return e.slice().sort((function(e,t){var n=e[kj.FETCH_START],r=t[kj.FETCH_START];return n>r?1:n<r?-1:0}))}function Wj(){return"undefined"!=typeof location?location.origin:void 0}function Yj(e){if("function"==typeof URL)return new URL(e,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var t=(jj||(jj=document.createElement("a")),jj);return t.href=e,t}function Xj(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var n=function(e,t){var n=e.nodeType,r=function(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var n=Array.from(e.parentNode.childNodes);if(n=n.filter((function(n){var r=n.localName;return t.indexOf(n.nodeType)>=0&&r===e.localName})),n.length>=1)return n.indexOf(e)+1;return 0}(e),o="";if(n===Node.ELEMENT_NODE){var i=e.getAttribute("id");if(t&&i)return'//*[@id="'+i+'"]';o=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)o="text()";else{if(n!==Node.COMMENT_NODE)return"";o="comment()"}if(o&&r>1)return"/"+o+"["+r+"]";return"/"+o}(e,t);if(t&&n.indexOf("@id")>0)return n;var r="";return e.parentNode&&(r+=Xj(e.parentNode,!1)),r+=n}(Mj=kj||(kj={})).CONNECT_END="connectEnd",Mj.CONNECT_START="connectStart",Mj.DECODED_BODY_SIZE="decodedBodySize",Mj.DOM_COMPLETE="domComplete",Mj.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",Mj.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",Mj.DOM_INTERACTIVE="domInteractive",Mj.DOMAIN_LOOKUP_END="domainLookupEnd",Mj.DOMAIN_LOOKUP_START="domainLookupStart",Mj.ENCODED_BODY_SIZE="encodedBodySize",Mj.FETCH_START="fetchStart",Mj.LOAD_EVENT_END="loadEventEnd",Mj.LOAD_EVENT_START="loadEventStart",Mj.NAVIGATION_START="navigationStart",Mj.REDIRECT_END="redirectEnd",Mj.REDIRECT_START="redirectStart",Mj.REQUEST_START="requestStart",Mj.RESPONSE_END="responseEnd",Mj.RESPONSE_START="responseStart",Mj.SECURE_CONNECTION_START="secureConnectionStart",Mj.UNLOAD_EVENT_END="unloadEventEnd",Mj.UNLOAD_EVENT_START="unloadEventStart";const Zj=Wa(Object.freeze(Object.defineProperty({__proto__:null,AlwaysOffSampler:sj,AlwaysOnSampler:lj,BasicTracerProvider:Lj,BatchSpanProcessor:bj,ConsoleSpanExporter:Dj,get ForceFlushState(){return Ej},InMemorySpanExporter:Ij,NoopSpanProcessor:Pj,ParentBasedSampler:cj,get PerformanceTimingNames(){return kj},RandomIdGenerator:xj,get SamplingDecision(){return rj},SimpleSpanProcessor:$j,Span:aj,StackContextManager:Vj,TraceIdRatioBasedSampler:uj,Tracer:Sj,WebTracerProvider:zj,addSpanNetworkEvent:qj,addSpanNetworkEvents:Gj,getElementXPath:Xj,getResource:function(e,t,n,r,o,i){void 0===o&&(o=new WeakSet);var a=Yj(e),s=function(e,t,n,r,o,i){var a=SM(t),s=SM(n),l=r.filter((function(t){var n=SM(_M(t[kj.FETCH_START])),r=SM(_M(t[kj.RESPONSE_END]));return t.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&t.name===e&&n>=a&&r<=s}));l.length>0&&(l=l.filter((function(e){return!o.has(e)})));return l}(e=a.toString(),t,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var l=Kj(s);if(a.origin!==Wj()&&l.length>1){var c=l[0],u=function(e,t,n){for(var r,o=SM(n),i=SM(_M(t)),a=e[1],s=e.length,l=1;l<s;l++){var c=e[l],u=SM(_M(c[kj.FETCH_START])),d=o-SM(_M(c[kj.RESPONSE_END]));u>=i&&(!r||d<r)&&(r=d,a=c)}return a}(l,c[kj.RESPONSE_END],n);return u[kj.FETCH_START]<c[kj.RESPONSE_END]&&(u=c,c=void 0),{corsPreFlightRequest:c,mainRequest:u}}return{mainRequest:s[0]}},hasKey:Hj,normalizeUrl:function(e){return Yj(e).href},parseUrl:Yj,shouldPropagateTraceHeaders:function(e,t){var n=t||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),Yj(e).origin===Wj()||n.some((function(t){return n=e,"string"==typeof(r=t)?n===r:!!n.match(r);var n,r}))},sortResources:Kj},Symbol.toStringTag,{value:"Module"}))),Qj=Wa(wR);var Jj={};Object.defineProperty(Jj,"__esModule",{value:!0}),Jj.SessionIdSpanProcessor=void 0;const eL=Array(32);function tL(e){for(var t={},n=e.length,r=0;r<n;r++){var o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}Jj.SessionIdSpanProcessor=class{constructor(){var e;this._idGenerator=(e=16,function(){for(let t=0;t<2*e;t++)eL[t]=Math.floor(16*Math.random())+48,eL[t]>=58&&(eL[t]+=39);return String.fromCharCode.apply(null,eL.slice(0,2*e))}),this._sessionId=this._idGenerator()}onStart(e){e.setAttribute("session.id",this._sessionId)}onEnd(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}};var nL,rL="service.name",oL="telemetry.sdk.name",iL="telemetry.sdk.language",aL="telemetry.sdk.version",sL=rL,lL=oL,cL=iL,uL=aL,dL=tL(["cloud.provider","cloud.account.id","cloud.region","cloud.availability_zone","cloud.platform","aws.ecs.container.arn","aws.ecs.cluster.arn","aws.ecs.launchtype","aws.ecs.task.arn","aws.ecs.task.family","aws.ecs.task.revision","aws.eks.cluster.arn","aws.log.group.names","aws.log.group.arns","aws.log.stream.names","aws.log.stream.arns","container.name","container.id","container.runtime","container.image.name","container.image.tag","deployment.environment","device.id","device.model.identifier","device.model.name","faas.name","faas.id","faas.version","faas.instance","faas.max_memory","host.id","host.name","host.type","host.arch","host.image.name","host.image.id","host.image.version","k8s.cluster.name","k8s.node.name","k8s.node.uid","k8s.namespace.name","k8s.pod.uid","k8s.pod.name","k8s.container.name","k8s.replicaset.uid","k8s.replicaset.name","k8s.deployment.uid","k8s.deployment.name","k8s.statefulset.uid","k8s.statefulset.name","k8s.daemonset.uid","k8s.daemonset.name","k8s.job.uid","k8s.job.name","k8s.cronjob.uid","k8s.cronjob.name","os.type","os.description","os.name","os.version","process.pid","process.executable.name","process.executable.path","process.command","process.command_line","process.command_args","process.owner","process.runtime.name","process.runtime.version","process.runtime.description",rL,"service.namespace","service.instance.id","service.version",oL,iL,aL,"telemetry.auto.version","webengine.name","webengine.version","webengine.description"]),pL=tL(["cpp","dotnet","erlang","go","java","nodejs","php","python","ruby","webjs"]),fL=((nL={})[dL.TELEMETRY_SDK_NAME]="opentelemetry",nL[dL.PROCESS_RUNTIME_NAME]="browser",nL[dL.TELEMETRY_SDK_LANGUAGE]=pL.WEBJS,nL[dL.TELEMETRY_SDK_VERSION]="1.24.1",nL);var hL=function(){return hL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hL.apply(this,arguments)},mL=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},gL=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},vL=function(){function e(e,t){var n,r=this;this._attributes=e,this.asyncAttributesPending=null!=t,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==t?void 0:t.then((function(e){return r._attributes=Object.assign({},r._attributes,e),r.asyncAttributesPending=!1,e}),(function(e){return gm.debug("a resource's async attributes promise rejected: %s",e),r.asyncAttributesPending=!1,{}}))}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e(((t={})[sL]="unknown_service",t[cL]=fL[cL],t[lL]=fL[lL],t[uL]=fL[uL],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&gm.error("Accessing resource attributes before async attributes settled"),null!==(e=this._attributes)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return mL(this,void 0,void 0,(function(){return gL(this,(function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.merge=function(t){var n,r=this;if(!t)return this;var o=hL(hL({},this._syncAttributes),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes);return this._asyncAttributesPromise||t._asyncAttributesPromise?new e(o,Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then((function(e){var n,o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),i=o[0],a=o[1];return hL(hL(hL(hL({},r._syncAttributes),i),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes),a)}))):new e(o)},e.EMPTY=new e({}),e}(),yL="browser.platform",bL="browser.brands",xL="browser.mobile",wL="browser.language",_L="browser.user_agent",SL=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},EL=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};var TL=new(function(){function e(){}return e.prototype.detect=function(e){return SL(this,void 0,void 0,(function(){var t;return EL(this,(function(n){return"undefined"!=typeof navigator?(t=function(){var e={},t=navigator.userAgentData;t?(e[yL]=t.platform,e[bL]=t.brands.map((function(e){return e.brand+" "+e.version})),e[xL]=t.mobile):e[_L]=navigator.userAgent;return e[wL]=navigator.language,e}(),[2,this._getResourceAttributes(t,e)]):[2,vL.empty()]}))}))},e.prototype._getResourceAttributes=function(e,t){return e[_L]||e[yL]?new vL(e):(gm.debug("BrowserDetector failed: Unable to find required browser resources. "),vL.empty())},e}());const CL=Wa(Object.freeze(Object.defineProperty({__proto__:null,browserDetector:TL},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(If,"__esModule",{value:!0}),If.WebSDK=void 0;const AL=eg,NL=qP,RL=_k,OL=Zj,PL=Qj,kL=Jj,ML=CL;If.WebSDK=class{constructor(e={}){var t,n,r,o;if(this._resource=null!==(t=e.resource)&&void 0!==t?t:new NL.Resource({}),this._resourceDetectors=null!==(n=e.resourceDetectors)&&void 0!==n?n:[ML.browserDetector],this._serviceName=e.serviceName,this._autoDetectResources=null===(r=e.autoDetectResources)||void 0===r||r,e.spanProcessor||e.traceExporter){const t={};e.sampler&&(t.sampler=e.sampler),e.spanLimits&&(t.spanLimits=e.spanLimits),e.idGenerator&&(t.idGenerator=e.idGenerator);const n=null!==(o=e.spanProcessor)&&void 0!==o?o:new RL.BatchSpanProcessor(e.traceExporter);this._tracerProviderConfig={tracerConfig:t,spanProcessor:n,contextManager:e.contextManager,textMapPropagator:e.textMapPropagator}}let i=[];e.instrumentations&&(i=e.instrumentations),this._instrumentations=i}start(){var e,t,n;if(this._disabled)return;if((0,AL.registerInstrumentations)({instrumentations:this._instrumentations}),this._autoDetectResources){this._resource=this._resource.merge((0,NL.detectResourcesSync)({detectors:this._resourceDetectors}))}this._resource=void 0===this._serviceName?this._resource:this._resource.merge(new NL.Resource({[PL.SEMRESATTRS_SERVICE_NAME]:this._serviceName}));const r=new OL.WebTracerProvider(Object.assign(Object.assign({},null===(e=this._tracerProviderConfig)||void 0===e?void 0:e.tracerConfig),{resource:this._resource}));this._tracerProvider=r,this._tracerProviderConfig&&r.addSpanProcessor(this._tracerProviderConfig.spanProcessor),r.register({contextManager:null===(t=this._tracerProviderConfig)||void 0===t?void 0:t.contextManager,propagator:null===(n=this._tracerProviderConfig)||void 0===n?void 0:n.textMapPropagator}),r.addSpanProcessor(new kL.SessionIdSpanProcessor)}getResourceAttributes(){return this._resource.attributes}shutdown(){const e=[];return this._tracerProvider&&e.push(this._tracerProvider.shutdown()),Promise.all(e).then((()=>{}))}};var jL={},LL={},DL={};Object.defineProperty(DL,"__esModule",{value:!0}),DL.VERSION=void 0,DL.VERSION="0.3.0",Object.defineProperty(LL,"__esModule",{value:!0}),LL.configureHoneycombResource=void 0;const IL=qP,FL=DL;LL.configureHoneycombResource=function(){return new IL.Resource({"honeycomb.distro.version":FL.VERSION,"honeycomb.distro.runtime_version":"browser"})};var UL={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.configureEntryPageResource=e.defaultConfig=void 0;const t=qP;function n(e,t){if(e)return t}e.defaultConfig={path:!0,hash:!0,hostname:!0,referrer:!0,url:!1,search:!1},e.configureEntryPageResource=function(r){if(!1===r||!(null===window||void 0===window?void 0:window.location))return new t.Resource({});const o=function(t){if(!t)return e.defaultConfig;return Object.assign(Object.assign({},e.defaultConfig),t)}(r),{href:i,pathname:a,search:s,hash:l,hostname:c}=window.location,u={"entry_page.url":n(o.url,i),"entry_page.path":n(o.path,a),"entry_page.search":n(o.search,s),"entry_page.hash":n(o.hash,l),"entry_page.hostname":n(o.hostname,c),"entry_page.referrer":n(o.referrer,document.referrer)};return new t.Resource(u)}}(UL);var $L,VL,BL={},zL={exports:{}};$L=zL,VL=zL.exports,function(e,t){var n="function",r="undefined",o="object",i="string",a="major",s="model",l="name",c="type",u="vendor",d="version",p="architecture",f="console",h="mobile",m="tablet",g="smarttv",v="wearable",y="embedded",b="Amazon",x="Apple",w="ASUS",_="BlackBerry",S="Browser",E="Chrome",T="Firefox",C="Google",A="Huawei",N="LG",R="Microsoft",O="Motorola",P="Opera",k="Samsung",M="Sharp",j="Sony",L="Xiaomi",D="Zebra",I="Facebook",F="Chromium OS",U="Mac OS",$=" Browser",V=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},B=function(e,t){return typeof e===i&&-1!==z(t).indexOf(z(e))},z=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===i)return e=e.replace(/^\s\s*/,""),typeof t===r?e:e.substring(0,500)},q=function(e,r){for(var i,a,s,l,c,u,d=0;d<r.length&&!c;){var p=r[d],f=r[d+1];for(i=a=0;i<p.length&&!c&&p[i];)if(c=p[i++].exec(e))for(s=0;s<f.length;s++)u=c[++a],typeof(l=f[s])===o&&l.length>0?2===l.length?this[l[0]]=typeof l[1]==n?l[1].call(this,u):l[1]:3===l.length?this[l[0]]=typeof l[1]!==n||l[1].exec&&l[1].test?u?u.replace(l[1],l[2]):t:u?l[1].call(this,u,l[2]):t:4===l.length&&(this[l[0]]=u?l[3].call(this,u.replace(l[1],l[2])):t):this[l]=u||t;d+=2}},G=function(e,n){for(var r in n)if(typeof n[r]===o&&n[r].length>0){for(var i=0;i<n[r].length;i++)if(B(n[r][i],e))return"?"===r?t:r}else if(B(n[r],e))return"?"===r?t:r;return n.hasOwnProperty("*")?n["*"]:e},K={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},W={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,d],[/opios[\/ ]+([\w\.]+)/i],[d,[l,P+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[d,[l,P+" GX"]],[/\bopr\/([\w\.]+)/i],[d,[l,P]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[d,[l,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[d,[l,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[l,d],[/quark(?:pc)?\/([-\w\.]+)/i],[d,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[d,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[l,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[d,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[d,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[d,[l,"Smart Lenovo "+S]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+S],d],[/\bfocus\/([\w\.]+)/i],[d,[l,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[d,[l,P+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[l,P+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[l,"MIUI"+$]],[/fxios\/([\w\.-]+)/i],[d,[l,T]],[/\bqihoobrowser\/?([\w\.]*)/i],[d,[l,"360"]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],d],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+$],d],[/samsungbrowser\/([\w\.]+)/i],[d,[l,k+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[d,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[l,d],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[d,l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,I],d],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[d,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[l,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,E+" WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[l,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,d],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[d,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[d,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[d,G,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],d],[/(wolvic|librewolf)\/([\w\.]+)/i],[l,d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[l,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,[d,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[d,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,z]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",z]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[u,k],[c,m]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[s,[u,k],[c,h]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[s,[u,x],[c,h]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[u,x],[c,m]],[/(macintosh);/i],[s,[u,x]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[u,M],[c,h]],[/(?:honor)([-\w ]+)[;\)]/i],[s,[u,"Honor"],[c,h]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[u,A],[c,m]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[s,[u,A],[c,h]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[s,/_/g," "],[u,L],[c,h]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[u,L],[c,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[u,"OPPO"],[c,h]],[/\b(opd2\d{3}a?) bui/i],[s,[u,"OPPO"],[c,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[u,"Vivo"],[c,h]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[s,[u,"Realme"],[c,h]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[u,O],[c,h]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[u,O],[c,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[u,N],[c,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[u,N],[c,h]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[u,"Lenovo"],[c,m]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[u,"Nokia"],[c,h]],[/(pixel c)\b/i],[s,[u,C],[c,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[u,C],[c,h]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[u,j],[c,h]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[u,j],[c,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[u,"OnePlus"],[c,h]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[u,b],[c,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[u,b],[c,h]],[/(playbook);[-\w\),; ]+(rim)/i],[s,u,[c,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[u,_],[c,h]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[u,w],[c,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[u,w],[c,h]],[/(nexus 9)/i],[s,[u,"HTC"],[c,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[s,/_/g," "],[c,h]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[s,[u,"TCL"],[c,m]],[/(itel) ((\w+))/i],[[u,z],s,[c,G,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[u,"Acer"],[c,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[u,"Meizu"],[c,h]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[s,[u,"Ulefone"],[c,h]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[s,[u,"Energizer"],[c,h]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[s,[u,"Cat"],[c,h]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[s,[u,"Smartfren"],[c,h]],[/droid.+; (a(?:015|06[35]|142p?))/i],[s,[u,"Nothing"],[c,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,s,[c,h]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,s,[c,m]],[/(surface duo)/i],[s,[u,R],[c,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[u,"Fairphone"],[c,h]],[/(u304aa)/i],[s,[u,"AT&T"],[c,h]],[/\bsie-(\w*)/i],[s,[u,"Siemens"],[c,h]],[/\b(rct\w+) b/i],[s,[u,"RCA"],[c,m]],[/\b(venue[\d ]{2,7}) b/i],[s,[u,"Dell"],[c,m]],[/\b(q(?:mv|ta)\w+) b/i],[s,[u,"Verizon"],[c,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[u,"Barnes & Noble"],[c,m]],[/\b(tm\d{3}\w+) b/i],[s,[u,"NuVision"],[c,m]],[/\b(k88) b/i],[s,[u,"ZTE"],[c,m]],[/\b(nx\d{3}j) b/i],[s,[u,"ZTE"],[c,h]],[/\b(gen\d{3}) b.+49h/i],[s,[u,"Swiss"],[c,h]],[/\b(zur\d{3}) b/i],[s,[u,"Swiss"],[c,m]],[/\b((zeki)?tb.*\b) b/i],[s,[u,"Zeki"],[c,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],s,[c,m]],[/\b(ns-?\w{0,9}) b/i],[s,[u,"Insignia"],[c,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[u,"NextBook"],[c,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],s,[c,h]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],s,[c,h]],[/\b(ph-1) /i],[s,[u,"Essential"],[c,h]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[u,"Envizen"],[c,m]],[/\b(trio[-\w\. ]+) b/i],[s,[u,"MachSpeed"],[c,m]],[/\btu_(1491) b/i],[s,[u,"Rotor"],[c,m]],[/(shield[\w ]+) b/i],[s,[u,"Nvidia"],[c,m]],[/(sprint) (\w+)/i],[u,s,[c,h]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[u,R],[c,h]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[u,D],[c,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[u,D],[c,h]],[/smart-tv.+(samsung)/i],[u,[c,g]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[u,k],[c,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,N],[c,g]],[/(apple) ?tv/i],[u,[s,x+" TV"],[c,g]],[/crkey/i],[[s,E+"cast"],[u,C],[c,g]],[/droid.+aft(\w+)( bui|\))/i],[s,[u,b],[c,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[s,[u,M],[c,g]],[/(bravia[\w ]+)( bui|\))/i],[s,[u,j],[c,g]],[/(mitv-\w{5}) bui/i],[s,[u,L],[c,g]],[/Hbbtv.*(technisat) (.*);/i],[u,s,[c,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[u,H],[s,H],[c,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,s,[c,f]],[/droid.+; (shield) bui/i],[s,[u,"Nvidia"],[c,f]],[/(playstation [345portablevi]+)/i],[s,[u,j],[c,f]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[u,R],[c,f]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[s,[u,k],[c,v]],[/((pebble))app/i],[u,s,[c,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[s,[u,x],[c,v]],[/droid.+; (glass) \d/i],[s,[u,C],[c,v]],[/droid.+; (wt63?0{2,3})\)/i],[s,[u,D],[c,v]],[/droid.+; (glass) \d/i],[s,[u,C],[c,v]],[/(pico) (4|neo3(?: link|pro)?)/i],[u,s,[c,v]],[/; (quest( \d| pro)?)/i],[s,[u,I],[c,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[c,y]],[/(aeobc)\b/i],[s,[u,b],[c,y]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[s,[c,h]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[c,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,m]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[c,h]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[l,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[l,d],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[l,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,d],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[l,[d,G,K]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,G,K],[l,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,U],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[d,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,d],[/\(bb(10);/i],[d,[l,_]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[l,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[d,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[d,[l,E+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,F],d],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,d],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,d]]},Y=function(f,g){if(typeof f===o&&(g=f,f=t),!(this instanceof Y))return new Y(f,g).getResult();var v=typeof e!==r&&e.navigator?e.navigator:t,y=f||(v&&v.userAgent?v.userAgent:""),b=v&&v.userAgentData?v.userAgentData:t,x=g?function(e,t){var n={};for(var r in e)n[r]=t[r]&&t[r].length%2==0?t[r].concat(e[r]):e[r];return n}(W,g):W,w=v&&v.userAgent==y;return this.getBrowser=function(){var e,r={};return r[l]=t,r[d]=t,q.call(r,y,x.browser),r[a]=typeof(e=r[d])===i?e.replace(/[^\d\.]/g,"").split(".")[0]:t,w&&v&&v.brave&&typeof v.brave.isBrave==n&&(r[l]="Brave"),r},this.getCPU=function(){var e={};return e[p]=t,q.call(e,y,x.cpu),e},this.getDevice=function(){var e={};return e[u]=t,e[s]=t,e[c]=t,q.call(e,y,x.device),w&&!e[c]&&b&&b.mobile&&(e[c]=h),w&&"Macintosh"==e[s]&&v&&typeof v.standalone!==r&&v.maxTouchPoints&&v.maxTouchPoints>2&&(e[s]="iPad",e[c]=m),e},this.getEngine=function(){var e={};return e[l]=t,e[d]=t,q.call(e,y,x.engine),e},this.getOS=function(){var e={};return e[l]=t,e[d]=t,q.call(e,y,x.os),w&&!e[l]&&b&&b.platform&&"Unknown"!=b.platform&&(e[l]=b.platform.replace(/chrome os/i,F).replace(/macos/i,U)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(e){return y=typeof e===i&&e.length>500?H(e,500):e,this},this.setUA(y),this};Y.VERSION="1.0.40",Y.BROWSER=V([l,d,a]),Y.CPU=V([p]),Y.DEVICE=V([s,u,c,f,h,g,m,v,y]),Y.ENGINE=Y.OS=V([l,d]),$L.exports&&(VL=$L.exports=Y),VL.UAParser=Y;var X=typeof e!==r&&(e.jQuery||e.Zepto);if(X&&!X.ua){var Z=new Y;X.ua=Z.getResult(),X.ua.get=function(){return Z.getUA()},X.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"==typeof window?window:Ga);var HL=zL.exports;!function(e){var t=Ga&&Ga.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.configureBrowserAttributesResource=e.computeDeviceProperties=e.computeNetworkType=e.computeScreenSize=void 0;const n=qP,r=t(HL);e.computeScreenSize=e=>e<=768?"small":e>768&&e<=1024?"medium":e>1024?"large":"unknown";e.computeNetworkType=e=>{var t;return null!==(t=null==e?void 0:e.effectiveType)&&void 0!==t?t:"unknown"};e.computeDeviceProperties=e=>{const t=new r.default(e),{name:n,version:o}=t.getBrowser();return{browserName:null!=n?n:"unknown",browserVersion:null!=o?o:"unknown",deviceType:(i=t.getDevice().type,a=n,i||a?i||"desktop":"unknown")};var i,a},e.configureBrowserAttributesResource=function(){const{browserName:t,browserVersion:r,deviceType:o}=(0,e.computeDeviceProperties)(navigator.userAgent);return new n.Resource({"user_agent.original":navigator.userAgent,"browser.mobile":navigator.userAgent.includes("Mobi"),"browser.touch_screen_enabled":navigator.maxTouchPoints>0,"browser.language":navigator.language,"browser.name":t,"browser.version":r,"device.type":o,"network.effectiveType":(0,e.computeNetworkType)(navigator.connection),"screen.width":window.screen.width,"screen.height":window.screen.height,"screen.size":(0,e.computeScreenSize)(window.screen.width)})}}(BL);var qL={};Object.defineProperty(qL,"__esModule",{value:!0}),qL.mergeResources=void 0;const GL=qP;function KL(e){return e instanceof GL.Resource?e:new GL.Resource(e||{})}qL.mergeResources=function(e){let t=KL(e[0]);for(let n=1;n<e.length;n++){if(!e[n])continue;const r=KL(e[n]);t=t.merge(r)}return t};var WL={};const YL=Wa(km);var XL={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getSampleRate=e.getTracesApiKey=e.getTracesEndpoint=e.maybeAppendTracesPath=e.isClassic=e.createHoneycombSDKLogMessage=e.defaultOptions=e.DEFAULT_SAMPLE_RATE=e.DEFAULT_SERVICE_NAME=e.DEFAULT_TRACES_ENDPOINT=e.TRACES_PATH=e.DEFAULT_API_ENDPOINT=void 0,e.DEFAULT_API_ENDPOINT="https://api.honeycomb.io",e.TRACES_PATH="v1/traces",e.DEFAULT_TRACES_ENDPOINT=`${e.DEFAULT_API_ENDPOINT}/${e.TRACES_PATH}`,e.DEFAULT_SERVICE_NAME="unknown_service",e.DEFAULT_SAMPLE_RATE=1,e.defaultOptions={apiKey:"",tracesApiKey:"",endpoint:e.DEFAULT_TRACES_ENDPOINT,tracesEndpoint:e.DEFAULT_TRACES_ENDPOINT,serviceName:e.DEFAULT_SERVICE_NAME,debug:!1,sampleRate:1,skipOptionsValidation:!1,localVisualizations:!1,webVitalsInstrumentationConfig:{enabled:!0}};e.createHoneycombSDKLogMessage=e=>`@honeycombio/opentelemetry-web: ${e}`;const t=/^[a-f0-9]*$/,n=/^hc[a-z]ic_[a-z0-9]*$/;function r(t){return t.endsWith(e.TRACES_PATH)||t.endsWith(`${e.TRACES_PATH}/`)?t:t.endsWith("/")?t+e.TRACES_PATH:t+"/"+e.TRACES_PATH}e.isClassic=function(e){return null!=e&&0!==e.length&&(32===e.length?t.test(e):64===e.length&&n.test(e))},e.maybeAppendTracesPath=r;e.getTracesEndpoint=t=>(null==t?void 0:t.tracesEndpoint)?t.tracesEndpoint:(null==t?void 0:t.endpoint)?r(t.endpoint):e.DEFAULT_TRACES_ENDPOINT;e.getTracesApiKey=e=>(null==e?void 0:e.tracesApiKey)||(null==e?void 0:e.apiKey);e.getSampleRate=t=>"number"==typeof(null==t?void 0:t.sampleRate)&&Number.isSafeInteger(null==t?void 0:t.sampleRate)&&(null==t?void 0:t.sampleRate)>=0?null==t?void 0:t.sampleRate:e.DEFAULT_SAMPLE_RATE}(XL);var ZL={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateOptionsWarnings=e.FAILED_AUTH_FOR_LOCAL_VISUALIZATIONS=e.MISSING_FIELDS_FOR_LOCAL_VISUALIZATIONS=e.SAMPLER_OVERRIDE_WARNING=e.SKIPPING_OPTIONS_VALIDATION_MSG=e.MISSING_DATASET_ERROR=e.IGNORED_DATASET_ERROR=e.MISSING_SERVICE_NAME_ERROR=e.MISSING_API_KEY_ERROR=void 0;const t=XL;e.MISSING_API_KEY_ERROR=(0,t.createHoneycombSDKLogMessage)("❌ Missing API Key. Set `apiKey` in HoneycombOptions. Telemetry will not be exported."),e.MISSING_SERVICE_NAME_ERROR=(0,t.createHoneycombSDKLogMessage)(`❌ Missing Service Name. Set \`serviceName\` in HoneycombOptions. Defaulting to '${t.defaultOptions.serviceName}'`),e.IGNORED_DATASET_ERROR=(0,t.createHoneycombSDKLogMessage)("🔕 Dataset is ignored in favor of service name."),e.MISSING_DATASET_ERROR=(0,t.createHoneycombSDKLogMessage)("❌ Missing dataset. Specify either HONEYCOMB_DATASET environment variable or dataset in the options parameter."),e.SKIPPING_OPTIONS_VALIDATION_MSG=(0,t.createHoneycombSDKLogMessage)("⏭️ Skipping options validation. To re-enable, set skipOptionsValidation option or HONEYCOMB_SKIP_OPTIONS_VALIDATION to false."),e.SAMPLER_OVERRIDE_WARNING=(0,t.createHoneycombSDKLogMessage)("🔨 Default deterministic sampler has been overridden. Honeycomb requires a resource attribute called SampleRate to properly show weighted values. Non-deterministic sampleRate could lead to missing spans in Honeycomb. See our docs for more details. https://docs.honeycomb.io/getting-data-in/opentelemetry/node-distro/#sampling-without-the-honeycomb-sdk"),e.MISSING_FIELDS_FOR_LOCAL_VISUALIZATIONS=(0,t.createHoneycombSDKLogMessage)("🔕 Disabling local visualizations - must have both service name and API key configured."),e.FAILED_AUTH_FOR_LOCAL_VISUALIZATIONS=(0,t.createHoneycombSDKLogMessage)("🔕 Failed to get proper auth response from Honeycomb. No local visualization available.");e.validateOptionsWarnings=e=>{if(!(null==e?void 0:e.skipOptionsValidation))return(null==e?void 0:e.apiKey)&&(0,t.isClassic)(null==e?void 0:e.apiKey),(null==e?void 0:e.apiKey)&&(0,t.isClassic)(null==e?void 0:e.apiKey),e}}(ZL),Object.defineProperty(WL,"__esModule",{value:!0}),WL.configureDebug=void 0;const QL=YL,JL=XL,eD=ZL;WL.configureDebug=function(e){if(!(null==e?void 0:e.debug))return;QL.diag.setLogger(new QL.DiagConsoleLogger,QL.DiagLogLevel.DEBUG),QL.diag.debug((0,JL.createHoneycombSDKLogMessage)("🐝 Honeycomb Web SDK Debug Mode Enabled 🐝"));const t=(0,JL.getTracesEndpoint)(e),n=Object.assign(Object.assign(Object.assign({},JL.defaultOptions),e),{tracesEndpoint:t});!function(e){const t=(0,JL.getTracesApiKey)(e)||"";if(!t)return void QL.diag.debug(eD.MISSING_API_KEY_ERROR);QL.diag.debug((0,JL.createHoneycombSDKLogMessage)(`API Key configured for traces: '${t}'`))}(n),function(e){const t=e.serviceName||JL.defaultOptions.serviceName;if(t===JL.defaultOptions.serviceName)return void QL.diag.debug(eD.MISSING_SERVICE_NAME_ERROR);QL.diag.debug(`@honeycombio/opentelemetry-web: Service Name configured for traces: '${t}'`)}(n),function(e){const t=(0,JL.getTracesEndpoint)(e);if(!t)return void QL.diag.debug((0,JL.createHoneycombSDKLogMessage)("No endpoint configured for traces"));QL.diag.debug((0,JL.createHoneycombSDKLogMessage)(`Endpoint configured for traces: '${t}'`))}(n),function(e){const t=(0,JL.getSampleRate)(e);if(!t)return void QL.diag.debug("No sampler configured for traces");QL.diag.debug((0,JL.createHoneycombSDKLogMessage)(`Sample Rate configured for traces: '${t}'`))}(n)};var tD={},nD={};Object.defineProperty(nD,"__esModule",{value:!0}),nD.BaggageSpanProcessor=void 0;const rD=YL;nD.BaggageSpanProcessor=class{constructor(){}onStart(e,t){var n,r;(null!==(r=null===(n=rD.propagation.getBaggage(t))||void 0===n?void 0:n.getAllEntries())&&void 0!==r?r:[]).forEach((t=>{e.setAttribute(t[0],t[1].value),rD.diag.debug(`@honeycombio/opentelemetry-web: 🚨 Baggage in all outgoing headers: ${t[0]}=${t[1].value} `)}))}onEnd(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}};var oD={};Object.defineProperty(oD,"__esModule",{value:!0}),oD.BrowserAttributesSpanProcessor=void 0;oD.BrowserAttributesSpanProcessor=class{constructor(){}onStart(e){const{href:t,pathname:n,search:r,hash:o,hostname:i}=window.location;e.setAttributes({"browser.width":window.innerWidth,"browser.height":window.innerHeight,"page.hash":o,"page.url":t,"page.route":n,"page.hostname":i,"page.search":r})}onEnd(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}};var iD={},aD=1e4;function sD(e){void 0===e&&(e={});var t={};return Object.entries(e).forEach((function(e){var n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2),r=n[0],o=n[1];void 0!==o?t[r]=String(o):gm.warn('Header "'+r+'" has invalid value ('+o+") and will be ignored")})),t}function lD(e){return"number"==typeof e?e<=0?cD(e,1e4):e:(n=Number(null!==(t=sO().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)&&void 0!==t?t:sO().OTEL_EXPORTER_OTLP_TIMEOUT))<=0?cD(n,aD):n;var t,n}function cD(e,t){return gm.warn("Timeout must be greater than 0",e),t}var uD=function(){function e(e){void 0===e&&(e={}),this._sendingPromises=[],this.url=this.getDefaultUrl(e),"string"==typeof e.hostname&&(this.hostname=e.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new bP(this._shutdown,this),this._concurrencyLimit="number"==typeof e.concurrencyLimit?e.concurrencyLimit:30,this.timeoutMillis=lD(e.timeoutMillis),this.onInit(e)}return e.prototype.export=function(e,t){this._shutdownOnce.isCalled?t({code:bO.FAILED,error:new Error("Exporter has been shutdown")}):this._sendingPromises.length>=this._concurrencyLimit?t({code:bO.FAILED,error:new Error("Concurrent export limit reached")}):this._export(e).then((function(){t({code:bO.SUCCESS})})).catch((function(e){t({code:bO.FAILED,error:e})}))},e.prototype._export=function(e){var t=this;return new Promise((function(n,r){try{gm.debug("items to be sent",e),t.send(e,n,r)}catch(JSe){r(JSe)}}))},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype.forceFlush=function(){return Promise.all(this._sendingPromises).then((function(){}))},e.prototype._shutdown=function(){return gm.debug("shutdown started"),this.onShutdown(),this.forceFlush()},e}(),dD=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pD=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.name="OTLPExporterError",o.data=r,o.code=n,o}return dD(t,e),t}(Error),fD=function(){return fD=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fD.apply(this,arguments)};function hD(e,t,n,r,o,i){var a,s,l=!1,c=setTimeout((function(){if(clearTimeout(a),l=!0,s.readyState===XMLHttpRequest.DONE){var e=new pD("Request Timeout");i(e)}else s.abort()}),r),u=function(r,d){void 0===r&&(r=5),void 0===d&&(d=1e3),(s=new XMLHttpRequest).open("POST",t);Object.entries(fD(fD({},{Accept:"application/json","Content-Type":"application/json"}),n)).forEach((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2);s.setRequestHeader(t[0],t[1])})),s.send(e),s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&!1===l)if(s.status>=200&&s.status<=299)gm.debug("xhr success",e),o(),clearTimeout(c),clearTimeout(a);else if(s.status&&[429,502,503,504].includes(s.status)&&r>0){var t=void 0;d*=1.5,t=s.getResponseHeader("Retry-After")?function(e){if(null==e)return-1;var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var n=new Date(e).getTime()-Date.now();return n>=0?n:0}(s.getResponseHeader("Retry-After")):Math.round(Math.random()*(5e3-d)+d),a=setTimeout((function(){u(r-1,d)}),t)}else{var n=new pD("Failed to export with XHR (status: "+s.status+")",s.status);i(n),clearTimeout(c),clearTimeout(a)}},s.onabort=function(){if(l){var e=new pD("Request Timeout");i(e)}clearTimeout(c),clearTimeout(a)},s.onerror=function(){if(l){var e=new pD("Request Timeout");i(e)}clearTimeout(c),clearTimeout(a)}};u()}var mD=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gD=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._useXHR=!1,n._useXHR=!!t.headers||"function"!=typeof navigator.sendBeacon,n._headers=n._useXHR?Object.assign({},sD(t.headers),OR(sO().OTEL_EXPORTER_OTLP_HEADERS)):{},n}return mD(t,e),t.prototype.onInit=function(){},t.prototype.onShutdown=function(){},t.prototype.send=function(e,t,n){var r=this;if(this._shutdownOnce.isCalled)gm.debug("Shutdown already started. Cannot send objects");else{var o=this.convert(e),i=JSON.stringify(o),a=new Promise((function(e,t){r._useXHR?hD(i,r.url,r._headers,r.timeoutMillis,e,t):function(e,t,n,r,o){navigator.sendBeacon(t,new Blob([e],n))?(gm.debug("sendBeacon - can send",e),r()):o(new pD("sendBeacon - cannot send "+e))}(i,r.url,{type:"application/json"},e,t)})).then(t,n);this._sendingPromises.push(a);var s=function(){var e=r._sendingPromises.indexOf(a);r._sendingPromises.splice(e,1)};a.then(s,s)}},t}(uD);function vD(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function yD(e){var t,n=vD(e);return t=n,{low:Number(BigInt.asUintN(32,t)),high:Number(BigInt.asUintN(32,t>>BigInt(32)))}}var bD="undefined"!=typeof BigInt?function(e){return vD(e).toString()}:AO;function xD(e){return e}function wD(e){if(void 0!==e)return uO(e)}var _D={encodeHrTime:yD,encodeSpanContext:uO,encodeOptionalSpanContext:wD};function SD(e){return Object.keys(e).map((function(t){return ED(t,e[t])}))}function ED(e,t){return{key:e,value:TD(t)}}function TD(e){var t=typeof e;return"string"===t?{stringValue:e}:"number"===t?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:"boolean"===t?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(TD)}}:"object"===t&&null!=e?{kvlistValue:{values:Object.entries(e).map((function(e){var t=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e,2);return ED(t[0],t[1])}))}}:{}}function CD(e,t){var n,r=e.spanContext(),o=e.status;return{traceId:t.encodeSpanContext(r.traceId),spanId:t.encodeSpanContext(r.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:null===(n=r.traceState)||void 0===n?void 0:n.serialize(),name:e.name,kind:null==e.kind?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:SD(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map((function(e){return function(e,t){return{attributes:e.attributes?SD(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)})),droppedEventsCount:e.droppedEventsCount,status:{code:o.code,message:o.message},links:e.links.map((function(e){return function(e,t){var n;return{attributes:e.attributes?SD(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:null===(n=e.context.traceState)||void 0===n?void 0:n.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)})),droppedLinksCount:e.droppedLinksCount}}function AD(e){return{attributes:SD(e.attributes),droppedAttributesCount:0}}var ND=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function RD(e,t){var n=function(e){var t,n;if(void 0===e)return _D;var r=null===(t=e.useLongBits)||void 0===t||t,o=null!==(n=e.useHex)&&void 0!==n&&n;return{encodeHrTime:r?yD:bD,encodeSpanContext:o?xD:uO,encodeOptionalSpanContext:o?xD:wD}}(t);return{resourceSpans:PD(e,n)}}function OD(e){var t,n,r=new Map;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),i=o.next();!i.done;i=o.next()){var a=i.value,s=r.get(a.resource);s||r.set(a.resource,s=new Map);var l=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),c=s.get(l);c||s.set(l,c=[]),c.push(a)}}catch(u){t={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function PD(e,t){for(var n,r=[],o=OD(e).entries(),i=o.next();!i.done;){for(var a=ND(i.value,2),s=a[0],l=[],c=a[1].values(),u=c.next();!u.done;){var d=u.value;if(d.length>0){var p=d.map((function(e){return CD(e,t)}));l.push({scope:(n=d[0].instrumentationLibrary,{name:n.name,version:n.version}),spans:p,schemaUrl:d[0].instrumentationLibrary.schemaUrl})}u=c.next()}var f={resource:AD(s),scopeSpans:l,schemaUrl:void 0};r.push(f),i=o.next()}return r}var kD=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),MD="v1/traces",jD="http://localhost:4318/"+MD,LD=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._headers=Object.assign(n._headers,OR(sO().OTEL_EXPORTER_OTLP_TRACES_HEADERS)),n}return kD(t,e),t.prototype.convert=function(e){return RD(e,{useHex:!0,useLongBits:!1})},t.prototype.getDefaultUrl=function(e){return"string"==typeof e.url?e.url:sO().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length>0?function(e){try{var t=new URL(e);return""===t.pathname&&(t.pathname=t.pathname+"/"),t.toString()}catch(n){return gm.warn("Could not parse export URL: '"+e+"'"),e}}(sO().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT):sO().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?(t=sO().OTEL_EXPORTER_OTLP_ENDPOINT,n=MD,t.endsWith("/")||(t+="/"),t+n):jD;var t,n},t}(gD);const DD=Wa(Object.freeze(Object.defineProperty({__proto__:null,OTLPTraceExporter:LD},Symbol.toStringTag,{value:"Module"})));!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.configureHoneycombHttpJsonTraceExporter=e.DATASET_HEADER_KEY=e.TEAM_HEADER_KEY=void 0;const t=DD,n=XL;e.TEAM_HEADER_KEY="x-honeycomb-team",e.DATASET_HEADER_KEY="x-honeycomb-dataset",e.configureHoneycombHttpJsonTraceExporter=function(r){const o=(0,n.getTracesApiKey)(r);return new t.OTLPTraceExporter({url:(0,n.getTracesEndpoint)(r),headers:Object.assign({[e.TEAM_HEADER_KEY]:o,[e.DATASET_HEADER_KEY]:(0,n.isClassic)(o)?null==r?void 0:r.dataset:void 0},null==r?void 0:r.headers)})}}(iD);var ID={};const FD=Wa(wP);var UD=Ga&&Ga.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(ID,"__esModule",{value:!0}),ID.configureCompositeExporter=void 0;const $D=FD;ID.configureCompositeExporter=function(e){return new VD(e)};class VD{constructor(e){this._exporters=e}export(e,t){this._exporters.forEach((n=>n.export(e,t))),t({code:$D.ExportResultCode.SUCCESS})}shutdown(){return UD(this,void 0,void 0,(function*(){const e=[];this._exporters.forEach((t=>e.push(t.shutdown()))),yield Promise.all(e)}))}}var BD={};Object.defineProperty(BD,"__esModule",{value:!0}),BD.buildTraceUrl=BD.configureConsoleTraceLinkExporter=void 0;const zD=FD,HD=XL;BD.configureConsoleTraceLinkExporter=function(e){const t=(0,HD.getTracesApiKey)(e);return new qD(null==e?void 0:e.serviceName,t)};class qD{constructor(e,t){if(this._traceUrl="",!e||!t)return;fetch("https://api.honeycomb.io/1/auth",{headers:{"x-honeycomb-team":t}}).then((e=>{if(e.ok)return e.json();throw new Error})).then((n=>{var r,o,i;const a=n;if(!(null===(r=a.team)||void 0===r?void 0:r.slug))throw new Error;this._traceUrl=GD(t,e,null===(o=a.team)||void 0===o?void 0:o.slug,null===(i=a.environment)||void 0===i?void 0:i.slug)})).catch((()=>{}))}export(e,t){this._traceUrl&&e.forEach((e=>{})),t({code:zD.ExportResultCode.SUCCESS})}shutdown(){return Promise.resolve()}}function GD(e,t,n,r){let o=`https://ui.honeycomb.io/${n}`;return!(0,HD.isClassic)(e)&&r&&(o+=`/environments/${r}`),o+=`/datasets/${t}/trace?trace_id`,o}BD.buildTraceUrl=GD,Object.defineProperty(tD,"__esModule",{value:!0}),tD.CompositeSpanProcessor=tD.configureSpanProcessors=void 0;const KD=nD,WD=oD,YD=_k,XD=iD,ZD=ID,QD=BD;tD.configureSpanProcessors=e=>{const t=new JD,n=[];return(null==e?void 0:e.localVisualizations)&&n.push((0,QD.configureConsoleTraceLinkExporter)(e)),(null==e?void 0:e.traceExporter)&&n.push(null==e?void 0:e.traceExporter),t.addProcessor(new YD.BatchSpanProcessor((0,ZD.configureCompositeExporter)([(0,XD.configureHoneycombHttpJsonTraceExporter)(e),...n]))),t.addProcessor(new KD.BaggageSpanProcessor),t.addProcessor(new WD.BrowserAttributesSpanProcessor),(null==e?void 0:e.spanProcessor)&&t.addProcessor(null==e?void 0:e.spanProcessor),t};class JD{constructor(){this.spanProcessors=[]}addProcessor(e){this.spanProcessors.push(e)}getSpanProcessors(){return this.spanProcessors}onStart(e,t){this.spanProcessors.forEach((n=>{n.onStart(e,t)}))}onEnd(e){this.spanProcessors.forEach((t=>{t.onEnd(e)}))}forceFlush(){return Promise.all(this.spanProcessors.map((e=>e.forceFlush()))).then((()=>{}))}shutdown(){return Promise.all(this.spanProcessors.map((e=>e.forceFlush()))).then((()=>{}))}}tD.CompositeSpanProcessor=JD;var eI={};Object.defineProperty(eI,"__esModule",{value:!0}),eI.DeterministicSampler=eI.configureDeterministicSampler=void 0;const tI=_k,nI=XL;eI.configureDeterministicSampler=e=>{const t=(0,nI.getSampleRate)(e);return new rI(t)};class rI{constructor(e){switch(this._sampleRate=e,e){case 0:this._sampler=new tI.AlwaysOffSampler;break;case 1:this._sampler=new tI.AlwaysOnSampler;break;default:this._sampler=new tI.TraceIdRatioBasedSampler(1/e);break}}shouldSample(e,t,n,r,o,i){const a=this._sampler.shouldSample(e,t,n,r,o,i);return Object.assign(Object.assign({},a),{attributes:Object.assign(Object.assign({},a.attributes),{SampleRate:this._sampleRate})})}toString(){return`DeterministicSampler(${this._sampler.toString()})`}}eI.DeterministicSampler=rI;var oI={},iI={exports:{}};!function(e,t){!function(e){var t,n,r=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},o=function(e){if("loading"===document.readyState)return"loading";var t=r();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},i=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},a=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,o=r.id?"#"+r.id:i(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+o.length>(t||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;e=r.parentNode}}catch(a){}return n},s=-1,l=function(){return s},c=function(e){addEventListener("pageshow",(function(t){t.persisted&&(s=t.timeStamp,e(t))}),!0)},u=function(){var e=r();return e&&e.activationStart||0},d=function(e,t){var n=r(),o="navigate";return l()>=0?o="back-forward-cache":n&&(document.prerendering||u()>0?o="prerender":document.wasDiscarded?o="restore":n.type&&(o=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:o}},p=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(o){}},f=function(e,t,n,r){var o,i;return function(a){var s,l;t.value>=0&&(a||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=(s=t.value)>(l=n)[1]?"poor":s>l[0]?"needs-improvement":"good",e(t))}},h=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},m=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},g=function(e){var t=!1;return function(){t||(e(),t=!0)}},v=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},b=function(e){"hidden"===document.visibilityState&&v>-1&&(v="visibilitychange"===e.type?e.timeStamp:0,w())},x=function(){addEventListener("visibilitychange",b,!0),addEventListener("prerenderingchange",b,!0)},w=function(){removeEventListener("visibilitychange",b,!0),removeEventListener("prerenderingchange",b,!0)},_=function(){return v<0&&(v=y(),x(),c((function(){setTimeout((function(){v=y(),x()}),0)}))),{get firstHiddenTime(){return v}}},S=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},E=[1800,3e3],T=function(e,t){t=t||{},S((function(){var n,r=_(),o=d("FCP"),i=p("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-u(),0),o.entries.push(e),n(!0)))}))}));i&&(n=f(e,o,E,t.reportAllChanges),c((function(r){o=d("FCP"),n=f(e,o,E,t.reportAllChanges),h((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},C=[.1,.25],A=0,N=1/0,R=0,O=function(e){e.forEach((function(e){e.interactionId&&(N=Math.min(N,e.interactionId),R=Math.max(R,e.interactionId),A=R?(R-N)/7+1:0)}))},P=function(){return t?A:performance.interactionCount||0},k=function(){"interactionCount"in performance||t||(t=p("event",O,{type:"event",buffered:!0,durationThreshold:0}))},M=[],j=new Map,L=0,D=function(){var e=Math.min(M.length-1,Math.floor((P()-L)/50));return M[e]},I=[],F=function(e){if(I.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=M[M.length-1],n=j.get(e.interactionId);if(n||M.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};j.set(r.id,r),M.push(r)}M.sort((function(e,t){return t.latency-e.latency})),M.length>10&&M.splice(10).forEach((function(e){return j.delete(e.id)}))}}},U=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=g(e),"hidden"===document.visibilityState?e():(n=t(e),m(e)),n},$=[200,500],V=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},S((function(){var n;k();var r,o=d("INP"),i=function(e){U((function(){e.forEach(F);var t=D();t&&t.latency!==o.value&&(o.value=t.latency,o.entries=t.entries,r())}))},a=p("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=f(e,o,$,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),m((function(){i(a.takeRecords()),r(!0)})),c((function(){L=P(),M.length=0,j.clear(),o=d("INP"),r=f(e,o,$,t.reportAllChanges)})))})))},B=[],z=[],H=0,q=new WeakMap,G=new Map,K=-1,W=function(e){B=B.concat(e),Y()},Y=function(){K<0&&(K=U(X))},X=function(){G.size>10&&G.forEach((function(e,t){j.has(t)||G.delete(t)}));var e=M.map((function(e){return q.get(e.entries[0])})),t=z.length-50;z=z.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<z.length;r++){var o=z[r];te(o.startTime,o.processingEnd).forEach((function(e){n.add(e)}))}var i=B.length-1-50;B=B.filter((function(e,t){return e.startTime>H&&t>i||n.has(e)})),K=-1};I.push((function(e){e.interactionId&&e.target&&!G.has(e.interactionId)&&G.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;H=Math.max(H,e.processingEnd);for(var r=z.length-1;r>=0;r--){var o=z[r];if(Math.abs(n-o.renderTime)<=8){(t=o).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||z.push(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]}),(e.interactionId||"first-input"===e.entryType)&&q.set(e,t),Y()}));var Z,Q,J,ee,te=function(e,t){for(var n,r=[],o=0;n=B[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},ne=[2500,4e3],re={},oe=[800,1800],ie=function e(t){document.prerendering?S((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},ae=function(e,t){t=t||{};var n=d("TTFB"),o=f(e,n,oe,t.reportAllChanges);ie((function(){var i=r();i&&(n.value=Math.max(i.responseStart-u(),0),n.entries=[i],o(!0),c((function(){n=d("TTFB",0),(o=f(e,n,oe,t.reportAllChanges))(!0)})))}))},se={passive:!0,capture:!0},le=new Date,ce=function(e,t){Z||(Z=t,Q=e,J=new Date,pe(removeEventListener),ue())},ue=function(){if(Q>=0&&Q<J-le){var e={entryType:"first-input",name:Z.type,target:Z.target,cancelable:Z.cancelable,startTime:Z.timeStamp,processingStart:Z.timeStamp+Q};ee.forEach((function(t){t(e)})),ee=[]}},de=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(n=t,r=e,o=function(){ce(n,r),a()},i=function(){a()},a=function(){removeEventListener("pointerup",o,se),removeEventListener("pointercancel",i,se)},addEventListener("pointerup",o,se),addEventListener("pointercancel",i,se)):ce(t,e)}var n,r,o,i,a},pe=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,de,se)}))},fe=[100,300],he=function(e,t){t=t||{},S((function(){var n,r=_(),o=d("FID"),i=function(e){e.startTime<r.firstHiddenTime&&(o.value=e.processingStart-e.startTime,o.entries.push(e),n(!0))},a=function(e){e.forEach(i)},s=p("first-input",a);n=f(e,o,fe,t.reportAllChanges),s&&(m(g((function(){a(s.takeRecords()),s.disconnect()}))),c((function(){o=d("FID"),n=f(e,o,fe,t.reportAllChanges),ee=[],Q=-1,Z=null,pe(addEventListener),ee.push(i),ue()})))}))};e.CLSThresholds=C,e.FCPThresholds=E,e.FIDThresholds=fe,e.INPThresholds=$,e.LCPThresholds=ne,e.TTFBThresholds=oe,e.onCLS=function(e,t){var n,r;n=function(t){var n=function(e){var t,n={};if(e.entries.length){var r=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(r&&r.sources&&r.sources.length){var i=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(n={largestShiftTarget:a(i.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:i,largestShiftEntry:r,loadState:o(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)},r=(r=t)||{},T(g((function(){var e,t=d("CLS",0),o=0,i=[],a=function(n){n.forEach((function(e){e.hadRecentInput||(o&&e.startTime-i[i.length-1].startTime<1e3&&e.startTime-i[0].startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e]))})),o>t.value&&(t.value=o,t.entries=i,e())},s=p("layout-shift",a);s&&(e=f(n,t,C,r.reportAllChanges),m((function(){a(s.takeRecords()),e(!0)})),c((function(){o=0,t=d("CLS",0),e=f(n,t,C,r.reportAllChanges),h((function(){return e()}))})),setTimeout(e,0))})))},e.onFCP=function(e,t){T((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:o(l())};if(e.entries.length){var n=r(),i=e.entries[e.entries.length-1];if(n){var a=Math.max(0,n.responseStart-(n.activationStart||0));t={timeToFirstByte:a,firstByteToFCP:e.value-a,loadState:o(e.entries[0].startTime),navigationEntry:n,fcpEntry:i}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)},e.onFID=function(e,t){he((function(t){var n,r,i,s=(i={eventTarget:a((r=(n=t).entries[0]).target),eventType:r.name,eventTime:r.startTime,eventEntry:r,loadState:o(r.startTime)},Object.assign(n,{attribution:i}));e(s)}),t)},e.onINP=function(e,t){n||(n=p("long-animation-frame",W)),V((function(t){var n,r,i,s,l,c,u,d,p,f,h,m,g=(i=q.get(r=(n=t).entries[0]),s=r.processingStart,l=i.processingEnd,c=i.entries.sort((function(e,t){return e.processingStart-t.processingStart})),u=te(r.startTime,l),d=n.entries.find((function(e){return e.target})),p=d&&d.target||G.get(r.interactionId),f=[r.startTime+r.duration,l].concat(u.map((function(e){return e.startTime+e.duration}))),h=Math.max.apply(Math,f),m={interactionTarget:a(p),interactionTargetElement:p,interactionType:r.name.startsWith("key")?"keyboard":"pointer",interactionTime:r.startTime,nextPaintTime:h,processedEventEntries:c,longAnimationFrameEntries:u,inputDelay:s-r.startTime,processingDuration:l-s,presentationDelay:Math.max(h-l,0),loadState:o(r.startTime)},Object.assign(n,{attribution:m}));e(g)}),t)},e.onLCP=function(e,t){var n,o;n=function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=r();if(n){var o=n.activationStart||0,i=e.entries[e.entries.length-1],s=i.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===i.url}))[0],l=Math.max(0,n.responseStart-o),c=Math.max(l,s?(s.requestStart||s.startTime)-o:0),u=Math.max(c,s?s.responseEnd-o:0),d=Math.max(u,i.startTime-o);t={element:a(i.element),timeToFirstByte:l,resourceLoadDelay:c-l,resourceLoadDuration:u-c,elementRenderDelay:d-u,navigationEntry:n,lcpEntry:i},i.url&&(t.url=i.url),s&&(t.lcpResourceEntry=s)}}return Object.assign(e,{attribution:t})}(t);e(n)},o=(o=t)||{},S((function(){var e,t=_(),r=d("LCP"),i=function(n){o.reportAllChanges||(n=n.slice(-1)),n.forEach((function(n){n.startTime<t.firstHiddenTime&&(r.value=Math.max(n.startTime-u(),0),r.entries=[n],e())}))},a=p("largest-contentful-paint",i);if(a){e=f(n,r,ne,o.reportAllChanges);var s=g((function(){re[r.id]||(i(a.takeRecords()),a.disconnect(),re[r.id]=!0,e(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return U(s)}),{once:!0,capture:!0})})),m(s),c((function(t){r=d("LCP"),e=f(n,r,ne,o.reportAllChanges),h((function(){r.value=performance.now()-t.timeStamp,re[r.id]=!0,e(!0)}))}))}}))},e.onTTFB=function(e,t){ae((function(t){var n=function(e){var t={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(e.entries.length){var n=e.entries[0],r=n.activationStart||0,o=Math.max((n.workerStart||n.fetchStart)-r,0),i=Math.max(n.domainLookupStart-r,0),a=Math.max(n.connectStart-r,0),s=Math.max(n.connectEnd-r,0);t={waitingDuration:o,cacheDuration:i-o,dnsDuration:a-i,connectionDuration:s-a,requestDuration:e.value-s,navigationEntry:n}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}}(t)}(0,iI.exports);var aI=iI.exports,sI=Ga&&Ga.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),lI=Ga&&Ga.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),cI=Ga&&Ga.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&sI(t,e,n);return lI(t,e),t};Object.defineProperty(oI,"__esModule",{value:!0}),oI.WebVitalsInstrumentation=oI.InstrumentationAbstract=void 0;const uI=aI,dI=DL,pI=YL,fI=cI(Gm);let hI=class{constructor(e,t,n={}){this.instrumentationName=e,this.instrumentationVersion=t,this._wrap=fI.wrap,this._unwrap=fI.unwrap,this._massWrap=fI.massWrap,this._massUnwrap=fI.massUnwrap,this._config=Object.assign({enabled:!0},n),this._diag=pI.diag.createComponentLogger({namespace:e}),this._tracer=pI.trace.getTracer(e,t),this._meter=pI.metrics.getMeter(e,t),this._updateMetricInstruments()}get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e={}){this._config=Object.assign({},e)}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}};oI.InstrumentationAbstract=hI;oI.WebVitalsInstrumentation=class extends hI{constructor({enabled:e=!0,vitalsToTrack:t=["CLS","LCP","INP"],lcp:n,cls:r,inp:o,fid:i,fcp:a,ttfb:s}={}){super("@honeycombio/instrumentation-web-vitals",dI.VERSION,{enabled:e,vitalsToTrack:t,lcp:n,cls:r,inp:o,fid:i,fcp:a,ttfb:s}),this.onReportCLS=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{largestShiftTarget:o,largestShiftTime:i,largestShiftValue:a,loadState:s,largestShiftEntry:l}=r,c=this.getAttrPrefix(n),u=this.tracer.startSpan(n);u.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${c}.largest_shift_target`]:o,[`${c}.element`]:o,[`${c}.largest_shift_time`]:i,[`${c}.largest_shift_value`]:a,[`${c}.load_state`]:s,[`${c}.had_recent_input`]:null==l?void 0:l.hadRecentInput})),t&&t(e,u),u.end()},this.onReportLCP=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{element:o,url:i,timeToFirstByte:a,resourceLoadDelay:s,resourceLoadDuration:l,elementRenderDelay:c}=r,u=this.getAttrPrefix(n),d=this.tracer.startSpan(n);d.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${u}.element`]:o,[`${u}.url`]:i,[`${u}.time_to_first_byte`]:a,[`${u}.resource_load_delay`]:s,[`${u}.resource_load_duration`]:l,[`${u}.element_render_delay`]:c,[`${u}.resource_load_time`]:l})),t&&t(e,d),d.end()},this.onReportINP=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{inputDelay:o,interactionTarget:i,interactionTime:a,interactionType:s,loadState:l,nextPaintTime:c,presentationDelay:u,processingDuration:d}=r,p=this.getAttrPrefix(n),f=this.tracer.startSpan(n);f.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${p}.input_delay`]:o,[`${p}.interaction_target`]:i,[`${p}.interaction_time`]:a,[`${p}.interaction_type`]:s,[`${p}.load_state`]:l,[`${p}.next_paint_time`]:c,[`${p}.presentation_delay`]:u,[`${p}.processing_duration`]:d,[`${p}.element`]:i,[`${p}.event_type`]:s})),t&&t(e,f),f.end()},this.onReportFCP=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{timeToFirstByte:o,firstByteToFCP:i,loadState:a}=r,s=this.getAttrPrefix(n),l=this.tracer.startSpan(n);l.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${s}.time_to_first_byte`]:o,[`${s}.time_since_first_byte`]:i,[`${s}.load_state`]:a})),t&&t(e,l),l.end()},this.onReportFID=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{eventTarget:o,eventType:i,loadState:a}=r,s=this.getAttrPrefix(n),l=this.tracer.startSpan(n);l.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${s}.element`]:o,[`${s}.event_type`]:i,[`${s}.load_state`]:a})),t&&t(e,l),l.end()},this.onReportTTFB=(e,t)=>{if(!this.isEnabled())return;const{name:n,attribution:r}=e,{cacheDuration:o,connectionDuration:i,dnsDuration:a,requestDuration:s,waitingDuration:l}=r,c=this.getAttrPrefix(n),u=this.tracer.startSpan(n);u.setAttributes(Object.assign(Object.assign({},this.getSharedAttributes(e)),{[`${c}.waiting_duration`]:l,[`${c}.dns_duration`]:a,[`${c}.connection_duration`]:i,[`${c}.request_duration`]:s,[`${c}.cache_duration`]:o,[`${c}.waiting_time`]:l,[`${c}.dns_time`]:a,[`${c}.connection_time`]:i,[`${c}.request_time`]:s})),t&&t(e,u),u.end()},this.vitalsToTrack=[...t],this.lcpOpts=n,this.clsOpts=r,this.inpOpts=o,this.fidOpts=i,this.fcpOpts=a,this.ttfbOpts=s,this._isEnabled=e,this._setupWebVitalsCallbacks()}init(){}_setupWebVitalsCallbacks(){this.vitalsToTrack.includes("CLS")&&(0,uI.onCLS)((e=>{var t;this.onReportCLS(e,null===(t=this.clsOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.clsOpts),this.vitalsToTrack.includes("LCP")&&(0,uI.onLCP)((e=>{var t;this.onReportLCP(e,null===(t=this.lcpOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.lcpOpts),this.vitalsToTrack.includes("INP")&&(0,uI.onINP)((e=>{var t;this.onReportINP(e,null===(t=this.inpOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.inpOpts),this.vitalsToTrack.includes("FID")&&(0,uI.onFID)((e=>{var t;this.onReportFID(e,null===(t=this.fidOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.fidOpts),this.vitalsToTrack.includes("TTFB")&&(0,uI.onTTFB)((e=>{var t;this.onReportTTFB(e,null===(t=this.ttfbOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.ttfbOpts),this.vitalsToTrack.includes("FCP")&&(0,uI.onFCP)((e=>{var t;this.onReportFCP(e,null===(t=this.fcpOpts)||void 0===t?void 0:t.applyCustomAttributes)}),this.fcpOpts)}getAttrPrefix(e){return e.toLowerCase()}getSharedAttributes(e){const{name:t,id:n,delta:r,rating:o,value:i,navigationType:a}=e,s=this.getAttrPrefix(t);return{[`${s}.id`]:n,[`${s}.delta`]:r,[`${s}.value`]:i,[`${s}.rating`]:o,[`${s}.navigation_type`]:a}}disable(){this.isEnabled()?(this._isEnabled=!1,this._diag.debug("Instrumentation disabled")):this._diag.debug("Instrumentation already disabled")}enable(){this.isEnabled()?this._diag.debug("Instrumentation already enabled"):(this._isEnabled=!0,this._diag.debug("Instrumentation enabled"),this._diag.debug(`Sending spans for ${this.vitalsToTrack.join(",")}`))}isEnabled(){return this._isEnabled}},Object.defineProperty(jL,"__esModule",{value:!0}),jL.HoneycombWebSDK=void 0;const mI=If,gI=LL,vI=UL,yI=BL,bI=qL,xI=WL,wI=tD,_I=eI,SI=ZL,EI=oI;jL.HoneycombWebSDK=class extends mI.WebSDK{constructor(e){var t;const n=[...(null==e?void 0:e.instrumentations)||[]];!1!==(null===(t=null==e?void 0:e.webVitalsInstrumentationConfig)||void 0===t?void 0:t.enabled)&&n.push(new EI.WebVitalsInstrumentation(null==e?void 0:e.webVitalsInstrumentationConfig)),super(Object.assign(Object.assign({},e),{instrumentations:n,resource:(0,bI.mergeResources)([(0,yI.configureBrowserAttributesResource)(),(0,vI.configureEntryPageResource)(null==e?void 0:e.entryPageAttributes),null==e?void 0:e.resource,null==e?void 0:e.resourceAttributes,(0,gI.configureHoneycombResource)()]),sampler:(0,_I.configureDeterministicSampler)(e),spanProcessor:(0,wI.configureSpanProcessors)(e)})),(0,SI.validateOptionsWarnings)(e),(null==e?void 0:e.debug)&&(0,xI.configureDebug)(e)}},function(e){var t=Ga&&Ga.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Ga&&Ga.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(If,e),n(jL,e),n(oI,e)}(Df);var TI=oh("OpenTelemetry SDK Context Key SUPPRESS_TRACING");var CI="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},AI=performance,NI="http.method",RI="http.url",OI="http.host",PI="http.scheme",kI="http.status_code",MI="http.user_agent",jI="http.request_content_length_uncompressed",LI="http.response_content_length",DI="http.response_content_length_uncompressed",II=Math.pow(10,6),FI=Math.pow(10,9);function UI(e){return[Math.trunc(e/1e3),Math.round(e%1e3*II)]}function $I(){var e=AI.timeOrigin;if("number"!=typeof e){e=AI.timing&&AI.timing.fetchStart}return e}function VI(e){return function(e,t){var n=[e[0]+t[0],e[1]+t[1]];n[1]>=FI&&(n[1]-=FI,n[0]+=1);return n}(UI($I()),UI("number"==typeof e?e:AI.now()))}function BI(e){if(t=e,Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1])return e;if("number"==typeof e)return e<$I()?VI(e):UI(e);if(e instanceof Date)return UI(e.getTime());throw TypeError("Invalid input type");var t}function zI(e){return e[0]*FI+e[1]}var HI="[_0-9a-z-*/]",qI=new RegExp("^(?:"+("[a-z]"+HI+"{0,255}")+"|"+("[a-z0-9]"+HI+"{0,240}@[a-z]"+HI+"{0,13}")+")$"),GI=/^[ -~]{0,255}[!-~]$/,KI=/,|=/;var WI=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,t.length);(function(e){return qI.test(e)})(o)&&function(e){return GI.test(e)&&!KI.test(e)}(i)&&e.set(o,i)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),YI="traceparent",XI="tracestate",ZI=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");var QI=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Om.getSpanContext(e);if(r&&!function(e){return!0===e.getValue(TI)}(e)&&Xh(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||Ah.NONE).toString(16);n.set(t,YI,o),r.traceState&&n.set(t,XI,r.traceState.serialize())}},e.prototype.extract=function(e,t,n){var r=n.get(t,YI);if(!r)return e;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return e;var i=function(e){var t=ZI.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}(o);if(!i)return e;i.isRemote=!0;var a=n.get(t,XI);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new WI("string"==typeof s?s:void 0)}return Om.setSpanContext(e,i)},e.prototype.fields=function(){return[YI,XI]},e}();function JI(e,t){return"string"==typeof t?e===t:!!e.match(t)}function eF(e,t){var n,r;if(!t)return!1;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),i=o.next();!i.done;i=o.next()){if(JI(e,i.value))return!0}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}var tF=function(){function e(){}return e.prototype.emit=function(e){},e}(),nF=new tF,rF=new(function(){function e(){}return e.prototype.getLogger=function(e,t,n){return new tF},e}()),oF=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.emit=function(e){this._getLogger().emit(e)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):nF},e}(),iF=function(){function e(){}return e.prototype.getLogger=function(e,t,n){var r;return null!==(r=this.getDelegateLogger(e,t,n))&&void 0!==r?r:new oF(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:rF},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateLogger=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getLogger(e,t,n)},e}(),aF="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},sF=Symbol.for("io.opentelemetry.js.api.logs"),lF=aF;var cF,uF,dF=function(){function e(){this._proxyLoggerProvider=new iF}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(e){return lF[sF]?this.getLoggerProvider():(lF[sF]=(t=1,n=e,r=rF,function(e){return e===t?n:r}),this._proxyLoggerProvider.setDelegate(e),e);var t,n,r},e.prototype.getLoggerProvider=function(){var e,t;return null!==(t=null===(e=lF[sF])||void 0===e?void 0:e.call(lF,1))&&void 0!==t?t:this._proxyLoggerProvider},e.prototype.getLogger=function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)},e.prototype.disable=function(){delete lF[sF],this._proxyLoggerProvider=new iF},e}().getInstance(),pF=function(){return pF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pF.apply(this,arguments)},fF=function(){function e(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this._config={},this._wrap=Gm.wrap,this._unwrap=Gm.unwrap,this._massWrap=Gm.massWrap,this._massUnwrap=Gm.massUnwrap,this.setConfig(n),this._diag=gm.createComponentLogger({namespace:e}),this._tracer=Om.getTracer(e,t),this._meter=bm.getMeter(e,t),this._logger=dF.getLogger(e,t),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var e,t=null!==(e=this.init())&&void 0!==e?e:[];return Array.isArray(t)?t:[t]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(e){this._config=pF({enabled:!0},e)},e.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(e,t,n,r){if(e)try{e(n,r)}catch(JSe){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},JSe)}},e}(),hF=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mF=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o._config.enabled&&o.enable(),o}return hF(t,e),t}(fF);function gF(e,t,n){var r,o;try{o=e()}catch(JSe){r=JSe}finally{return t(r,o),o}}function vF(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}(uF=cF||(cF={})).DOCUMENT_LOAD="documentLoad",uF.DOCUMENT_FETCH="documentFetch",uF.RESOURCE_FETCH="resourceFetch";var yF,bF;(bF=yF||(yF={})).FIRST_PAINT="firstPaint",bF.FIRST_CONTENTFUL_PAINT="firstContentfulPaint";var xF={"first-paint":yF.FIRST_PAINT,"first-contentful-paint":yF.FIRST_CONTENTFUL_PAINT},wF=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_F=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,"@opentelemetry/instrumentation-document-load","0.44.1",t)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return wF(t,e),t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var e=this;window.setTimeout((function(){e._collectPerformance()}))},t.prototype._addResourcesSpans=function(e){var t,n,r=this,o=null===(n=(t=AI).getEntriesByType)||void 0===n?void 0:n.call(t,"resource");o&&o.forEach((function(t){r._initResourceSpan(t,e)}))},t.prototype._collectPerformance=function(){var e=this,t=Array.from(document.getElementsByTagName("meta")).find((function(e){return e.getAttribute("name")===YI})),n=function(){var e,t,n={},r=null===(t=(e=AI).getEntriesByType)||void 0===t?void 0:t.call(e,"navigation")[0];if(r)Object.values(kj).forEach((function(e){if(Hj(r,e)){var t=r[e];"number"==typeof t&&(n[e]=t)}}));else{var o=AI.timing;o&&Object.values(kj).forEach((function(e){if(Hj(o,e)){var t=o[e];"number"==typeof t&&(n[e]=t)}}))}return n}();mm.with(Nm.extract(sh,{traceparent:t&&t.content||""}),(function(){var t,r=e._startSpan(cF.DOCUMENT_LOAD,kj.FETCH_START,n);r&&(mm.with(Om.setSpan(mm.active(),r),(function(){var t=e._startSpan(cF.DOCUMENT_FETCH,kj.FETCH_START,n);t&&(t.setAttribute(RI,location.href),mm.with(Om.setSpan(mm.active(),t),(function(){var r;e.getConfig().ignoreNetworkEvents||Gj(t,n),e._addCustomAttributesOnSpan(t,null===(r=e.getConfig().applyCustomAttributesOnSpan)||void 0===r?void 0:r.documentFetch),e._endSpan(t,kj.RESPONSE_END,n)})))})),r.setAttribute(RI,location.href),r.setAttribute(MI,navigator.userAgent),e._addResourcesSpans(r),e.getConfig().ignoreNetworkEvents||(qj(r,kj.FETCH_START,n),qj(r,kj.UNLOAD_EVENT_START,n),qj(r,kj.UNLOAD_EVENT_END,n),qj(r,kj.DOM_INTERACTIVE,n),qj(r,kj.DOM_CONTENT_LOADED_EVENT_START,n),qj(r,kj.DOM_CONTENT_LOADED_EVENT_END,n),qj(r,kj.DOM_COMPLETE,n),qj(r,kj.LOAD_EVENT_START,n),qj(r,kj.LOAD_EVENT_END,n)),e.getConfig().ignorePerformancePaintEvents||function(e){var t,n,r=null===(n=(t=AI).getEntriesByType)||void 0===n?void 0:n.call(t,"paint");r&&r.forEach((function(t){var n=t.name,r=t.startTime;Hj(xF,n)&&e.addEvent(xF[n],r)}))}(r),e._addCustomAttributesOnSpan(r,null===(t=e.getConfig().applyCustomAttributesOnSpan)||void 0===t?void 0:t.documentLoad),e._endSpan(r,kj.LOAD_EVENT_END,n))}))},t.prototype._endSpan=function(e,t,n){e&&(Hj(n,t)?e.end(n[t]):e.end())},t.prototype._initResourceSpan=function(e,t){var n,r=this._startSpan(cF.RESOURCE_FETCH,kj.FETCH_START,e,t);r&&(r.setAttribute(RI,e.name),this.getConfig().ignoreNetworkEvents||Gj(r,e),this._addCustomAttributesOnResourceSpan(r,e,null===(n=this.getConfig().applyCustomAttributesOnSpan)||void 0===n?void 0:n.resourceFetch),this._endSpan(r,kj.RESPONSE_END,e))},t.prototype._startSpan=function(e,t,n,r){if(Hj(n,t)&&"number"==typeof n[t])return this.tracer.startSpan(e,{startTime:n[t]},r?Om.setSpan(mm.active(),r):void 0)},t.prototype._waitForPageLoad=function(){"complete"===window.document.readyState?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(e,t){var n=this;t&&gF((function(){return t(e)}),(function(e){e&&n._diag.error("addCustomAttributesOnSpan",e)}))},t.prototype._addCustomAttributesOnResourceSpan=function(e,t,n){var r=this;n&&gF((function(){return n(e,t)}),(function(e){e&&r._diag.error("addCustomAttributesOnResourceSpan",e)}))},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(mF),SF=function(){function e(){}return e.prototype.emit=function(e){},e}(),EF=new SF,TF=new(function(){function e(){}return e.prototype.getLogger=function(e,t,n){return new SF},e}()),CF=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.emit=function(e){this._getLogger().emit(e)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):EF},e}(),AF=function(){function e(){}return e.prototype.getLogger=function(e,t,n){var r;return null!==(r=this.getDelegateLogger(e,t,n))&&void 0!==r?r:new CF(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:TF},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateLogger=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getLogger(e,t,n)},e}(),NF="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},RF=Symbol.for("io.opentelemetry.js.api.logs"),OF=NF;var PF,kF,MF,jF=function(){function e(){this._proxyLoggerProvider=new AF}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(e){return OF[RF]?this.getLoggerProvider():(OF[RF]=(t=1,n=e,r=TF,function(e){return e===t?n:r}),this._proxyLoggerProvider.setDelegate(e),e);var t,n,r},e.prototype.getLoggerProvider=function(){var e,t;return null!==(t=null===(e=OF[RF])||void 0===e?void 0:e.call(OF,1))&&void 0!==t?t:this._proxyLoggerProvider},e.prototype.getLogger=function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)},e.prototype.disable=function(){delete OF[RF],this._proxyLoggerProvider=new AF},e}().getInstance(),LF=function(){return LF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},LF.apply(this,arguments)},DF=function(){function e(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this._config={},this._wrap=Gm.wrap,this._unwrap=Gm.unwrap,this._massWrap=Gm.massWrap,this._massUnwrap=Gm.massUnwrap,this.setConfig(n),this._diag=gm.createComponentLogger({namespace:e}),this._tracer=Om.getTracer(e,t),this._meter=bm.getMeter(e,t),this._logger=jF.getLogger(e,t),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var e,t=null!==(e=this.init())&&void 0!==e?e:[];return Array.isArray(t)?t:[t]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(e){this._config=LF({enabled:!0},e)},e.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(e,t,n,r){if(e)try{e(n,r)}catch(JSe){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},JSe)}},e}(),IF=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),FF=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o._config.enabled&&o.enable(),o}return IF(t,e),t}(DF);function UF(e,t){return t in e}function $F(e,t,n,r){var o=void 0,i=void 0;UF(n,t)&&"number"==typeof n[t]&&(o=n[t]);var a=PF.FETCH_START;if(UF(n,a)&&"number"==typeof n[a]&&(i=n[a]),void 0!==o&&void 0!==i&&o>=i)return e.addEvent(t,o),e}function VF(e,t,n){void 0===n&&(n=!1),n||($F(e,PF.FETCH_START,t),$F(e,PF.DOMAIN_LOOKUP_START,t),$F(e,PF.DOMAIN_LOOKUP_END,t),$F(e,PF.CONNECT_START,t),UF(t,"name")&&t.name.startsWith("https:")&&$F(e,PF.SECURE_CONNECTION_START,t),$F(e,PF.CONNECT_END,t),$F(e,PF.REQUEST_START,t),$F(e,PF.RESPONSE_START,t),$F(e,PF.RESPONSE_END,t));var r=t[PF.ENCODED_BODY_SIZE];void 0!==r&&e.setAttribute(LI,r);var o=t[PF.DECODED_BODY_SIZE];void 0!==o&&r!==o&&e.setAttribute(DI,o)}function BF(){return"undefined"!=typeof location?location.origin:void 0}function zF(e,t,n,r,o,i){void 0===o&&(o=new WeakSet);var a=HF(e),s=function(e,t,n,r,o,i){var a=zI(t),s=zI(n),l=r.filter((function(t){var n=zI(BI(t[PF.FETCH_START])),r=zI(BI(t[PF.RESPONSE_END]));return t.initiatorType.toLowerCase()===i&&t.name===e&&n>=a&&r<=s}));l.length>0&&(l=l.filter((function(e){return!o.has(e)})));return l}(e=a.toString(),t,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var l=function(e){return e.slice().sort((function(e,t){var n=e[PF.FETCH_START],r=t[PF.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==BF()&&l.length>1){var c=l[0],u=function(e,t,n){for(var r,o=zI(n),i=zI(BI(t)),a=e[1],s=e.length,l=1;l<s;l++){var c=e[l],u=zI(BI(c[PF.FETCH_START])),d=o-zI(BI(c[PF.RESPONSE_END]));u>=i&&(!r||d<r)&&(r=d,a=c)}return a}(l,c[PF.RESPONSE_END],n);return u[PF.FETCH_START]<c[PF.RESPONSE_END]&&(u=c,c=void 0),{corsPreFlightRequest:c,mainRequest:u}}return{mainRequest:s[0]}}function HF(e){if("function"==typeof URL)return new URL(e,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var t=(kF||(kF=document.createElement("a")),kF);return t.href=e,t}!function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"}(PF||(PF={})),function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"}(MF||(MF={}));var qF=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(JSe){i(JSe)}}function s(e){try{l(r.throw(e))}catch(JSe){i(JSe)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},GF=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(JSe){i=[6,JSe],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},KF=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},WF=gm.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function YF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||"string"==typeof e[0]){var n=e[1];if(!(null==n?void 0:n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=function(e){if(!e.pipeThrough)return WF.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t,n=0,r=new Promise((function(e){t=e})),o=new TransformStream({start:function(){},transform:function(e,t){return qF(this,void 0,void 0,(function(){var r;return GF(this,(function(o){switch(o.label){case 0:return[4,e];case 1:return r=o.sent(),n+=r.byteLength,t.enqueue(e),[2]}}))}))},flush:function(){t(n)}});return{body:e.pipeThrough(o),length:r}}(n.body),o=r.length;return n.body=r.body,o}return Promise.resolve(function(e){if("undefined"!=typeof Document&&e instanceof Document)return(new XMLSerializer).serializeToString(document).length;if(e instanceof Blob)return e.size;if(void 0!==e.byteLength)return e.byteLength;if(e instanceof FormData)return function(e){var t,n,r=0;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e.entries()),i=o.next();!i.done;i=o.next()){var a=KF(i.value,2),s=a[1];r+=a[0].length,s instanceof Blob?r+=s.size:r+=s.length}}catch(l){t={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(e);if(e instanceof URLSearchParams)return ZF(e.toString());if("string"==typeof e)return ZF(e);return void WF.warn("unknown body type")}(n.body))}var i=e[0];return(null==i?void 0:i.body)?i.clone().text().then((function(e){return ZF(e)})):Promise.resolve()}var XF=new TextEncoder;function ZF(e){return XF.encode(e).byteLength}var QF,JF,eU="0.57.2",tU=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nU="object"==typeof process&&"node"===(null===(QF=process.release)||void 0===QF?void 0:QF.name),rU=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,"@opentelemetry/instrumentation-fetch",eU,t)||this;return n.component="fetch",n.version=eU,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return tU(t,e),t.prototype.init=function(){},t.prototype._addChildSpan=function(e,t){var n=this.tracer.startSpan("CORS Preflight",{startTime:t[PF.FETCH_START]},Om.setSpan(mm.active(),e));VF(n,t,this.getConfig().ignoreNetworkEvents),n.end(t[PF.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(e,t){var n=HF(t.url);e.setAttribute(kI,t.status),null!=t.statusText&&e.setAttribute(MF.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(OI,n.host),e.setAttribute(PI,n.protocol.replace(":","")),"undefined"!=typeof navigator&&e.setAttribute(MI,navigator.userAgent)},t.prototype._addHeaders=function(e,t){if(!function(e,t){var n=t||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),HF(e).origin===BF()||n.some((function(t){return JI(e,t)}))}(t,this.getConfig().propagateTraceHeaderCorsUrls)){var n={};return Nm.inject(mm.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(e instanceof Request)Nm.inject(mm.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else if(e.headers instanceof Headers)Nm.inject(mm.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else if(e.headers instanceof Map)Nm.inject(mm.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else{n={};Nm.inject(mm.active(),n),e.headers=Object.assign({},n,e.headers||{})}},t.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(e,t){var n;if(void 0===t&&(t={}),!eF(e,this.getConfig().ignoreUrls)){var r=(t.method||"GET").toUpperCase();return this.tracer.startSpan("HTTP "+r,{kind:nm.CLIENT,attributes:(n={},n[MF.COMPONENT]=this.moduleName,n[NI]=r,n[RI]=e,n)})}this._diag.debug("ignoring span as url matches ignored url")},t.prototype._findResourceAndAddNetworkEvents=function(e,t,n){var r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}var o=zF(t.spanUrl,t.startTime,n,r,this._usedResources,"fetch");if(o.mainRequest){var i=o.mainRequest;this._markResourceAsUsed(i);var a=o.corsPreFlightRequest;a&&(this._addChildSpan(e,a),this._markResourceAsUsed(a)),VF(e,i,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(e){this._usedResources.add(e)},t.prototype._endSpan=function(e,t,n){var r=this,o=UI(Date.now()),i=VI();this._addFinalSpanAttributes(e,n),setTimeout((function(){var n;null===(n=t.observer)||void 0===n||n.disconnect(),r._findResourceAndAddNetworkEvents(e,t,i),r._tasksCount--,r._clearResources(),e.end(o)}),300)},t.prototype._patchConstructor=function(){var e=this;return function(t){var n=e;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=this,i=HF(e[0]instanceof Request?e[0].url:String(e[0])).href,a=e[0]instanceof Request?e[0]:e[1]||{},s=n._createSpan(i,a);if(!s)return t.apply(this,e);var l=n._prepareSpanData(i);function c(e,t){n._applyAttributesAfterFetch(e,a,t),n._endSpan(e,l,{status:t.status||0,statusText:t.message,url:i})}function u(e,t){n._applyAttributesAfterFetch(e,a,t),n._endSpan(e,l,t.status>=200&&t.status<400?t:{status:t.status,statusText:t.statusText,url:i})}function d(e,t,n){try{var r=n.clone(),o=n.clone(),i=r.body;if(i){var a=i.getReader(),s=function(){a.read().then((function(t){t.done?u(e,o):s()}),(function(t){c(e,t)}))};s()}else u(e,n)}finally{t(n)}}function p(e,t,n){try{c(e,n)}finally{t(n)}}return n.getConfig().measureRequestSize&&YF.apply(void 0,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(e),!1)).then((function(e){e&&s.setAttribute(jI,e)})).catch((function(e){n._diag.warn("getFetchBodyLength",e)})),new Promise((function(e,r){return mm.with(Om.setSpan(mm.active(),s),(function(){return n._addHeaders(a,i),n._tasksCount++,t.apply(o,a instanceof Request?[a]:[i,a]).then(d.bind(o,s,e),p.bind(o,s,r))}))}))}}},t.prototype._applyAttributesAfterFetch=function(e,t,n){var r=this,o=this.getConfig().applyCustomAttributesOnSpan;o&&function(e,t){var n,r;try{r=e()}catch(JSe){n=JSe}finally{return t(n,r),r}}((function(){return o(e,t,n)}),(function(e){e&&r._diag.error("applyCustomAttributesOnSpan",e)}))},t.prototype._prepareSpanData=function(e){var t=VI(),n=[];if("function"!=typeof PerformanceObserver)return{entries:n,startTime:t,spanUrl:e};var r=new PerformanceObserver((function(t){t.getEntries().forEach((function(t){"fetch"===t.initiatorType&&t.name===e&&n.push(t)}))}));return r.observe({entryTypes:["resource"]}),{entries:n,observer:r,startTime:t,spanUrl:e}},t.prototype.enable=function(){nU?this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()"):(function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}(fetch)&&(this._unwrap(CI,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(CI,"fetch",this._patchConstructor()))},t.prototype.disable=function(){nU||(this._unwrap(CI,"fetch"),this._usedResources=new WeakSet)},t}(FF);!function(e){e.EVENT_TYPE="event_type",e.TARGET_ELEMENT="target_element",e.TARGET_XPATH="target_xpath",e.HTTP_URL="http.url"}(JF||(JF={}));var oU="0.44.1",iU=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),aU=["click"];function sU(){return!1}var lU=function(e){function t(t){var n;void 0===t&&(t={});var r=e.call(this,"@opentelemetry/instrumentation-user-interaction",oU,t)||this;return r.version=oU,r.moduleName="user-interaction",r._spansData=new WeakMap,r._wrappedListeners=new WeakMap,r._eventsSpanMap=new WeakMap,r._eventNames=new Set(null!==(n=null==t?void 0:t.eventNames)&&void 0!==n?n:aU),r._shouldPreventSpanCreation="function"==typeof(null==t?void 0:t.shouldPreventSpanCreation)?t.shouldPreventSpanCreation:sU,r}return iU(t,e),t.prototype.init=function(){},t.prototype._checkForTimeout=function(e,t){var n=this._spansData.get(t);n&&("setTimeout"===e.source?n.hrTimeLastTimeout=VI():"Promise.then"!==e.source&&"setTimeout"!==e.source&&(n.hrTimeLastTimeout=void 0))},t.prototype._allowEventName=function(e){return this._eventNames.has(e)},t.prototype._createSpan=function(e,t,n){var r;if(e instanceof HTMLElement&&e.getAttribute&&!e.hasAttribute("disabled")&&this._allowEventName(t)){var o=Xj(e,!0);try{var i=this.tracer.startSpan(t,{attributes:(r={},r[JF.EVENT_TYPE]=t,r[JF.TARGET_ELEMENT]=e.tagName,r[JF.TARGET_XPATH]=o,r[JF.HTTP_URL]=window.location.href,r)},n?Om.setSpan(mm.active(),n):void 0);if(!0===this._shouldPreventSpanCreation(t,e,i))return;return this._spansData.set(i,{taskCount:0}),i}catch(JSe){this._diag.error("failed to start create new user interaction span",JSe)}}},t.prototype._decrementTask=function(e){var t=this._spansData.get(e);t&&(t.taskCount--,0===t.taskCount&&this._tryToEndSpan(e,t.hrTimeLastTimeout))},t.prototype._getCurrentSpan=function(e){var t=e.get("OT_ZONE_CONTEXT");return t?Om.getSpan(t):t},t.prototype._incrementTask=function(e){var t=this._spansData.get(e);t&&t.taskCount++},t.prototype.addPatchedListener=function(e,t,n,r){var o=this._wrappedListeners.get(n);o||this._wrappedListeners.set(n,o=new Map);var i=o.get(t);return i||o.set(t,i=new Map),!i.has(e)&&(i.set(e,r),!0)},t.prototype.removePatchedListener=function(e,t,n){var r=this._wrappedListeners.get(n);if(r){var o=r.get(t);if(o){var i=o.get(e);return i&&(o.delete(e),0===o.size&&(r.delete(t),0===r.size&&this._wrappedListeners.delete(n))),i}}},t.prototype._invokeListener=function(e,t,n){return"function"==typeof e?e.apply(t,n):e.handleEvent(n[0])},t.prototype._patchAddEventListener=function(){var e=this;return function(t){return function(n,r,o){if(!r)return t.call(this,n,r,o);var i=o&&"object"==typeof o&&o.once,a=function(){for(var t,o=this,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=a[0],c=null==l?void 0:l.target;l&&(t=e._eventsSpanMap.get(l)),i&&e.removePatchedListener(this,n,r);var u=e._createSpan(c,n,t);return u?(l&&e._eventsSpanMap.set(l,u),mm.with(Om.setSpan(mm.active(),u),(function(){var t=e._invokeListener(r,o,a);return u.end(),t}))):e._invokeListener(r,this,a)};return e.addPatchedListener(this,n,r,a)?t.call(this,n,a,o):void 0}}},t.prototype._patchRemoveEventListener=function(){var e=this;return function(t){return function(n,r,o){var i=e.removePatchedListener(this,n,r);return t.call(this,n,i||r,o)}}},t.prototype._getPatchableEventTargets=function(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]},t.prototype._patchHistoryApi=function(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())},t.prototype._patchHistoryMethod=function(){var e=this;return function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=""+location.pathname+location.hash+location.search,i=t.apply(this,n),a=""+location.pathname+location.hash+location.search;return o!==a&&e._updateInteractionName(a),i}}},t.prototype._unpatchHistoryApi=function(){vF(history.replaceState)&&this._unwrap(history,"replaceState"),vF(history.pushState)&&this._unwrap(history,"pushState"),vF(history.back)&&this._unwrap(history,"back"),vF(history.forward)&&this._unwrap(history,"forward"),vF(history.go)&&this._unwrap(history,"go")},t.prototype._updateInteractionName=function(e){var t=Om.getSpan(mm.active());t&&"function"==typeof t.updateName&&t.updateName("Navigation: "+e)},t.prototype._patchZoneCancelTask=function(){var e=this;return function(t){return function(n){var r=Zone.current,o=e._getCurrentSpan(r);return o&&e._shouldCountTask(n,r)&&e._decrementTask(o),t.call(this,n)}}},t.prototype._patchZoneScheduleTask=function(){var e=this;return function(t){return function(n){var r=Zone.current,o=e._getCurrentSpan(r);return o&&e._shouldCountTask(n,r)&&(e._incrementTask(o),e._checkForTimeout(n,o)),t.call(this,n)}}},t.prototype._patchZoneRunTask=function(){var e=this;return function(t){return function(n,r,o){var i,a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,s=null==a?void 0:a.target,l=this;if(s){if(i=e._createSpan(s,n.eventName))return e._incrementTask(i),l.run((function(){try{return mm.with(Om.setSpan(mm.active(),i),(function(){var e=Zone.current;return n._zone=e,t.call(e,n,r,o)}))}finally{e._decrementTask(i)}}))}else i=e._getCurrentSpan(l);try{return t.call(l,n,r,o)}finally{i&&e._shouldCountTask(n,l)&&e._decrementTask(i)}}}},t.prototype._shouldCountTask=function(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;var n=this._getCurrentSpan(t);return!!n&&(!!this._spansData.get(n)&&("macroTask"===e.type||"microTask"===e.type))},t.prototype._tryToEndSpan=function(e,t){e&&(this._spansData.get(e)&&(e.end(t),this._spansData.delete(e)))},t.prototype.enable=function(){var e=this,t=this._getZoneWithPrototype();(this._diag.debug("applying patch to",this.moduleName,this.version,"zone:",!!t),t)?(vF(t.prototype.runTask)&&(this._unwrap(t.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),vF(t.prototype.scheduleTask)&&(this._unwrap(t.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),vF(t.prototype.cancelTask)&&(this._unwrap(t.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(t.prototype,"runTask",this._patchZoneRunTask()),this._wrap(t.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(t.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach((function(t){vF(t.addEventListener)&&(e._unwrap(t,"addEventListener"),e._diag.debug("removing previous patch from method addEventListener")),vF(t.removeEventListener)&&(e._unwrap(t,"removeEventListener"),e._diag.debug("removing previous patch from method removeEventListener")),e._wrap(t,"addEventListener",e._patchAddEventListener()),e._wrap(t,"removeEventListener",e._patchRemoveEventListener())})));this._patchHistoryApi()},t.prototype.disable=function(){var e=this,t=this._getZoneWithPrototype();(this._diag.debug("removing patch from",this.moduleName,this.version,"zone:",!!t),t&&this._zonePatched)?(vF(t.prototype.runTask)&&this._unwrap(t.prototype,"runTask"),vF(t.prototype.scheduleTask)&&this._unwrap(t.prototype,"scheduleTask"),vF(t.prototype.cancelTask)&&this._unwrap(t.prototype,"cancelTask")):this._getPatchableEventTargets().forEach((function(t){vF(t.addEventListener)&&e._unwrap(t,"addEventListener"),vF(t.removeEventListener)&&e._unwrap(t,"removeEventListener")}));this._unpatchHistoryApi()},t.prototype._getZoneWithPrototype=function(){return window.Zone},t}(mF),cU=function(){function e(){}return e.prototype.emit=function(e){},e}(),uU=new cU,dU=new(function(){function e(){}return e.prototype.getLogger=function(e,t,n){return new cU},e}()),pU=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.emit=function(e){this._getLogger().emit(e)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):uU},e}(),fU=function(){function e(){}return e.prototype.getLogger=function(e,t,n){var r;return null!==(r=this.getDelegateLogger(e,t,n))&&void 0!==r?r:new pU(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:dU},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateLogger=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getLogger(e,t,n)},e}(),hU="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},mU=Symbol.for("io.opentelemetry.js.api.logs"),gU=hU;var vU,yU,bU,xU=function(){function e(){this._proxyLoggerProvider=new fU}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(e){return gU[mU]?this.getLoggerProvider():(gU[mU]=(t=1,n=e,r=dU,function(e){return e===t?n:r}),this._proxyLoggerProvider.setDelegate(e),e);var t,n,r},e.prototype.getLoggerProvider=function(){var e,t;return null!==(t=null===(e=gU[mU])||void 0===e?void 0:e.call(gU,1))&&void 0!==t?t:this._proxyLoggerProvider},e.prototype.getLogger=function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)},e.prototype.disable=function(){delete gU[mU],this._proxyLoggerProvider=new fU},e}().getInstance(),wU=function(){return wU=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},wU.apply(this,arguments)},_U=function(){function e(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this._config={},this._wrap=Gm.wrap,this._unwrap=Gm.unwrap,this._massWrap=Gm.massWrap,this._massUnwrap=Gm.massUnwrap,this.setConfig(n),this._diag=gm.createComponentLogger({namespace:e}),this._tracer=Om.getTracer(e,t),this._meter=bm.getMeter(e,t),this._logger=xU.getLogger(e,t),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var e,t=null!==(e=this.init())&&void 0!==e?e:[];return Array.isArray(t)?t:[t]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(e){this._config=wU({enabled:!0},e)},e.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(e,t,n,r){if(e)try{e(n,r)}catch(JSe){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},JSe)}},e}(),SU=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),EU=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o._config.enabled&&o.enable(),o}return SU(t,e),t}(_U);function TU(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}function CU(e,t){return t in e}function AU(e,t,n,r){var o=void 0,i=void 0;CU(n,t)&&"number"==typeof n[t]&&(o=n[t]);var a=vU.FETCH_START;if(CU(n,a)&&"number"==typeof n[a]&&(i=n[a]),void 0!==o&&void 0!==i&&o>=i)return e.addEvent(t,o),e}function NU(e,t,n){void 0===n&&(n=!1),n||(AU(e,vU.FETCH_START,t),AU(e,vU.DOMAIN_LOOKUP_START,t),AU(e,vU.DOMAIN_LOOKUP_END,t),AU(e,vU.CONNECT_START,t),CU(t,"name")&&t.name.startsWith("https:")&&AU(e,vU.SECURE_CONNECTION_START,t),AU(e,vU.CONNECT_END,t),AU(e,vU.REQUEST_START,t),AU(e,vU.RESPONSE_START,t),AU(e,vU.RESPONSE_END,t));var r=t[vU.ENCODED_BODY_SIZE];void 0!==r&&e.setAttribute(LI,r);var o=t[vU.DECODED_BODY_SIZE];void 0!==o&&r!==o&&e.setAttribute(DI,o)}function RU(){return"undefined"!=typeof location?location.origin:void 0}function OU(e,t,n,r,o,i){void 0===o&&(o=new WeakSet);var a=PU(e),s=function(e,t,n,r,o){var i=zI(t),a=zI(n),s=r.filter((function(t){var n=zI(BI(t[vU.FETCH_START])),r=zI(BI(t[vU.RESPONSE_END]));return"xmlhttprequest"===t.initiatorType.toLowerCase()&&t.name===e&&n>=i&&r<=a}));s.length>0&&(s=s.filter((function(e){return!o.has(e)})));return s}(e=a.toString(),t,n,r,o);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var l=function(e){return e.slice().sort((function(e,t){var n=e[vU.FETCH_START],r=t[vU.FETCH_START];return n>r?1:n<r?-1:0}))}(s);if(a.origin!==RU()&&l.length>1){var c=l[0],u=function(e,t,n){for(var r,o=zI(n),i=zI(BI(t)),a=e[1],s=e.length,l=1;l<s;l++){var c=e[l],u=zI(BI(c[vU.FETCH_START])),d=o-zI(BI(c[vU.RESPONSE_END]));u>=i&&(!r||d<r)&&(r=d,a=c)}return a}(l,c[vU.RESPONSE_END],n);return u[vU.FETCH_START]<c[vU.RESPONSE_END]&&(u=c,c=void 0),{corsPreFlightRequest:c,mainRequest:u}}return{mainRequest:s[0]}}function PU(e){if("function"==typeof URL)return new URL(e,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var t=(yU||(yU=document.createElement("a")),yU);return t.href=e,t}!function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"}(vU||(vU={})),function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"}(bU||(bU={}));var kU=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},MU=gm.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function jU(e){return"undefined"!=typeof Document&&e instanceof Document?(new XMLSerializer).serializeToString(document).length:e instanceof Blob?e.size:void 0!==e.byteLength?e.byteLength:e instanceof FormData?function(e){var t,n,r=0;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e.entries()),i=o.next();!i.done;i=o.next()){var a=kU(i.value,2),s=a[1];r+=a[0].length,s instanceof Blob?r+=s.size:r+=s.length}}catch(l){t={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(e):e instanceof URLSearchParams?DU(e.toString()):"string"==typeof e?DU(e):void MU.warn("unknown body type")}var LU=new TextEncoder;function DU(e){return LU.encode(e).byteLength}var IU,FU="0.57.2";!function(e){e.HTTP_STATUS_TEXT="http.status_text"}(IU||(IU={}));var UU=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$U=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,"@opentelemetry/instrumentation-xml-http-request",FU,t)||this;return n.component="xml-http-request",n.version=FU,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return UU(t,e),t.prototype.init=function(){},t.prototype._addHeaders=function(e,t){if(!function(e,t){var n=t||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),PU(e).origin===RU()||n.some((function(t){return JI(e,t)}))}(PU(t).href,this.getConfig().propagateTraceHeaderCorsUrls)){var n={};return Nm.inject(mm.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}var r={};Nm.inject(mm.active(),r),Object.keys(r).forEach((function(t){e.setRequestHeader(t,String(r[t]))}))},t.prototype._addChildSpan=function(e,t){var n=this;mm.with(Om.setSpan(mm.active(),e),(function(){var e=n.tracer.startSpan("CORS Preflight",{startTime:t[vU.FETCH_START]});NU(e,t,n.getConfig().ignoreNetworkEvents),e.end(t[vU.RESPONSE_END])}))},t.prototype._addFinalSpanAttributes=function(e,t,n){if("string"==typeof n){var r=PU(n);void 0!==t.status&&e.setAttribute(kI,t.status),void 0!==t.statusText&&e.setAttribute(IU.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(OI,r.host),e.setAttribute(PI,r.protocol.replace(":","")),e.setAttribute(MI,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(e,t){var n=this,r=this.getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&function(e,t){var n,r;try{r=e()}catch(JSe){n=JSe}finally{return t(n,r),r}}((function(){return r(e,t)}),(function(e){e&&n._diag.error("applyCustomAttributesOnSpan",e)}))},t.prototype._addResourceObserver=function(e,t){var n=this._xhrMem.get(e);n&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(n.createdResources={observer:new PerformanceObserver((function(e){var r=e.getEntries(),o=PU(t);r.forEach((function(e){"xmlhttprequest"===e.initiatorType&&e.name===o.href&&n.createdResources&&n.createdResources.entries.push(e)}))})),entries:[]},n.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(AI.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(e,t,n,r,o){if(n&&r&&o&&e.createdResources){var i=e.createdResources.entries;i&&i.length||(i=AI.getEntriesByType("resource"));var a=OU(PU(n).href,r,o,i,this._usedResources);if(a.mainRequest){var s=a.mainRequest;this._markResourceAsUsed(s);var l=a.corsPreFlightRequest;l&&(this._addChildSpan(t,l),this._markResourceAsUsed(l)),NU(t,s,this.getConfig().ignoreNetworkEvents)}}},t.prototype._cleanPreviousSpanInformation=function(e){var t=this._xhrMem.get(e);if(t){var n=t.callbackToRemoveEvents;n&&n(),this._xhrMem.delete(e)}},t.prototype._createSpan=function(e,t,n){var r;if(!eF(t,this.getConfig().ignoreUrls)){var o=n.toUpperCase(),i=this.tracer.startSpan(o,{kind:nm.CLIENT,attributes:(r={},r[NI]=n,r[RI]=PU(t).toString(),r)});return i.addEvent(bU.METHOD_OPEN),this._cleanPreviousSpanInformation(e),this._xhrMem.set(e,{span:i,spanUrl:t}),i}this._diag.debug("ignoring span as url matches ignored url")},t.prototype._markResourceAsUsed=function(e){this._usedResources.add(e)},t.prototype._patchOpen=function(){var e=this;return function(t){var n=e;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n._createSpan(this,e[1],e[0]),t.apply(this,e)}}},t.prototype._patchSend=function(){var e=this;function t(t,n){var r=e._xhrMem.get(n);if(r){r.status=n.status,r.statusText=n.statusText,e._xhrMem.delete(n),r.span&&e._applyAttributesAfterXHR(r.span,n);var o=VI(),i=Date.now();setTimeout((function(){!function(t,n,r,o){var i=n.callbackToRemoveEvents;"function"==typeof i&&i();var a=n.span,s=n.spanUrl;a&&(e._findResourceAndAddNetworkEvents(n,a,s,n.sendStartTime,r),a.addEvent(t,o),e._addFinalSpanAttributes(a,n,s),a.end(o),e._tasksCount--),e._clearResources()}(t,r,o,i)}),300)}}function n(){t(bU.EVENT_ERROR,this)}function r(){t(bU.EVENT_ABORT,this)}function o(){t(bU.EVENT_TIMEOUT,this)}function i(){t(this.status<299?bU.EVENT_LOAD:bU.EVENT_ERROR,this)}return function(t){return function(){for(var a=this,s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c=e._xhrMem.get(this);if(!c)return t.apply(this,s);var u=c.span,d=c.spanUrl;if(u&&d){if(e.getConfig().measureRequestSize&&(null==s?void 0:s[0])){var p=jU(s[0]);void 0!==p&&u.setAttribute(jI,p)}mm.with(Om.setSpan(mm.active(),u),(function(){e._tasksCount++,c.sendStartTime=VI(),u.addEvent(bU.METHOD_SEND),a.addEventListener("abort",r),a.addEventListener("error",n),a.addEventListener("load",i),a.addEventListener("timeout",o),c.callbackToRemoveEvents=function(){!function(t){t.removeEventListener("abort",r),t.removeEventListener("error",n),t.removeEventListener("load",i),t.removeEventListener("timeout",o);var a=e._xhrMem.get(t);a&&(a.callbackToRemoveEvents=void 0)}(a),c.createdResources&&c.createdResources.observer.disconnect()},e._addHeaders(a,d),e._addResourceObserver(a,d)}))}return t.apply(this,s)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),TU(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),TU(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},t.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},t}(EU),VU={"@opentelemetry/instrumentation-document-load":_F,"@opentelemetry/instrumentation-fetch":rU,"@opentelemetry/instrumentation-user-interaction":lU,"@opentelemetry/instrumentation-xml-http-request":$U};function BU(e){var t;void 0===e&&(e={});for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.prototype.hasOwnProperty.call(VU,o)||gm.error('Provided instrumentation name "'+o+'" not found')}for(var i=[],a=0,s=Object.keys(VU);a<s.length;a++){var l=s[a],c=VU[l],u=null!==(t=e[l])&&void 0!==t?t:{};if(!1!==u.enabled)try{gm.debug("Loading instrumentation for "+l),i.push(new c(u))}catch(JSe){gm.error(JSe)}else gm.debug("Disabling instrumentation for "+l)}return i}var zU=(e=>(e.ReactComponent="React Component",e.Iframe="Iframe",e.MagicLink="Magic Link",e))(zU||{});let HU=!1;const qU=[/.*launchdarkly\.com.*/i,/.*\/api\/telemetry.*/i,new RegExp(`^(?!${Se.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}/).*`)],GU={ignoreNetworkEvents:!0,propagateTraceHeaderCorsUrls:[new RegExp(Se)],ignoreUrls:qU},KU=({tenantExternalId:e,partnerId:t,configCallbacks:r,clientEntryPoint:o=zU.ReactComponent,debug:i})=>{const a=(()=>{const{ldClient:e}=n.useContext(al.reactContext);return e})(),s=a?.variation("show-fe-honeycomb-logs",!1);if(HU||!s)return null;try{Nm.setGlobalPropagator(new QI);const n=new Df.HoneycombWebSDK({tracesEndpoint:`${Se}/telemetry`,serviceName:"sdk-client",debug:i,skipOptionsValidation:!0,instrumentations:[BU({"@opentelemetry/instrumentation-xml-http-request":{...GU,ignoreUrls:qU},"@opentelemetry/instrumentation-fetch":{...GU,ignoreUrls:qU},"@opentelemetry/instrumentation-document-load":{enabled:!1},"@opentelemetry/instrumentation-user-interaction":{enabled:!1}})],resourceAttributes:{"tenant.externalId":e,"partner.id":t,"reach.client":o,"reach.configCallbacks":r}});n.start(),HU=!0,window.addEventListener("beforeunload",(()=>{n.shutdown().catch((e=>{}))}))}catch(JSe){return null}return null};function WU(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function YU(...e){return t=>{let n=!1;const r=e.map((e=>{const r=WU(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():WU(e[t],null)}}}}function XU(...e){return i.useCallback(YU(...e),e)}var ZU=i.forwardRef(((e,n)=>{const{children:r,...o}=e,a=i.Children.toArray(r),s=a.find(e$);if(s){const e=s.props.children,r=a.map((t=>t===s?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(QU,{...o,ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,r):null})}return t.jsx(QU,{...o,ref:n,children:r})}));ZU.displayName="Slot";var QU=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?YU(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));QU.displayName="SlotClone";var JU=({children:e})=>t.jsx(t.Fragment,{children:e});function e$(e){return i.isValidElement(e)&&e.type===JU}var t$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,n)=>{const r=i.forwardRef(((e,r)=>{const{asChild:o,...i}=e,a=o?ZU:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(a,{...i,ref:r})}));return r.displayName=`Primitive.${n}`,{...e,[n]:r}}),{}),n$=i.forwardRef(((e,n)=>t.jsx(t$.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));function r$(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function o$(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i$(...e){return t=>{let n=!1;const r=e.map((e=>{const r=o$(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():o$(e[t],null)}}}}function a$(...e){return i.useCallback(i$(...e),e)}function s$(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return i.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}n$.displayName="VisuallyHidden";var l$=globalThis?.document?i.useLayoutEffect:()=>{},c$=i[" useId ".trim().toString()]||(()=>{}),u$=0;function d$(e){const[t,n]=i.useState(c$());return l$((()=>{n((e=>e??String(u$++)))}),[e]),e||(t?`radix-${t}`:"")}function p$(e){const t=i.useRef(e);return i.useEffect((()=>{t.current=e})),i.useMemo((()=>(...e)=>t.current?.(...e)),[])}function f$({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=function({defaultProp:e,onChange:t}){const n=i.useState(e),[r]=n,o=i.useRef(r),a=p$(t);return i.useEffect((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}({defaultProp:t,onChange:n}),a=void 0!==e,s=a?e:r,l=p$(n);return[s,i.useCallback((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&l(n)}else o(t)}),[a,e,o,l])]}function h$(e){const n=m$(e),r=i.forwardRef(((e,r)=>{const{children:o,...a}=e,s=i.Children.toArray(o),l=s.find(v$);if(l){const e=l.props.children,o=s.map((t=>t===l?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(n,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})}));return r.displayName=`${e}.Slot`,r}function m$(e){const t=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?i$(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var g$=Symbol("radix.slottable");function v$(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===g$}var y$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,n)=>{const r=h$(`Primitive.${n}`),o=i.forwardRef(((e,o)=>{const{asChild:i,...a}=e,s=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...a,ref:o})}));return o.displayName=`Primitive.${n}`,{...e,[n]:o}}),{});var b$,x$="dismissableLayer.update",w$="dismissableLayer.pointerDownOutside",_$="dismissableLayer.focusOutside",S$=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),E$=i.forwardRef(((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=i.useContext(S$),[p,f]=i.useState(null),h=p?.ownerDocument??globalThis?.document,[,m]=i.useState({}),g=a$(n,(e=>f(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=p?v.indexOf(p):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,_=x>=b,S=function(e,t=globalThis?.document){const n=p$(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){C$(w$,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));_&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())}),h),E=function(e,t=globalThis?.document){const n=p$(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){C$(_$,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),h);return function(e,t=globalThis?.document){const n=p$(e);i.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{x===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),i.useEffect((()=>{if(p)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(b$=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),T$(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=b$)}}),[p,h,r,d]),i.useEffect((()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),T$())}),[p,d]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(x$,e),()=>document.removeEventListener(x$,e)}),[]),t.jsx(y$.div,{...u,ref:g,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:r$(e.onFocusCapture,E.onFocusCapture),onBlurCapture:r$(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:r$(e.onPointerDownCapture,S.onPointerDownCapture)})}));E$.displayName="DismissableLayer";function T$(){const e=new CustomEvent(x$);document.dispatchEvent(e)}function C$(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&a.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}i.forwardRef(((e,n)=>{const r=i.useContext(S$),o=i.useRef(null),a=a$(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.jsx(y$.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var A$="focusScope.autoFocusOnMount",N$="focusScope.autoFocusOnUnmount",R$={bubbles:!1,cancelable:!0},O$=i.forwardRef(((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[c,u]=i.useState(null),d=p$(a),p=p$(s),f=i.useRef(null),h=a$(n,(e=>u(e))),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect((()=>{if(o){let e=function(e){if(m.paused||!c)return;const t=e.target;c.contains(t)?f.current=t:j$(f.current,{select:!0})},t=function(e){if(m.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||j$(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&j$(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,c,m.paused]),i.useEffect((()=>{if(c){L$.add(m);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(A$,R$);c.addEventListener(A$,d),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(j$(r,{select:t}),document.activeElement!==n)return}((e=P$(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&j$(c))}return()=>{c.removeEventListener(A$,d),setTimeout((()=>{const e=new CustomEvent(N$,R$);c.addEventListener(N$,p),c.dispatchEvent(e),e.defaultPrevented||j$(t??document.body,{select:!0}),c.removeEventListener(N$,p),L$.remove(m)}),0)}}var e}),[c,d,p,m]);const g=i.useCallback((e=>{if(!r&&!o)return;if(m.paused)return;const t=document.activeElement;if("Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&t){const n=e.currentTarget,[o,i]=function(e){const t=P$(e),n=k$(t,e),r=k$(t.reverse(),e);return[n,r]}(n);o&&i?e.shiftKey||t!==i?e.shiftKey&&t===o&&(e.preventDefault(),r&&j$(i,{select:!0})):(e.preventDefault(),r&&j$(o,{select:!0})):t===n&&e.preventDefault()}}),[r,o,m.paused]);return t.jsx(y$.div,{tabIndex:-1,...l,ref:h,onKeyDown:g})}));function P$(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}function k$(e,t){for(const n of e)if(!M$(n,{upTo:t}))return n}function M$(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function j$(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}O$.displayName="FocusScope";var L$=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=D$(e,t),e.unshift(t)},remove(t){e=D$(e,t),e[0]?.resume()}}}();function D$(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var I$=i.forwardRef(((e,n)=>{const{container:o,...a}=e,[s,l]=i.useState(!1);l$((()=>l(!0)),[]);const c=o||s&&globalThis?.document?.body;return c?r.createPortal(t.jsx(y$.div,{...a,ref:n}),c):null}));I$.displayName="Portal";var F$=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return i.useReducer(((e,n)=>t[e][n]??e),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect((()=>{const e=U$(r.current);a.current="mounted"===l?e:"none"}),[l]),l$((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=U$(t);if(e)c("MOUNT");else if("none"===i||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,c]),l$((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=i=>{const a=U$(r.current).includes(i.animationName);if(i.target===t&&a&&(c("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(a.current=U$(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):i.Children.only(n),a=a$(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?i.cloneElement(o,{ref:a}):null};function U$(e){return e?.animationName||"none"}F$.displayName="Presence";var $$=0;function V$(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var B$=function(){return B$=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},B$.apply(this,arguments)};function z$(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var H$="right-scroll-bar-position",q$="width-before-scroll-bar";function G$(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var K$="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,W$=new WeakMap;function Y$(e,t){var r=function(e,t){var r=n.useState((function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}}))[0];return r.callback=t,r.facade}(null,(function(t){return e.forEach((function(e){return G$(e,t)}))}));return K$((function(){var t=W$.get(r);if(t){var n=new Set(t),o=new Set(e),i=r.current;n.forEach((function(e){o.has(e)||G$(e,null)})),o.forEach((function(e){n.has(e)||G$(e,i)}))}W$.set(r,e)}),[e]),r}function X$(e){return e}var Z$=function(e){var t=e.sideCar,n=z$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,B$({},n))};Z$.isSideCarExport=!0;var Q$=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=X$);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=B$({async:!0,ssr:!1},e),t}(),J$=function(){},eV=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:J$,onWheelCapture:J$,onTouchMoveCapture:J$}),o=r[0],a=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,f=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=e.gapMode,x=z$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,_=Y$([n,t]),S=B$(B$({},x),o);return i.createElement(i.Fragment,null,d&&i.createElement(w,{sideCar:Q$,removeScrollBar:u,shards:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),s?i.cloneElement(i.Children.only(l),B$(B$({},S),{ref:_})):i.createElement(y,B$({},S,{className:c,ref:_}),l))}));eV.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},eV.classNames={fullWidth:q$,zeroRight:H$};function tV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var nV=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=tV())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},rV=function(){var e,t=(e=nV(),function(t,n){i.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){return t(e.styles,e.dynamic),null}},oV={left:0,top:0,right:0,gap:0},iV=function(e){return parseInt(e||"",10)||0},aV=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return oV;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[iV(t["padding"===e?"paddingLeft":"marginLeft"]),iV(n),iV(r)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},sV=rV(),lV="data-scroll-locked",cV=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(lV,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(H$," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(q$," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(H$," .").concat(H$," {\n right: 0 ").concat(r,";\n }\n \n .").concat(q$," .").concat(q$," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(lV,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},uV=function(){var e=parseInt(document.body.getAttribute(lV)||"0",10);return isFinite(e)?e:0},dV=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;i.useEffect((function(){return document.body.setAttribute(lV,(uV()+1).toString()),function(){var e=uV()-1;e<=0?document.body.removeAttribute(lV):document.body.setAttribute(lV,e.toString())}}),[]);var a=i.useMemo((function(){return aV(o)}),[o]);return i.createElement(sV,{styles:cV(a,!t,o,n?"":"!important")})},pV=!1;if("undefined"!=typeof window)try{var fV=Object.defineProperty({},"passive",{get:function(){return pV=!0,!0}});window.addEventListener("test",fV,fV),window.removeEventListener("test",fV,fV)}catch(eEe){pV=!1}var hV=!!pV&&{passive:!1},mV=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},gV=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),vV(e,r)){var o=yV(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vV=function(e,t){return"v"===e?function(e){return mV(e,"overflowY")}(t):function(e){return mV(e,"overflowX")}(t)},yV=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},bV=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xV=function(e){return[e.deltaX,e.deltaY]},wV=function(e){return e&&"current"in e?e.current:e},_V=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},SV=0,EV=[];function TV(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const CV=(AV=function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(SV++)[0],a=i.useState(rV)[0],s=i.useRef(e);i.useEffect((function(){s.current=e}),[e]),i.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(wV),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var o,i=bV(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=gV(d,u);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=gV(d,u)),!p)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var f=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,s=t.contains(a),l=!1,c=i>0,u=0,d=0;do{var p=yV(e,a),f=p[0],h=p[1]-p[2]-o*f;(f||h)&&vV(e,a)&&(u+=h,d+=f),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(f,t,e,"h"===f?l:c)}),[]),c=i.useCallback((function(e){var n=e;if(EV.length&&EV[EV.length-1]===a){var r="deltaY"in n?xV(n):bV(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta)[0]===(o=r)[0]&&t[1]===o[1];var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(s.current.shards||[]).map(wV).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=i.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:TV(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=i.useCallback((function(e){n.current=bV(e),r.current=void 0}),[]),p=i.useCallback((function(t){u(t.type,xV(t),t.target,l(t,e.lockRef.current))}),[]),f=i.useCallback((function(t){u(t.type,bV(t),t.target,l(t,e.lockRef.current))}),[]);i.useEffect((function(){return EV.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,hV),document.addEventListener("touchmove",c,hV),document.addEventListener("touchstart",d,hV),function(){EV=EV.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,hV),document.removeEventListener("touchmove",c,hV),document.removeEventListener("touchstart",d,hV)}}),[]);var h=e.removeScrollBar;return i.createElement(i.Fragment,null,e.inert?i.createElement(a,{styles:_V(o)}):null,h?i.createElement(dV,{gapMode:e.gapMode}):null)},Q$.useMedium(AV),Z$);var AV,NV=i.forwardRef((function(e,t){return i.createElement(eV,B$({},e,{ref:t,sideCar:CV}))}));NV.classNames=eV.classNames;var RV=new WeakMap,OV=new WeakMap,PV={},kV=0,MV=function(e){return e&&(e.host||MV(e.parentNode))},jV=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=MV(t);return n&&e.contains(n)?n:null})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);PV[n]||(PV[n]=new WeakMap);var i=PV[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(RV.get(e)||0)+1,c=(i.get(e)||0)+1;RV.set(e,l),i.set(e,c),a.push(e),1===l&&o&&OV.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(JSe){}}))};return u(t),s.clear(),kV++,function(){a.forEach((function(e){var t=RV.get(e)-1,o=i.get(e)-1;RV.set(e,t),i.set(e,o),t||(OV.has(e)||e.removeAttribute(r),OV.delete(e)),o||e.removeAttribute(n)})),--kV||(RV=new WeakMap,RV=new WeakMap,OV=new WeakMap,PV={})}},LV=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),jV(r,o,n,"aria-hidden")):function(){return null}},DV="Dialog",[IV,FV]=function(e,n=[]){let r=[];const o=()=>{const t=r.map((e=>i.createContext(e)));return function(n){const r=n?.[e]||t;return i.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(n,o){const a=i.createContext(o),s=r.length;r=[...r,o];const l=n=>{const{scope:r,children:o,...l}=n,c=r?.[e]?.[s]||a,u=i.useMemo((()=>l),Object.values(l));return t.jsx(c.Provider,{value:u,children:o})};return l.displayName=n+"Provider",[l,function(t,r){const l=i.useContext(r?.[e]?.[s]||a);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},s$(o,...n)]}(DV),[UV,$V]=IV(DV),VV=e=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,c=i.useRef(null),u=i.useRef(null),[d=!1,p]=f$({prop:o,defaultProp:a,onChange:s});return t.jsx(UV,{scope:n,triggerRef:c,contentRef:u,contentId:d$(),titleId:d$(),descriptionId:d$(),open:d,onOpenChange:p,onOpenToggle:i.useCallback((()=>p((e=>!e))),[p]),modal:l,children:r})};VV.displayName=DV;var BV="DialogTrigger";i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=$V(BV,r),a=a$(n,i.triggerRef);return t.jsx(y$.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":lB(i.open),...o,ref:a,onClick:r$(e.onClick,i.onOpenToggle)})})).displayName=BV;var zV="DialogPortal",[HV,qV]=IV(zV,{forceMount:void 0}),GV=e=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=e,s=$V(zV,n);return t.jsx(HV,{scope:n,forceMount:r,children:i.Children.map(o,(e=>t.jsx(F$,{present:r||s.open,children:t.jsx(I$,{asChild:!0,container:a,children:e})})))})};GV.displayName=zV;var KV="DialogOverlay",WV=i.forwardRef(((e,n)=>{const r=qV(KV,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,a=$V(KV,e.__scopeDialog);return a.modal?t.jsx(F$,{present:o||a.open,children:t.jsx(XV,{...i,ref:n})}):null}));WV.displayName=KV;var YV=h$("DialogOverlay.RemoveScroll"),XV=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=$V(KV,r);return t.jsx(NV,{as:YV,allowPinchZoom:!0,shards:[i.contentRef],children:t.jsx(y$.div,{"data-state":lB(i.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})})),ZV="DialogContent",QV=i.forwardRef(((e,n)=>{const r=qV(ZV,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,a=$V(ZV,e.__scopeDialog);return t.jsx(F$,{present:o||a.open,children:t.jsx(a.modal?JV:eB,{...i,ref:n})})}));QV.displayName=ZV;var JV=i.forwardRef(((e,n)=>{const r=$V(ZV,e.__scopeDialog),o=i.useRef(null),a=a$(n,r.contentRef,o);return i.useEffect((()=>{const e=o.current;if(e)return LV(e)}),[]),t.jsx(tB,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:r$(e.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:r$(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent;(2===t.button||0===t.button&&!0===t.ctrlKey)&&e.preventDefault()})),onFocusOutside:r$(e.onFocusOutside,(e=>e.preventDefault()))})})),eB=i.forwardRef(((e,n)=>{const r=$V(ZV,e.__scopeDialog),o=i.useRef(!1),a=i.useRef(!1);return t.jsx(tB,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const n=t.target,i=r.triggerRef.current?.contains(n);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),tB=i.forwardRef(((e,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=e,c=$V(ZV,r),u=i.useRef(null),d=a$(n,u);return i.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??V$()),document.body.insertAdjacentElement("beforeend",e[1]??V$()),$$++,()=>{1===$$&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),$$--}}),[]),t.jsxs(t.Fragment,{children:[t.jsx(O$,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:s,children:t.jsx(E$,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":lB(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),t.jsxs(t.Fragment,{children:[t.jsx(pB,{titleId:c.titleId}),t.jsx(fB,{contentRef:u,descriptionId:c.descriptionId})]})]})})),nB="DialogTitle",rB=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=$V(nB,r);return t.jsx(y$.h2,{id:i.titleId,...o,ref:n})}));rB.displayName=nB;var oB="DialogDescription",iB=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=$V(oB,r);return t.jsx(y$.p,{id:i.descriptionId,...o,ref:n})}));iB.displayName=oB;var aB="DialogClose",sB=i.forwardRef(((e,n)=>{const{__scopeDialog:r,...o}=e,i=$V(aB,r);return t.jsx(y$.button,{type:"button",...o,ref:n,onClick:r$(e.onClick,(()=>i.onOpenChange(!1)))})}));function lB(e){return e?"open":"closed"}sB.displayName=aB;var cB="DialogTitleWarning",[uB,dB]=function(e,n){const r=i.createContext(n),o=e=>{const{children:n,...o}=e,a=i.useMemo((()=>o),Object.values(o));return t.jsx(r.Provider,{value:a,children:n})};return o.displayName=e+"Provider",[o,function(t){const o=i.useContext(r);if(o)return o;if(void 0!==n)return n;throw new Error(`\`${t}\` must be used within \`${e}\``)}]}(cB,{contentName:ZV,titleName:nB,docsSlug:"dialog"}),pB=({titleId:e})=>{const t=dB(cB);return i.useEffect((()=>{if(e){document.getElementById(e)}}),[`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`,e]),null},fB=({contentRef:e,descriptionId:t})=>{const n=dB("DialogDescriptionWarning");return i.useEffect((()=>{const n=e.current?.getAttribute("aria-describedby");if(t&&n){document.getElementById(t)}}),[`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`,e,t]),null},hB=VV,mB=GV,gB=WV,vB=QV,yB=rB,bB=iB,xB=sB;function wB(...e){return Xd(eu(e))}const _B=hB,SB=({...e})=>t.jsx(mB,{children:t.jsx("div",{"data-reach-root":!0,children:e.children})}),EB=i.forwardRef((({className:e,...n},r)=>t.jsx(gB,{ref:r,className:wB("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n})));EB.displayName=gB.displayName;const TB=i.forwardRef((({className:e,children:n,hideCloseButton:r=!1,...o},i)=>t.jsxs(SB,{children:[t.jsx(EB,{}),t.jsxs(vB,{ref:i,className:wB("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),onInteractOutside:e=>{e.composedPath().some((e=>"classList"in e&&Array.from(e.classList).includes("pac-item")))&&e.preventDefault()},...o,children:[n,!r&&t.jsxs(xB,{className:"absolute right-6 top-6 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[t.jsx(rd,{className:"h-6 w-6"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));TB.displayName=vB.displayName;const CB=({className:e,...n})=>t.jsx("div",{className:wB("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});CB.displayName="DialogHeader";const AB=({className:e,...n})=>t.jsx("div",{className:wB("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});AB.displayName="DialogFooter";const NB=i.forwardRef((({className:e,...n},r)=>t.jsx(yB,{ref:r,className:wB("text-lg font-semibold leading-none tracking-tight text-foreground",e),...n})));NB.displayName=yB.displayName;const RB=i.forwardRef((({className:e,...n},r)=>t.jsx(bB,{ref:r,className:wB("text-sm text-muted-foreground",e),...n})));RB.displayName=bB.displayName;i.forwardRef((({className:e,children:n,...r},o)=>t.jsx(n$,{ref:o,className:wB(e),...r,children:n}))).displayName="DialogVisuallyHidden";const OB=n.createContext({});function PB(e){const t=n.useRef(null);return null===t.current&&(t.current=e()),t.current}const kB=n.createContext(null),MB=n.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class jB extends i.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=t.offsetParent,n=e instanceof HTMLElement&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function LB({children:e,isPresent:r,anchorX:o}){const a=n.useId(),s=n.useRef(null),l=n.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=n.useContext(MB);return n.useInsertionEffect((()=>{const{width:e,height:t,top:n,left:i,right:u}=l.current;if(r||!s.current||!e||!t)return;const d="left"===o?`left: ${i}`:`right: ${u}`;s.current.dataset.motionPopId=a;const p=document.createElement("style");return c&&(p.nonce=c),document.head.appendChild(p),p.sheet&&p.sheet.insertRule(`\n [data-motion-pop-id="${a}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${d}px !important;\n top: ${n}px !important;\n }\n `),()=>{document.head.removeChild(p)}}),[r]),t.jsx(jB,{isPresent:r,childRef:s,sizeRef:l,children:i.cloneElement(e,{ref:s})})}const DB=({children:e,initial:r,isPresent:o,onExitComplete:a,custom:s,presenceAffectsLayout:l,mode:c,anchorX:u})=>{const d=PB(IB),p=n.useId(),f=n.useCallback((e=>{d.set(e,!0);for(const t of d.values())if(!t)return;a&&a()}),[d,a]),h=n.useMemo((()=>({id:p,initial:r,isPresent:o,custom:s,onExitComplete:f,register:e=>(d.set(e,!1),()=>d.delete(e))})),l?[Math.random(),f]:[o,f]);return n.useMemo((()=>{d.forEach(((e,t)=>d.set(t,!1)))}),[o]),i.useEffect((()=>{!o&&!d.size&&a&&a()}),[o]),"popLayout"===c&&(e=t.jsx(LB,{isPresent:o,anchorX:u,children:e})),t.jsx(kB.Provider,{value:h,children:e})};function IB(){return new Map}function FB(e=!0){const t=n.useContext(kB);if(null===t)return[!0,null];const{isPresent:r,onExitComplete:o,register:i}=t,a=n.useId();n.useEffect((()=>{e&&i(a)}),[e]);const s=n.useCallback((()=>e&&o&&o(a)),[a,o,e]);return!r&&o?[!1,s]:[!0]}const UB=e=>e.key||"";function $B(e){const t=[];return n.Children.forEach(e,(e=>{n.isValidElement(e)&&t.push(e)})),t}const VB="undefined"!=typeof window,BB=VB?n.useLayoutEffect:n.useEffect,zB=({children:e,custom:r,initial:o=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:s="sync",propagate:l=!1,anchorX:c="left"})=>{const[u,d]=FB(l),p=n.useMemo((()=>$B(e)),[e]),f=l&&!u?[]:p.map(UB),h=n.useRef(!0),m=n.useRef(p),g=PB((()=>new Map)),[v,y]=n.useState(p),[b,x]=n.useState(p);BB((()=>{h.current=!1,m.current=p;for(let e=0;e<b.length;e++){const t=UB(b[e]);f.includes(t)?g.delete(t):!0!==g.get(t)&&g.set(t,!1)}}),[b,f.length,f.join("-")]);const w=[];if(p!==v){let e=[...p];for(let t=0;t<b.length;t++){const n=b[t],r=UB(n);f.includes(r)||(e.splice(t,0,n),w.push(n))}return"wait"===s&&w.length&&(e=w),x($B(e)),y(p),null}process;const{forceRender:_}=n.useContext(OB);return t.jsx(t.Fragment,{children:b.map((e=>{const n=UB(e),v=!(l&&!u)&&(p===b||f.includes(n));return t.jsx(DB,{isPresent:v,initial:!(h.current&&!o)&&void 0,custom:r,presenceAffectsLayout:a,mode:s,onExitComplete:v?void 0:()=>{if(!g.has(n))return;g.set(n,!0);let e=!0;g.forEach((t=>{t||(e=!1)})),e&&(null==_||_(),x(m.current),l&&(null==d||d()),i&&i())},anchorX:c,children:e},n)}))})},HB=e=>e;let qB=HB,GB=HB;function KB(e){let t;return()=>(void 0===t&&(t=e()),t)}"production"!==process.env.NODE_ENV&&(qB=(e,t)=>{},GB=(e,t)=>{if(!e)throw new Error(t)});const WB=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},YB=e=>1e3*e,XB=e=>e/1e3,ZB=!1,QB=["read","resolveKeyframes","update","preRender","render","postRender"],JB={value:null};function ez(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=QB.reduce(((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){a.has(t)&&(u.schedule(t),e()),l++,t(s)}const u={schedule:(e,t=!1,i=!1)=>{const s=i&&o?n:r;return t&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{s=e,o?i=!0:(o=!0,[n,r]=[r,n],n.forEach(c),t&&JB.value&&JB.value.frameloop[t].push(l),l=0,n.clear(),o=!1,i&&(i=!1,u.process(e)))}};return u}(i,t?n:void 0),e)),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,f=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))};return{schedule:QB.reduce(((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(f)),s.schedule(t,i,a)),t}),{}),cancel:e=>{for(let t=0;t<QB.length;t++)a[QB[t]].cancel(e)},state:o,steps:a}}const{schedule:tz,cancel:nz,state:rz,steps:oz}=ez("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:HB,!0),iz=n.createContext({strict:!1}),az={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},sz={};for(const nEe in az)sz[nEe]={isEnabled:e=>az[nEe].some((t=>!!e[t]))};const lz=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function cz(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lz.has(e)}let uz=e=>!cz(e);try{(dz=require("@emotion/is-prop-valid").default)&&(uz=e=>e.startsWith("on")?!cz(e):dz(e))}catch(tEe){}var dz;const pz=new Set;function fz(e,t,n){e||pz.has(t)||pz.add(t)}function hz(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>("production"!==process.env.NODE_ENV&&fz(!1,"motion() is deprecated. Use motion.create() instead."),e(...t))),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const mz=n.createContext({});function gz(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function vz(e){return"string"==typeof e||Array.isArray(e)}const yz=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bz=["initial",...yz];function xz(e){return gz(e.animate)||bz.some((t=>vz(e[t])))}function wz(e){return Boolean(xz(e)||e.variants)}function _z(e){const{initial:t,animate:r}=function(e,t){if(xz(e)){const{initial:t,animate:n}=e;return{initial:!1===t||vz(t)?t:void 0,animate:vz(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,n.useContext(mz));return n.useMemo((()=>({initial:t,animate:r})),[Sz(t),Sz(r)])}function Sz(e){return Array.isArray(e)?e.join(" "):e}const Ez=Symbol.for("motionComponentSymbol");function Tz(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Cz(e,t,r){return n.useCallback((n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&("function"==typeof r?r(n):Tz(r)&&(r.current=n))}),[t])}const Az=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Nz="data-"+Az("framerAppearId"),{schedule:Rz}=ez(queueMicrotask,!1),Oz=n.createContext({});function Pz(e,t,r,o,i){var a,s;const{visualElement:l}=n.useContext(mz),c=n.useContext(iz),u=n.useContext(kB),d=n.useContext(MB).reducedMotion,p=n.useRef(null);o=o||c.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:l,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const f=p.current,h=n.useContext(Oz);!f||f.projection||!i||"html"!==f.type&&"svg"!==f.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:kz(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&Tz(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(p.current,r,i,h);const m=n.useRef(!1);n.useInsertionEffect((()=>{f&&m.current&&f.update(r,u)}));const g=r[Nz],v=n.useRef(Boolean(g)&&!(null===(a=window.MotionHandoffIsComplete)||void 0===a?void 0:a.call(window,g))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,g)));return BB((()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Rz.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())})),n.useEffect((()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,g)})),v.current=!1))})),f}function kz(e){if(e)return!1!==e.options.allowProjection?e.projection:kz(e.parent)}function Mz({preloadedFeatures:e,createVisualElement:r,useRender:o,useVisualState:i,Component:a}){var s,l;function c(s,l){let c;const u={...n.useContext(MB),...s,layoutId:jz(s)},{isStatic:d}=u,p=_z(s),f=i(s,d);if(!d&&VB){!function(e,t){const r=n.useContext(iz).strict;if("production"!==process.env.NODE_ENV&&t&&r){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?qB(!1,t):GB(!1,t)}}(u,e);const t=function(e){const{drag:t,layout:n}=sz;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(u);c=t.MeasureLayout,p.visualElement=Pz(a,f,u,r,t.ProjectionNode)}return t.jsxs(mz.Provider,{value:p,children:[c&&p.visualElement?t.jsx(c,{visualElement:p.visualElement,...u}):null,o(a,s,Cz(f,p.visualElement,l),f,d,p.visualElement)]})}e&&function(e){for(const t in e)sz[t]={...sz[t],...e[t]}}(e),c.displayName=`motion.${"string"==typeof a?a:`create(${null!==(l=null!==(s=a.displayName)&&void 0!==s?s:a.name)&&void 0!==l?l:""})`}`;const u=n.forwardRef(c);return u[Ez]=a,u}function jz({layoutId:e}){const t=n.useContext(OB).id;return t&&void 0!==e?t+"-"+e:e}const Lz=e=>t=>"string"==typeof t&&t.startsWith(e),Dz=Lz("--"),Iz=Lz("var(--"),Fz=e=>!!Iz(e)&&Uz.test(e.split("/*")[0].trim()),Uz=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$z={};const Vz=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Bz=new Set(Vz);function zz(e,{layout:t,layoutId:n}){return Bz.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!$z[e]||"opacity"===e)}const Hz=e=>Boolean(e&&e.getVelocity),qz=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Gz=(e,t,n)=>n>t?t:n<e?e:n,Kz={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Wz={...Kz,transform:e=>Gz(0,1,e)},Yz={...Kz,default:1},Xz=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Zz=Xz("deg"),Qz=Xz("%"),Jz=Xz("px"),eH=Xz("vh"),tH=Xz("vw"),nH={...Qz,parse:e=>Qz.parse(e)/100,transform:e=>Qz.transform(100*e)},rH={borderWidth:Jz,borderTopWidth:Jz,borderRightWidth:Jz,borderBottomWidth:Jz,borderLeftWidth:Jz,borderRadius:Jz,radius:Jz,borderTopLeftRadius:Jz,borderTopRightRadius:Jz,borderBottomRightRadius:Jz,borderBottomLeftRadius:Jz,width:Jz,maxWidth:Jz,height:Jz,maxHeight:Jz,top:Jz,right:Jz,bottom:Jz,left:Jz,padding:Jz,paddingTop:Jz,paddingRight:Jz,paddingBottom:Jz,paddingLeft:Jz,margin:Jz,marginTop:Jz,marginRight:Jz,marginBottom:Jz,marginLeft:Jz,backgroundPositionX:Jz,backgroundPositionY:Jz},oH={rotate:Zz,rotateX:Zz,rotateY:Zz,rotateZ:Zz,scale:Yz,scaleX:Yz,scaleY:Yz,scaleZ:Yz,skew:Zz,skewX:Zz,skewY:Zz,distance:Jz,translateX:Jz,translateY:Jz,translateZ:Jz,x:Jz,y:Jz,z:Jz,perspective:Jz,transformPerspective:Jz,opacity:Wz,originX:nH,originY:nH,originZ:Jz},iH={...Kz,transform:Math.round},aH={...rH,...oH,zIndex:iH,size:Jz,fillOpacity:Wz,strokeOpacity:Wz,numOctaves:iH},sH={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lH=Vz.length;function cH(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const e=t[l];if(Bz.has(l))a=!0;else if(Dz(l))o[l]=e;else{const t=qz(e,aH[l]);l.startsWith("origin")?(s=!0,i[l]=t):r[l]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<lH;i++){const a=Vz[i],s=e[a];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=qz(s,aH[a]);l||(o=!1,r+=`${sH[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}const uH=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dH(e,t,n){for(const r in t)Hz(t[r])||zz(r,n)||(e[r]=t[r])}function pH(e,t){const r={};return dH(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t){return n.useMemo((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return cH(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),r}function fH(e,t){const n={},r=pH(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const hH=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function mH(e){return"string"==typeof e&&!e.includes("-")&&!!(hH.indexOf(e)>-1||/[A-Z]/u.test(e))}const gH={offset:"stroke-dashoffset",array:"stroke-dasharray"},vH={offset:"strokeDashoffset",array:"strokeDasharray"};function yH(e,t,n){return"string"==typeof e?e:Jz.transform(t+n*e)}function bH(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(cH(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:h}=e;p.transform&&(h&&(f.transform=p.transform),delete p.transform),h&&(void 0!==o||void 0!==i||f.transform)&&(f.transformOrigin=function(e,t,n){return`${yH(t,e.x,e.width)} ${yH(n,e.y,e.height)}`}(h,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(p.x=t),void 0!==n&&(p.y=n),void 0!==r&&(p.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?gH:vH;e[i.offset]=Jz.transform(-r);const a=Jz.transform(t),s=Jz.transform(n);e[i.array]=`${a} ${s}`}(p,a,s,l,!1)}const xH=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),wH=e=>"string"==typeof e&&"svg"===e.toLowerCase();function _H(e,t,r,o){const i=n.useMemo((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return bH(n,t,wH(o),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};dH(t,e.style,e),i.style={...t,...i.style}}return i}function SH(e=!1){return(t,r,o,{latestValues:i},a)=>{const s=(mH(t)?_H:fH)(r,i,a,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(uz(o)||!0===n&&cz(o)||!t&&!cz(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof t,e),c=t!==n.Fragment?{...l,...s,ref:o}:{},{children:u}=r,d=n.useMemo((()=>Hz(u)?u.get():u),[u]);return n.createElement(t,{...c,children:d})}}function EH(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function TH(e,t,n,r){if("function"==typeof t){const[o,i]=EH(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=EH(r);t=t(void 0!==n?n:e.custom,o,i)}return t}const CH=e=>Array.isArray(e);function AH(e){const t=Hz(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const NH=e=>(t,r)=>{const o=n.useContext(mz),i=n.useContext(kB),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:RH(r,o,i,e),renderState:t()};return n&&(a.onMount=e=>n({props:r,current:e,...a}),a.onUpdate=e=>n(e)),a}(e,t,o,i);return r?a():PB(a)};function RH(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=AH(i[p]);let{initial:a,animate:s}=e;const l=xz(e),c=wz(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!gz(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=TH(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(o[r]=e)}for(const r in e)o[r]=e[r]}}}return o}function OH(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Hz(o[a])||t.style&&Hz(t.style[a])||zz(a,e)||void 0!==(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return i}const PH={useVisualState:NH({scrapeMotionValuesFromProps:OH,createRenderState:uH})};function kH(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(JSe){t.dimensions={x:0,y:0,width:0,height:0}}}function MH(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const jH=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function LH(e,t,n,r){MH(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(jH.has(o)?o:Az(o),t.attrs[o])}function DH(e,t,n){const r=OH(e,t,n);for(const o in e)if(Hz(e[o])||Hz(t[o])){r[-1!==Vz.indexOf(o)?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o]=e[o]}return r}const IH=["x","y","width","height","cx","cy","r"],FH={useVisualState:NH({scrapeMotionValuesFromProps:DH,createRenderState:xH,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i)for(const s in o)if(Bz.has(s)){i=!0;break}if(!i)return;let a=!t;if(t)for(let s=0;s<IH.length;s++){const n=IH[s];e[n]!==t[n]&&(a=!0)}a&&tz.read((()=>{kH(n,r),tz.render((()=>{bH(r,o,wH(n.tagName),e.transformTemplate),LH(n,r)}))}))}})};function UH(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Mz({...mH(n)?FH:PH,preloadedFeatures:e,useRender:SH(r),createVisualElement:t,Component:n})}}function $H(e,t,n){const r=e.getProps();return TH(r,t,void 0!==n?n:r.custom,e)}const VH=KB((()=>void 0!==window.ScrollTimeline));class BH{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map((e=>"finished"in e?e.finished:e)))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>VH()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class zH extends BH{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function HH(e,t){return e?e[t]||e.default||e:void 0}const qH=2e4;function GH(e){let t=0;let n=e.next(t);for(;!n.done&&t<qH;)t+=50,n=e.next(t);return t>=qH?1/0:t}function KH(e){return"function"==typeof e}function WH(e,t){e.timeline=t,e.onfinish=null}const YH=e=>Array.isArray(e)&&"number"==typeof e[0],XH={linearEasing:void 0};function ZH(e,t){const n=KB(e);return()=>{var e;return null!==(e=XH[t])&&void 0!==e?e:n()}}const QH=ZH((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(JSe){return!1}return!0}),"linearEasing"),JH=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(WB(0,o-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function eq(e){return Boolean("function"==typeof e&&QH()||!e||"string"==typeof e&&(e in nq||QH())||YH(e)||Array.isArray(e)&&e.every(eq))}const tq=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,nq={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tq([0,.65,.55,1]),circOut:tq([.55,0,1,.45]),backIn:tq([.31,.01,.66,-.59]),backOut:tq([.33,1.53,.69,.99])};function rq(e,t){return e?"function"==typeof e&&QH()?JH(e,t):YH(e)?tq(e):Array.isArray(e)?e.map((e=>rq(e,t)||nq.easeOut)):nq[e]:void 0}const oq={x:!1,y:!1};function iq(){return oq.x||oq.y}function aq(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){const t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function sq(e){return!("touch"===e.pointerType||iq())}const lq=(e,t)=>!!t&&(e===t||lq(e,t.parentElement)),cq=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,uq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const dq=new WeakSet;function pq(e){return t=>{"Enter"===t.key&&e(t)}}function fq(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function hq(e){return cq(e)&&!iq()}function mq(e,t,n={}){const[r,o,i]=aq(e,n),a=e=>{const r=e.currentTarget;if(!hq(e)||dq.has(r))return;dq.add(r);const i=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),hq(e)&&dq.has(r)&&(dq.delete(r),"function"==typeof i&&i(e,{success:t}))},s=e=>{a(e,n.useGlobalTarget||lq(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach((e=>{(function(e){return uq.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0);(n.useGlobalTarget?window:e).addEventListener("pointerdown",a,o),e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=pq((()=>{if(dq.has(n))return;fq(n,"down");const e=pq((()=>{fq(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>fq(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,o)),o)})),i}const gq=new Set(["width","height","top","left","right","bottom",...Vz]);let vq;function yq(){vq=void 0}const bq={now:()=>(void 0===vq&&bq.set(rz.isProcessing||ZB?rz.timestamp:performance.now()),vq),set:e=>{vq=e,queueMicrotask(yq)}};function xq(e,t){-1===e.indexOf(t)&&e.push(t)}function wq(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _q{constructor(){this.subscriptions=[]}add(e){return xq(this.subscriptions,e),()=>wq(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Sq(e,t){return t?e*(1e3/t):0}class Eq{constructor(e,t={}){this.version="12.4.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=bq.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=bq.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&fz(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new _q);const n=this.events[e].add(t);return"change"===e?()=>{n(),tz.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=bq.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Sq(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Tq(e,t){return new Eq(e,t)}function Cq(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Tq(n))}function Aq(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Hz(r)&&r.add))return n.add(t);var r}function Nq(e){return e.props[Nz]}const Rq=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Oq(e,t,n,r){if(e===t&&n===r)return HB;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Rq(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n);return e=>0===e||1===e?e:Rq(o(e),t,r)}const Pq=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kq=e=>t=>1-e(1-t),Mq=Oq(.33,1.53,.69,.99),jq=kq(Mq),Lq=Pq(jq),Dq=e=>(e*=2)<1?.5*jq(e):.5*(2-Math.pow(2,-10*(e-1))),Iq=e=>1-Math.sin(Math.acos(e)),Fq=kq(Iq),Uq=Pq(Iq),$q=e=>/^0[^.\s]+$/u.test(e);const Vq=e=>Math.round(1e5*e)/1e5,Bq=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const zq=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hq=(e,t)=>n=>Boolean("string"==typeof n&&zq.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),qq=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(Bq);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Gq={...Kz,transform:e=>Math.round((e=>Gz(0,255,e))(e))},Kq={test:Hq("rgb","red"),parse:qq("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Gq.transform(e)+", "+Gq.transform(t)+", "+Gq.transform(n)+", "+Vq(Wz.transform(r))+")"};const Wq={test:Hq("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Kq.transform},Yq={test:Hq("hsl","hue"),parse:qq("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qz.transform(Vq(t))+", "+Qz.transform(Vq(n))+", "+Vq(Wz.transform(r))+")"},Xq={test:e=>Kq.test(e)||Wq.test(e)||Yq.test(e),parse:e=>Kq.test(e)?Kq.parse(e):Yq.test(e)?Yq.parse(e):Wq.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Kq.transform(e):Yq.transform(e)},Zq=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Qq="number",Jq="color",eG=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function tG(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(eG,(e=>(Xq.test(e)?(r.color.push(i),o.push(Jq),n.push(Xq.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Qq),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:a,indexes:r,types:o}}function nG(e){return tG(e).values}function rG(e){const{split:t,types:n}=tG(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Qq?Vq(e[i]):t===Jq?Xq.transform(e[i]):e[i]}return o}}const oG=e=>"number"==typeof e?0:e;const iG={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(Bq))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Zq))||void 0===n?void 0:n.length)||0)>0},parse:nG,createTransformer:rG,getAnimatableNone:function(e){const t=nG(e);return rG(e)(t.map(oG))}},aG=new Set(["brightness","contrast","saturate","opacity"]);function sG(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Bq)||[];if(!r)return e;const o=n.replace(r,"");let i=aG.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const lG=/\b([a-z-]*)\(.*?\)/gu,cG={...iG,getAnimatableNone:e=>{const t=e.match(lG);return t?t.map(sG).join(" "):e}},uG={...aH,color:Xq,backgroundColor:Xq,outlineColor:Xq,fill:Xq,stroke:Xq,borderColor:Xq,borderTopColor:Xq,borderRightColor:Xq,borderBottomColor:Xq,borderLeftColor:Xq,filter:cG,WebkitFilter:cG},dG=e=>uG[e];function pG(e,t){let n=dG(e);return n!==cG&&(n=iG),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fG=new Set(["auto","none","0"]);const hG=e=>e===Kz||e===Jz,mG=(e,t)=>parseFloat(e.split(", ")[t]),gG=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return mG(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?mG(t[1],e):0}},vG=new Set(["x","y","z"]),yG=Vz.filter((e=>!vG.has(e)));const bG={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:gG(4,13),y:gG(5,14)};bG.translateX=bG.x,bG.translateY=bG.y;const xG=new Set;let wG=!1,_G=!1;function SG(){if(_G){const e=Array.from(xG).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return yG.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}_G=!1,wG=!1,xG.forEach((e=>e.complete())),xG.clear()}function EG(){xG.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(_G=!0)}))}class TG{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(xG.add(this),wG||(wG=!0,tz.read(EG),tz.resolveKeyframes(SG))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),xG.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,xG.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const CG=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),AG=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function NG(e,t,n=1){GB(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=AG.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return CG(e)?parseFloat(e):e}return Fz(o)?NG(o,t,n+1):o}const RG=e=>t=>t.test(e),OG=[Kz,Jz,Qz,Zz,tH,eH,{test:e=>"auto"===e,parse:e=>e}],PG=e=>OG.find(RG(e));class kG extends TG{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),Fz(n))){const r=NG(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!gq.has(n)||2!==e.length)return;const[r,o]=e,i=PG(r),a=PG(o);if(i!==a)if(hG(i)&&hG(a))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let o=0;o<e.length;o++)("number"==typeof(r=e[o])?0===r:null===r||"none"===r||"0"===r||$q(r))&&n.push(o);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!fG.has(t)&&tG(t).values.length&&(r=e[o]),o++}if(r&&n)for(const i of t)e[i]=pG(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=bG[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=bG[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const MG=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!iG.test(e)&&"0"!==e||e.startsWith("url(")));const jG=e=>null!==e;function LG(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(jG),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class DG{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=bq.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(EG(),SG()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=bq.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:a,onUpdate:s,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=MG(o,t),s=MG(i,t);return qB(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||KH(n))&&r)}(e,n,r,o)){if(!i)return s&&s(LG(e,this.options,t)),a&&a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}const IG=(e,t,n)=>e+(t-e)*n;function FG(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function UG(e,t){return n=>n>0?t:e}const $G=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},VG=[Wq,Kq,Yq];function BG(e){const t=(n=e,VG.find((e=>e.test(n))));var n;if(qB(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===Yq&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=FG(s,r,e+1/3),i=FG(s,r,e),a=FG(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(r)),r}const zG=(e,t)=>{const n=BG(e),r=BG(t);if(!n||!r)return UG(e,t);const o={...n};return e=>(o.red=$G(n.red,r.red,e),o.green=$G(n.green,r.green,e),o.blue=$G(n.blue,r.blue,e),o.alpha=IG(n.alpha,r.alpha,e),Kq.transform(o))},HG=(e,t)=>n=>t(e(n)),qG=(...e)=>e.reduce(HG),GG=new Set(["none","hidden"]);function KG(e,t){return n=>IG(e,t,n)}function WG(e){return"number"==typeof e?KG:"string"==typeof e?Fz(e)?UG:Xq.test(e)?zG:ZG:Array.isArray(e)?YG:"object"==typeof e?Xq.test(e)?zG:XG:UG}function YG(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>WG(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function XG(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=WG(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const ZG=(e,t)=>{const n=iG.createTransformer(t),r=tG(e),o=tG(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?GG.has(e)&&!o.values.length||GG.has(t)&&!r.values.length?function(e,t){return GG.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):qG(YG(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=null!==(n=e.values[e.indexes[a][o[a]]])&&void 0!==n?n:0;r[i]=s,o[a]++}return r}(r,o),o.values),n):(qB(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),UG(e,t))};function QG(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return IG(e,t,n);return WG(e)(e,t)}function JG(e,t,n){const r=Math.max(t-5,0);return Sq(n-e(r),t-r)}const eK=100,tK=10,nK=1,rK=0,oK=800,iK=.3,aK=.3,sK={granular:.01,default:2},lK={granular:.005,default:.5},cK=.01,uK=10,dK=.05,pK=1;function fK({duration:e=oK,bounce:t=iK,velocity:n=rK,mass:r=nK}){let o,i;qB(e<=YB(uK),"Spring duration must be 10 seconds or less");let a=1-t;a=Gz(dK,pK,a),e=Gz(cK,uK,XB(e)),a<1?(o=t=>{const r=t*a,o=r*e;return.001-(r-n)/mK(t,a)*Math.exp(-o)},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=mK(Math.pow(t,2),a);return(.001-o(t)>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let o=1;o<hK;o++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=YB(e),isNaN(s))return{stiffness:eK,damping:tK,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}const hK=12;function mK(e,t){return e*Math.sqrt(1-t*t)}const gK=["duration","bounce"],vK=["stiffness","damping","mass"];function yK(e,t){return t.some((t=>void 0!==e[t]))}function bK(e=aK,t=iK){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:f}=function(e){let t={velocity:rK,stiffness:eK,damping:tK,mass:nK,isResolvedFromDuration:!1,...e};if(!yK(e,vK)&&yK(e,gK))if(e.visualDuration){const n=2*Math.PI/(1.2*e.visualDuration),r=n*n,o=2*Gz(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:nK,stiffness:r,damping:o}}else{const n=fK(e);t={...t,...n,mass:nK},t.isResolvedFromDuration=!0}return t}({...n,velocity:-XB(n.velocity||0)}),h=p||0,m=c/(2*Math.sqrt(l*u)),g=a-i,v=XB(Math.sqrt(l/u)),y=Math.abs(g)<5;let b;if(r||(r=y?sK.granular:sK.default),o||(o=y?lK.granular:lK.default),m<1){const e=mK(v,m);b=t=>{const n=Math.exp(-m*v*t);return a-n*((h+m*v*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)b=e=>a-Math.exp(-v*e)*(g+(h+v*g)*e);else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return a-n*((h+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const x={calculatedDuration:f&&d||null,next:e=>{const t=b(e);if(f)s.done=e>=d;else{let n=0;m<1&&(n=0===e?YB(h):JG(b,e,t));const i=Math.abs(n)<=r,l=Math.abs(a-t)<=o;s.done=i&&l}return s.value=s.done?a:t,s},toString:()=>{const e=Math.min(GH(x),qH),t=JH((t=>x.next(e*t).value),e,30);return e+"ms "+t}};return x}function xK({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,g=void 0===a?m:a(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);p.done=Math.abs(t)<=c,p.value=p.done?g:n};let x,w;const _=e=>{var t;(t=p.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=bK({keyframes:[p.value,f(p.value)],velocity:JG(y,e,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),_(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),p)}}}const wK=Oq(.42,0,1,1),_K=Oq(0,0,.58,1),SK=Oq(.42,0,.58,1),EK={linear:HB,easeIn:wK,easeInOut:SK,easeOut:_K,circIn:Iq,circInOut:Uq,circOut:Fq,backIn:jq,backInOut:Lq,backOut:Mq,anticipate:Dq},TK=e=>{if(YH(e)){GB(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Oq(t,n,r,o)}return"string"==typeof e?(GB(void 0!==EK[e],`Invalid easing type '${e}'`),EK[e]):e};function CK(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(GB(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||QG,i=e.length-1;for(let a=0;a<i;a++){let n=o(e[a],e[a+1]);if(t){const e=Array.isArray(t)?t[a]||HB:t;n=qG(e,n)}r.push(n)}return r}(t,r,o),l=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);return s[r](WB(e[r],e[r+1],n))};return n?t=>c(Gz(e[0],e[i-1],t)):c}function AK(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++)e.push(IG(n,1,WB(0,t,r)))}(t,e.length-1),t}function NK({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(TK):TK(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:AK(t),e),s=CK(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||SK)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const RK=e=>{const t=({timestamp:t})=>e(t);return{start:()=>tz.update(t,!0),stop:()=>nz(t),now:()=>rz.isProcessing?rz.timestamp:bq.now()}},OK={decay:xK,inertia:xK,tween:NK,keyframes:NK,spring:bK},PK=e=>e/100;class kK extends DG{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new((null==r?void 0:r.KeyframeResolver)||TG)(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=KH(t)?t:OK[t]||NK;let s,l;a!==NK&&"number"!=typeof e[0]&&("production"!==process.env.NODE_ENV&&GB(2===e.length,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),s=qG(PK,QG(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});"mirror"===o&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=GH(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:p,repeatType:f,repeatDelay:h,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),this.currentTime=t?e:null!==this.holdTime?this.holdTime:Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,b=o;if(p){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,p+1);Boolean(t%2)&&("reverse"===f?(n=1-n,h&&(n-=h/u)):"mirror"===f&&(b=i)),y=Gz(0,1,n)*u}const x=v?{done:!1,value:s[0]}:b.next(y);a&&(x.value=a(x.value));let{done:w}=x;v||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return _&&void 0!==r&&(x.value=LG(s,this.options,r)),m&&m(x.value),_&&this.finish(),x}get duration(){const{resolved:e}=this;return e?XB(e.calculatedDuration):0}get time(){return XB(this.currentTime)}set time(e){this.currentTime=e=YB(e),null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=XB(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=RK,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const MK=new Set(["opacity","clipPath","filter","transform"]);function jK(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=rq(s,o);Array.isArray(u)&&(c.easing=u);return e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}const LK=KB((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const DK={anticipate:Dq,backInOut:Lq,circInOut:Uq};class IK extends DG{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new kG(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:i,motionValue:a,name:s,startTime:l}=this.options;if(!a.owner||!a.owner.current)return!1;var c;if("string"==typeof o&&QH()&&o in DK&&(o=DK[o]),KH((c=this.options).type)||"spring"===c.type||!eq(c.ease)){const{onComplete:t,onUpdate:a,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new kK({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,r=u.times,o=u.ease,i="keyframes"}const u=jK(a.owner.current,s,e,{...this.options,duration:n,times:r,ease:o});return u.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(WH(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(LG(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:r,type:i,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return XB(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return XB(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=YB(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return HB;const{animation:n}=t;WH(n,e)}else this.pendingTimeline=e;return HB}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,u=new kK({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),d=YB(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return LK()&&n&&MK.has(n)&&!s&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const FK={type:"spring",stiffness:500,damping:25,restSpeed:10},UK={type:"keyframes",duration:.8},$K={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},VK=(e,{keyframes:t})=>t.length>2?UK:Bz.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:FK:$K;const BK=(e,t,n,r={},o,i)=>a=>{const s=HH(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=YB(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||(u={...u,...VK(e,u)}),u.duration&&(u.duration=YB(u.duration)),u.repeatDelay&&(u.repeatDelay=YB(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!i&&void 0!==t.get()){const e=LG(u.keyframes,s);if(void 0!==e)return tz.update((()=>{u.onUpdate(e),u.onComplete()})),new zH([])}return!i&&IK.supports(u)?new IK(u):new kK(u)};function zK({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function HK(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const t=e.getValue(d,null!==(i=e.latestValues[d])&&void 0!==i?i:null),r=l[d];if(void 0===r||u&&zK(u,d))continue;const o={delay:n,...HH(a||{},d)};let s=!1;if(window.MotionHandoffAnimation){const t=Nq(e);if(t){const e=window.MotionHandoffAnimation(t,d,tz);null!==e&&(o.startTime=e,s=!0)}}Aq(e,d),t.start(BK(d,t,r,e.shouldReduceMotion&&gq.has(d)?{type:!1}:o,e,s));const p=t.animation;p&&c.push(p)}return s&&Promise.all(c).then((()=>{tz.update((()=>{s&&function(e,t){const n=$H(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i)Cq(e,s,CH(a=i[s])?a[a.length-1]||0:a);var a}(e,s)}))})),c}function qK(e,t,n={}){var r;const o=$H(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(HK(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(GK).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(qK(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then((()=>t()))}return Promise.all([a(),s(n.delay)])}function GK(e,t){return e.sortNodePosition(t)}function KK(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const WK=bz.length;function YK(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&YK(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<WK;n++){const r=bz[n],o=e.props[r];(vz(o)||!1===o)&&(t[r]=o)}return t}const XK=[...yz].reverse(),ZK=yz.length;function QK(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>qK(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=qK(e,t,n);else{const o="function"==typeof t?$H(e,t,n.custom):t;r=Promise.all(HK(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function JK(e){let t=QK(e),n=nW(),r=!0;const o=t=>(n,r)=>{var o;const i=$H(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:a}=e,s=YK(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<ZK;t++){const p=XK[t],f=n[p],h=void 0!==a[p]?a[p]:s[p],m=vz(h),g=p===i?f.isActive:null;!1===g&&(d=t);let v=h===s[p]&&h!==a[p]&&m;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...u},!f.isActive&&null===g||!h&&!f.prevProp||gz(h)||"boolean"==typeof h)continue;const y=eW(f.prevProp,h);let b=y||p===i&&f.isActive&&!v&&m||t>d&&m,x=!1;const w=Array.isArray(h)?h:[h];let _=w.reduce(o(p),{});!1===g&&(_={});const{prevResolvedValues:S={}}=f,E={...S,..._},T=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),f.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in E){const t=_[e],n=S[e];if(u.hasOwnProperty(e))continue;let r=!1;r=CH(t)&&CH(n)?!KK(t,n):t!==n,r?null!=t?T(e):c.add(e):void 0!==t&&c.has(e)?T(e):f.protectedKeys[e]=!0}f.prevProp=h,f.prevResolvedValues=_,f.isActive&&(u={...u,..._}),r&&e.blockInitialAnimation&&(b=!1);b&&(!(v&&y)||x)&&l.push(...w.map((e=>({animation:e,options:{type:p}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let p=Boolean(l.length);return!r||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=nW(),r=!0}}}function eW(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!KK(t,e)}function tW(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nW(){return{animate:tW(!0),whileInView:tW(),whileHover:tW(),whileTap:tW(),whileDrag:tW(),whileFocus:tW(),exit:tW()}}class rW{constructor(e){this.isMounted=!1,this.node=e}update(){}}let oW=0;const iW={animation:{Feature:class extends rW{constructor(e){super(e),e.animationState||(e.animationState=JK(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();gz(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends rW{constructor(){super(...arguments),this.id=oW++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>{t(this.id)}))}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function aW(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function sW(e){return{point:{x:e.pageX,y:e.pageY}}}function lW(e,t,n,r){return aW(e,t,(e=>t=>cq(t)&&e(t,sW(t)))(n),r)}const cW=(e,t)=>Math.abs(e-t);class uW{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=fW(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=cW(e.x,t.x),r=cW(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=rz;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=dW(t,this.transformPagePoint),tz.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=fW("pointercancel"===e.type?this.lastMoveEventInfo:dW(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!cq(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=dW(sW(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=rz;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,fW(i,this.history)),this.removeListeners=qG(lW(this.contextWindow,"pointermove",this.handlePointerMove),lW(this.contextWindow,"pointerup",this.handlePointerUp),lW(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),nz(this.updatePoint)}}function dW(e,t){return t?{point:t(e.point)}:e}function pW(e,t){return{x:e.x-t.x,y:e.y-t.y}}function fW({point:e},t){return{point:e,delta:pW(e,mW(t)),offset:pW(e,hW(t)),velocity:gW(t,.1)}}function hW(e){return e[0]}function mW(e){return e[e.length-1]}function gW(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=mW(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>YB(t)));)n--;if(!r)return{x:0,y:0};const i=XB(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function vW(e){return e.max-e.min}function yW(e,t,n,r=.5){e.origin=r,e.originPoint=IG(t.min,t.max,e.origin),e.scale=vW(n)/vW(t),e.translate=IG(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function bW(e,t,n,r){yW(e.x,t.x,n.x,r?r.originX:void 0),yW(e.y,t.y,n.y,r?r.originY:void 0)}function xW(e,t,n){e.min=n.min+t.min,e.max=e.min+vW(t)}function wW(e,t,n){e.min=t.min-n.min,e.max=e.min+vW(t)}function _W(e,t,n){wW(e.x,t.x,n.x),wW(e.y,t.y,n.y)}function SW(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function EW(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const TW=.35;function CW(e,t,n){return{min:AW(e,t),max:AW(e,n)}}function AW(e,t){return"number"==typeof e?e:e[t]||0}const NW=()=>({x:{min:0,max:0},y:{min:0,max:0}});function RW(e){return[e("x"),e("y")]}function OW({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function PW(e){return void 0===e||1===e}function kW({scale:e,scaleX:t,scaleY:n}){return!PW(e)||!PW(t)||!PW(n)}function MW(e){return kW(e)||jW(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function jW(e){return LW(e.x)||LW(e.y)}function LW(e){return e&&"0%"!==e}function DW(e,t,n){return n+t*(e-n)}function IW(e,t,n,r,o){return void 0!==o&&(e=DW(e,o,r)),DW(e,n,r)+t}function FW(e,t=0,n=1,r,o){e.min=IW(e.min,t,n,r,o),e.max=IW(e.max,t,n,r,o)}function UW(e,{x:t,y:n}){FW(e.x,t.translate,t.scale,t.originPoint),FW(e.y,n.translate,n.scale,n.originPoint)}const $W=.999999999999,VW=1.0000000000001;function BW(e,t){e.min=e.min+t,e.max=e.max+t}function zW(e,t,n,r,o=.5){FW(e,t,n,IG(e.min,e.max,o),r)}function HW(e,t){zW(e.x,t.x,t.scaleX,t.scale,t.originX),zW(e.y,t.y,t.scaleY,t.scale,t.originY)}function qW(e,t){return OW(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const GW=({current:e})=>e?e.ownerDocument.defaultView:null,KW=new WeakMap;class WW{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new uW(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(sW(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?oq[i]?null:(oq[i]=!0,()=>{oq[i]=!1}):oq.x||oq.y?null:(oq.x=oq.y=!0,()=>{oq.x=oq.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),RW((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Qz.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=vW(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&tz.postRender((()=>o(e,t))),Aq(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>RW((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:GW(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&tz.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!YW(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?IG(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?IG(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&Tz(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:SW(e.x,n,o),y:SW(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=TW){return!1===e?e=0:!0===e&&(e=TW),{x:CW(e,"left","right"),y:CW(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&RW((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Tz(e))return!1;const n=e.current;GB(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=qW(e,n),{scroll:o}=t;return o&&(BW(r.x,o.offset.x),BW(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:EW(e.x,t.x),y:EW(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=OW(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=RW((a=>{if(!YW(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c={type:"inertia",velocity:n?e[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,c)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Aq(this.visualElement,e),n.start(BK(e,n,0,t,this.visualElement,!1))}stopAnimation(){RW((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){RW((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){RW((t=>{const{drag:n}=this.getProps();if(!YW(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-IG(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Tz(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};RW((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=vW(e),o=vW(t);return o>r?n=WB(t.min,t.max-r,e.min):r>o&&(n=WB(e.min,e.max-o,t.min)),Gz(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),RW((t=>{if(!YW(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(IG(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;KW.set(this.visualElement,this);const e=lW(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Tz(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),tz.read(t);const o=aW(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(RW((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=TW,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function YW(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const XW=e=>(t,n)=>{e&&tz.postRender((()=>e(t,n)))};const ZW={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function QW(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const JW={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Jz.test(e))return e;e=parseFloat(e)}return`${QW(e,t.target.x)}% ${QW(e,t.target.y)}%`}},eY={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=iG.parse(e);if(o.length>5)return r;const i=iG.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=IG(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}};class tY extends n.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;!function(e){for(const t in e)$z[t]=e[t],Dz(t)&&($z[t].isCSSVariable=!0)}(rY),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ZW.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||tz.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Rz.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function nY(e){const[r,o]=FB(),i=n.useContext(OB);return t.jsx(tY,{...e,layoutGroup:i,switchLayoutGroup:n.useContext(Oz),isPresent:r,safeToRemove:o})}const rY={borderRadius:{...JW,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:JW,borderTopRightRadius:JW,borderBottomLeftRadius:JW,borderBottomRightRadius:JW,boxShadow:eY};const oY=(e,t)=>e.depth-t.depth;class iY{constructor(){this.children=[],this.isDirty=!1}add(e){xq(this.children,e),this.isDirty=!0}remove(e){wq(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(oY),this.isDirty=!1,this.children.forEach(e)}}const aY=["TopLeft","TopRight","BottomLeft","BottomRight"],sY=aY.length,lY=e=>"string"==typeof e?parseFloat(e):e,cY=e=>"number"==typeof e||Jz.test(e);function uY(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const dY=fY(0,.5,Fq),pY=fY(.5,.95,HB);function fY(e,t,n){return r=>r<e?0:r>t?1:n(WB(e,t,r))}function hY(e,t){e.min=t.min,e.max=t.max}function mY(e,t){hY(e.x,t.x),hY(e.y,t.y)}function gY(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function vY(e,t,n,r,o){return e=DW(e-=t,1/n,r),void 0!==o&&(e=DW(e,1/o,r)),e}function yY(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){Qz.test(t)&&(t=parseFloat(t),t=IG(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=IG(i.min,i.max,r);e===i&&(s-=t),e.min=vY(e.min,t,n,s,o),e.max=vY(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const bY=["x","scaleX","originX"],xY=["y","scaleY","originY"];function wY(e,t,n,r){yY(e.x,t,bY,n?n.x:void 0,r?r.x:void 0),yY(e.y,t,xY,n?n.y:void 0,r?r.y:void 0)}function _Y(e){return 0===e.translate&&1===e.scale}function SY(e){return _Y(e.x)&&_Y(e.y)}function EY(e,t){return e.min===t.min&&e.max===t.max}function TY(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function CY(e,t){return TY(e.x,t.x)&&TY(e.y,t.y)}function AY(e){return vW(e.x)/vW(e.y)}function NY(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class RY{constructor(){this.members=[]}add(e){xq(this.members,e),e.scheduleRender()}remove(e){if(wq(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const OY=["","X","Y","Z"],PY={visibility:"hidden"};let kY=0;function MY(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function jY(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Nq(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tz,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&jY(r)}function LY({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=kY++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(FY),this.nodes.forEach(qY),this.nodes.forEach(GY),this.nodes.forEach(UY)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new iY)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new _q),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=bq.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(nz(r),e(i-t))};return tz.read(r,!0),()=>nz(r)}(r,250),ZW.hasAnimatedSinceResize&&(ZW.hasAnimatedSinceResize=!1,this.nodes.forEach(HY))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||QY,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!CY(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...HH(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||HY(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,nz(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(KY),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jY(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const e=this.path[o];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(VY);this.isUpdating||this.nodes.forEach(BY),this.isUpdating=!1,this.nodes.forEach(zY),this.nodes.forEach(DY),this.nodes.forEach(IY),this.clearAllSnapshots();const e=bq.now();rz.delta=Gz(0,1e3/60,e-rz.timestamp),rz.timestamp=e,rz.isProcessing=!0,oz.update.process(rz),oz.preRender.process(rz),oz.render.process(rz),rz.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Rz.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($Y),this.sharedNodes.forEach(WY)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tz.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tz.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||vW(this.snapshot.measuredBox.x)||vW(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!SY(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||MW(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),tX((r=n).x),tX(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(rX))){const{scroll:e}=this.root;e&&(BW(n.x,e.offset.x),BW(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(mY(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:o,options:i}=t;t!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&mY(n,e),BW(n.x,o.offset.x),BW(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};mY(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&HW(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),MW(e.latestValues)&&HW(n,e.latestValues)}return MW(this.latestValues)&&HW(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};mY(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!MW(e.latestValues))continue;kW(e.latestValues)&&e.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};mY(r,e.measurePageBox()),wY(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return MW(this.latestValues)&&wY(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==rz.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=rz.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},_W(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),mY(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var a,s,l;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xW((a=this.target).x,(s=this.relativeTarget).x,(l=this.relativeParent.target).x),xW(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):mY(this.target,this.layout.layoutBox),UW(this.target,this.targetDelta)):mY(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},_W(this.relativeTargetOrigin,this.target,e.target),mY(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!kW(this.parent.latestValues)&&!jW(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===rz.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;mY(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&HW(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,UW(e,a)),r&&MW(i.latestValues)&&HW(e,i.latestValues))}t.x<VW&&t.x>$W&&(t.x=1),t.y<VW&&t.y>$W&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(gY(this.prevProjectionDelta.x,this.projectionDelta.x),gY(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),bW(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&NY(this.projectionDelta.x,this.prevProjectionDelta.x)&&NY(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(ZY));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,p,f,h,m,g;YY(i.x,e.x,n),YY(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_W(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),XY((f=this.relativeTarget).x,(h=this.relativeTargetOrigin).x,(m=a).x,g=n),XY(f.y,h.y,m.y,g),d&&(EY((l=this.relativeTarget).x,(p=d).x)&&EY(l.y,p.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),mY(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=IG(0,void 0!==n.opacity?n.opacity:1,dY(r)),e.opacityExit=IG(void 0!==t.opacity?t.opacity:1,0,pY(r))):i&&(e.opacity=IG(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let a=0;a<sY;a++){const o=`border${aY[a]}Radius`;let i=uY(t,o),s=uY(n,o);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||cY(i)===cY(s)?(e[o]=Math.max(IG(lY(i),lY(s),r),0),(Qz.test(s)||Qz.test(i))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=IG(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(nz(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tz.update((()=>{ZW.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Hz(e)?e:Tq(e);return r.start(BK("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&nX(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=vW(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=vW(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}mY(t,n),HW(t,o),bW(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new RY);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&MY("z",e,r,this.animationValues);for(let o=0;o<OY.length;o++)MY(`rotate${OY[o]}`,e,r,this.animationValues),MY(`skew${OY[o]}`,e,r,this.animationValues);e.render();for(const o in r)e.setStaticValue(o,r[o]),this.animationValues&&(this.animationValues[o]=r[o]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return PY;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=AH(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=AH(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!MW(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,r.opacity=i.animationValues?i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const c in $z){if(void 0===a[c])continue;const{correct:e,applyTo:t,isCSSVariable:n}=$z[c],o="none"===r.transform?a[c]:e(a[c],i);if(t){const e=t.length;for(let n=0;n<e;n++)r[t[n]]=o}else n?this.options.visualElement.renderState.vars[c]=o:r[c]=o}return this.options.layoutId&&(r.pointerEvents=i===this?AH(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(VY),this.root.sharedNodes.clear()}}}function DY(e){e.updateLayout()}function IY(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?RW((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=vW(r);r.min=t[e].min,r.max=r.min+o})):nX(o,n.layoutBox,t)&&RW((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=vW(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};bW(a,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?bW(s,e.applyTransform(r,!0),n.measuredBox):bW(s,t,n.layoutBox);const l=!SY(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};_W(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};_W(s,t,i.layoutBox),CY(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function FY(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function UY(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $Y(e){e.clearSnapshot()}function VY(e){e.clearMeasurements()}function BY(e){e.isLayoutDirty=!1}function zY(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function HY(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qY(e){e.resolveTargetDelta()}function GY(e){e.calcProjection()}function KY(e){e.resetSkewAndRotation()}function WY(e){e.removeLeadSnapshot()}function YY(e,t,n){e.translate=IG(t.translate,0,n),e.scale=IG(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function XY(e,t,n,r){e.min=IG(t.min,n.min,r),e.max=IG(t.max,n.max,r)}function ZY(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const QY={duration:.45,ease:[.4,0,.1,1]},JY=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),eX=JY("applewebkit/")&&!JY("chrome/")?Math.round:HB;function tX(e){e.min=eX(e.min),e.max=eX(e.max)}function nX(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=AY(t),o=AY(n),i=.2,!(Math.abs(r-o)<=i));var r,o,i}function rX(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const oX=LY({attachResizeListener:(e,t)=>aW(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),iX={current:void 0},aX=LY({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!iX.current){const e=new oX({});e.mount(window),e.setOptions({layoutScroll:!0}),iX.current=e}return iX.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),sX={pan:{Feature:class extends rW{constructor(){super(...arguments),this.removePointerDownListener=HB}onPointerDown(e){this.session=new uW(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:GW(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:XW(e),onStart:XW(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&tz.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=lW(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends rW{constructor(e){super(e),this.removeGroupControls=HB,this.removeListeners=HB,this.controls=new WW(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||HB}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:aX,MeasureLayout:nY}};function lX(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&tz.postRender((()=>o(t,sW(t))))}function cX(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&tz.postRender((()=>o(t,sW(t))))}const uX=new WeakMap,dX=new WeakMap,pX=e=>{const t=uX.get(e.target);t&&t(e)},fX=e=>{e.forEach(pX)};function hX(e,t,n){const r=function({root:e,...t}){const n=e||document;dX.has(n)||dX.set(n,{});const r=dX.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(fX,{root:e,...t})),r[o]}(t);return uX.set(e,n),r.observe(e),()=>{uX.delete(e),r.unobserve(e)}}const mX={some:0,all:1};const gX={inView:{Feature:class extends rW{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e;return hX(this.node.current,{root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:mX[r]},(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends rW{mount(){const{current:e}=this.node;e&&(this.unmount=mq(e,((e,t)=>(cX(this.node,t,"Start"),(e,{success:t})=>cX(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends rW{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(JSe){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=qG(aW(this.node.current,"focus",(()=>this.onFocus())),aW(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends rW{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=aq(e,n),a=e=>{if(!sq(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const i=e=>{sq(e)&&(r(e),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,o)};return r.forEach((e=>{e.addEventListener("pointerenter",a,o)})),i}(e,((e,t)=>(lX(this.node,t,"Start"),e=>lX(this.node,e,"End")))))}unmount(){}}}},vX={layout:{ProjectionNode:aX,MeasureLayout:nY}},yX={current:null},bX={current:!1};const xX=[...OG,Xq,iG],wX=new WeakMap;const _X=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class SX{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=TG,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=bq.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,tz.render(this.render,!1,!0))};const{latestValues:s,renderState:l,onUpdate:c}=i;this.onUpdate=c,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=xz(t),this.isVariantNode=wz(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const p in d){const e=d[p];void 0!==s[p]&&Hz(e)&&e.set(s[p],!1)}}mount(e){this.current=e,wX.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),bX.current||function(){if(bX.current=!0,VB)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yX.current=e.matches;e.addListener(t),t()}else yX.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||yX.current),"production"!==process.env.NODE_ENV&&fz(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),nz(this.notifyUpdate),nz(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Bz.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&tz.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),o(),i&&i(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in sz){const t=sz[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<_X.length;n++){const t=_X[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Hz(o))e.addValue(r,o),"development"===process.env.NODE_ENV&&fz("12.4.0"===o.version,`Attempting to mix Motion versions ${o.version} with 12.4.0 may not work as expected.`);else if(Hz(i))e.addValue(r,Tq(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,Tq(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Tq(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(CG(r)||$q(r))?r=parseFloat(r):!xX.find(RG(r))&&iG.test(t)&&(r=pG(e,t)),this.setBaseTarget(e,Hz(r)?r.get():r)),Hz(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=TH(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Hz(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new _q),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class EX extends SX{constructor(){super(...arguments),this.KeyframeResolver=kG}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Hz(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class TX extends EX{constructor(){super(...arguments),this.type="html",this.renderInstance=MH}readValueFromInstance(e,t){if(Bz.has(t)){const e=dG(t);return e&&e.default||0}{const n=window.getComputedStyle(e),r=(Dz(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return qW(e,t)}build(e,t,n){cH(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return OH(e,t,n)}}class CX extends EX{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=NW,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&kH(this.current,this.renderState)}}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Bz.has(t)){const e=dG(t);return e&&e.default||0}return t=jH.has(t)?t:Az(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return DH(e,t,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&tz.postRender(this.updateDimensions)}build(e,t,n){bH(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){LH(e,t,0,r)}mount(e){this.isSVGTag=wH(e.tagName),super.mount(e)}}const AX=hz(UH({...iW,...gX,...sX,...vX},((e,t)=>mH(e)?new CX(t):new TX(t,{allowProjection:e!==n.Fragment})))),NX="0123456789abcdef";class RX{constructor(e){this.bytes=e}static ofInner(e){if(16!==e.length)throw new TypeError("not 128-bit length");return new RX(e)}static fromFieldsV7(e,t,n,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||e<0||t<0||n<0||r<0||e>0xffffffffffff||t>4095||n>1073741823||r>4294967295)throw new RangeError("invalid field value");const o=new Uint8Array(16);return o[0]=e/2**40,o[1]=e/2**32,o[2]=e/2**24,o[3]=e/65536,o[4]=e/256,o[5]=e,o[6]=112|t>>>8,o[7]=t,o[8]=128|n>>>24,o[9]=n>>>16,o[10]=n>>>8,o[11]=n,o[12]=r>>>24,o[13]=r>>>16,o[14]=r>>>8,o[15]=r,new RX(o)}static parse(e){var t,n,r,o;let i;switch(e.length){case 32:i=null===(t=/^[0-9a-f]{32}$/i.exec(e))||void 0===t?void 0:t[0];break;case 36:i=null===(n=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(e))||void 0===n?void 0:n.slice(1,6).join("");break;case 38:i=null===(r=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(e))||void 0===r?void 0:r.slice(1,6).join("");break;case 45:i=null===(o=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(e))||void 0===o?void 0:o.slice(1,6).join("")}if(i){const e=new Uint8Array(16);for(let t=0;t<16;t+=4){const n=parseInt(i.substring(2*t,2*t+8),16);e[t+0]=n>>>24,e[t+1]=n>>>16,e[t+2]=n>>>8,e[t+3]=n}return new RX(e)}throw new SyntaxError("could not parse UUID string")}toString(){let e="";for(let t=0;t<this.bytes.length;t++)e+=NX.charAt(this.bytes[t]>>>4),e+=NX.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");return e}toHex(){let e="";for(let t=0;t<this.bytes.length;t++)e+=NX.charAt(this.bytes[t]>>>4),e+=NX.charAt(15&this.bytes[t]);return e}toJSON(){return this.toString()}getVariant(){const e=this.bytes[8]>>>4;if(e<0)throw new Error("unreachable");if(e<=7)return this.bytes.every((e=>0===e))?"NIL":"VAR_0";if(e<=11)return"VAR_10";if(e<=13)return"VAR_110";if(e<=15)return this.bytes.every((e=>255===e))?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return"VAR_10"===this.getVariant()?this.bytes[6]>>>4:void 0}clone(){return new RX(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(let t=0;t<16;t++){const n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0}}class OX{constructor(e){this.timestamp=0,this.counter=0,this.random=null!=e?e:PX()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(e,t){let n=this.generateOrAbortCore(e,t);return void 0===n&&(this.timestamp=0,n=this.generateOrAbortCore(e,t)),n}generateOrAbortCore(e,t){if(!Number.isInteger(e)||e<1||e>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit positive integer");if(t<0||t>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+t>=this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return RX.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}generateV4(){const e=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return e[6]=64|e[6]>>>4,e[8]=128|e[8]>>>2,RX.ofInner(e)}}const PX=()=>{if("undefined"!=typeof crypto&&void 0!==crypto.getRandomValues)return new kX;if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");return{nextUint32:()=>65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random())}};class kX{constructor(){this.buffer=new Uint32Array(8),this.cursor=65535}nextUint32(){return this.cursor>=this.buffer.length&&(crypto.getRandomValues(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}let MX;const jX=()=>(MX||(MX=new OX)).generate();function LX(e,t){throw new Error(`Unreachable case statement: ${JSON.stringify(e)}. Valid values are: ${Object.values(t).join(", ")}`)}const DX="automation_update_start",IX="automation_update_end",FX="communication_update_start",UX="communication_update_end",$X=[{eventName:DX,handler:e=>()=>{e({type:"UPDATE_AUTOMATION_START"})}},{eventName:IX,handler:e=>()=>{e({type:"UPDATE_AUTOMATION_END"})}},{eventName:FX,handler:e=>()=>{e({type:"UPDATE_COMMUNICATION_START"})}},{eventName:UX,handler:e=>()=>{e({type:"UPDATE_COMMUNICATION_END"})}}],{Context:VX,Provider:BX}=ap(((e,t)=>{switch(t.type){case"FETCH_AUTOMATION_START":return{...e,isFetchingAutomation:!0,isLoading:!0};case"FETCH_AUTOMATION_SUCCESS":return{...e,automation:t.payload,isFetchingAutomation:!1,isLoading:e.isUpdatingAutomation||e.isFetchingCommunication||e.isUpdatingCommunication};case"FETCH_COMMUNICATION_START":return{...e,isFetchingCommunication:!0,isLoading:!0};case"FETCH_COMMUNICATION_SUCCESS":return{...e,communicationGroup:t.payload,isFetchingCommunication:!1,isLoading:e.isFetchingAutomation||e.isUpdatingAutomation||e.isUpdatingCommunication};case"UPDATE_AUTOMATION_START":return{...e,isUpdatingAutomation:!0,isLoading:!0};case"UPDATE_AUTOMATION_END":return{...e,isUpdatingAutomation:!1,isLoading:e.isFetchingAutomation||e.isFetchingCommunication||e.isUpdatingCommunication};case"UPDATE_COMMUNICATION_START":return{...e,isUpdatingCommunication:!0,isLoading:!0};case"UPDATE_COMMUNICATION_END":return{...e,isUpdatingCommunication:!1,isLoading:e.isFetchingAutomation||e.isUpdatingAutomation||e.isFetchingCommunication};case"UPDATE_RECIPIENT_STATS":return{...e,recipientStats:t.payload};case"SET_EDIT_POPUP":return{...e,openEditPopup:t.payload};case"SET_ACTION_ID":return{...e,selectedActionId:t.payload};case"SET_SELECTED_COMMUNICATION_GROUP_ID":return{...e,selectedCommunicationGroupId:t.payload};default:return e}}),{setAutomation:e=>t=>{e({type:"FETCH_AUTOMATION_SUCCESS",payload:t})},setCommunicationGroup:e=>t=>{e({type:"FETCH_COMMUNICATION_SUCCESS",payload:t})},setRecipientStats:e=>t=>{e({type:"UPDATE_RECIPIENT_STATS",payload:t})},setEditPopup:e=>t=>{e({type:"SET_EDIT_POPUP",payload:t})},setActionId:e=>t=>{e({type:"SET_ACTION_ID",payload:t})},setSelectedCommunicationGroupId:e=>t=>{e({type:"SET_SELECTED_COMMUNICATION_GROUP_ID",payload:t})}},{automation:null,communicationGroup:null,recipientStats:null,isLoading:!1,isFetchingAutomation:!1,isUpdatingAutomation:!1,isFetchingCommunication:!1,isUpdatingCommunication:!1,openEditPopup:!1,selectedActionId:null,selectedCommunicationGroupId:null},$X),zX=async e=>(await Re(`${d}/${e}`)).data,HX=async e=>{if(!e){return{mergeFields:[]}}return(await Re(`${d}/${e}/merge-fields`)).data},qX={all:["communication-group"]},GX=e=>{const t=ve({queryKey:["communication-group",e],queryFn:()=>e?zX(e):null,enabled:!!e});return{communicationGroup:t.data,isGetting:t.isPending,getError:t.error,isGetSuccess:t.isSuccess}},KX=()=>{const e=ce(),t=ye({mutationFn:({groupId:e,params:t})=>(async(e,t)=>(await Re(`${d}/${e}`,{method:"PATCH",body:JSON.stringify(t)})).data)(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:qX.all})}});return{updateCommunicationGroup:t.mutate,isUpdating:t.isPending,updateError:t.error,isUpdateSuccess:t.isSuccess}},WX=()=>{const e=ye({mutationFn:({id:e,params:t})=>(async(e,t)=>(await Re(`${d}/${e}/test`,{method:"POST",body:JSON.stringify(t)})).data)(e,t)});return{sendTestCommunication:e.mutate,isSending:e.isPending,sendError:e.error,isSendSuccess:e.isSuccess}},YX=async e=>(await Re(`${l}/count`,{method:"POST",body:JSON.stringify(e)})).data,XX={all:["segments"],lists:e=>[...XX.all,"list",...e?.cursor?[e.cursor]:[],...e?.limit?[e.limit]:[],...e?.search?[e.search]:[]],detail:e=>[...XX.all,e]},ZX=()=>{const e=ce(),t=ye({mutationFn:e=>(async e=>(await Re(l,{method:"POST",body:JSON.stringify(e)})).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:["segments"]})}}),n=ve({queryKey:["segments-conditions"],queryFn:()=>(async()=>(await Re(`${l}/conditions`,{method:"GET"})).data)()});return{createSegment:t.mutate,isCreating:t.isPending,createError:t.error,isCreateSuccess:t.isSuccess,segmentsConditions:n.data,isFetching:n.isFetching,isLoading:n.isLoading,fetchError:n.error,refetchSegmentsConditions:n.refetch}},QX=e=>{const t=ve({queryKey:XX.lists(e),queryFn:()=>(async e=>{const t=new URLSearchParams;return e?.cursor&&t.append("cursor",e.cursor),e?.limit&&t.append("limit",e.limit.toString()),e?.search&&t.append("search",e.search),(await Re(`${l}${t.toString()?`?${t.toString()}`:""}`)).data})(e),placeholderData:P,..._e});return{segments:t.data?.results??[],nextCursor:t.data?.pagination.cursor??null,isLoading:t.isLoading,error:t.error,isFetching:t.isFetching,isPlaceholderData:t.isPlaceholderData}},JX=e=>{const t=ce(),n=ve({queryKey:["segments","recipients","count"],queryFn:()=>YX(e)});return{data:n.data,isFetching:n.isFetching,isLoading:n.isLoading,fetchError:n.error,refetchCount:()=>{t.invalidateQueries({queryKey:["segments","recipients","count"]})}}},eZ=e=>{const t=ve({queryKey:XX.detail(e),queryFn:()=>(async e=>e?(await Re(`${l}/${e}`)).data:null)(e),..._e,enabled:!!e});return{segment:t.data,isFetching:t.isFetching,isLoading:t.isLoading}},tZ=e=>{const t=ce(),n=ye({mutationFn:t=>(async(e,t)=>t?(await Re(`${l}/${t}`,{method:"PATCH",body:JSON.stringify(e)})).data:null)(t,e),onSuccess:()=>{t.invalidateQueries({queryKey:["segments",e]})}});return{updateSegment:n.mutate,isUpdating:n.isPending,updateError:n.error,isUpdateSuccess:n.isSuccess}};var nZ=(e=>(e.String="string",e.Number="number",e.Integer="integer",e.Boolean="boolean",e.Date="date",e.DateTime="date-time",e.Array="array",e.ReachResource="reach-resource",e))(nZ||{}),rZ=(e=>(e.ALL_USERS="all_users",e.MANAGED="managed",e.CUSTOM="custom",e))(rZ||{}),oZ=(e=>(e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.GREATER_THAN="greater_than",e.LESS_THAN="less_than",e.EXISTS="exists",e.EQUALS_MONTH_DAY="equals_month_day",e.EQUALS_MONTH_DAY_YEAR="equals_month_day_year",e.BETWEEN_MONTH_DAY="between_month_day",e.BETWEEN_MONTH_DAY_YEAR="between_month_day_year",e.ARRAY_CONTAINS="array_contains",e))(oZ||{});const iZ=()=>{const e=n.useContext(VX);if(void 0===e)throw new Error("useViewAutomationContext must be used within a ViewAutomationProvider");return e},aZ=()=>{const{state:e}=iZ();return e.automation},sZ=()=>{const{state:e}=iZ();return e.communicationGroup},lZ=e=>{const{setRecipientStats:t}=iZ(),{estimatedMatchesStats:r}=(e=>{const{data:t}=JX({includeSegments:e?.includeSegmentIds??[],excludeSegments:e?.excludeSegmentIds??[]}),r=n.useMemo((()=>t?.recipients?t.recipients.reduce(((e,t)=>({emails:e.emails+(t.email?1:0),phones:e.phones+(t.phone?1:0)})),{emails:0,phones:0}):{emails:0,phones:0}),[t?.recipients]);return{estimatedMatches:t,estimatedMatchesStats:r}})(e);n.useEffect((()=>{r&&t(r)}),[r,t])},cZ=({automationId:e,children:n})=>t.jsx(BX,{children:t.jsx(uZ,{automationId:e,children:n})}),uZ=({automationId:e,existingAutomation:r,children:o})=>((e=>{const{setAutomation:t}=n.useContext(VX),{automation:r}=ke(e);n.useEffect((()=>{r&&t(r)}),[r,t])})(e),(e=>{const{isUpdating:t}=Le(e);n.useEffect((()=>{be.emit(t?DX:IX,null)}),[t])})(e),(()=>{const{setCommunicationGroup:e,state:t}=n.useContext(VX),r=t.selectedCommunicationGroupId??t.automation?.actionData?.find((e=>"send_communication"===e.actionType))?.actionMetadata.communicationGroupId,{communicationGroup:o}=GX(r);n.useEffect((()=>{o&&e(o)}),[o,e])})(),(()=>{const{isUpdating:e}=KX();n.useEffect((()=>{be.emit(e?FX:UX,null)}),[e])})(),lZ(r),t.jsx(t.Fragment,{children:o})),dZ={all:["stripo"],token:()=>[...dZ.all,"token"],editorData:()=>[...dZ.all,"editorData"],templates:()=>[...dZ.all,"templates"],templateForActionId:(e,t)=>[...dZ.templates(),e,t]},pZ=async()=>(await Re(`${p}/editor-data`)).data,fZ=async e=>{const{automationId:t,actionId:n}=e;return(await Re(`${p}/template/${t}/${n}`)).data},hZ=({text:e,textSpeed:r=2e3,textColor:o="text-muted-foreground"})=>{const[i,a]=n.useState(0),s=Array.isArray(e)?e:e?[e]:[];return n.useEffect((()=>{if(s.length<=1)return;if(i>=s.length-1)return;const e=setInterval((()=>{a((e=>e<s.length-1?e+1:e))}),r);return()=>clearInterval(e)}),[s.length,r,i]),t.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 @container",children:[t.jsxs("div",{className:"relative h-8 w-8",children:[t.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-primary/20"}),t.jsx("div",{className:"absolute inset-0 animate-spin rounded-full border-2 border-primary border-t-transparent"})]}),s.length>0&&t.jsx("div",{className:`text-center text-sm ${o} animate-fade-in min-w-[200px] max-w-[300px] px-4`,children:t.jsx("div",{className:"break-words",children:s[i]})},i),t.jsx("style",{children:"\n .animate-fade-in {\n animation: fadeIn 0.5s ease-in-out;\n }\n @keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(5px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n "})]})},mZ=({children:e,className:n})=>t.jsx(AX.div,{initial:{opacity:0,filter:"blur(8px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(8px)"},transition:{duration:.3,ease:"easeInOut"},className:n,children:e}),gZ=ru(["reach-styles-module__base___gfFyc"],{variants:{variant:{default:"reach-styles-module__default___ny1h7",destructive:"reach-styles-module__destructive___XjBvS",outline:"reach-styles-module__outline___gFp3i",secondary:"reach-styles-module__secondary___Pd-e3",ghost:"reach-styles-module__ghost___GcnJq",link:"reach-styles-module__link___EgS2H"},size:{default:"reach-styles-module__sizeDefault___8kU5A",sm:"reach-styles-module__sizeSm___zPIEh",lg:"reach-styles-module__sizeLg___D2G8z",icon:"reach-styles-module__sizeIcon___5XkYW"}},defaultVariants:{variant:"default",size:"default"}}),vZ=i.forwardRef((({className:e,variant:n,size:r,asChild:o=!1,...i},a)=>t.jsx(o?ZU:"button",{className:Zd(gZ({variant:n,size:r,className:e})),ref:a,...i})));vZ.displayName="Button";var yZ=(e=>(e.ChooseAutomationType="choose-automation-type",e.SetAutomationName="set-automation-name",e.OneTimeWizard="one-time-wizard",e))(yZ||{});const bZ=({onClose:e,currentStep:n,setCurrentStep:r,isDisabled:o,createAutomation:i,disableBackButton:a})=>t.jsx("div",{children:t.jsxs("div",{className:"flex justify-end space-x-4",children:[t.jsx(vZ,{variant:"secondary",className:"px-4 py-2",onClick:()=>{if(a)e?.(!1);else if(n===yZ.ChooseAutomationType)e?.(!1);else{if(n!==yZ.SetAutomationName)throw new Error("Invalid step");r(yZ.ChooseAutomationType)}},children:n===yZ.ChooseAutomationType||a?"Cancel":"Back"}),t.jsx(vZ,{className:"px-4 py-2",onClick:()=>{o||n!==yZ.SetAutomationName||i()},disabled:o,children:n===yZ.SetAutomationName?"Create":"Next"})]})}),xZ=({onClick:e,title:n,subtitle:r,icon:o,selected:i,disabled:a=!1})=>t.jsxs("button",{onClick:e,className:"flex flex-col items-center justify-center rounded-lg border-2 p-6 transition-all duration-300 ease-in-out hover:shadow-lg "+(a?"opacity-50 cursor-not-allowed hover:shadow-none":i?"scale-[1.02] hover:scale-[1.04] [border-color:hsl(var(--reach-primary))] shadow-lg":"border-gray-200 hover:[border-color:hsl(var(--reach-primary))] hover:bg-gray-50"),children:[o,t.jsxs("div",{className:"text-center mt-3",children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:n}),t.jsx("div",{className:"text-xs text-gray-500 mt-1",children:r})]})]}),wZ={CloseButton:rd,DropdownMenuTrigger:fu,UserIcon:ed,UsersIcon:td,UserEdit:Qu,ScheduleButton:du,SendButton:zu,BackButton:hu,NextButton:mu,MergeField:Ju,PlusIcon:Vu,AlertCircleIcon:yu,AudienceIcon:td,TriggerIcon:od,OneTimeBroadcast:Mu,PatronEntersList:Au,DateMilestone:du,RealtimeActivity:uu,EditIcon:Uu,DuplicateIcon:_u,EmailIcon:Ou,SmsIcon:ju,ExpandIcon:Pu,PreviewButton:$u,MessagesSent:Ru,LinksClicked:Du,OpenRate:Su,SpamComplies:Xu,TotalBounceRate:Xu,UnsubscribeRate:Gu,SalesAmount:cu,CommunicationIcon:Ou,WaitUntilNextFixedTimeIcon:Wu},_Z="text-3xl mb-8",SZ="grid grid-cols-2 gap-6",EZ="relative p-6 rounded-lg",TZ="mb-4 flex items-center justify-center text-primary",CZ="text-lg font-medium mb-2 text-primary",AZ="text-sm text-muted-foreground",NZ="absolute top-3 right-3 bg-gray-100 text-gray-600 text-xs px-2 py-1 rounded-full",RZ=({onNext:e})=>t.jsxs("div",{className:EZ,children:[t.jsx("h1",{className:_Z,children:"Choose Your Automation Type"}),t.jsxs("div",{className:SZ,children:[t.jsx(xZ,{onClick:()=>{e(Fe.ONE_TIME)},title:`${ff("engage:one_time")} Broadcast`,subtitle:"Send a single message to your current list, like announcing a sale or newsletter.",icon:t.jsx(wZ.OneTimeBroadcast,{}),selected:!1}),t.jsx(xZ,{onClick:()=>{},title:"Patron Enters a List",subtitle:"Send whenever someone becomes qualified, like welcoming new subscribers who meet specific criteria.",icon:t.jsx(wZ.PatronEntersList,{}),selected:!1,disabled:!0}),t.jsx(xZ,{onClick:()=>{},title:"Date Milestone",subtitle:"Send whenever someone becomes qualified, like welcoming new subscribers who meet specific criteria.",icon:t.jsx(wZ.DateMilestone,{}),selected:!1,disabled:!0}),t.jsx(xZ,{onClick:()=>{},title:"Realtime Activity",subtitle:"Send whenever someone becomes qualified, like welcoming new subscribers who meet specific criteria.",icon:t.jsx(wZ.RealtimeActivity,{}),selected:!1,disabled:!0})]})]}),OZ="reach-styles-module__container___6PQqs",PZ=ru(["reach-styles-module__base___WFahB"],{variants:{variant:{default:"reach-styles-module__default___zeGU1",secondary:"reach-styles-module__secondary___VQ4iH",destructive:"reach-styles-module__destructive___RLaRD",outline:"reach-styles-module__outline___L2VtW",google:"reach-styles-module__google___HcEij",date:"reach-styles-module__date___-6BC4",statusActive:"reach-styles-module__statusActive___-fNzR",statusCompleted:"reach-styles-module__statusCompleted___Z-Cdz",statusDraft:"reach-styles-module__statusDraft___3BUrD",statusDeactivated:"reach-styles-module__statusDeactivated___xVw1N",statusFailed:"reach-styles-module__statusFailed___VQiDA",statusRunning:"reach-styles-module__statusRunning___1iEjx",segmentAllUsers:"reach-styles-module__segmentAllUsers___1aXpc",segmentManaged:"reach-styles-module__segmentManaged___o0gOu",segmentCustom:"reach-styles-module__segmentCustom___xc3lG"},size:{default:"reach-styles-module__sizeDefault___iGTp4",sm:"reach-styles-module__sizeSm___6T2oK"},iconOnly:{true:"reach-styles-module__iconOnly___8vUSp",false:""}},compoundVariants:[{iconOnly:!0,size:"sm",class:"reach-styles-module__iconOnlySm___9ZKv9"}],defaultVariants:{variant:"default",size:"default",iconOnly:!1}}),kZ=i.forwardRef((({className:e,variant:n,size:r,iconOnly:o,truncate:i,...a},s)=>t.jsx("div",{ref:s,className:Zd(PZ({variant:n,size:r,iconOnly:o}),i&&"max-w-[90px]",e),...a})));kZ.displayName="Badge";i.forwardRef((({className:e,...n},r)=>t.jsx("div",{ref:r,className:Zd(OZ,e),...n}))).displayName="BadgeContainer";const MZ="reach-styles-module__stepIndicatorContainer___FoKXB",jZ="reach-styles-module__iconContainer___Ki-1n",LZ="reach-styles-module__checkIcon___-krUS",DZ="reach-styles-module__minusIcon___r5cKs",IZ="reach-styles-module__minusIconActive___-4JHM",FZ="reach-styles-module__minusIconInactive___JtvVB",UZ="reach-styles-module__label___tiCMA",$Z="reach-styles-module__labelActive___EXydD",VZ="reach-styles-module__labelInactive___g-J3r",BZ=({label:e,isCompleted:n,isActive:r,onClick:o})=>t.jsxs(o?"button":"div",{className:MZ,onClick:o,children:[t.jsx("div",n?{className:jZ,children:t.jsx(pu,{className:LZ})}:{className:jZ,children:t.jsx(Lu,{className:Zd(DZ,r?IZ:FZ)})}),t.jsx("span",{className:Zd(UZ,r?$Z:VZ),children:e})]}),zZ=i.forwardRef((({className:e,...n},r)=>t.jsx("div",{className:"relative w-full bg-primary rounded-lg",children:t.jsx("table",{ref:r,className:Zd("w-full caption-bottom text-sm",e),...n})})));zZ.displayName="Table";const HZ=i.forwardRef((({className:e,...n},r)=>t.jsx("thead",{ref:r,className:Zd("bg-gray-50 [&_tr]:border-b",e),...n})));HZ.displayName="TableHeader";const qZ=i.forwardRef((({className:e,...n},r)=>t.jsx("tbody",{ref:r,className:Zd("[&_tr:last-child]:border-0",e),...n})));qZ.displayName="TableBody";const GZ=i.forwardRef((({className:e,...n},r)=>t.jsx("tr",{ref:r,className:Zd("border-b border-gray-100 bg-card transition-colors hover:bg-card/90 data-[state=selected]:bg-muted",e),...n})));GZ.displayName="TableRow";const KZ=i.forwardRef((({className:e,...n},r)=>t.jsx("th",{ref:r,className:Zd("h-12 px-4 text-left align-middle font-medium text-card-foreground [&:has([role=checkbox])]:pr-0",e),...n})));KZ.displayName="TableHead";const WZ=i.forwardRef((({className:e,...n},r)=>t.jsx("td",{ref:r,className:Zd("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...n})));WZ.displayName="TableCell";
54
54
  /**
55
55
  * table-core
56
56
  *
@@ -82,7 +82,7 @@ function IQ(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=
82
82
  * LICENSE.md file in the root directory of this source tree.
83
83
  *
84
84
  * @license MIT
85
- */(n.expires)||!Number.isFinite(n.expires.valueOf()))throw new TypeError(`option expires is invalid: ${n.expires}`);i+="; Expires="+n.expires.toUTCString()}n.httpOnly&&(i+="; HttpOnly");n.secure&&(i+="; Secure");n.partitioned&&(i+="; Partitioned");if(n.priority){switch("string"==typeof n.priority?n.priority.toLowerCase():void 0){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${n.priority}`)}}if(n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"none":i+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${n.sameSite}`)}}return i};const Y3=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,X3=/^[\u0021-\u003A\u003C-\u007E]*$/,Z3=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Q3=/^[\u0020-\u003A\u003D-\u007E]*$/,J3=Object.prototype.toString,e5=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function t5(e,t,n){do{const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++t<n);return n}function n5(e,t,n){for(;t>n;){const n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return n}function r5(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(JSe){return e}}function o5(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:o=!1}=e;t=n.map(((e,t)=>u(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let i=l(null==r?t.length-1:r),a="POP",s=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function c(){return t[i]}function u(e,n=null,r){let o=function(e,t,n=null,r){let o={pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?c5(t):t,state:n,key:t&&t.key||r||s5()};return o}(t?c().pathname:"/",e,n,r);return a5("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function d(e){return"string"==typeof e?e:l5(e)}return{get index(){return i},get action(){return a},get location(){return c()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?c5(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){a="PUSH";let r=u(e,n);i+=1,t.splice(i,t.length,r),o&&s&&s({action:a,location:r,delta:1})},replace(e,n){a="REPLACE";let r=u(e,n);t[i]=r,o&&s&&s({action:a,location:r,delta:0})},go(e){a="POP";let n=l(i+e);i=n,s&&s({action:a,location:t[n],delta:e})},listen:e=>(s=e,()=>{s=null})}}function i5(e,t){if(!1===e||null==e)throw new Error(t)}function a5(e,t){if(!e)try{throw new Error(t)}catch(JSe){}}function s5(){return Math.random().toString(36).substring(2,10)}function l5({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function c5(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function u5(e,t,n="/"){return function(e,t,n,r){let o="string"==typeof t?c5(t):t,i=E5(o.pathname||"/",n);if(null==i)return null;let a=d5(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let s=null;for(let l=0;null==s&&l<a.length;++l){let e=S5(i);s=w5(a[l],e,r)}return s}(e,t,n,!1)}function d5(e,t=[],n=[],r=""){let o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(i5(a.relativePath.startsWith(r),`Absolute route path "${a.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(r.length));let s=N5([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(i5(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),d5(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:x5(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of p5(e.path))o(e,t,n);else o(e,t)})),t}function p5(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=p5(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var f5=/^:[\w-]+$/,h5=3,m5=2,g5=1,v5=10,y5=-2,b5=e=>"*"===e;function x5(e,t){let n=e.split("/"),r=n.length;return n.some(b5)&&(r+=y5),t&&(r+=m5),n.filter((e=>!b5(e))).reduce(((e,t)=>e+(f5.test(t)?h5:""===t?g5:v5)),r)}function w5(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u=_5({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=_5({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:N5([i,u.pathname]),pathnameBase:R5(N5([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=N5([i,u.pathnameBase]))}return a}function _5(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){a5("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){a=i.slice(0,i.length-(s[r]||"").length).replace(/(.)\/+$/,"$1")}const o=s[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function S5(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return a5(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function E5(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function T5(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function C5(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function A5(e,t,n,r=!1){let o;"string"==typeof e?o=c5(e):(o={...e},i5(!o.pathname||!o.pathname.includes("?"),T5("?","pathname","search",o)),i5(!o.pathname||!o.pathname.includes("#"),T5("#","pathname","hash",o)),i5(!o.search||!o.search.includes("#"),T5("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:n,search:r="",hash:o=""}="string"==typeof e?c5(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:O5(r),hash:P5(o)}}(o,i),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var N5=e=>e.join("/").replace(/\/\/+/g,"/"),R5=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),O5=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",P5=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var k5=["POST","PUT","PATCH","DELETE"];new Set(k5);var M5=["GET",...k5];new Set(M5);var j5=i.createContext(null);j5.displayName="DataRouter";var L5=i.createContext(null);L5.displayName="DataRouterState";var D5=i.createContext({isTransitioning:!1});D5.displayName="ViewTransition",i.createContext(new Map).displayName="Fetchers",i.createContext(null).displayName="Await";var I5=i.createContext(null);I5.displayName="Navigation";var F5=i.createContext(null);F5.displayName="Location";var U5=i.createContext({outlet:null,matches:[],isDataRoute:!1});U5.displayName="Route";var $5=i.createContext(null);function V5(){return null!=i.useContext(F5)}function B5(){return i5(V5(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(F5).location}$5.displayName="RouteError";var z5="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function H5(e){i.useContext(I5).static||i.useLayoutEffect(e)}function q5(){let{isDataRoute:e}=i.useContext(U5);return e?function(){let{router:e}=function(e){let t=i.useContext(j5);return i5(t,Q5(e)),t}("useNavigate"),t=J5("useNavigate"),n=i.useRef(!1);return H5((()=>{n.current=!0})),i.useCallback((async(r,o={})=>{a5(n.current,z5),n.current&&("number"==typeof r?e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))}),[e,t])}():function(){i5(V5(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(j5),{basename:t,navigator:n}=i.useContext(I5),{matches:r}=i.useContext(U5),{pathname:o}=B5(),a=JSON.stringify(C5(r)),s=i.useRef(!1);return H5((()=>{s.current=!0})),i.useCallback(((r,i={})=>{if(a5(s.current,z5),!s.current)return;if("number"==typeof r)return void n.go(r);let l=A5(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:N5([t,l.pathname])),(i.replace?n.replace:n.push)(l,i.state,i)}),[t,n,a,o,e])}()}function G5(e,{relative:t}={}){let{matches:n}=i.useContext(U5),{pathname:r}=B5(),o=JSON.stringify(C5(n));return i.useMemo((()=>A5(e,JSON.parse(o),r,"path"===t)),[e,o,r,t])}function K5(e,t,n,r){i5(V5(),"useRoutes() may be used only in the context of a <Router> component.");let o,{navigator:a,static:s}=i.useContext(I5),{matches:l}=i.useContext(U5),c=l[l.length-1],u=c?c.params:{},d=c?c.pathname:"/",p=c?c.pathnameBase:"/",f=c&&c.route;{let e=f&&f.path||"";t4(d,!f||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}o=B5();let h=o.pathname||"/",m=h;if("/"!==p){let e=p.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=!s&&n&&n.matches&&n.matches.length>0?n.matches:u5(e,{pathname:m});a5(f||null!=g,`No routes matched location "${o.pathname}${o.search}${o.hash}" `),a5(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${o.pathname}${o.search}${o.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=function(e,t=[],n=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let r=e,o=n?.errors;if(null!=o){let e=r.findIndex((e=>e.route.id&&void 0!==o?.[e.route.id]));i5(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),r=r.slice(0,Math.min(r.length,e+1))}let a=!1,s=-1;if(n)for(let i=0;i<r.length;i++){let e=r[i];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(s=i),e.route.id){let{loaderData:t,errors:o}=n,i=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!o||void 0===o[e.route.id]);if(e.route.lazy||i){a=!0,r=s>=0?r.slice(0,s+1):[r[0]];break}}}return r.reduceRight(((e,l,c)=>{let u,d=!1,p=null,f=null;n&&(u=o&&l.route.id?o[l.route.id]:void 0,p=l.route.errorElement||Y5,a&&(s<0&&0===c?(t4("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):s===c&&(d=!0,f=l.route.hydrateFallbackElement||null)));let h=t.concat(r.slice(0,c+1)),m=()=>{let t;return t=u?p:d?f:l.route.Component?i.createElement(l.route.Component,null):l.route.element?l.route.element:e,i.createElement(Z5,{match:l,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(l.route.ErrorBoundary||l.route.errorElement||0===c)?i.createElement(X5,{location:n.location,revalidation:n.revalidation,component:p,error:u,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()}),null)}(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:N5([p,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?p:N5([p,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,n,r);return v}function W5(){let e=function(){let e=i.useContext($5),t=function(e){let t=i.useContext(L5);return i5(t,Q5(e)),t}("useRouteError"),n=J5("useRouteError");if(void 0!==e)return e;return t.errors?.[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return s=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:a},"ErrorBoundary")," or"," ",i.createElement("code",{style:a},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,s)}i.createContext(null);var Y5=i.createElement(W5,null),X5=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){}render(){return void 0!==this.state.error?i.createElement(U5.Provider,{value:this.props.routeContext},i.createElement($5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Z5({routeContext:e,match:t,children:n}){let r=i.useContext(j5);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(U5.Provider,{value:e},n)}function Q5(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function J5(e){let t=function(e){let t=i.useContext(U5);return i5(t,Q5(e)),t}(e),n=t.matches[t.matches.length-1];return i5(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var e4={};function t4(e,t,n){t||e4[e]||(e4[e]=!0,a5(!1,n))}function n4({basename:e,children:t,initialEntries:n,initialIndex:r}){let o=i.useRef();null==o.current&&(o.current=o5({initialEntries:n,initialIndex:r,v5Compat:!0}));let a=o.current,[s,l]=i.useState({action:a.action,location:a.location}),c=i.useCallback((e=>{i.startTransition((()=>l(e)))}),[l]);return i.useLayoutEffect((()=>a.listen(c)),[a,c]),i.createElement(r4,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:a})}function r4({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1}){i5(!V5(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=i.useMemo((()=>({basename:s,navigator:o,static:a,future:{}})),[s,o,a]);"string"==typeof n&&(n=c5(n));let{pathname:c="/",search:u="",hash:d="",state:p=null,key:f="default"}=n,h=i.useMemo((()=>{let e=E5(c,s);return null==e?null:{location:{pathname:e,search:u,hash:d,state:p,key:f},navigationType:r}}),[s,c,u,d,p,f,r]);return a5(null!=h,`<Router basename="${s}"> is not able to match the URL "${c}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:i.createElement(I5.Provider,{value:l},i.createElement(F5.Provider,{children:t,value:h}))}i.memo((function({routes:e,future:t,state:n}){return K5(e,0,n,t)}));var o4="get",i4="application/x-www-form-urlencoded";function a4(e){return null!=e&&"string"==typeof e.tagName}function s4(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}var l4=null;var c4=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function u4(e){return null==e||c4.has(e)?e:(a5(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${i4}"`),null)}function d4(e,t){let n,r,o,i,a;if(function(e){return a4(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?E5(a,t):null,n=e.getAttribute("method")||o4,o=u4(e.getAttribute("enctype"))||i4,i=new FormData(e)}else if(function(e){return a4(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return a4(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?E5(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||o4,o=u4(e.getAttribute("formenctype"))||u4(a.getAttribute("enctype"))||i4,i=new FormData(a,e),!function(){if(null===l4)try{new FormData(document.createElement("form"),0),l4=!1}catch(JSe){l4=!0}return l4}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(a4(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=o4,r=null,o=i4,a=e}return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}function p4(e,t){if(!1===e||null==e)throw new Error(t)}function f4(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function h4(e,t,n){return function(e,t){let n=new Set;return new Set(t),e.reduce(((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return window.__reactRouterContext&&window,window.location.reload(),new Promise((()=>{}))}}(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(f4).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function m4(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===i?t.filter(((t,i)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function g4(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}function v4(){let e=i.useContext(j5);return p4(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}var y4=i.createContext(void 0);function b4(){let e=i.useContext(y4);return p4(e,"You must render this element inside a <HydratedRouter> element"),e}function x4(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function w4({page:e,...t}){let{router:n}=v4(),r=i.useMemo((()=>u5(n.routes,e,n.basename)),[n.routes,e,n.basename]);return r?i.createElement(_4,{page:e,matches:r,...t}):null}function _4({page:e,matches:t,...n}){let r=B5(),{manifest:o,routeModules:a}=b4(),{basename:s}=v4(),{loaderData:l,matches:c}=function(){let e=i.useContext(L5);return p4(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),u=i.useMemo((()=>m4(e,t,c,o,r,"data")),[e,t,c,o,r]),d=i.useMemo((()=>m4(e,t,c,o,r,"assets")),[e,t,c,o,r]),p=i.useMemo((()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,i=!1;if(t.forEach((e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!u.some((t=>t.route.id===e.route.id))&&e.route.id in l&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))})),0===n.size)return[];let c=function(e,t){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n.pathname="/"===n.pathname?"_root.data":t&&"/"===E5(n.pathname,t)?`${t.replace(/\/$/,"")}/_root.data`:`${n.pathname.replace(/\/$/,"")}.data`,n}(e,s);return i&&n.size>0&&c.searchParams.set("_routes",t.filter((e=>n.has(e.route.id))).map((e=>e.route.id)).join(",")),[c.pathname+c.search]}),[s,l,r,o,u,t,e,a]),f=i.useMemo((()=>g4(d,o)),[d,o]),h=function(e){let{manifest:t,routeModules:n}=b4(),[r,o]=i.useState([]);return i.useEffect((()=>{let r=!1;return h4(e,t,n).then((e=>{r||o(e)})),()=>{r=!0}}),[e,t,n]),r}(d);return i.createElement(i.Fragment,null,p.map((e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),f.map((e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),h.map((({key:e,link:t})=>i.createElement("link",{key:e,...t}))))}function S4(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}y4.displayName="FrameworkContext";var E4="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{E4&&(window.__reactRouterVersion="7.5.2")}catch(JSe){}var T4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,C4=i.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d,...p},f){let h,{basename:m}=i.useContext(I5),g="string"==typeof c&&T4.test(c),v=!1;if("string"==typeof c&&g&&(h=c,E4))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=E5(t.pathname,m);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:v=!0}catch(JSe){a5(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=function(e,{relative:t}={}){i5(V5(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(I5),{hash:o,pathname:a,search:s}=G5(e,{relative:t}),l=a;return"/"!==n&&(l="/"===a?n:N5([n,a])),r.createHref({pathname:l,search:s,hash:o})}(c,{relative:r}),[b,x,w]=function(e,t){let n=i.useContext(y4),[r,o]=i.useState(!1),[a,s]=i.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=t,f=i.useRef(null);i.useEffect((()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),i.useEffect((()=>{if(r){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let h=()=>{o(!0)},m=()=>{o(!1),s(!1)};return n?"intent"!==e?[a,f,{}]:[a,f,{onFocus:x4(l,h),onBlur:x4(c,m),onMouseEnter:x4(u,h),onMouseLeave:x4(d,m),onTouchStart:x4(p,h)}]:[!1,f,{}]}(n,p),_=function(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:s}={}){let l=q5(),c=B5(),u=G5(e,{relative:a});return i.useCallback((i=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(i,t)){i.preventDefault();let t=void 0!==n?n:l5(c)===l5(u);l(e,{replace:t,state:r,preventScrollReset:o,relative:a,viewTransition:s})}}),[c,l,u,n,r,t,e,o,a,s])}(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:r,viewTransition:d});let S=i.createElement("a",{...p,...w,href:h||y,onClick:v||o?e:function(t){e&&e(t),t.defaultPrevented||_(t)},ref:S4(f,x),target:l,"data-discover":g||"render"!==t?void 0:"true"});return b&&!g?i.createElement(i.Fragment,null,S,i.createElement(w4,{page:y})):S}));function A4(e){let t=i.useContext(j5);return i5(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}function N4(e){a5("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(s4(e)),n=i.useRef(!1),r=B5(),o=i.useMemo((()=>function(e,t){let n=s4(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),a=q5(),s=i.useCallback(((e,t)=>{const r=s4("function"==typeof e?e(o):e);n.current=!0,a("?"+r,t)}),[a,o]);return[o,s]}C4.displayName="Link",i.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:a,viewTransition:s,children:l,...c},u){let d=G5(a,{relative:c.relative}),p=B5(),f=i.useContext(L5),{navigator:h,basename:m}=i.useContext(I5),g=null!=f&&function(e,t={}){let n=i.useContext(D5);i5(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=A4("useViewTransitionState"),o=G5(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=E5(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=E5(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=_5(o.pathname,s)||null!=_5(o.pathname,a)}(d)&&!0===s,v=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,y=p.pathname,b=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(y=y.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&m&&(b=E5(b,m)||b);const x="/"!==v&&v.endsWith("/")?v.length-1:v.length;let w,_=y===v||!r&&y.startsWith(v)&&"/"===y.charAt(x),S=null!=b&&(b===v||!r&&b.startsWith(v)&&"/"===b.charAt(v.length)),E={isActive:_,isPending:S,isTransitioning:g},T=_?e:void 0;w="function"==typeof n?n(E):[n,_?"active":null,S?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof o?o(E):o;return i.createElement(C4,{...c,"aria-current":T,className:w,ref:u,style:C,to:a,viewTransition:s},"function"==typeof l?l(E):l)})).displayName="NavLink",i.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:s=o4,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:p,...f},h)=>{let m=function(){let{router:e}=A4("useSubmit"),{basename:t}=i.useContext(I5),n=J5("useRouteId");return i.useCallback((async(r,o={})=>{let{action:i,method:a,encType:s,formData:l,body:c}=d4(r,t);if(!1===o.navigate){let t=o.fetcherKey||O4();await e.fetch(t,n,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[e,t,n])}(),g=function(e,{relative:t}={}){let{basename:n}=i.useContext(I5),r=i.useContext(U5);i5(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...G5(e||".",{relative:t})},s=B5();if(null==e){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();a.search=n?`?${n}`:""}}e&&"."!==e||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:N5([n,a.pathname]));return l5(a)}(l,{relative:u}),v="get"===s.toLowerCase()?"get":"post",y="string"==typeof l&&T4.test(l);return i.createElement("form",{ref:h,method:v,action:g,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,i=r?.getAttribute("formmethod")||s;m(r||e.currentTarget,{fetcherKey:t,method:i,navigate:n,replace:o,state:a,relative:u,preventScrollReset:d,viewTransition:p})},...f,"data-discover":y||"render"!==e?void 0:"true"})})).displayName="Form";var R4=0,O4=()=>`__${String(++R4)}__`;new TextEncoder;var P4,k4="dismissableLayer.update",M4="dismissableLayer.pointerDownOutside",j4="dismissableLayer.focusOutside",L4=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),D4=i.forwardRef(((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=i.useContext(L4),[p,f]=i.useState(null),h=p?.ownerDocument??globalThis?.document,[,m]=i.useState({}),g=XU(n,(e=>f(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=p?v.indexOf(p):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,_=x>=b,S=function(e,t=globalThis?.document){const n=VQ(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){F4(M4,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));_&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())}),h),E=function(e,t=globalThis?.document){const n=VQ(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){F4(j4,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),h);return JQ((e=>{x===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),i.useEffect((()=>{if(p)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(P4=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),I4(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=P4)}}),[p,h,r,d]),i.useEffect((()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),I4())}),[p,d]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(k4,e),()=>document.removeEventListener(k4,e)}),[]),t.jsx(WQ.div,{...u,ref:g,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:FQ(e.onFocusCapture,E.onFocusCapture),onBlurCapture:FQ(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:FQ(e.onPointerDownCapture,S.onPointerDownCapture)})}));D4.displayName="DismissableLayer";function I4(){const e=new CustomEvent(k4);document.dispatchEvent(e)}function F4(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?YQ(o,i):o.dispatchEvent(i)}i.forwardRef(((e,n)=>{const r=i.useContext(L4),o=i.useRef(null),a=XU(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.jsx(WQ.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var U4=i.forwardRef(((e,n)=>t.jsx(WQ.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));U4.displayName="VisuallyHidden";var $4=U4,[V4,B4]=UQ("Tooltip",[o1]),z4=o1(),H4="TooltipProvider",q4=700,G4="tooltip.open",[K4,W4]=V4(H4),Y4=e=>{const{__scopeTooltip:n,delayDuration:r=q4,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:s}=e,[l,c]=i.useState(!0),u=i.useRef(!1),d=i.useRef(0);return i.useEffect((()=>{const e=d.current;return()=>window.clearTimeout(e)}),[]),t.jsx(K4,{scope:n,isOpenDelayed:l,delayDuration:r,onOpen:i.useCallback((()=>{window.clearTimeout(d.current),c(!1)}),[]),onClose:i.useCallback((()=>{window.clearTimeout(d.current),d.current=window.setTimeout((()=>c(!0)),o)}),[o]),isPointerInTransitRef:u,onPointerInTransitChange:i.useCallback((e=>{u.current=e}),[]),disableHoverableContent:a,children:s})};Y4.displayName=H4;var X4="Tooltip",[Z4,Q4]=V4(X4),J4=e=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:a=!1,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=e,u=W4(X4,e.__scopeTooltip),d=z4(n),[p,f]=i.useState(null),h=EJ(),m=i.useRef(0),g=l??u.disableHoverableContent,v=c??u.delayDuration,y=i.useRef(!1),[b=!1,x]=BQ({prop:o,defaultProp:a,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(G4))):u.onClose(),s?.(e)}}),w=i.useMemo((()=>b?y.current?"delayed-open":"instant-open":"closed"),[b]),_=i.useCallback((()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,x(!0)}),[x]),S=i.useCallback((()=>{window.clearTimeout(m.current),m.current=0,x(!1)}),[x]),E=i.useCallback((()=>{window.clearTimeout(m.current),m.current=window.setTimeout((()=>{y.current=!0,x(!0),m.current=0}),v)}),[v,x]);return i.useEffect((()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)}),[]),t.jsx(x1,{...d,children:t.jsx(Z4,{scope:n,contentId:h,open:b,stateAttribute:w,trigger:p,onTriggerChange:f,onTriggerEnter:i.useCallback((()=>{u.isOpenDelayed?E():_()}),[u.isOpenDelayed,E,_]),onTriggerLeave:i.useCallback((()=>{g?S():(window.clearTimeout(m.current),m.current=0)}),[S,g]),onOpen:_,onClose:S,disableHoverableContent:g,children:r})})};J4.displayName=X4;var e6="TooltipTrigger",t6=i.forwardRef(((e,n)=>{const{__scopeTooltip:r,...o}=e,a=Q4(e6,r),s=W4(e6,r),l=z4(r),c=XU(n,i.useRef(null),a.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),p=i.useCallback((()=>u.current=!1),[]);return i.useEffect((()=>()=>document.removeEventListener("pointerup",p)),[p]),t.jsx(w1,{asChild:!0,...l,children:t.jsx(WQ.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:c,onPointerMove:FQ(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(d.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))})),onPointerLeave:FQ(e.onPointerLeave,(()=>{a.onTriggerLeave(),d.current=!1})),onPointerDown:FQ(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})})),onFocus:FQ(e.onFocus,(()=>{u.current||a.onOpen()})),onBlur:FQ(e.onBlur,a.onClose),onClick:FQ(e.onClick,a.onClose)})})}));t6.displayName=e6;var n6="TooltipPortal",[r6,o6]=V4(n6,{forceMount:void 0}),i6=e=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=e,a=Q4(n6,n);return t.jsx(r6,{scope:n,forceMount:r,children:t.jsx(T1,{present:r||a.open,children:t.jsx(E1,{asChild:!0,container:i,children:o})})})};i6.displayName=n6;var a6="TooltipContent",s6=i.forwardRef(((e,n)=>{const r=o6(a6,e.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...a}=e,s=Q4(a6,e.__scopeTooltip);return t.jsx(T1,{present:o||s.open,children:t.jsx(s.disableHoverableContent?d6:l6,{side:i,...a,ref:n})})})),l6=i.forwardRef(((e,n)=>{const r=Q4(a6,e.__scopeTooltip),o=W4(a6,e.__scopeTooltip),a=i.useRef(null),s=XU(n,a),[l,c]=i.useState(null),{trigger:u,onClose:d}=r,p=a.current,{onPointerInTransitChange:f}=o,h=i.useCallback((()=>{c(null),f(!1)}),[f]),m=i.useCallback(((e,t)=>{const n={x:e.clientX,y:e.clientY},r=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(n,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(n,e.currentTarget.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...r,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);c(o),f(!0)}),[f]);return i.useEffect((()=>()=>h()),[h]),i.useEffect((()=>{if(u&&p){const e=e=>m(e,p),t=e=>m(e,u);return u.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}}),[u,p,m,h]),i.useEffect((()=>{if(l){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||p?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i].x,s=t[i].y,l=t[a].y;s>r!=l>r&&n<(t[a].x-e)*(r-s)/(l-s)+e&&(o=!o)}return o}(n,l);r?h():o&&(h(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,p,l,d,h]),t.jsx(d6,{...e,ref:s})})),[c6,u6]=V4(X4,{isInside:!1}),d6=i.forwardRef(((e,n)=>{const{__scopeTooltip:r,children:o,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=e,u=Q4(a6,r),d=z4(r),{onClose:p}=u;return i.useEffect((()=>(document.addEventListener(G4,p),()=>document.removeEventListener(G4,p))),[p]),i.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,p]),t.jsx(D4,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:t.jsxs(_1,{"data-state":u.stateAttribute,...d,...c,ref:n,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[t.jsx(qQ,{children:o}),t.jsx(c6,{scope:r,isInside:!0,children:t.jsx($4,{id:u.contentId,role:"tooltip",children:a||o})})]})})}));s6.displayName=a6;var p6="TooltipArrow";i.forwardRef(((e,n)=>{const{__scopeTooltip:r,...o}=e,i=z4(r);return u6(p6,r).isInside?null:t.jsx(S1,{...i,...o,ref:n})})).displayName=p6;var f6=i6,h6=s6;const m6=Y4,g6=J4,v6=t6,y6=i.forwardRef((({className:e,sideOffset:n=4,...r},o)=>t.jsx(f6,{children:t.jsx(h6,{ref:o,sideOffset:n,className:Zd("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})})));y6.displayName=h6.displayName;const b6=({rowOriginal:e,constructNavigationUrl:n,cellText:r,cellIcon:o=null,tooltipIcon:i=null,tooltipText:a=null})=>{const s=q5();return a?t.jsx(m6,{children:t.jsx("div",{className:"text-sm h-8 flex items-center justify-end",children:t.jsxs(g6,{children:[t.jsx(v6,{asChild:!0,children:t.jsxs(vZ,{variant:"outline",onClick:()=>s(n(e.id)),children:[o,r,i]})}),t.jsx(y6,{className:"max-w-[300px] text-sm bg-white border border-gray-200 rounded-lg p-4",children:t.jsx("p",{className:"text-muted-foreground",children:a})})]})})}):t.jsx("div",{className:"text-sm h-8 flex items-center justify-end",children:t.jsxs(vZ,{variant:"outline",onClick:()=>s(n(e.id)),children:[o,r,i]})})};var x6,w6="dismissableLayer.update",_6="dismissableLayer.pointerDownOutside",S6="dismissableLayer.focusOutside",E6=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),T6=i.forwardRef(((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=i.useContext(E6),[p,f]=i.useState(null),h=p?.ownerDocument??globalThis?.document,[,m]=i.useState({}),g=XU(n,(e=>f(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=p?v.indexOf(p):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,_=x>=b,S=function(e,t=globalThis?.document){const n=VQ(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){A6(_6,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));_&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())}),h),E=function(e,t=globalThis?.document){const n=VQ(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){A6(S6,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),h);return JQ((e=>{x===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),i.useEffect((()=>{if(p)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(x6=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),C6(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=x6)}}),[p,h,r,d]),i.useEffect((()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),C6())}),[p,d]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(w6,e),()=>document.removeEventListener(w6,e)}),[]),t.jsx(WQ.div,{...u,ref:g,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:FQ(e.onFocusCapture,E.onFocusCapture),onBlurCapture:FQ(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:FQ(e.onPointerDownCapture,S.onPointerDownCapture)})}));T6.displayName="DismissableLayer";function C6(){const e=new CustomEvent(w6);document.dispatchEvent(e)}function A6(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?YQ(o,i):o.dispatchEvent(i)}i.forwardRef(((e,n)=>{const r=i.useContext(E6),o=i.useRef(null),a=XU(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.jsx(WQ.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var N6="Popover",[R6,O6]=UQ(N6,[o1]),P6=o1(),[k6,M6]=R6(N6),j6=e=>{const{__scopePopover:n,children:r,open:o,defaultOpen:a,onOpenChange:s,modal:l=!1}=e,c=P6(n),u=i.useRef(null),[d,p]=i.useState(!1),[f=!1,h]=BQ({prop:o,defaultProp:a,onChange:s});return t.jsx(x1,{...c,children:t.jsx(k6,{scope:n,contentId:EJ(),triggerRef:u,open:f,onOpenChange:h,onOpenToggle:i.useCallback((()=>h((e=>!e))),[h]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback((()=>p(!0)),[]),onCustomAnchorRemove:i.useCallback((()=>p(!1)),[]),modal:l,children:r})})};j6.displayName=N6;var L6="PopoverAnchor";i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,a=M6(L6,r),s=P6(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=a;return i.useEffect((()=>(l(),()=>c())),[l,c]),t.jsx(w1,{...s,...o,ref:n})})).displayName=L6;var D6="PopoverTrigger",I6=i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,i=M6(D6,r),a=P6(r),s=XU(n,i.triggerRef),l=t.jsx(WQ.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":W6(i.open),...o,ref:s,onClick:FQ(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:t.jsx(w1,{asChild:!0,...a,children:l})}));I6.displayName=D6;var F6="PopoverPortal",[U6,$6]=R6(F6,{forceMount:void 0}),V6=e=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=e,a=M6(F6,n);return t.jsx(U6,{scope:n,forceMount:r,children:t.jsx(T1,{present:r||a.open,children:t.jsx(E1,{asChild:!0,container:i,children:o})})})};V6.displayName=F6;var B6="PopoverContent",z6=i.forwardRef(((e,n)=>{const r=$6(B6,e.__scopePopover),{forceMount:o=r.forceMount,...i}=e,a=M6(B6,e.__scopePopover);return t.jsx(T1,{present:o||a.open,children:t.jsx(a.modal?H6:q6,{...i,ref:n})})}));z6.displayName=B6;var H6=i.forwardRef(((e,n)=>{const r=M6(B6,e.__scopePopover),o=i.useRef(null),a=XU(n,o),s=i.useRef(!1);return i.useEffect((()=>{const e=o.current;if(e)return LV(e)}),[]),t.jsx(NV,{as:zQ,allowPinchZoom:!0,children:t.jsx(G6,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:FQ(e.onCloseAutoFocus,(e=>{e.preventDefault(),s.current||r.triggerRef.current?.focus()})),onPointerDownOutside:FQ(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent;s.current=2===t.button||0===t.button&&!0===t.ctrlKey}),{checkForDefaultPrevented:!1}),onFocusOutside:FQ(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),q6=i.forwardRef(((e,n)=>{const r=M6(B6,e.__scopePopover),o=i.useRef(!1),a=i.useRef(!1);return t.jsx(G6,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const n=t.target,i=r.triggerRef.current?.contains(n);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),G6=i.forwardRef(((e,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...p}=e,f=M6(B6,r),h=P6(r);return cJ(),t.jsx(hJ,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:t.jsx(T6,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:t.jsx(_1,{"data-state":W6(f.open),role:"dialog",id:f.contentId,...h,...p,ref:n,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),K6="PopoverClose";i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,i=M6(K6,r);return t.jsx(WQ.button,{type:"button",...o,ref:n,onClick:FQ(e.onClick,(()=>i.onOpenChange(!1)))})})).displayName=K6;function W6(e){return e?"open":"closed"}i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,i=P6(r);return t.jsx(S1,{...i,...o,ref:n})})).displayName="PopoverArrow";var Y6=V6,X6=z6;const Z6=j6,Q6=I6,J6=n.forwardRef((({className:e,align:n="center",sideOffset:r=4,...o},i)=>t.jsx(Y6,{children:t.jsx(X6,{ref:i,align:n,sideOffset:r,className:Zd("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})})));J6.displayName=X6.displayName;const e8={[Ve.DRAFT]:"Draft",[Ve.ACTIVE]:"Active",[Ve.RUNNING]:"Running",[Ve.COMPLETED]:"Completed",[Ve.FAILED]:"Failed",[Ve.DEACTIVATED]:"Deactivated"},t8={[Ve.DRAFT]:"bg-gray-500",[Ve.ACTIVE]:"bg-blue-500",[Ve.RUNNING]:"bg-yellow-500",[Ve.COMPLETED]:"bg-green-500",[Ve.FAILED]:"bg-red-500",[Ve.DEACTIVATED]:"bg-red-500"},n8={[Ve.DRAFT]:"bg-gray-100 text-gray-700 px-2 py-1",[Ve.ACTIVE]:"bg-blue-100 text-blue-700 px-2 py-1",[Ve.RUNNING]:"bg-yellow-100 text-yellow-700 px-2 py-1",[Ve.COMPLETED]:"bg-green-100 text-green-700 px-2 py-1",[Ve.FAILED]:"bg-red-100 text-red-700 px-2 py-1",[Ve.DEACTIVATED]:"bg-red-100 text-red-700 px-2 py-1"},r8={[Ve.DRAFT]:`Draft ${ff("engage:automation")?.toLowerCase()} can be activated or deactivated`,[Ve.ACTIVE]:`Active ${ff("engage:automation")?.toLowerCase()} can be drafted, deactivated, run, or marked as failed`,[Ve.RUNNING]:`Running ${ff("engage:automation")?.toLowerCase()} can be completed or marked as failed`,[Ve.COMPLETED]:`Completed ${ff("engage:automation")?.toLowerCase()} can only be marked as failed`,[Ve.FAILED]:`Failed ${ff("engage:automation")?.toLowerCase()} requires manual intervention to change state`,[Ve.DEACTIVATED]:`Deactivated ${ff("engage:automation")?.toLowerCase()} cannot be reactivated - create a new one instead`},o8={[Ve.DRAFT]:[Ve.ACTIVE,Ve.DEACTIVATED],[Ve.ACTIVE]:[Ve.DRAFT],[Ve.RUNNING]:[],[Ve.COMPLETED]:[],[Ve.FAILED]:[],[Ve.DEACTIVATED]:[]},i8=({rowOriginal:e,id:r,onToggle:o,className:i="",vsaasManaged:a=!1})=>{const[s,l]=n.useState(!1),c=e.status,u=(o8[c]||[]).filter((e=>!1===a||e!==Ve.DEACTIVATED)),d=u.length>0;return t.jsx("div",{className:`${i}`,onClick:e=>e.stopPropagation(),children:t.jsx(m6,{children:t.jsxs(Z6,{open:!!d&&s,onOpenChange:l,children:[t.jsx(Q6,{asChild:!0,children:t.jsx("div",{className:"relative",children:t.jsxs(vZ,{variant:"outline",className:`flex items-center justify-between px-4 py-2 rounded-md w-full ${n8[c]} ${d?"":"cursor-not-allowed opacity-80"}`,onClick:e=>{e.stopPropagation(),d&&l(!s)},children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:`w-2 h-2 rounded-full mr-2 ${t8[c]}`}),t.jsx("span",{children:e8[c]})]}),d?t.jsx(fu,{className:"h-4 w-4 ml-2"}):t.jsxs(g6,{children:[t.jsx(v6,{asChild:!0,children:t.jsx(Cu,{className:"h-4 w-4 ml-2 text-gray-500"})}),t.jsx(y6,{className:"max-w-xs p-2",children:t.jsx("p",{children:r8[c]})})]})]})})}),d&&t.jsx(J6,{className:"w-full p-2",align:"center",sideOffset:5,children:t.jsx("div",{className:"py-1 flex flex-col gap-2 justify-start items-center",onClick:e=>e.stopPropagation(),children:u.map((e=>t.jsxs(vZ,{variant:"ghost",className:"flex justify-start items-center px-4 py-2 text-sm w-full text-left hover:bg-gray-100 rounded-none "+(c===e?"font-medium":""),onClick:()=>(o(r,e),void l(!1)),children:[t.jsx("div",{className:`w-2 h-2 rounded-full ${t8[e]} mr-2`}),e8[e]]},e)))})})]})})})};function a8(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function s8(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const l8=6048e5,c8=43200;let u8={};function d8(){return u8}function p8(e,t){const n=d8(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=a8(e),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function f8(e){return p8(e,{weekStartsOn:1})}function h8(e){const t=a8(e),n=t.getFullYear(),r=s8(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=f8(r),i=s8(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const a=f8(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function m8(e){const t=a8(e);return t.setHours(0,0,0,0),t}function g8(e){const t=a8(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function v8(e,t){return function(e,t){return s8(e,+a8(e)+t)}(e,6e4*t)}function y8(e,t){const n=a8(e),r=a8(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function b8(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const n=a8(e);return!isNaN(Number(n))}function x8(e){const t=a8(e);return+function(e){const t=a8(e);return t.setHours(23,59,59,999),t}(t)==+function(e){const t=a8(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t)}function w8(e,t){const n=a8(e),r=a8(t),o=y8(n,r),i=Math.abs(function(e,t){const n=a8(e),r=a8(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(n,r));let a;if(i<1)a=0;else{1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*i);let t=y8(n,r)===-o;x8(a8(e))&&1===i&&1===y8(e,r)&&(t=!1),a=o*(i-Number(t))}return 0===a?0:a}function _8(e,t,n){const r=function(e,t){return+a8(e)-+a8(t)}(e,t)/1e3;return(o=n?.roundingMethod,e=>{const t=(o?Math[o]:Math.trunc)(e);return 0===t?0:t})(r);var o}const S8={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function E8(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const T8={date:E8({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:E8({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:E8({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},C8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function A8(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function N8(e){return(t,n={})=>{const r=n.width,o=t.match(r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth]);if(!o)return null;const i=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(a)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(a,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(a,(e=>e.test(i)));let l;l=e.valueCallback?e.valueCallback(s):s,l=n.valueCallback?n.valueCallback(l):l;return{value:l,rest:t.slice(i.length)}}}var R8;const O8={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=S8[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:T8,formatRelative:(e,t,n,r)=>C8[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:A8({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:A8({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:A8({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:A8({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:A8({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(R8={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(R8.matchPattern);if(!n)return null;const r=n[0],o=e.match(R8.parsePattern);if(!o)return null;let i=R8.valueCallback?R8.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:N8({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:N8({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:N8({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:N8({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:N8({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function P8(e){const t=a8(e),n=function(e,t){const n=m8(e),r=m8(t),o=+n-g8(n),i=+r-g8(r);return Math.round((o-i)/864e5)}(t,function(e){const t=a8(e),n=s8(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t));return n+1}function k8(e){const t=a8(e),n=+f8(t)-+function(e){const t=h8(e),n=s8(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),f8(n)}(t);return Math.round(n/l8)+1}function M8(e,t){const n=a8(e),r=n.getFullYear(),o=d8(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=s8(e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=p8(a,t),l=s8(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=p8(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function j8(e,t){const n=a8(e),r=+p8(n,t)-+function(e,t){const n=d8(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=M8(e,t),i=s8(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),p8(i,t)}(n,t);return Math.round(r/l8)+1}function L8(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const D8={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return L8("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):L8(n+1,2)},d:(e,t)=>L8(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>L8(e.getHours()%12||12,t.length),H:(e,t)=>L8(e.getHours(),t.length),m:(e,t)=>L8(e.getMinutes(),t.length),s:(e,t)=>L8(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return L8(Math.trunc(r*Math.pow(10,n-3)),t.length)}},I8="midnight",F8="noon",U8="morning",$8="afternoon",V8="evening",B8="night",z8={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear();return n.ordinalNumber(t>0?t:1-t,{unit:"year"})}return D8.y(e,t)},Y:function(e,t,n,r){const o=M8(e,r),i=o>0?o:1-o;if("YY"===t){return L8(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):L8(i,t.length)},R:function(e,t){return L8(h8(e),t.length)},u:function(e,t){return L8(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return L8(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return L8(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return D8.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return L8(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=j8(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):L8(o,t.length)},I:function(e,t,n){const r=k8(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):L8(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):D8.d(e,t)},D:function(e,t,n){const r=P8(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):L8(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return L8(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return L8(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return L8(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?F8:0===r?I8:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?V8:r>=12?$8:r>=4?U8:B8,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return D8.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):D8.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):L8(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):L8(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):D8.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):D8.s(e,t)},S:function(e,t){return D8.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return q8(r);case"XXXX":case"XX":return G8(r);default:return G8(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return q8(r);case"xxxx":case"xx":return G8(r);default:return G8(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+H8(r,":");default:return"GMT"+G8(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+H8(r,":");default:return"GMT"+G8(r,":")}},t:function(e,t,n){return L8(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return L8(e.getTime(),t.length)}};function H8(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+L8(i,2)}function q8(e,t){if(e%60==0){return(e>0?"-":"+")+L8(Math.abs(e)/60,2)}return G8(e,t)}function G8(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+L8(Math.trunc(r/60),2)+t+L8(r%60,2)}const K8=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},W8=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Y8={p:W8,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return K8(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",K8(r,t)).replace("{{time}}",W8(o,t))}},X8=/^D+$/,Z8=/^Y+$/,Q8=["D","DD","YY","YYYY"];const J8=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,e9=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,t9=/^'([^]*?)'?$/,n9=/''/g,r9=/[a-zA-Z]/;function o9(e,t,n){const r=d8(),o=r.locale??O8,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=a8(e);if(!b8(s))throw new RangeError("Invalid time value");let l=t.match(e9).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Y8[t])(e,o.formatLong)}return e})).join("").match(J8).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:i9(e)};if(z8[t])return{isToken:!0,value:e};if(t.match(r9))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map((n=>{if(!n.isToken)return n.value;const r=n.value;(function(e){return Z8.test(e)}(r)||function(e){return X8.test(e)}(r))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(Q8.includes(e))throw new RangeError(r)}(r,t,String(e));return(0,z8[r[0]])(s,r,o.localize,c)})).join("")}function i9(e){const t=e.match(t9);return t?t[1].replace(n9,"'"):e}function a9(e,t){return function(e,t,n){const r=d8(),o=n?.locale??r.locale??O8,i=y8(e,t);if(isNaN(i))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:i});let s,l;i>0?(s=a8(t),l=a8(e)):(s=a8(e),l=a8(t));const c=_8(l,s),u=(g8(l)-g8(s))/1e3,d=Math.round((c-u)/60);let p;if(d<2)return n?.includeSeconds?c<5?o.formatDistance("lessThanXSeconds",5,a):c<10?o.formatDistance("lessThanXSeconds",10,a):c<20?o.formatDistance("lessThanXSeconds",20,a):c<40?o.formatDistance("halfAMinute",0,a):o.formatDistance(c<60?"lessThanXMinutes":"xMinutes",1,a):0===d?o.formatDistance("lessThanXMinutes",1,a):o.formatDistance("xMinutes",d,a);if(d<45)return o.formatDistance("xMinutes",d,a);if(d<90)return o.formatDistance("aboutXHours",1,a);if(d<1440){const e=Math.round(d/60);return o.formatDistance("aboutXHours",e,a)}if(d<2520)return o.formatDistance("xDays",1,a);if(d<c8){const e=Math.round(d/1440);return o.formatDistance("xDays",e,a)}if(d<86400)return p=Math.round(d/c8),o.formatDistance("aboutXMonths",p,a);if(p=w8(l,s),p<12){const e=Math.round(d/c8);return o.formatDistance("xMonths",e,a)}{const e=p%12,t=Math.trunc(p/12);return e<3?o.formatDistance("aboutXYears",t,a):e<9?o.formatDistance("overXYears",t,a):o.formatDistance("almostXYears",t+1,a)}}(e,function(e){return s8(e,Date.now())}(e),t)}function s9({accessorKey:e,header:n,meta:r,size:o,minSize:i,maxSize:a,enableSorting:s=!0,enableHiding:l=!0,headerClassName:c,cellClassName:u,cellFormatter:d}){return{accessorKey:e,header:()=>t.jsx("div",{className:`flex items-center h-8 px-3 font-medium whitespace-nowrap text-muted-foreground ${"right"===r?.align?"justify-end float-right":"center"===r?.align?"justify-center":"justify-start"} ${c||""}`.trim(),children:"function"==typeof n?n():t.jsx("span",{children:n})}),cell:e=>t.jsx("div",{className:`flex items-center h-8 ${"right"===r?.align?"justify-end":"center"===r?.align?"justify-center":"justify-start"} ${u||""} ${r?.className||""}`.trim(),children:d?d(e):e.getValue()}),size:o,minSize:i,maxSize:a,enableSorting:s,enableHiding:l,meta:r}}const l9=(e,t,n,r="Error",o="Please try again")=>{e(!1),"error"===n&&t({title:r,description:o,variant:"destructive"})},c9=e=>{switch(e){case Ve.ACTIVE:return"statusActive";case Ve.COMPLETED:return"statusCompleted";case Ve.DRAFT:return"statusDraft";case Ve.DEACTIVATED:return"statusDeactivated";case Ve.FAILED:return"statusFailed";case Ve.RUNNING:return"statusRunning";default:throw LX(e,Ve)}},u9=e=>{switch(e){case rZ.ALL_USERS:return`Default ${ff("engage:segment").toLowerCase()} that contains all ${ff("engage:user").toLowerCase()}}. This is not editable or deletable.`;case rZ.MANAGED:return`System-defined ${ff("engage:segment").toLowerCase()} that are not editable or deletable.`;case rZ.CUSTOM:return`Custom ${ff("engage:segment").toLowerCase()} that you can edit and delete as needed.`;default:throw LX(e,rZ)}};function d9(e="name",n,r=!1){return s9({accessorKey:e,header:n,meta:{align:"left",displayName:n,className:"min-w-[240px] w-full"},cellClassName:"pl-3 pr-2",cellFormatter:e=>{const n=e.getValue(),{original:o}=e.row,i=o.status,a=o.type,s=i?i[0].toUpperCase()+i.slice(1):"",l={[Ve.ACTIVE]:"bg-blue-500",[Ve.COMPLETED]:"bg-green-500",[Ve.DRAFT]:"bg-gray-500",[Ve.DEACTIVATED]:"bg-red-500",[Ve.FAILED]:"bg-red-500",[Ve.RUNNING]:"bg-yellow-500"};return t.jsxs("div",{className:"w-full flex gap-6 justify-between items-center",children:[t.jsxs("div",{className:"flex gap-1 items-center w-full",children:[t.jsx("div",{className:`w-2 h-2 rounded-full mr-3 flex-shrink-0 ${a?{[rZ.ALL_USERS]:"bg-purple-500",[rZ.MANAGED]:"bg-teal-500",[rZ.CUSTOM]:"bg-amber-500"}[a]:i?l[i]:"bg-blue-500"}`}),t.jsxs("div",{className:"flex-1 flex flex-col gap-0.5",children:[t.jsx("span",{className:"leading-tight font-medium text-sm overflow-hidden text-ellipsis",children:n}),r&&o?.description&&t.jsx("div",{className:"relative h-4",children:t.jsx("div",{className:"absolute inset-0 text-muted-foreground text-xs truncate whitespace-nowrap overflow-hidden w-full",children:o?.description})})]})]}),i&&t.jsx("div",{className:"flex-shrink-0",children:t.jsx(kZ,{variant:c9(i),children:s})})]})}})}function p9(){return s9({accessorKey:"type",header:"Type",meta:{align:"right",displayName:`${ff("engage:segment")} type`},cellClassName:"pr-4",cellFormatter:e=>{const n=e.getValue(),r=n?n.split("_").map((e=>e[0].toUpperCase()+e.slice(1).toLowerCase())).join(" "):"Unknown";let o;if(!n||n!==rZ.ALL_USERS&&n!==rZ.MANAGED&&n!==rZ.CUSTOM)o="statusDraft";else try{o=(e=>{switch(e){case rZ.ALL_USERS:return"segmentAllUsers";case rZ.MANAGED:return"segmentManaged";case rZ.CUSTOM:return"segmentCustom";default:throw LX(e,rZ)}})(n)}catch(JSe){if(!(JSe instanceof LX))throw JSe;o="statusDraft"}return t.jsx(m6,{children:t.jsxs(g6,{children:[t.jsx(v6,{asChild:!0,children:t.jsx(kZ,{variant:o,className:"cursor-help",children:r})}),t.jsx(y6,{side:"top",className:"max-w-[250px] text-sm bg-white border border-gray-200 rounded-lg p-3",children:t.jsx("p",{className:"text-muted-foreground",children:n&&u9(n)||`Unknown ${ff("engage:segment").toLowerCase()} type`})})]})})}})}function f9(e="updated_at"){return function({accessorKey:e,header:n,meta:r={align:"right"},size:o=160,minSize:i,maxSize:a,enableSorting:s=!0,enableHiding:l=!0,headerClassName:c,cellClassName:u,formatType:d="relative"}){return{accessorKey:e,header:()=>t.jsx("div",{className:`float-right h-8 flex items-center justify-end px-3 font-medium whitespace-nowrap text-muted-foreground ${c||""}`.trim(),children:t.jsx("span",{children:n})}),cell:e=>{const n=e.getValue();let o="N/A";return n&&(o="relative"===d?a9(new Date(n),{addSuffix:!0}):new Date(n).toLocaleDateString()),t.jsx("div",{className:`font-variant-numeric w-full h-8 flex items-center justify-end pr-4 whitespace-nowrap ${u||""} ${r?.className||""}`.trim(),children:o})},size:o,minSize:i,maxSize:a,enableSorting:s,enableHiding:l,meta:r}}({accessorKey:e,header:"Last Modified",formatType:"relative",size:160,meta:{align:"right",displayName:"Last Modified"}})}function h9(e,n,r){return function({accessorKey:e,header:n,meta:r={align:"right"},size:o,minSize:i,maxSize:a=120,enableSorting:s=!0,enableHiding:l=!0,headerClassName:c,cellClassName:u,prefix:d="",suffix:p="",localeStringOptions:f}){return{accessorKey:e,header:()=>t.jsx("div",{className:`float-right h-8 flex items-center justify-end px-3 font-medium whitespace-nowrap text-muted-foreground ${c||""}`.trim(),children:"function"==typeof n?n():t.jsx("span",{children:n})}),cell:e=>{const n=e.getValue()??0;return t.jsxs("div",{className:`font-variant-numeric h-8 flex items-center justify-end pr-4 ${u||""} ${r?.className||""}`.trim(),children:[d,n.toLocaleString(void 0,f),p]})},size:o||(r?.className?.includes("w-")?void 0:100),minSize:i,maxSize:a,enableSorting:s,enableHiding:l,meta:r}}({accessorKey:e,header:n,prefix:r,meta:{align:"right",displayName:n}})}function m9(e){const{setUrl:n,onToggle:r,automationName:o,vsaasManaged:i}=e;return s9({accessorKey:"status",header:"Status",enableHiding:!1,size:180,maxSize:200,meta:{align:"right"},cellClassName:"pr-4",cellFormatter:e=>{const{original:a}=e.row;return(a.status??null)===Ve.DRAFT&&n&&!1===i?t.jsx(b6,{rowOriginal:a,constructNavigationUrl:()=>n(a.id),cellText:"Action Required",tooltipIcon:t.jsx(Cu,{className:"h-4 w-4 text-muted-foreground !cursor-help z-99"}),tooltipText:`Your ${o?.toLowerCase()} is currently in draft mode. Please review and activate it to begin sending messages.`}):t.jsx(i8,{className:"flex items-center justify-end",rowOriginal:a,id:a.id,onToggle:r||(()=>{}),vsaasManaged:i})}})}function g9(e){const n={align:"right",displayName:`Update ${ff("engage:segment").toLowerCase()}`};return function({id:e="actions",header:n,meta:r={align:"center"},text:o,size:i=80,minSize:a=80,maxSize:s=80,enableSorting:l=!1,enableHiding:c=!1,headerClassName:u,icon:d,onAction:p,actionButtonVariant:f="outline",actionButtonSize:h="default"}){return{id:e,header:()=>t.jsx("div",{className:`float-right h-8 flex items-center justify-end px-3 font-medium whitespace-nowrap text-muted-foreground ${u||""}`.trim(),children:"function"==typeof n?n():t.jsx("span",{children:n})}),cell:e=>{const n=e.row.original,i=n?.type,a="custom"!==i;return t.jsx("div",{className:`flex items-center h-8 pr-3 ${"right"===r?.align?"justify-end":"center"===r?.align?"justify-center":"justify-start"} ${r?.className||""}`.trim(),children:t.jsxs(vZ,{variant:f,size:h,disabled:a,onClick:()=>p(n),children:[t.jsx(d,{className:"h-4 w-4"}),t.jsx("span",{children:o})]})})},size:i,minSize:a,maxSize:s,enableSorting:l,enableHiding:c,meta:r}}({id:"edit",header:`${ff("engage:segment")} actions`,icon:Uu,onAction:t=>{e(t.id)},text:"Edit",enableHiding:!1,size:80,meta:n})}function v9(e){const{automationName:t,setUrl:n,onToggle:r,vsaasManaged:o=!1}=e;return[d9("name","Name",!0),h9("derivedRevenue","Sales","$"),h9("emailsSent","Email Sent"),h9("smsSent","SMS Sent"),f9(),m9({setUrl:n,onToggle:r,automationName:t,vsaasManaged:o})]}const y9=({handleBack:e,handleNext:n,handleSkipAndSaveAsDraft:r,backText:o,nextText:i,backDisabled:a,nextDisabled:s,hideBack:l})=>t.jsxs("div",{className:"flex gap-4 py-2",children:[!l&&t.jsxs(vZ,{onClick:e,disabled:a,variant:"secondary",className:Zd("flex items-center gap-2",a&&"opacity-50 cursor-not-allowed"),children:[t.jsx(wZ.BackButton,{}),t.jsx("span",{children:o})]}),t.jsx(vZ,{onClick:r,variant:"secondary",className:"flex items-center gap-2",children:"Skip & Save as Draft"}),t.jsxs(vZ,{onClick:n,disabled:s,className:Zd("flex items-center gap-2 --reach-destructive",s&&"opacity-50 cursor-not-allowed"),children:[t.jsx("span",{children:i}),t.jsx(wZ.NextButton,{})]})]}),b9=()=>{const e=ve({queryKey:["channel-accounts"],queryFn:()=>(async()=>(await Re("/channel/accounts",{method:"GET"})).data)()});return{channelAccounts:e.data,isFetching:e.isFetching,isLoading:e.isLoading,fetchError:e.error,refetchChannelAccounts:e.refetch}};var x9=(e=>(e.REACH_MANAGED="reach-managed",e.TWILLIO="twillio",e))(x9||{});const w9=()=>{const e=ve({queryKey:["channel-senders"],queryFn:()=>(async()=>(await Re(`${u}`,{method:"GET"})).data)()});return{channelSenders:e.data,isFetching:e.isFetching,isLoading:e.isLoading,fetchError:e.error,refetchChannelSenders:e.refetch}},_9=()=>{const e=ce(),t=ye({mutationFn:e=>(async(e,t)=>(await Re(`${u}/${t}`,{method:"PATCH",body:JSON.stringify(e)})).data)(e.toUpdate,e.id),onSuccess:()=>{e.invalidateQueries({queryKey:["channel-senders"]})}});return{updateChannelSender:t.mutate,isUpdating:t.isPending,updateError:t.error}},S9=(e,t)=>{const[r,o]=n.useState(e);return n.useEffect((()=>{const n=setTimeout((()=>{o(e)}),t);return()=>clearTimeout(n)}),[e,t]),r},E9=({className:e})=>t.jsx("div",{className:Zd("bg-red-500/10 p-2 rounded-full text-red-500",e),children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),T9=({title:e,alertText:r,Icon:o=Cu,onClick:i,asChild:a=!0})=>{const[s,l]=n.useState(!1);return t.jsx(m6,{children:t.jsxs(g6,{open:s,onOpenChange:l,children:[t.jsx(v6,{asChild:a,onClick:e=>{e.stopPropagation(),i?(i(),l(!1)):l(!s)},children:t.jsx(o,{className:"h-3.5 w-3.5 cursor-pointer transition-colors"})}),t.jsx(y6,{className:"text-left",children:t.jsxs("div",{className:"flex flex-col items-start gap-2 max-w-[300px]",children:[r&&t.jsxs(t.Fragment,{children:[t.jsx(E9,{}),t.jsx("p",{className:"font-semibold text-amber-500",children:r})]}),t.jsx("p",{className:"text-[13px] leading-relaxed text-primary-foreground/90 text-left",children:e})]})})]})})};function C9(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function A9(e){const n=N9(e),r=i.forwardRef(((e,r)=>{const{children:o,...a}=e,s=i.Children.toArray(o),l=s.find(O9);if(l){const e=l.props.children,o=s.map((t=>t===l?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(n,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})}));return r.displayName=`${e}.Slot`,r}function N9(e){const t=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?function(...e){return t=>{let n=!1;const r=e.map((e=>{const r=C9(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():C9(e[t],null)}}}}(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var R9=Symbol("radix.slottable");function O9(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===R9}var P9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,n)=>{const r=A9(`Primitive.${n}`),o=i.forwardRef(((e,o)=>{const{asChild:i,...a}=e,s=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...a,ref:o})}));return o.displayName=`Primitive.${n}`,{...e,[n]:o}}),{}),k9=i.forwardRef(((e,n)=>t.jsx(P9.label,{...e,ref:n,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));k9.displayName="Label";var M9=k9;const j9=ru("text-foreground text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),L9=i.forwardRef((({className:e,...n},r)=>t.jsx(M9,{ref:r,className:Zd(j9(),e),...n})));function D9(e,[t,n]){return Math.min(n,Math.max(t,e))}function I9(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function F9(e,n=[]){let r=[];const o=()=>{const t=r.map((e=>i.createContext(e)));return function(n){const r=n?.[e]||t;return i.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(n,o){const a=i.createContext(o),s=r.length;r=[...r,o];const l=n=>{const{scope:r,children:o,...l}=n,c=r?.[e]?.[s]||a,u=i.useMemo((()=>l),Object.values(l));return t.jsx(c.Provider,{value:u,children:o})};return l.displayName=n+"Provider",[l,function(t,r){const l=i.useContext(r?.[e]?.[s]||a);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},U9(o,...n)]}function U9(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return i.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function $9(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function V9(...e){return t=>{let n=!1;const r=e.map((e=>{const r=$9(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():$9(e[t],null)}}}}function B9(...e){return i.useCallback(V9(...e),e)}function z9(e){const n=H9(e),r=i.forwardRef(((e,r)=>{const{children:o,...a}=e,s=i.Children.toArray(o),l=s.find(G9);if(l){const e=l.props.children,o=s.map((t=>t===l?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(n,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})}));return r.displayName=`${e}.Slot`,r}function H9(e){const t=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?V9(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}L9.displayName=M9.displayName;var q9=Symbol("radix.slottable");function G9(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===q9}var K9=i.createContext(void 0);var W9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,n)=>{const r=z9(`Primitive.${n}`),o=i.forwardRef(((e,o)=>{const{asChild:i,...a}=e,s=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...a,ref:o})}));return o.displayName=`Primitive.${n}`,{...e,[n]:o}}),{});function Y9(e){const t=i.useRef(e);return i.useEffect((()=>{t.current=e})),i.useMemo((()=>(...e)=>t.current?.(...e)),[])}var X9,Z9="dismissableLayer.update",Q9="dismissableLayer.pointerDownOutside",J9="dismissableLayer.focusOutside",e7=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),t7=i.forwardRef(((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=i.useContext(e7),[p,f]=i.useState(null),h=p?.ownerDocument??globalThis?.document,[,m]=i.useState({}),g=B9(n,(e=>f(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=p?v.indexOf(p):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,_=x>=b,S=function(e,t=globalThis?.document){const n=Y9(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){r7(Q9,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));_&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())}),h),E=function(e,t=globalThis?.document){const n=Y9(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){r7(J9,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),h);return function(e,t=globalThis?.document){const n=Y9(e);i.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{x===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),i.useEffect((()=>{if(p)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(X9=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),n7(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=X9)}}),[p,h,r,d]),i.useEffect((()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),n7())}),[p,d]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(Z9,e),()=>document.removeEventListener(Z9,e)}),[]),t.jsx(W9.div,{...u,ref:g,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:I9(e.onFocusCapture,E.onFocusCapture),onBlurCapture:I9(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:I9(e.onPointerDownCapture,S.onPointerDownCapture)})}));t7.displayName="DismissableLayer";function n7(){const e=new CustomEvent(Z9);document.dispatchEvent(e)}function r7(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&a.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}i.forwardRef(((e,n)=>{const r=i.useContext(e7),o=i.useRef(null),a=B9(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.jsx(W9.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var o7=0;function i7(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var a7="focusScope.autoFocusOnMount",s7="focusScope.autoFocusOnUnmount",l7={bubbles:!1,cancelable:!0},c7=i.forwardRef(((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[c,u]=i.useState(null),d=Y9(a),p=Y9(s),f=i.useRef(null),h=B9(n,(e=>u(e))),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect((()=>{if(o){let e=function(e){if(m.paused||!c)return;const t=e.target;c.contains(t)?f.current=t:f7(f.current,{select:!0})},t=function(e){if(m.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||f7(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&f7(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,c,m.paused]),i.useEffect((()=>{if(c){h7.add(m);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(a7,l7);c.addEventListener(a7,d),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(f7(r,{select:t}),document.activeElement!==n)return}((e=u7(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&f7(c))}return()=>{c.removeEventListener(a7,d),setTimeout((()=>{const e=new CustomEvent(s7,l7);c.addEventListener(s7,p),c.dispatchEvent(e),e.defaultPrevented||f7(t??document.body,{select:!0}),c.removeEventListener(s7,p),h7.remove(m)}),0)}}var e}),[c,d,p,m]);const g=i.useCallback((e=>{if(!r&&!o)return;if(m.paused)return;const t=document.activeElement;if("Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&t){const n=e.currentTarget,[o,i]=function(e){const t=u7(e),n=d7(t,e),r=d7(t.reverse(),e);return[n,r]}(n);o&&i?e.shiftKey||t!==i?e.shiftKey&&t===o&&(e.preventDefault(),r&&f7(i,{select:!0})):(e.preventDefault(),r&&f7(o,{select:!0})):t===n&&e.preventDefault()}}),[r,o,m.paused]);return t.jsx(W9.div,{tabIndex:-1,...l,ref:h,onKeyDown:g})}));function u7(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}function d7(e,t){for(const n of e)if(!p7(n,{upTo:t}))return n}function p7(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function f7(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}c7.displayName="FocusScope";var h7=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=m7(e,t),e.unshift(t)},remove(t){e=m7(e,t),e[0]?.resume()}}}();function m7(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var g7=globalThis?.document?i.useLayoutEffect:()=>{},v7=i[" useId ".trim().toString()]||(()=>{}),y7=0;function b7(e){const[t,n]=i.useState(v7());return g7((()=>{n((e=>e??String(y7++)))}),[e]),e||(t?`radix-${t}`:"")}var x7=i.forwardRef(((e,n)=>{const{children:r,width:o=10,height:i=5,...a}=e;return t.jsx(W9.svg,{...a,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:t.jsx("polygon",{points:"0,0 30,0 15,10"})})}));x7.displayName="Arrow";var w7=x7;var _7="Popper",[S7,E7]=F9(_7),[T7,C7]=S7(_7),A7=e=>{const{__scopePopper:n,children:r}=e,[o,a]=i.useState(null);return t.jsx(T7,{scope:n,anchor:o,onAnchorChange:a,children:r})};A7.displayName=_7;var N7="PopperAnchor",R7=i.forwardRef(((e,n)=>{const{__scopePopper:r,virtualRef:o,...a}=e,s=C7(N7,r),l=i.useRef(null),c=B9(n,l);return i.useEffect((()=>{s.onAnchorChange(o?.current||l.current)})),o?null:t.jsx(W9.div,{...a,ref:c})}));R7.displayName=N7;var O7="PopperContent",[P7,k7]=S7(O7),M7=i.forwardRef(((e,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:g,...v}=e,y=C7(O7,r),[b,x]=i.useState(null),w=B9(n,(e=>x(e))),[_,S]=i.useState(null),E=function(e){const[t,n]=i.useState(void 0);return g7((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(_),T=E?.width??0,C=E?.height??0,A=o+("center"!==s?"-"+s:""),N="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},R=Array.isArray(d)?d:[d],O=R.length>0,P={padding:N,boundary:R.filter(I7),altBoundary:O},{refs:k,floatingStyles:M,placement:j,isPositioned:L,middlewareData:D}=H0({strategy:"fixed",placement:A,whileElementsMounted:(...e)=>O0(...e,{animationFrame:"always"===m}),elements:{reference:y.anchor},middleware:[G0({mainAxis:a+C,alignmentAxis:l}),u&&K0({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?W0():void 0,...P}),u&&Y0({...P}),X0({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),_&&Q0({element:_,padding:c}),F7({arrowWidth:T,arrowHeight:C}),h&&Z0({strategy:"referenceHidden",...P})]}),[I,F]=U7(j),U=Y9(g);g7((()=>{L&&U?.()}),[L,U]);const $=D.arrow?.x,V=D.arrow?.y,B=0!==D.arrow?.centerOffset,[z,H]=i.useState();return g7((()=>{b&&H(window.getComputedStyle(b).zIndex)}),[b]),t.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:L?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[D.transformOrigin?.x,D.transformOrigin?.y].join(" "),...D.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:t.jsx(P7,{scope:r,placedSide:I,onArrowChange:S,arrowX:$,arrowY:V,shouldHideArrow:B,children:t.jsx(W9.div,{"data-side":I,"data-align":F,...v,ref:w,style:{...v.style,animation:L?void 0:"none"}})})})}));M7.displayName=O7;var j7="PopperArrow",L7={top:"bottom",right:"left",bottom:"top",left:"right"},D7=i.forwardRef((function(e,n){const{__scopePopper:r,...o}=e,i=k7(j7,r),a=L7[i.placedSide];return t.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:t.jsx(w7,{...o,ref:n,style:{...o.style,display:"block"}})})}));function I7(e){return null!==e}D7.displayName=j7;var F7=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=U7(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let f="",h="";return"bottom"===l?(f=i?u:`${d}px`,h=-s+"px"):"top"===l?(f=i?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===l?(f=-s+"px",h=i?u:`${p}px`):"left"===l&&(f=`${r.floating.width+s}px`,h=i?u:`${p}px`),{data:{x:f,y:h}}}});function U7(e){const[t,n="center"]=e.split("-");return[t,n]}var $7=A7,V7=R7,B7=M7,z7=D7,H7=i.forwardRef(((e,n)=>{const{container:o,...a}=e,[s,l]=i.useState(!1);g7((()=>l(!0)),[]);const c=o||s&&globalThis?.document?.body;return c?r.createPortal(t.jsx(W9.div,{...a,ref:n}),c):null}));H7.displayName="Portal";var q7=i[" useInsertionEffect ".trim().toString()]||g7;function G7({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=function({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return q7((()=>{a.current=t}),[t]),i.useEffect((()=>{o.current!==n&&(a.current?.(n),o.current=n)}),[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:o;{const t=i.useRef(void 0!==e);i.useEffect((()=>{const e=t.current;if(e!==l){}t.current=l}),[l,r])}const u=i.useCallback((t=>{if(l){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)}),[l,e,a,s]);return[c,u]}var K7=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});i.forwardRef(((e,n)=>t.jsx(W9.span,{...e,ref:n,style:{...K7,...e.style}}))).displayName="VisuallyHidden";var W7=[" ","Enter","ArrowUp","ArrowDown"],Y7=[" ","Enter"],X7="Select",[Z7,Q7,J7]=function(e){const r=e+"CollectionProvider",[o,i]=F9(r),[a,s]=o(r,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:r,children:o}=e,i=n.useRef(null),s=n.useRef(new Map).current;return t.jsx(a,{scope:r,itemMap:s,collectionRef:i,children:o})};l.displayName=r;const c=e+"CollectionSlot",u=z9(c),d=n.forwardRef(((e,n)=>{const{scope:r,children:o}=e,i=B9(n,s(c,r).collectionRef);return t.jsx(u,{ref:i,children:o})}));d.displayName=c;const p=e+"CollectionItemSlot",f="data-radix-collection-item",h=z9(p),m=n.forwardRef(((e,r)=>{const{scope:o,children:i,...a}=e,l=n.useRef(null),c=B9(r,l),u=s(p,o);return n.useEffect((()=>(u.itemMap.set(l,{ref:l,...a}),()=>{u.itemMap.delete(l)}))),t.jsx(h,{[f]:"",ref:c,children:i})}));return m.displayName=p,[{Provider:l,Slot:d,ItemSlot:m},function(t){const r=s(e+"CollectionConsumer",t);return n.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},i]}(X7),[eee,tee]=F9(X7,[J7,E7]),nee=E7(),[ree,oee]=eee(X7),[iee,aee]=eee(X7),see=e=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:a,onOpenChange:s,value:l,defaultValue:c,onValueChange:u,dir:d,name:p,autoComplete:f,disabled:h,required:m,form:g}=e,v=nee(n),[y,b]=i.useState(null),[x,w]=i.useState(null),[_,S]=i.useState(!1),E=function(e){const t=i.useContext(K9);return e||t||"ltr"}(d),[T,C]=G7({prop:o,defaultProp:a??!1,onChange:s,caller:X7}),[A,N]=G7({prop:l,defaultProp:c,onChange:u,caller:X7}),R=i.useRef(null),O=!y||(g||!!y.closest("form")),[P,k]=i.useState(new Set),M=Array.from(P).map((e=>e.props.value)).join(";");return t.jsx($7,{...v,children:t.jsxs(ree,{required:m,scope:n,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:_,onValueNodeHasChildrenChange:S,contentId:b7(),value:A,onValueChange:N,open:T,onOpenChange:C,dir:E,triggerPointerDownPosRef:R,disabled:h,children:[t.jsx(Z7.Provider,{scope:n,children:t.jsx(iee,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback((e=>{k((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:i.useCallback((e=>{k((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:r})}),O?t.jsxs(Kee,{"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:f,value:A,onChange:e=>N(e.target.value),disabled:h,form:g,children:[void 0===A?t.jsx("option",{value:""}):null,Array.from(P)]},M):null]})})};see.displayName=X7;var lee="SelectTrigger",cee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,disabled:o=!1,...a}=e,s=nee(r),l=oee(lee,r),c=l.disabled||o,u=B9(n,l.onTriggerChange),d=Q7(r),p=i.useRef("touch"),[f,h,m]=Yee((e=>{const t=d().filter((e=>!e.disabled)),n=t.find((e=>e.value===l.value)),r=Xee(t,e,n);void 0!==r&&l.onValueChange(r.value)})),g=e=>{c||(l.onOpenChange(!0),m()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return t.jsx(V7,{asChild:!0,...s,children:t.jsx(W9.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Wee(l.value)?"":void 0,...a,ref:u,onClick:I9(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)})),onPointerDown:I9(a.onPointerDown,(e=>{p.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())})),onKeyDown:I9(a.onKeyDown,(e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||W7.includes(e.key)&&(g(),e.preventDefault())}))})})}));cee.displayName=lee;var uee="SelectValue",dee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,className:o,style:i,children:a,placeholder:s="",...l}=e,c=oee(uee,r),{onValueNodeHasChildrenChange:u}=c,d=void 0!==a,p=B9(n,c.onValueNodeChange);return g7((()=>{u(d)}),[u,d]),t.jsx(W9.span,{...l,ref:p,style:{pointerEvents:"none"},children:Wee(c.value)?t.jsx(t.Fragment,{children:s}):a})}));dee.displayName=uee;var pee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,children:o,...i}=e;return t.jsx(W9.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})}));pee.displayName="SelectIcon";var fee=e=>t.jsx(H7,{asChild:!0,...e});fee.displayName="SelectPortal";var hee="SelectContent",mee=i.forwardRef(((e,n)=>{const r=oee(hee,e.__scopeSelect),[o,s]=i.useState();if(g7((()=>{s(new DocumentFragment)}),[]),!r.open){const n=o;return n?a.createPortal(t.jsx(vee,{scope:e.__scopeSelect,children:t.jsx(Z7.Slot,{scope:e.__scopeSelect,children:t.jsx("div",{children:e.children})})}),n):null}return t.jsx(xee,{...e,ref:n})}));mee.displayName=hee;var gee=10,[vee,yee]=eee(hee),bee=z9("SelectContent.RemoveScroll"),xee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:y,...b}=e,x=oee(hee,r),[w,_]=i.useState(null),[S,E]=i.useState(null),T=B9(n,(e=>_(e))),[C,A]=i.useState(null),[N,R]=i.useState(null),O=Q7(r),[P,k]=i.useState(!1),M=i.useRef(!1);i.useEffect((()=>{if(w)return LV(w)}),[w]),i.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??i7()),document.body.insertAdjacentElement("beforeend",e[1]??i7()),o7++,()=>{1===o7&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),o7--}}),[]);const j=i.useCallback((e=>{const[t,...n]=O().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const i of e){if(i===o)return;if(i?.scrollIntoView({block:"nearest"}),i===t&&S&&(S.scrollTop=0),i===r&&S&&(S.scrollTop=S.scrollHeight),i?.focus(),document.activeElement!==o)return}}),[O,S]),L=i.useCallback((()=>j([C,w])),[j,C,w]);i.useEffect((()=>{P&&L()}),[P,L]);const{onOpenChange:D,triggerPointerDownPosRef:I}=x;i.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||D(!1),document.removeEventListener("pointermove",t),I.current=null};return null!==I.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,D,I]),i.useEffect((()=>{const e=()=>D(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[D]);const[F,U]=Yee((e=>{const t=O().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Xee(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),$=i.useCallback(((e,t,n)=>{const r=!M.current&&!n;(void 0!==x.value&&x.value===t||r)&&(A(e),r&&(M.current=!0))}),[x.value]),V=i.useCallback((()=>w?.focus()),[w]),B=i.useCallback(((e,t,n)=>{(void 0!==x.value&&x.value===t||!M.current&&!n)&&R(e)}),[x.value]),z="popper"===o?_ee:wee,H=z===_ee?{side:c,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:y}:{};return t.jsx(vee,{scope:r,content:w,viewport:S,onViewportChange:E,itemRefCallback:$,selectedItem:C,onItemLeave:V,itemTextRefCallback:B,focusSelectedItem:L,selectedItemText:N,position:o,isPositioned:P,searchRef:F,children:t.jsx(NV,{as:bee,allowPinchZoom:!0,children:t.jsx(c7,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:I9(a,(e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:t.jsx(t7,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:t.jsx(z,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:e=>e.preventDefault(),...b,...H,onPlaced:()=>k(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:I9(b.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=t.indexOf(e.target);t=t.slice(n+1)}setTimeout((()=>j(t))),e.preventDefault()}}))})})})})})}));xee.displayName="SelectContentImpl";var wee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,onPlaced:o,...a}=e,s=oee(hee,r),l=yee(hee,r),[c,u]=i.useState(null),[d,p]=i.useState(null),f=B9(n,(e=>p(e))),h=Q7(r),m=i.useRef(!1),g=i.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=l,w=i.useCallback((()=>{if(s.trigger&&s.valueNode&&c&&d&&v&&y&&b){const e=s.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=b.getBoundingClientRect();if("rtl"!==s.dir){const o=n.left-(r.left-t.left),i=e.width+(e.left-o),a=Math.max(i,t.width),s=window.innerWidth-gee,l=D9(o,[gee,Math.max(gee,s-a)]);c.style.minWidth=i+"px",c.style.left=l+"px"}else{const o=window.innerWidth-n.right-(t.right-r.right),i=window.innerWidth-e.right-o,a=e.width+i,s=Math.max(a,t.width),l=window.innerWidth-gee,u=D9(o,[gee,Math.max(gee,l-s)]);c.style.minWidth=a+"px",c.style.right=u+"px"}const i=h(),a=window.innerHeight-2*gee,l=v.scrollHeight,u=window.getComputedStyle(d),p=parseInt(u.borderTopWidth,10),f=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),x=p+f+l+parseInt(u.paddingBottom,10)+g,w=Math.min(5*y.offsetHeight,x),_=window.getComputedStyle(v),S=parseInt(_.paddingTop,10),E=parseInt(_.paddingBottom,10),T=e.top+e.height/2-gee,C=a-T,A=y.offsetHeight/2,N=p+f+(y.offsetTop+A),R=x-N;if(N<=T){const e=i.length>0&&y===i[i.length-1].ref.current;c.style.bottom="0px";const t=Math.max(C,A+(e?E:0)+(d.clientHeight-v.offsetTop-v.offsetHeight)+g);c.style.height=N+t+"px"}else{const e=i.length>0&&y===i[0].ref.current;c.style.top="0px";const t=Math.max(T,p+v.offsetTop+(e?S:0)+A);c.style.height=t+R+"px",v.scrollTop=N-T+v.offsetTop}c.style.margin=`${gee}px 0`,c.style.minHeight=w+"px",c.style.maxHeight=a+"px",o?.(),requestAnimationFrame((()=>m.current=!0))}}),[h,s.trigger,s.valueNode,c,d,v,y,b,s.dir,o]);g7((()=>w()),[w]);const[_,S]=i.useState();g7((()=>{d&&S(window.getComputedStyle(d).zIndex)}),[d]);const E=i.useCallback((e=>{e&&!0===g.current&&(w(),x?.(),g.current=!1)}),[w,x]);return t.jsx(See,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:E,children:t.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:t.jsx(W9.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));wee.displayName="SelectItemAlignedPosition";var _ee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=gee,...a}=e,s=nee(r);return t.jsx(B7,{...s,...a,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));_ee.displayName="SelectPopperPosition";var[See,Eee]=eee(hee,{}),Tee="SelectViewport",Cee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,nonce:o,...a}=e,s=yee(Tee,r),l=Eee(Tee,r),c=B9(n,s.onViewportChange),u=i.useRef(0);return t.jsxs(t.Fragment,{children:[t.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),t.jsx(Z7.Slot,{scope:r,children:t.jsx(W9.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:I9(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=l;if(r?.current&&n){const e=Math.abs(u.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*gee,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}u.current=t.scrollTop}))})})]})}));Cee.displayName=Tee;var Aee="SelectGroup",[Nee,Ree]=eee(Aee);i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e,i=b7();return t.jsx(Nee,{scope:r,id:i,children:t.jsx(W9.div,{role:"group","aria-labelledby":i,...o,ref:n})})})).displayName=Aee;var Oee="SelectLabel",Pee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e,i=Ree(Oee,r);return t.jsx(W9.div,{id:i.id,...o,ref:n})}));Pee.displayName=Oee;var kee="SelectItem",[Mee,jee]=eee(kee),Lee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,value:o,disabled:a=!1,textValue:s,...l}=e,c=oee(kee,r),u=yee(kee,r),d=c.value===o,[p,f]=i.useState(s??""),[h,m]=i.useState(!1),g=B9(n,(e=>u.itemRefCallback?.(e,o,a))),v=b7(),y=i.useRef("touch"),b=()=>{a||(c.onValueChange(o),c.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return t.jsx(Mee,{scope:r,value:o,disabled:a,textId:v,isSelected:d,onItemTextChange:i.useCallback((e=>{f((t=>t||(e?.textContent??"").trim()))}),[]),children:t.jsx(Z7.ItemSlot,{scope:r,value:o,disabled:a,textValue:p,children:t.jsx(W9.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:g,onFocus:I9(l.onFocus,(()=>m(!0))),onBlur:I9(l.onBlur,(()=>m(!1))),onClick:I9(l.onClick,(()=>{"mouse"!==y.current&&b()})),onPointerUp:I9(l.onPointerUp,(()=>{"mouse"===y.current&&b()})),onPointerDown:I9(l.onPointerDown,(e=>{y.current=e.pointerType})),onPointerMove:I9(l.onPointerMove,(e=>{y.current=e.pointerType,a?u.onItemLeave?.():"mouse"===y.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:I9(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()})),onKeyDown:I9(l.onKeyDown,(e=>{""!==u.searchRef?.current&&" "===e.key||(Y7.includes(e.key)&&b()," "===e.key&&e.preventDefault())}))})})})}));Lee.displayName=kee;var Dee="SelectItemText",Iee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,className:o,style:s,...l}=e,c=oee(Dee,r),u=yee(Dee,r),d=jee(Dee,r),p=aee(Dee,r),[f,h]=i.useState(null),m=B9(n,(e=>h(e)),d.onItemTextChange,(e=>u.itemTextRefCallback?.(e,d.value,d.disabled))),g=f?.textContent,v=i.useMemo((()=>t.jsx("option",{value:d.value,disabled:d.disabled,children:g},d.value)),[d.disabled,d.value,g]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=p;return g7((()=>(y(v),()=>b(v))),[y,b,v]),t.jsxs(t.Fragment,{children:[t.jsx(W9.span,{id:d.textId,...l,ref:m}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren?a.createPortal(l.children,c.valueNode):null]})}));Iee.displayName=Dee;var Fee="SelectItemIndicator",Uee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e;return jee(Fee,r).isSelected?t.jsx(W9.span,{"aria-hidden":!0,...o,ref:n}):null}));Uee.displayName=Fee;var $ee="SelectScrollUpButton",Vee=i.forwardRef(((e,n)=>{const r=yee($ee,e.__scopeSelect),o=Eee($ee,e.__scopeSelect),[a,s]=i.useState(!1),l=B9(n,o.onScrollButtonChange);return g7((()=>{if(r.viewport&&r.isPositioned){let e=function(){s(t.scrollTop>0)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?t.jsx(Hee,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));Vee.displayName=$ee;var Bee="SelectScrollDownButton",zee=i.forwardRef(((e,n)=>{const r=yee(Bee,e.__scopeSelect),o=Eee(Bee,e.__scopeSelect),[a,s]=i.useState(!1),l=B9(n,o.onScrollButtonChange);return g7((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?t.jsx(Hee,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));zee.displayName=Bee;var Hee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,onAutoScroll:o,...a}=e,s=yee("SelectScrollButton",r),l=i.useRef(null),c=Q7(r),u=i.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return i.useEffect((()=>()=>u()),[u]),g7((()=>{const e=c().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[c]),t.jsx(W9.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:I9(a.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:I9(a.onPointerMove,(()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:I9(a.onPointerLeave,(()=>{u()}))})})),qee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e;return t.jsx(W9.div,{"aria-hidden":!0,...o,ref:n})}));qee.displayName="SelectSeparator";var Gee="SelectArrow";i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e,i=nee(r),a=oee(Gee,r),s=yee(Gee,r);return a.open&&"popper"===s.position?t.jsx(z7,{...i,...o,ref:n}):null})).displayName=Gee;var Kee=i.forwardRef((({__scopeSelect:e,value:n,...r},o)=>{const a=i.useRef(null),s=B9(o,a),l=function(e){const t=i.useRef({value:e,previous:e});return i.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(n);return i.useEffect((()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[l,n]),t.jsx(W9.select,{...r,style:{...K7,...r.style},ref:s,defaultValue:n})}));function Wee(e){return""===e||void 0===e}function Yee(e){const t=Y9(e),n=i.useRef(""),r=i.useRef(0),o=i.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),a=i.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return i.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function Xee(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(o,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===r.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}Kee.displayName="SelectBubbleInput";var Zee=cee,Qee=pee,Jee=fee,ete=mee,tte=Cee,nte=Pee,rte=Lee,ote=Iee,ite=Uee,ate=Vee,ste=zee,lte=qee;const cte=see,ute=dee,dte=i.forwardRef((({className:e,children:n,...r},o)=>t.jsxs(Zee,{ref:o,className:Zd("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-border/10 px-3 py-2 text-sm shadow-sm ring-offset-background !placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,t.jsx(Qee,{asChild:!0,children:t.jsx(fu,{className:"h-4 w-4 opacity-50"})})]})));dte.displayName=Zee.displayName;const pte=i.forwardRef((({className:e,...n},r)=>t.jsx(ate,{ref:r,className:Zd("flex cursor-default items-center justify-center py-1",e),...n,children:t.jsx(gu,{className:"h-4 w-4"})})));pte.displayName=ate.displayName;const fte=i.forwardRef((({className:e,...n},r)=>t.jsx(ste,{ref:r,className:Zd("flex cursor-default items-center justify-center py-1",e),...n,children:t.jsx(fu,{className:"h-4 w-4"})})));fte.displayName=ste.displayName;const hte=i.forwardRef((({className:e,children:n,position:r="popper",...o},i)=>t.jsx(Jee,{children:t.jsxs(ete,{ref:i,className:Zd("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[t.jsx(pte,{}),t.jsx(tte,{className:Zd("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),t.jsx(fte,{})]})})));hte.displayName=ete.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx(nte,{ref:r,className:Zd("px-2 py-1.5 text-sm font-semibold text-muted-foreground",e),...n}))).displayName=nte.displayName;const mte=i.forwardRef((({className:e,children:n,...r},o)=>t.jsxs(rte,{ref:o,className:Zd("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[t.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:t.jsx(ite,{children:t.jsx(pu,{className:"h-4 w-4"})})}),t.jsx(ote,{children:n})]})));mte.displayName=rte.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx(lte,{ref:r,className:Zd("-mx-1 my-1 h-px bg-muted",e),...n}))).displayName=lte.displayName;const gte=({type:e})=>t.jsxs("div",{className:"w-full h-full min-h-[300px] flex flex-col items-center justify-center bg-gradient-to-b from-gray-50 to-white p-8",children:[t.jsx("div",{className:"mb-4 text-gray-300",children:t.jsx("svg",{className:"w-16 h-16",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z"})})}),t.jsxs("p",{className:"text-gray-400 font-medium text-lg text-center mb-2",children:["No ","email"===e?"Email":"SMS"," Preview Available"]}),t.jsxs("p",{className:"text-gray-400 text-sm text-center",children:["Edit your ","email"===e?"Email":"SMS"," template to see a preview here"]})]}),vte=({html:e,height:n,width:r})=>t.jsx("div",{className:"w-full h-full bg-white rounded-lg border-0 overflow-hidden transition-all duration-300 ease-in-out flex flex-col items-center justify-center",children:e?t.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t.jsx("iframe",{title:"Email Preview",srcDoc:e,className:"transition-opacity duration-300",style:{border:"none",backgroundColor:"white",height:n||"100%",width:r||"100%",maxWidth:"100%",maxHeight:"100%"}})}):t.jsx(gte,{type:"email"})}),yte=()=>t.jsxs("div",{className:"p-6 overflow-y-auto",children:[t.jsxs("div",{className:"mb-8 text-center",children:[t.jsx("h2",{className:"text-2xl font-semibold mb-2",children:"Email Editor Help Center"}),t.jsx("p",{className:"text-gray-500",children:"Learn how to use our email editor's powerful features"})]}),t.jsxs("div",{className:"space-y-4 max-w-xl mx-auto",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Using Dynamic Content"}),t.jsxs("div",{className:"relative rounded-lg overflow-hidden bg-gray-50",children:[t.jsx("img",{src:"https://cdn.embedreach.com/assets/engage/merge-tags-demo.gif",alt:"Merge Tags Demo",className:"w-full shadow-lg max-w-md mx-auto"}),t.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/50 to-transparent p-4",children:t.jsx("p",{className:"text-white text-sm",children:"Demonstration: Adding merge tags to personalize your emails"})})]}),t.jsx("div",{className:"px-2",children:t.jsx(xZ,{onClick:()=>{},title:"Dynamic Content",subtitle:"Dynamic content is a way to insert dynamic content into your email such as the customer's name, email, or other details.",icon:t.jsx(ku,{}),selected:!0})})]})]}),bte=({type:e})=>t.jsxs("div",{className:"flex items-start space-x-2 text-sm text-gray-600",children:[t.jsx("svg",{className:"w-5 h-5 text-amber-500 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),t.jsxs("span",{children:["Please configure at least one ",e," sender before editing the template"]})]}),xte=({containerRef:e,stripoDialogDimensions:r,showSaving:o})=>(n.useEffect((()=>{const t=t=>{const n=e.current;if(!n)return;const r=n.querySelector("ui-editor");if(!r)return;const o=r.shadowRoot;if(!o)return;const i=o.host.getBoundingClientRect();const a=function(e){for(;e;){const t=getComputedStyle(e);if(("auto"===t.overflowY||"scroll"===t.overflowY)&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return null}(o.elementFromPoint(t.clientX-i.left,t.clientY-i.top))||o.firstElementChild;a&&(a.scrollTop+=t.deltaY,a.scrollLeft+=t.deltaX,t.preventDefault())},n=e.current;return n&&n.addEventListener("wheel",t,{passive:!1}),()=>{n&&n.removeEventListener("wheel",t)}}),[e]),t.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center",children:[t.jsx("div",{id:"externalSystemContainer",className:"flex items-center px-4 py-2"}),o&&t.jsx("div",{className:"absolute top-0 left-0 w-full h-full bg-black/50 flex items-center justify-center z-50",children:t.jsx(hZ,{textColor:"text-white",text:["Saving..."]})}),t.jsx("div",{id:"stripoEditorContainer",ref:e,style:{width:r.width-75,height:r.height-75},className:"z-10"})]})),wte="UiEditorScript",_te=e=>new Promise(((t,n)=>{const r=()=>{let n=!0;e.updatedFromDefault&&(n=!1),window.UIEditor&&(window.UIEditor.initEditor(e.container,{forceRecreate:n,metadata:{emailId:e.emailId},html:e.html,css:e.css,locale:"en",onTokenRefreshRequest:e=>{Promise.resolve().then((async()=>{try{const{token:t}=await(async()=>(await Re(`${p}/token`)).data)();e(t)}catch(t){}}))},messageSettingsEnabled:!1,conditionsEnabled:!1,syncModulesEnabled:!1,notifications:{info:console.info,error:console.error,warn:console.warn,success:console.log},mergeTags:e.mergeFields}),t(void 0))};if(document.getElementById(wte))r();else{const e=document.createElement("script");e.id=wte,e.type="module",e.src="https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js",e.onload=()=>{window.UIEditor?r():n(new Error("UIEditor not found after script load"))},e.onerror=e=>{n(e)},document.head.appendChild(e)}})),Ste=({automation:e,setShowStripoEditor:r,saveClicked:o,setSaveClicked:i,stripoDialogDimensions:a,mergeFieldsResponse:s,cancelClicked:l,setCancelClicked:c,actionId:u})=>{const d=n.useRef(!1),p=n.useRef(null),{data:f,isLoading:h}=(e=>{const{automationId:t,actionId:n}=e;return ve({queryKey:["stripo","templates",t,n],queryFn:()=>fZ({automationId:t,actionId:n}),..._e})})({automationId:e.id,actionId:u}),{data:m,isLoading:g}=(()=>{const e=ce();return{...ve({queryKey:dZ.editorData(),queryFn:pZ,..._e}),invalidateEditorData:()=>e.invalidateQueries({queryKey:dZ.editorData()})}})(),[v,y]=n.useState(!1),[b,x]=n.useState(!1),{updateCommunicationGroup:w}=KX(),_=n.useCallback((()=>{i(!1),c(!1),y(!1),x(!1),r(!1)}),[i,c,y,x,r]);return n.useEffect((()=>{if(o&&window.UIEditor&&f?.communicationGroupId&&window.StripoEditorApi?.actionsApi){window.StripoEditorApi.actionsApi.compileEmail({callback:function(e,t){e||(w({groupId:f.communicationGroupId,params:{emailHtmlBody:t}}),x(!0))},minimize:!0,mergeTags:[],forceAmp:!1,resetDataSavedFlag:!1,disableLineHeightsReplace:!0});window.StripoEditorApi.actionsApi.save((function(e){e||y(!0)}))}}),[o,p,i,r,f,w]),n.useEffect((()=>{(async()=>{v&&b&&(window.UIEditor&&window.UIEditor.removeEditor(),_())})()}),[v,b,r,i,_]),n.useEffect((()=>{l&&(window.UIEditor&&window.UIEditor.removeEditor(),_())}),[l,_]),n.useEffect((()=>{m?.businessId&&p.current&&f&&(d.current||(_te({emailId:f.communicationGroupId,html:f.html||"<div></div>",css:f.css||"",container:p.current,businessId:m.businessId,mergeFields:s.mergeFields||[],updatedFromDefault:f.updatedFromDefault}).catch((e=>{})),d.current=!0))}),[m,s,f]),t.jsx("div",h||g||!m||!f?{className:"w-full h-full flex flex-col items-center justify-center",children:t.jsx(hZ,{text:["Loading editor..."]})}:{className:"w-full h-full flex flex-col",children:t.jsx(xte,{containerRef:p,stripoDialogDimensions:a,showSaving:o})})},Ete=({mergeFieldsResponse:e})=>{const r=sZ(),o=aZ(),{updateCommunicationGroup:i}=KX(),{refetchAutomation:a}=ke(o?.id||""),{channelSenders:s}=w9(),{channelAccounts:l}=b9(),{updateChannelSender:c}=_9(),{state:{selectedActionId:u}}=n.useContext(VX),[d,p]=n.useState(!1),[f,h]=n.useState(r?.emailChannelSenderId||null),[m,g]=n.useState(r?.emailSubject||null),[v,y]=n.useState(r?.emailPreviewText||null),[b,x]=n.useState(r?.emailHtmlBody||null),[w,_]=n.useState(!1),[S,E]=n.useState(!1),[T,C]=n.useState(!1),[A,N]=n.useState(""),[R,O]=n.useState(""),[P,k]=n.useState(null),[M,j]=n.useState(!1),L=n.useRef(!0),[D,I]=n.useState(!0),[F,U]=n.useState(!1),[$,V]=n.useState({width:0,height:0}),[B,z]=n.useState(null),H=S9(m,500),q=S9(v,500),G=S9(A,500),K=S9(R,500),W=n.useMemo((()=>s?.results?.filter((e=>e.channelSenderMetadata.userPart))?.flatMap((e=>{const t=l?.results?.find((t=>t.id===e.channelAccountId));return t&&t.channelAccountMetadata.type===x9.REACH_MANAGED?[{channelSenderId:e.id,fullDomain:`${e.channelSenderMetadata.userPart}@${e.channelSenderMetadata.baseDomain}`}]:[]}))||[]),[s?.results,l?.results]),Y=n.useMemo((()=>({width:800,height:400})),[]),X=n.useRef(null);return n.useEffect((()=>{const e=setTimeout((()=>{L.current=!1}),500);return()=>clearTimeout(e)}),[]),n.useEffect((()=>{r?.emailHtmlBody&&x(r.emailHtmlBody)}),[r?.emailHtmlBody,a]),n.useEffect((()=>{if(d){const e=setTimeout((()=>{p(!1)}),2e3);return()=>clearTimeout(e)}}),[d]),n.useEffect((()=>{const e=()=>{V({width:window.innerWidth,height:window.innerHeight})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),n.useEffect((()=>{if(!L.current&&f&&H&&b&&r?.id){p(!0);(async()=>{try{i({groupId:r.id,params:{emailChannelSenderId:f,emailHtmlBody:b,emailSubject:H,...q&&{emailPreviewText:q}}})}catch(e){}finally{p(!1)}})()}}),[f,H,q,b,r?.id,i]),n.useEffect((()=>{if(s?.results&&f){const e=s.results.find((e=>e.id===f));e&&(F&&!D||O(e.channelSenderMetadata.emailReplyTo),D&&N(e.channelSenderMetadata.emailFromName),I(!1))}}),[s?.results,f,F,D]),n.useEffect((()=>{if(s?.results&&!f){const e=s.results.filter((e=>e.channelSenderMetadata.userPart));if(e[0]){const t=e[0];h(t.id),i({groupId:r?.id||"",params:{emailChannelSenderId:t.id}})}}}),[s?.results,f,r?.id,i]),n.useEffect((()=>{if(!L.current&&G&&f){z("fromName");(async()=>{try{const e=s?.results?.find((e=>e.id===f));e&&await c({id:f,toUpdate:{channelSenderMetadata:{...e.channelSenderMetadata,emailFromName:G}}})}catch(e){}finally{z(null)}})()}}),[G,s?.results,f,c]),n.useEffect((()=>{if(K){const e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(K),t=/\p{Emoji}/u.test(K);k(t?"Emojis are not allowed in email addresses":e?null:"Please enter a valid email address")}else k(null)}),[K]),n.useEffect((()=>{const e=async e=>{try{const t=s?.results?.find((t=>t.id===e.fromEmail));t&&c({id:e.fromEmail,toUpdate:{channelSenderMetadata:{...t.channelSenderMetadata,emailReplyTo:e.debouncedReplyToEmail}}})}catch(t){}finally{z(null)}};L.current||!f||P||(z("replyToEmail"),e(K?{fromEmail:f,debouncedReplyToEmail:K}:{fromEmail:f,debouncedReplyToEmail:null}))}),[K,s?.results,f,c,P]),n.useEffect((()=>{!1===w&&r?.id&&a()}),[w,r?.id,a]),l&&s&&u?t.jsxs("div",{className:"relative",children:[t.jsx(_B,{open:M,onOpenChange:j,children:t.jsxs(TB,{className:"max-h-[86vh] gap-0 overflow-visible max-w-3xl w-full h-full",children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Email Preview Help"}),t.jsx(RB,{children:"Learn more about the email preview and how to use it to create your email."})]}),t.jsx(yte,{})]})}),t.jsx(_B,{open:w,onOpenChange:_,children:t.jsxs(TB,{className:"min-w-[100vw] min-h-[100vh]",hideCloseButton:!0,onEscapeKeyDown:e=>{e.preventDefault()},children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Email Editor"}),t.jsx(RB,{children:"Learn more about the email editor and how to use it to create your email."})]}),t.jsxs("div",{className:"w-full h-full",children:[t.jsxs("div",{className:"flex justify-between items-center p-1 border-b",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Email Editor"}),t.jsx(T9,{title:"Click to learn more about email template ",onClick:()=>j(!0)})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(vZ,{variant:"destructive",onClick:()=>{C(!0)},className:"text-sm px-3 py-1 rounded",children:"Cancel"}),t.jsx(vZ,{onClick:()=>E(!0),className:"text-sm px-3 py-1 rounded",children:"Save"})]})]}),t.jsx("div",{className:" w-full",children:o&&t.jsx(Ste,{cancelClicked:T,setCancelClicked:C,showStripoEditor:w,automation:o,setShowStripoEditor:_,saveClicked:S,setSaveClicked:E,stripoDialogDimensions:$,mergeFieldsResponse:e,actionId:u})})]})]})}),t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx(L9,{children:"From Email"}),t.jsxs(cte,{onValueChange:e=>{h(e),I(!0),U(!1)},value:f??void 0,disabled:d,children:[t.jsx(dte,{children:t.jsx(ute,{placeholder:"Select email",className:"text-muted-foreground",children:f?W?.find((e=>e.channelSenderId===f))?.fullDomain:""})}),t.jsx(hte,{children:W?.map((e=>t.jsx(mte,{value:e.channelSenderId,children:e.fullDomain},e.channelSenderId)))})]})]}),t.jsxs("div",{children:[t.jsx(L9,{className:"",children:t.jsxs("div",{className:"flex items-center gap-2 py-1",children:["From Name",t.jsx(T9,{title:"This will be the friendly name of the sender that the customer will see in the inbox",alertText:"Changes to the sender name will be applied across all emails using this address"})]})}),t.jsx(q3,{placeholder:"Enter from name",value:A??"",onChange:e=>N(e.target.value),className:"text-muted-foreground",disabled:d&&"fromName"!==B||!f||D})]}),t.jsxs("div",{children:[t.jsx(L9,{className:"",children:t.jsxs("div",{className:"flex items-center gap-2 py-1",children:["Reply To Email",t.jsx(T9,{title:"This will be the email address that customer can reply to on the email",alertText:"Changes to the reply to email will be applied across all emails using this address"})]})}),t.jsx(q3,{placeholder:"Enter reply to email",value:R??"",className:"text-muted-foreground",onChange:e=>{O(e.target.value),F||U(!0)},disabled:d&&"replyToEmail"!==B||!f||D}),P&&t.jsx("p",{className:"text-sm text-red-500 mt-1",children:P})]}),t.jsxs("div",{children:[t.jsx(L9,{children:"Subject"}),t.jsx(q3,{placeholder:"Enter email subject",className:"text-muted-foreground",value:m??"",onChange:e=>g(e.target.value),disabled:d||D})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2 py-1",children:[t.jsx(L9,{children:"Preview Text"}),t.jsx(T9,{title:"This text will be used for the preview text of the email in the inbox"})]}),t.jsx(q3,{placeholder:"Enter preview text",className:"text-muted-foreground",value:v??"",onChange:e=>y(e.target.value),disabled:d||D})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 h-full flex flex-col",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h3",{className:"font-medium",children:"Preview"}),t.jsxs("div",{children:[t.jsx(vZ,{onClick:()=>_(!0),className:"text-sm px-3 py-1 rounded",disabled:d||0===(W?.length??0),children:"Edit"}),0===(W?.length??0)&&t.jsx("div",{className:"relative inline-block",children:t.jsx("div",{className:"absolute right-0 top-full mt-2 w-64 p-3 bg-white border rounded-lg shadow-lg z-10",children:t.jsx(bte,{type:"email"})})})]})]}),t.jsx("div",{className:"flex-1 w-full overflow-auto",ref:X,style:{height:"400px"},children:t.jsx(vte,{html:b??"",height:Y.height,width:Y.width})})]})]})]}):t.jsx("div",{className:"flex justify-center items-center flex-1 h-full bg-white rounded-2xl w-full border border-gray-200 p-6 space-y-4 relative",children:t.jsx(hZ,{text:["Fetching Email Preview..."]})})};function Tte(e){const t=i.useRef({value:e,previous:e});return i.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}var Cte="Checkbox",[Ate,Nte]=UQ(Cte),[Rte,Ote]=Ate(Cte),Pte=i.forwardRef(((e,n)=>{const{__scopeCheckbox:r,name:o,checked:a,defaultChecked:s,required:l,disabled:c,value:u="on",onCheckedChange:d,form:p,...f}=e,[h,m]=i.useState(null),g=XU(n,(e=>m(e))),v=i.useRef(!1),y=!h||(p||!!h.closest("form")),[b=!1,x]=BQ({prop:a,defaultProp:s,onChange:d}),w=i.useRef(b);return i.useEffect((()=>{const e=h?.form;if(e){const t=()=>x(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[h,x]),t.jsxs(Rte,{scope:r,state:b,disabled:c,children:[t.jsx(WQ.button,{type:"button",role:"checkbox","aria-checked":Lte(b)?"mixed":b,"aria-required":l,"data-state":Dte(b),"data-disabled":c?"":void 0,disabled:c,value:u,...f,ref:g,onKeyDown:FQ(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:FQ(e.onClick,(e=>{x((e=>!!Lte(e)||!e)),y&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())}))}),y&&t.jsx(jte,{control:h,bubbles:!v.current,name:o,value:u,checked:b,required:l,disabled:c,form:p,style:{transform:"translateX(-100%)"},defaultChecked:!Lte(s)&&s})]})}));Pte.displayName=Cte;var kte="CheckboxIndicator",Mte=i.forwardRef(((e,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=e,a=Ote(kte,r);return t.jsx(T1,{present:o||Lte(a.state)||!0===a.state,children:t.jsx(WQ.span,{"data-state":Dte(a.state),"data-disabled":a.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...e.style}})})}));Mte.displayName=kte;var jte=e=>{const{control:n,checked:r,bubbles:o=!0,defaultChecked:a,...s}=e,l=i.useRef(null),c=Tte(r),u=t1(n);i.useEffect((()=>{const e=l.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==r&&n){const t=new Event("click",{bubbles:o});e.indeterminate=Lte(r),n.call(e,!Lte(r)&&r),e.dispatchEvent(t)}}),[c,r,o]);const d=i.useRef(!Lte(r)&&r);return t.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??d.current,...s,tabIndex:-1,ref:l,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Lte(e){return"indeterminate"===e}function Dte(e){return Lte(e)?"indeterminate":e?"checked":"unchecked"}var Ite=Pte,Fte=Mte;const Ute=({selectedChannels:e,setSelectedChannels:n,hasEmailChannelSenders:r,hasSmsChannelSenders:o,automationType:i})=>{const{toast:a}=jl(),s=[...r?[{label:"Email",value:"email",icon:wZ.EmailIcon,checked:e.includes("email")}]:[],...o?[{label:"SMS",value:"sms",icon:wZ.SmsIcon,checked:e.includes("sms")}]:[]];return t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-xl font-medium",children:"Message Types"}),t.jsx("p",{className:"text-gray-600 mb-2 text-sm",children:"Select the channels you want to use in this automation"})]}),t.jsx("div",{className:"w-full grid grid-cols-2 gap-3",children:s.map((r=>t.jsxs(Ite,{checked:r.checked,onCheckedChange:()=>{"email"===r.value?e.includes("email")?e.includes("sms")?n(["sms"]):a({title:"Cant Remove Email",description:`At least one channel is required for an ${i===Fe.ONE_TIME?ff("engage:one_time").toLowerCase():ff("engage:automation").toLowerCase()}`,variant:"destructive"}):n([...e,"email"]):e.includes("sms")?e.includes("email")?n(["email"]):a({title:"Cant Remove SMS",description:`At least one channel is required for an ${i===Fe.ONE_TIME?ff("engage:one_time").toLowerCase():ff("engage:automation").toLowerCase()}`,variant:"destructive"}):n([...e,"sms"])},className:"relative ring-[1px] ring-border rounded-lg px-4 py-3 text-start text-muted-foreground data-[state=checked]:ring-2 data-[state=checked]:ring-primary data-[state=checked]:font-medium",children:[t.jsx(r.icon,{className:"mb-3",size:20}),t.jsx("span",{className:"font-medium tracking-tight",children:r.label}),t.jsx(Fte,{className:"absolute top-2 right-2",children:t.jsx(bu,{className:"fill-primary text-primary-foreground"})})]},r.value)))})]})},$te=async()=>(await Re(s)).data,Vte=["me"],Bte=()=>ve({queryKey:Vte,queryFn:$te,..._e}),zte=()=>{const e=ce(),t=Bte(),n=ye({mutationFn:e=>(async e=>(await Re(s,{method:"PATCH",body:JSON.stringify({website:e})})).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:Vte})}}),r=ye({mutationFn:e=>(async e=>(await Re(s,{method:"PATCH",body:JSON.stringify({locations:e})})).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:Vte})}}),o=ye({mutationFn:e=>(async e=>(await Re(s,{method:"PATCH",body:JSON.stringify({branding:e})})).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:Vte})}});return{data:t.data,isLoading:t.isLoading,error:t.error,refetch:t.refetch,updateWebsite:n.mutate,updateLocations:r.mutate,updateBrandSettings:o.mutate,isUpdatingWebsite:n.isPending,isUpdatingLocations:r.isPending,isUpdatingBrandSettings:o.isPending}},Hte=i.forwardRef((({className:e,...n},r)=>t.jsx("textarea",{className:Zd("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n})));Hte.displayName="Textarea";const qte=e=>{const{companyName:t,smsBody:n}=e;return t&&n?`${t}:\n${n}`:n??""},Gte=({body:e})=>t.jsx("div",{className:"sms-preview-outer @container",children:t.jsxs("div",{className:"sms-phone-mockup",children:[t.jsx("div",{className:"sms-phone-notch"}),t.jsx("div",{className:"sms-phone-inner",children:t.jsx("div",{className:"sms-message-row",children:t.jsx("div",{className:"sms-message-bubble",children:e})})}),t.jsx("div",{className:"sms-phone-home-indicator"})]})}),Kte=({mergeFieldsResponse:e,smsChannelSenders:r})=>{const o=aZ(),i=sZ(),a=n.useCallback((()=>{const e=o?.actionData?.find((e=>"send_communication"===e.actionType&&e.actionMetadata.communicationGroupId===i?.id));return e?.actionMetadata.communicationGroupId}),[o?.actionData,i?.id]),{channelSenders:s}=w9(),{data:l,isLoading:c}=Bte(),{channelAccounts:u}=b9(),{updateCommunicationGroup:d}=KX(),[p,f]=n.useState(!1),[h,m]=n.useState(""),[g,v]=n.useState(null),[y,b]=n.useState(!1),[x,w]=n.useState(null),[_,S]=n.useState(null),[E,T]=n.useState(!1),C=n.useRef(null),A=S9(_,1e3),N=S9(g,1e3),R=S9(x,1e3);n.useEffect((()=>{if(null!==N&&null!==A&&!p){f(!0);const e=a();e&&d({groupId:e,params:{smsChannelSenderId:N,smsMessageBody:A,textMessageCompanyName:R}}),f(!1)}}),[N,A,R,p,d,a]),n.useEffect((()=>{i&&(v(i.smsChannelSenderId),S(i.smsMessageBody),i.textMessageCompanyName&&w(i.textMessageCompanyName))}),[i]);return n.useEffect((()=>{if(void 0!==s&&!g){const e=s.results.filter((e=>e.channelSenderMetadata.from||e.channelSenderMetadata.messageServiceSid));e?.[0]&&(v(e[0].id),i?.id&&d({groupId:i.id,params:{smsChannelSenderId:e[0].id}}))}}),[s,g,i?.id,d]),n.useEffect((()=>{x||!l?.name||y||(b(!0),w(l.name))}),[x,l?.name,y]),u&&s&&!c?t.jsxs("div",{children:[t.jsx(_B,{open:E,onOpenChange:T,children:t.jsxs(TB,{children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"SMS Editor"}),t.jsx(RB,{children:"Learn more about the SMS editor and how to use it to create your SMS."})]}),t.jsxs("div",{className:"",children:[t.jsx(Hte,{ref:C,className:"min-h-[300px]",placeholder:"Text message content...",value:_??"",onChange:e=>{S(e.target.value)},maxLength:1600-(x?.length||0)}),t.jsxs("div",{className:"mt-2 flex items-center justify-end gap-2",children:[t.jsxs(cte,{value:h,onValueChange:e=>{const t=C.current,n=_||"",r=t?.selectionStart??n.length,o=t?.selectionEnd??n.length,i=n.slice(0,r)+e+n.slice(o);S(i),m(""),setTimeout((()=>{const n=r+e.length;t?.focus(),t?.setSelectionRange(n,n)}),0)},children:[t.jsx(dte,{className:"w-[50px]",children:t.jsx(wZ.MergeField,{className:"w-4 h-4 text-primary"})}),t.jsx(hte,{children:e?.mergeFields?.map((e=>e.entries.map((e=>t.jsx(mte,{value:e.value,children:e.label},e.value))))).flat()})]}),t.jsx(T9,{title:"Dynamic content is a way to insert dynamic content into your messages such as the customer's name, email, or other details."})]}),t.jsxs("div",{className:"flex justify-end mt-2 text-sm transition-colors duration-300 "+(_&&_.length>1400?_.length>=1600?"text-red-500":"text-amber-500":"text-gray-500"),children:[_?_.length:0,"/",1600-(x?.length||0)," ","characters"]})]})]})}),t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx(L9,{children:"From Number"}),t.jsxs(cte,{onValueChange:e=>{v(e)},value:g??void 0,children:[t.jsx(dte,{children:t.jsx(ute,{placeholder:"Select number",children:g?(O=g,r?.find((e=>e.id===O))?.channelSenderMetadata.friendlyName??r?.find((e=>e.id===O))?.channelSenderMetadata.from??O):"Select number"})}),t.jsx(hte,{children:r?.map((e=>t.jsx(mte,{value:e.id,children:e.channelSenderMetadata.friendlyName??e.channelSenderMetadata.from??"Select number"},e.id)))})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2 py-1",children:[t.jsx(L9,{children:"Company Name"}),t.jsx(T9,{title:"Adding your company name can help customers identify who they are talking to"})]}),t.jsx(q3,{placeholder:"Enter company name",value:x??"",className:"text-muted-foreground",onChange:e=>{w(e.target.value??null)},disabled:!g})]})]}),t.jsxs("div",{className:"border rounded-lg p-4",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h3",{className:"font-medium",children:"Preview"}),t.jsx("div",{children:t.jsx(vZ,{onClick:()=>T(!0),className:"text-sm px-3 py-1 rounded ",disabled:0===(r?.length??0),children:"Edit"})})]}),t.jsx("div",{children:g?t.jsx(t.Fragment,{children:g&&_?t.jsx(Gte,{body:qte({companyName:x??void 0,smsBody:_})}):t.jsx(gte,{type:"sms"})}):t.jsx(bte,{type:"sms"})})]})]})]}):t.jsx("div",{children:t.jsx(hZ,{text:["Loading..."]})});var O};var Wte=(e=>(e.CUSTOM="custom",e.MANAGED="managed",e))(Wte||{}),Yte=(e=>(e.EditAudience="edit-audience",e.EditTime="edit-time",e))(Yte||{});const Xte=({title:e,type:r})=>{const o=sZ(),i=aZ(),{toast:a}=jl(),s=ce(),[l,c]=n.useState(!1),[u,p]=n.useState(!1),f=!!o&&(o.type===Wte.MANAGED&&("sms"===r?o.updatedFromDefault?.text_message_body:o.updatedFromDefault?.email_text_body||o.updatedFromDefault?.email_html_body));return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h4",{className:"text-xl font-medium",children:e}),t.jsx("div",{className:"flex items-center gap-2",children:f&&t.jsx(t.Fragment,{children:l?t.jsx(hZ,{}):t.jsx(vZ,{variant:"outline",size:"sm",onClick:()=>p(!0),children:"Reset To Default"})})})]}),t.jsx(_B,{open:u,onOpenChange:p,children:t.jsxs(TB,{className:"sm:max-w-[425px]",children:[t.jsxs(CB,{children:[t.jsx(NB,{className:"text-xl font-semibold",children:"Reset to Default"}),t.jsxs(RB,{className:"text-base text-muted-foreground",children:["Are you sure you want to reset this"," ","email"===r?"email":"SMS"," template to its default state? This action cannot be undone."]})]}),t.jsxs(AB,{className:"flex flex-row justify-end gap-3 mt-6",children:[t.jsx(vZ,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),t.jsx(vZ,{variant:"destructive",onClick:async()=>{o&&i?(c(!0),await(async e=>{const{communicationGroupId:t,automationId:n,type:r}=e;return(await Re(`${d}/${t}/${n}/reset`,{method:"POST",body:JSON.stringify({type:r})})).data})({communicationGroupId:o.id,automationId:i.id,type:r}),s.invalidateQueries({queryKey:qX.all}),a({title:"Communication reset to default!"}),c(!1),p(!1)):a({title:"Error resetting communication",description:"Please contact your administrator",variant:"destructive"})},children:"Reset to Default"})]})]})})]})},Zte=({getExtraMergeFields:e})=>{const[r,o]=n.useState(null),i=n.useRef(null),{toast:a}=jl(),s=sZ(),{channelSenders:l}=w9(),{channelAccounts:c}=b9(),{updateCommunicationGroup:u}=KX(),d=aZ(),{getMergeFields:p,isGetting:f}=(e=>{const t=ve({queryKey:["merge-fields",e],queryFn:()=>HX(e)});return{getMergeFields:t.data,isGetting:t.isPending,getError:t.error,isGetSuccess:t.isSuccess}})(s?.id??void 0),[h,m]=n.useState(void 0);n.useEffect((()=>{const e=s?.id;e&&r&&(r.includes("email")||null===s?.emailChannelSenderId||u({groupId:e,params:{emailChannelSenderId:null}}),r.includes("sms")||null===s?.smsChannelSenderId||u({groupId:e,params:{smsChannelSenderId:null}}))}),[r,u,s]),n.useEffect((()=>{const e=s?.id;e||r||o(["email"])}),[d,s,r]);const g=n.useCallback((e=>{const t=[];e.emailChannelSenderId&&t.push("email"),e.smsChannelSenderId&&t.push("sms"),0===t.length&&t.push("email"),o(t)}),[]);n.useEffect((()=>{s&&!r&&g(s)}),[s,g,r]),n.useEffect((()=>{f||void 0===h&&(e?e().then((e=>{s?.id&&(g(s),u({groupId:s?.id,params:{extraMergeFields:e}},{onSuccess:async()=>{try{const e=await HX(s?.id);m(e)}catch{a({title:"Error saving merge fields!",description:"Please contact your administrator if this issue persists.",variant:"destructive"})}},onError:e=>{a({title:"Error saving merge fields!",description:"Please contact your administrator if this issue persists.",variant:"destructive"})}}))})):m(p))}),[e,u,s,a,f,p,h,g]);const v=n.useMemo((()=>l?.results?.filter((e=>e.channelSenderMetadata.userPart))?.flatMap((e=>{const t=c?.results?.find((t=>t.id===e.channelAccountId));return t&&t.channelAccountMetadata.type===x9.REACH_MANAGED?[{channelSenderId:e.id,fullDomain:`${e.channelSenderMetadata.userPart}@${e.channelSenderMetadata.baseDomain}`}]:[]}))||[]),[l?.results,c?.results]),y=n.useMemo((()=>l?.results.filter((e=>e.channelSenderMetadata.from||e.channelSenderMetadata.messageServiceSid))),[l?.results]);if(!r||f||!h||!v||!y)return t.jsx("div",{className:"flex justify-center items-center flex-1 h-full bg-white rounded-2xl w-full border border-gray-200 p-6 space-y-4 relative",children:t.jsx(hZ,{text:["Fetching Content..."]})});const b=v.length>0,x=y.length>0;return t.jsxs("div",{className:"flex flex-col gap-4 flex-shrink-0",children:[t.jsx("div",{className:"bg-white rounded-2xl w-full border border-gray-200 p-6 space-y-4 relative",children:t.jsx(Ute,{automationType:d?.triggerMetadata?.triggerType,selectedChannels:r,setSelectedChannels:o,hasEmailChannelSenders:b,hasSmsChannelSenders:x})}),r.includes("email")&&t.jsxs("div",{className:"bg-white rounded-2xl w-full border border-gray-200 p-6 space-y-4 relative",ref:i,children:[t.jsx(Xte,{title:"Email Campaign",type:"email"}),t.jsx(Ete,{mergeFieldsResponse:h,emailChannelSendersWithChannelAccounts:v})]}),r.includes("sms")&&t.jsxs("div",{className:"bg-white rounded-2xl w-full border border-gray-200 p-6 space-y-4 relative",children:[t.jsx(Xte,{title:"SMS Campaign",type:"sms"}),t.jsx(Kte,{mergeFieldsResponse:h,smsChannelSenders:y})]})]})},Qte=({content:e,className:n})=>t.jsx("div",{className:wB("flex flex-col gap-4 w-full p-6",n),children:t.jsx("div",{className:"bg-white rounded-2xl w-full border border-gray-200 p-6 relative",children:e})}),Jte=e=>e.friendlyName||e.from||e.messageServiceSid||"Unknown Sender";function ene(e,t){throw new Error(`Unreachable case statement: ${JSON.stringify(e)}. Valid values are: ${Object.values(t).join(", ")}`)}function tne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function nne(e,n=[]){let r=[];const o=()=>{const t=r.map((e=>i.createContext(e)));return function(n){const r=n?.[e]||t;return i.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(n,o){const a=i.createContext(o),s=r.length;r=[...r,o];const l=n=>{const{scope:r,children:o,...l}=n,c=r?.[e]?.[s]||a,u=i.useMemo((()=>l),Object.values(l));return t.jsx(c.Provider,{value:u,children:o})};return l.displayName=n+"Provider",[l,function(t,r){const l=i.useContext(r?.[e]?.[s]||a);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},rne(o,...n)]}function rne(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return i.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function one(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ine(...e){return t=>{let n=!1;const r=e.map((e=>{const r=one(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():one(e[t],null)}}}}function ane(...e){return i.useCallback(ine(...e),e)}function sne(e){const n=lne(e),r=i.forwardRef(((e,r)=>{const{children:o,...a}=e,s=i.Children.toArray(o),l=s.find(une);if(l){const e=l.props.children,o=s.map((t=>t===l?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(n,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})}));return r.displayName=`${e}.Slot`,r}function lne(e){const t=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?ine(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var cne=Symbol("radix.slottable");function une(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===cne}var dne=globalThis?.document?i.useLayoutEffect:()=>{},pne=i[" useId ".trim().toString()]||(()=>{}),fne=0;function hne(e){const[t,n]=i.useState(pne());return dne((()=>{n((e=>e??String(fne++)))}),[e]),e||(t?`radix-${t}`:"")}var mne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,n)=>{const r=sne(`Primitive.${n}`),o=i.forwardRef(((e,o)=>{const{asChild:i,...a}=e,s=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...a,ref:o})}));return o.displayName=`Primitive.${n}`,{...e,[n]:o}}),{});var gne=i[" useInsertionEffect ".trim().toString()]||dne;function vne({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=function({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return gne((()=>{a.current=t}),[t]),i.useEffect((()=>{o.current!==n&&(a.current?.(n),o.current=n)}),[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:o;{const t=i.useRef(void 0!==e);i.useEffect((()=>{const e=t.current;if(e!==l){}t.current=l}),[l,r])}const u=i.useCallback((t=>{if(l){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)}),[l,e,a,s]);return[c,u]}var yne=i.createContext(void 0);function bne(e){const t=i.useContext(yne);return e||t||"ltr"}var xne="rovingFocusGroup.onEntryFocus",wne={bubbles:!1,cancelable:!0},_ne="RovingFocusGroup",[Sne,Ene,Tne]=function(e){const r=e+"CollectionProvider",[o,i]=nne(r),[a,s]=o(r,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:r,children:o}=e,i=n.useRef(null),s=n.useRef(new Map).current;return t.jsx(a,{scope:r,itemMap:s,collectionRef:i,children:o})};l.displayName=r;const c=e+"CollectionSlot",u=sne(c),d=n.forwardRef(((e,n)=>{const{scope:r,children:o}=e,i=ane(n,s(c,r).collectionRef);return t.jsx(u,{ref:i,children:o})}));d.displayName=c;const p=e+"CollectionItemSlot",f="data-radix-collection-item",h=sne(p),m=n.forwardRef(((e,r)=>{const{scope:o,children:i,...a}=e,l=n.useRef(null),c=ane(r,l),u=s(p,o);return n.useEffect((()=>(u.itemMap.set(l,{ref:l,...a}),()=>{u.itemMap.delete(l)}))),t.jsx(h,{[f]:"",ref:c,children:i})}));return m.displayName=p,[{Provider:l,Slot:d,ItemSlot:m},function(t){const r=s(e+"CollectionConsumer",t);return n.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},i]}(_ne),[Cne,Ane]=nne(_ne,[Tne]),[Nne,Rne]=Cne(_ne),One=i.forwardRef(((e,n)=>t.jsx(Sne.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Sne.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Pne,{...e,ref:n})})})));One.displayName=_ne;var Pne=i.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...f}=e,h=i.useRef(null),m=ane(n,h),g=bne(s),[v,y]=vne({prop:l,defaultProp:c??null,onChange:u,caller:_ne}),[b,x]=i.useState(!1),w=function(e){const t=i.useRef(e);return i.useEffect((()=>{t.current=e})),i.useMemo((()=>(...e)=>t.current?.(...e)),[])}(d),_=Ene(r),S=i.useRef(!1),[E,T]=i.useState(0);return i.useEffect((()=>{const e=h.current;if(e)return e.addEventListener(xne,w),()=>e.removeEventListener(xne,w)}),[w]),t.jsx(Nne,{scope:r,orientation:o,dir:g,loop:a,currentTabStopId:v,onItemFocus:i.useCallback((e=>y(e)),[y]),onItemShiftTab:i.useCallback((()=>x(!0)),[]),onFocusableItemAdd:i.useCallback((()=>T((e=>e+1))),[]),onFocusableItemRemove:i.useCallback((()=>T((e=>e-1))),[]),children:t.jsx(mne.div,{tabIndex:b||0===E?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:tne(e.onMouseDown,(()=>{S.current=!0})),onFocus:tne(e.onFocus,(e=>{if(e.target===e.currentTarget&&!S.current&&!b){const t=new CustomEvent(xne,wne);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=_().filter((e=>e.focusable));Lne([e.find((e=>e.active)),e.find((e=>e.id===v)),...e].filter(Boolean).map((e=>e.ref.current)),p)}}S.current=!1})),onBlur:tne(e.onBlur,(()=>x(!1)))})})})),kne="RovingFocusGroupItem",Mne=i.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:s,children:l,...c}=e,u=hne(),d=s||u,p=Rne(kne,r),f=p.currentTabStopId===d,h=Ene(r),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:v}=p;return i.useEffect((()=>{if(o)return m(),()=>g()}),[o,m,g]),t.jsx(Sne.ItemSlot,{scope:r,id:d,focusable:o,active:a,children:t.jsx(mne.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...c,ref:n,onMouseDown:tne(e.onMouseDown,(e=>{o?p.onItemFocus(d):e.preventDefault()})),onFocus:tne(e.onFocus,(()=>p.onItemFocus(d))),onKeyDown:tne(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:jne[r]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=h().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=p.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>Lne(o)))}var n,r})),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=v}):l})})}));Mne.displayName=kne;var jne={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Lne(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Dne=One,Ine=Mne;var Fne=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return i.useReducer(((e,n)=>t[e][n]??e),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect((()=>{const e=Une(r.current);a.current="mounted"===l?e:"none"}),[l]),dne((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=Une(t);if(e)c("MOUNT");else if("none"===i||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,c]),dne((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=i=>{const a=Une(r.current).includes(i.animationName);if(i.target===t&&a&&(c("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(a.current=Une(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):i.Children.only(n),a=ane(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?i.cloneElement(o,{ref:a}):null};function Une(e){return e?.animationName||"none"}Fne.displayName="Presence";var $ne="Tabs",[Vne,Bne]=nne($ne,[Ane]),zne=Ane(),[Hne,qne]=Vne($ne),Gne=i.forwardRef(((e,n)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=bne(l),[p,f]=vne({prop:o,onChange:i,defaultProp:a??"",caller:$ne});return t.jsx(Hne,{scope:r,baseId:hne(),value:p,onValueChange:f,orientation:s,dir:d,activationMode:c,children:t.jsx(mne.div,{dir:d,"data-orientation":s,...u,ref:n})})}));Gne.displayName=$ne;var Kne="TabsList",Wne=i.forwardRef(((e,n)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,a=qne(Kne,r),s=zne(r);return t.jsx(Dne,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:t.jsx(mne.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:n})})}));Wne.displayName=Kne;var Yne="TabsTrigger",Xne=i.forwardRef(((e,n)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...a}=e,s=qne(Yne,r),l=zne(r),c=Jne(s.baseId,o),u=ere(s.baseId,o),d=o===s.value;return t.jsx(Ine,{asChild:!0,...l,focusable:!i,active:d,children:t.jsx(mne.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:n,onMouseDown:tne(e.onMouseDown,(e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)})),onKeyDown:tne(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)})),onFocus:tne(e.onFocus,(()=>{d||i||!("manual"!==s.activationMode)||s.onValueChange(o)}))})})}));Xne.displayName=Yne;var Zne="TabsContent",Qne=i.forwardRef(((e,n)=>{const{__scopeTabs:r,value:o,forceMount:a,children:s,...l}=e,c=qne(Zne,r),u=Jne(c.baseId,o),d=ere(c.baseId,o),p=o===c.value,f=i.useRef(p);return i.useEffect((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),t.jsx(Fne,{present:a||p,children:({present:r})=>t.jsx(mne.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!r,id:d,tabIndex:0,...l,ref:n,style:{...e.style,animationDuration:f.current?"0s":void 0},children:r&&s})})}));function Jne(e,t){return`${e}-trigger-${t}`}function ere(e,t){return`${e}-content-${t}`}Qne.displayName=Zne;var tre=Wne,nre=Xne,rre=Qne;const ore=Gne,ire=i.forwardRef((({className:e,...n},r)=>t.jsx(tre,{ref:r,className:Zd("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...n})));ire.displayName=tre.displayName;const are=i.forwardRef((({className:e,...n},r)=>t.jsx(nre,{ref:r,className:Zd("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...n})));are.displayName=nre.displayName;const sre=i.forwardRef((({className:e,...n},r)=>t.jsx(rre,{ref:r,className:Zd("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n})));sre.displayName=rre.displayName;const lre=({open:e,onOpenChange:n})=>t.jsx(_B,{open:e,onOpenChange:n,children:t.jsxs(TB,{className:"max-w-[75vw] min-h-[75vh] overflow-y-auto max-h-[90vh]",children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Edit Campaign Content"}),t.jsx(RB,{children:"Edit the content of the campaign"})]}),t.jsx(Zte,{})]})}),cre=()=>t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"w-3 h-3 rounded-full bg-zinc-300 border border-zinc-300 shadow-sm"}),t.jsx("span",{className:"w-3 h-3 rounded-full bg-zinc-300 border border-zinc-300 shadow-sm"}),t.jsx("span",{className:"w-3 h-3 rounded-full bg-zinc-300 border border-zinc-300 shadow-sm"})]}),ure=({children:e,actionButtons:n})=>t.jsxs("div",{className:"flex-1 w-full relative overflow-hidden",children:[t.jsxs("div",{className:"h-full relative w-full rounded-2xl shadow-xl bg-white border border-zinc-200 overflow-hidden min-h-[500px] flex flex-col",style:{containerType:"inline-size"},children:[t.jsxs("div",{className:"flex items-center space-x-3 pt-3 px-4 z-10 w-full justify-between",children:[t.jsx(cre,{}),n&&t.jsx("div",{className:"flex items-center space-x-2",children:n})]}),e]}),t.jsx("div",{className:"text-center text-sm text-muted-foreground mt-4",children:t.jsx("p",{children:"These previews show exactly how your messages will appear to your customers"})})]}),dre=()=>{const e=aZ(),r=sZ(),{channelSenders:o}=w9(),{channelAccounts:i}=b9(),a=n.useMemo((()=>o?.results?.filter((e=>e.channelSenderMetadata.userPart))?.flatMap((e=>{const t=i?.results?.find((t=>t.id===e.channelAccountId));return t&&t.channelAccountMetadata.type===x9.REACH_MANAGED?[{channelSenderId:e.id,fullDomain:`${e.channelSenderMetadata.userPart}@${e.channelSenderMetadata.baseDomain}`,channelSenderMetadata:e.channelSenderMetadata}]:[]}))||[]),[o?.results,i?.results]),s=r?.emailChannelSenderId;if(!(e&&r&&a&&s))return null;const l=a.find((e=>e.channelSenderId===s)),c=l?.fullDomain,u=l?.channelSenderMetadata.emailReplyTo,d=r.emailSubject,p=r.emailPreviewText,f=l?.channelSenderMetadata.emailFromName;return t.jsxs("div",{className:"space-y-1 overflow-hidden",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"text-xs text-muted-foreground leading-none",children:"From"}),t.jsxs("div",{className:"text-base font-medium",children:[c,f&&t.jsxs("span",{className:"text-muted-foreground",children:["<",c,">"]})]})]}),u&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"text-xs text-muted-foreground leading-none",children:"Reply-To"}),t.jsx("div",{className:"text-base font-medium",children:u})]}),d&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"text-xs text-muted-foreground leading-none",children:"Subject"}),t.jsx("div",{className:"text-base font-medium",children:d})]}),p&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"text-xs text-muted-foreground leading-none",children:"Preview Text"}),t.jsx("div",{className:"text-sm font-medium line-clamp-2",children:p})]})]})},pre=({emailBody:e})=>{const[r,o]=n.useState({width:0,height:0}),i=n.useRef(null);return n.useEffect((()=>{const e=()=>{i.current&&requestAnimationFrame((()=>{o({width:i.current?i.current.offsetWidth-75:0,height:i.current?i.current.offsetHeight-75:0})}))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[i]),t.jsxs(ure,{children:[t.jsx("div",{className:"pt-4 pb-2 px-6 flex flex-col gap-1",children:t.jsx("div",{className:"rounded-xl bg-zinc-50/80 shadow-sm border border-zinc-100 p-4",children:t.jsx(dre,{})})}),t.jsx("div",{className:"rounded-lg p-6 bg-white flex-1 min-h-0 flex items-center justify-center",ref:i,children:t.jsx(vte,{html:e,height:r.height,width:r.width})})]})},fre=({expandDialogContent:e})=>{const[r,o]=n.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx(_B,{open:r,onOpenChange:o,children:t.jsxs(TB,{hideCloseButton:!0,className:"w-[80vw] h-[80vh] max-w-none max-h-none bg-transparent border-none",children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Expanded Preview"}),t.jsx(RB,{children:"Expanded view of communication content"})]}),t.jsxs("div",{className:"h-full flex flex-col overflow-hidden rounded-xl",children:[e,t.jsx("div",{className:"absolute top-7 right-7 z-10",children:t.jsx(vZ,{variant:"ghost",size:"sm",onClick:()=>o(!1),children:t.jsx(wZ.CloseButton,{className:"w-4 h-4 text-primary"})})})]})]})}),t.jsx(vZ,{variant:"outline",size:"sm",className:"rounded-lg px-3 py-2 flex items-center gap-2 shadow-sm bg-white/80 hover:bg-zinc-100 border border-zinc-200",onClick:()=>o(!0),children:t.jsx(wZ.ExpandIcon,{className:"w-4 h-4 text-muted-foreground"})})]})},hre=({type:e,disablePreviewSubtext:n=!1})=>{const r="sms"===e?"SMS":"Email";return t.jsx("div",{className:"flex flex-1 w-full h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center justify-center bg-zinc-50/80 border border-zinc-100 rounded-2xl shadow-md px-6 py-12 max-w-[90vw] w-full sm:max-w-md mx-auto text-center",style:{containerType:"inline-size"},children:[t.jsx("sms"===e?wZ.SmsIcon:wZ.EmailIcon,{className:"w-12 h-12 text-zinc-500 mb-4"}),t.jsxs("h2",{className:"text-xl font-semibold text-zinc-800 mb-2",children:["No ",r," Content Yet"]}),!n&&t.jsxs("p",{className:"text-zinc-500 text-base mb-1",children:["Click"," ",t.jsx("span",{className:"font-medium text-zinc-700",children:"Edit content"})," to start crafting your ",r," message."]})]})})},mre=({onClick:e})=>t.jsxs(vZ,{variant:"outline",size:"sm",className:"rounded-lg px-3 py-2 flex items-center gap-2 shadow-sm bg-white/80 hover:bg-zinc-100 border border-zinc-200",onClick:e,children:[t.jsx(wZ.PreviewButton,{className:"w-4 h-4"}),t.jsx("span",{className:"font-medium text-sm",children:"Preview"})]}),gre=e=>/^[^\s@.]+(?:\.[^\s@.]+)*@[^\s@.]+(?:\.[^\s@.]+)+$/.test(e),vre=e=>{if(!/^[0-9\s()+.-]+$/.test(e))return!1;const t=e.replace(/\D/g,"");return e.startsWith("+")?t.length>=10&&t.length<=15:10===t.length||!(11!==t.length||!t.startsWith("1"))},yre=({automation:e,type:r,setOpenSendPreviewPopup:o})=>{const[i,a]=n.useState(""),[s,l]=n.useState(""),[c,u]=n.useState(null),[d,p]=n.useState(!1),{sendTestCommunication:f,sendError:h,isSendSuccess:m}=WX(),{toast:g}=jl(),v=e.actionData?.find((e=>"send_communication"===e.actionType)),y=v?.actionMetadata.communicationGroupId,{communicationGroup:b,isGetting:x}=GX(y??void 0),w=n.useCallback((()=>{if(!y)return Promise.resolve(null);if(!b)return Promise.reject(new Error("Communication group not loaded"));switch(r){case"email":return Promise.resolve(b.emailChannelSenderId);case"sms":return Promise.resolve(b.smsChannelSenderId);default:return Promise.reject(new Error(`Unsupported type: ${r}`))}}),[b,r,y]);n.useEffect((()=>{(async()=>{try{const e=await w();u(e)}catch(e){u(null)}finally{p(!0)}})()}),[w]),n.useEffect((()=>{m&&(g({title:"Success",description:`Preview ${"email"===r?"email":"SMS"} sent successfully!`}),o(!1))}),[m,r,o,g]),n.useEffect((()=>{h&&(g({title:"Error",description:`Failed to send preview: ${h.message}`,variant:"destructive"}),o(!1))}),[h,g,o]);return!d||x?t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsx(hZ,{text:["Fetching sender id","Finishing up"]})}):c?t.jsxs("div",{className:"",children:[t.jsxs("h3",{className:"text-xl font-semibold text-gray-900 mb-4",children:["Send Preview ","email"===r?"Email":"SMS"]}),t.jsx(q3,{type:"email"===r?"email":"tel",placeholder:"email"===r?"Enter email address":"Enter phone number",value:i,onChange:e=>{a(e.target.value),l("")},className:"w-full px-3 py-3 border border-gray-300 rounded-lg text-base mb-4 \n focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent\n placeholder-gray-400"}),s&&t.jsx("p",{className:"text-red-500 text-sm mb-4 -mt-2",children:s}),t.jsx(vZ,{onClick:()=>{if(!("email"===r?gre(i):vre(i)))return void l("Please enter a valid "+("email"===r?"email address":"phone number"));if(!c)return void l("No sender found, please update the automation first!");const t=e.actionData?.find((e=>"send_communication"===e.actionType)),n=t?.actionMetadata.communicationGroupId;if(!n)return Promise.resolve(null);f({id:n,params:"email"===r?{emailAddress:i}:{phoneNumber:i}})},disabled:!i,className:"w-full bg-blue-600 text-white py-3 px-6 rounded-lg font-medium\n hover:bg-blue-700 transition-colors duration-200\n disabled:bg-gray-400 disabled:cursor-not-allowed",children:"Send Preview"})]}):t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center flex flex-col justify-center items-center gap-2",children:[t.jsx(wZ.AlertCircleIcon,{className:"h-12 w-12 text-gray-400 mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-700 mb-2",children:"No sender found"}),t.jsx("p",{className:"text-gray-500",children:"Please update the automation to include a sender for this type"})]})})},bre=({open:e,onOpenChange:n,automation:r})=>t.jsx(_B,{open:e,onOpenChange:n,children:t.jsxs(TB,{children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Send Preview Email"}),t.jsx(RB,{children:"Send a preview email to the automation."})]}),t.jsx(yre,{automation:r,type:"email",setOpenSendPreviewPopup:n})]})}),xre=({disablePreview:e=!1,disableEditContent:r=!1,disablePreviewSubtext:o=!1})=>{const i=aZ(),a=sZ(),[s,l]=n.useState({width:0,height:0}),[c,u]=n.useState(!1),[d,p]=n.useState(!1),f=n.useRef(null);if(n.useEffect((()=>{const e=()=>{f.current&&requestAnimationFrame((()=>{l({width:f.current?f.current.offsetWidth-75:0,height:f.current?f.current.offsetHeight-75:0})}))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[f]),!i||!a)return null;const h=a?.emailHtmlBody||"",m=a?.emailChannelSenderId&&h.length>0;return t.jsxs("div",{className:"flex-1 flex flex-col items-center w-full",children:[t.jsx(lre,{open:d,onOpenChange:p}),t.jsx(bre,{open:c,onOpenChange:u,automation:i}),t.jsx(ure,{actionButtons:t.jsx(t.Fragment,{children:t.jsxs("div",{className:"flex items-center space-x-2",children:[!e&&m&&t.jsx(mre,{onClick:()=>u(!0)}),(i.status===Ve.DRAFT||!r)&&t.jsx(vZ,{variant:"outline",size:"sm",className:"rounded-lg px-3 py-2 font-medium text-sm shadow-sm bg-white/80 hover:bg-zinc-100 border border-zinc-200",onClick:()=>p(!0),children:"Edit content"}),m&&t.jsx(fre,{expandDialogContent:t.jsx(pre,{emailBody:h})})]})}),children:m?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pt-4 pb-2 px-6 flex flex-col gap-1",children:t.jsx("div",{className:"rounded-xl bg-zinc-50/80 shadow-sm border border-zinc-100 p-4",children:t.jsx(dre,{})})}),t.jsx("div",{className:"w-full h-[1.5px] bg-zinc-200 my-2"}),t.jsx("div",{className:"flex-1 w-full overflow-auto h-full min-h-[500px]",ref:f,children:t.jsx(vte,{html:h,height:s.height,width:s.width})})]}):t.jsx(hre,{type:"email",disablePreviewSubtext:o})})]})},wre=()=>{const e=aZ(),r=sZ(),{channelSenders:o}=w9(),{channelAccounts:i}=b9(),a=n.useMemo((()=>o?.results.filter((e=>e.channelSenderMetadata.from||e.channelSenderMetadata.messageServiceSid))),[o?.results]),s=a?.find((e=>e.id===r?.smsChannelSenderId));if(!s)return null;if(!(e&&r&&o&&i&&a&&s))return null;const l=s.channelSenderMetadata.friendlyName||s.channelSenderMetadata.from||s.channelSenderMetadata.messageServiceSid;return t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"text-xs text-muted-foreground leading-none",children:"From"}),t.jsx("div",{className:"text-base font-medium font-mono text-zinc-800",children:l})]})})},_re=({smsBody:e})=>t.jsxs(ure,{children:[t.jsx("div",{className:"pt-4 pb-2 px-6 flex flex-col gap-1",children:t.jsx("div",{className:"rounded-xl bg-zinc-50/80 shadow-sm border border-zinc-100 p-4",children:t.jsx(wre,{})})}),t.jsx("div",{className:"rounded-lg p-6 bg-white flex-1 min-h-0 flex items-center justify-center",children:t.jsx(Gte,{body:e})})]}),Sre=({open:e,onOpenChange:n,automation:r})=>t.jsx(_B,{open:e,onOpenChange:n,children:t.jsxs(TB,{children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Send Preview SMS"}),t.jsx(RB,{children:"Send a preview SMS to the automation."})]}),t.jsx(yre,{automation:r,type:"sms",setOpenSendPreviewPopup:n})]})}),Ere=({disablePreview:e=!1,disableEditContent:r=!1,disablePreviewSubtext:o=!1})=>{const[i,a]=n.useState(!1),s=aZ(),l=sZ(),[c,u]=n.useState(!1);if(!s)return null;const d=l?.smsMessageBody||"",p=l?.smsChannelSenderId&&d.length>0,f=qte({companyName:l?.textMessageCompanyName??void 0,smsBody:d});return t.jsxs("div",{className:"flex flex-col items-center w-full h-full",children:[t.jsx(lre,{open:c,onOpenChange:u}),t.jsx(Sre,{open:i,onOpenChange:a,automation:s}),t.jsx(ure,{actionButtons:t.jsxs(t.Fragment,{children:[!e&&p&&t.jsx(mre,{onClick:()=>a(!0)}),(s.status===Ve.DRAFT||!r)&&t.jsx(vZ,{variant:"outline",size:"sm",className:"rounded-lg px-3 py-2 font-medium text-sm shadow-sm bg-white/80 hover:bg-zinc-100 border border-zinc-200",onClick:()=>u(!0),children:"Edit content"}),p&&t.jsx(fre,{expandDialogContent:t.jsx(_re,{smsBody:f})})]}),children:p?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pt-4 pb-2 px-6 flex flex-col gap-1",children:t.jsx("div",{className:"rounded-xl bg-zinc-50/80 shadow-sm border border-zinc-100 p-4",children:t.jsx(wre,{})})}),t.jsx("div",{className:"w-full h-[1.5px] bg-zinc-200 my-2"}),t.jsx("div",{className:"flex-1 w-full overflow-auto h-full flex items-center justify-center",children:t.jsx(Gte,{body:f})})]}):t.jsx(hre,{type:"sms",disablePreviewSubtext:o})})]})},Tre=({disablePreview:e=!1,disableEditContent:r=!1,disablePreviewSubtext:o=!1,hideSms:i=!1})=>{const[a,s]=n.useState("email"),[l,c]=n.useState(!1),u=sZ();return n.useEffect((()=>{u&&!l&&(s(u.emailChannelSenderId?"email":u.smsChannelSenderId?"sms":"email"),c(!0))}),[u,l]),u?t.jsxs(ore,{value:a,onValueChange:e=>{s(e)},defaultValue:"email",className:"flex flex-col gap-4 pt-4 flex-1 bg-muted rounded-md",children:[t.jsx("div",{className:"max-w-[640px] mx-auto w-full",children:t.jsxs(ire,{className:"grid w-full "+(i?"grid-cols-1":"grid-cols-2"),children:[t.jsx(are,{value:"email",className:"group",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.32'%20d='M6.66683%201.5C4.79999%201.5%203.86657%201.5%203.15353%201.86331C2.52632%202.18289%202.01639%202.69282%201.69681%203.32003C1.3335%204.03307%201.3335%204.96649%201.3335%206.83333V9.16667C1.3335%2011.0335%201.3335%2011.9669%201.69681%2012.68C2.01639%2013.3072%202.52632%2013.8171%203.15353%2014.1367C3.86657%2014.5%204.79999%2014.5%206.66683%2014.5H10.3335C12.2003%2014.5%2013.1338%2014.5%2013.8468%2014.1367C14.474%2013.8171%2014.9839%2013.3072%2015.3035%2012.68C15.6668%2011.9669%2015.6668%2011.0335%2015.6668%209.16667V6.83333C15.6668%204.96649%2015.6668%204.03307%2015.3035%203.32003C14.9839%202.69282%2014.474%202.18289%2013.8468%201.86331C13.1338%201.5%2012.2003%201.5%2010.3335%201.5H6.66683Z'%20fill='%230B66E4'%20/%3e%3cpath%20d='M12.3125%204.86981C12.5278%204.7825%2012.7821%204.85543%2012.916%205.05633C13.05%205.25736%2013.0191%205.52008%2012.8554%205.68524L12.7773%205.74969L12.1103%206.19403C11.0645%206.89127%2010.4559%207.30338%209.79783%207.50164C9.05705%207.72477%208.27301%207.75304%207.52146%207.58563L7.20212%207.50164C6.7086%207.35295%206.24273%207.08397%205.59958%206.66473L4.88962%206.19403L4.22263%205.74969L4.14451%205.68524C3.98082%205.52008%203.95%205.25736%204.08396%205.05633C4.21789%204.85543%204.47213%204.7825%204.68747%204.86981L4.77732%204.91766L5.44431%205.36199L6.16013%205.83563C6.77757%206.23725%207.12913%206.43582%207.49021%206.54461L7.73923%206.60906C8.32376%206.73923%208.93361%206.71818%209.50974%206.54461C9.99112%206.39957%2010.4556%206.09534%2011.5556%205.36199L12.2226%204.91766L12.3125%204.86981Z'%20fill='%230B66E4'%20/%3e%3c/svg%3e",alt:"Email",className:"w-4 h-4 mr-2 hidden group-data-[state=active]:block"}),t.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.32'%20d='M6.66683%201.5C4.79999%201.5%203.86657%201.5%203.15353%201.86331C2.52632%202.18289%202.01639%202.69282%201.69681%203.32003C1.3335%204.03307%201.3335%204.96649%201.3335%206.83333V9.16667C1.3335%2011.0335%201.3335%2011.9669%201.69681%2012.68C2.01639%2013.3072%202.52632%2013.8171%203.15353%2014.1367C3.86657%2014.5%204.79999%2014.5%206.66683%2014.5H10.3335C12.2003%2014.5%2013.1338%2014.5%2013.8468%2014.1367C14.474%2013.8171%2014.9839%2013.3072%2015.3035%2012.68C15.6668%2011.9669%2015.6668%2011.0335%2015.6668%209.16667V6.83333C15.6668%204.96649%2015.6668%204.03307%2015.3035%203.32003C14.9839%202.69282%2014.474%202.18289%2013.8468%201.86331C13.1338%201.5%2012.2003%201.5%2010.3335%201.5H6.66683Z'%20fill='%237A8599'%20/%3e%3cpath%20d='M12.3125%204.86981C12.5278%204.7825%2012.7821%204.85543%2012.916%205.05633C13.05%205.25736%2013.0191%205.52008%2012.8554%205.68524L12.7773%205.74969L12.1103%206.19403C11.0645%206.89127%2010.4559%207.30338%209.79783%207.50164C9.05705%207.72477%208.27301%207.75304%207.52146%207.58563L7.20212%207.50164C6.7086%207.35295%206.24273%207.08397%205.59958%206.66473L4.88962%206.19403L4.22263%205.74969L4.14451%205.68524C3.98082%205.52008%203.95%205.25736%204.08396%205.05633C4.21789%204.85543%204.47213%204.7825%204.68747%204.86981L4.77732%204.91766L5.44431%205.36199L6.16013%205.83563C6.77757%206.23725%207.12913%206.43582%207.49021%206.54461L7.73923%206.60906C8.32376%206.73923%208.93361%206.71818%209.50974%206.54461C9.99112%206.39957%2010.4556%206.09534%2011.5556%205.36199L12.2226%204.91766L12.3125%204.86981Z'%20fill='%237A8599'%20/%3e%3c/svg%3e",alt:"Email",className:"w-4 h-4 mr-2 block group-data-[state=active]:hidden"}),"Email"]})}),!i&&t.jsx(are,{value:"sms",className:"group",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.32'%20d='M7.09967%200.833328C5.6062%200.833328%204.85946%200.833328%204.28903%201.12398C3.78727%201.37964%203.37932%201.78759%203.12366%202.28935C2.83301%202.85978%202.83301%203.60652%202.83301%205.09999V10.9C2.83301%2012.3935%202.83301%2013.1402%203.12366%2013.7106C3.37932%2014.2124%203.78727%2014.6204%204.28903%2014.876C4.85946%2015.1667%205.6062%2015.1667%207.09967%2015.1667H8.89967C10.3931%2015.1667%2011.1399%2015.1667%2011.7103%2014.876C12.2121%2014.6204%2012.62%2014.2124%2012.8757%2013.7106C13.1663%2013.1402%2013.1663%2012.3935%2013.1663%2010.9V5.1C13.1663%203.60652%2013.1663%202.85978%2012.8757%202.28935C12.62%201.78759%2012.2121%201.37964%2011.7103%201.12398C11.1399%200.833328%2010.3931%200.833328%208.89968%200.833328H7.09967Z'%20fill='%230B66E4'%20/%3e%3cpath%20d='M9.43457%2012.1764C9.66223%2012.2232%209.83398%2012.4252%209.83398%2012.6667C9.83398%2012.9082%209.66223%2013.1101%209.43457%2013.1569L9.33398%2013.1667H6.66699C6.39085%2013.1667%206.16699%2012.9428%206.16699%2012.6667C6.16699%2012.3905%206.39085%2012.1667%206.66699%2012.1667H9.33398L9.43457%2012.1764ZM8.08594%203.17058C8.50572%203.21356%208.83382%203.56859%208.83398%203.99968C8.83398%204.45981%208.46009%204.83349%208%204.83366C7.56881%204.8335%207.21375%204.50553%207.1709%204.08562L7.16699%203.99968L7.1709%203.91472C7.2136%203.49464%207.5687%203.16684%208%203.16667L8.08594%203.17058Z'%20fill='%230B66E4'%20/%3e%3c/svg%3e",alt:"SMS",className:"w-4 h-4 mr-2 hidden group-data-[state=active]:block"}),t.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.32'%20d='M7.09967%200.833328C5.6062%200.833328%204.85946%200.833328%204.28903%201.12398C3.78727%201.37964%203.37932%201.78759%203.12366%202.28935C2.83301%202.85978%202.83301%203.60652%202.83301%205.09999V10.9C2.83301%2012.3935%202.83301%2013.1402%203.12366%2013.7106C3.37932%2014.2124%203.78727%2014.6204%204.28903%2014.876C4.85946%2015.1667%205.6062%2015.1667%207.09967%2015.1667H8.89967C10.3931%2015.1667%2011.1399%2015.1667%2011.7103%2014.876C12.2121%2014.6204%2012.62%2014.2124%2012.8757%2013.7106C13.1663%2013.1402%2013.1663%2012.3935%2013.1663%2010.9V5.1C13.1663%203.60652%2013.1663%202.85978%2012.8757%202.28935C12.62%201.78759%2012.2121%201.37964%2011.7103%201.12398C11.1399%200.833328%2010.3931%200.833328%208.89968%200.833328H7.09967Z'%20fill='%237A8599'%20/%3e%3cpath%20d='M9.43457%2012.1764C9.66223%2012.2232%209.83398%2012.4252%209.83398%2012.6667C9.83398%2012.9082%209.66223%2013.1101%209.43457%2013.1569L9.33398%2013.1667H6.66699C6.39085%2013.1667%206.16699%2012.9428%206.16699%2012.6667C6.16699%2012.3905%206.39085%2012.1667%206.66699%2012.1667H9.33398L9.43457%2012.1764ZM8.08594%203.17058C8.50572%203.21356%208.83382%203.56859%208.83398%203.99968C8.83398%204.45981%208.46009%204.83349%208%204.83366C7.56881%204.8335%207.21375%204.50553%207.1709%204.08562L7.16699%203.99968L7.1709%203.91472C7.2136%203.49464%207.5687%203.16684%208%203.16667L8.08594%203.17058Z'%20fill='%237A8599'%20/%3e%3c/svg%3e",alt:"SMS",className:"w-4 h-4 mr-2 block group-data-[state=active]:hidden"}),"SMS"]})})]})}),t.jsxs("div",{className:"max-w-[1000px] mx-auto w-full flex-1",children:[t.jsx(sre,{value:"sms",children:t.jsx(Ere,{disablePreview:e,disableEditContent:r,disablePreviewSubtext:o})}),t.jsx(sre,{value:"email",className:"flex flex-col h-full",children:t.jsx(xre,{disablePreview:e,disableEditContent:r,disablePreviewSubtext:o})})]})]}):t.jsx("div",{className:"flex flex-col gap-4 pt-4 flex-1 bg-muted rounded-md",children:t.jsx(hZ,{text:["Loading..."]})})},Cre="reach-styles-module__h2___J-48W",Are="reach-styles-module__minorText___1TEN6",Nre=({children:e,className:n})=>t.jsx("h2",{className:Zd(Cre,n),children:e}),Rre=({children:e,className:n})=>t.jsx("p",{className:Zd(Are,n),children:e}),Ore=({title:e,children:n,headerActions:r})=>t.jsxs("div",{className:"max-w-[1000px] mx-auto w-full flex-1 flex flex-col gap-4 pt-4",children:[t.jsxs("div",{className:"px-4 flex",children:[t.jsx(Nre,{className:"text-primary",children:e}),r&&t.jsx("div",{className:"ml-auto",children:r})]}),n]}),Pre=()=>t.jsx(Ore,{title:"Preview & Schedule",children:t.jsx(Tre,{disablePreview:!0,disableEditContent:!0,disablePreviewSubtext:!0})}),kre=()=>{const e=aZ(),r=sZ(),{channelSenders:o}=w9(),{channelAccounts:i}=b9(),[a,s]=n.useState(null),[l,c]=n.useState(null),[u,d]=n.useState(null),[p,f]=n.useState(null);return n.useEffect((()=>{o&&d(o),i&&f(i)}),[o,i]),n.useEffect((()=>{if(r&&u&&p){const e=r.emailChannelSenderId,t=r.smsChannelSenderId,n=u.results.find((t=>t.id===e)),o=u.results.find((e=>e.id===t));if(n&&r.emailSubject&&r.emailHtmlBody){const e=n.channelSenderMetadata?.userPart,t=p.results.find((e=>e.id===n.channelAccountId));if(t)switch(t.channelAccountMetadata.type){case x9.REACH_MANAGED:s({fromEmail:`${e}@${t.channelAccountMetadata.baseDomain}.embedreach.com`,fromName:n.channelSenderMetadata?.emailFromName,subject:r.emailSubject,previewText:r.emailPreviewText,body:r.emailHtmlBody});break;case x9.TWILLIO:break;default:throw ene(t.channelAccountMetadata.type,x9)}}o&&r.smsMessageBody&&c({fromPhone:Jte(o.channelSenderMetadata),body:r.smsMessageBody,companyName:r.textMessageCompanyName})}}),[r,u,p]),e?t.jsx("div",a||l?{className:"w-full",children:t.jsx("div",{className:"flex flex-col gap-4 w-full",children:t.jsx(Pre,{})})}:{className:"flex justify-center items-center h-full",children:t.jsx("div",{children:"No preview data Please complete previous steps"})}):t.jsx(hZ,{text:["Loading..."]})};function Mre(e){return(Mre="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jre(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Lre(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Dre(e){Lre(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Mre(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):new Date(NaN)}function Ire(e,t){Lre(2,arguments);var n=Dre(e),r=jre(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function Fre(e,t){Lre(2,arguments);var n=Dre(e),r=jre(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+r+1,0),o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}var Ure={};function $re(){return Ure}function Vre(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=$re(),d=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Dre(e),f=p.getDay(),h=(f<d?7:0)+f-d;return p.setDate(p.getDate()-h),p.setHours(0,0,0,0),p}function Bre(e){return Lre(1,arguments),Vre(e,{weekStartsOn:1})}function zre(e){Lre(1,arguments);var t=function(e){Lre(1,arguments);var t=Dre(e),n=t.getFullYear(),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var o=Bre(r),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var a=Bre(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Bre(n)}function Hre(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function qre(e){Lre(1,arguments);var t=Dre(e);return t.setHours(0,0,0,0),t}function Gre(e,t){Lre(2,arguments);var n=qre(e),r=qre(t),o=n.getTime()-Hre(n),i=r.getTime()-Hre(r);return Math.round((o-i)/864e5)}function Kre(e,t){return Lre(2,arguments),Ire(e,7*jre(t))}function Wre(e,t){return Lre(2,arguments),Fre(e,12*jre(t))}function Yre(e,t){Lre(2,arguments);var n=qre(e),r=qre(t);return n.getTime()===r.getTime()}function Xre(e){return Lre(1,arguments),e instanceof Date||"object"===Mre(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Zre(e,t){Lre(2,arguments);var n=Dre(e),r=Dre(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function Qre(e){Lre(1,arguments);var t=Dre(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Jre(e){Lre(1,arguments);var t=Dre(e);return t.setDate(1),t.setHours(0,0,0,0),t}function eoe(e){Lre(1,arguments);var t=Dre(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function toe(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=$re(),d=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Dre(e),f=p.getDay(),h=6+(f<d?-7:0)-(f-d);return p.setDate(p.getDate()+h),p.setHours(23,59,59,999),p}function noe(e){return Lre(1,arguments),toe(e,{weekStartsOn:1})}function roe(e,t){return Lre(2,arguments),function(e,t){Lre(2,arguments);var n=Dre(e).getTime(),r=jre(t);return new Date(n+r)}(e,-jre(t))}function ooe(e){Lre(1,arguments);var t=Dre(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function ioe(e){Lre(1,arguments);var t=Dre(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=ooe(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=ooe(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function aoe(e){Lre(1,arguments);var t=Dre(e),n=ooe(t).getTime()-function(e){Lre(1,arguments);var t=ioe(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),ooe(n)}(t).getTime();return Math.round(n/6048e5)+1}function soe(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=$re(),d=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Dre(e),f=p.getUTCDay(),h=(f<d?7:0)+f-d;return p.setUTCDate(p.getUTCDate()-h),p.setUTCHours(0,0,0,0),p}function loe(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=Dre(e),d=u.getUTCFullYear(),p=$re(),f=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:p.firstWeekContainsDate)&&void 0!==r?r:null===(l=p.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,f),h.setUTCHours(0,0,0,0);var m=soe(h,t),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var v=soe(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}function coe(e,t){Lre(1,arguments);var n=Dre(e),r=soe(n,t).getTime()-function(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=$re(),d=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),p=loe(e,t),f=new Date(0);return f.setUTCFullYear(p,0,d),f.setUTCHours(0,0,0,0),soe(f,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function uoe(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var doe=function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return uoe("yy"===t?r%100:r,t.length)},poe=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):uoe(n+1,2)},foe=function(e,t){return uoe(e.getUTCDate(),t.length)},hoe=function(e,t){return uoe(e.getUTCHours()%12||12,t.length)},moe=function(e,t){return uoe(e.getUTCHours(),t.length)},goe=function(e,t){return uoe(e.getUTCMinutes(),t.length)},voe=function(e,t){return uoe(e.getUTCSeconds(),t.length)},yoe=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return uoe(Math.floor(r*Math.pow(10,n-3)),t.length)},boe="midnight",xoe="noon",woe="morning",_oe="afternoon",Soe="evening",Eoe="night",Toe={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return doe(e,t)},Y:function(e,t,n,r){var o=loe(e,r),i=o>0?o:1-o;return"YY"===t?uoe(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):uoe(i,t.length)},R:function(e,t){return uoe(ioe(e),t.length)},u:function(e,t){return uoe(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return uoe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return uoe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return poe(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return uoe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=coe(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):uoe(o,t.length)},I:function(e,t,n){var r=aoe(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):uoe(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):foe(e,t)},D:function(e,t,n){var r=function(e){Lre(1,arguments);var t=Dre(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime();return Math.floor((n-r)/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):uoe(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return uoe(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return uoe(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return uoe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?xoe:0===o?boe:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?Soe:o>=12?_oe:o>=4?woe:Eoe,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return hoe(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):moe(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):uoe(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):uoe(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):goe(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):voe(e,t)},S:function(e,t){return yoe(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return Aoe(o);case"XXXX":case"XX":return Noe(o);default:return Noe(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return Aoe(o);case"xxxx":case"xx":return Noe(o);default:return Noe(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Coe(o,":");default:return"GMT"+Noe(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Coe(o,":");default:return"GMT"+Noe(o,":")}},t:function(e,t,n,r){return uoe(Math.floor((r._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,n,r){return uoe((r._originalDate||e).getTime(),t.length)}};function Coe(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t;return n+String(o)+a+uoe(i,2)}function Aoe(e,t){return e%60==0?(e>0?"-":"+")+uoe(Math.abs(e)/60,2):Noe(e,t)}function Noe(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+uoe(Math.floor(o/60),2)+n+uoe(o%60,2)}var Roe=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Ooe=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Poe={p:Ooe,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return Roe(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Roe(o,t)).replace("{{time}}",Ooe(i,t))}},koe=["D","DD"],Moe=["YY","YYYY"];function joe(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Loe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Doe(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Ioe={date:Doe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Doe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Doe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Foe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Uoe(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var $oe={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Uoe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Uoe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Uoe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Uoe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Uoe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Voe(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=t.match(r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth]);if(!o)return null;var i,a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(function(e){return e.test(a)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(s,(function(e){return e.test(a)}));return i=e.valueCallback?e.valueCallback(l):l,{value:i=n.valueCallback?n.valueCallback(i):i,rest:t.slice(a.length)}}}var Boe={ordinalNumber:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var o=r[0],i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(o.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Voe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Voe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Voe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Voe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Voe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},zoe={code:"en-US",formatDistance:function(e,t,n){var r,o=Loe[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Ioe,formatRelative:function(e,t,n,r){return Foe[e]},localize:$oe,match:Boe,options:{weekStartsOn:0,firstWeekContainsDate:1}},Hoe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qoe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Goe=/^'([^]*?)'?$/,Koe=/''/g,Woe=/[a-zA-Z]/;function Yoe(e,t,n){var r,o,i,a,s,l,c,u,d,p,f,h,m,g,v,y,b,x;Lre(2,arguments);var w=String(t),_=$re(),S=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:_.locale)&&void 0!==r?r:zoe,E=jre(null!==(i=null!==(a=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:_.firstWeekContainsDate)&&void 0!==a?a:null===(d=_.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=jre(null!==(f=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:_.weekStartsOn)&&void 0!==h?h:null===(b=_.locale)||void 0===b||null===(x=b.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==f?f:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var C=Dre(e);if(!function(e){if(Lre(1,arguments),!Xre(e)&&"number"!=typeof e)return!1;var t=Dre(e);return!isNaN(Number(t))}(C))throw new RangeError("Invalid time value");var A=roe(C,Hre(C)),N={firstWeekContainsDate:E,weekStartsOn:T,locale:S,_originalDate:C};return w.match(qoe).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Poe[t])(e,S.formatLong):e})).join("").match(Hoe).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return function(e){var t=e.match(Goe);if(!t)return e;return t[1].replace(Koe,"'")}(r);var i=Toe[o];if(i)return null!=n&&n.useAdditionalWeekYearTokens||-1===Moe.indexOf(r)||joe(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==koe.indexOf(e)}(r)||joe(r,t,String(e)),i(A,r,S.localize,N);if(o.match(Woe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}function Xoe(e){return Lre(1,arguments),Math.floor(function(e){return Lre(1,arguments),Dre(e).getTime()}(e)/1e3)}function Zoe(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=$re(),d=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),p=function(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=Dre(e),d=u.getFullYear(),p=$re(),f=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:p.firstWeekContainsDate)&&void 0!==r?r:null===(l=p.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(d+1,0,f),h.setHours(0,0,0,0);var m=Vre(h,t),g=new Date(0);g.setFullYear(d,0,f),g.setHours(0,0,0,0);var v=Vre(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}(e,t),f=new Date(0);return f.setFullYear(p,0,d),f.setHours(0,0,0,0),Vre(f,t)}function Qoe(e,t){return Lre(1,arguments),function(e,t,n){Lre(2,arguments);var r=Vre(e,n),o=Vre(t,n),i=r.getTime()-Hre(r),a=o.getTime()-Hre(o);return Math.round((i-a)/6048e5)}(function(e){Lre(1,arguments);var t=Dre(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),Jre(e),t)+1}function Joe(e,t){Lre(2,arguments);var n=Dre(e),r=Dre(t);return n.getTime()>r.getTime()}function eie(e,t){Lre(2,arguments);var n=Dre(e),r=Dre(t);return n.getTime()<r.getTime()}function tie(e,t){Lre(2,arguments);var n=Dre(e),r=Dre(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function nie(e,t){return Lre(2,arguments),Ire(e,-jre(t))}function rie(e,t){Lre(2,arguments);var n=Dre(e),r=jre(t),o=n.getFullYear(),i=n.getDate(),a=new Date(0);a.setFullYear(o,r,15),a.setHours(0,0,0,0);var s=function(e){Lre(1,arguments);var t=Dre(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(r,Math.min(i,s)),n}function oie(e,t){Lre(2,arguments);var n=Dre(e),r=jre(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}var iie=function(){return iie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},iie.apply(this,arguments)};function aie(e,t,n){for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function sie(e){return"multiple"===e.mode}function lie(e){return"range"===e.mode}function cie(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var uie={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var die=Object.freeze({__proto__:null,formatCaption:function(e,t){return Yoe(e,"LLLL y",t)},formatDay:function(e,t){return Yoe(e,"d",t)},formatMonthCaption:function(e,t){return Yoe(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Yoe(e,"cccccc",t)},formatYearCaption:function(e,t){return Yoe(e,"yyyy",t)}}),pie=Object.freeze({__proto__:null,labelDay:function(e,t,n){return Yoe(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Yoe(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var fie=n.createContext(void 0);function hie(e){var n,r,o=e.initialProps,i={captionLayout:"buttons",classNames:uie,formatters:die,labels:pie,locale:zoe,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:"default"},a=function(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return r?i=Jre(r):t&&(i=new Date(t,0,1)),o?a=Qre(o):n&&(a=new Date(n,11,31)),{fromDate:i?qre(i):void 0,toDate:a?qre(a):void 0}}(o),s=a.fromDate,l=a.toDate,c=null!==(n=o.captionLayout)&&void 0!==n?n:i.captionLayout;"buttons"===c||s&&l||(c="buttons"),(cie(o)||sie(o)||lie(o))&&(r=o.onSelect);var u=iie(iie(iie({},i),o),{captionLayout:c,classNames:iie(iie({},i.classNames),o.classNames),components:iie({},o.components),formatters:iie(iie({},i.formatters),o.formatters),fromDate:s,labels:iie(iie({},i.labels),o.labels),mode:o.mode||i.mode,modifiers:iie(iie({},i.modifiers),o.modifiers),modifiersClassNames:iie(iie({},i.modifiersClassNames),o.modifiersClassNames),onSelect:r,styles:iie(iie({},i.styles),o.styles),toDate:l});return t.jsx(fie.Provider,{value:u,children:e.children})}function mie(){var e=n.useContext(fie);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function gie(e){var n=mie();return t.jsx("div",{className:n.classNames.caption_label,style:n.styles.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:(0,n.formatters.formatCaption)(e.displayMonth,{locale:n.locale})})}function vie(e){return t.jsx("svg",iie({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:t.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function yie(e){var n,r,o=e.onChange,i=e.value,a=e.children,s=e.caption,l=e.className,c=e.style,u=mie(),d=null!==(r=null===(n=u.components)||void 0===n?void 0:n.IconDropdown)&&void 0!==r?r:vie;return t.jsxs("div",{className:l,style:c,children:[t.jsx("span",{className:u.classNames.vhidden,children:e["aria-label"]}),t.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:i,onChange:o,children:a}),t.jsxs("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[s,t.jsx(d,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}function bie(e){var n,r=mie(),o=r.fromDate,i=r.toDate,a=r.styles,s=r.locale,l=r.formatters.formatMonthCaption,c=r.classNames,u=r.components,d=r.labels.labelMonthDropdown;if(!o)return t.jsx(t.Fragment,{});if(!i)return t.jsx(t.Fragment,{});var p=[];if(function(e,t){Lre(2,arguments);var n=Dre(e),r=Dre(t);return n.getFullYear()===r.getFullYear()}(o,i))for(var f=Jre(o),h=o.getMonth();h<=i.getMonth();h++)p.push(rie(f,h));else for(f=Jre(new Date),h=0;h<=11;h++)p.push(rie(f,h));var m=null!==(n=null==u?void 0:u.Dropdown)&&void 0!==n?n:yie;return t.jsx(m,{name:"months","aria-label":d(),className:c.dropdown_month,style:a.dropdown_month,onChange:function(t){var n=Number(t.target.value),r=rie(Jre(e.displayMonth),n);e.onChange(r)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:s}),children:p.map((function(e){return t.jsx("option",{value:e.getMonth(),children:l(e,{locale:s})},e.getMonth())}))})}function xie(e){var n,r=e.displayMonth,o=mie(),i=o.fromDate,a=o.toDate,s=o.locale,l=o.styles,c=o.classNames,u=o.components,d=o.formatters.formatYearCaption,p=o.labels.labelYearDropdown,f=[];if(!i)return t.jsx(t.Fragment,{});if(!a)return t.jsx(t.Fragment,{});for(var h=i.getFullYear(),m=a.getFullYear(),g=h;g<=m;g++)f.push(oie(eoe(new Date),g));var v=null!==(n=null==u?void 0:u.Dropdown)&&void 0!==n?n:yie;return t.jsx(v,{name:"years","aria-label":p(),className:c.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=oie(Jre(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:d(r,{locale:s}),children:f.map((function(e){return t.jsx("option",{value:e.getFullYear(),children:d(e,{locale:s})},e.getFullYear())}))})}function wie(){var e=mie(),t=function(e){var t=e.month||e.defaultMonth||e.today||new Date,n=e.toDate,r=e.fromDate,o=e.numberOfMonths,i=void 0===o?1:o;return n&&Zre(n,t)<0&&(t=Fre(n,-1*(i-1))),r&&Zre(t,r)<0&&(t=r),Jre(t)}(e),r=function(e,t){var r=n.useState(e);return[void 0===t?r[0]:t,r[1]]}(t,e.month),o=r[1];return[r[0],function(t){var n;if(!e.disableNavigation){var r=Jre(t);o(r),null===(n=e.onMonthChange)||void 0===n||n.call(e,r)}}]}var _ie=n.createContext(void 0);function Sie(e){var n=mie(),r=wie(),o=r[0],i=r[1],a=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=Jre(e),i=Zre(Jre(Fre(o,r)),o),a=[],s=0;s<i;s++){var l=Fre(o,s);a.push(l)}return n&&(a=a.reverse()),a}(o,n),s=function(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.numberOfMonths,o=void 0===r?1:r,i=t.pagedNavigation?o:1,a=Jre(e);if(!n)return Fre(a,i);if(!(Zre(n,e)<o))return Fre(a,i)}}(o,n),l=function(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.numberOfMonths,o=t.pagedNavigation?void 0===r?1:r:1,i=Jre(e);if(!n)return Fre(i,-o);if(!(Zre(i,n)<=0))return Fre(i,-o)}}(o,n),c=function(e){return a.some((function(t){return tie(e,t)}))};return t.jsx(_ie.Provider,{value:{currentMonth:o,displayMonths:a,goToMonth:i,goToDate:function(e,t){c(e)||(t&&eie(e,t)?i(Fre(e,1+-1*n.numberOfMonths)):i(e))},previousMonth:l,nextMonth:s,isDateDisplayed:c},children:e.children})}function Eie(){var e=n.useContext(_ie);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function Tie(e){var n,r=mie(),o=r.classNames,i=r.styles,a=r.components,s=Eie().goToMonth,l=function(t){s(Fre(t,e.displayIndex?-e.displayIndex:0))},c=null!==(n=null==a?void 0:a.CaptionLabel)&&void 0!==n?n:gie,u=t.jsx(c,{id:e.id,displayMonth:e.displayMonth});return t.jsxs("div",{className:o.caption_dropdowns,style:i.caption_dropdowns,children:[t.jsx("div",{className:o.vhidden,children:u}),t.jsx(bie,{onChange:l,displayMonth:e.displayMonth}),t.jsx(xie,{onChange:l,displayMonth:e.displayMonth})]})}function Cie(e){return t.jsx("svg",iie({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:t.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Aie(e){return t.jsx("svg",iie({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:t.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Nie=n.forwardRef((function(e,n){var r=mie(),o=r.classNames,i=r.styles,a=[o.button_reset,o.button];e.className&&a.push(e.className);var s=a.join(" "),l=iie(iie({},i.button_reset),i.button);return e.style&&Object.assign(l,e.style),t.jsx("button",iie({},e,{ref:n,type:"button",className:s,style:l}))}));function Rie(e){var n,r,o=mie(),i=o.dir,a=o.locale,s=o.classNames,l=o.styles,c=o.labels,u=c.labelPrevious,d=c.labelNext,p=o.components;if(!e.nextMonth&&!e.previousMonth)return t.jsx(t.Fragment,{});var f=u(e.previousMonth,{locale:a}),h=[s.nav_button,s.nav_button_previous].join(" "),m=d(e.nextMonth,{locale:a}),g=[s.nav_button,s.nav_button_next].join(" "),v=null!==(n=null==p?void 0:p.IconRight)&&void 0!==n?n:Aie,y=null!==(r=null==p?void 0:p.IconLeft)&&void 0!==r?r:Cie;return t.jsxs("div",{className:s.nav,style:l.nav,children:[!e.hidePrevious&&t.jsx(Nie,{name:"previous-month","aria-label":f,className:h,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:t.jsx("rtl"===i?v:y,{className:s.nav_icon,style:l.nav_icon})}),!e.hideNext&&t.jsx(Nie,{name:"next-month","aria-label":m,className:g,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:t.jsx("rtl"===i?y:v,{className:s.nav_icon,style:l.nav_icon})})]})}function Oie(e){var n=mie().numberOfMonths,r=Eie(),o=r.previousMonth,i=r.nextMonth,a=r.goToMonth,s=r.displayMonths,l=s.findIndex((function(t){return tie(e.displayMonth,t)})),c=0===l,u=l===s.length-1;return t.jsx(Rie,{displayMonth:e.displayMonth,hideNext:n>1&&(c||!u),hidePrevious:n>1&&(u||!c),nextMonth:i,previousMonth:o,onPreviousClick:function(){o&&a(o)},onNextClick:function(){i&&a(i)}})}function Pie(e){var n,r,o=mie(),i=o.classNames,a=o.styles,s=o.captionLayout,l=o.components,c=null!==(n=null==l?void 0:l.CaptionLabel)&&void 0!==n?n:gie;return r=o.disableNavigation?t.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===s?t.jsx(Tie,{displayMonth:e.displayMonth,id:e.id}):t.jsxs(t.Fragment,"dropdown-buttons"===s?{children:[t.jsx(Tie,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),t.jsx(Oie,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}:{children:[t.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),t.jsx(Oie,{displayMonth:e.displayMonth,id:e.id})]}),t.jsx("div",{className:i.caption,style:a.caption,children:r})}function kie(e){var n=mie(),r=n.footer;return r?t.jsx("tfoot",{className:n.classNames.tfoot,style:n.styles.tfoot,children:t.jsx("tr",{children:t.jsx("td",{colSpan:8,children:r})})}):t.jsx(t.Fragment,{})}function Mie(){var e=mie(),n=e.classNames,r=e.styles,o=e.showWeekNumber,i=e.locale,a=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,l=function(e,t,n){for(var r=n?Bre(new Date):Vre(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=Ire(r,i);o.push(a)}return o}(i,e.weekStartsOn,e.ISOWeek);return t.jsxs("tr",{style:r.head_row,className:n.head_row,children:[o&&t.jsx("td",{style:r.head_cell,className:n.head_cell}),l.map((function(e,o){return t.jsx("th",{scope:"col",className:n.head_cell,style:r.head_cell,"aria-label":s(e,{locale:i}),children:a(e,{locale:i})},o)}))]})}function jie(){var e,n=mie(),r=n.components,o=null!==(e=null==r?void 0:r.HeadRow)&&void 0!==e?e:Mie;return t.jsx("thead",{style:n.styles.head,className:n.classNames.head,children:t.jsx(o,{})})}function Lie(e){var n=mie();return t.jsx(t.Fragment,{children:(0,n.formatters.formatDay)(e.date,{locale:n.locale})})}var Die=n.createContext(void 0);function Iie(e){if(!sie(e.initialProps)){return t.jsx(Die.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}return t.jsx(Fie,{initialProps:e.initialProps,children:e.children})}function Fie(e){var n=e.initialProps,r=e.children,o=n.selected,i=n.min,a=n.max,s={disabled:[]};return o&&s.disabled.push((function(e){var t=a&&o.length>a-1,n=o.some((function(t){return Yre(t,e)}));return Boolean(t&&!n)})),t.jsx(Die.Provider,{value:{selected:o,onDayClick:function(e,t,r){var s,l;if((null===(s=n.onDayClick)||void 0===s||s.call(n,e,t,r),!Boolean(t.selected&&i&&(null==o?void 0:o.length)===i))&&!Boolean(!t.selected&&a&&(null==o?void 0:o.length)===a)){var c=o?aie([],o):[];if(t.selected){var u=c.findIndex((function(t){return Yre(e,t)}));c.splice(u,1)}else c.push(e);null===(l=n.onSelect)||void 0===l||l.call(n,c,e,t,r)}},modifiers:s},children:r})}function Uie(){var e=n.useContext(Die);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var $ie,Vie,Bie=n.createContext(void 0);function zie(e){if(!lie(e.initialProps)){return t.jsx(Bie.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}return t.jsx(Hie,{initialProps:e.initialProps,children:e.children})}function Hie(e){var n=e.initialProps,r=e.children,o=n.selected,i=o||{},a=i.from,s=i.to,l=n.min,c=n.max,u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(u.range_start=[a],s?(u.range_end=[s],Yre(a,s)||(u.range_middle=[{after:a,before:s}])):u.range_end=[a]):s&&(u.range_start=[s],u.range_end=[s]),l&&(a&&!s&&u.disabled.push({after:nie(a,l-1),before:Ire(a,l-1)}),a&&s&&u.disabled.push({after:a,before:Ire(a,l-1)}),!a&&s&&u.disabled.push({after:nie(s,l-1),before:Ire(s,l-1)})),c){if(a&&!s&&(u.disabled.push({before:Ire(a,1-c)}),u.disabled.push({after:Ire(a,c-1)})),a&&s){var d=c-(Gre(s,a)+1);u.disabled.push({before:nie(a,d)}),u.disabled.push({after:Ire(s,d)})}!a&&s&&(u.disabled.push({before:Ire(s,1-c)}),u.disabled.push({after:Ire(s,c-1)}))}return t.jsx(Bie.Provider,{value:{selected:o,onDayClick:function(e,t,r){var i,a;null===(i=n.onDayClick)||void 0===i||i.call(n,e,t,r);var s=function(e,t){var n=t||{},r=n.from,o=n.to;if(r&&o){if(Yre(o,e)&&Yre(r,e))return;if(Yre(o,e))return{from:o,to:void 0};if(Yre(r,e))return;return Joe(r,e)?{from:e,to:o}:{from:r,to:e}}return o?Joe(e,o)?{from:o,to:e}:{from:e,to:o}:r?eie(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}(e,o);null===(a=n.onSelect)||void 0===a||a.call(n,s,e,t,r)},modifiers:u},children:r})}function qie(){var e=n.useContext(Bie);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Gie(e){return Array.isArray(e)?aie([],e):void 0!==e?[e]:[]}(Vie=$ie||($ie={})).Outside="outside",Vie.Disabled="disabled",Vie.Selected="selected",Vie.Hidden="hidden",Vie.Today="today",Vie.RangeStart="range_start",Vie.RangeEnd="range_end",Vie.RangeMiddle="range_middle";var Kie=$ie.Selected,Wie=$ie.Disabled,Yie=$ie.Hidden,Xie=$ie.Today,Zie=$ie.RangeEnd,Qie=$ie.RangeMiddle,Jie=$ie.RangeStart,eae=$ie.Outside;var tae=n.createContext(void 0);function nae(e){var n=mie(),r=function(e,t,n){var r,o=((r={})[Kie]=Gie(e.selected),r[Wie]=Gie(e.disabled),r[Yie]=Gie(e.hidden),r[Xie]=[e.today],r[Zie]=[],r[Qie]=[],r[Jie]=[],r[eae]=[],r);return e.fromDate&&o[Wie].push({before:e.fromDate}),e.toDate&&o[Wie].push({after:e.toDate}),sie(e)?o[Wie]=o[Wie].concat(t.modifiers[Wie]):lie(e)&&(o[Wie]=o[Wie].concat(n.modifiers[Wie]),o[Jie]=n.modifiers[Jie],o[Qie]=n.modifiers[Qie],o[Zie]=n.modifiers[Zie]),o}(n,Uie(),qie()),o=function(e){var t={};return Object.entries(e).forEach((function(e){t[e[0]]=Gie(e[1])})),t}(n.modifiers),i=iie(iie({},r),o);return t.jsx(tae.Provider,{value:i,children:e.children})}function rae(){var e=n.useContext(tae);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function oae(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(Xre(t))return Yre(e,t);var n,r,o,i,a;if(function(e){return Array.isArray(e)&&e.every(Xre)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return n=e,a=(r=t).to,(i=r.from)&&a?(Gre(a,i)<0&&(i=(o=[a,i])[0],a=o[1]),Gre(n,i)>=0&&Gre(a,n)>=0):a?Yre(a,n):!!i&&Yre(i,n);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var s=Gre(t.before,e)>0,l=Gre(t.after,e)<0;return Joe(t.before,t.after)?l&&s:s||l}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?Gre(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?Gre(t.before,e)>0:"function"==typeof t&&t(e)}))}function iae(e,t,n){var r=Object.keys(t).reduce((function(n,r){return oae(e,t[r])&&n.push(r),n}),[]),o={};return r.forEach((function(e){return o[e]=!0})),n&&!tie(e,n)&&(o.outside=!0),o}function aae(e,t){var n=t.moveBy,r=t.direction,o=t.context,i=t.modifiers,a=t.retry,s=void 0===a?{count:0,lastFocused:e}:a,l=o.weekStartsOn,c=o.fromDate,u=o.toDate,d=o.locale,p={day:Ire,week:Kre,month:Fre,year:Wre,startOfWeek:function(e){return o.ISOWeek?Bre(e):Vre(e,{locale:d,weekStartsOn:l})},endOfWeek:function(e){return o.ISOWeek?noe(e):toe(e,{locale:d,weekStartsOn:l})}}[n](e,"after"===r?1:-1);"before"===r&&c?p=function(e){var t,n;if(Lre(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==Mre(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Dre(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)})),n||new Date(NaN)}([c,p]):"after"===r&&u&&(p=function(e){var t,n;if(Lre(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==Mre(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Dre(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}([u,p]));var f=!0;if(i){var h=iae(p,i);f=!h.disabled&&!h.hidden}return f?p:s.count>365?s.lastFocused:aae(p,{moveBy:n,direction:r,context:o,modifiers:i,retry:iie(iie({},s),{count:s.count+1})})}var sae=n.createContext(void 0);function lae(e){var r=Eie(),o=rae(),i=n.useState(),a=i[0],s=i[1],l=n.useState(),c=l[0],u=l[1],d=function(e,t){for(var n,r,o=Jre(e[0]),i=Qre(e[e.length-1]),a=o;a<=i;){var s=iae(a,t);if(s.disabled||s.hidden)a=Ire(a,1);else{if(s.selected)return a;s.today&&!r&&(r=a),n||(n=a),a=Ire(a,1)}}return r||n}(r.displayMonths,o),p=(null!=a?a:c&&r.isDateDisplayed(c))?c:d,f=function(e){s(e)},h=mie(),m=function(e,t){if(a){var n=aae(a,{moveBy:e,direction:t,context:h,modifiers:o});Yre(a,n)||(r.goToDate(n,a),f(n))}};return t.jsx(sae.Provider,{value:{focusedDay:a,focusTarget:p,blur:function(){u(a),s(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}},children:e.children})}function cae(){var e=n.useContext(sae);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var uae=n.createContext(void 0);function dae(e){if(!cie(e.initialProps)){return t.jsx(uae.Provider,{value:{selected:void 0},children:e.children})}return t.jsx(pae,{initialProps:e.initialProps,children:e.children})}function pae(e){var n=e.initialProps;return t.jsx(uae.Provider,{value:{selected:n.selected,onDayClick:function(e,t,r){var o,i,a;null===(o=n.onDayClick)||void 0===o||o.call(n,e,t,r),!t.selected||n.required?null===(a=n.onSelect)||void 0===a||a.call(n,e,e,t,r):null===(i=n.onSelect)||void 0===i||i.call(n,void 0,e,t,r)}},children:e.children})}function fae(){var e=n.useContext(uae);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function hae(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var r=e.modifiersClassNames[t];if(r)n.push(r);else if(function(e){return Object.values($ie).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&n.push(o)}})),n}function mae(e,r,o){var i,a,s,l=mie(),c=cae(),u=function(e,t){return iae(e,rae(),t)}(e,r),d=function(e,t){var n=mie(),r=fae(),o=Uie(),i=qie(),a=cae(),s=a.focusDayAfter,l=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,d=a.blur,p=a.focus,f=a.focusMonthBefore,h=a.focusMonthAfter,m=a.focusYearBefore,g=a.focusYearAfter,v=a.focusStartOfWeek,y=a.focusEndOfWeek;return{onClick:function(a){var s,l,c,u;cie(n)?null===(s=r.onDayClick)||void 0===s||s.call(r,e,t,a):sie(n)?null===(l=o.onDayClick)||void 0===l||l.call(o,e,t,a):lie(n)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,a):null===(u=n.onDayClick)||void 0===u||u.call(n,e,t,a)},onFocus:function(r){var o;p(e),null===(o=n.onDayFocus)||void 0===o||o.call(n,e,t,r)},onBlur:function(r){var o;d(),null===(o=n.onDayBlur)||void 0===o||o.call(n,e,t,r)},onKeyDown:function(r){var o;switch(r.key){case"ArrowLeft":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?s():l();break;case"ArrowRight":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?l():s();break;case"ArrowDown":r.preventDefault(),r.stopPropagation(),c();break;case"ArrowUp":r.preventDefault(),r.stopPropagation(),u();break;case"PageUp":r.preventDefault(),r.stopPropagation(),r.shiftKey?m():f();break;case"PageDown":r.preventDefault(),r.stopPropagation(),r.shiftKey?g():h();break;case"Home":r.preventDefault(),r.stopPropagation(),v();break;case"End":r.preventDefault(),r.stopPropagation(),y()}null===(o=n.onDayKeyDown)||void 0===o||o.call(n,e,t,r)},onKeyUp:function(r){var o;null===(o=n.onDayKeyUp)||void 0===o||o.call(n,e,t,r)},onMouseEnter:function(r){var o;null===(o=n.onDayMouseEnter)||void 0===o||o.call(n,e,t,r)},onMouseLeave:function(r){var o;null===(o=n.onDayMouseLeave)||void 0===o||o.call(n,e,t,r)},onPointerEnter:function(r){var o;null===(o=n.onDayPointerEnter)||void 0===o||o.call(n,e,t,r)},onPointerLeave:function(r){var o;null===(o=n.onDayPointerLeave)||void 0===o||o.call(n,e,t,r)},onTouchCancel:function(r){var o;null===(o=n.onDayTouchCancel)||void 0===o||o.call(n,e,t,r)},onTouchEnd:function(r){var o;null===(o=n.onDayTouchEnd)||void 0===o||o.call(n,e,t,r)},onTouchMove:function(r){var o;null===(o=n.onDayTouchMove)||void 0===o||o.call(n,e,t,r)},onTouchStart:function(r){var o;null===(o=n.onDayTouchStart)||void 0===o||o.call(n,e,t,r)}}}(e,u),p=function(){var e=mie(),t=fae(),n=Uie(),r=qie();return cie(e)?t.selected:sie(e)?n.selected:lie(e)?r.selected:void 0}(),f=Boolean(l.onDayClick||"default"!==l.mode);n.useEffect((function(){var t;u.outside||c.focusedDay&&f&&Yre(c.focusedDay,e)&&(null===(t=o.current)||void 0===t||t.focus())}),[c.focusedDay,e,o,f,u.outside]);var h=hae(l,u).join(" "),m=function(e,t){var n=iie({},e.styles.day);return Object.keys(t).forEach((function(t){var r;n=iie(iie({},n),null===(r=e.modifiersStyles)||void 0===r?void 0:r[t])})),n}(l,u),g=Boolean(u.outside&&!l.showOutsideDays||u.hidden),v=null!==(s=null===(a=l.components)||void 0===a?void 0:a.DayContent)&&void 0!==s?s:Lie,y={style:m,className:h,children:t.jsx(v,{date:e,displayMonth:r,activeModifiers:u}),role:"gridcell"},b=c.focusTarget&&Yre(c.focusTarget,e)&&!u.outside,x=c.focusedDay&&Yre(c.focusedDay,e),w=iie(iie(iie({},y),((i={disabled:u.disabled,role:"gridcell"})["aria-selected"]=u.selected,i.tabIndex=x||b?0:-1,i)),d);return{isButton:f,isHidden:g,activeModifiers:u,selectedDays:p,buttonProps:w,divProps:y}}function gae(e){var r=n.useRef(null),o=mae(e.date,e.displayMonth,r);return o.isHidden?t.jsx("div",{role:"gridcell"}):o.isButton?t.jsx(Nie,iie({name:"day",ref:r},o.buttonProps)):t.jsx("div",iie({},o.divProps))}function vae(e){var n=e.number,r=e.dates,o=mie(),i=o.onWeekNumberClick,a=o.styles,s=o.classNames,l=o.locale,c=o.labels.labelWeekNumber,u=(0,o.formatters.formatWeekNumber)(Number(n),{locale:l});if(!i)return t.jsx("span",{className:s.weeknumber,style:a.weeknumber,children:u});var d=c(Number(n),{locale:l});return t.jsx(Nie,{name:"week-number","aria-label":d,className:s.weeknumber,style:a.weeknumber,onClick:function(e){i(n,r,e)},children:u})}function yae(e){var n,r,o,i=mie(),a=i.styles,s=i.classNames,l=i.components,c=null!==(n=null==l?void 0:l.Day)&&void 0!==n?n:gae,u=null!==(r=null==l?void 0:l.WeekNumber)&&void 0!==r?r:vae;return i.showWeekNumber&&(o=t.jsx("td",{className:s.cell,style:a.cell,children:t.jsx(u,{number:e.weekNumber,dates:e.dates})})),t.jsxs("tr",{className:s.row,style:a.row,children:[o,e.dates.map((function(n){return t.jsx("td",{className:s.cell,style:a.cell,role:"presentation",children:t.jsx(c,{displayMonth:e.displayMonth,date:n})},Xoe(n))}))]})}function bae(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?noe(t):toe(t,n),o=(null==n?void 0:n.ISOWeek)?Bre(e):Vre(e,n),i=Gre(r,o),a=[],s=0;s<=i;s++)a.push(Ire(o,s));var l=a.reduce((function(e,t){var r=(null==n?void 0:n.ISOWeek)?function(e){Lre(1,arguments);var t=Dre(e),n=Bre(t).getTime()-zre(t).getTime();return Math.round(n/6048e5)+1}(t):function(e,t){Lre(1,arguments);var n=Dre(e),r=Vre(n,t).getTime()-Zoe(n,t).getTime();return Math.round(r/6048e5)+1}(t,n),o=e.find((function(e){return e.weekNumber===r}));return o?(o.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)}),[]);return l}function xae(e){var n,r,o,i=mie(),a=i.locale,s=i.classNames,l=i.styles,c=i.hideHead,u=i.components,d=i.weekStartsOn,p=i.firstWeekContainsDate,f=i.ISOWeek,h=function(e,t){var n=bae(Jre(e),Qre(e),t);if(null==t?void 0:t.useFixedWeeks){var r=Qoe(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],a=Kre(i,6-r),s=bae(Kre(i,1),a,t);n.push.apply(n,s)}}return n}(e.displayMonth,{useFixedWeeks:Boolean(i.fixedWeeks),ISOWeek:f,locale:a,weekStartsOn:d,firstWeekContainsDate:p}),m=null!==(n=null==u?void 0:u.Head)&&void 0!==n?n:jie,g=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:yae,v=null!==(o=null==u?void 0:u.Footer)&&void 0!==o?o:kie;return t.jsxs("table",{id:e.id,className:s.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&t.jsx(m,{}),t.jsx("tbody",{className:s.tbody,style:l.tbody,children:h.map((function(n){return t.jsx(g,{displayMonth:e.displayMonth,dates:n.dates,weekNumber:n.weekNumber},n.weekNumber)}))}),t.jsx(v,{displayMonth:e.displayMonth})]})}var wae="undefined"!=typeof window&&window.document&&window.document.createElement?n.useLayoutEffect:n.useEffect,_ae=!1,Sae=0;function Eae(){return"react-day-picker-".concat(++Sae)}function Tae(e){var r,o,i=mie(),a=i.dir,s=i.classNames,l=i.styles,c=i.components,u=Eie().displayMonths,d=function(e){var t,r=null!=e?e:_ae?Eae():null,o=n.useState(r),i=o[0],a=o[1];return wae((function(){null===i&&a(Eae())}),[]),n.useEffect((function(){!1===_ae&&(_ae=!0)}),[]),null!==(t=null!=e?e:i)&&void 0!==t?t:void 0}(i.id?"".concat(i.id,"-").concat(e.displayIndex):void 0),p=i.id?"".concat(i.id,"-grid-").concat(e.displayIndex):void 0,f=[s.month],h=l.month,m=0===e.displayIndex,g=e.displayIndex===u.length-1,v=!m&&!g;"rtl"===a&&(g=(r=[m,g])[0],m=r[1]),m&&(f.push(s.caption_start),h=iie(iie({},h),l.caption_start)),g&&(f.push(s.caption_end),h=iie(iie({},h),l.caption_end)),v&&(f.push(s.caption_between),h=iie(iie({},h),l.caption_between));var y=null!==(o=null==c?void 0:c.Caption)&&void 0!==o?o:Pie;return t.jsxs("div",{className:f.join(" "),style:h,children:[t.jsx(y,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),t.jsx(xae,{id:p,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function Cae(e){var n=mie();return t.jsx("div",{className:n.classNames.months,style:n.styles.months,children:e.children})}function Aae(e){var r,o,i=e.initialProps,a=mie(),s=cae(),l=Eie(),c=n.useState(!1),u=c[0],d=c[1];n.useEffect((function(){a.initialFocus&&s.focusTarget&&(u||(s.focus(s.focusTarget),d(!0)))}),[a.initialFocus,u,s.focus,s.focusTarget,s]);var p=[a.classNames.root,a.className];a.numberOfMonths>1&&p.push(a.classNames.multiple_months),a.showWeekNumber&&p.push(a.classNames.with_weeknumber);var f=iie(iie({},a.styles.root),a.style),h=Object.keys(i).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var n;return iie(iie({},e),((n={})[t]=i[t],n))}),{}),m=null!==(o=null===(r=i.components)||void 0===r?void 0:r.Months)&&void 0!==o?o:Cae;return t.jsx("div",iie({className:p.join(" "),style:f,dir:a.dir,id:a.id,nonce:i.nonce,title:i.title,lang:i.lang},h,{children:t.jsx(m,{children:l.displayMonths.map((function(e,n){return t.jsx(Tae,{displayIndex:n,displayMonth:e},n)}))})}))}function Nae(e){var n=e.children,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return t.jsx(hie,{initialProps:r,children:t.jsx(Sie,{children:t.jsx(dae,{initialProps:r,children:t.jsx(Iie,{initialProps:r,children:t.jsx(zie,{initialProps:r,children:t.jsx(nae,{children:t.jsx(lae,{children:n})})})})})})})}function Rae(e){return t.jsx(Nae,iie({},e,{children:t.jsx(Aae,{initialProps:e})}))}function Oae({className:e,classNames:n,showOutsideDays:r=!0,...o}){return t.jsx(Rae,{showOutsideDays:r,className:Zd("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Zd(gZ({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:Zd("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===o.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:Zd(gZ({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...n},components:{IconLeft:()=>t.jsx(hu,{className:"h-4 w-4"}),IconRight:()=>t.jsx(mu,{className:"h-4 w-4"})},...o})}Oae.displayName="Calendar";var Pae=.999,kae=/[\\\/_+.#"@\[\(\{&]/,Mae=/[\\\/_+.#"@\[\(\{&]/g,jae=/[\s-]/,Lae=/[\s-]/g;function Dae(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?1:.99;var s=`${o},${i}`;if(void 0!==a[s])return a[s];for(var l,c,u,d,p=r.charAt(i),f=n.indexOf(p,o),h=0;f>=0;)(l=Dae(e,t,n,r,f+1,i+1,a))>h&&(f===o?l*=1:kae.test(e.charAt(f-1))?(l*=.8,(u=e.slice(o,f-1).match(Mae))&&o>0&&(l*=Math.pow(Pae,u.length))):jae.test(e.charAt(f-1))?(l*=.9,(d=e.slice(o,f-1).match(Lae))&&o>0&&(l*=Math.pow(Pae,d.length))):(l*=.17,o>0&&(l*=Math.pow(Pae,f-o))),e.charAt(f)!==t.charAt(i)&&(l*=.9999)),(l<.1&&n.charAt(f-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(f-1)!==r.charAt(i))&&(.1*(c=Dae(e,t,n,r,f+1,i+2,a))>l&&(l=.1*c)),l>h&&(h=l),f=n.indexOf(p,f+1);return a[s]=h,h}function Iae(e){return e.toLowerCase().replace(Lae," ")}function Fae(e,t,n){return Dae(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,Iae(e),Iae(t),0,0,{})}var Uae,$ae={exports:{}},Vae={};var Bae,zae={};
85
+ */(n.expires)||!Number.isFinite(n.expires.valueOf()))throw new TypeError(`option expires is invalid: ${n.expires}`);i+="; Expires="+n.expires.toUTCString()}n.httpOnly&&(i+="; HttpOnly");n.secure&&(i+="; Secure");n.partitioned&&(i+="; Partitioned");if(n.priority){switch("string"==typeof n.priority?n.priority.toLowerCase():void 0){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${n.priority}`)}}if(n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"none":i+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${n.sameSite}`)}}return i};const Y3=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,X3=/^[\u0021-\u003A\u003C-\u007E]*$/,Z3=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Q3=/^[\u0020-\u003A\u003D-\u007E]*$/,J3=Object.prototype.toString,e5=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function t5(e,t,n){do{const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++t<n);return n}function n5(e,t,n){for(;t>n;){const n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return n}function r5(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(JSe){return e}}function o5(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:o=!1}=e;t=n.map(((e,t)=>u(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let i=l(null==r?t.length-1:r),a="POP",s=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function c(){return t[i]}function u(e,n=null,r){let o=function(e,t,n=null,r){let o={pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?c5(t):t,state:n,key:t&&t.key||r||s5()};return o}(t?c().pathname:"/",e,n,r);return a5("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function d(e){return"string"==typeof e?e:l5(e)}return{get index(){return i},get action(){return a},get location(){return c()},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?c5(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){a="PUSH";let r=u(e,n);i+=1,t.splice(i,t.length,r),o&&s&&s({action:a,location:r,delta:1})},replace(e,n){a="REPLACE";let r=u(e,n);t[i]=r,o&&s&&s({action:a,location:r,delta:0})},go(e){a="POP";let n=l(i+e);i=n,s&&s({action:a,location:t[n],delta:e})},listen:e=>(s=e,()=>{s=null})}}function i5(e,t){if(!1===e||null==e)throw new Error(t)}function a5(e,t){if(!e)try{throw new Error(t)}catch(JSe){}}function s5(){return Math.random().toString(36).substring(2,10)}function l5({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function c5(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function u5(e,t,n="/"){return function(e,t,n,r){let o="string"==typeof t?c5(t):t,i=E5(o.pathname||"/",n);if(null==i)return null;let a=d5(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let s=null;for(let l=0;null==s&&l<a.length;++l){let e=S5(i);s=w5(a[l],e,r)}return s}(e,t,n,!1)}function d5(e,t=[],n=[],r=""){let o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(i5(a.relativePath.startsWith(r),`Absolute route path "${a.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(r.length));let s=N5([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(i5(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),d5(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:x5(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of p5(e.path))o(e,t,n);else o(e,t)})),t}function p5(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=p5(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}var f5=/^:[\w-]+$/,h5=3,m5=2,g5=1,v5=10,y5=-2,b5=e=>"*"===e;function x5(e,t){let n=e.split("/"),r=n.length;return n.some(b5)&&(r+=y5),t&&(r+=m5),n.filter((e=>!b5(e))).reduce(((e,t)=>e+(f5.test(t)?h5:""===t?g5:v5)),r)}function w5(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u=_5({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=_5({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:N5([i,u.pathname]),pathnameBase:R5(N5([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=N5([i,u.pathnameBase]))}return a}function _5(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){a5("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){a=i.slice(0,i.length-(s[r]||"").length).replace(/(.)\/+$/,"$1")}const o=s[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function S5(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return a5(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function E5(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function T5(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function C5(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function A5(e,t,n,r=!1){let o;"string"==typeof e?o=c5(e):(o={...e},i5(!o.pathname||!o.pathname.includes("?"),T5("?","pathname","search",o)),i5(!o.pathname||!o.pathname.includes("#"),T5("#","pathname","hash",o)),i5(!o.search||!o.search.includes("#"),T5("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:n,search:r="",hash:o=""}="string"==typeof e?c5(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:O5(r),hash:P5(o)}}(o,i),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var N5=e=>e.join("/").replace(/\/\/+/g,"/"),R5=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),O5=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",P5=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var k5=["POST","PUT","PATCH","DELETE"];new Set(k5);var M5=["GET",...k5];new Set(M5);var j5=i.createContext(null);j5.displayName="DataRouter";var L5=i.createContext(null);L5.displayName="DataRouterState";var D5=i.createContext({isTransitioning:!1});D5.displayName="ViewTransition",i.createContext(new Map).displayName="Fetchers",i.createContext(null).displayName="Await";var I5=i.createContext(null);I5.displayName="Navigation";var F5=i.createContext(null);F5.displayName="Location";var U5=i.createContext({outlet:null,matches:[],isDataRoute:!1});U5.displayName="Route";var $5=i.createContext(null);function V5(){return null!=i.useContext(F5)}function B5(){return i5(V5(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(F5).location}$5.displayName="RouteError";var z5="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function H5(e){i.useContext(I5).static||i.useLayoutEffect(e)}function q5(){let{isDataRoute:e}=i.useContext(U5);return e?function(){let{router:e}=function(e){let t=i.useContext(j5);return i5(t,Q5(e)),t}("useNavigate"),t=J5("useNavigate"),n=i.useRef(!1);return H5((()=>{n.current=!0})),i.useCallback((async(r,o={})=>{a5(n.current,z5),n.current&&("number"==typeof r?e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))}),[e,t])}():function(){i5(V5(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(j5),{basename:t,navigator:n}=i.useContext(I5),{matches:r}=i.useContext(U5),{pathname:o}=B5(),a=JSON.stringify(C5(r)),s=i.useRef(!1);return H5((()=>{s.current=!0})),i.useCallback(((r,i={})=>{if(a5(s.current,z5),!s.current)return;if("number"==typeof r)return void n.go(r);let l=A5(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:N5([t,l.pathname])),(i.replace?n.replace:n.push)(l,i.state,i)}),[t,n,a,o,e])}()}function G5(e,{relative:t}={}){let{matches:n}=i.useContext(U5),{pathname:r}=B5(),o=JSON.stringify(C5(n));return i.useMemo((()=>A5(e,JSON.parse(o),r,"path"===t)),[e,o,r,t])}function K5(e,t,n,r){i5(V5(),"useRoutes() may be used only in the context of a <Router> component.");let o,{navigator:a,static:s}=i.useContext(I5),{matches:l}=i.useContext(U5),c=l[l.length-1],u=c?c.params:{},d=c?c.pathname:"/",p=c?c.pathnameBase:"/",f=c&&c.route;{let e=f&&f.path||"";t4(d,!f||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}o=B5();let h=o.pathname||"/",m=h;if("/"!==p){let e=p.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=!s&&n&&n.matches&&n.matches.length>0?n.matches:u5(e,{pathname:m});a5(f||null!=g,`No routes matched location "${o.pathname}${o.search}${o.hash}" `),a5(null==g||void 0!==g[g.length-1].route.element||void 0!==g[g.length-1].route.Component||void 0!==g[g.length-1].route.lazy,`Matched leaf route at location "${o.pathname}${o.search}${o.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=function(e,t=[],n=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let r=e,o=n?.errors;if(null!=o){let e=r.findIndex((e=>e.route.id&&void 0!==o?.[e.route.id]));i5(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),r=r.slice(0,Math.min(r.length,e+1))}let a=!1,s=-1;if(n)for(let i=0;i<r.length;i++){let e=r[i];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(s=i),e.route.id){let{loaderData:t,errors:o}=n,i=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!o||void 0===o[e.route.id]);if(e.route.lazy||i){a=!0,r=s>=0?r.slice(0,s+1):[r[0]];break}}}return r.reduceRight(((e,l,c)=>{let u,d=!1,p=null,f=null;n&&(u=o&&l.route.id?o[l.route.id]:void 0,p=l.route.errorElement||Y5,a&&(s<0&&0===c?(t4("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):s===c&&(d=!0,f=l.route.hydrateFallbackElement||null)));let h=t.concat(r.slice(0,c+1)),m=()=>{let t;return t=u?p:d?f:l.route.Component?i.createElement(l.route.Component,null):l.route.element?l.route.element:e,i.createElement(Z5,{match:l,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(l.route.ErrorBoundary||l.route.errorElement||0===c)?i.createElement(X5,{location:n.location,revalidation:n.revalidation,component:p,error:u,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()}),null)}(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:N5([p,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?p:N5([p,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,n,r);return v}function W5(){let e=function(){let e=i.useContext($5),t=function(e){let t=i.useContext(L5);return i5(t,Q5(e)),t}("useRouteError"),n=J5("useRouteError");if(void 0!==e)return e;return t.errors?.[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return s=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:a},"ErrorBoundary")," or"," ",i.createElement("code",{style:a},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),n?i.createElement("pre",{style:o},n):null,s)}i.createContext(null);var Y5=i.createElement(W5,null),X5=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){}render(){return void 0!==this.state.error?i.createElement(U5.Provider,{value:this.props.routeContext},i.createElement($5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Z5({routeContext:e,match:t,children:n}){let r=i.useContext(j5);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(U5.Provider,{value:e},n)}function Q5(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function J5(e){let t=function(e){let t=i.useContext(U5);return i5(t,Q5(e)),t}(e),n=t.matches[t.matches.length-1];return i5(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var e4={};function t4(e,t,n){t||e4[e]||(e4[e]=!0,a5(!1,n))}function n4({basename:e,children:t,initialEntries:n,initialIndex:r}){let o=i.useRef();null==o.current&&(o.current=o5({initialEntries:n,initialIndex:r,v5Compat:!0}));let a=o.current,[s,l]=i.useState({action:a.action,location:a.location}),c=i.useCallback((e=>{i.startTransition((()=>l(e)))}),[l]);return i.useLayoutEffect((()=>a.listen(c)),[a,c]),i.createElement(r4,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:a})}function r4({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:a=!1}){i5(!V5(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=i.useMemo((()=>({basename:s,navigator:o,static:a,future:{}})),[s,o,a]);"string"==typeof n&&(n=c5(n));let{pathname:c="/",search:u="",hash:d="",state:p=null,key:f="default"}=n,h=i.useMemo((()=>{let e=E5(c,s);return null==e?null:{location:{pathname:e,search:u,hash:d,state:p,key:f},navigationType:r}}),[s,c,u,d,p,f,r]);return a5(null!=h,`<Router basename="${s}"> is not able to match the URL "${c}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:i.createElement(I5.Provider,{value:l},i.createElement(F5.Provider,{children:t,value:h}))}i.memo((function({routes:e,future:t,state:n}){return K5(e,0,n,t)}));var o4="get",i4="application/x-www-form-urlencoded";function a4(e){return null!=e&&"string"==typeof e.tagName}function s4(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}var l4=null;var c4=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function u4(e){return null==e||c4.has(e)?e:(a5(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${i4}"`),null)}function d4(e,t){let n,r,o,i,a;if(function(e){return a4(e)&&"form"===e.tagName.toLowerCase()}(e)){let a=e.getAttribute("action");r=a?E5(a,t):null,n=e.getAttribute("method")||o4,o=u4(e.getAttribute("enctype"))||i4,i=new FormData(e)}else if(function(e){return a4(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return a4(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?E5(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||o4,o=u4(e.getAttribute("formenctype"))||u4(a.getAttribute("enctype"))||i4,i=new FormData(a,e),!function(){if(null===l4)try{new FormData(document.createElement("form"),0),l4=!1}catch(JSe){l4=!0}return l4}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(a4(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=o4,r=null,o=i4,a=e}return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}function p4(e,t){if(!1===e||null==e)throw new Error(t)}function f4(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function h4(e,t,n){return function(e,t){let n=new Set;return new Set(t),e.reduce(((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return window.__reactRouterContext&&window,window.location.reload(),new Promise((()=>{}))}}(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(f4).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function m4(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===i?t.filter(((t,i)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function g4(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}function v4(){let e=i.useContext(j5);return p4(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}var y4=i.createContext(void 0);function b4(){let e=i.useContext(y4);return p4(e,"You must render this element inside a <HydratedRouter> element"),e}function x4(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function w4({page:e,...t}){let{router:n}=v4(),r=i.useMemo((()=>u5(n.routes,e,n.basename)),[n.routes,e,n.basename]);return r?i.createElement(_4,{page:e,matches:r,...t}):null}function _4({page:e,matches:t,...n}){let r=B5(),{manifest:o,routeModules:a}=b4(),{basename:s}=v4(),{loaderData:l,matches:c}=function(){let e=i.useContext(L5);return p4(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),u=i.useMemo((()=>m4(e,t,c,o,r,"data")),[e,t,c,o,r]),d=i.useMemo((()=>m4(e,t,c,o,r,"assets")),[e,t,c,o,r]),p=i.useMemo((()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,i=!1;if(t.forEach((e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!u.some((t=>t.route.id===e.route.id))&&e.route.id in l&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?i=!0:n.add(e.route.id))})),0===n.size)return[];let c=function(e,t){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n.pathname="/"===n.pathname?"_root.data":t&&"/"===E5(n.pathname,t)?`${t.replace(/\/$/,"")}/_root.data`:`${n.pathname.replace(/\/$/,"")}.data`,n}(e,s);return i&&n.size>0&&c.searchParams.set("_routes",t.filter((e=>n.has(e.route.id))).map((e=>e.route.id)).join(",")),[c.pathname+c.search]}),[s,l,r,o,u,t,e,a]),f=i.useMemo((()=>g4(d,o)),[d,o]),h=function(e){let{manifest:t,routeModules:n}=b4(),[r,o]=i.useState([]);return i.useEffect((()=>{let r=!1;return h4(e,t,n).then((e=>{r||o(e)})),()=>{r=!0}}),[e,t,n]),r}(d);return i.createElement(i.Fragment,null,p.map((e=>i.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),f.map((e=>i.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),h.map((({key:e,link:t})=>i.createElement("link",{key:e,...t}))))}function S4(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}y4.displayName="FrameworkContext";var E4="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{E4&&(window.__reactRouterVersion="7.5.2")}catch(JSe){}var T4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,C4=i.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d,...p},f){let h,{basename:m}=i.useContext(I5),g="string"==typeof c&&T4.test(c),v=!1;if("string"==typeof c&&g&&(h=c,E4))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=E5(t.pathname,m);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:v=!0}catch(JSe){a5(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=function(e,{relative:t}={}){i5(V5(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=i.useContext(I5),{hash:o,pathname:a,search:s}=G5(e,{relative:t}),l=a;return"/"!==n&&(l="/"===a?n:N5([n,a])),r.createHref({pathname:l,search:s,hash:o})}(c,{relative:r}),[b,x,w]=function(e,t){let n=i.useContext(y4),[r,o]=i.useState(!1),[a,s]=i.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=t,f=i.useRef(null);i.useEffect((()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),i.useEffect((()=>{if(r){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let h=()=>{o(!0)},m=()=>{o(!1),s(!1)};return n?"intent"!==e?[a,f,{}]:[a,f,{onFocus:x4(l,h),onBlur:x4(c,m),onMouseEnter:x4(u,h),onMouseLeave:x4(d,m),onTouchStart:x4(p,h)}]:[!1,f,{}]}(n,p),_=function(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:a,viewTransition:s}={}){let l=q5(),c=B5(),u=G5(e,{relative:a});return i.useCallback((i=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(i,t)){i.preventDefault();let t=void 0!==n?n:l5(c)===l5(u);l(e,{replace:t,state:r,preventScrollReset:o,relative:a,viewTransition:s})}}),[c,l,u,n,r,t,e,o,a,s])}(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:r,viewTransition:d});let S=i.createElement("a",{...p,...w,href:h||y,onClick:v||o?e:function(t){e&&e(t),t.defaultPrevented||_(t)},ref:S4(f,x),target:l,"data-discover":g||"render"!==t?void 0:"true"});return b&&!g?i.createElement(i.Fragment,null,S,i.createElement(w4,{page:y})):S}));function A4(e){let t=i.useContext(j5);return i5(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}function N4(e){a5("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=i.useRef(s4(e)),n=i.useRef(!1),r=B5(),o=i.useMemo((()=>function(e,t){let n=s4(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),a=q5(),s=i.useCallback(((e,t)=>{const r=s4("function"==typeof e?e(o):e);n.current=!0,a("?"+r,t)}),[a,o]);return[o,s]}C4.displayName="Link",i.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:a,viewTransition:s,children:l,...c},u){let d=G5(a,{relative:c.relative}),p=B5(),f=i.useContext(L5),{navigator:h,basename:m}=i.useContext(I5),g=null!=f&&function(e,t={}){let n=i.useContext(D5);i5(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=A4("useViewTransitionState"),o=G5(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=E5(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=E5(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=_5(o.pathname,s)||null!=_5(o.pathname,a)}(d)&&!0===s,v=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,y=p.pathname,b=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(y=y.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&m&&(b=E5(b,m)||b);const x="/"!==v&&v.endsWith("/")?v.length-1:v.length;let w,_=y===v||!r&&y.startsWith(v)&&"/"===y.charAt(x),S=null!=b&&(b===v||!r&&b.startsWith(v)&&"/"===b.charAt(v.length)),E={isActive:_,isPending:S,isTransitioning:g},T=_?e:void 0;w="function"==typeof n?n(E):[n,_?"active":null,S?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof o?o(E):o;return i.createElement(C4,{...c,"aria-current":T,className:w,ref:u,style:C,to:a,viewTransition:s},"function"==typeof l?l(E):l)})).displayName="NavLink",i.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:a,method:s=o4,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:p,...f},h)=>{let m=function(){let{router:e}=A4("useSubmit"),{basename:t}=i.useContext(I5),n=J5("useRouteId");return i.useCallback((async(r,o={})=>{let{action:i,method:a,encType:s,formData:l,body:c}=d4(r,t);if(!1===o.navigate){let t=o.fetcherKey||O4();await e.fetch(t,n,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[e,t,n])}(),g=function(e,{relative:t}={}){let{basename:n}=i.useContext(I5),r=i.useContext(U5);i5(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...G5(e||".",{relative:t})},s=B5();if(null==e){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();a.search=n?`?${n}`:""}}e&&"."!==e||!o.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:N5([n,a.pathname]));return l5(a)}(l,{relative:u}),v="get"===s.toLowerCase()?"get":"post",y="string"==typeof l&&T4.test(l);return i.createElement("form",{ref:h,method:v,action:g,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,i=r?.getAttribute("formmethod")||s;m(r||e.currentTarget,{fetcherKey:t,method:i,navigate:n,replace:o,state:a,relative:u,preventScrollReset:d,viewTransition:p})},...f,"data-discover":y||"render"!==e?void 0:"true"})})).displayName="Form";var R4=0,O4=()=>`__${String(++R4)}__`;new TextEncoder;var P4,k4="dismissableLayer.update",M4="dismissableLayer.pointerDownOutside",j4="dismissableLayer.focusOutside",L4=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),D4=i.forwardRef(((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=i.useContext(L4),[p,f]=i.useState(null),h=p?.ownerDocument??globalThis?.document,[,m]=i.useState({}),g=XU(n,(e=>f(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=p?v.indexOf(p):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,_=x>=b,S=function(e,t=globalThis?.document){const n=VQ(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){F4(M4,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));_&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())}),h),E=function(e,t=globalThis?.document){const n=VQ(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){F4(j4,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),h);return JQ((e=>{x===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),i.useEffect((()=>{if(p)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(P4=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),I4(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=P4)}}),[p,h,r,d]),i.useEffect((()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),I4())}),[p,d]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(k4,e),()=>document.removeEventListener(k4,e)}),[]),t.jsx(WQ.div,{...u,ref:g,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:FQ(e.onFocusCapture,E.onFocusCapture),onBlurCapture:FQ(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:FQ(e.onPointerDownCapture,S.onPointerDownCapture)})}));D4.displayName="DismissableLayer";function I4(){const e=new CustomEvent(k4);document.dispatchEvent(e)}function F4(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?YQ(o,i):o.dispatchEvent(i)}i.forwardRef(((e,n)=>{const r=i.useContext(L4),o=i.useRef(null),a=XU(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.jsx(WQ.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var U4=i.forwardRef(((e,n)=>t.jsx(WQ.span,{...e,ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));U4.displayName="VisuallyHidden";var $4=U4,[V4,B4]=UQ("Tooltip",[o1]),z4=o1(),H4="TooltipProvider",q4=700,G4="tooltip.open",[K4,W4]=V4(H4),Y4=e=>{const{__scopeTooltip:n,delayDuration:r=q4,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:s}=e,[l,c]=i.useState(!0),u=i.useRef(!1),d=i.useRef(0);return i.useEffect((()=>{const e=d.current;return()=>window.clearTimeout(e)}),[]),t.jsx(K4,{scope:n,isOpenDelayed:l,delayDuration:r,onOpen:i.useCallback((()=>{window.clearTimeout(d.current),c(!1)}),[]),onClose:i.useCallback((()=>{window.clearTimeout(d.current),d.current=window.setTimeout((()=>c(!0)),o)}),[o]),isPointerInTransitRef:u,onPointerInTransitChange:i.useCallback((e=>{u.current=e}),[]),disableHoverableContent:a,children:s})};Y4.displayName=H4;var X4="Tooltip",[Z4,Q4]=V4(X4),J4=e=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:a=!1,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=e,u=W4(X4,e.__scopeTooltip),d=z4(n),[p,f]=i.useState(null),h=EJ(),m=i.useRef(0),g=l??u.disableHoverableContent,v=c??u.delayDuration,y=i.useRef(!1),[b=!1,x]=BQ({prop:o,defaultProp:a,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(G4))):u.onClose(),s?.(e)}}),w=i.useMemo((()=>b?y.current?"delayed-open":"instant-open":"closed"),[b]),_=i.useCallback((()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,x(!0)}),[x]),S=i.useCallback((()=>{window.clearTimeout(m.current),m.current=0,x(!1)}),[x]),E=i.useCallback((()=>{window.clearTimeout(m.current),m.current=window.setTimeout((()=>{y.current=!0,x(!0),m.current=0}),v)}),[v,x]);return i.useEffect((()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)}),[]),t.jsx(x1,{...d,children:t.jsx(Z4,{scope:n,contentId:h,open:b,stateAttribute:w,trigger:p,onTriggerChange:f,onTriggerEnter:i.useCallback((()=>{u.isOpenDelayed?E():_()}),[u.isOpenDelayed,E,_]),onTriggerLeave:i.useCallback((()=>{g?S():(window.clearTimeout(m.current),m.current=0)}),[S,g]),onOpen:_,onClose:S,disableHoverableContent:g,children:r})})};J4.displayName=X4;var e6="TooltipTrigger",t6=i.forwardRef(((e,n)=>{const{__scopeTooltip:r,...o}=e,a=Q4(e6,r),s=W4(e6,r),l=z4(r),c=XU(n,i.useRef(null),a.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),p=i.useCallback((()=>u.current=!1),[]);return i.useEffect((()=>()=>document.removeEventListener("pointerup",p)),[p]),t.jsx(w1,{asChild:!0,...l,children:t.jsx(WQ.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:c,onPointerMove:FQ(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(d.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))})),onPointerLeave:FQ(e.onPointerLeave,(()=>{a.onTriggerLeave(),d.current=!1})),onPointerDown:FQ(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})})),onFocus:FQ(e.onFocus,(()=>{u.current||a.onOpen()})),onBlur:FQ(e.onBlur,a.onClose),onClick:FQ(e.onClick,a.onClose)})})}));t6.displayName=e6;var n6="TooltipPortal",[r6,o6]=V4(n6,{forceMount:void 0}),i6=e=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=e,a=Q4(n6,n);return t.jsx(r6,{scope:n,forceMount:r,children:t.jsx(T1,{present:r||a.open,children:t.jsx(E1,{asChild:!0,container:i,children:o})})})};i6.displayName=n6;var a6="TooltipContent",s6=i.forwardRef(((e,n)=>{const r=o6(a6,e.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...a}=e,s=Q4(a6,e.__scopeTooltip);return t.jsx(T1,{present:o||s.open,children:t.jsx(s.disableHoverableContent?d6:l6,{side:i,...a,ref:n})})})),l6=i.forwardRef(((e,n)=>{const r=Q4(a6,e.__scopeTooltip),o=W4(a6,e.__scopeTooltip),a=i.useRef(null),s=XU(n,a),[l,c]=i.useState(null),{trigger:u,onClose:d}=r,p=a.current,{onPointerInTransitChange:f}=o,h=i.useCallback((()=>{c(null),f(!1)}),[f]),m=i.useCallback(((e,t)=>{const n={x:e.clientX,y:e.clientY},r=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(n,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(n,e.currentTarget.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...r,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);c(o),f(!0)}),[f]);return i.useEffect((()=>()=>h()),[h]),i.useEffect((()=>{if(u&&p){const e=e=>m(e,p),t=e=>m(e,u);return u.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}}),[u,p,m,h]),i.useEffect((()=>{if(l){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||p?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i].x,s=t[i].y,l=t[a].y;s>r!=l>r&&n<(t[a].x-e)*(r-s)/(l-s)+e&&(o=!o)}return o}(n,l);r?h():o&&(h(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,p,l,d,h]),t.jsx(d6,{...e,ref:s})})),[c6,u6]=V4(X4,{isInside:!1}),d6=i.forwardRef(((e,n)=>{const{__scopeTooltip:r,children:o,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=e,u=Q4(a6,r),d=z4(r),{onClose:p}=u;return i.useEffect((()=>(document.addEventListener(G4,p),()=>document.removeEventListener(G4,p))),[p]),i.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,p]),t.jsx(D4,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:t.jsxs(_1,{"data-state":u.stateAttribute,...d,...c,ref:n,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[t.jsx(qQ,{children:o}),t.jsx(c6,{scope:r,isInside:!0,children:t.jsx($4,{id:u.contentId,role:"tooltip",children:a||o})})]})})}));s6.displayName=a6;var p6="TooltipArrow";i.forwardRef(((e,n)=>{const{__scopeTooltip:r,...o}=e,i=z4(r);return u6(p6,r).isInside?null:t.jsx(S1,{...i,...o,ref:n})})).displayName=p6;var f6=i6,h6=s6;const m6=Y4,g6=J4,v6=t6,y6=i.forwardRef((({className:e,sideOffset:n=4,...r},o)=>t.jsx(f6,{children:t.jsx(h6,{ref:o,sideOffset:n,className:Zd("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})})));y6.displayName=h6.displayName;const b6=({rowOriginal:e,constructNavigationUrl:n,cellText:r,cellIcon:o=null,tooltipIcon:i=null,tooltipText:a=null})=>{const s=q5();return a?t.jsx(m6,{children:t.jsx("div",{className:"text-sm h-8 flex items-center justify-end",children:t.jsxs(g6,{children:[t.jsx(v6,{asChild:!0,children:t.jsxs(vZ,{variant:"outline",onClick:()=>s(n(e.id)),children:[o,r,i]})}),t.jsx(y6,{className:"max-w-[300px] text-sm bg-white border border-gray-200 rounded-lg p-4",children:t.jsx("p",{className:"text-muted-foreground",children:a})})]})})}):t.jsx("div",{className:"text-sm h-8 flex items-center justify-end",children:t.jsxs(vZ,{variant:"outline",onClick:()=>s(n(e.id)),children:[o,r,i]})})};var x6,w6="dismissableLayer.update",_6="dismissableLayer.pointerDownOutside",S6="dismissableLayer.focusOutside",E6=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),T6=i.forwardRef(((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=i.useContext(E6),[p,f]=i.useState(null),h=p?.ownerDocument??globalThis?.document,[,m]=i.useState({}),g=XU(n,(e=>f(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=p?v.indexOf(p):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,_=x>=b,S=function(e,t=globalThis?.document){const n=VQ(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){A6(_6,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));_&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())}),h),E=function(e,t=globalThis?.document){const n=VQ(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){A6(S6,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),h);return JQ((e=>{x===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),i.useEffect((()=>{if(p)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(x6=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),C6(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=x6)}}),[p,h,r,d]),i.useEffect((()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),C6())}),[p,d]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(w6,e),()=>document.removeEventListener(w6,e)}),[]),t.jsx(WQ.div,{...u,ref:g,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:FQ(e.onFocusCapture,E.onFocusCapture),onBlurCapture:FQ(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:FQ(e.onPointerDownCapture,S.onPointerDownCapture)})}));T6.displayName="DismissableLayer";function C6(){const e=new CustomEvent(w6);document.dispatchEvent(e)}function A6(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?YQ(o,i):o.dispatchEvent(i)}i.forwardRef(((e,n)=>{const r=i.useContext(E6),o=i.useRef(null),a=XU(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.jsx(WQ.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var N6="Popover",[R6,O6]=UQ(N6,[o1]),P6=o1(),[k6,M6]=R6(N6),j6=e=>{const{__scopePopover:n,children:r,open:o,defaultOpen:a,onOpenChange:s,modal:l=!1}=e,c=P6(n),u=i.useRef(null),[d,p]=i.useState(!1),[f=!1,h]=BQ({prop:o,defaultProp:a,onChange:s});return t.jsx(x1,{...c,children:t.jsx(k6,{scope:n,contentId:EJ(),triggerRef:u,open:f,onOpenChange:h,onOpenToggle:i.useCallback((()=>h((e=>!e))),[h]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback((()=>p(!0)),[]),onCustomAnchorRemove:i.useCallback((()=>p(!1)),[]),modal:l,children:r})})};j6.displayName=N6;var L6="PopoverAnchor";i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,a=M6(L6,r),s=P6(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=a;return i.useEffect((()=>(l(),()=>c())),[l,c]),t.jsx(w1,{...s,...o,ref:n})})).displayName=L6;var D6="PopoverTrigger",I6=i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,i=M6(D6,r),a=P6(r),s=XU(n,i.triggerRef),l=t.jsx(WQ.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":W6(i.open),...o,ref:s,onClick:FQ(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:t.jsx(w1,{asChild:!0,...a,children:l})}));I6.displayName=D6;var F6="PopoverPortal",[U6,$6]=R6(F6,{forceMount:void 0}),V6=e=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=e,a=M6(F6,n);return t.jsx(U6,{scope:n,forceMount:r,children:t.jsx(T1,{present:r||a.open,children:t.jsx(E1,{asChild:!0,container:i,children:o})})})};V6.displayName=F6;var B6="PopoverContent",z6=i.forwardRef(((e,n)=>{const r=$6(B6,e.__scopePopover),{forceMount:o=r.forceMount,...i}=e,a=M6(B6,e.__scopePopover);return t.jsx(T1,{present:o||a.open,children:t.jsx(a.modal?H6:q6,{...i,ref:n})})}));z6.displayName=B6;var H6=i.forwardRef(((e,n)=>{const r=M6(B6,e.__scopePopover),o=i.useRef(null),a=XU(n,o),s=i.useRef(!1);return i.useEffect((()=>{const e=o.current;if(e)return LV(e)}),[]),t.jsx(NV,{as:zQ,allowPinchZoom:!0,children:t.jsx(G6,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:FQ(e.onCloseAutoFocus,(e=>{e.preventDefault(),s.current||r.triggerRef.current?.focus()})),onPointerDownOutside:FQ(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent;s.current=2===t.button||0===t.button&&!0===t.ctrlKey}),{checkForDefaultPrevented:!1}),onFocusOutside:FQ(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),q6=i.forwardRef(((e,n)=>{const r=M6(B6,e.__scopePopover),o=i.useRef(!1),a=i.useRef(!1);return t.jsx(G6,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const n=t.target,i=r.triggerRef.current?.contains(n);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),G6=i.forwardRef(((e,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...p}=e,f=M6(B6,r),h=P6(r);return cJ(),t.jsx(hJ,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:t.jsx(T6,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:t.jsx(_1,{"data-state":W6(f.open),role:"dialog",id:f.contentId,...h,...p,ref:n,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),K6="PopoverClose";i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,i=M6(K6,r);return t.jsx(WQ.button,{type:"button",...o,ref:n,onClick:FQ(e.onClick,(()=>i.onOpenChange(!1)))})})).displayName=K6;function W6(e){return e?"open":"closed"}i.forwardRef(((e,n)=>{const{__scopePopover:r,...o}=e,i=P6(r);return t.jsx(S1,{...i,...o,ref:n})})).displayName="PopoverArrow";var Y6=V6,X6=z6;const Z6=j6,Q6=I6,J6=n.forwardRef((({className:e,align:n="center",sideOffset:r=4,...o},i)=>t.jsx(Y6,{children:t.jsx(X6,{ref:i,align:n,sideOffset:r,className:Zd("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})})));J6.displayName=X6.displayName;const e8={[Ve.DRAFT]:"Draft",[Ve.ACTIVE]:"Active",[Ve.RUNNING]:"Running",[Ve.COMPLETED]:"Completed",[Ve.FAILED]:"Failed",[Ve.DEACTIVATED]:"Deactivated"},t8={[Ve.DRAFT]:"bg-gray-500",[Ve.ACTIVE]:"bg-blue-500",[Ve.RUNNING]:"bg-yellow-500",[Ve.COMPLETED]:"bg-green-500",[Ve.FAILED]:"bg-red-500",[Ve.DEACTIVATED]:"bg-red-500"},n8={[Ve.DRAFT]:"bg-gray-100 text-gray-700 px-2 py-1",[Ve.ACTIVE]:"bg-blue-100 text-blue-700 px-2 py-1",[Ve.RUNNING]:"bg-yellow-100 text-yellow-700 px-2 py-1",[Ve.COMPLETED]:"bg-green-100 text-green-700 px-2 py-1",[Ve.FAILED]:"bg-red-100 text-red-700 px-2 py-1",[Ve.DEACTIVATED]:"bg-red-100 text-red-700 px-2 py-1"},r8={[Ve.DRAFT]:`Draft ${ff("engage:automation")?.toLowerCase()} can be activated or deactivated`,[Ve.ACTIVE]:`Active ${ff("engage:automation")?.toLowerCase()} can be drafted, deactivated, run, or marked as failed`,[Ve.RUNNING]:`Running ${ff("engage:automation")?.toLowerCase()} can be completed or marked as failed`,[Ve.COMPLETED]:`Completed ${ff("engage:automation")?.toLowerCase()} can only be marked as failed`,[Ve.FAILED]:`Failed ${ff("engage:automation")?.toLowerCase()} requires manual intervention to change state`,[Ve.DEACTIVATED]:`Deactivated ${ff("engage:automation")?.toLowerCase()} cannot be reactivated - create a new one instead`},o8={[Ve.DRAFT]:[Ve.ACTIVE,Ve.DEACTIVATED],[Ve.ACTIVE]:[Ve.DRAFT],[Ve.RUNNING]:[],[Ve.COMPLETED]:[],[Ve.FAILED]:[],[Ve.DEACTIVATED]:[]},i8=({rowOriginal:e,id:r,onToggle:o,className:i="",vsaasManaged:a=!1})=>{const[s,l]=n.useState(!1),c=e.status,u=(o8[c]||[]).filter((e=>!1===a||e!==Ve.DEACTIVATED)),d=u.length>0;return t.jsx("div",{className:`${i}`,onClick:e=>e.stopPropagation(),children:t.jsx(m6,{children:t.jsxs(Z6,{open:!!d&&s,onOpenChange:l,children:[t.jsx(Q6,{asChild:!0,children:t.jsx("div",{className:"relative",children:t.jsxs(vZ,{variant:"outline",className:`flex items-center justify-between px-4 py-2 rounded-md w-full ${n8[c]} ${d?"":"cursor-not-allowed opacity-80"}`,onClick:e=>{e.stopPropagation(),d&&l(!s)},children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:`w-2 h-2 rounded-full mr-2 ${t8[c]}`}),t.jsx("span",{children:e8[c]})]}),d?t.jsx(fu,{className:"h-4 w-4 ml-2"}):t.jsxs(g6,{children:[t.jsx(v6,{asChild:!0,children:t.jsx(Cu,{className:"h-4 w-4 ml-2 text-gray-500"})}),t.jsx(y6,{className:"max-w-xs p-2",children:t.jsx("p",{children:r8[c]})})]})]})})}),d&&t.jsx(J6,{className:"w-full p-2",align:"center",sideOffset:5,children:t.jsx("div",{className:"py-1 flex flex-col gap-2 justify-start items-center",onClick:e=>e.stopPropagation(),children:u.map((e=>t.jsxs(vZ,{variant:"ghost",className:"flex justify-start items-center px-4 py-2 text-sm w-full text-left hover:bg-gray-100 rounded-none "+(c===e?"font-medium":""),onClick:()=>(o(r,e),void l(!1)),children:[t.jsx("div",{className:`w-2 h-2 rounded-full ${t8[e]} mr-2`}),e8[e]]},e)))})})]})})})};function a8(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function s8(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const l8=6048e5,c8=43200;let u8={};function d8(){return u8}function p8(e,t){const n=d8(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=a8(e),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function f8(e){return p8(e,{weekStartsOn:1})}function h8(e){const t=a8(e),n=t.getFullYear(),r=s8(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=f8(r),i=s8(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const a=f8(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function m8(e){const t=a8(e);return t.setHours(0,0,0,0),t}function g8(e){const t=a8(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function v8(e,t){return function(e,t){return s8(e,+a8(e)+t)}(e,6e4*t)}function y8(e,t){const n=a8(e),r=a8(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function b8(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const n=a8(e);return!isNaN(Number(n))}function x8(e){const t=a8(e);return+function(e){const t=a8(e);return t.setHours(23,59,59,999),t}(t)==+function(e){const t=a8(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t)}function w8(e,t){const n=a8(e),r=a8(t),o=y8(n,r),i=Math.abs(function(e,t){const n=a8(e),r=a8(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(n,r));let a;if(i<1)a=0;else{1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*i);let t=y8(n,r)===-o;x8(a8(e))&&1===i&&1===y8(e,r)&&(t=!1),a=o*(i-Number(t))}return 0===a?0:a}function _8(e,t,n){const r=function(e,t){return+a8(e)-+a8(t)}(e,t)/1e3;return(o=n?.roundingMethod,e=>{const t=(o?Math[o]:Math.trunc)(e);return 0===t?0:t})(r);var o}const S8={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function E8(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const T8={date:E8({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:E8({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:E8({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},C8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function A8(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function N8(e){return(t,n={})=>{const r=n.width,o=t.match(r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth]);if(!o)return null;const i=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(a)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(a,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(a,(e=>e.test(i)));let l;l=e.valueCallback?e.valueCallback(s):s,l=n.valueCallback?n.valueCallback(l):l;return{value:l,rest:t.slice(i.length)}}}var R8;const O8={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=S8[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:T8,formatRelative:(e,t,n,r)=>C8[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:A8({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:A8({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:A8({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:A8({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:A8({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(R8={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(R8.matchPattern);if(!n)return null;const r=n[0],o=e.match(R8.parsePattern);if(!o)return null;let i=R8.valueCallback?R8.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:N8({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:N8({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:N8({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:N8({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:N8({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function P8(e){const t=a8(e),n=function(e,t){const n=m8(e),r=m8(t),o=+n-g8(n),i=+r-g8(r);return Math.round((o-i)/864e5)}(t,function(e){const t=a8(e),n=s8(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t));return n+1}function k8(e){const t=a8(e),n=+f8(t)-+function(e){const t=h8(e),n=s8(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),f8(n)}(t);return Math.round(n/l8)+1}function M8(e,t){const n=a8(e),r=n.getFullYear(),o=d8(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=s8(e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=p8(a,t),l=s8(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=p8(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function j8(e,t){const n=a8(e),r=+p8(n,t)-+function(e,t){const n=d8(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=M8(e,t),i=s8(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),p8(i,t)}(n,t);return Math.round(r/l8)+1}function L8(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const D8={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return L8("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):L8(n+1,2)},d:(e,t)=>L8(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>L8(e.getHours()%12||12,t.length),H:(e,t)=>L8(e.getHours(),t.length),m:(e,t)=>L8(e.getMinutes(),t.length),s:(e,t)=>L8(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return L8(Math.trunc(r*Math.pow(10,n-3)),t.length)}},I8="midnight",F8="noon",U8="morning",$8="afternoon",V8="evening",B8="night",z8={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear();return n.ordinalNumber(t>0?t:1-t,{unit:"year"})}return D8.y(e,t)},Y:function(e,t,n,r){const o=M8(e,r),i=o>0?o:1-o;if("YY"===t){return L8(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):L8(i,t.length)},R:function(e,t){return L8(h8(e),t.length)},u:function(e,t){return L8(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return L8(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return L8(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return D8.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return L8(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=j8(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):L8(o,t.length)},I:function(e,t,n){const r=k8(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):L8(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):D8.d(e,t)},D:function(e,t,n){const r=P8(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):L8(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return L8(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return L8(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return L8(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?F8:0===r?I8:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?V8:r>=12?$8:r>=4?U8:B8,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return D8.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):D8.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):L8(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):L8(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):D8.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):D8.s(e,t)},S:function(e,t){return D8.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return q8(r);case"XXXX":case"XX":return G8(r);default:return G8(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return q8(r);case"xxxx":case"xx":return G8(r);default:return G8(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+H8(r,":");default:return"GMT"+G8(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+H8(r,":");default:return"GMT"+G8(r,":")}},t:function(e,t,n){return L8(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return L8(e.getTime(),t.length)}};function H8(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+L8(i,2)}function q8(e,t){if(e%60==0){return(e>0?"-":"+")+L8(Math.abs(e)/60,2)}return G8(e,t)}function G8(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+L8(Math.trunc(r/60),2)+t+L8(r%60,2)}const K8=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},W8=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Y8={p:W8,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return K8(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",K8(r,t)).replace("{{time}}",W8(o,t))}},X8=/^D+$/,Z8=/^Y+$/,Q8=["D","DD","YY","YYYY"];const J8=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,e9=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,t9=/^'([^]*?)'?$/,n9=/''/g,r9=/[a-zA-Z]/;function o9(e,t,n){const r=d8(),o=r.locale??O8,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=a8(e);if(!b8(s))throw new RangeError("Invalid time value");let l=t.match(e9).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Y8[t])(e,o.formatLong)}return e})).join("").match(J8).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:i9(e)};if(z8[t])return{isToken:!0,value:e};if(t.match(r9))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map((n=>{if(!n.isToken)return n.value;const r=n.value;(function(e){return Z8.test(e)}(r)||function(e){return X8.test(e)}(r))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(Q8.includes(e))throw new RangeError(r)}(r,t,String(e));return(0,z8[r[0]])(s,r,o.localize,c)})).join("")}function i9(e){const t=e.match(t9);return t?t[1].replace(n9,"'"):e}function a9(e,t){return function(e,t,n){const r=d8(),o=n?.locale??r.locale??O8,i=y8(e,t);if(isNaN(i))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:i});let s,l;i>0?(s=a8(t),l=a8(e)):(s=a8(e),l=a8(t));const c=_8(l,s),u=(g8(l)-g8(s))/1e3,d=Math.round((c-u)/60);let p;if(d<2)return n?.includeSeconds?c<5?o.formatDistance("lessThanXSeconds",5,a):c<10?o.formatDistance("lessThanXSeconds",10,a):c<20?o.formatDistance("lessThanXSeconds",20,a):c<40?o.formatDistance("halfAMinute",0,a):o.formatDistance(c<60?"lessThanXMinutes":"xMinutes",1,a):0===d?o.formatDistance("lessThanXMinutes",1,a):o.formatDistance("xMinutes",d,a);if(d<45)return o.formatDistance("xMinutes",d,a);if(d<90)return o.formatDistance("aboutXHours",1,a);if(d<1440){const e=Math.round(d/60);return o.formatDistance("aboutXHours",e,a)}if(d<2520)return o.formatDistance("xDays",1,a);if(d<c8){const e=Math.round(d/1440);return o.formatDistance("xDays",e,a)}if(d<86400)return p=Math.round(d/c8),o.formatDistance("aboutXMonths",p,a);if(p=w8(l,s),p<12){const e=Math.round(d/c8);return o.formatDistance("xMonths",e,a)}{const e=p%12,t=Math.trunc(p/12);return e<3?o.formatDistance("aboutXYears",t,a):e<9?o.formatDistance("overXYears",t,a):o.formatDistance("almostXYears",t+1,a)}}(e,function(e){return s8(e,Date.now())}(e),t)}function s9({accessorKey:e,header:n,meta:r,size:o,minSize:i,maxSize:a,enableSorting:s=!0,enableHiding:l=!0,headerClassName:c,cellClassName:u,cellFormatter:d}){return{accessorKey:e,header:()=>t.jsx("div",{className:`flex items-center h-8 px-3 font-medium whitespace-nowrap text-muted-foreground ${"right"===r?.align?"justify-end float-right":"center"===r?.align?"justify-center":"justify-start"} ${c||""}`.trim(),children:"function"==typeof n?n():t.jsx("span",{children:n})}),cell:e=>t.jsx("div",{className:`flex items-center h-8 ${"right"===r?.align?"justify-end":"center"===r?.align?"justify-center":"justify-start"} ${u||""} ${r?.className||""}`.trim(),children:d?d(e):e.getValue()}),size:o,minSize:i,maxSize:a,enableSorting:s,enableHiding:l,meta:r}}const l9=(e,t,n,r="Error",o="Please try again")=>{e(!1),"error"===n&&t({title:r,description:o,variant:"destructive"})},c9=e=>{switch(e){case Ve.ACTIVE:return"statusActive";case Ve.COMPLETED:return"statusCompleted";case Ve.DRAFT:return"statusDraft";case Ve.DEACTIVATED:return"statusDeactivated";case Ve.FAILED:return"statusFailed";case Ve.RUNNING:return"statusRunning";default:throw LX(e,Ve)}},u9=e=>{switch(e){case rZ.ALL_USERS:return`Default ${ff("engage:segment").toLowerCase()} that contains all ${ff("engage:user").toLowerCase()}}. This is not editable or deletable.`;case rZ.MANAGED:return`System-defined ${ff("engage:segment").toLowerCase()} that are not editable or deletable.`;case rZ.CUSTOM:return`Custom ${ff("engage:segment").toLowerCase()} that you can edit and delete as needed.`;default:throw LX(e,rZ)}};function d9(e="name",n,r=!1){return s9({accessorKey:e,header:n,meta:{align:"left",displayName:n,className:"min-w-[240px] w-full"},cellClassName:"pl-3 pr-2",cellFormatter:e=>{const n=e.getValue(),{original:o}=e.row,i=o.status,a=o.type,s=i?i[0].toUpperCase()+i.slice(1):"",l={[Ve.ACTIVE]:"bg-blue-500",[Ve.COMPLETED]:"bg-green-500",[Ve.DRAFT]:"bg-gray-500",[Ve.DEACTIVATED]:"bg-red-500",[Ve.FAILED]:"bg-red-500",[Ve.RUNNING]:"bg-yellow-500"};return t.jsxs("div",{className:"w-full flex gap-6 justify-between items-center",children:[t.jsxs("div",{className:"flex gap-1 items-center w-full",children:[t.jsx("div",{className:`w-2 h-2 rounded-full mr-3 flex-shrink-0 ${a?{[rZ.ALL_USERS]:"bg-purple-500",[rZ.MANAGED]:"bg-teal-500",[rZ.CUSTOM]:"bg-amber-500"}[a]:i?l[i]:"bg-blue-500"}`}),t.jsxs("div",{className:"flex-1 flex flex-col gap-0.5",children:[t.jsx("span",{className:"leading-tight font-medium text-sm overflow-hidden text-ellipsis",children:n}),r&&o?.description&&t.jsx("div",{className:"relative h-4",children:t.jsx("div",{className:"absolute inset-0 text-muted-foreground text-xs truncate whitespace-nowrap overflow-hidden w-full",children:o?.description})})]})]}),i&&t.jsx("div",{className:"flex-shrink-0",children:t.jsx(kZ,{variant:c9(i),children:s})})]})}})}function p9(){return s9({accessorKey:"type",header:"Type",meta:{align:"right",displayName:`${ff("engage:segment")} type`},cellClassName:"pr-4",cellFormatter:e=>{const n=e.getValue(),r=n?n.split("_").map((e=>e[0].toUpperCase()+e.slice(1).toLowerCase())).join(" "):"Unknown";let o;if(!n||n!==rZ.ALL_USERS&&n!==rZ.MANAGED&&n!==rZ.CUSTOM)o="statusDraft";else try{o=(e=>{switch(e){case rZ.ALL_USERS:return"segmentAllUsers";case rZ.MANAGED:return"segmentManaged";case rZ.CUSTOM:return"segmentCustom";default:throw LX(e,rZ)}})(n)}catch(JSe){if(!(JSe instanceof LX))throw JSe;o="statusDraft"}return t.jsx(m6,{children:t.jsxs(g6,{children:[t.jsx(v6,{asChild:!0,children:t.jsx(kZ,{variant:o,className:"cursor-help",children:r})}),t.jsx(y6,{side:"top",className:"max-w-[250px] text-sm bg-white border border-gray-200 rounded-lg p-3",children:t.jsx("p",{className:"text-muted-foreground",children:n&&u9(n)||`Unknown ${ff("engage:segment").toLowerCase()} type`})})]})})}})}function f9(e="updated_at"){return function({accessorKey:e,header:n,meta:r={align:"right"},size:o=160,minSize:i,maxSize:a,enableSorting:s=!0,enableHiding:l=!0,headerClassName:c,cellClassName:u,formatType:d="relative"}){return{accessorKey:e,header:()=>t.jsx("div",{className:`float-right h-8 flex items-center justify-end px-3 font-medium whitespace-nowrap text-muted-foreground ${c||""}`.trim(),children:t.jsx("span",{children:n})}),cell:e=>{const n=e.getValue();let o="N/A";return n&&(o="relative"===d?a9(new Date(n),{addSuffix:!0}):new Date(n).toLocaleDateString()),t.jsx("div",{className:`font-variant-numeric w-full h-8 flex items-center justify-end pr-4 whitespace-nowrap ${u||""} ${r?.className||""}`.trim(),children:o})},size:o,minSize:i,maxSize:a,enableSorting:s,enableHiding:l,meta:r}}({accessorKey:e,header:"Last Modified",formatType:"relative",size:160,meta:{align:"right",displayName:"Last Modified"}})}function h9(e,n,r){return function({accessorKey:e,header:n,meta:r={align:"right"},size:o,minSize:i,maxSize:a=120,enableSorting:s=!0,enableHiding:l=!0,headerClassName:c,cellClassName:u,prefix:d="",suffix:p="",localeStringOptions:f}){return{accessorKey:e,header:()=>t.jsx("div",{className:`float-right h-8 flex items-center justify-end px-3 font-medium whitespace-nowrap text-muted-foreground ${c||""}`.trim(),children:"function"==typeof n?n():t.jsx("span",{children:n})}),cell:e=>{const n=e.getValue()??0;return t.jsxs("div",{className:`font-variant-numeric h-8 flex items-center justify-end pr-4 ${u||""} ${r?.className||""}`.trim(),children:[d,n.toLocaleString(void 0,f),p]})},size:o||(r?.className?.includes("w-")?void 0:100),minSize:i,maxSize:a,enableSorting:s,enableHiding:l,meta:r}}({accessorKey:e,header:n,prefix:r,meta:{align:"right",displayName:n}})}function m9(e){const{setUrl:n,onToggle:r,automationName:o,vsaasManaged:i}=e;return s9({accessorKey:"status",header:"Status",enableHiding:!1,size:180,maxSize:200,meta:{align:"right"},cellClassName:"pr-4",cellFormatter:e=>{const{original:a}=e.row;return(a.status??null)===Ve.DRAFT&&n&&!1===i?t.jsx(b6,{rowOriginal:a,constructNavigationUrl:()=>n(a.id),cellText:"Action Required",tooltipIcon:t.jsx(Cu,{className:"h-4 w-4 text-muted-foreground !cursor-help z-99"}),tooltipText:`Your ${o?.toLowerCase()} is currently in draft mode. Please review and activate it to begin sending messages.`}):t.jsx(i8,{className:"flex items-center justify-end",rowOriginal:a,id:a.id,onToggle:r||(()=>{}),vsaasManaged:i})}})}function g9(e){const n={align:"right",displayName:`Update ${ff("engage:segment").toLowerCase()}`};return function({id:e="actions",header:n,meta:r={align:"center"},text:o,size:i=80,minSize:a=80,maxSize:s=80,enableSorting:l=!1,enableHiding:c=!1,headerClassName:u,icon:d,onAction:p,actionButtonVariant:f="outline",actionButtonSize:h="default"}){return{id:e,header:()=>t.jsx("div",{className:`float-right h-8 flex items-center justify-end px-3 font-medium whitespace-nowrap text-muted-foreground ${u||""}`.trim(),children:"function"==typeof n?n():t.jsx("span",{children:n})}),cell:e=>{const n=e.row.original,i=n?.type,a="custom"!==i;return t.jsx("div",{className:`flex items-center h-8 pr-3 ${"right"===r?.align?"justify-end":"center"===r?.align?"justify-center":"justify-start"} ${r?.className||""}`.trim(),children:t.jsxs(vZ,{variant:f,size:h,disabled:a,onClick:()=>p(n),children:[t.jsx(d,{className:"h-4 w-4"}),t.jsx("span",{children:o})]})})},size:i,minSize:a,maxSize:s,enableSorting:l,enableHiding:c,meta:r}}({id:"edit",header:`${ff("engage:segment")} actions`,icon:Uu,onAction:t=>{e(t.id)},text:"Edit",enableHiding:!1,size:80,meta:n})}function v9(e){const{automationName:t,setUrl:n,onToggle:r,vsaasManaged:o=!1}=e;return[d9("name","Name",!0),h9("derivedRevenue","Sales","$"),h9("emailsSent","Email Sent"),h9("smsSent","SMS Sent"),f9(),m9({setUrl:n,onToggle:r,automationName:t,vsaasManaged:o})]}const y9=({handleBack:e,handleNext:n,handleSkipAndSaveAsDraft:r,backText:o,nextText:i,backDisabled:a,nextDisabled:s,hideBack:l})=>t.jsxs("div",{className:"flex gap-4 py-2",children:[!l&&t.jsxs(vZ,{onClick:e,disabled:a,variant:"secondary",className:Zd("flex items-center gap-2",a&&"opacity-50 cursor-not-allowed"),children:[t.jsx(wZ.BackButton,{}),t.jsx("span",{children:o})]}),t.jsx(vZ,{onClick:r,variant:"secondary",className:"flex items-center gap-2",children:"Skip & Save as Draft"}),t.jsxs(vZ,{onClick:n,disabled:s,className:Zd("flex items-center gap-2 --reach-destructive",s&&"opacity-50 cursor-not-allowed"),children:[t.jsx("span",{children:i}),t.jsx(wZ.NextButton,{})]})]}),b9=()=>{const e=ve({queryKey:["channel-accounts"],queryFn:()=>(async()=>(await Re("/channel/accounts",{method:"GET"})).data)()});return{channelAccounts:e.data,isFetching:e.isFetching,isLoading:e.isLoading,fetchError:e.error,refetchChannelAccounts:e.refetch}};var x9=(e=>(e.REACH_MANAGED="reach-managed",e.TWILLIO="twillio",e))(x9||{});const w9=()=>{const e=ve({queryKey:["channel-senders"],queryFn:()=>(async()=>(await Re(`${u}`,{method:"GET"})).data)()});return{channelSenders:e.data,isFetching:e.isFetching,isLoading:e.isLoading,fetchError:e.error,refetchChannelSenders:e.refetch}},_9=()=>{const e=ce(),t=ye({mutationFn:e=>(async(e,t)=>(await Re(`${u}/${t}`,{method:"PATCH",body:JSON.stringify(e)})).data)(e.toUpdate,e.id),onSuccess:()=>{e.invalidateQueries({queryKey:["channel-senders"]})}});return{updateChannelSender:t.mutate,isUpdating:t.isPending,updateError:t.error}},S9=(e,t)=>{const[r,o]=n.useState(e);return n.useEffect((()=>{const n=setTimeout((()=>{o(e)}),t);return()=>clearTimeout(n)}),[e,t]),r},E9=({className:e})=>t.jsx("div",{className:Zd("bg-red-500/10 p-2 rounded-full text-red-500",e),children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),T9=({title:e,alertText:r,Icon:o=Cu,onClick:i,asChild:a=!0})=>{const[s,l]=n.useState(!1);return t.jsx(m6,{children:t.jsxs(g6,{open:s,onOpenChange:l,children:[t.jsx(v6,{asChild:a,onClick:e=>{e.stopPropagation(),i?(i(),l(!1)):l(!s)},children:t.jsx(o,{className:"h-3.5 w-3.5 cursor-pointer transition-colors"})}),t.jsx(y6,{className:"text-left",children:t.jsxs("div",{className:"flex flex-col items-start gap-2 max-w-[300px]",children:[r&&t.jsxs(t.Fragment,{children:[t.jsx(E9,{}),t.jsx("p",{className:"font-semibold text-amber-500",children:r})]}),t.jsx("p",{className:"text-[13px] leading-relaxed text-primary-foreground/90 text-left",children:e})]})})]})})};function C9(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function A9(e){const n=N9(e),r=i.forwardRef(((e,r)=>{const{children:o,...a}=e,s=i.Children.toArray(o),l=s.find(O9);if(l){const e=l.props.children,o=s.map((t=>t===l?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(n,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})}));return r.displayName=`${e}.Slot`,r}function N9(e){const t=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?function(...e){return t=>{let n=!1;const r=e.map((e=>{const r=C9(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():C9(e[t],null)}}}}(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var R9=Symbol("radix.slottable");function O9(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===R9}var P9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,n)=>{const r=A9(`Primitive.${n}`),o=i.forwardRef(((e,o)=>{const{asChild:i,...a}=e,s=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...a,ref:o})}));return o.displayName=`Primitive.${n}`,{...e,[n]:o}}),{}),k9=i.forwardRef(((e,n)=>t.jsx(P9.label,{...e,ref:n,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));k9.displayName="Label";var M9=k9;const j9=ru("text-foreground text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),L9=i.forwardRef((({className:e,...n},r)=>t.jsx(M9,{ref:r,className:Zd(j9(),e),...n})));function D9(e,[t,n]){return Math.min(n,Math.max(t,e))}function I9(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function F9(e,n=[]){let r=[];const o=()=>{const t=r.map((e=>i.createContext(e)));return function(n){const r=n?.[e]||t;return i.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(n,o){const a=i.createContext(o),s=r.length;r=[...r,o];const l=n=>{const{scope:r,children:o,...l}=n,c=r?.[e]?.[s]||a,u=i.useMemo((()=>l),Object.values(l));return t.jsx(c.Provider,{value:u,children:o})};return l.displayName=n+"Provider",[l,function(t,r){const l=i.useContext(r?.[e]?.[s]||a);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},U9(o,...n)]}function U9(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return i.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function $9(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function V9(...e){return t=>{let n=!1;const r=e.map((e=>{const r=$9(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():$9(e[t],null)}}}}function B9(...e){return i.useCallback(V9(...e),e)}function z9(e){const n=H9(e),r=i.forwardRef(((e,r)=>{const{children:o,...a}=e,s=i.Children.toArray(o),l=s.find(G9);if(l){const e=l.props.children,o=s.map((t=>t===l?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(n,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})}));return r.displayName=`${e}.Slot`,r}function H9(e){const t=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?V9(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}L9.displayName=M9.displayName;var q9=Symbol("radix.slottable");function G9(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===q9}var K9=i.createContext(void 0);var W9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,n)=>{const r=z9(`Primitive.${n}`),o=i.forwardRef(((e,o)=>{const{asChild:i,...a}=e,s=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...a,ref:o})}));return o.displayName=`Primitive.${n}`,{...e,[n]:o}}),{});function Y9(e){const t=i.useRef(e);return i.useEffect((()=>{t.current=e})),i.useMemo((()=>(...e)=>t.current?.(...e)),[])}var X9,Z9="dismissableLayer.update",Q9="dismissableLayer.pointerDownOutside",J9="dismissableLayer.focusOutside",e7=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),t7=i.forwardRef(((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=e,d=i.useContext(e7),[p,f]=i.useState(null),h=p?.ownerDocument??globalThis?.document,[,m]=i.useState({}),g=B9(n,(e=>f(e))),v=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=p?v.indexOf(p):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,_=x>=b,S=function(e,t=globalThis?.document){const n=Y9(e),r=i.useRef(!1),o=i.useRef((()=>{}));return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){r7(Q9,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));_&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())}),h),E=function(e,t=globalThis?.document){const n=Y9(e),r=i.useRef(!1);return i.useEffect((()=>{const e=e=>{if(e.target&&!r.current){r7(J9,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),h);return function(e,t=globalThis?.document){const n=Y9(e);i.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{x===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),i.useEffect((()=>{if(p)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(X9=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),n7(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=X9)}}),[p,h,r,d]),i.useEffect((()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),n7())}),[p,d]),i.useEffect((()=>{const e=()=>m({});return document.addEventListener(Z9,e),()=>document.removeEventListener(Z9,e)}),[]),t.jsx(W9.div,{...u,ref:g,style:{pointerEvents:w?_?"auto":"none":void 0,...e.style},onFocusCapture:I9(e.onFocusCapture,E.onFocusCapture),onBlurCapture:I9(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:I9(e.onPointerDownCapture,S.onPointerDownCapture)})}));t7.displayName="DismissableLayer";function n7(){const e=new CustomEvent(Z9);document.dispatchEvent(e)}function r7(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&a.flushSync((()=>e.dispatchEvent(t)))}(o,i):o.dispatchEvent(i)}i.forwardRef(((e,n)=>{const r=i.useContext(e7),o=i.useRef(null),a=B9(n,o);return i.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),t.jsx(W9.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var o7=0;function i7(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var a7="focusScope.autoFocusOnMount",s7="focusScope.autoFocusOnUnmount",l7={bubbles:!1,cancelable:!0},c7=i.forwardRef(((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[c,u]=i.useState(null),d=Y9(a),p=Y9(s),f=i.useRef(null),h=B9(n,(e=>u(e))),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect((()=>{if(o){let e=function(e){if(m.paused||!c)return;const t=e.target;c.contains(t)?f.current=t:f7(f.current,{select:!0})},t=function(e){if(m.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||f7(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&f7(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,c,m.paused]),i.useEffect((()=>{if(c){h7.add(m);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(a7,l7);c.addEventListener(a7,d),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(f7(r,{select:t}),document.activeElement!==n)return}((e=u7(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&f7(c))}return()=>{c.removeEventListener(a7,d),setTimeout((()=>{const e=new CustomEvent(s7,l7);c.addEventListener(s7,p),c.dispatchEvent(e),e.defaultPrevented||f7(t??document.body,{select:!0}),c.removeEventListener(s7,p),h7.remove(m)}),0)}}var e}),[c,d,p,m]);const g=i.useCallback((e=>{if(!r&&!o)return;if(m.paused)return;const t=document.activeElement;if("Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&t){const n=e.currentTarget,[o,i]=function(e){const t=u7(e),n=d7(t,e),r=d7(t.reverse(),e);return[n,r]}(n);o&&i?e.shiftKey||t!==i?e.shiftKey&&t===o&&(e.preventDefault(),r&&f7(i,{select:!0})):(e.preventDefault(),r&&f7(o,{select:!0})):t===n&&e.preventDefault()}}),[r,o,m.paused]);return t.jsx(W9.div,{tabIndex:-1,...l,ref:h,onKeyDown:g})}));function u7(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}function d7(e,t){for(const n of e)if(!p7(n,{upTo:t}))return n}function p7(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function f7(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}c7.displayName="FocusScope";var h7=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=m7(e,t),e.unshift(t)},remove(t){e=m7(e,t),e[0]?.resume()}}}();function m7(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var g7=globalThis?.document?i.useLayoutEffect:()=>{},v7=i[" useId ".trim().toString()]||(()=>{}),y7=0;function b7(e){const[t,n]=i.useState(v7());return g7((()=>{n((e=>e??String(y7++)))}),[e]),e||(t?`radix-${t}`:"")}var x7=i.forwardRef(((e,n)=>{const{children:r,width:o=10,height:i=5,...a}=e;return t.jsx(W9.svg,{...a,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:t.jsx("polygon",{points:"0,0 30,0 15,10"})})}));x7.displayName="Arrow";var w7=x7;var _7="Popper",[S7,E7]=F9(_7),[T7,C7]=S7(_7),A7=e=>{const{__scopePopper:n,children:r}=e,[o,a]=i.useState(null);return t.jsx(T7,{scope:n,anchor:o,onAnchorChange:a,children:r})};A7.displayName=_7;var N7="PopperAnchor",R7=i.forwardRef(((e,n)=>{const{__scopePopper:r,virtualRef:o,...a}=e,s=C7(N7,r),l=i.useRef(null),c=B9(n,l);return i.useEffect((()=>{s.onAnchorChange(o?.current||l.current)})),o?null:t.jsx(W9.div,{...a,ref:c})}));R7.displayName=N7;var O7="PopperContent",[P7,k7]=S7(O7),M7=i.forwardRef(((e,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:g,...v}=e,y=C7(O7,r),[b,x]=i.useState(null),w=B9(n,(e=>x(e))),[_,S]=i.useState(null),E=function(e){const[t,n]=i.useState(void 0);return g7((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(_),T=E?.width??0,C=E?.height??0,A=o+("center"!==s?"-"+s:""),N="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},R=Array.isArray(d)?d:[d],O=R.length>0,P={padding:N,boundary:R.filter(I7),altBoundary:O},{refs:k,floatingStyles:M,placement:j,isPositioned:L,middlewareData:D}=H0({strategy:"fixed",placement:A,whileElementsMounted:(...e)=>O0(...e,{animationFrame:"always"===m}),elements:{reference:y.anchor},middleware:[G0({mainAxis:a+C,alignmentAxis:l}),u&&K0({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?W0():void 0,...P}),u&&Y0({...P}),X0({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),_&&Q0({element:_,padding:c}),F7({arrowWidth:T,arrowHeight:C}),h&&Z0({strategy:"referenceHidden",...P})]}),[I,F]=U7(j),U=Y9(g);g7((()=>{L&&U?.()}),[L,U]);const $=D.arrow?.x,V=D.arrow?.y,B=0!==D.arrow?.centerOffset,[z,H]=i.useState();return g7((()=>{b&&H(window.getComputedStyle(b).zIndex)}),[b]),t.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:L?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[D.transformOrigin?.x,D.transformOrigin?.y].join(" "),...D.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:t.jsx(P7,{scope:r,placedSide:I,onArrowChange:S,arrowX:$,arrowY:V,shouldHideArrow:B,children:t.jsx(W9.div,{"data-side":I,"data-align":F,...v,ref:w,style:{...v.style,animation:L?void 0:"none"}})})})}));M7.displayName=O7;var j7="PopperArrow",L7={top:"bottom",right:"left",bottom:"top",left:"right"},D7=i.forwardRef((function(e,n){const{__scopePopper:r,...o}=e,i=k7(j7,r),a=L7[i.placedSide];return t.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:t.jsx(w7,{...o,ref:n,style:{...o.style,display:"block"}})})}));function I7(e){return null!==e}D7.displayName=j7;var F7=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=U7(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let f="",h="";return"bottom"===l?(f=i?u:`${d}px`,h=-s+"px"):"top"===l?(f=i?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===l?(f=-s+"px",h=i?u:`${p}px`):"left"===l&&(f=`${r.floating.width+s}px`,h=i?u:`${p}px`),{data:{x:f,y:h}}}});function U7(e){const[t,n="center"]=e.split("-");return[t,n]}var $7=A7,V7=R7,B7=M7,z7=D7,H7=i.forwardRef(((e,n)=>{const{container:o,...a}=e,[s,l]=i.useState(!1);g7((()=>l(!0)),[]);const c=o||s&&globalThis?.document?.body;return c?r.createPortal(t.jsx(W9.div,{...a,ref:n}),c):null}));H7.displayName="Portal";var q7=i[" useInsertionEffect ".trim().toString()]||g7;function G7({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=function({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return q7((()=>{a.current=t}),[t]),i.useEffect((()=>{o.current!==n&&(a.current?.(n),o.current=n)}),[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:o;{const t=i.useRef(void 0!==e);i.useEffect((()=>{const e=t.current;if(e!==l){}t.current=l}),[l,r])}const u=i.useCallback((t=>{if(l){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)}),[l,e,a,s]);return[c,u]}var K7=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});i.forwardRef(((e,n)=>t.jsx(W9.span,{...e,ref:n,style:{...K7,...e.style}}))).displayName="VisuallyHidden";var W7=[" ","Enter","ArrowUp","ArrowDown"],Y7=[" ","Enter"],X7="Select",[Z7,Q7,J7]=function(e){const r=e+"CollectionProvider",[o,i]=F9(r),[a,s]=o(r,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:r,children:o}=e,i=n.useRef(null),s=n.useRef(new Map).current;return t.jsx(a,{scope:r,itemMap:s,collectionRef:i,children:o})};l.displayName=r;const c=e+"CollectionSlot",u=z9(c),d=n.forwardRef(((e,n)=>{const{scope:r,children:o}=e,i=B9(n,s(c,r).collectionRef);return t.jsx(u,{ref:i,children:o})}));d.displayName=c;const p=e+"CollectionItemSlot",f="data-radix-collection-item",h=z9(p),m=n.forwardRef(((e,r)=>{const{scope:o,children:i,...a}=e,l=n.useRef(null),c=B9(r,l),u=s(p,o);return n.useEffect((()=>(u.itemMap.set(l,{ref:l,...a}),()=>{u.itemMap.delete(l)}))),t.jsx(h,{[f]:"",ref:c,children:i})}));return m.displayName=p,[{Provider:l,Slot:d,ItemSlot:m},function(t){const r=s(e+"CollectionConsumer",t);return n.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},i]}(X7),[eee,tee]=F9(X7,[J7,E7]),nee=E7(),[ree,oee]=eee(X7),[iee,aee]=eee(X7),see=e=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:a,onOpenChange:s,value:l,defaultValue:c,onValueChange:u,dir:d,name:p,autoComplete:f,disabled:h,required:m,form:g}=e,v=nee(n),[y,b]=i.useState(null),[x,w]=i.useState(null),[_,S]=i.useState(!1),E=function(e){const t=i.useContext(K9);return e||t||"ltr"}(d),[T,C]=G7({prop:o,defaultProp:a??!1,onChange:s,caller:X7}),[A,N]=G7({prop:l,defaultProp:c,onChange:u,caller:X7}),R=i.useRef(null),O=!y||(g||!!y.closest("form")),[P,k]=i.useState(new Set),M=Array.from(P).map((e=>e.props.value)).join(";");return t.jsx($7,{...v,children:t.jsxs(ree,{required:m,scope:n,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:_,onValueNodeHasChildrenChange:S,contentId:b7(),value:A,onValueChange:N,open:T,onOpenChange:C,dir:E,triggerPointerDownPosRef:R,disabled:h,children:[t.jsx(Z7.Provider,{scope:n,children:t.jsx(iee,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback((e=>{k((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:i.useCallback((e=>{k((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:r})}),O?t.jsxs(Kee,{"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:f,value:A,onChange:e=>N(e.target.value),disabled:h,form:g,children:[void 0===A?t.jsx("option",{value:""}):null,Array.from(P)]},M):null]})})};see.displayName=X7;var lee="SelectTrigger",cee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,disabled:o=!1,...a}=e,s=nee(r),l=oee(lee,r),c=l.disabled||o,u=B9(n,l.onTriggerChange),d=Q7(r),p=i.useRef("touch"),[f,h,m]=Yee((e=>{const t=d().filter((e=>!e.disabled)),n=t.find((e=>e.value===l.value)),r=Xee(t,e,n);void 0!==r&&l.onValueChange(r.value)})),g=e=>{c||(l.onOpenChange(!0),m()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return t.jsx(V7,{asChild:!0,...s,children:t.jsx(W9.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Wee(l.value)?"":void 0,...a,ref:u,onClick:I9(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)})),onPointerDown:I9(a.onPointerDown,(e=>{p.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())})),onKeyDown:I9(a.onKeyDown,(e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||W7.includes(e.key)&&(g(),e.preventDefault())}))})})}));cee.displayName=lee;var uee="SelectValue",dee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,className:o,style:i,children:a,placeholder:s="",...l}=e,c=oee(uee,r),{onValueNodeHasChildrenChange:u}=c,d=void 0!==a,p=B9(n,c.onValueNodeChange);return g7((()=>{u(d)}),[u,d]),t.jsx(W9.span,{...l,ref:p,style:{pointerEvents:"none"},children:Wee(c.value)?t.jsx(t.Fragment,{children:s}):a})}));dee.displayName=uee;var pee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,children:o,...i}=e;return t.jsx(W9.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})}));pee.displayName="SelectIcon";var fee=e=>t.jsx(H7,{asChild:!0,...e});fee.displayName="SelectPortal";var hee="SelectContent",mee=i.forwardRef(((e,n)=>{const r=oee(hee,e.__scopeSelect),[o,s]=i.useState();if(g7((()=>{s(new DocumentFragment)}),[]),!r.open){const n=o;return n?a.createPortal(t.jsx(vee,{scope:e.__scopeSelect,children:t.jsx(Z7.Slot,{scope:e.__scopeSelect,children:t.jsx("div",{children:e.children})})}),n):null}return t.jsx(xee,{...e,ref:n})}));mee.displayName=hee;var gee=10,[vee,yee]=eee(hee),bee=z9("SelectContent.RemoveScroll"),xee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:y,...b}=e,x=oee(hee,r),[w,_]=i.useState(null),[S,E]=i.useState(null),T=B9(n,(e=>_(e))),[C,A]=i.useState(null),[N,R]=i.useState(null),O=Q7(r),[P,k]=i.useState(!1),M=i.useRef(!1);i.useEffect((()=>{if(w)return LV(w)}),[w]),i.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??i7()),document.body.insertAdjacentElement("beforeend",e[1]??i7()),o7++,()=>{1===o7&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),o7--}}),[]);const j=i.useCallback((e=>{const[t,...n]=O().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const i of e){if(i===o)return;if(i?.scrollIntoView({block:"nearest"}),i===t&&S&&(S.scrollTop=0),i===r&&S&&(S.scrollTop=S.scrollHeight),i?.focus(),document.activeElement!==o)return}}),[O,S]),L=i.useCallback((()=>j([C,w])),[j,C,w]);i.useEffect((()=>{P&&L()}),[P,L]);const{onOpenChange:D,triggerPointerDownPosRef:I}=x;i.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||D(!1),document.removeEventListener("pointermove",t),I.current=null};return null!==I.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,D,I]),i.useEffect((()=>{const e=()=>D(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[D]);const[F,U]=Yee((e=>{const t=O().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Xee(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),$=i.useCallback(((e,t,n)=>{const r=!M.current&&!n;(void 0!==x.value&&x.value===t||r)&&(A(e),r&&(M.current=!0))}),[x.value]),V=i.useCallback((()=>w?.focus()),[w]),B=i.useCallback(((e,t,n)=>{(void 0!==x.value&&x.value===t||!M.current&&!n)&&R(e)}),[x.value]),z="popper"===o?_ee:wee,H=z===_ee?{side:c,sideOffset:u,align:d,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:y}:{};return t.jsx(vee,{scope:r,content:w,viewport:S,onViewportChange:E,itemRefCallback:$,selectedItem:C,onItemLeave:V,itemTextRefCallback:B,focusSelectedItem:L,selectedItemText:N,position:o,isPositioned:P,searchRef:F,children:t.jsx(NV,{as:bee,allowPinchZoom:!0,children:t.jsx(c7,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:I9(a,(e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:t.jsx(t7,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:t.jsx(z,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:e=>e.preventDefault(),...b,...H,onPlaced:()=>k(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:I9(b.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=t.indexOf(e.target);t=t.slice(n+1)}setTimeout((()=>j(t))),e.preventDefault()}}))})})})})})}));xee.displayName="SelectContentImpl";var wee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,onPlaced:o,...a}=e,s=oee(hee,r),l=yee(hee,r),[c,u]=i.useState(null),[d,p]=i.useState(null),f=B9(n,(e=>p(e))),h=Q7(r),m=i.useRef(!1),g=i.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=l,w=i.useCallback((()=>{if(s.trigger&&s.valueNode&&c&&d&&v&&y&&b){const e=s.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=b.getBoundingClientRect();if("rtl"!==s.dir){const o=n.left-(r.left-t.left),i=e.width+(e.left-o),a=Math.max(i,t.width),s=window.innerWidth-gee,l=D9(o,[gee,Math.max(gee,s-a)]);c.style.minWidth=i+"px",c.style.left=l+"px"}else{const o=window.innerWidth-n.right-(t.right-r.right),i=window.innerWidth-e.right-o,a=e.width+i,s=Math.max(a,t.width),l=window.innerWidth-gee,u=D9(o,[gee,Math.max(gee,l-s)]);c.style.minWidth=a+"px",c.style.right=u+"px"}const i=h(),a=window.innerHeight-2*gee,l=v.scrollHeight,u=window.getComputedStyle(d),p=parseInt(u.borderTopWidth,10),f=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),x=p+f+l+parseInt(u.paddingBottom,10)+g,w=Math.min(5*y.offsetHeight,x),_=window.getComputedStyle(v),S=parseInt(_.paddingTop,10),E=parseInt(_.paddingBottom,10),T=e.top+e.height/2-gee,C=a-T,A=y.offsetHeight/2,N=p+f+(y.offsetTop+A),R=x-N;if(N<=T){const e=i.length>0&&y===i[i.length-1].ref.current;c.style.bottom="0px";const t=Math.max(C,A+(e?E:0)+(d.clientHeight-v.offsetTop-v.offsetHeight)+g);c.style.height=N+t+"px"}else{const e=i.length>0&&y===i[0].ref.current;c.style.top="0px";const t=Math.max(T,p+v.offsetTop+(e?S:0)+A);c.style.height=t+R+"px",v.scrollTop=N-T+v.offsetTop}c.style.margin=`${gee}px 0`,c.style.minHeight=w+"px",c.style.maxHeight=a+"px",o?.(),requestAnimationFrame((()=>m.current=!0))}}),[h,s.trigger,s.valueNode,c,d,v,y,b,s.dir,o]);g7((()=>w()),[w]);const[_,S]=i.useState();g7((()=>{d&&S(window.getComputedStyle(d).zIndex)}),[d]);const E=i.useCallback((e=>{e&&!0===g.current&&(w(),x?.(),g.current=!1)}),[w,x]);return t.jsx(See,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:E,children:t.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:t.jsx(W9.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));wee.displayName="SelectItemAlignedPosition";var _ee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=gee,...a}=e,s=nee(r);return t.jsx(B7,{...s,...a,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));_ee.displayName="SelectPopperPosition";var[See,Eee]=eee(hee,{}),Tee="SelectViewport",Cee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,nonce:o,...a}=e,s=yee(Tee,r),l=Eee(Tee,r),c=B9(n,s.onViewportChange),u=i.useRef(0);return t.jsxs(t.Fragment,{children:[t.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),t.jsx(Z7.Slot,{scope:r,children:t.jsx(W9.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:I9(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=l;if(r?.current&&n){const e=Math.abs(u.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*gee,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}u.current=t.scrollTop}))})})]})}));Cee.displayName=Tee;var Aee="SelectGroup",[Nee,Ree]=eee(Aee);i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e,i=b7();return t.jsx(Nee,{scope:r,id:i,children:t.jsx(W9.div,{role:"group","aria-labelledby":i,...o,ref:n})})})).displayName=Aee;var Oee="SelectLabel",Pee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e,i=Ree(Oee,r);return t.jsx(W9.div,{id:i.id,...o,ref:n})}));Pee.displayName=Oee;var kee="SelectItem",[Mee,jee]=eee(kee),Lee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,value:o,disabled:a=!1,textValue:s,...l}=e,c=oee(kee,r),u=yee(kee,r),d=c.value===o,[p,f]=i.useState(s??""),[h,m]=i.useState(!1),g=B9(n,(e=>u.itemRefCallback?.(e,o,a))),v=b7(),y=i.useRef("touch"),b=()=>{a||(c.onValueChange(o),c.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return t.jsx(Mee,{scope:r,value:o,disabled:a,textId:v,isSelected:d,onItemTextChange:i.useCallback((e=>{f((t=>t||(e?.textContent??"").trim()))}),[]),children:t.jsx(Z7.ItemSlot,{scope:r,value:o,disabled:a,textValue:p,children:t.jsx(W9.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:g,onFocus:I9(l.onFocus,(()=>m(!0))),onBlur:I9(l.onBlur,(()=>m(!1))),onClick:I9(l.onClick,(()=>{"mouse"!==y.current&&b()})),onPointerUp:I9(l.onPointerUp,(()=>{"mouse"===y.current&&b()})),onPointerDown:I9(l.onPointerDown,(e=>{y.current=e.pointerType})),onPointerMove:I9(l.onPointerMove,(e=>{y.current=e.pointerType,a?u.onItemLeave?.():"mouse"===y.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:I9(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()})),onKeyDown:I9(l.onKeyDown,(e=>{""!==u.searchRef?.current&&" "===e.key||(Y7.includes(e.key)&&b()," "===e.key&&e.preventDefault())}))})})})}));Lee.displayName=kee;var Dee="SelectItemText",Iee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,className:o,style:s,...l}=e,c=oee(Dee,r),u=yee(Dee,r),d=jee(Dee,r),p=aee(Dee,r),[f,h]=i.useState(null),m=B9(n,(e=>h(e)),d.onItemTextChange,(e=>u.itemTextRefCallback?.(e,d.value,d.disabled))),g=f?.textContent,v=i.useMemo((()=>t.jsx("option",{value:d.value,disabled:d.disabled,children:g},d.value)),[d.disabled,d.value,g]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=p;return g7((()=>(y(v),()=>b(v))),[y,b,v]),t.jsxs(t.Fragment,{children:[t.jsx(W9.span,{id:d.textId,...l,ref:m}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren?a.createPortal(l.children,c.valueNode):null]})}));Iee.displayName=Dee;var Fee="SelectItemIndicator",Uee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e;return jee(Fee,r).isSelected?t.jsx(W9.span,{"aria-hidden":!0,...o,ref:n}):null}));Uee.displayName=Fee;var $ee="SelectScrollUpButton",Vee=i.forwardRef(((e,n)=>{const r=yee($ee,e.__scopeSelect),o=Eee($ee,e.__scopeSelect),[a,s]=i.useState(!1),l=B9(n,o.onScrollButtonChange);return g7((()=>{if(r.viewport&&r.isPositioned){let e=function(){s(t.scrollTop>0)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?t.jsx(Hee,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));Vee.displayName=$ee;var Bee="SelectScrollDownButton",zee=i.forwardRef(((e,n)=>{const r=yee(Bee,e.__scopeSelect),o=Eee(Bee,e.__scopeSelect),[a,s]=i.useState(!1),l=B9(n,o.onScrollButtonChange);return g7((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?t.jsx(Hee,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));zee.displayName=Bee;var Hee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,onAutoScroll:o,...a}=e,s=yee("SelectScrollButton",r),l=i.useRef(null),c=Q7(r),u=i.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return i.useEffect((()=>()=>u()),[u]),g7((()=>{const e=c().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[c]),t.jsx(W9.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:I9(a.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:I9(a.onPointerMove,(()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:I9(a.onPointerLeave,(()=>{u()}))})})),qee=i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e;return t.jsx(W9.div,{"aria-hidden":!0,...o,ref:n})}));qee.displayName="SelectSeparator";var Gee="SelectArrow";i.forwardRef(((e,n)=>{const{__scopeSelect:r,...o}=e,i=nee(r),a=oee(Gee,r),s=yee(Gee,r);return a.open&&"popper"===s.position?t.jsx(z7,{...i,...o,ref:n}):null})).displayName=Gee;var Kee=i.forwardRef((({__scopeSelect:e,value:n,...r},o)=>{const a=i.useRef(null),s=B9(o,a),l=function(e){const t=i.useRef({value:e,previous:e});return i.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(n);return i.useEffect((()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[l,n]),t.jsx(W9.select,{...r,style:{...K7,...r.style},ref:s,defaultValue:n})}));function Wee(e){return""===e||void 0===e}function Yee(e){const t=Y9(e),n=i.useRef(""),r=i.useRef(0),o=i.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),a=i.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return i.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,a]}function Xee(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(o,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===r.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}Kee.displayName="SelectBubbleInput";var Zee=cee,Qee=pee,Jee=fee,ete=mee,tte=Cee,nte=Pee,rte=Lee,ote=Iee,ite=Uee,ate=Vee,ste=zee,lte=qee;const cte=see,ute=dee,dte=i.forwardRef((({className:e,children:n,...r},o)=>t.jsxs(Zee,{ref:o,className:Zd("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-border/10 px-3 py-2 text-sm shadow-sm ring-offset-background !placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,t.jsx(Qee,{asChild:!0,children:t.jsx(fu,{className:"h-4 w-4 opacity-50"})})]})));dte.displayName=Zee.displayName;const pte=i.forwardRef((({className:e,...n},r)=>t.jsx(ate,{ref:r,className:Zd("flex cursor-default items-center justify-center py-1",e),...n,children:t.jsx(gu,{className:"h-4 w-4"})})));pte.displayName=ate.displayName;const fte=i.forwardRef((({className:e,...n},r)=>t.jsx(ste,{ref:r,className:Zd("flex cursor-default items-center justify-center py-1",e),...n,children:t.jsx(fu,{className:"h-4 w-4"})})));fte.displayName=ste.displayName;const hte=i.forwardRef((({className:e,children:n,position:r="popper",...o},i)=>t.jsx(Jee,{children:t.jsxs(ete,{ref:i,className:Zd("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[t.jsx(pte,{}),t.jsx(tte,{className:Zd("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),t.jsx(fte,{})]})})));hte.displayName=ete.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx(nte,{ref:r,className:Zd("px-2 py-1.5 text-sm font-semibold text-muted-foreground",e),...n}))).displayName=nte.displayName;const mte=i.forwardRef((({className:e,children:n,...r},o)=>t.jsxs(rte,{ref:o,className:Zd("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[t.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:t.jsx(ite,{children:t.jsx(pu,{className:"h-4 w-4"})})}),t.jsx(ote,{children:n})]})));mte.displayName=rte.displayName;i.forwardRef((({className:e,...n},r)=>t.jsx(lte,{ref:r,className:Zd("-mx-1 my-1 h-px bg-muted",e),...n}))).displayName=lte.displayName;const gte=({type:e})=>t.jsxs("div",{className:"w-full h-full min-h-[300px] flex flex-col items-center justify-center bg-gradient-to-b from-gray-50 to-white p-8",children:[t.jsx("div",{className:"mb-4 text-gray-300",children:t.jsx("svg",{className:"w-16 h-16",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z"})})}),t.jsxs("p",{className:"text-gray-400 font-medium text-lg text-center mb-2",children:["No ","email"===e?"Email":"SMS"," Preview Available"]}),t.jsxs("p",{className:"text-gray-400 text-sm text-center",children:["Edit your ","email"===e?"Email":"SMS"," template to see a preview here"]})]}),vte=({html:e,height:n,width:r})=>t.jsx("div",{className:"w-full h-full bg-white rounded-lg border-0 overflow-hidden transition-all duration-300 ease-in-out flex flex-col items-center justify-center",children:e?t.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t.jsx("iframe",{title:"Email Preview",srcDoc:e,className:"transition-opacity duration-300",style:{border:"none",backgroundColor:"white",height:n||"100%",width:r||"100%",maxWidth:"100%",maxHeight:"100%"}})}):t.jsx(gte,{type:"email"})}),yte=()=>t.jsxs("div",{className:"p-6 overflow-y-auto",children:[t.jsxs("div",{className:"mb-8 text-center",children:[t.jsx("h2",{className:"text-2xl font-semibold mb-2",children:"Email Editor Help Center"}),t.jsx("p",{className:"text-gray-500",children:"Learn how to use our email editor's powerful features"})]}),t.jsxs("div",{className:"space-y-4 max-w-xl mx-auto",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Using Dynamic Content"}),t.jsxs("div",{className:"relative rounded-lg overflow-hidden bg-gray-50",children:[t.jsx("img",{src:"https://cdn.embedreach.com/assets/engage/merge-tags-demo.gif",alt:"Merge Tags Demo",className:"w-full shadow-lg max-w-md mx-auto"}),t.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/50 to-transparent p-4",children:t.jsx("p",{className:"text-white text-sm",children:"Demonstration: Adding merge tags to personalize your emails"})})]}),t.jsx("div",{className:"px-2",children:t.jsx(xZ,{onClick:()=>{},title:"Dynamic Content",subtitle:"Dynamic content is a way to insert dynamic content into your email such as the customer's name, email, or other details.",icon:t.jsx(ku,{}),selected:!0})})]})]}),bte=({type:e})=>t.jsxs("div",{className:"flex items-start space-x-2 text-sm text-gray-600",children:[t.jsx("svg",{className:"w-5 h-5 text-amber-500 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),t.jsxs("span",{children:["Please configure at least one ",e," sender before editing the template"]})]}),xte=({containerRef:e,stripoDialogDimensions:r,showSaving:o})=>(n.useEffect((()=>{const t=t=>{const n=e.current;if(!n)return;const r=n.querySelector("ui-editor");if(!r)return;const o=r.shadowRoot;if(!o)return;const i=o.host.getBoundingClientRect();const a=function(e){for(;e;){const t=getComputedStyle(e);if(("auto"===t.overflowY||"scroll"===t.overflowY)&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return null}(o.elementFromPoint(t.clientX-i.left,t.clientY-i.top))||o.firstElementChild;a&&(a.scrollTop+=t.deltaY,a.scrollLeft+=t.deltaX,t.preventDefault())},n=e.current;return n&&n.addEventListener("wheel",t,{passive:!1}),()=>{n&&n.removeEventListener("wheel",t)}}),[e]),t.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center",children:[t.jsx("div",{id:"externalSystemContainer",className:"flex items-center px-4 py-2"}),o&&t.jsx("div",{className:"absolute top-0 left-0 w-full h-full bg-black/50 flex items-center justify-center z-50",children:t.jsx(hZ,{textColor:"text-white",text:["Saving..."]})}),t.jsx("div",{id:"stripoEditorContainer",ref:e,style:{width:r.width-75,height:r.height-75},className:"z-10"})]})),wte="UiEditorScript",_te=e=>new Promise(((t,n)=>{const r=()=>{let n=!0;e.updatedFromDefault&&(n=!1),window.UIEditor&&(window.UIEditor.initEditor(e.container,{forceRecreate:n,metadata:{emailId:e.emailId},html:e.html,css:e.css,locale:"en",onTokenRefreshRequest:e=>{Promise.resolve().then((async()=>{try{const{token:t}=await(async()=>(await Re(`${p}/token`)).data)();e(t)}catch(t){}}))},messageSettingsEnabled:!1,conditionsEnabled:!1,syncModulesEnabled:!1,notifications:{info:console.info,error:console.error,warn:console.warn,success:console.log},mergeTags:e.mergeFields}),t(void 0))};if(document.getElementById(wte))r();else{const e=document.createElement("script");e.id=wte,e.type="module",e.src="https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js",e.onload=()=>{window.UIEditor?r():n(new Error("UIEditor not found after script load"))},e.onerror=e=>{n(e)},document.head.appendChild(e)}})),Ste=({automation:e,setShowStripoEditor:r,saveClicked:o,setSaveClicked:i,stripoDialogDimensions:a,mergeFieldsResponse:s,cancelClicked:l,setCancelClicked:c,actionId:u})=>{const d=n.useRef(!1),p=n.useRef(null),{data:f,isLoading:h}=(e=>{const{automationId:t,actionId:n}=e;return ve({queryKey:dZ.templateForActionId(t,n),queryFn:()=>fZ({automationId:t,actionId:n}),..._e})})({automationId:e.id,actionId:u}),{data:m,isLoading:g}=(()=>{const e=ce();return{...ve({queryKey:dZ.editorData(),queryFn:pZ,..._e}),invalidateEditorData:()=>e.invalidateQueries({queryKey:dZ.editorData()})}})(),[v,y]=n.useState(!1),[b,x]=n.useState(!1),{updateCommunicationGroup:w}=KX(),_=n.useCallback((()=>{i(!1),c(!1),y(!1),x(!1),r(!1)}),[i,c,y,x,r]);return n.useEffect((()=>{if(o&&window.UIEditor&&f?.communicationGroupId&&window.StripoEditorApi?.actionsApi){window.StripoEditorApi.actionsApi.compileEmail({callback:function(e,t){e||(w({groupId:f.communicationGroupId,params:{emailHtmlBody:t}}),x(!0))},minimize:!0,mergeTags:[],forceAmp:!1,resetDataSavedFlag:!1,disableLineHeightsReplace:!0});window.StripoEditorApi.actionsApi.save((function(e){e||y(!0)}))}}),[o,p,i,r,f,w]),n.useEffect((()=>{(async()=>{v&&b&&(window.UIEditor&&window.UIEditor.removeEditor(),_())})()}),[v,b,r,i,_]),n.useEffect((()=>{l&&(window.UIEditor&&window.UIEditor.removeEditor(),_())}),[l,_]),n.useEffect((()=>{m?.businessId&&p.current&&f&&(d.current||(_te({emailId:f.communicationGroupId,html:f.html||"<div></div>",css:f.css||"",container:p.current,businessId:m.businessId,mergeFields:s.mergeFields||[],updatedFromDefault:f.updatedFromDefault}).catch((e=>{})),d.current=!0))}),[m,s,f]),t.jsx("div",h||g||!m||!f?{className:"w-full h-full flex flex-col items-center justify-center",children:t.jsx(hZ,{text:["Loading editor..."]})}:{className:"w-full h-full flex flex-col",children:t.jsx(xte,{containerRef:p,stripoDialogDimensions:a,showSaving:o})})},Ete=({mergeFieldsResponse:e})=>{const r=sZ(),o=aZ(),{updateCommunicationGroup:i}=KX(),{refetchAutomation:a}=ke(o?.id||""),{channelSenders:s}=w9(),{channelAccounts:l}=b9(),{updateChannelSender:c}=_9(),{state:{selectedActionId:u}}=n.useContext(VX),[d,p]=n.useState(!1),[f,h]=n.useState(r?.emailChannelSenderId||null),[m,g]=n.useState(r?.emailSubject||null),[v,y]=n.useState(r?.emailPreviewText||null),[b,x]=n.useState(r?.emailHtmlBody||null),[w,_]=n.useState(!1),[S,E]=n.useState(!1),[T,C]=n.useState(!1),[A,N]=n.useState(""),[R,O]=n.useState(""),[P,k]=n.useState(null),[M,j]=n.useState(!1),L=n.useRef(!0),[D,I]=n.useState(!0),[F,U]=n.useState(!1),[$,V]=n.useState({width:0,height:0}),[B,z]=n.useState(null),H=S9(m,500),q=S9(v,500),G=S9(A,500),K=S9(R,500),W=n.useMemo((()=>s?.results?.filter((e=>e.channelSenderMetadata.userPart))?.flatMap((e=>{const t=l?.results?.find((t=>t.id===e.channelAccountId));return t&&t.channelAccountMetadata.type===x9.REACH_MANAGED?[{channelSenderId:e.id,fullDomain:`${e.channelSenderMetadata.userPart}@${e.channelSenderMetadata.baseDomain}`}]:[]}))||[]),[s?.results,l?.results]),Y=n.useMemo((()=>({width:800,height:400})),[]),X=n.useRef(null);return n.useEffect((()=>{const e=setTimeout((()=>{L.current=!1}),500);return()=>clearTimeout(e)}),[]),n.useEffect((()=>{r?.emailHtmlBody&&x(r.emailHtmlBody)}),[r?.emailHtmlBody,a]),n.useEffect((()=>{if(d){const e=setTimeout((()=>{p(!1)}),2e3);return()=>clearTimeout(e)}}),[d]),n.useEffect((()=>{const e=()=>{V({width:window.innerWidth,height:window.innerHeight})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),n.useEffect((()=>{if(!L.current&&f&&H&&b&&r?.id){p(!0);(async()=>{try{i({groupId:r.id,params:{emailChannelSenderId:f,emailHtmlBody:b,emailSubject:H,...q&&{emailPreviewText:q}}})}catch(e){}finally{p(!1)}})()}}),[f,H,q,b,r?.id,i]),n.useEffect((()=>{if(s?.results&&f){const e=s.results.find((e=>e.id===f));e&&(F&&!D||O(e.channelSenderMetadata.emailReplyTo),D&&N(e.channelSenderMetadata.emailFromName),I(!1))}}),[s?.results,f,F,D]),n.useEffect((()=>{if(s?.results&&!f){const e=s.results.filter((e=>e.channelSenderMetadata.userPart));if(e[0]){const t=e[0];h(t.id),i({groupId:r?.id||"",params:{emailChannelSenderId:t.id}})}}}),[s?.results,f,r?.id,i]),n.useEffect((()=>{if(!L.current&&G&&f){z("fromName");(async()=>{try{const e=s?.results?.find((e=>e.id===f));e&&await c({id:f,toUpdate:{channelSenderMetadata:{...e.channelSenderMetadata,emailFromName:G}}})}catch(e){}finally{z(null)}})()}}),[G,s?.results,f,c]),n.useEffect((()=>{if(K){const e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(K),t=/\p{Emoji}/u.test(K);k(t?"Emojis are not allowed in email addresses":e?null:"Please enter a valid email address")}else k(null)}),[K]),n.useEffect((()=>{const e=async e=>{try{const t=s?.results?.find((t=>t.id===e.fromEmail));t&&c({id:e.fromEmail,toUpdate:{channelSenderMetadata:{...t.channelSenderMetadata,emailReplyTo:e.debouncedReplyToEmail}}})}catch(t){}finally{z(null)}};L.current||!f||P||(z("replyToEmail"),e(K?{fromEmail:f,debouncedReplyToEmail:K}:{fromEmail:f,debouncedReplyToEmail:null}))}),[K,s?.results,f,c,P]),n.useEffect((()=>{!1===w&&r?.id&&a()}),[w,r?.id,a]),l&&s&&u?t.jsxs("div",{className:"relative",children:[t.jsx(_B,{open:M,onOpenChange:j,children:t.jsxs(TB,{className:"max-h-[86vh] gap-0 overflow-visible max-w-3xl w-full h-full",children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Email Preview Help"}),t.jsx(RB,{children:"Learn more about the email preview and how to use it to create your email."})]}),t.jsx(yte,{})]})}),t.jsx(_B,{open:w,onOpenChange:_,children:t.jsxs(TB,{className:"min-w-[100vw] min-h-[100vh]",hideCloseButton:!0,onEscapeKeyDown:e=>{e.preventDefault()},children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Email Editor"}),t.jsx(RB,{children:"Learn more about the email editor and how to use it to create your email."})]}),t.jsxs("div",{className:"w-full h-full",children:[t.jsxs("div",{className:"flex justify-between items-center p-1 border-b",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Email Editor"}),t.jsx(T9,{title:"Click to learn more about email template ",onClick:()=>j(!0)})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(vZ,{variant:"destructive",onClick:()=>{C(!0)},className:"text-sm px-3 py-1 rounded",children:"Cancel"}),t.jsx(vZ,{onClick:()=>E(!0),className:"text-sm px-3 py-1 rounded",children:"Save"})]})]}),t.jsx("div",{className:" w-full",children:o&&t.jsx(Ste,{cancelClicked:T,setCancelClicked:C,showStripoEditor:w,automation:o,setShowStripoEditor:_,saveClicked:S,setSaveClicked:E,stripoDialogDimensions:$,mergeFieldsResponse:e,actionId:u})})]})]})}),t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx(L9,{children:"From Email"}),t.jsxs(cte,{onValueChange:e=>{h(e),I(!0),U(!1)},value:f??void 0,disabled:d,children:[t.jsx(dte,{children:t.jsx(ute,{placeholder:"Select email",className:"text-muted-foreground",children:f?W?.find((e=>e.channelSenderId===f))?.fullDomain:""})}),t.jsx(hte,{children:W?.map((e=>t.jsx(mte,{value:e.channelSenderId,children:e.fullDomain},e.channelSenderId)))})]})]}),t.jsxs("div",{children:[t.jsx(L9,{children:t.jsxs("div",{className:"flex items-center gap-2 py-1",children:["From Name",t.jsx(T9,{title:"This will be the friendly name of the sender that the customer will see in the inbox",alertText:"Changes to the sender name will be applied across all emails using this address"})]})}),t.jsx(q3,{placeholder:"Enter from name",value:A??"",onChange:e=>N(e.target.value),className:"text-muted-foreground",disabled:d&&"fromName"!==B||!f||D})]}),t.jsxs("div",{children:[t.jsx(L9,{children:t.jsxs("div",{className:"flex items-center gap-2 py-1",children:["Reply To Email",t.jsx(T9,{title:"This will be the email address that customer can reply to on the email",alertText:"Changes to the reply to email will be applied across all emails using this address"})]})}),t.jsx(q3,{placeholder:"Enter reply to email",value:R??"",className:"text-muted-foreground",onChange:e=>{O(e.target.value),F||U(!0)},disabled:d&&"replyToEmail"!==B||!f||D}),P&&t.jsx("p",{className:"text-sm text-red-500 mt-1",children:P})]}),t.jsxs("div",{children:[t.jsx(L9,{children:"Subject"}),t.jsx(q3,{placeholder:"Enter email subject",className:"text-muted-foreground",value:m??"",onChange:e=>g(e.target.value),disabled:d||D})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2 py-1",children:[t.jsx(L9,{children:"Preview Text"}),t.jsx(T9,{title:"This text will be used for the preview text of the email in the inbox"})]}),t.jsx(q3,{placeholder:"Enter preview text",className:"text-muted-foreground",value:v??"",onChange:e=>y(e.target.value),disabled:d||D})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 h-full flex flex-col",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h3",{className:"font-medium",children:"Preview"}),t.jsxs("div",{children:[t.jsx(vZ,{onClick:()=>_(!0),className:"text-sm px-3 py-1 rounded",disabled:d||0===(W?.length??0),children:"Edit"}),0===(W?.length??0)&&t.jsx("div",{className:"relative inline-block",children:t.jsx("div",{className:"absolute right-0 top-full mt-2 w-64 p-3 bg-white border rounded-lg shadow-lg z-10",children:t.jsx(bte,{type:"email"})})})]})]}),t.jsx("div",{className:"flex-1 w-full overflow-auto",ref:X,style:{height:"400px"},children:t.jsx(vte,{html:b??"",height:Y.height,width:Y.width})})]})]})]}):t.jsx("div",{className:"flex justify-center items-center flex-1 h-full bg-white rounded-2xl w-full border border-gray-200 p-6 space-y-4 relative",children:t.jsx(hZ,{text:["Fetching Email Preview..."]})})};function Tte(e){const t=i.useRef({value:e,previous:e});return i.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}var Cte="Checkbox",[Ate,Nte]=UQ(Cte),[Rte,Ote]=Ate(Cte),Pte=i.forwardRef(((e,n)=>{const{__scopeCheckbox:r,name:o,checked:a,defaultChecked:s,required:l,disabled:c,value:u="on",onCheckedChange:d,form:p,...f}=e,[h,m]=i.useState(null),g=XU(n,(e=>m(e))),v=i.useRef(!1),y=!h||(p||!!h.closest("form")),[b=!1,x]=BQ({prop:a,defaultProp:s,onChange:d}),w=i.useRef(b);return i.useEffect((()=>{const e=h?.form;if(e){const t=()=>x(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[h,x]),t.jsxs(Rte,{scope:r,state:b,disabled:c,children:[t.jsx(WQ.button,{type:"button",role:"checkbox","aria-checked":Lte(b)?"mixed":b,"aria-required":l,"data-state":Dte(b),"data-disabled":c?"":void 0,disabled:c,value:u,...f,ref:g,onKeyDown:FQ(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:FQ(e.onClick,(e=>{x((e=>!!Lte(e)||!e)),y&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())}))}),y&&t.jsx(jte,{control:h,bubbles:!v.current,name:o,value:u,checked:b,required:l,disabled:c,form:p,style:{transform:"translateX(-100%)"},defaultChecked:!Lte(s)&&s})]})}));Pte.displayName=Cte;var kte="CheckboxIndicator",Mte=i.forwardRef(((e,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=e,a=Ote(kte,r);return t.jsx(T1,{present:o||Lte(a.state)||!0===a.state,children:t.jsx(WQ.span,{"data-state":Dte(a.state),"data-disabled":a.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...e.style}})})}));Mte.displayName=kte;var jte=e=>{const{control:n,checked:r,bubbles:o=!0,defaultChecked:a,...s}=e,l=i.useRef(null),c=Tte(r),u=t1(n);i.useEffect((()=>{const e=l.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==r&&n){const t=new Event("click",{bubbles:o});e.indeterminate=Lte(r),n.call(e,!Lte(r)&&r),e.dispatchEvent(t)}}),[c,r,o]);const d=i.useRef(!Lte(r)&&r);return t.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??d.current,...s,tabIndex:-1,ref:l,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Lte(e){return"indeterminate"===e}function Dte(e){return Lte(e)?"indeterminate":e?"checked":"unchecked"}var Ite=Pte,Fte=Mte;const Ute=({selectedChannels:e,setSelectedChannels:n,hasEmailChannelSenders:r,hasSmsChannelSenders:o,automationType:i})=>{const{toast:a}=jl(),s=[...r?[{label:"Email",value:"email",icon:wZ.EmailIcon,checked:e.includes("email")}]:[],...o?[{label:"SMS",value:"sms",icon:wZ.SmsIcon,checked:e.includes("sms")}]:[]];return t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-xl font-medium",children:"Message Types"}),t.jsx("p",{className:"text-gray-600 mb-2 text-sm",children:"Select the channels you want to use in this automation"})]}),t.jsx("div",{className:"w-full grid grid-cols-2 gap-3",children:s.map((r=>t.jsxs(Ite,{checked:r.checked,onCheckedChange:()=>{"email"===r.value?e.includes("email")?e.includes("sms")?n(["sms"]):a({title:"Cant Remove Email",description:`At least one channel is required for an ${i===Fe.ONE_TIME?ff("engage:one_time").toLowerCase():ff("engage:automation").toLowerCase()}`,variant:"destructive"}):n([...e,"email"]):e.includes("sms")?e.includes("email")?n(["email"]):a({title:"Cant Remove SMS",description:`At least one channel is required for an ${i===Fe.ONE_TIME?ff("engage:one_time").toLowerCase():ff("engage:automation").toLowerCase()}`,variant:"destructive"}):n([...e,"sms"])},className:"relative ring-[1px] ring-border rounded-lg px-4 py-3 text-start text-muted-foreground data-[state=checked]:ring-2 data-[state=checked]:ring-primary data-[state=checked]:font-medium",children:[t.jsx(r.icon,{className:"mb-3",size:20}),t.jsx("span",{className:"font-medium tracking-tight",children:r.label}),t.jsx(Fte,{className:"absolute top-2 right-2",children:t.jsx(bu,{className:"fill-primary text-primary-foreground"})})]},r.value)))})]})},$te=async()=>(await Re(s)).data,Vte=["me"],Bte=()=>ve({queryKey:Vte,queryFn:$te,..._e}),zte=()=>{const e=ce(),t=Bte(),n=ye({mutationFn:e=>(async e=>(await Re(s,{method:"PATCH",body:JSON.stringify({website:e})})).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:Vte})}}),r=ye({mutationFn:e=>(async e=>(await Re(s,{method:"PATCH",body:JSON.stringify({locations:e})})).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:Vte})}}),o=ye({mutationFn:e=>(async e=>(await Re(s,{method:"PATCH",body:JSON.stringify({branding:e})})).data)(e),onSuccess:()=>{e.invalidateQueries({queryKey:Vte})}});return{data:t.data,isLoading:t.isLoading,error:t.error,refetch:t.refetch,updateWebsite:n.mutate,updateLocations:r.mutate,updateBrandSettings:o.mutate,isUpdatingWebsite:n.isPending,isUpdatingLocations:r.isPending,isUpdatingBrandSettings:o.isPending}},Hte=i.forwardRef((({className:e,...n},r)=>t.jsx("textarea",{className:Zd("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n})));Hte.displayName="Textarea";const qte=e=>{const{companyName:t,smsBody:n}=e;return t&&n?`${t}:\n${n}`:n??""},Gte=({body:e})=>t.jsx("div",{className:"sms-preview-outer @container",children:t.jsxs("div",{className:"sms-phone-mockup",children:[t.jsx("div",{className:"sms-phone-notch"}),t.jsx("div",{className:"sms-phone-inner",children:t.jsx("div",{className:"sms-message-row",children:t.jsx("div",{className:"sms-message-bubble",children:e})})}),t.jsx("div",{className:"sms-phone-home-indicator"})]})}),Kte=({mergeFieldsResponse:e,smsChannelSenders:r})=>{const o=aZ(),i=sZ(),a=n.useCallback((()=>{const e=o?.actionData?.find((e=>"send_communication"===e.actionType&&e.actionMetadata.communicationGroupId===i?.id));return e?.actionMetadata.communicationGroupId}),[o?.actionData,i?.id]),{channelSenders:s}=w9(),{data:l,isLoading:c}=Bte(),{channelAccounts:u}=b9(),{updateCommunicationGroup:d}=KX(),[p,f]=n.useState(!1),[h,m]=n.useState(""),[g,v]=n.useState(null),[y,b]=n.useState(!1),[x,w]=n.useState(null),[_,S]=n.useState(null),[E,T]=n.useState(!1),C=n.useRef(null),A=S9(_,1e3),N=S9(g,1e3),R=S9(x,1e3);n.useEffect((()=>{if(null!==N&&null!==A&&!p){f(!0);const e=a();e&&d({groupId:e,params:{smsChannelSenderId:N,smsMessageBody:A,textMessageCompanyName:R}}),f(!1)}}),[N,A,R,p,d,a]),n.useEffect((()=>{i&&(v(i.smsChannelSenderId),S(i.smsMessageBody),i.textMessageCompanyName&&w(i.textMessageCompanyName))}),[i]);return n.useEffect((()=>{if(void 0!==s&&!g){const e=s.results.filter((e=>e.channelSenderMetadata.from||e.channelSenderMetadata.messageServiceSid));e?.[0]&&(v(e[0].id),i?.id&&d({groupId:i.id,params:{smsChannelSenderId:e[0].id}}))}}),[s,g,i?.id,d]),n.useEffect((()=>{x||!l?.name||y||(b(!0),w(l.name))}),[x,l?.name,y]),u&&s&&!c?t.jsxs("div",{children:[t.jsx(_B,{open:E,onOpenChange:T,children:t.jsxs(TB,{children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"SMS Editor"}),t.jsx(RB,{children:"Learn more about the SMS editor and how to use it to create your SMS."})]}),t.jsxs("div",{className:"",children:[t.jsx(Hte,{ref:C,className:"min-h-[300px]",placeholder:"Text message content...",value:_??"",onChange:e=>{S(e.target.value)},maxLength:1600-(x?.length||0)}),t.jsxs("div",{className:"mt-2 flex items-center justify-end gap-2",children:[t.jsxs(cte,{value:h,onValueChange:e=>{const t=C.current,n=_||"",r=t?.selectionStart??n.length,o=t?.selectionEnd??n.length,i=n.slice(0,r)+e+n.slice(o);S(i),m(""),setTimeout((()=>{const n=r+e.length;t?.focus(),t?.setSelectionRange(n,n)}),0)},children:[t.jsx(dte,{className:"w-[50px]",children:t.jsx(wZ.MergeField,{className:"w-4 h-4 text-primary"})}),t.jsx(hte,{children:e?.mergeFields?.map((e=>e.entries.map((e=>t.jsx(mte,{value:e.value,children:e.label},e.value))))).flat()})]}),t.jsx(T9,{title:"Dynamic content is a way to insert dynamic content into your messages such as the customer's name, email, or other details."})]}),t.jsxs("div",{className:"flex justify-end mt-2 text-sm transition-colors duration-300 "+(_&&_.length>1400?_.length>=1600?"text-red-500":"text-amber-500":"text-gray-500"),children:[_?_.length:0,"/",1600-(x?.length||0)," ","characters"]})]})]})}),t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx(L9,{children:"From Number"}),t.jsxs(cte,{onValueChange:e=>{v(e)},value:g??void 0,children:[t.jsx(dte,{children:t.jsx(ute,{placeholder:"Select number",children:g?(O=g,r?.find((e=>e.id===O))?.channelSenderMetadata.friendlyName??r?.find((e=>e.id===O))?.channelSenderMetadata.from??O):"Select number"})}),t.jsx(hte,{children:r?.map((e=>t.jsx(mte,{value:e.id,children:e.channelSenderMetadata.friendlyName??e.channelSenderMetadata.from??"Select number"},e.id)))})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2 py-1",children:[t.jsx(L9,{children:"Company Name"}),t.jsx(T9,{title:"Adding your company name can help customers identify who they are talking to"})]}),t.jsx(q3,{placeholder:"Enter company name",value:x??"",className:"text-muted-foreground",onChange:e=>{w(e.target.value??null)},disabled:!g})]})]}),t.jsxs("div",{className:"border rounded-lg p-4",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h3",{className:"font-medium",children:"Preview"}),t.jsx("div",{children:t.jsx(vZ,{onClick:()=>T(!0),className:"text-sm px-3 py-1 rounded ",disabled:0===(r?.length??0),children:"Edit"})})]}),t.jsx("div",{children:g?t.jsx(t.Fragment,{children:g&&_?t.jsx(Gte,{body:qte({companyName:x??void 0,smsBody:_})}):t.jsx(gte,{type:"sms"})}):t.jsx(bte,{type:"sms"})})]})]})]}):t.jsx("div",{children:t.jsx(hZ,{text:["Loading..."]})});var O};var Wte=(e=>(e.CUSTOM="custom",e.MANAGED="managed",e))(Wte||{}),Yte=(e=>(e.EditAudience="edit-audience",e.EditTime="edit-time",e))(Yte||{});const Xte=({title:e,type:r})=>{const o=sZ(),i=aZ(),{toast:a}=jl(),s=ce(),[l,c]=n.useState(!1),[u,p]=n.useState(!1),f=!!o&&(o.type===Wte.MANAGED&&("sms"===r?o.updatedFromDefault?.text_message_body:o.updatedFromDefault?.email_text_body||o.updatedFromDefault?.email_html_body));return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h4",{className:"text-xl font-medium",children:e}),t.jsx("div",{className:"flex items-center gap-2",children:f&&t.jsx(t.Fragment,{children:l?t.jsx(hZ,{}):t.jsx(vZ,{variant:"outline",size:"sm",onClick:()=>p(!0),children:"Reset To Default"})})})]}),t.jsx(_B,{open:u,onOpenChange:p,children:t.jsxs(TB,{className:"sm:max-w-[425px]",children:[t.jsxs(CB,{children:[t.jsx(NB,{className:"text-xl font-semibold",children:"Reset to Default"}),t.jsxs(RB,{className:"text-base text-muted-foreground",children:["Are you sure you want to reset this"," ","email"===r?"email":"SMS"," template to its default state? This action cannot be undone."]})]}),t.jsxs(AB,{className:"flex flex-row justify-end gap-3 mt-6",children:[t.jsx(vZ,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),t.jsx(vZ,{variant:"destructive",onClick:async()=>{o&&i?(c(!0),await(async e=>{const{communicationGroupId:t,automationId:n,type:r}=e;return(await Re(`${d}/${t}/${n}/reset`,{method:"POST",body:JSON.stringify({type:r})})).data})({communicationGroupId:o.id,automationId:i.id,type:r}),s.invalidateQueries({queryKey:qX.all}),s.invalidateQueries({queryKey:dZ.templates()}),a({title:"Communication reset to default!"}),c(!1),p(!1)):a({title:"Error resetting communication",description:"Please contact your administrator",variant:"destructive"})},children:"Reset to Default"})]})]})})]})},Zte=({getExtraMergeFields:e})=>{const[r,o]=n.useState(null),i=n.useRef(null),{toast:a}=jl(),s=sZ(),{channelSenders:l}=w9(),{channelAccounts:c}=b9(),{updateCommunicationGroup:u}=KX(),d=aZ(),{getMergeFields:p,isGetting:f}=(e=>{const t=ve({queryKey:["merge-fields",e],queryFn:()=>HX(e)});return{getMergeFields:t.data,isGetting:t.isPending,getError:t.error,isGetSuccess:t.isSuccess}})(s?.id??void 0),[h,m]=n.useState(void 0);n.useEffect((()=>{const e=s?.id;e&&r&&(r.includes("email")||null===s?.emailChannelSenderId||u({groupId:e,params:{emailChannelSenderId:null}}),r.includes("sms")||null===s?.smsChannelSenderId||u({groupId:e,params:{smsChannelSenderId:null}}))}),[r,u,s]),n.useEffect((()=>{const e=s?.id;e||r||o(["email"])}),[d,s,r]);const g=n.useCallback((e=>{const t=[];e.emailChannelSenderId&&t.push("email"),e.smsChannelSenderId&&t.push("sms"),0===t.length&&t.push("email"),o(t)}),[]);n.useEffect((()=>{s&&!r&&g(s)}),[s,g,r]),n.useEffect((()=>{f||void 0===h&&(e?e().then((e=>{s?.id&&(g(s),u({groupId:s?.id,params:{extraMergeFields:e}},{onSuccess:async()=>{try{const e=await HX(s?.id);m(e)}catch{a({title:"Error saving merge fields!",description:"Please contact your administrator if this issue persists.",variant:"destructive"})}},onError:e=>{a({title:"Error saving merge fields!",description:"Please contact your administrator if this issue persists.",variant:"destructive"})}}))})):m(p))}),[e,u,s,a,f,p,h,g]);const v=n.useMemo((()=>l?.results?.filter((e=>e.channelSenderMetadata.userPart))?.flatMap((e=>{const t=c?.results?.find((t=>t.id===e.channelAccountId));return t&&t.channelAccountMetadata.type===x9.REACH_MANAGED?[{channelSenderId:e.id,fullDomain:`${e.channelSenderMetadata.userPart}@${e.channelSenderMetadata.baseDomain}`}]:[]}))||[]),[l?.results,c?.results]),y=n.useMemo((()=>l?.results.filter((e=>e.channelSenderMetadata.from||e.channelSenderMetadata.messageServiceSid))),[l?.results]);if(!r||f||!h||!v||!y)return t.jsx("div",{className:"flex justify-center items-center flex-1 h-full bg-white rounded-2xl w-full border border-gray-200 p-6 space-y-4 relative",children:t.jsx(hZ,{text:["Fetching Content..."]})});const b=v.length>0,x=y.length>0;return t.jsxs("div",{className:"flex flex-col gap-4 flex-shrink-0",children:[t.jsx("div",{className:"bg-white rounded-2xl w-full border border-gray-200 p-6 space-y-4 relative",children:t.jsx(Ute,{automationType:d?.triggerMetadata?.triggerType,selectedChannels:r,setSelectedChannels:o,hasEmailChannelSenders:b,hasSmsChannelSenders:x})}),r.includes("email")&&t.jsxs("div",{className:"bg-white rounded-2xl w-full border border-gray-200 p-6 space-y-4 relative",ref:i,children:[t.jsx(Xte,{title:"Email Campaign",type:"email"}),t.jsx(Ete,{mergeFieldsResponse:h,emailChannelSendersWithChannelAccounts:v})]}),r.includes("sms")&&t.jsxs("div",{className:"bg-white rounded-2xl w-full border border-gray-200 p-6 space-y-4 relative",children:[t.jsx(Xte,{title:"SMS Campaign",type:"sms"}),t.jsx(Kte,{mergeFieldsResponse:h,smsChannelSenders:y})]})]})},Qte=({content:e,className:n})=>t.jsx("div",{className:wB("flex flex-col gap-4 w-full p-6",n),children:t.jsx("div",{className:"bg-white rounded-2xl w-full border border-gray-200 p-6 relative",children:e})}),Jte=e=>e.friendlyName||e.from||e.messageServiceSid||"Unknown Sender";function ene(e,t){throw new Error(`Unreachable case statement: ${JSON.stringify(e)}. Valid values are: ${Object.values(t).join(", ")}`)}function tne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function nne(e,n=[]){let r=[];const o=()=>{const t=r.map((e=>i.createContext(e)));return function(n){const r=n?.[e]||t;return i.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return o.scopeName=e,[function(n,o){const a=i.createContext(o),s=r.length;r=[...r,o];const l=n=>{const{scope:r,children:o,...l}=n,c=r?.[e]?.[s]||a,u=i.useMemo((()=>l),Object.values(l));return t.jsx(c.Provider,{value:u,children:o})};return l.displayName=n+"Provider",[l,function(t,r){const l=i.useContext(r?.[e]?.[s]||a);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},rne(o,...n)]}function rne(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return i.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function one(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ine(...e){return t=>{let n=!1;const r=e.map((e=>{const r=one(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():one(e[t],null)}}}}function ane(...e){return i.useCallback(ine(...e),e)}function sne(e){const n=lne(e),r=i.forwardRef(((e,r)=>{const{children:o,...a}=e,s=i.Children.toArray(o),l=s.find(une);if(l){const e=l.props.children,o=s.map((t=>t===l?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t));return t.jsx(n,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})}));return r.displayName=`${e}.Slot`,r}function lne(e){const t=i.forwardRef(((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?ine(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var cne=Symbol("radix.slottable");function une(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===cne}var dne=globalThis?.document?i.useLayoutEffect:()=>{},pne=i[" useId ".trim().toString()]||(()=>{}),fne=0;function hne(e){const[t,n]=i.useState(pne());return dne((()=>{n((e=>e??String(fne++)))}),[e]),e||(t?`radix-${t}`:"")}var mne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,n)=>{const r=sne(`Primitive.${n}`),o=i.forwardRef(((e,o)=>{const{asChild:i,...a}=e,s=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(s,{...a,ref:o})}));return o.displayName=`Primitive.${n}`,{...e,[n]:o}}),{});var gne=i[" useInsertionEffect ".trim().toString()]||dne;function vne({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=function({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return gne((()=>{a.current=t}),[t]),i.useEffect((()=>{o.current!==n&&(a.current?.(n),o.current=n)}),[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:o;{const t=i.useRef(void 0!==e);i.useEffect((()=>{const e=t.current;if(e!==l){}t.current=l}),[l,r])}const u=i.useCallback((t=>{if(l){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)}),[l,e,a,s]);return[c,u]}var yne=i.createContext(void 0);function bne(e){const t=i.useContext(yne);return e||t||"ltr"}var xne="rovingFocusGroup.onEntryFocus",wne={bubbles:!1,cancelable:!0},_ne="RovingFocusGroup",[Sne,Ene,Tne]=function(e){const r=e+"CollectionProvider",[o,i]=nne(r),[a,s]=o(r,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:r,children:o}=e,i=n.useRef(null),s=n.useRef(new Map).current;return t.jsx(a,{scope:r,itemMap:s,collectionRef:i,children:o})};l.displayName=r;const c=e+"CollectionSlot",u=sne(c),d=n.forwardRef(((e,n)=>{const{scope:r,children:o}=e,i=ane(n,s(c,r).collectionRef);return t.jsx(u,{ref:i,children:o})}));d.displayName=c;const p=e+"CollectionItemSlot",f="data-radix-collection-item",h=sne(p),m=n.forwardRef(((e,r)=>{const{scope:o,children:i,...a}=e,l=n.useRef(null),c=ane(r,l),u=s(p,o);return n.useEffect((()=>(u.itemMap.set(l,{ref:l,...a}),()=>{u.itemMap.delete(l)}))),t.jsx(h,{[f]:"",ref:c,children:i})}));return m.displayName=p,[{Provider:l,Slot:d,ItemSlot:m},function(t){const r=s(e+"CollectionConsumer",t);return n.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},i]}(_ne),[Cne,Ane]=nne(_ne,[Tne]),[Nne,Rne]=Cne(_ne),One=i.forwardRef(((e,n)=>t.jsx(Sne.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Sne.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Pne,{...e,ref:n})})})));One.displayName=_ne;var Pne=i.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...f}=e,h=i.useRef(null),m=ane(n,h),g=bne(s),[v,y]=vne({prop:l,defaultProp:c??null,onChange:u,caller:_ne}),[b,x]=i.useState(!1),w=function(e){const t=i.useRef(e);return i.useEffect((()=>{t.current=e})),i.useMemo((()=>(...e)=>t.current?.(...e)),[])}(d),_=Ene(r),S=i.useRef(!1),[E,T]=i.useState(0);return i.useEffect((()=>{const e=h.current;if(e)return e.addEventListener(xne,w),()=>e.removeEventListener(xne,w)}),[w]),t.jsx(Nne,{scope:r,orientation:o,dir:g,loop:a,currentTabStopId:v,onItemFocus:i.useCallback((e=>y(e)),[y]),onItemShiftTab:i.useCallback((()=>x(!0)),[]),onFocusableItemAdd:i.useCallback((()=>T((e=>e+1))),[]),onFocusableItemRemove:i.useCallback((()=>T((e=>e-1))),[]),children:t.jsx(mne.div,{tabIndex:b||0===E?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:tne(e.onMouseDown,(()=>{S.current=!0})),onFocus:tne(e.onFocus,(e=>{if(e.target===e.currentTarget&&!S.current&&!b){const t=new CustomEvent(xne,wne);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=_().filter((e=>e.focusable));Lne([e.find((e=>e.active)),e.find((e=>e.id===v)),...e].filter(Boolean).map((e=>e.ref.current)),p)}}S.current=!1})),onBlur:tne(e.onBlur,(()=>x(!1)))})})})),kne="RovingFocusGroupItem",Mne=i.forwardRef(((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:s,children:l,...c}=e,u=hne(),d=s||u,p=Rne(kne,r),f=p.currentTabStopId===d,h=Ene(r),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:v}=p;return i.useEffect((()=>{if(o)return m(),()=>g()}),[o,m,g]),t.jsx(Sne.ItemSlot,{scope:r,id:d,focusable:o,active:a,children:t.jsx(mne.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...c,ref:n,onMouseDown:tne(e.onMouseDown,(e=>{o?p.onItemFocus(d):e.preventDefault()})),onFocus:tne(e.onFocus,(()=>p.onItemFocus(d))),onKeyDown:tne(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:jne[r]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=h().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=p.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>Lne(o)))}var n,r})),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=v}):l})})}));Mne.displayName=kne;var jne={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Lne(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Dne=One,Ine=Mne;var Fne=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return i.useReducer(((e,n)=>t[e][n]??e),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect((()=>{const e=Une(r.current);a.current="mounted"===l?e:"none"}),[l]),dne((()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=Une(t);if(e)c("MOUNT");else if("none"===i||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,c]),dne((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=i=>{const a=Une(r.current).includes(i.animationName);if(i.target===t&&a&&(c("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(a.current=Une(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):i.Children.only(n),a=ane(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?i.cloneElement(o,{ref:a}):null};function Une(e){return e?.animationName||"none"}Fne.displayName="Presence";var $ne="Tabs",[Vne,Bne]=nne($ne,[Ane]),zne=Ane(),[Hne,qne]=Vne($ne),Gne=i.forwardRef(((e,n)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=bne(l),[p,f]=vne({prop:o,onChange:i,defaultProp:a??"",caller:$ne});return t.jsx(Hne,{scope:r,baseId:hne(),value:p,onValueChange:f,orientation:s,dir:d,activationMode:c,children:t.jsx(mne.div,{dir:d,"data-orientation":s,...u,ref:n})})}));Gne.displayName=$ne;var Kne="TabsList",Wne=i.forwardRef(((e,n)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,a=qne(Kne,r),s=zne(r);return t.jsx(Dne,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:t.jsx(mne.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:n})})}));Wne.displayName=Kne;var Yne="TabsTrigger",Xne=i.forwardRef(((e,n)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...a}=e,s=qne(Yne,r),l=zne(r),c=Jne(s.baseId,o),u=ere(s.baseId,o),d=o===s.value;return t.jsx(Ine,{asChild:!0,...l,focusable:!i,active:d,children:t.jsx(mne.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:n,onMouseDown:tne(e.onMouseDown,(e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)})),onKeyDown:tne(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)})),onFocus:tne(e.onFocus,(()=>{d||i||!("manual"!==s.activationMode)||s.onValueChange(o)}))})})}));Xne.displayName=Yne;var Zne="TabsContent",Qne=i.forwardRef(((e,n)=>{const{__scopeTabs:r,value:o,forceMount:a,children:s,...l}=e,c=qne(Zne,r),u=Jne(c.baseId,o),d=ere(c.baseId,o),p=o===c.value,f=i.useRef(p);return i.useEffect((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),t.jsx(Fne,{present:a||p,children:({present:r})=>t.jsx(mne.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!r,id:d,tabIndex:0,...l,ref:n,style:{...e.style,animationDuration:f.current?"0s":void 0},children:r&&s})})}));function Jne(e,t){return`${e}-trigger-${t}`}function ere(e,t){return`${e}-content-${t}`}Qne.displayName=Zne;var tre=Wne,nre=Xne,rre=Qne;const ore=Gne,ire=i.forwardRef((({className:e,...n},r)=>t.jsx(tre,{ref:r,className:Zd("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...n})));ire.displayName=tre.displayName;const are=i.forwardRef((({className:e,...n},r)=>t.jsx(nre,{ref:r,className:Zd("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...n})));are.displayName=nre.displayName;const sre=i.forwardRef((({className:e,...n},r)=>t.jsx(rre,{ref:r,className:Zd("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n})));sre.displayName=rre.displayName;const lre=({open:e,onOpenChange:n})=>t.jsx(_B,{open:e,onOpenChange:n,children:t.jsxs(TB,{className:"max-w-[75vw] min-h-[75vh] overflow-y-auto max-h-[90vh]",children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Edit Campaign Content"}),t.jsx(RB,{children:"Edit the content of the campaign"})]}),t.jsx(Zte,{})]})}),cre=()=>t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"w-3 h-3 rounded-full bg-zinc-300 border border-zinc-300 shadow-sm"}),t.jsx("span",{className:"w-3 h-3 rounded-full bg-zinc-300 border border-zinc-300 shadow-sm"}),t.jsx("span",{className:"w-3 h-3 rounded-full bg-zinc-300 border border-zinc-300 shadow-sm"})]}),ure=({children:e,actionButtons:n})=>t.jsxs("div",{className:"flex-1 w-full relative overflow-hidden",children:[t.jsxs("div",{className:"h-full relative w-full rounded-2xl shadow-xl bg-white border border-zinc-200 overflow-hidden min-h-[500px] flex flex-col",style:{containerType:"inline-size"},children:[t.jsxs("div",{className:"flex items-center space-x-3 pt-3 px-4 z-10 w-full justify-between",children:[t.jsx(cre,{}),n&&t.jsx("div",{className:"flex items-center space-x-2",children:n})]}),e]}),t.jsx("div",{className:"text-center text-sm text-muted-foreground mt-4",children:t.jsx("p",{children:"These previews show exactly how your messages will appear to your customers"})})]}),dre=()=>{const e=aZ(),r=sZ(),{channelSenders:o}=w9(),{channelAccounts:i}=b9(),a=n.useMemo((()=>o?.results?.filter((e=>e.channelSenderMetadata.userPart))?.flatMap((e=>{const t=i?.results?.find((t=>t.id===e.channelAccountId));return t&&t.channelAccountMetadata.type===x9.REACH_MANAGED?[{channelSenderId:e.id,fullDomain:`${e.channelSenderMetadata.userPart}@${e.channelSenderMetadata.baseDomain}`,channelSenderMetadata:e.channelSenderMetadata}]:[]}))||[]),[o?.results,i?.results]),s=r?.emailChannelSenderId;if(!(e&&r&&a&&s))return null;const l=a.find((e=>e.channelSenderId===s)),c=l?.fullDomain,u=l?.channelSenderMetadata.emailReplyTo,d=r.emailSubject,p=r.emailPreviewText,f=l?.channelSenderMetadata.emailFromName;return t.jsxs("div",{className:"space-y-1 overflow-hidden",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"text-xs text-muted-foreground leading-none",children:"From"}),t.jsxs("div",{className:"text-base font-medium",children:[c,f&&t.jsxs("span",{className:"text-muted-foreground",children:["<",c,">"]})]})]}),u&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"text-xs text-muted-foreground leading-none",children:"Reply-To"}),t.jsx("div",{className:"text-base font-medium",children:u})]}),d&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"text-xs text-muted-foreground leading-none",children:"Subject"}),t.jsx("div",{className:"text-base font-medium",children:d})]}),p&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"text-xs text-muted-foreground leading-none",children:"Preview Text"}),t.jsx("div",{className:"text-sm font-medium line-clamp-2",children:p})]})]})},pre=({emailBody:e})=>{const[r,o]=n.useState({width:0,height:0}),i=n.useRef(null);return n.useEffect((()=>{const e=()=>{i.current&&requestAnimationFrame((()=>{o({width:i.current?i.current.offsetWidth-75:0,height:i.current?i.current.offsetHeight-75:0})}))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[i]),t.jsxs(ure,{children:[t.jsx("div",{className:"pt-4 pb-2 px-6 flex flex-col gap-1",children:t.jsx("div",{className:"rounded-xl bg-zinc-50/80 shadow-sm border border-zinc-100 p-4",children:t.jsx(dre,{})})}),t.jsx("div",{className:"rounded-lg p-6 bg-white flex-1 min-h-0 flex items-center justify-center",ref:i,children:t.jsx(vte,{html:e,height:r.height,width:r.width})})]})},fre=({expandDialogContent:e})=>{const[r,o]=n.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx(_B,{open:r,onOpenChange:o,children:t.jsxs(TB,{hideCloseButton:!0,className:"w-[80vw] h-[80vh] max-w-none max-h-none bg-transparent border-none",children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Expanded Preview"}),t.jsx(RB,{children:"Expanded view of communication content"})]}),t.jsxs("div",{className:"h-full flex flex-col overflow-hidden rounded-xl",children:[e,t.jsx("div",{className:"absolute top-7 right-7 z-10",children:t.jsx(vZ,{variant:"ghost",size:"sm",onClick:()=>o(!1),children:t.jsx(wZ.CloseButton,{className:"w-4 h-4 text-primary"})})})]})]})}),t.jsx(vZ,{variant:"outline",size:"sm",className:"rounded-lg px-3 py-2 flex items-center gap-2 shadow-sm bg-white/80 hover:bg-zinc-100 border border-zinc-200",onClick:()=>o(!0),children:t.jsx(wZ.ExpandIcon,{className:"w-4 h-4 text-muted-foreground"})})]})},hre=({type:e,disablePreviewSubtext:n=!1})=>{const r="sms"===e?"SMS":"Email";return t.jsx("div",{className:"flex flex-1 w-full h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center justify-center bg-zinc-50/80 border border-zinc-100 rounded-2xl shadow-md px-6 py-12 max-w-[90vw] w-full sm:max-w-md mx-auto text-center",style:{containerType:"inline-size"},children:[t.jsx("sms"===e?wZ.SmsIcon:wZ.EmailIcon,{className:"w-12 h-12 text-zinc-500 mb-4"}),t.jsxs("h2",{className:"text-xl font-semibold text-zinc-800 mb-2",children:["No ",r," Content Yet"]}),!n&&t.jsxs("p",{className:"text-zinc-500 text-base mb-1",children:["Click"," ",t.jsx("span",{className:"font-medium text-zinc-700",children:"Edit content"})," to start crafting your ",r," message."]})]})})},mre=({onClick:e})=>t.jsxs(vZ,{variant:"outline",size:"sm",className:"rounded-lg px-3 py-2 flex items-center gap-2 shadow-sm bg-white/80 hover:bg-zinc-100 border border-zinc-200",onClick:e,children:[t.jsx(wZ.PreviewButton,{className:"w-4 h-4"}),t.jsx("span",{className:"font-medium text-sm",children:"Preview"})]}),gre=e=>/^[^\s@.]+(?:\.[^\s@.]+)*@[^\s@.]+(?:\.[^\s@.]+)+$/.test(e),vre=e=>{if(!/^[0-9\s()+.-]+$/.test(e))return!1;const t=e.replace(/\D/g,"");return e.startsWith("+")?t.length>=10&&t.length<=15:10===t.length||!(11!==t.length||!t.startsWith("1"))},yre=({automation:e,type:r,setOpenSendPreviewPopup:o})=>{const[i,a]=n.useState(""),[s,l]=n.useState(""),[c,u]=n.useState(null),[d,p]=n.useState(!1),{sendTestCommunication:f,sendError:h,isSendSuccess:m}=WX(),{toast:g}=jl(),v=e.actionData?.find((e=>"send_communication"===e.actionType)),y=v?.actionMetadata.communicationGroupId,{communicationGroup:b,isGetting:x}=GX(y??void 0),w=n.useCallback((()=>{if(!y)return Promise.resolve(null);if(!b)return Promise.reject(new Error("Communication group not loaded"));switch(r){case"email":return Promise.resolve(b.emailChannelSenderId);case"sms":return Promise.resolve(b.smsChannelSenderId);default:return Promise.reject(new Error(`Unsupported type: ${r}`))}}),[b,r,y]);n.useEffect((()=>{(async()=>{try{const e=await w();u(e)}catch(e){u(null)}finally{p(!0)}})()}),[w]),n.useEffect((()=>{m&&(g({title:"Success",description:`Preview ${"email"===r?"email":"SMS"} sent successfully!`}),o(!1))}),[m,r,o,g]),n.useEffect((()=>{h&&(g({title:"Error",description:`Failed to send preview: ${h.message}`,variant:"destructive"}),o(!1))}),[h,g,o]);return!d||x?t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsx(hZ,{text:["Fetching sender id","Finishing up"]})}):c?t.jsxs("div",{className:"",children:[t.jsxs("h3",{className:"text-xl font-semibold text-gray-900 mb-4",children:["Send Preview ","email"===r?"Email":"SMS"]}),t.jsx(q3,{type:"email"===r?"email":"tel",placeholder:"email"===r?"Enter email address":"Enter phone number",value:i,onChange:e=>{a(e.target.value),l("")},className:"w-full px-3 py-3 border border-gray-300 rounded-lg text-base mb-4 \n focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent\n placeholder-gray-400"}),s&&t.jsx("p",{className:"text-red-500 text-sm mb-4 -mt-2",children:s}),t.jsx(vZ,{onClick:()=>{if(!("email"===r?gre(i):vre(i)))return void l("Please enter a valid "+("email"===r?"email address":"phone number"));if(!c)return void l("No sender found, please update the automation first!");const t=e.actionData?.find((e=>"send_communication"===e.actionType)),n=t?.actionMetadata.communicationGroupId;if(!n)return Promise.resolve(null);f({id:n,params:"email"===r?{emailAddress:i}:{phoneNumber:i}})},disabled:!i,className:"w-full bg-blue-600 text-white py-3 px-6 rounded-lg font-medium\n hover:bg-blue-700 transition-colors duration-200\n disabled:bg-gray-400 disabled:cursor-not-allowed",children:"Send Preview"})]}):t.jsx("div",{className:"flex justify-center items-center h-full",children:t.jsxs("div",{className:"text-center flex flex-col justify-center items-center gap-2",children:[t.jsx(wZ.AlertCircleIcon,{className:"h-12 w-12 text-gray-400 mb-4"}),t.jsx("h3",{className:"text-lg font-semibold text-gray-700 mb-2",children:"No sender found"}),t.jsx("p",{className:"text-gray-500",children:"Please update the automation to include a sender for this type"})]})})},bre=({open:e,onOpenChange:n,automation:r})=>t.jsx(_B,{open:e,onOpenChange:n,children:t.jsxs(TB,{children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Send Preview Email"}),t.jsx(RB,{children:"Send a preview email to the automation."})]}),t.jsx(yre,{automation:r,type:"email",setOpenSendPreviewPopup:n})]})}),xre=({disablePreview:e=!1,disableEditContent:r=!1,disablePreviewSubtext:o=!1})=>{const i=aZ(),a=sZ(),[s,l]=n.useState({width:0,height:0}),[c,u]=n.useState(!1),[d,p]=n.useState(!1),f=n.useRef(null);if(n.useEffect((()=>{const e=()=>{f.current&&requestAnimationFrame((()=>{l({width:f.current?f.current.offsetWidth-75:0,height:f.current?f.current.offsetHeight-75:0})}))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[f]),!i||!a)return null;const h=a?.emailHtmlBody||"",m=a?.emailChannelSenderId&&h.length>0;return t.jsxs("div",{className:"flex-1 flex flex-col items-center w-full",children:[t.jsx(lre,{open:d,onOpenChange:p}),t.jsx(bre,{open:c,onOpenChange:u,automation:i}),t.jsx(ure,{actionButtons:t.jsx(t.Fragment,{children:t.jsxs("div",{className:"flex items-center space-x-2",children:[!e&&m&&t.jsx(mre,{onClick:()=>u(!0)}),(i.status===Ve.DRAFT||!r)&&t.jsx(vZ,{variant:"outline",size:"sm",className:"rounded-lg px-3 py-2 font-medium text-sm shadow-sm bg-white/80 hover:bg-zinc-100 border border-zinc-200",onClick:()=>p(!0),children:"Edit content"}),m&&t.jsx(fre,{expandDialogContent:t.jsx(pre,{emailBody:h})})]})}),children:m?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pt-4 pb-2 px-6 flex flex-col gap-1",children:t.jsx("div",{className:"rounded-xl bg-zinc-50/80 shadow-sm border border-zinc-100 p-4",children:t.jsx(dre,{})})}),t.jsx("div",{className:"w-full h-[1.5px] bg-zinc-200 my-2"}),t.jsx("div",{className:"flex-1 w-full overflow-auto h-full min-h-[500px]",ref:f,children:t.jsx(vte,{html:h,height:s.height,width:s.width})})]}):t.jsx(hre,{type:"email",disablePreviewSubtext:o})})]})},wre=()=>{const e=aZ(),r=sZ(),{channelSenders:o}=w9(),{channelAccounts:i}=b9(),a=n.useMemo((()=>o?.results.filter((e=>e.channelSenderMetadata.from||e.channelSenderMetadata.messageServiceSid))),[o?.results]),s=a?.find((e=>e.id===r?.smsChannelSenderId));if(!s)return null;if(!(e&&r&&o&&i&&a&&s))return null;const l=s.channelSenderMetadata.friendlyName||s.channelSenderMetadata.from||s.channelSenderMetadata.messageServiceSid;return t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"text-xs text-muted-foreground leading-none",children:"From"}),t.jsx("div",{className:"text-base font-medium font-mono text-zinc-800",children:l})]})})},_re=({smsBody:e})=>t.jsxs(ure,{children:[t.jsx("div",{className:"pt-4 pb-2 px-6 flex flex-col gap-1",children:t.jsx("div",{className:"rounded-xl bg-zinc-50/80 shadow-sm border border-zinc-100 p-4",children:t.jsx(wre,{})})}),t.jsx("div",{className:"rounded-lg p-6 bg-white flex-1 min-h-0 flex items-center justify-center",children:t.jsx(Gte,{body:e})})]}),Sre=({open:e,onOpenChange:n,automation:r})=>t.jsx(_B,{open:e,onOpenChange:n,children:t.jsxs(TB,{children:[t.jsxs(n$,{children:[t.jsx(NB,{children:"Send Preview SMS"}),t.jsx(RB,{children:"Send a preview SMS to the automation."})]}),t.jsx(yre,{automation:r,type:"sms",setOpenSendPreviewPopup:n})]})}),Ere=({disablePreview:e=!1,disableEditContent:r=!1,disablePreviewSubtext:o=!1})=>{const[i,a]=n.useState(!1),s=aZ(),l=sZ(),[c,u]=n.useState(!1);if(!s)return null;const d=l?.smsMessageBody||"",p=l?.smsChannelSenderId&&d.length>0,f=qte({companyName:l?.textMessageCompanyName??void 0,smsBody:d});return t.jsxs("div",{className:"flex flex-col items-center w-full h-full",children:[t.jsx(lre,{open:c,onOpenChange:u}),t.jsx(Sre,{open:i,onOpenChange:a,automation:s}),t.jsx(ure,{actionButtons:t.jsxs(t.Fragment,{children:[!e&&p&&t.jsx(mre,{onClick:()=>a(!0)}),(s.status===Ve.DRAFT||!r)&&t.jsx(vZ,{variant:"outline",size:"sm",className:"rounded-lg px-3 py-2 font-medium text-sm shadow-sm bg-white/80 hover:bg-zinc-100 border border-zinc-200",onClick:()=>u(!0),children:"Edit content"}),p&&t.jsx(fre,{expandDialogContent:t.jsx(_re,{smsBody:f})})]}),children:p?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pt-4 pb-2 px-6 flex flex-col gap-1",children:t.jsx("div",{className:"rounded-xl bg-zinc-50/80 shadow-sm border border-zinc-100 p-4",children:t.jsx(wre,{})})}),t.jsx("div",{className:"w-full h-[1.5px] bg-zinc-200 my-2"}),t.jsx("div",{className:"flex-1 w-full overflow-auto h-full flex items-center justify-center",children:t.jsx(Gte,{body:f})})]}):t.jsx(hre,{type:"sms",disablePreviewSubtext:o})})]})},Tre=({disablePreview:e=!1,disableEditContent:r=!1,disablePreviewSubtext:o=!1,hideSms:i=!1})=>{const[a,s]=n.useState("email"),[l,c]=n.useState(!1),u=sZ();return n.useEffect((()=>{u&&!l&&(s(u.emailChannelSenderId?"email":u.smsChannelSenderId?"sms":"email"),c(!0))}),[u,l]),u?t.jsxs(ore,{value:a,onValueChange:e=>{s(e)},defaultValue:"email",className:"flex flex-col gap-4 pt-4 flex-1 bg-muted rounded-md",children:[t.jsx("div",{className:"max-w-[640px] mx-auto w-full",children:t.jsxs(ire,{className:"grid w-full "+(i?"grid-cols-1":"grid-cols-2"),children:[t.jsx(are,{value:"email",className:"group",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.32'%20d='M6.66683%201.5C4.79999%201.5%203.86657%201.5%203.15353%201.86331C2.52632%202.18289%202.01639%202.69282%201.69681%203.32003C1.3335%204.03307%201.3335%204.96649%201.3335%206.83333V9.16667C1.3335%2011.0335%201.3335%2011.9669%201.69681%2012.68C2.01639%2013.3072%202.52632%2013.8171%203.15353%2014.1367C3.86657%2014.5%204.79999%2014.5%206.66683%2014.5H10.3335C12.2003%2014.5%2013.1338%2014.5%2013.8468%2014.1367C14.474%2013.8171%2014.9839%2013.3072%2015.3035%2012.68C15.6668%2011.9669%2015.6668%2011.0335%2015.6668%209.16667V6.83333C15.6668%204.96649%2015.6668%204.03307%2015.3035%203.32003C14.9839%202.69282%2014.474%202.18289%2013.8468%201.86331C13.1338%201.5%2012.2003%201.5%2010.3335%201.5H6.66683Z'%20fill='%230B66E4'%20/%3e%3cpath%20d='M12.3125%204.86981C12.5278%204.7825%2012.7821%204.85543%2012.916%205.05633C13.05%205.25736%2013.0191%205.52008%2012.8554%205.68524L12.7773%205.74969L12.1103%206.19403C11.0645%206.89127%2010.4559%207.30338%209.79783%207.50164C9.05705%207.72477%208.27301%207.75304%207.52146%207.58563L7.20212%207.50164C6.7086%207.35295%206.24273%207.08397%205.59958%206.66473L4.88962%206.19403L4.22263%205.74969L4.14451%205.68524C3.98082%205.52008%203.95%205.25736%204.08396%205.05633C4.21789%204.85543%204.47213%204.7825%204.68747%204.86981L4.77732%204.91766L5.44431%205.36199L6.16013%205.83563C6.77757%206.23725%207.12913%206.43582%207.49021%206.54461L7.73923%206.60906C8.32376%206.73923%208.93361%206.71818%209.50974%206.54461C9.99112%206.39957%2010.4556%206.09534%2011.5556%205.36199L12.2226%204.91766L12.3125%204.86981Z'%20fill='%230B66E4'%20/%3e%3c/svg%3e",alt:"Email",className:"w-4 h-4 mr-2 hidden group-data-[state=active]:block"}),t.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.32'%20d='M6.66683%201.5C4.79999%201.5%203.86657%201.5%203.15353%201.86331C2.52632%202.18289%202.01639%202.69282%201.69681%203.32003C1.3335%204.03307%201.3335%204.96649%201.3335%206.83333V9.16667C1.3335%2011.0335%201.3335%2011.9669%201.69681%2012.68C2.01639%2013.3072%202.52632%2013.8171%203.15353%2014.1367C3.86657%2014.5%204.79999%2014.5%206.66683%2014.5H10.3335C12.2003%2014.5%2013.1338%2014.5%2013.8468%2014.1367C14.474%2013.8171%2014.9839%2013.3072%2015.3035%2012.68C15.6668%2011.9669%2015.6668%2011.0335%2015.6668%209.16667V6.83333C15.6668%204.96649%2015.6668%204.03307%2015.3035%203.32003C14.9839%202.69282%2014.474%202.18289%2013.8468%201.86331C13.1338%201.5%2012.2003%201.5%2010.3335%201.5H6.66683Z'%20fill='%237A8599'%20/%3e%3cpath%20d='M12.3125%204.86981C12.5278%204.7825%2012.7821%204.85543%2012.916%205.05633C13.05%205.25736%2013.0191%205.52008%2012.8554%205.68524L12.7773%205.74969L12.1103%206.19403C11.0645%206.89127%2010.4559%207.30338%209.79783%207.50164C9.05705%207.72477%208.27301%207.75304%207.52146%207.58563L7.20212%207.50164C6.7086%207.35295%206.24273%207.08397%205.59958%206.66473L4.88962%206.19403L4.22263%205.74969L4.14451%205.68524C3.98082%205.52008%203.95%205.25736%204.08396%205.05633C4.21789%204.85543%204.47213%204.7825%204.68747%204.86981L4.77732%204.91766L5.44431%205.36199L6.16013%205.83563C6.77757%206.23725%207.12913%206.43582%207.49021%206.54461L7.73923%206.60906C8.32376%206.73923%208.93361%206.71818%209.50974%206.54461C9.99112%206.39957%2010.4556%206.09534%2011.5556%205.36199L12.2226%204.91766L12.3125%204.86981Z'%20fill='%237A8599'%20/%3e%3c/svg%3e",alt:"Email",className:"w-4 h-4 mr-2 block group-data-[state=active]:hidden"}),"Email"]})}),!i&&t.jsx(are,{value:"sms",className:"group",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.32'%20d='M7.09967%200.833328C5.6062%200.833328%204.85946%200.833328%204.28903%201.12398C3.78727%201.37964%203.37932%201.78759%203.12366%202.28935C2.83301%202.85978%202.83301%203.60652%202.83301%205.09999V10.9C2.83301%2012.3935%202.83301%2013.1402%203.12366%2013.7106C3.37932%2014.2124%203.78727%2014.6204%204.28903%2014.876C4.85946%2015.1667%205.6062%2015.1667%207.09967%2015.1667H8.89967C10.3931%2015.1667%2011.1399%2015.1667%2011.7103%2014.876C12.2121%2014.6204%2012.62%2014.2124%2012.8757%2013.7106C13.1663%2013.1402%2013.1663%2012.3935%2013.1663%2010.9V5.1C13.1663%203.60652%2013.1663%202.85978%2012.8757%202.28935C12.62%201.78759%2012.2121%201.37964%2011.7103%201.12398C11.1399%200.833328%2010.3931%200.833328%208.89968%200.833328H7.09967Z'%20fill='%230B66E4'%20/%3e%3cpath%20d='M9.43457%2012.1764C9.66223%2012.2232%209.83398%2012.4252%209.83398%2012.6667C9.83398%2012.9082%209.66223%2013.1101%209.43457%2013.1569L9.33398%2013.1667H6.66699C6.39085%2013.1667%206.16699%2012.9428%206.16699%2012.6667C6.16699%2012.3905%206.39085%2012.1667%206.66699%2012.1667H9.33398L9.43457%2012.1764ZM8.08594%203.17058C8.50572%203.21356%208.83382%203.56859%208.83398%203.99968C8.83398%204.45981%208.46009%204.83349%208%204.83366C7.56881%204.8335%207.21375%204.50553%207.1709%204.08562L7.16699%203.99968L7.1709%203.91472C7.2136%203.49464%207.5687%203.16684%208%203.16667L8.08594%203.17058Z'%20fill='%230B66E4'%20/%3e%3c/svg%3e",alt:"SMS",className:"w-4 h-4 mr-2 hidden group-data-[state=active]:block"}),t.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.32'%20d='M7.09967%200.833328C5.6062%200.833328%204.85946%200.833328%204.28903%201.12398C3.78727%201.37964%203.37932%201.78759%203.12366%202.28935C2.83301%202.85978%202.83301%203.60652%202.83301%205.09999V10.9C2.83301%2012.3935%202.83301%2013.1402%203.12366%2013.7106C3.37932%2014.2124%203.78727%2014.6204%204.28903%2014.876C4.85946%2015.1667%205.6062%2015.1667%207.09967%2015.1667H8.89967C10.3931%2015.1667%2011.1399%2015.1667%2011.7103%2014.876C12.2121%2014.6204%2012.62%2014.2124%2012.8757%2013.7106C13.1663%2013.1402%2013.1663%2012.3935%2013.1663%2010.9V5.1C13.1663%203.60652%2013.1663%202.85978%2012.8757%202.28935C12.62%201.78759%2012.2121%201.37964%2011.7103%201.12398C11.1399%200.833328%2010.3931%200.833328%208.89968%200.833328H7.09967Z'%20fill='%237A8599'%20/%3e%3cpath%20d='M9.43457%2012.1764C9.66223%2012.2232%209.83398%2012.4252%209.83398%2012.6667C9.83398%2012.9082%209.66223%2013.1101%209.43457%2013.1569L9.33398%2013.1667H6.66699C6.39085%2013.1667%206.16699%2012.9428%206.16699%2012.6667C6.16699%2012.3905%206.39085%2012.1667%206.66699%2012.1667H9.33398L9.43457%2012.1764ZM8.08594%203.17058C8.50572%203.21356%208.83382%203.56859%208.83398%203.99968C8.83398%204.45981%208.46009%204.83349%208%204.83366C7.56881%204.8335%207.21375%204.50553%207.1709%204.08562L7.16699%203.99968L7.1709%203.91472C7.2136%203.49464%207.5687%203.16684%208%203.16667L8.08594%203.17058Z'%20fill='%237A8599'%20/%3e%3c/svg%3e",alt:"SMS",className:"w-4 h-4 mr-2 block group-data-[state=active]:hidden"}),"SMS"]})})]})}),t.jsxs("div",{className:"max-w-[1000px] mx-auto w-full flex-1",children:[t.jsx(sre,{value:"sms",children:t.jsx(Ere,{disablePreview:e,disableEditContent:r,disablePreviewSubtext:o})}),t.jsx(sre,{value:"email",className:"flex flex-col h-full",children:t.jsx(xre,{disablePreview:e,disableEditContent:r,disablePreviewSubtext:o})})]})]}):t.jsx("div",{className:"flex flex-col gap-4 pt-4 flex-1 bg-muted rounded-md",children:t.jsx(hZ,{text:["Loading..."]})})},Cre="reach-styles-module__h2___J-48W",Are="reach-styles-module__minorText___1TEN6",Nre=({children:e,className:n})=>t.jsx("h2",{className:Zd(Cre,n),children:e}),Rre=({children:e,className:n})=>t.jsx("p",{className:Zd(Are,n),children:e}),Ore=({title:e,children:n,headerActions:r})=>t.jsxs("div",{className:"max-w-[1000px] mx-auto w-full flex-1 flex flex-col gap-4 pt-4",children:[t.jsxs("div",{className:"px-4 flex",children:[t.jsx(Nre,{className:"text-primary",children:e}),r&&t.jsx("div",{className:"ml-auto",children:r})]}),n]}),Pre=()=>t.jsx(Ore,{title:"Preview & Schedule",children:t.jsx(Tre,{disablePreview:!0,disableEditContent:!0,disablePreviewSubtext:!0})}),kre=()=>{const e=aZ(),r=sZ(),{channelSenders:o}=w9(),{channelAccounts:i}=b9(),[a,s]=n.useState(null),[l,c]=n.useState(null),[u,d]=n.useState(null),[p,f]=n.useState(null);return n.useEffect((()=>{o&&d(o),i&&f(i)}),[o,i]),n.useEffect((()=>{if(r&&u&&p){const e=r.emailChannelSenderId,t=r.smsChannelSenderId,n=u.results.find((t=>t.id===e)),o=u.results.find((e=>e.id===t));if(n&&r.emailSubject&&r.emailHtmlBody){const e=n.channelSenderMetadata?.userPart,t=p.results.find((e=>e.id===n.channelAccountId));if(t)switch(t.channelAccountMetadata.type){case x9.REACH_MANAGED:s({fromEmail:`${e}@${t.channelAccountMetadata.baseDomain}.embedreach.com`,fromName:n.channelSenderMetadata?.emailFromName,subject:r.emailSubject,previewText:r.emailPreviewText,body:r.emailHtmlBody});break;case x9.TWILLIO:break;default:throw ene(t.channelAccountMetadata.type,x9)}}o&&r.smsMessageBody&&c({fromPhone:Jte(o.channelSenderMetadata),body:r.smsMessageBody,companyName:r.textMessageCompanyName})}}),[r,u,p]),e?t.jsx("div",a||l?{className:"w-full",children:t.jsx("div",{className:"flex flex-col gap-4 w-full",children:t.jsx(Pre,{})})}:{className:"flex justify-center items-center h-full",children:t.jsx("div",{children:"No preview data Please complete previous steps"})}):t.jsx(hZ,{text:["Loading..."]})};function Mre(e){return(Mre="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jre(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Lre(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Dre(e){Lre(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Mre(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):new Date(NaN)}function Ire(e,t){Lre(2,arguments);var n=Dre(e),r=jre(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function Fre(e,t){Lre(2,arguments);var n=Dre(e),r=jre(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+r+1,0),o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}var Ure={};function $re(){return Ure}function Vre(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=$re(),d=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Dre(e),f=p.getDay(),h=(f<d?7:0)+f-d;return p.setDate(p.getDate()-h),p.setHours(0,0,0,0),p}function Bre(e){return Lre(1,arguments),Vre(e,{weekStartsOn:1})}function zre(e){Lre(1,arguments);var t=function(e){Lre(1,arguments);var t=Dre(e),n=t.getFullYear(),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var o=Bre(r),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var a=Bre(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Bre(n)}function Hre(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function qre(e){Lre(1,arguments);var t=Dre(e);return t.setHours(0,0,0,0),t}function Gre(e,t){Lre(2,arguments);var n=qre(e),r=qre(t),o=n.getTime()-Hre(n),i=r.getTime()-Hre(r);return Math.round((o-i)/864e5)}function Kre(e,t){return Lre(2,arguments),Ire(e,7*jre(t))}function Wre(e,t){return Lre(2,arguments),Fre(e,12*jre(t))}function Yre(e,t){Lre(2,arguments);var n=qre(e),r=qre(t);return n.getTime()===r.getTime()}function Xre(e){return Lre(1,arguments),e instanceof Date||"object"===Mre(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Zre(e,t){Lre(2,arguments);var n=Dre(e),r=Dre(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function Qre(e){Lre(1,arguments);var t=Dre(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Jre(e){Lre(1,arguments);var t=Dre(e);return t.setDate(1),t.setHours(0,0,0,0),t}function eoe(e){Lre(1,arguments);var t=Dre(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function toe(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=$re(),d=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Dre(e),f=p.getDay(),h=6+(f<d?-7:0)-(f-d);return p.setDate(p.getDate()+h),p.setHours(23,59,59,999),p}function noe(e){return Lre(1,arguments),toe(e,{weekStartsOn:1})}function roe(e,t){return Lre(2,arguments),function(e,t){Lre(2,arguments);var n=Dre(e).getTime(),r=jre(t);return new Date(n+r)}(e,-jre(t))}function ooe(e){Lre(1,arguments);var t=Dre(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function ioe(e){Lre(1,arguments);var t=Dre(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=ooe(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=ooe(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function aoe(e){Lre(1,arguments);var t=Dre(e),n=ooe(t).getTime()-function(e){Lre(1,arguments);var t=ioe(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),ooe(n)}(t).getTime();return Math.round(n/6048e5)+1}function soe(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=$re(),d=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Dre(e),f=p.getUTCDay(),h=(f<d?7:0)+f-d;return p.setUTCDate(p.getUTCDate()-h),p.setUTCHours(0,0,0,0),p}function loe(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=Dre(e),d=u.getUTCFullYear(),p=$re(),f=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:p.firstWeekContainsDate)&&void 0!==r?r:null===(l=p.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(d+1,0,f),h.setUTCHours(0,0,0,0);var m=soe(h,t),g=new Date(0);g.setUTCFullYear(d,0,f),g.setUTCHours(0,0,0,0);var v=soe(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}function coe(e,t){Lre(1,arguments);var n=Dre(e),r=soe(n,t).getTime()-function(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=$re(),d=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),p=loe(e,t),f=new Date(0);return f.setUTCFullYear(p,0,d),f.setUTCHours(0,0,0,0),soe(f,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function uoe(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var doe=function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return uoe("yy"===t?r%100:r,t.length)},poe=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):uoe(n+1,2)},foe=function(e,t){return uoe(e.getUTCDate(),t.length)},hoe=function(e,t){return uoe(e.getUTCHours()%12||12,t.length)},moe=function(e,t){return uoe(e.getUTCHours(),t.length)},goe=function(e,t){return uoe(e.getUTCMinutes(),t.length)},voe=function(e,t){return uoe(e.getUTCSeconds(),t.length)},yoe=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return uoe(Math.floor(r*Math.pow(10,n-3)),t.length)},boe="midnight",xoe="noon",woe="morning",_oe="afternoon",Soe="evening",Eoe="night",Toe={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear();return n.ordinalNumber(r>0?r:1-r,{unit:"year"})}return doe(e,t)},Y:function(e,t,n,r){var o=loe(e,r),i=o>0?o:1-o;return"YY"===t?uoe(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):uoe(i,t.length)},R:function(e,t){return uoe(ioe(e),t.length)},u:function(e,t){return uoe(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return uoe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return uoe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return poe(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return uoe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=coe(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):uoe(o,t.length)},I:function(e,t,n){var r=aoe(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):uoe(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):foe(e,t)},D:function(e,t,n){var r=function(e){Lre(1,arguments);var t=Dre(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime();return Math.floor((n-r)/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):uoe(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return uoe(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return uoe(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return uoe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?xoe:0===o?boe:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?Soe:o>=12?_oe:o>=4?woe:Eoe,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return hoe(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):moe(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):uoe(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):uoe(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):goe(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):voe(e,t)},S:function(e,t){return yoe(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return Aoe(o);case"XXXX":case"XX":return Noe(o);default:return Noe(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return Aoe(o);case"xxxx":case"xx":return Noe(o);default:return Noe(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Coe(o,":");default:return"GMT"+Noe(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Coe(o,":");default:return"GMT"+Noe(o,":")}},t:function(e,t,n,r){return uoe(Math.floor((r._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,n,r){return uoe((r._originalDate||e).getTime(),t.length)}};function Coe(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t;return n+String(o)+a+uoe(i,2)}function Aoe(e,t){return e%60==0?(e>0?"-":"+")+uoe(Math.abs(e)/60,2):Noe(e,t)}function Noe(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+uoe(Math.floor(o/60),2)+n+uoe(o%60,2)}var Roe=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Ooe=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Poe={p:Ooe,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return Roe(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Roe(o,t)).replace("{{time}}",Ooe(i,t))}},koe=["D","DD"],Moe=["YY","YYYY"];function joe(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Loe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Doe(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Ioe={date:Doe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Doe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Doe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Foe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Uoe(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var $oe={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Uoe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Uoe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Uoe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Uoe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Uoe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Voe(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=t.match(r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth]);if(!o)return null;var i,a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(function(e){return e.test(a)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(s,(function(e){return e.test(a)}));return i=e.valueCallback?e.valueCallback(l):l,{value:i=n.valueCallback?n.valueCallback(i):i,rest:t.slice(a.length)}}}var Boe={ordinalNumber:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var o=r[0],i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(o.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:Voe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Voe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Voe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Voe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Voe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},zoe={code:"en-US",formatDistance:function(e,t,n){var r,o=Loe[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Ioe,formatRelative:function(e,t,n,r){return Foe[e]},localize:$oe,match:Boe,options:{weekStartsOn:0,firstWeekContainsDate:1}},Hoe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qoe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Goe=/^'([^]*?)'?$/,Koe=/''/g,Woe=/[a-zA-Z]/;function Yoe(e,t,n){var r,o,i,a,s,l,c,u,d,p,f,h,m,g,v,y,b,x;Lre(2,arguments);var w=String(t),_=$re(),S=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:_.locale)&&void 0!==r?r:zoe,E=jre(null!==(i=null!==(a=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==s?s:_.firstWeekContainsDate)&&void 0!==a?a:null===(d=_.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=jre(null!==(f=null!==(h=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:_.weekStartsOn)&&void 0!==h?h:null===(b=_.locale)||void 0===b||null===(x=b.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==f?f:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var C=Dre(e);if(!function(e){if(Lre(1,arguments),!Xre(e)&&"number"!=typeof e)return!1;var t=Dre(e);return!isNaN(Number(t))}(C))throw new RangeError("Invalid time value");var A=roe(C,Hre(C)),N={firstWeekContainsDate:E,weekStartsOn:T,locale:S,_originalDate:C};return w.match(qoe).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,Poe[t])(e,S.formatLong):e})).join("").match(Hoe).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return function(e){var t=e.match(Goe);if(!t)return e;return t[1].replace(Koe,"'")}(r);var i=Toe[o];if(i)return null!=n&&n.useAdditionalWeekYearTokens||-1===Moe.indexOf(r)||joe(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==koe.indexOf(e)}(r)||joe(r,t,String(e)),i(A,r,S.localize,N);if(o.match(Woe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}function Xoe(e){return Lre(1,arguments),Math.floor(function(e){return Lre(1,arguments),Dre(e).getTime()}(e)/1e3)}function Zoe(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=$re(),d=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1),p=function(e,t){var n,r,o,i,a,s,l,c;Lre(1,arguments);var u=Dre(e),d=u.getFullYear(),p=$re(),f=jre(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o:p.firstWeekContainsDate)&&void 0!==r?r:null===(l=p.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(d+1,0,f),h.setHours(0,0,0,0);var m=Vre(h,t),g=new Date(0);g.setFullYear(d,0,f),g.setHours(0,0,0,0);var v=Vre(g,t);return u.getTime()>=m.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}(e,t),f=new Date(0);return f.setFullYear(p,0,d),f.setHours(0,0,0,0),Vre(f,t)}function Qoe(e,t){return Lre(1,arguments),function(e,t,n){Lre(2,arguments);var r=Vre(e,n),o=Vre(t,n),i=r.getTime()-Hre(r),a=o.getTime()-Hre(o);return Math.round((i-a)/6048e5)}(function(e){Lre(1,arguments);var t=Dre(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),Jre(e),t)+1}function Joe(e,t){Lre(2,arguments);var n=Dre(e),r=Dre(t);return n.getTime()>r.getTime()}function eie(e,t){Lre(2,arguments);var n=Dre(e),r=Dre(t);return n.getTime()<r.getTime()}function tie(e,t){Lre(2,arguments);var n=Dre(e),r=Dre(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function nie(e,t){return Lre(2,arguments),Ire(e,-jre(t))}function rie(e,t){Lre(2,arguments);var n=Dre(e),r=jre(t),o=n.getFullYear(),i=n.getDate(),a=new Date(0);a.setFullYear(o,r,15),a.setHours(0,0,0,0);var s=function(e){Lre(1,arguments);var t=Dre(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(r,Math.min(i,s)),n}function oie(e,t){Lre(2,arguments);var n=Dre(e),r=jre(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}var iie=function(){return iie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},iie.apply(this,arguments)};function aie(e,t,n){for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function sie(e){return"multiple"===e.mode}function lie(e){return"range"===e.mode}function cie(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var uie={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var die=Object.freeze({__proto__:null,formatCaption:function(e,t){return Yoe(e,"LLLL y",t)},formatDay:function(e,t){return Yoe(e,"d",t)},formatMonthCaption:function(e,t){return Yoe(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Yoe(e,"cccccc",t)},formatYearCaption:function(e,t){return Yoe(e,"yyyy",t)}}),pie=Object.freeze({__proto__:null,labelDay:function(e,t,n){return Yoe(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Yoe(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var fie=n.createContext(void 0);function hie(e){var n,r,o=e.initialProps,i={captionLayout:"buttons",classNames:uie,formatters:die,labels:pie,locale:zoe,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:new Date,mode:"default"},a=function(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return r?i=Jre(r):t&&(i=new Date(t,0,1)),o?a=Qre(o):n&&(a=new Date(n,11,31)),{fromDate:i?qre(i):void 0,toDate:a?qre(a):void 0}}(o),s=a.fromDate,l=a.toDate,c=null!==(n=o.captionLayout)&&void 0!==n?n:i.captionLayout;"buttons"===c||s&&l||(c="buttons"),(cie(o)||sie(o)||lie(o))&&(r=o.onSelect);var u=iie(iie(iie({},i),o),{captionLayout:c,classNames:iie(iie({},i.classNames),o.classNames),components:iie({},o.components),formatters:iie(iie({},i.formatters),o.formatters),fromDate:s,labels:iie(iie({},i.labels),o.labels),mode:o.mode||i.mode,modifiers:iie(iie({},i.modifiers),o.modifiers),modifiersClassNames:iie(iie({},i.modifiersClassNames),o.modifiersClassNames),onSelect:r,styles:iie(iie({},i.styles),o.styles),toDate:l});return t.jsx(fie.Provider,{value:u,children:e.children})}function mie(){var e=n.useContext(fie);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function gie(e){var n=mie();return t.jsx("div",{className:n.classNames.caption_label,style:n.styles.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:(0,n.formatters.formatCaption)(e.displayMonth,{locale:n.locale})})}function vie(e){return t.jsx("svg",iie({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:t.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function yie(e){var n,r,o=e.onChange,i=e.value,a=e.children,s=e.caption,l=e.className,c=e.style,u=mie(),d=null!==(r=null===(n=u.components)||void 0===n?void 0:n.IconDropdown)&&void 0!==r?r:vie;return t.jsxs("div",{className:l,style:c,children:[t.jsx("span",{className:u.classNames.vhidden,children:e["aria-label"]}),t.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:i,onChange:o,children:a}),t.jsxs("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[s,t.jsx(d,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}function bie(e){var n,r=mie(),o=r.fromDate,i=r.toDate,a=r.styles,s=r.locale,l=r.formatters.formatMonthCaption,c=r.classNames,u=r.components,d=r.labels.labelMonthDropdown;if(!o)return t.jsx(t.Fragment,{});if(!i)return t.jsx(t.Fragment,{});var p=[];if(function(e,t){Lre(2,arguments);var n=Dre(e),r=Dre(t);return n.getFullYear()===r.getFullYear()}(o,i))for(var f=Jre(o),h=o.getMonth();h<=i.getMonth();h++)p.push(rie(f,h));else for(f=Jre(new Date),h=0;h<=11;h++)p.push(rie(f,h));var m=null!==(n=null==u?void 0:u.Dropdown)&&void 0!==n?n:yie;return t.jsx(m,{name:"months","aria-label":d(),className:c.dropdown_month,style:a.dropdown_month,onChange:function(t){var n=Number(t.target.value),r=rie(Jre(e.displayMonth),n);e.onChange(r)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:s}),children:p.map((function(e){return t.jsx("option",{value:e.getMonth(),children:l(e,{locale:s})},e.getMonth())}))})}function xie(e){var n,r=e.displayMonth,o=mie(),i=o.fromDate,a=o.toDate,s=o.locale,l=o.styles,c=o.classNames,u=o.components,d=o.formatters.formatYearCaption,p=o.labels.labelYearDropdown,f=[];if(!i)return t.jsx(t.Fragment,{});if(!a)return t.jsx(t.Fragment,{});for(var h=i.getFullYear(),m=a.getFullYear(),g=h;g<=m;g++)f.push(oie(eoe(new Date),g));var v=null!==(n=null==u?void 0:u.Dropdown)&&void 0!==n?n:yie;return t.jsx(v,{name:"years","aria-label":p(),className:c.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=oie(Jre(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:d(r,{locale:s}),children:f.map((function(e){return t.jsx("option",{value:e.getFullYear(),children:d(e,{locale:s})},e.getFullYear())}))})}function wie(){var e=mie(),t=function(e){var t=e.month||e.defaultMonth||e.today||new Date,n=e.toDate,r=e.fromDate,o=e.numberOfMonths,i=void 0===o?1:o;return n&&Zre(n,t)<0&&(t=Fre(n,-1*(i-1))),r&&Zre(t,r)<0&&(t=r),Jre(t)}(e),r=function(e,t){var r=n.useState(e);return[void 0===t?r[0]:t,r[1]]}(t,e.month),o=r[1];return[r[0],function(t){var n;if(!e.disableNavigation){var r=Jre(t);o(r),null===(n=e.onMonthChange)||void 0===n||n.call(e,r)}}]}var _ie=n.createContext(void 0);function Sie(e){var n=mie(),r=wie(),o=r[0],i=r[1],a=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=Jre(e),i=Zre(Jre(Fre(o,r)),o),a=[],s=0;s<i;s++){var l=Fre(o,s);a.push(l)}return n&&(a=a.reverse()),a}(o,n),s=function(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.numberOfMonths,o=void 0===r?1:r,i=t.pagedNavigation?o:1,a=Jre(e);if(!n)return Fre(a,i);if(!(Zre(n,e)<o))return Fre(a,i)}}(o,n),l=function(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.numberOfMonths,o=t.pagedNavigation?void 0===r?1:r:1,i=Jre(e);if(!n)return Fre(i,-o);if(!(Zre(i,n)<=0))return Fre(i,-o)}}(o,n),c=function(e){return a.some((function(t){return tie(e,t)}))};return t.jsx(_ie.Provider,{value:{currentMonth:o,displayMonths:a,goToMonth:i,goToDate:function(e,t){c(e)||(t&&eie(e,t)?i(Fre(e,1+-1*n.numberOfMonths)):i(e))},previousMonth:l,nextMonth:s,isDateDisplayed:c},children:e.children})}function Eie(){var e=n.useContext(_ie);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function Tie(e){var n,r=mie(),o=r.classNames,i=r.styles,a=r.components,s=Eie().goToMonth,l=function(t){s(Fre(t,e.displayIndex?-e.displayIndex:0))},c=null!==(n=null==a?void 0:a.CaptionLabel)&&void 0!==n?n:gie,u=t.jsx(c,{id:e.id,displayMonth:e.displayMonth});return t.jsxs("div",{className:o.caption_dropdowns,style:i.caption_dropdowns,children:[t.jsx("div",{className:o.vhidden,children:u}),t.jsx(bie,{onChange:l,displayMonth:e.displayMonth}),t.jsx(xie,{onChange:l,displayMonth:e.displayMonth})]})}function Cie(e){return t.jsx("svg",iie({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:t.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Aie(e){return t.jsx("svg",iie({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:t.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Nie=n.forwardRef((function(e,n){var r=mie(),o=r.classNames,i=r.styles,a=[o.button_reset,o.button];e.className&&a.push(e.className);var s=a.join(" "),l=iie(iie({},i.button_reset),i.button);return e.style&&Object.assign(l,e.style),t.jsx("button",iie({},e,{ref:n,type:"button",className:s,style:l}))}));function Rie(e){var n,r,o=mie(),i=o.dir,a=o.locale,s=o.classNames,l=o.styles,c=o.labels,u=c.labelPrevious,d=c.labelNext,p=o.components;if(!e.nextMonth&&!e.previousMonth)return t.jsx(t.Fragment,{});var f=u(e.previousMonth,{locale:a}),h=[s.nav_button,s.nav_button_previous].join(" "),m=d(e.nextMonth,{locale:a}),g=[s.nav_button,s.nav_button_next].join(" "),v=null!==(n=null==p?void 0:p.IconRight)&&void 0!==n?n:Aie,y=null!==(r=null==p?void 0:p.IconLeft)&&void 0!==r?r:Cie;return t.jsxs("div",{className:s.nav,style:l.nav,children:[!e.hidePrevious&&t.jsx(Nie,{name:"previous-month","aria-label":f,className:h,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:t.jsx("rtl"===i?v:y,{className:s.nav_icon,style:l.nav_icon})}),!e.hideNext&&t.jsx(Nie,{name:"next-month","aria-label":m,className:g,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:t.jsx("rtl"===i?y:v,{className:s.nav_icon,style:l.nav_icon})})]})}function Oie(e){var n=mie().numberOfMonths,r=Eie(),o=r.previousMonth,i=r.nextMonth,a=r.goToMonth,s=r.displayMonths,l=s.findIndex((function(t){return tie(e.displayMonth,t)})),c=0===l,u=l===s.length-1;return t.jsx(Rie,{displayMonth:e.displayMonth,hideNext:n>1&&(c||!u),hidePrevious:n>1&&(u||!c),nextMonth:i,previousMonth:o,onPreviousClick:function(){o&&a(o)},onNextClick:function(){i&&a(i)}})}function Pie(e){var n,r,o=mie(),i=o.classNames,a=o.styles,s=o.captionLayout,l=o.components,c=null!==(n=null==l?void 0:l.CaptionLabel)&&void 0!==n?n:gie;return r=o.disableNavigation?t.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===s?t.jsx(Tie,{displayMonth:e.displayMonth,id:e.id}):t.jsxs(t.Fragment,"dropdown-buttons"===s?{children:[t.jsx(Tie,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),t.jsx(Oie,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}:{children:[t.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),t.jsx(Oie,{displayMonth:e.displayMonth,id:e.id})]}),t.jsx("div",{className:i.caption,style:a.caption,children:r})}function kie(e){var n=mie(),r=n.footer;return r?t.jsx("tfoot",{className:n.classNames.tfoot,style:n.styles.tfoot,children:t.jsx("tr",{children:t.jsx("td",{colSpan:8,children:r})})}):t.jsx(t.Fragment,{})}function Mie(){var e=mie(),n=e.classNames,r=e.styles,o=e.showWeekNumber,i=e.locale,a=e.formatters.formatWeekdayName,s=e.labels.labelWeekday,l=function(e,t,n){for(var r=n?Bre(new Date):Vre(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=Ire(r,i);o.push(a)}return o}(i,e.weekStartsOn,e.ISOWeek);return t.jsxs("tr",{style:r.head_row,className:n.head_row,children:[o&&t.jsx("td",{style:r.head_cell,className:n.head_cell}),l.map((function(e,o){return t.jsx("th",{scope:"col",className:n.head_cell,style:r.head_cell,"aria-label":s(e,{locale:i}),children:a(e,{locale:i})},o)}))]})}function jie(){var e,n=mie(),r=n.components,o=null!==(e=null==r?void 0:r.HeadRow)&&void 0!==e?e:Mie;return t.jsx("thead",{style:n.styles.head,className:n.classNames.head,children:t.jsx(o,{})})}function Lie(e){var n=mie();return t.jsx(t.Fragment,{children:(0,n.formatters.formatDay)(e.date,{locale:n.locale})})}var Die=n.createContext(void 0);function Iie(e){if(!sie(e.initialProps)){return t.jsx(Die.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:e.children})}return t.jsx(Fie,{initialProps:e.initialProps,children:e.children})}function Fie(e){var n=e.initialProps,r=e.children,o=n.selected,i=n.min,a=n.max,s={disabled:[]};return o&&s.disabled.push((function(e){var t=a&&o.length>a-1,n=o.some((function(t){return Yre(t,e)}));return Boolean(t&&!n)})),t.jsx(Die.Provider,{value:{selected:o,onDayClick:function(e,t,r){var s,l;if((null===(s=n.onDayClick)||void 0===s||s.call(n,e,t,r),!Boolean(t.selected&&i&&(null==o?void 0:o.length)===i))&&!Boolean(!t.selected&&a&&(null==o?void 0:o.length)===a)){var c=o?aie([],o):[];if(t.selected){var u=c.findIndex((function(t){return Yre(e,t)}));c.splice(u,1)}else c.push(e);null===(l=n.onSelect)||void 0===l||l.call(n,c,e,t,r)}},modifiers:s},children:r})}function Uie(){var e=n.useContext(Die);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var $ie,Vie,Bie=n.createContext(void 0);function zie(e){if(!lie(e.initialProps)){return t.jsx(Bie.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:e.children})}return t.jsx(Hie,{initialProps:e.initialProps,children:e.children})}function Hie(e){var n=e.initialProps,r=e.children,o=n.selected,i=o||{},a=i.from,s=i.to,l=n.min,c=n.max,u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(a?(u.range_start=[a],s?(u.range_end=[s],Yre(a,s)||(u.range_middle=[{after:a,before:s}])):u.range_end=[a]):s&&(u.range_start=[s],u.range_end=[s]),l&&(a&&!s&&u.disabled.push({after:nie(a,l-1),before:Ire(a,l-1)}),a&&s&&u.disabled.push({after:a,before:Ire(a,l-1)}),!a&&s&&u.disabled.push({after:nie(s,l-1),before:Ire(s,l-1)})),c){if(a&&!s&&(u.disabled.push({before:Ire(a,1-c)}),u.disabled.push({after:Ire(a,c-1)})),a&&s){var d=c-(Gre(s,a)+1);u.disabled.push({before:nie(a,d)}),u.disabled.push({after:Ire(s,d)})}!a&&s&&(u.disabled.push({before:Ire(s,1-c)}),u.disabled.push({after:Ire(s,c-1)}))}return t.jsx(Bie.Provider,{value:{selected:o,onDayClick:function(e,t,r){var i,a;null===(i=n.onDayClick)||void 0===i||i.call(n,e,t,r);var s=function(e,t){var n=t||{},r=n.from,o=n.to;if(r&&o){if(Yre(o,e)&&Yre(r,e))return;if(Yre(o,e))return{from:o,to:void 0};if(Yre(r,e))return;return Joe(r,e)?{from:e,to:o}:{from:r,to:e}}return o?Joe(e,o)?{from:o,to:e}:{from:e,to:o}:r?eie(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}(e,o);null===(a=n.onSelect)||void 0===a||a.call(n,s,e,t,r)},modifiers:u},children:r})}function qie(){var e=n.useContext(Bie);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Gie(e){return Array.isArray(e)?aie([],e):void 0!==e?[e]:[]}(Vie=$ie||($ie={})).Outside="outside",Vie.Disabled="disabled",Vie.Selected="selected",Vie.Hidden="hidden",Vie.Today="today",Vie.RangeStart="range_start",Vie.RangeEnd="range_end",Vie.RangeMiddle="range_middle";var Kie=$ie.Selected,Wie=$ie.Disabled,Yie=$ie.Hidden,Xie=$ie.Today,Zie=$ie.RangeEnd,Qie=$ie.RangeMiddle,Jie=$ie.RangeStart,eae=$ie.Outside;var tae=n.createContext(void 0);function nae(e){var n=mie(),r=function(e,t,n){var r,o=((r={})[Kie]=Gie(e.selected),r[Wie]=Gie(e.disabled),r[Yie]=Gie(e.hidden),r[Xie]=[e.today],r[Zie]=[],r[Qie]=[],r[Jie]=[],r[eae]=[],r);return e.fromDate&&o[Wie].push({before:e.fromDate}),e.toDate&&o[Wie].push({after:e.toDate}),sie(e)?o[Wie]=o[Wie].concat(t.modifiers[Wie]):lie(e)&&(o[Wie]=o[Wie].concat(n.modifiers[Wie]),o[Jie]=n.modifiers[Jie],o[Qie]=n.modifiers[Qie],o[Zie]=n.modifiers[Zie]),o}(n,Uie(),qie()),o=function(e){var t={};return Object.entries(e).forEach((function(e){t[e[0]]=Gie(e[1])})),t}(n.modifiers),i=iie(iie({},r),o);return t.jsx(tae.Provider,{value:i,children:e.children})}function rae(){var e=n.useContext(tae);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function oae(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(Xre(t))return Yre(e,t);var n,r,o,i,a;if(function(e){return Array.isArray(e)&&e.every(Xre)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return n=e,a=(r=t).to,(i=r.from)&&a?(Gre(a,i)<0&&(i=(o=[a,i])[0],a=o[1]),Gre(n,i)>=0&&Gre(a,n)>=0):a?Yre(a,n):!!i&&Yre(i,n);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var s=Gre(t.before,e)>0,l=Gre(t.after,e)<0;return Joe(t.before,t.after)?l&&s:s||l}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?Gre(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?Gre(t.before,e)>0:"function"==typeof t&&t(e)}))}function iae(e,t,n){var r=Object.keys(t).reduce((function(n,r){return oae(e,t[r])&&n.push(r),n}),[]),o={};return r.forEach((function(e){return o[e]=!0})),n&&!tie(e,n)&&(o.outside=!0),o}function aae(e,t){var n=t.moveBy,r=t.direction,o=t.context,i=t.modifiers,a=t.retry,s=void 0===a?{count:0,lastFocused:e}:a,l=o.weekStartsOn,c=o.fromDate,u=o.toDate,d=o.locale,p={day:Ire,week:Kre,month:Fre,year:Wre,startOfWeek:function(e){return o.ISOWeek?Bre(e):Vre(e,{locale:d,weekStartsOn:l})},endOfWeek:function(e){return o.ISOWeek?noe(e):toe(e,{locale:d,weekStartsOn:l})}}[n](e,"after"===r?1:-1);"before"===r&&c?p=function(e){var t,n;if(Lre(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==Mre(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Dre(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)})),n||new Date(NaN)}([c,p]):"after"===r&&u&&(p=function(e){var t,n;if(Lre(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==Mre(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Dre(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}([u,p]));var f=!0;if(i){var h=iae(p,i);f=!h.disabled&&!h.hidden}return f?p:s.count>365?s.lastFocused:aae(p,{moveBy:n,direction:r,context:o,modifiers:i,retry:iie(iie({},s),{count:s.count+1})})}var sae=n.createContext(void 0);function lae(e){var r=Eie(),o=rae(),i=n.useState(),a=i[0],s=i[1],l=n.useState(),c=l[0],u=l[1],d=function(e,t){for(var n,r,o=Jre(e[0]),i=Qre(e[e.length-1]),a=o;a<=i;){var s=iae(a,t);if(s.disabled||s.hidden)a=Ire(a,1);else{if(s.selected)return a;s.today&&!r&&(r=a),n||(n=a),a=Ire(a,1)}}return r||n}(r.displayMonths,o),p=(null!=a?a:c&&r.isDateDisplayed(c))?c:d,f=function(e){s(e)},h=mie(),m=function(e,t){if(a){var n=aae(a,{moveBy:e,direction:t,context:h,modifiers:o});Yre(a,n)||(r.goToDate(n,a),f(n))}};return t.jsx(sae.Provider,{value:{focusedDay:a,focusTarget:p,blur:function(){u(a),s(void 0)},focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}},children:e.children})}function cae(){var e=n.useContext(sae);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var uae=n.createContext(void 0);function dae(e){if(!cie(e.initialProps)){return t.jsx(uae.Provider,{value:{selected:void 0},children:e.children})}return t.jsx(pae,{initialProps:e.initialProps,children:e.children})}function pae(e){var n=e.initialProps;return t.jsx(uae.Provider,{value:{selected:n.selected,onDayClick:function(e,t,r){var o,i,a;null===(o=n.onDayClick)||void 0===o||o.call(n,e,t,r),!t.selected||n.required?null===(a=n.onSelect)||void 0===a||a.call(n,e,e,t,r):null===(i=n.onSelect)||void 0===i||i.call(n,void 0,e,t,r)}},children:e.children})}function fae(){var e=n.useContext(uae);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function hae(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var r=e.modifiersClassNames[t];if(r)n.push(r);else if(function(e){return Object.values($ie).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&n.push(o)}})),n}function mae(e,r,o){var i,a,s,l=mie(),c=cae(),u=function(e,t){return iae(e,rae(),t)}(e,r),d=function(e,t){var n=mie(),r=fae(),o=Uie(),i=qie(),a=cae(),s=a.focusDayAfter,l=a.focusDayBefore,c=a.focusWeekAfter,u=a.focusWeekBefore,d=a.blur,p=a.focus,f=a.focusMonthBefore,h=a.focusMonthAfter,m=a.focusYearBefore,g=a.focusYearAfter,v=a.focusStartOfWeek,y=a.focusEndOfWeek;return{onClick:function(a){var s,l,c,u;cie(n)?null===(s=r.onDayClick)||void 0===s||s.call(r,e,t,a):sie(n)?null===(l=o.onDayClick)||void 0===l||l.call(o,e,t,a):lie(n)?null===(c=i.onDayClick)||void 0===c||c.call(i,e,t,a):null===(u=n.onDayClick)||void 0===u||u.call(n,e,t,a)},onFocus:function(r){var o;p(e),null===(o=n.onDayFocus)||void 0===o||o.call(n,e,t,r)},onBlur:function(r){var o;d(),null===(o=n.onDayBlur)||void 0===o||o.call(n,e,t,r)},onKeyDown:function(r){var o;switch(r.key){case"ArrowLeft":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?s():l();break;case"ArrowRight":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?l():s();break;case"ArrowDown":r.preventDefault(),r.stopPropagation(),c();break;case"ArrowUp":r.preventDefault(),r.stopPropagation(),u();break;case"PageUp":r.preventDefault(),r.stopPropagation(),r.shiftKey?m():f();break;case"PageDown":r.preventDefault(),r.stopPropagation(),r.shiftKey?g():h();break;case"Home":r.preventDefault(),r.stopPropagation(),v();break;case"End":r.preventDefault(),r.stopPropagation(),y()}null===(o=n.onDayKeyDown)||void 0===o||o.call(n,e,t,r)},onKeyUp:function(r){var o;null===(o=n.onDayKeyUp)||void 0===o||o.call(n,e,t,r)},onMouseEnter:function(r){var o;null===(o=n.onDayMouseEnter)||void 0===o||o.call(n,e,t,r)},onMouseLeave:function(r){var o;null===(o=n.onDayMouseLeave)||void 0===o||o.call(n,e,t,r)},onPointerEnter:function(r){var o;null===(o=n.onDayPointerEnter)||void 0===o||o.call(n,e,t,r)},onPointerLeave:function(r){var o;null===(o=n.onDayPointerLeave)||void 0===o||o.call(n,e,t,r)},onTouchCancel:function(r){var o;null===(o=n.onDayTouchCancel)||void 0===o||o.call(n,e,t,r)},onTouchEnd:function(r){var o;null===(o=n.onDayTouchEnd)||void 0===o||o.call(n,e,t,r)},onTouchMove:function(r){var o;null===(o=n.onDayTouchMove)||void 0===o||o.call(n,e,t,r)},onTouchStart:function(r){var o;null===(o=n.onDayTouchStart)||void 0===o||o.call(n,e,t,r)}}}(e,u),p=function(){var e=mie(),t=fae(),n=Uie(),r=qie();return cie(e)?t.selected:sie(e)?n.selected:lie(e)?r.selected:void 0}(),f=Boolean(l.onDayClick||"default"!==l.mode);n.useEffect((function(){var t;u.outside||c.focusedDay&&f&&Yre(c.focusedDay,e)&&(null===(t=o.current)||void 0===t||t.focus())}),[c.focusedDay,e,o,f,u.outside]);var h=hae(l,u).join(" "),m=function(e,t){var n=iie({},e.styles.day);return Object.keys(t).forEach((function(t){var r;n=iie(iie({},n),null===(r=e.modifiersStyles)||void 0===r?void 0:r[t])})),n}(l,u),g=Boolean(u.outside&&!l.showOutsideDays||u.hidden),v=null!==(s=null===(a=l.components)||void 0===a?void 0:a.DayContent)&&void 0!==s?s:Lie,y={style:m,className:h,children:t.jsx(v,{date:e,displayMonth:r,activeModifiers:u}),role:"gridcell"},b=c.focusTarget&&Yre(c.focusTarget,e)&&!u.outside,x=c.focusedDay&&Yre(c.focusedDay,e),w=iie(iie(iie({},y),((i={disabled:u.disabled,role:"gridcell"})["aria-selected"]=u.selected,i.tabIndex=x||b?0:-1,i)),d);return{isButton:f,isHidden:g,activeModifiers:u,selectedDays:p,buttonProps:w,divProps:y}}function gae(e){var r=n.useRef(null),o=mae(e.date,e.displayMonth,r);return o.isHidden?t.jsx("div",{role:"gridcell"}):o.isButton?t.jsx(Nie,iie({name:"day",ref:r},o.buttonProps)):t.jsx("div",iie({},o.divProps))}function vae(e){var n=e.number,r=e.dates,o=mie(),i=o.onWeekNumberClick,a=o.styles,s=o.classNames,l=o.locale,c=o.labels.labelWeekNumber,u=(0,o.formatters.formatWeekNumber)(Number(n),{locale:l});if(!i)return t.jsx("span",{className:s.weeknumber,style:a.weeknumber,children:u});var d=c(Number(n),{locale:l});return t.jsx(Nie,{name:"week-number","aria-label":d,className:s.weeknumber,style:a.weeknumber,onClick:function(e){i(n,r,e)},children:u})}function yae(e){var n,r,o,i=mie(),a=i.styles,s=i.classNames,l=i.components,c=null!==(n=null==l?void 0:l.Day)&&void 0!==n?n:gae,u=null!==(r=null==l?void 0:l.WeekNumber)&&void 0!==r?r:vae;return i.showWeekNumber&&(o=t.jsx("td",{className:s.cell,style:a.cell,children:t.jsx(u,{number:e.weekNumber,dates:e.dates})})),t.jsxs("tr",{className:s.row,style:a.row,children:[o,e.dates.map((function(n){return t.jsx("td",{className:s.cell,style:a.cell,role:"presentation",children:t.jsx(c,{displayMonth:e.displayMonth,date:n})},Xoe(n))}))]})}function bae(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?noe(t):toe(t,n),o=(null==n?void 0:n.ISOWeek)?Bre(e):Vre(e,n),i=Gre(r,o),a=[],s=0;s<=i;s++)a.push(Ire(o,s));var l=a.reduce((function(e,t){var r=(null==n?void 0:n.ISOWeek)?function(e){Lre(1,arguments);var t=Dre(e),n=Bre(t).getTime()-zre(t).getTime();return Math.round(n/6048e5)+1}(t):function(e,t){Lre(1,arguments);var n=Dre(e),r=Vre(n,t).getTime()-Zoe(n,t).getTime();return Math.round(r/6048e5)+1}(t,n),o=e.find((function(e){return e.weekNumber===r}));return o?(o.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)}),[]);return l}function xae(e){var n,r,o,i=mie(),a=i.locale,s=i.classNames,l=i.styles,c=i.hideHead,u=i.components,d=i.weekStartsOn,p=i.firstWeekContainsDate,f=i.ISOWeek,h=function(e,t){var n=bae(Jre(e),Qre(e),t);if(null==t?void 0:t.useFixedWeeks){var r=Qoe(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],a=Kre(i,6-r),s=bae(Kre(i,1),a,t);n.push.apply(n,s)}}return n}(e.displayMonth,{useFixedWeeks:Boolean(i.fixedWeeks),ISOWeek:f,locale:a,weekStartsOn:d,firstWeekContainsDate:p}),m=null!==(n=null==u?void 0:u.Head)&&void 0!==n?n:jie,g=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:yae,v=null!==(o=null==u?void 0:u.Footer)&&void 0!==o?o:kie;return t.jsxs("table",{id:e.id,className:s.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&t.jsx(m,{}),t.jsx("tbody",{className:s.tbody,style:l.tbody,children:h.map((function(n){return t.jsx(g,{displayMonth:e.displayMonth,dates:n.dates,weekNumber:n.weekNumber},n.weekNumber)}))}),t.jsx(v,{displayMonth:e.displayMonth})]})}var wae="undefined"!=typeof window&&window.document&&window.document.createElement?n.useLayoutEffect:n.useEffect,_ae=!1,Sae=0;function Eae(){return"react-day-picker-".concat(++Sae)}function Tae(e){var r,o,i=mie(),a=i.dir,s=i.classNames,l=i.styles,c=i.components,u=Eie().displayMonths,d=function(e){var t,r=null!=e?e:_ae?Eae():null,o=n.useState(r),i=o[0],a=o[1];return wae((function(){null===i&&a(Eae())}),[]),n.useEffect((function(){!1===_ae&&(_ae=!0)}),[]),null!==(t=null!=e?e:i)&&void 0!==t?t:void 0}(i.id?"".concat(i.id,"-").concat(e.displayIndex):void 0),p=i.id?"".concat(i.id,"-grid-").concat(e.displayIndex):void 0,f=[s.month],h=l.month,m=0===e.displayIndex,g=e.displayIndex===u.length-1,v=!m&&!g;"rtl"===a&&(g=(r=[m,g])[0],m=r[1]),m&&(f.push(s.caption_start),h=iie(iie({},h),l.caption_start)),g&&(f.push(s.caption_end),h=iie(iie({},h),l.caption_end)),v&&(f.push(s.caption_between),h=iie(iie({},h),l.caption_between));var y=null!==(o=null==c?void 0:c.Caption)&&void 0!==o?o:Pie;return t.jsxs("div",{className:f.join(" "),style:h,children:[t.jsx(y,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),t.jsx(xae,{id:p,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function Cae(e){var n=mie();return t.jsx("div",{className:n.classNames.months,style:n.styles.months,children:e.children})}function Aae(e){var r,o,i=e.initialProps,a=mie(),s=cae(),l=Eie(),c=n.useState(!1),u=c[0],d=c[1];n.useEffect((function(){a.initialFocus&&s.focusTarget&&(u||(s.focus(s.focusTarget),d(!0)))}),[a.initialFocus,u,s.focus,s.focusTarget,s]);var p=[a.classNames.root,a.className];a.numberOfMonths>1&&p.push(a.classNames.multiple_months),a.showWeekNumber&&p.push(a.classNames.with_weeknumber);var f=iie(iie({},a.styles.root),a.style),h=Object.keys(i).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var n;return iie(iie({},e),((n={})[t]=i[t],n))}),{}),m=null!==(o=null===(r=i.components)||void 0===r?void 0:r.Months)&&void 0!==o?o:Cae;return t.jsx("div",iie({className:p.join(" "),style:f,dir:a.dir,id:a.id,nonce:i.nonce,title:i.title,lang:i.lang},h,{children:t.jsx(m,{children:l.displayMonths.map((function(e,n){return t.jsx(Tae,{displayIndex:n,displayMonth:e},n)}))})}))}function Nae(e){var n=e.children,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return t.jsx(hie,{initialProps:r,children:t.jsx(Sie,{children:t.jsx(dae,{initialProps:r,children:t.jsx(Iie,{initialProps:r,children:t.jsx(zie,{initialProps:r,children:t.jsx(nae,{children:t.jsx(lae,{children:n})})})})})})})}function Rae(e){return t.jsx(Nae,iie({},e,{children:t.jsx(Aae,{initialProps:e})}))}function Oae({className:e,classNames:n,showOutsideDays:r=!0,...o}){return t.jsx(Rae,{showOutsideDays:r,className:Zd("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Zd(gZ({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:Zd("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===o.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:Zd(gZ({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...n},components:{IconLeft:()=>t.jsx(hu,{className:"h-4 w-4"}),IconRight:()=>t.jsx(mu,{className:"h-4 w-4"})},...o})}Oae.displayName="Calendar";var Pae=.999,kae=/[\\\/_+.#"@\[\(\{&]/,Mae=/[\\\/_+.#"@\[\(\{&]/g,jae=/[\s-]/,Lae=/[\s-]/g;function Dae(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?1:.99;var s=`${o},${i}`;if(void 0!==a[s])return a[s];for(var l,c,u,d,p=r.charAt(i),f=n.indexOf(p,o),h=0;f>=0;)(l=Dae(e,t,n,r,f+1,i+1,a))>h&&(f===o?l*=1:kae.test(e.charAt(f-1))?(l*=.8,(u=e.slice(o,f-1).match(Mae))&&o>0&&(l*=Math.pow(Pae,u.length))):jae.test(e.charAt(f-1))?(l*=.9,(d=e.slice(o,f-1).match(Lae))&&o>0&&(l*=Math.pow(Pae,d.length))):(l*=.17,o>0&&(l*=Math.pow(Pae,f-o))),e.charAt(f)!==t.charAt(i)&&(l*=.9999)),(l<.1&&n.charAt(f-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(f-1)!==r.charAt(i))&&(.1*(c=Dae(e,t,n,r,f+1,i+2,a))>l&&(l=.1*c)),l>h&&(h=l),f=n.indexOf(p,f+1);return a[s]=h,h}function Iae(e){return e.toLowerCase().replace(Lae," ")}function Fae(e,t,n){return Dae(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,Iae(e),Iae(t),0,0,{})}var Uae,$ae={exports:{}},Vae={};var Bae,zae={};
86
86
  /**
87
87
  * @license React
88
88
  * use-sync-external-store-shim.development.js