/*! For license information please see main.js.LICENSE.txt */ (()=>{var e={282:function(e){"undefined"!=typeof self&&self,e.exports=function(){"use strict";var e={316:function(e,t,n){n.d(t,{A:function(){return o}});var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}))},20:function(e,t,n){var r=n(609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{Alert:function(){return dh},Avatar:function(){return Uo},Badge:function(){return Fo},Breadcrumb:function(){return vE},Button:function(){return ue},ButtonGroup:function(){return ui},Checkbox:function(){return Pe},Container:function(){return uh},DatePicker:function(){return TN},Dialog:function(){return UE},Drawer:function(){return wS},DropdownMenu:function(){return $_},EditorInput:function(){return Sx},Input:function(){return Xo},Label:function(){return ei},Loader:function(){return ri},Menu:function(){return Yx},Pagination:function(){return $S},ProgressBar:function(){return oi},ProgressSteps:function(){return Ax},RadioButton:function(){return Ao},SearchBox:function(){return C_},Select:function(){return Yf},Sidebar:function(){return oE},Skeleton:function(){return Fx},Switch:function(){return ye},Tabs:function(){return Sf},TextArea:function(){return Vo},Title:function(){return ti},Toaster:function(){return Tm},Tooltip:function(){return xo},Topbar:function(){return ZE},toast:function(){return lm}});var o={};n.r(o),n.d(o,{Button:function(){return HS},CaptionLabel:function(){return YS},Chevron:function(){return qS},Day:function(){return KS},DayButton:function(){return GS},Dropdown:function(){return XS},DropdownNav:function(){return ZS},Footer:function(){return JS},Month:function(){return QS},MonthCaption:function(){return ek},MonthGrid:function(){return tk},Months:function(){return nk},MonthsDropdown:function(){return ik},Nav:function(){return ak},NextMonthButton:function(){return sk},Option:function(){return lk},PreviousMonthButton:function(){return ck},Root:function(){return uk},Select:function(){return dk},Week:function(){return fk},WeekNumber:function(){return pk},WeekNumberHeader:function(){return gk},Weekday:function(){return mk},Weekdays:function(){return hk},Weeks:function(){return yk},YearsDropdown:function(){return vk}});var i={};n.r(i),n.d(i,{formatCaption:function(){return OC},formatDay:function(){return RC},formatMonthCaption:function(){return MC},formatMonthDropdown:function(){return DC},formatWeekNumber:function(){return AC},formatWeekNumberHeader:function(){return jC},formatWeekdayName:function(){return IC},formatYearCaption:function(){return LC},formatYearDropdown:function(){return FC}});var a={};n.r(a),n.d(a,{labelCaption:function(){return BC},labelDay:function(){return UC},labelDayButton:function(){return VC},labelGrid:function(){return zC},labelGridcell:function(){return WC},labelMonthDropdown:function(){return HC},labelNav:function(){return $C},labelNext:function(){return YC},labelPrevious:function(){return qC},labelWeekNumber:function(){return GC},labelWeekNumberHeader:function(){return XC},labelWeekday:function(){return KC},labelYearDropdown:function(){return ZC}});var s=n(609),l=n.n(s);const c=e=>{const t=m(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),u(n,t)||f(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},u=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?u(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find((({validator:e})=>e(i)))?.classGroupId},d=/^\[(.+)\]$/,f=e=>{if(d.test(e)){const t=d.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},m=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return y(Object.entries(e.classGroups),n).forEach((([e,n])=>{h(n,r,e,t)})),r},h=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return g(e)?void h(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{h(o,p(t,e),n,r)}))}else(""===e?t:p(t,e)).classGroupId=n}))},p=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},g=e=>e.isThemeGetter,y=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,v=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},b=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,a=e=>{const n=[];let a,s=0,l=0;for(let c=0;cl?a-l:void 0}};return n?e=>n({className:e,parseClassName:a}):a},w=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},x=/\s+/;function E(){let e,t,n=0,r="";for(;n{if("string"==typeof e)return e;let t,n="";for(let r=0;r{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},k=/^\[(?:([a-z-]+):)?(.+)\]$/i,C=/^\d+\/\d+$/,N=new Set(["px","full","screen"]),P=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,T=/\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$/,O=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,M=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,D=e=>j(e)||N.has(e)||C.test(e),A=e=>K(e,"length",G),j=e=>Boolean(e)&&!Number.isNaN(Number(e)),I=e=>K(e,"number",j),F=e=>Boolean(e)&&Number.isInteger(Number(e)),L=e=>e.endsWith("%")&&j(e.slice(0,-1)),z=e=>k.test(e),B=e=>P.test(e),W=new Set(["length","size","percentage"]),V=e=>K(e,W,X),U=e=>K(e,"position",X),$=new Set(["image","url"]),H=e=>K(e,$,J),Y=e=>K(e,"",Z),q=()=>!0,K=(e,t,n)=>{const r=k.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},G=e=>T.test(e)&&!O.test(e),X=()=>!1,Z=e=>M.test(e),J=e=>R.test(e),Q=(Symbol.toStringTag,()=>{const e=S("colors"),t=S("spacing"),n=S("blur"),r=S("brightness"),o=S("borderColor"),i=S("borderRadius"),a=S("borderSpacing"),s=S("borderWidth"),l=S("contrast"),c=S("grayscale"),u=S("hueRotate"),d=S("invert"),f=S("gap"),m=S("gradientColorStops"),h=S("gradientColorStopPositions"),p=S("inset"),g=S("margin"),y=S("opacity"),v=S("padding"),b=S("saturate"),w=S("scale"),x=S("sepia"),E=S("skew"),_=S("space"),k=S("translate"),C=()=>["auto",z,t],N=()=>[z,t],P=()=>["",D,A],T=()=>["auto",j,z],O=()=>["","0",z],M=()=>[j,z];return{cacheSize:500,separator:":",theme:{colors:[q],spacing:[D,A],blur:["none","",B,z],brightness:M(),borderColor:[e],borderRadius:["none","","full",B,z],borderSpacing:N(),borderWidth:P(),contrast:M(),grayscale:O(),hueRotate:M(),invert:O(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[L,A],inset:C(),margin:C(),opacity:M(),padding:N(),saturate:M(),scale:M(),sepia:O(),skew:M(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",z]}],container:["container"],columns:[{columns:[B]}],"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",z]}],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:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",F,z]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",F,z]}],"grid-cols":[{"grid-cols":[q]}],"col-start-end":[{col:["auto",{span:["full",F,z]},z]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[q]}],"row-start-end":[{row:["auto",{span:[F,z]},z]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"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:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],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":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z,t]}],"min-w":[{"min-w":[z,t,"min","max","fit"]}],"max-w":[{"max-w":[z,t,"none","full","min","max","fit","prose",{screen:[B]},B]}],h:[{h:[z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",B,A]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",I]}],"font-family":[{font:[q]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",z]}],"line-clamp":[{"line-clamp":["none",j,I]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",D,z]}],"list-image":[{"list-image":["none",z]}],"list-style-type":[{list:["none","disc","decimal",z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"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",D,A]}],"underline-offset":[{"underline-offset":["auto",D,z]}],"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:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z]}],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",z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",U]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",V]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},H]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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":[y]}],"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":[y]}],"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-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":[D,z]}],"outline-w":[{outline:[D,A]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[D,A]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",B,Y]}],"shadow-color":[{shadow:[q]}],opacity:[{opacity:[y]}],"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",B,z]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[x]}],"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":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"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",z]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[F,z]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z]}],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",z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[D,A,I]}],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-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"]}}}),ee=function(e,...t){let n,r,o,i=function(s){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:v(e.cacheSize),parseClassName:b(e),...c(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(x);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=Boolean(d),m=r(f?u.substring(0,d):u);if(!m){if(!f){s=t+(s.length>0?" "+s:s);continue}if(m=r(u),!m){s=t+(s.length>0?" "+s:s);continue}f=!1}const h=w(l).join(":"),p=c?h+"!":h,g=p+m;if(i.includes(g))continue;i.push(g);const y=o(m,f);for(let e=0;e0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(E.apply(null,arguments))}}(Q);function te(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;tsvg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"})||void 0===o?void 0:o[u],R=null,D="";E&&(D="flex items-center justify-center","left"===S?i=E:R=E);var A=h;return l().createElement(A,le({ref:t,type:f,className:re(D,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",M,T,O,P,p),disabled:v},N),i,l().createElement("span",{className:"px-1"},g),R)})),ue=ce;let de=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};var fe=["id","onChange","value","defaultValue","size","disabled","label","name","className"];function me(){return me=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.filter(((e,t,n)=>Boolean(e)&&n.indexOf(e)===t)).join(" ");var be={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const we=(0,s.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},c)=>(0,s.createElement)("svg",{ref:c,...be,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:ve("lucide",o),...l},[...a.map((([e,t])=>(0,s.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),xe=(e,t)=>{const n=(0,s.forwardRef)((({className:n,...r},o)=>{return(0,s.createElement)(we,{ref:o,iconNode:t,className:ve(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i}));return n.displayName=`${e}`,n},Ee=xe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),_e=xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Se=["id","label","defaultChecked","checked","onChange","value","indeterminate","disabled","size"];function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);nsvg]:size-4",sm:"py-1 px-1.5 text-base gap-1 [&>svg]:size-4",md:"py-2 px-2.5 text-base gap-1 [&>svg]:size-5",lg:"py-2.5 px-3 text-base gap-1 [&>svg]:size-6"};function Ae(e){return Fe(e)?(e.nodeName||"").toLowerCase():"#document"}function je(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ie(e){var t;return null==(t=(Fe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Fe(e){return e instanceof Node||e instanceof je(e).Node}function Le(e){return e instanceof Element||e instanceof je(e).Element}function ze(e){return e instanceof HTMLElement||e instanceof je(e).HTMLElement}function Be(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof je(e).ShadowRoot)}function We(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ve(e){return["table","td","th"].includes(Ae(e))}function Ue(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function $e(e){const t=He(),n=Le(e)?qe(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function He(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ye(e){return["html","body","#document"].includes(Ae(e))}function qe(e){return je(e).getComputedStyle(e)}function Ke(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ge(e){if("html"===Ae(e))return e;const t=e.assignedSlot||e.parentNode||Be(e)&&e.host||Ie(e);return Be(t)?t.host:t}function Xe(e){const t=Ge(e);return Ye(t)?e.ownerDocument?e.ownerDocument.body:e.body:ze(t)&&We(t)?t:Xe(t)}function Ze(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Xe(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=je(o);if(i){const e=Je(a);return t.concat(a,a.visualViewport||[],We(o)?o:[],e&&n?Ze(e):[])}return t.concat(o,Ze(o,[],n))}function Je(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qe(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function et(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Be(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function tt(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function nt(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function rt(e){return!(0!==e.mozInputSource||!e.isTrusted)||(at()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function ot(e){return!nt().includes("jsdom/")&&(!at()&&0===e.width&&0===e.height||at()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function it(){return/apple/i.test(navigator.vendor)}function at(){const e=/android/i;return e.test(tt())||e.test(nt())}function st(){return tt().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function lt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ct(e){return(null==e?void 0:e.ownerDocument)||document}function ut(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function dt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ft(e){return ze(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function mt(e){e.preventDefault(),e.stopPropagation()}function ht(e){return!!e&&"combobox"===e.getAttribute("role")&&ft(e)}const pt=Math.min,gt=Math.max,yt=Math.round,vt=Math.floor,bt=e=>({x:e,y:e}),wt={left:"right",right:"left",bottom:"top",top:"bottom"},xt={start:"end",end:"start"};function Et(e,t,n){return gt(e,pt(t,n))}function _t(e,t){return"function"==typeof e?e(t):e}function St(e){return e.split("-")[0]}function kt(e){return e.split("-")[1]}function Ct(e){return"x"===e?"y":"x"}function Nt(e){return"y"===e?"height":"width"}function Pt(e){return["top","bottom"].includes(St(e))?"y":"x"}function Tt(e){return Ct(Pt(e))}function Ot(e){return e.replace(/start|end/g,(e=>xt[e]))}function Mt(e){return e.replace(/left|right|bottom|top/g,(e=>wt[e]))}function Rt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var At=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),jt="undefined"==typeof Element,It=jt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ft=!jt&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Lt=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},zt=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Lt(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{It.call(a,At)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!Lt(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&u){var d=e(!0===c?a.children:c.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},Bt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Wt=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Bt(e)?0:e.tabIndex},Vt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ut=function(e){return"INPUT"===e.tagName},$t=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Ht=function(e,t){return!(function(e){return function(e){return Ut(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Ft(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;nsummary:first-of-type")?e.parentElement:e;if(It.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return $t(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=Ft(e);if(a&&!a.shadowRoot&&!0===r(a))return $t(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&Ft(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=Ft(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n=0)},qt=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,s=function(e,t){var n=Wt(e);return n<0&&t&&!Bt(e)?0:n}(a,i),l=i?e(t.candidates):a;0===s?i?n.push.apply(n,l):n.push(a):r.push({documentOrder:o,tabIndex:s,item:t,isScope:i,content:l})})),r.sort(Vt).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Kt=function(e,t){var n;return n=(t=t||{}).getShadowRoot?zt([e],t.includeContainer,{filter:Ht.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Yt}):function(e,t,n){if(Lt(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(At));return t&&It.call(e,At)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Ht.bind(null,t)),qt(n)},Gt=window.ReactDOM;function Xt(e,t,n){let{reference:r,floating:o}=e;const i=Pt(t),a=Tt(t),s=Nt(a),l=St(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let m;switch(l){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(kt(t)){case"start":m[a]-=f*(n&&c?-1:1);break;case"end":m[a]+=f*(n&&c?-1:1)}return m}async function Zt(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=_t(t,e),h=Rt(m),p=s[f?"floating"===d?"reference":"floating":d],g=Dt(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(p)))||n?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=Dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function Jt(e){const t=qe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ze(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=yt(n)!==i||yt(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Qt(e){return Le(e)?e:e.contextElement}function en(e){const t=Qt(e);if(!ze(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Jt(t);let a=(i?yt(n.width):n.width)/r,s=(i?yt(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const tn=bt(0);function nn(e){const t=je(e);return He()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:tn}function rn(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Qt(e);let a=bt(1);t&&(r?Le(r)&&(a=en(r)):a=en(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==je(e))&&t}(i,n,r)?nn(i):bt(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=je(i),t=r&&Le(r)?je(r):r;let n=e,o=Je(n);for(;o&&r&&t!==n;){const e=en(o),t=o.getBoundingClientRect(),r=qe(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=je(o),o=Je(n)}}return Dt({width:u,height:d,x:l,y:c})}function on(e){return rn(Ie(e)).left+Ke(e).scrollLeft}function an(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=je(e),r=Ie(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=He();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Ie(e),n=Ke(e),r=e.ownerDocument.body,o=gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+on(e);const s=-n.scrollTop;return"rtl"===qe(r).direction&&(a+=gt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Ie(e));else if(Le(t))r=function(e,t){const n=rn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ze(e)?en(e):bt(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=nn(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Dt(r)}function sn(e,t){const n=Ge(e);return!(n===t||!Le(n)||Ye(n))&&("fixed"===qe(n).position||sn(n,t))}function ln(e,t,n){const r=ze(t),o=Ie(t),i="fixed"===n,a=rn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=bt(0);if(r||!r&&!i)if(("body"!==Ae(t)||We(o))&&(s=Ke(t)),r){const e=rn(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=on(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function cn(e){return"static"===qe(e).position}function un(e,t){return ze(e)&&"fixed"!==qe(e).position?t?t(e):e.offsetParent:null}function dn(e,t){const n=je(e);if(Ue(e))return n;if(!ze(e)){let t=Ge(e);for(;t&&!Ye(t);){if(Le(t)&&!cn(t))return t;t=Ge(t)}return n}let r=un(e,t);for(;r&&Ve(r)&&cn(r);)r=un(r,t);return r&&Ye(r)&&cn(r)&&!$e(r)?n:r||function(e){let t=Ge(e);for(;ze(t)&&!Ye(t);){if($e(t))return t;if(Ue(t))return null;t=Ge(t)}return null}(e)||n}const fn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Ie(r),s=!!t&&Ue(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=bt(1);const u=bt(0),d=ze(r);if((d||!d&&!i)&&(("body"!==Ae(r)||We(a))&&(l=Ke(r)),ze(r))){const e=rn(r);c=en(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:Ie,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Ue(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ze(e,[],!1).filter((e=>Le(e)&&"body"!==Ae(e))),o=null;const i="fixed"===qe(e).position;let a=i?Ge(e):e;for(;Le(a)&&!Ye(a);){const t=qe(a),n=$e(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||We(a)&&!n&&sn(e,a))?r=r.filter((e=>e!==a)):o=t,a=Ge(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=an(t,n,o);return e.top=gt(r.top,e.top),e.right=pt(r.right,e.right),e.bottom=pt(r.bottom,e.bottom),e.left=gt(r.left,e.left),e}),an(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:dn,getElementRects:async function(e){const t=this.getOffsetParent||dn,n=this.getDimensions,r=await n(e.floating);return{reference:ln(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Jt(e);return{width:t,height:n}},getScale:en,isElement:Le,isRTL:function(e){return"rtl"===qe(e).direction}};function mn(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Qt(e),u=o||i?[...c?Ze(c):[],...Ze(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Ie(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const m={rootMargin:-vt(u)+"px "+-vt(o.clientWidth-(c+d))+"px "+-vt(o.clientHeight-(u+f))+"px "+-vt(c)+"px",threshold:gt(0,pt(1,l))||1};let h=!0;function p(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(p,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(p,m)}r.observe(e)}(!0),i}(c,n):null;let f,m=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let p=l?rn(e):null;return l&&function t(){const r=rn(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const hn=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=St(n),s=kt(n),l="y"===Pt(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=_t(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(m="end"===s?-1*h:h),l?{x:m*u,y:f*c}:{x:f*c,y:m*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},pn=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=_t(e,t),c={x:n,y:r},u=await Zt(t,l),d=Pt(St(o)),f=Ct(d);let m=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";m=Et(m+u["y"===f?"top":"left"],m,m-u[e])}if(a){const e="y"===d?"bottom":"right";h=Et(h+u["y"===d?"top":"left"],h,h-u[e])}const p=s.fn({...t,[f]:m,[d]:h});return{...p,data:{x:p.x-n,y:p.y-r}}}}},gn=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...g}=_t(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=St(o),v=Pt(s),b=St(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!p?[Mt(s)]:function(e){const t=Mt(e);return[Ot(e),t,Ot(t)]}(s)),E="none"!==h;!f&&E&&x.push(...function(e,t,n,r){const o=kt(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(St(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Ot)))),i}(s,p,h,w));const _=[s,...x],S=await Zt(t,g),k=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&k.push(S[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=kt(e),o=Tt(e),i=Nt(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Mt(a)),[a,Mt(a)]}(o,a,w);k.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:o,overflows:k}],!k.every((e=>e<=0))){var N,P;const e=((null==(N=i.flip)?void 0:N.index)||0)+1,t=_[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(P=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!n)switch(m){case"bestFit":{var T;const e=null==(T=C.filter((e=>{if(E){const t=Pt(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},yn=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=_t(e,t),l=await Zt(t,s),c=St(n),u=kt(n),d="y"===Pt(n),{width:f,height:m}=r.floating;let h,p;"top"===c||"bottom"===c?(h=c,p=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=c,h="end"===u?"top":"bottom");const g=m-l.top-l.bottom,y=f-l.left-l.right,v=pt(m-l[h],g),b=pt(f-l[p],y),w=!t.middlewareData.shift;let x=v,E=b;if(d?E=u||w?pt(b,y):y:x=u||w?pt(v,g):g,w&&!u){const e=gt(l.left,0),t=gt(l.right,0),n=gt(l.top,0),r=gt(l.bottom,0);d?E=f-2*(0!==e||0!==t?e+t:gt(l.left,l.right)):x=m-2*(0!==n||0!==r?n+r:gt(l.top,l.bottom))}await a({...t,availableWidth:E,availableHeight:x});const _=await o.getDimensions(i.floating);return f!==_.width||m!==_.height?{reset:{rects:!0}}:{}}}},vn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=_t(e,t)||{};if(null==c)return{};const d=Rt(u),f={x:n,y:r},m=Tt(o),h=Nt(m),p=await a.getDimensions(c),g="y"===m,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[m]-f[m]-i.floating[h],x=f[m]-i.reference[m],E=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let _=E?E[b]:0;_&&await(null==a.isElement?void 0:a.isElement(E))||(_=s.floating[b]||i.floating[h]);const S=w/2-x/2,k=_/2-p[h]/2-1,C=pt(d[y],k),N=pt(d[v],k),P=C,T=_-p[h]-N,O=_/2-p[h]/2+S,M=Et(P,O,T),R=!l.arrow&&null!=kt(o)&&O!==M&&i.reference[h]/2-(O{t.current=e})),t}const Sn=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?vn({element:n.current,padding:r}).fn(t):{}:n?vn({element:n,padding:r}).fn(t):{};var o}}),kn=(e,t)=>({...hn(e),options:[e,t]}),Cn=(e,t)=>({...pn(e),options:[e,t]}),Nn=(e,t)=>({...gn(e),options:[e,t]}),Pn=(e,t)=>({...yn(e),options:[e,t]}),Tn={...s},On=Tn.useInsertionEffect||(e=>e());function Mn(e){const t=s.useRef((()=>{}));return On((()=>{t.current=e})),s.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r=e.current.length}function Ln(e,t){return Bn(e,{disabledIndices:t})}function zn(e,t){return Bn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Bn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const a=e.current;let s=n;do{s+=r?-i:i}while(s>=0&&s<=a.length-1&&Un(a,s,o));return s}function Wn(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function Vn(e,t){return t.flatMap(((t,n)=>e.includes(t)?[n]:[]))}function Un(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}let $n=0;function Hn(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame($n);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():$n=requestAnimationFrame(i)}var Yn="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;function qn(){return qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"floating-ui-"+Math.random().toString(36).slice(2,6)+Gn++,Zn=Tn.useId||function(){const[e,t]=s.useState((()=>Kn?Xn():void 0));return Yn((()=>{null==e&&t(Xn())}),[]),s.useEffect((()=>{Kn=!0}),[]),e},Jn=s.forwardRef((function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:i}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:m,style:{transform:h,...p}={},...g}=e,y=Zn(),[v,b]=s.useState(!1);if(Yn((()=>{r&&"rtl"===qe(r).direction&&b(!0)}),[r]),!r)return null;const[w,x]=n.split("-"),E="top"===w||"bottom"===w;let _=d;(E&&null!=i&&i.x||!E&&null!=i&&i.y)&&(_=null);const S=2*u,k=S/2,C=a/2*(c/-8+1),N=l/2*c/4,P=!!m,T=_&&"end"===x?"bottom":"top";let O=_&&"end"===x?"right":"left";_&&v&&(O="end"===x?"left":"right");const M=null!=(null==o?void 0:o.x)?_||o.x:"",R=null!=(null==o?void 0:o.y)?_||o.y:"",D=m||"M0,0 H"+a+" L"+(a-C)+","+(l-N)+" Q"+a/2+","+l+" "+C+","+(l-N)+" Z",A={top:P?"rotate(180deg)":"",left:P?"rotate(90deg)":"rotate(-90deg)",bottom:P?"":"rotate(180deg)",right:P?"rotate(-90deg)":"rotate(90deg)"}[w];return s.createElement("svg",qn({},g,{"aria-hidden":!0,ref:t,width:P?a:a+S,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[O]:M,[T]:R,[w]:E||P?"100%":"calc(100% - "+S/2+"px)",transform:""+A+(null!=h?h:""),...p}}),S>0&&s.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:S+(m?0:1),d:D}),s.createElement("path",{stroke:S&&!m?g.fill:"none",d:D}),s.createElement("clipPath",{id:y},s.createElement("rect",{x:-k,y:k*(P?-1:1),width:a+S,height:a})))})),Qn=s.createContext(null),er=s.createContext(null),tr=()=>{var e;return(null==(e=s.useContext(Qn))?void 0:e.id)||null},nr=()=>s.useContext(er);function rr(e){return"data-floating-ui-"+e}function or(e){const t=(0,s.useRef)(e);return Yn((()=>{t.current=e})),t}const ir=rr("safe-polygon");function ar(e,t,n){return n&&!lt(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function sr(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let lr=new WeakMap,cr=new WeakSet,ur={},dr=0;const fr=e=>e&&(e.host||fr(e.parentNode));function mr(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=ct(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=((e,t)=>t.map((t=>{if(e.contains(t))return t;const n=fr(t);return e.contains(n)?n:null})).filter((e=>null!=e)))(t,e),s=new Set,l=new Set(a),c=[];ur[o]||(ur[o]=new WeakMap);const u=ur[o];return a.forEach((function e(t){t&&!s.has(t)&&(s.add(t),t.parentNode&&e(t.parentNode))})),function e(t){t&&!l.has(t)&&[].forEach.call(t.children,(t=>{if("script"!==Ae(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(lr.get(t)||0)+1,a=(u.get(t)||0)+1;lr.set(t,r),u.set(t,a),c.push(t),1===r&&n&&cr.add(t),1===a&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),s.clear(),dr++,()=>{c.forEach((e=>{const t=(lr.get(e)||0)-1,n=(u.get(e)||0)-1;lr.set(e,t),u.set(e,n),t||(!cr.has(e)&&i&&e.removeAttribute(i),cr.delete(e)),n||e.removeAttribute(o)})),dr--,dr||(lr=new WeakMap,lr=new WeakMap,cr=new WeakSet,ur={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const hr=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function pr(e,t){const n=Kt(e,hr());"prev"===t&&n.reverse();const r=n.indexOf(Qe(ct(e)));return n.slice(r+1)[0]}function gr(){return pr(document.body,"next")}function yr(){return pr(document.body,"prev")}function vr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!et(n,r)}function br(e){Kt(e,hr()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function wr(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const xr={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Er(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const _r=s.forwardRef((function(e,t){const[n,r]=s.useState();Yn((()=>(it()&&r("button"),document.addEventListener("keydown",Er),()=>{document.removeEventListener("keydown",Er)})),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[rr("focus-guard")]:"",style:xr};return s.createElement("span",qn({},e,o))})),Sr=s.createContext(null),kr=rr("portal");function Cr(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=Zn(),o=Nr(),[i,a]=s.useState(null),l=s.useRef(null);return Yn((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{l.current=null}))}),[i]),Yn((()=>{if(!r)return;if(l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(kr,""),e.appendChild(n),l.current=n,a(n)}),[t,r]),Yn((()=>{if(!r)return;if(l.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!Le(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const s=document.createElement("div");s.id=r,s.setAttribute(kr,""),e=i||e,e.appendChild(s),l.current=s,a(s)}),[t,n,r,o]),i}({id:n,root:r}),[a,l]=s.useState(null),c=s.useRef(null),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),m=null==a?void 0:a.modal,h=null==a?void 0:a.open,p=!!a&&!a.modal&&a.open&&o&&!(!r&&!i);return s.useEffect((()=>{if(i&&o&&!m)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&vr(e)&&("focusin"===e.type?wr:br)(i)}}),[i,o,m]),s.useEffect((()=>{i&&(h||wr(i))}),[h,i]),s.createElement(Sr.Provider,{value:s.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:f,portalNode:i,setFocusManagerState:l})),[o,i])},p&&i&&s.createElement(_r,{"data-type":"outside",ref:c,onFocus:e=>{if(vr(e,i)){var t;null==(t=d.current)||t.focus()}else{const e=yr()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),p&&i&&s.createElement("span",{"aria-owns":i.id,style:xr}),i&&Gt.createPortal(t,i),p&&i&&s.createElement(_r,{"data-type":"outside",ref:u,onFocus:e=>{if(vr(e,i)){var t;null==(t=f.current)||t.focus()}else{const t=gr()||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const Nr=()=>s.useContext(Sr),Pr="data-floating-ui-focusable";function Tr(e){return e?e.hasAttribute(Pr)?e:e.querySelector("["+Pr+"]")||e:null}let Or=[];function Mr(e){Or=Or.filter((e=>e.isConnected));let t=e;if(t&&"body"!==Ae(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==It.call(e,At)&&Ht(t,e)}(t,hr())){const e=Kt(t,hr())[0];e&&(t=e)}Or.push(t),Or.length>20&&(Or=Or.slice(-20))}}function Rr(){return Or.slice().reverse().find((e=>e.isConnected))}const Dr=s.forwardRef((function(e,t){return s.createElement("button",qn({},e,{type:"button",ref:t,tabIndex:-1,style:xr}))}));function Ar(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:f=!0}=e,{open:m,refs:h,nodeId:p,onOpenChange:g,events:y,dataRef:v,floatingId:b,elements:{domReference:w,floating:x}}=t,E="number"==typeof a&&a<0,_=ht(w)&&E,S=!("undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype)||i,k=or(o),C=or(a),N=or(l),P=nr(),T=Nr(),O=s.useRef(null),M=s.useRef(null),R=s.useRef(!1),D=s.useRef(!1),A=s.useRef(-1),j=null!=T,I=Tr(x),F=Mn((function(e){return void 0===e&&(e=I),e?Kt(e,hr()):[]})),L=Mn((e=>{const t=F(e);return k.current.map((e=>w&&"reference"===e?w:I&&"floating"===e?I:t)).filter(Boolean).flat()}));function z(e){return!r&&d&&u?s.createElement(Dr,{ref:"start"===e?O:M,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof d?d:"Dismiss"):null}s.useEffect((()=>{R.current=!1}),[r]),s.useEffect((()=>{if(r)return;if(!u)return;function e(e){if("Tab"===e.key){et(I,Qe(ct(I)))&&0===F().length&&!_&&mt(e);const t=L(),n=dt(e);"reference"===k.current[0]&&n===w&&(mt(e),e.shiftKey?Hn(t[t.length-1]):Hn(t[1])),"floating"===k.current[1]&&n===I&&e.shiftKey&&(mt(e),Hn(t[0]))}}const t=ct(I);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,w,I,u,k,_,F,L]),s.useEffect((()=>{if(!r&&x)return x.addEventListener("focusin",e),()=>{x.removeEventListener("focusin",e)};function e(e){const t=dt(e),n=F().indexOf(t);-1!==n&&(A.current=n)}}),[r,x,F]),s.useEffect((()=>{if(!r&&f)return x&&ze(w)?(w.addEventListener("focusout",t),w.addEventListener("pointerdown",e),x.addEventListener("focusout",t),()=>{w.removeEventListener("focusout",t),w.removeEventListener("pointerdown",e),x.removeEventListener("focusout",t)}):void 0;function e(){D.current=!0,setTimeout((()=>{D.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(et(w,t)||et(x,t)||et(t,x)||et(null==T?void 0:T.portalNode,t)||null!=t&&t.hasAttribute(rr("focus-guard"))||P&&(sr(P.nodesRef.current,p).find((e=>{var n,r;return et(null==(n=e.context)?void 0:n.elements.floating,t)||et(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(P.nodesRef.current,p).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));if(c&&n&&Qe(ct(I))===ct(I).body){ze(I)&&I.focus();const e=A.current,t=F(),n=t[e]||t[t.length-1]||I;ze(n)&&n.focus()}!_&&u||!t||!n||D.current||t===Rr()||(R.current=!0,g(!1,e,"focus-out"))}))}}),[r,w,x,I,u,p,P,T,g,f,c,F,_]),s.useEffect((()=>{var e;if(r)return;const t=Array.from((null==T||null==(e=T.portalNode)?void 0:e.querySelectorAll("["+rr("portal")+"]"))||[]);if(x){const e=[x,...t,O.current,M.current,k.current.includes("reference")||_?w:null].filter((e=>null!=e)),n=u||_?mr(e,S,!S):mr(e);return()=>{n()}}}),[r,w,x,u,k,T,_,S]),Yn((()=>{if(r||!ze(I))return;const e=Qe(ct(I));queueMicrotask((()=>{const t=L(I),n=C.current,r=("number"==typeof n?t[n]:n.current)||I,o=et(I,e);E||o||!m||Hn(r,{preventScroll:r===I})}))}),[r,m,I,E,L,C]),Yn((()=>{if(r||!I)return;let e=!1;const t=ct(I),n=Qe(t);let o=v.current.openEvent;const i=h.domReference.current;function a(t){let{open:n,reason:r,event:i,nested:a}=t;n&&(o=i),"escape-key"===r&&h.domReference.current&&Mr(h.domReference.current),"hover"===r&&"mouseleave"===i.type&&(R.current=!0),"outside-press"===r&&(a?(R.current=!1,e=!0):R.current=!(rt(i)||ot(i)))}return Mr(n),y.on("openchange",a),()=>{y.off("openchange",a);const r=Qe(t),s=et(x,r)||P&&sr(P.nodesRef.current,p).some((e=>{var t;return et(null==(t=e.context)?void 0:t.elements.floating,r)}));(s||o&&["click","mousedown"].includes(o.type))&&h.domReference.current&&Mr(h.domReference.current);const l=i||n,c=Kt(ct(l).body,hr());queueMicrotask((()=>{let n=Rr();!n&&ze(l)&&x&&(n=function(e,t,n){const r=e.indexOf(t);function o(t){const o=rr("focus-guard");let i=r+(t?1:0),a=e[i];for(;a&&(!a.isConnected||a.hasAttribute(o)||et(n,a));)t?i++:i--,a=e[i];return a}return o(!0)||o(!1)}(c,l,x)),N.current&&!R.current&&ze(n)&&(n===r||r===t.body||s)&&n.focus({preventScroll:e})}))}}),[r,x,I,N,v,h,y,P,p]),Yn((()=>{if(!r&&T)return T.setFocusManagerState({modal:u,closeOnFocusOut:f,open:m,onOpenChange:g,refs:h}),()=>{T.setFocusManagerState(null)}}),[r,T,u,m,g,h,f]),Yn((()=>{if(r)return;if(!I)return;if("function"!=typeof MutationObserver)return;if(E)return;const e=()=>{const e=I.getAttribute("tabindex"),t=F(),n=Qe(ct(x)),r=t.indexOf(n);-1!==r&&(A.current=r),k.current.includes("floating")||n!==h.domReference.current&&0===t.length?"0"!==e&&I.setAttribute("tabindex","0"):"-1"!==e&&I.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(I,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[r,x,I,h,k,F,E]);const B=!r&&S&&(!u||!_)&&(j||u);return s.createElement(s.Fragment,null,B&&s.createElement(_r,{"data-type":"inside",ref:null==T?void 0:T.beforeInsideRef,onFocus:e=>{if(u){const e=L();Hn("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=T&&T.preserveTabOrder&&T.portalNode)if(R.current=!1,vr(e,T.portalNode)){const e=gr()||w;null==e||e.focus()}else{var t;null==(t=T.beforeOutsideRef.current)||t.focus()}}}),!_&&z("start"),n,z("end"),B&&s.createElement(_r,{"data-type":"inside",ref:null==T?void 0:T.afterInsideRef,onFocus:e=>{if(u)Hn(L()[0]);else if(null!=T&&T.preserveTabOrder&&T.portalNode)if(f&&(R.current=!0),vr(e,T.portalNode)){const e=yr()||w;null==e||e.focus()}else{var t;null==(t=T.afterOutsideRef.current)||t.focus()}}}))}function jr(e){return ze(e.target)&&"BUTTON"===e.target.tagName}function Ir(e){return ft(e)}function Fr(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:l="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0}=t,f=s.useRef(),m=s.useRef(!1),h=s.useMemo((()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){const t=f.current;0===e.button&&"click"!==l&&(lt(t,!0)&&u||(!n||!c||o.current.openEvent&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=f.current;"mousedown"===l&&f.current?f.current=void 0:lt(t,!0)&&u||(!n||!c||o.current.openEvent&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){f.current=void 0,e.defaultPrevented||!d||jr(e)||(" "!==e.key||Ir(i)||(e.preventDefault(),m.current=!0),"Enter"===e.key&&r(!n||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||jr(e)||Ir(i)||" "===e.key&&m.current&&(m.current=!1,r(!n||!c,e.nativeEvent,"click"))}})),[o,i,l,u,d,r,n,c]);return s.useMemo((()=>a?{reference:h}:{}),[a,h])}const Lr={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},zr={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Br=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Wr(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:m=!1,bubbles:h,capture:p}=t,g=nr(),y=Mn("function"==typeof c?c:()=>!1),v="function"==typeof c?y:c,b=s.useRef(!1),w=s.useRef(!1),{escapeKey:x,outsidePress:E}=Br(h),{escapeKey:_,outsidePress:S}=Br(p),k=Mn((e=>{var t;if(!n||!a||!l||"Escape"!==e.key)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,s=g?sr(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),s.length>0)){let e=!0;if(s.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),C=Mn((e=>{var t;const n=()=>{var t;k(e),null==(t=dt(e))||t.removeEventListener("keydown",n)};null==(t=dt(e))||t.addEventListener("keydown",n)})),N=Mn((e=>{var t;const n=b.current;b.current=!1;const a=w.current;if(w.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof v&&!v(e))return;const s=dt(e),l="["+rr("inert")+"]",c=ct(o.floating).querySelectorAll(l);let d=Le(s)?s:null;for(;d&&!Ye(d);){const e=Ge(d);if(Ye(e)||!Le(e))break;d=e}if(c.length&&Le(s)&&!s.matches("html,body")&&!et(s,o.floating)&&Array.from(c).every((e=>!et(d,e))))return;if(ze(s)&&O){const t=s.clientWidth>0&&s.scrollWidth>s.clientWidth,n=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=n&&e.offsetX>s.clientWidth;if(n&&"rtl"===qe(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth),r||t&&e.offsetY>s.clientHeight)return}const f=null==(t=i.current.floatingContext)?void 0:t.nodeId,m=g&&sr(g.nodesRef.current,f).some((t=>{var n;return ut(e,null==(n=t.context)?void 0:n.elements.floating)}));if(ut(e,o.floating)||ut(e,o.domReference)||m)return;const h=g?sr(g.nodesRef.current,f):[];if(h.length>0){let e=!0;if(h.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),P=Mn((e=>{var t;const n=()=>{var t;N(e),null==(t=dt(e))||t.removeEventListener(u,n)};null==(t=dt(e))||t.addEventListener(u,n)}));s.useEffect((()=>{if(!n||!a)return;function e(e){r(!1,e,"ancestor-scroll")}i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=E;const t=ct(o.floating);l&&t.addEventListener("keydown",_?C:k,_),v&&t.addEventListener(u,S?P:N,S);let s=[];return m&&(Le(o.domReference)&&(s=Ze(o.domReference)),Le(o.floating)&&(s=s.concat(Ze(o.floating))),!Le(o.reference)&&o.reference&&o.reference.contextElement&&(s=s.concat(Ze(o.reference.contextElement)))),s=s.filter((e=>{var n;return e!==(null==(n=t.defaultView)?void 0:n.visualViewport)})),s.forEach((t=>{t.addEventListener("scroll",e,{passive:!0})})),()=>{l&&t.removeEventListener("keydown",_?C:k,_),v&&t.removeEventListener(u,S?P:N,S),s.forEach((t=>{t.removeEventListener("scroll",e)}))}}),[i,o,l,v,u,n,r,m,a,x,E,k,_,C,N,S,P]),s.useEffect((()=>{b.current=!1}),[v,u]);const T=s.useMemo((()=>({onKeyDown:k,[Lr[f]]:e=>{d&&r(!1,e.nativeEvent,"reference-press")}})),[k,r,d,f]),O=s.useMemo((()=>({onKeyDown:k,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[zr[u]]:()=>{b.current=!0}})),[k,u]);return s.useMemo((()=>a?{reference:T,floating:O}:{}),[a,T,O])}function Vr(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zn(),i=s.useRef({}),[a]=s.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=tr(),[c,u]=s.useState(r.reference),d=Mn(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),f=s.useMemo((()=>({setPositionReference:u})),[]),m=s.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return s.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:m,events:a,floatingId:o,refs:f})),[t,d,m,a,o,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=s.useState(null),[l,c]=s.useState(null),u=(null==o?void 0:o.reference)||i,d=s.useRef(null),f=nr();Yn((()=>{u&&(d.current=u)}),[u]);const m=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=s.useState(r);wn(m,r)||h(r);const[p,g]=s.useState(null),[y,v]=s.useState(null),b=s.useCallback((e=>{e!==_.current&&(_.current=e,g(e))}),[]),w=s.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),x=i||p,E=a||y,_=s.useRef(null),S=s.useRef(null),k=s.useRef(d),C=null!=c,N=_n(c),P=_n(o),T=s.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:n,middleware:m};P.current&&(e.platform=P.current),((e,t,n)=>{const r=new Map,o={platform:fn,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Xt(c,r,l),f=r,m={},h=0;for(let n=0;n{const t={...e,isPositioned:!0};O.current&&!wn(k.current,t)&&(k.current=t,Gt.flushSync((()=>{f(t)})))}))}),[m,t,n,P]);bn((()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const O=s.useRef(!1);bn((()=>(O.current=!0,()=>{O.current=!1})),[]),bn((()=>{if(x&&(_.current=x),E&&(S.current=E),x&&E){if(N.current)return N.current(x,E,T);T()}}),[x,E,T,N,C]);const M=s.useMemo((()=>({reference:_,floating:S,setReference:b,setFloating:w})),[b,w]),R=s.useMemo((()=>({reference:x,floating:E})),[x,E]),D=s.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=En(R.floating,d.x),r=En(R.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...xn(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,R.floating,d.x,d.y]);return s.useMemo((()=>({...d,update:T,refs:M,elements:R,floatingStyles:D})),[d,T,M,R,D])}({...e,elements:{...o,...l&&{reference:l}}}),h=s.useCallback((e=>{const t=Le(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),m.refs.setReference(t)}),[m.refs]),p=s.useCallback((e=>{(Le(e)||null===e)&&(d.current=e,a(e)),(Le(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!Le(e))&&m.refs.setReference(e)}),[m.refs]),g=s.useMemo((()=>({...m.refs,setReference:p,setPositionReference:h,domReference:d})),[m.refs,p,h]),y=s.useMemo((()=>({...m.elements,domReference:u})),[m.elements,u]),v=s.useMemo((()=>({...m,...r,refs:g,elements:y,nodeId:t})),[m,g,y,t,r]);return Yn((()=>{r.dataRef.current.floatingContext=v;const e=null==f?void 0:f.nodesRef.current.find((e=>e.id===t));e&&(e.context=v)})),s.useMemo((()=>({...m,context:v,refs:g,elements:y})),[m,g,y,v])}const Ur="active",$r="selected";function Hr(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Ur]:t,[$r]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Pr]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var a;o&&[Ur,$r].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;ie(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}function Yr(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=s.useCallback((t=>Hr(t,e,"reference")),t),i=s.useCallback((t=>Hr(t,e,"floating")),n),a=s.useCallback((t=>Hr(t,e,"item")),r);return s.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}let qr=!1;function Kr(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Gr(e,t){return Kr(t,e===Rn||e===Dn,e===An||e===jn)}function Xr(e,t,n){return Kr(t,e===Dn,n?e===An:e===jn)||"Enter"===e||" "===e||""===e}function Zr(e,t,n){return Kr(t,n?e===jn:e===An,e===Rn)}const Jr=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Qr(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,l=null!=(n=Jr.get(a))?n:a,c=Zn(),u=null!=tr(),d=s.useMemo((()=>"tooltip"===l||"label"===a?{["aria-"+("label"===a?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":r?o:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:c},..."menu"===l&&u&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}}),[l,o,u,r,c,a]),f=s.useMemo((()=>{const e={id:o,...l&&{role:l}};return"tooltip"===l||"label"===a?e:{...e,..."menu"===l&&{"aria-labelledby":c}}}),[l,o,c,a]),m=s.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:o+"-option"}};switch(a){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[o,a]);return s.useMemo((()=>i?{reference:d,floating:f,item:m}:{}),[i,d,f,m])}const eo=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function to(e,t){return"function"==typeof e?e(t):e}function no(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,l=e.placement,c=l.split("-")[0],u=s.useMemo((()=>({side:c,placement:l})),[c,l]),d="number"==typeof a,f=(d?a:a.open)||0,m=(d?a:a.close)||0,[h,p]=s.useState((()=>({...to(i,u),...to(n,u)}))),{isMounted:g,status:y}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[a,l]=s.useState("unmounted"),c=function(e,t){const[n,r]=s.useState(e);return e&&!n&&r(!0),s.useEffect((()=>{if(!e&&n){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,n,t]),n}(n,i);return c||"close"!==a||l("unmounted"),Yn((()=>{if(r){if(n){l("initial");const e=requestAnimationFrame((()=>{l("open")}));return()=>{cancelAnimationFrame(e)}}l("close")}}),[n,r]),{isMounted:c,status:a}}(e,{duration:a}),v=or(n),b=or(r),w=or(o),x=or(i);return Yn((()=>{const e=to(v.current,u),t=to(w.current,u),n=to(x.current,u),r=to(b.current,u)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===y&&p((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===y&&p({transitionProperty:Object.keys(r).map(eo).join(","),transitionDuration:f+"ms",...n,...r}),"close"===y){const r=t||e;p({transitionProperty:Object.keys(r).map(eo).join(","),transitionDuration:m+"ms",...n,...r})}}),[m,w,v,b,x,f,y,u]),{isMounted:g,styles:h}}function ro(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e=r!=c>=r&&n<=(l-i)*(r-s)/(c-s)+i&&(o=!o)}return o}function oo(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:f,nodeId:m,tree:h}=e;return function(e){function p(){clearTimeout(o),f()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:g,clientY:y}=e,v=[g,y],b=dt(e),w="mouseleave"===e.type,x=et(d.floating,b),E=et(d.domReference,b),_=d.domReference.getBoundingClientRect(),S=d.floating.getBoundingClientRect(),k=u.split("-")[0],C=n>S.right-S.width/2,N=c>S.bottom-S.height/2,P=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(v,_),T=S.width>_.width,O=S.height>_.height,M=(T?_:S).left,R=(T?_:S).right,D=(O?_:S).top,A=(O?_:S).bottom;if(x&&(i=!0,!w))return;if(E&&(i=!1),E&&!w)return void(i=!0);if(w&&Le(e.relatedTarget)&&et(d.floating,e.relatedTarget))return;if(h&&sr(h.nodesRef.current,m).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===k&&c>=_.bottom-1||"bottom"===k&&c<=_.top+1||"left"===k&&n>=_.right-1||"right"===k&&n<=_.left+1)return p();let j=[];switch(k){case"top":j=[[M,_.top+1],[M,S.bottom-1],[R,S.bottom-1],[R,_.top+1]];break;case"bottom":j=[[M,S.top+1],[M,_.bottom-1],[R,_.bottom-1],[R,S.top+1]];break;case"left":j=[[S.right-1,A],[S.right-1,D],[_.left+1,D],[_.left+1,A]];break;case"right":j=[[_.right-1,A],[_.right-1,D],[S.left+1,D],[S.left+1,A]]}if(!ro([g,y],j)){if(i&&!P)return p();if(!w&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===a||null===s||0===r)return a=e,s=t,l=n,null;const o=e-a,i=t-s,c=Math.sqrt(o*o+i*i);return a=e,s=t,l=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return p()}ro([g,y],function(e){let[n,r]=e;switch(k){case"top":return[[T?n+t/2:C?n+4*t:n-4*t,r+t+1],[T?n-t/2:C?n+4*t:n-4*t,r+t+1],[S.left,C||T?S.bottom-t:S.top],[S.right,C?T?S.bottom-t:S.top:S.bottom-t]];case"bottom":return[[T?n+t/2:C?n+4*t:n-4*t,r-t],[T?n-t/2:C?n+4*t:n-4*t,r-t],[S.left,C||T?S.top+t:S.bottom],[S.right,C?T?S.top+t:S.bottom:S.top+t]];case"left":{const e=[n+t+1,O?r+t/2:N?r+4*t:r-4*t],o=[n+t+1,O?r-t/2:N?r+4*t:r-4*t];return[[N||O?S.right-t:S.left,S.top],[N?O?S.right-t:S.left:S.right-t,S.bottom],e,o]}case"right":return[[n-t,O?r+t/2:N?r+4*t:r-4*t],[n-t,O?r-t/2:N?r+4*t:r-4*t],[N||O?S.left+t:S.right,S.top],[N?O?S.left+t:S.right:S.left+t,S.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(p,40)):p()}}};return c.__options={blockPointerEvents:n},c}const io=xe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),ao=xe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);var so="light",lo="neutral",co=function(e){var t=e.icon,n=void 0===t?null:t,r=e.theme,o=void 0===r?so:r,i=e.variant,a=void 0===i?lo:i,l="[&>svg]:h-5 [&>svg]:w-5",c=function(e){var t=e.theme,n=void 0===t?so:t,r=e.variant;return{info:"light"===n?"text-support-info":"text-support-info-inverse",success:"light"===n?"text-support-success":"text-support-success-inverse",warning:"light"===n?"text-support-warning":"text-support-warning-inverse",error:"light"===n?"text-support-error":"text-support-error-inverse"}[void 0===r?lo:r]||("light"===n?"text-icon-secondary":"text-icon-inverse")}({theme:o,variant:a});if(n&&(0,s.isValidElement)(n))return(0,s.cloneElement)(n,{className:re(l,c,n.props.className)});var u={neutral:React.createElement(Te,{className:re(l,c)}),info:React.createElement(Te,{className:re(l,c)}),success:React.createElement(_e,{className:re(l,c)}),warning:React.createElement(io,{className:re(l,c)}),error:React.createElement(ao,{className:re(l,c)})};return u[a]||u.neutral},uo=function(e){var t=e.actionType,n=void 0===t?"button":t,r=e.onAction,o=void 0===r?function(){}:r,i=e.actionLabel,a=void 0===i?"":i,s=e.theme,l=void 0===s?so:s,c="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none",u="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===l&&(u="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),n){case"button":return React.createElement(ue,{variant:"outline",size:"xs",onClick:o,className:re("rounded",c,u,"dark"===l?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white")},a);case"link":return React.createElement(ue,{variant:"link",size:"xs",onClick:o,className:re(c,u)},a);default:return null}},fo=function(e){var t=e.theme,n=void 0===t?so:t,r=e.title,o=void 0===r?"":r;return!o&&isNaN(o)?null:React.createElement("span",{className:re("block",{light:"text-text-primary",dark:"text-text-inverse"}[n],"text-sm leading-5 font-semibold")},o)},mo=function(e){var t=e.theme,n=void 0===t?so:t,r=e.content,o=void 0===r?"":r;return!o&&isNaN(o)?null:React.createElement("span",{className:re({light:"text-text-primary",dark:"text-text-inverse"}[n],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal")},o)},ho=function(){for(var e=arguments.length,t=new Array(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n{})),C=s.useCallback((()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[o]);s.useEffect((()=>{if(l)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(w.current),clearTimeout(E.current),_.current=!0)}}),[l,i]),s.useEffect((()=>{if(!l)return;if(!g.current)return;if(!n)return;function e(e){C()&&r(!1,e,"hover")}const t=ct(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[a.floating,n,r,l,g,C]);const N=s.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=ar(y.current,"close",b.current);o&&!x.current?(clearTimeout(w.current),w.current=window.setTimeout((()=>r(!1,e,n)),o)):t&&(clearTimeout(w.current),r(!1,e,n))}),[y,r]),P=Mn((()=>{k.current(),x.current=void 0})),T=Mn((()=>{if(S.current){const e=ct(a.floating).body;e.style.pointerEvents="",e.removeAttribute(ir),S.current=!1}}));s.useEffect((()=>{if(l&&Le(a.domReference)){var e;const t=a.domReference;return n&&t.addEventListener("mouseleave",c),null==(e=a.floating)||e.addEventListener("mouseleave",c),m&&t.addEventListener("mousemove",i,{once:!0}),t.addEventListener("mouseenter",i),t.addEventListener("mouseleave",s),()=>{var e;n&&t.removeEventListener("mouseleave",c),null==(e=a.floating)||e.removeEventListener("mouseleave",c),m&&t.removeEventListener("mousemove",i),t.removeEventListener("mouseenter",i),t.removeEventListener("mouseleave",s)}}function t(){return!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)}function i(e){if(clearTimeout(w.current),_.current=!1,d&&!lt(b.current)||f>0&&!ar(y.current,"open"))return;const t=ar(y.current,"open",b.current);t?w.current=window.setTimeout((()=>{v.current||r(!0,e,"hover")}),t):r(!0,e,"hover")}function s(e){if(t())return;k.current();const r=ct(a.floating);if(clearTimeout(E.current),g.current&&o.current.floatingContext){n||clearTimeout(w.current),x.current=g.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){T(),P(),N(e,!0,"safe-polygon")}});const t=x.current;return r.addEventListener("mousemove",t),void(k.current=()=>{r.removeEventListener("mousemove",t)})}("touch"!==b.current||!et(a.floating,e.relatedTarget))&&N(e)}function c(e){t()||o.current.floatingContext&&(null==g.current||g.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){T(),P(),N(e)}})(e))}}),[a,l,e,d,f,m,N,P,T,r,n,v,h,y,g,o]),Yn((()=>{var e;if(l&&n&&null!=(e=g.current)&&e.__options.blockPointerEvents&&C()){S.current=!0;const e=a.floating;if(Le(a.domReference)&&e){var t;const n=ct(a.floating).body;n.setAttribute(ir,"");const r=a.domReference,o=null==h||null==(t=h.nodesRef.current.find((e=>e.id===p)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[l,n,p,a,h,g,C]),Yn((()=>{n||(b.current=void 0,P(),T())}),[n,P,T]),s.useEffect((()=>()=>{P(),clearTimeout(w.current),clearTimeout(E.current),T()}),[l,a.domReference,P,T]);const O=s.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){_.current||v.current||r(!0,t,"hover")}d&&!lt(b.current)||n||0===f||(clearTimeout(E.current),"touch"===b.current?o():E.current=window.setTimeout(o,f))}}}),[d,r,n,v,f]),M=s.useMemo((()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(e){N(e.nativeEvent,!1)}})),[N]);return s.useMemo((()=>l?{reference:O,floating:M}:{}),[l,O,M])}(W,vo({move:!1,enabled:!D&&O.includes("hover")},R&&{handleClose:oo()})),$=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:l=!0,visibleOnly:c=!0}=t,u=s.useRef(!1),d=s.useRef(),f=s.useRef(!0);s.useEffect((()=>{if(!l)return;const e=je(a.domReference);function t(){!n&&ze(a.domReference)&&a.domReference===Qe(ct(a.domReference))&&(u.current=!0)}function r(){f.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}}),[a.domReference,n,l]),s.useEffect((()=>{if(l)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(u.current=!0)}}),[o,l]),s.useEffect((()=>()=>{clearTimeout(d.current)}),[]);const m=s.useMemo((()=>({onPointerDown(e){ot(e.nativeEvent)||(f.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=dt(e.nativeEvent);if(c&&Le(t))try{if(it()&&st())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!f.current&&!ft(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=Le(t)&&t.hasAttribute(rr("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout((()=>{var e;const s=Qe(a.domReference?a.domReference.ownerDocument:document);(t||s!==a.domReference)&&(et(null==(e=i.current.floatingContext)?void 0:e.refs.floating.current,s)||et(a.domReference,s)||o||r(!1,n,"focus"))}))}})),[i,a.domReference,r,c]);return s.useMemo((()=>l?{reference:m}:{}),[l,m])}(W,{enabled:!D&&O.includes("focus")}),H=Yr([V,U,$,Wr(W),Qr(W,{role:"tooltip"})]),Y=H.getReferenceProps,q=H.getFloatingProps,K=no(W,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),G=K.isMounted,X=K.styles,Z=null===(t={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"})||void 0===t?void 0:t[i],J="dark"===i?"text-tooltip-background-dark":"text-tooltip-background-light";return l().createElement(l().Fragment,null,(0,s.isValidElement)(y)&&(0,s.cloneElement)(y,vo(vo({},y.props),{},{ref:ho(y.ref,z.setReference),className:re(y.props.className)},Y())),l().createElement(Cr,{id:E,root:w},G&&l().createElement("div",go({className:re("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",Z,"max-w-80 w-fit",v),ref:z.setFloating,style:vo(vo({},B),X)},q()),l().createElement("div",null,!!d&&l().createElement("span",{className:"font-semibold"},d),!!f&&l().createElement("div",{className:"font-normal"},f)),h&&l().createElement(Jn,{ref:F,context:W,placement:c,className:re("fill-current",J)}))))},Eo=["id","label","value","children","disabled","icon","inlineIcon","hideSelection","reversePosition","borderOn","borderOnActive","badgeItem","useSwitch","info","minWidth"],_o=["id","children","value","disabled","size"];function So(){return So=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);nsvg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return p?(_=E.disabled,S+=" cursor-not-allowed disabled"):_=E[d],r?React.createElement("span",{className:re("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[i],{pill:"rounded-full",rounded:"rounded"}[c],"gap-0.5",_,s),ref:t},m?React.createElement("span",{className:re("justify-center flex items-center",k[i])},m):null,React.createElement("span",{className:"px-1"},r),b&&React.createElement("span",{className:re(S,k[i]),onClick:p?null:y,onMouseDown:x,role:"button",tabIndex:0},React.createElement("span",{className:"sr-only"},"Remove ".concat(r)),React.createElement(jo,null),React.createElement("span",{className:"absolute -inset-1"}))):null}));Io.displayName="Badge";var Fo=Io,Lo=["id","defaultValue","value","size","className","disabled","onChange","error","onError"];function zo(){return zo=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);nsvg]:size-3 text-xs",xs:"size-6 [&>svg]:size-4 text-sm",sm:"size-8 [&>svg]:size-5 text-base",md:"size-10 [&>svg]:size-6 text-lg",lg:"size-12 [&>svg]:size-12 text-lg"})||void 0===n?void 0:n[l],y=null===(r={none:"",subtle:"ring-1 ring-border-transparent-subtle",ring:"ring ring-border-subtle"})||void 0===r?void 0:r[f&&"none"===u?"subtle":u],v=f?"bg-cover bg-center":"";return React.createElement("div",{className:re("rounded-full overflow-hidden flex items-center justify-center",!f&&p,g,y,v,h),style:f?{backgroundImage:"url(".concat(f,")")}:{}},m?"string"==typeof m?null==m||null===(o=m[0])||void 0===o?void 0:o.toUpperCase():m:null)};const $o=xe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);var Ho=["id","type","defaultValue","value","size","className","disabled","onChange","error","onError","prefix","suffix","label"];function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0?I(t[0].name):I(null):t=e.target.value,O||"file"===o||D(t),"function"==typeof g&&g(t))},z=function(){I(null),P.current&&(P.current.value=null),g(null)},B="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none",W={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},V={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},U={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},$={sm:E?"pl-8":"",md:E?"pl-9":"",lg:E?"pl-10":""},H={sm:S?"pr-8":"",md:S?"pr-9":"",lg:S?"pr-10":""},Y=h?"hover:outline-border-disabled":"hover:outline-border-strong",q="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",K=v?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",G=v?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",X=h?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",Z=h?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",J="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",Q=h?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",ee={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},te=j?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===o?React.createElement("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border"},React.createElement("label",{className:re(V[u],"text-field-label"),htmlFor:T},C),React.createElement("div",{className:re("w-full relative flex focus-within:z-10",f)},React.createElement("input",Yo({ref:t,id:T,type:"file",className:re(B,Z,W[u],U[u],q,Y,G,te),disabled:h,onChange:L,onInvalid:w},N)),React.createElement("div",{className:re(Q,"right-0 pr-3",ee[u])},React.createElement($o,null)))):React.createElement("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border"},React.createElement("label",{className:re(V[u],"text-field-label"),htmlFor:T},C),React.createElement("div",{className:re("w-full relative flex focus-within:z-10",f)},E?React.createElement("div",{className:re(J,"left-0 pl-3",U[u])},E):null,React.createElement("input",Yo({ref:P,id:T,type:o,className:re(B,X,W[u],U[u],$[u],H[u],q,Y,K),disabled:h,onChange:L,onInvalid:w,value:F()},N)),"file"===o?j?React.createElement("div",{className:re(Q,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",ee[u]),onClick:z,role:"button",tabIndex:0,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||z()}},React.createElement(jo,null)):React.createElement("div",{className:re(Q,"right-0 pr-3",ee[u])},React.createElement($o,null)):S?React.createElement("div",{className:re(J,"right-0 pr-3",U[u])},S):null))}));Go.displayName="Input";var Xo=Go,Zo=["children","tag","size","className","variant","required"];function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[s],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[f],g,u)},p),r)})),ei=Qo,ti=function(e){var t=e.title,n=void 0===t?null:t,r=e.description,o=void 0===r?null:r,i=e.icon,a=void 0===i?null:i,s=e.iconPosition,l=void 0===s?"right":s,c=e.tag,u=void 0===c?"h2":c,d=e.size,f=void 0===d?"sm":d,m=e.className,h=void 0===m?"":m,p={xs:"gap-1 [&>svg]:size-3.5",sm:"gap-1 [&>svg]:size-4",md:"gap-1.5 [&>svg]:size-5",lg:"gap-1.5 [&>svg]:size-5"};if(!n)return null;var g=function(){var e=u;return React.createElement(e,{className:re("font-semibold p-0 m-0",{xs:"text-base [&>*]:text-base gap-1",sm:"text-lg [&>*]:text-lg gap-1",md:"text-xl [&>*]:text-xl gap-1.5",lg:"text-2xl [&>*]:text-2xl gap-1.5"}[f])},n)};return o?React.createElement("div",{className:h},React.createElement("div",null,a&&"left"===l&&React.createElement("div",{className:re("flex items-center",p[f])},a,g()),a&&"right"===l&&React.createElement("div",{className:re("flex items-center",p[f])},g(),a),!a&&g()),React.createElement("p",{className:re("text-text-secondary font-normal my-0",{xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"}[f])},o)):React.createElement("div",{className:h},a&&"left"===l&&React.createElement("div",{className:re("flex items-center",p[f])},a,g()),a&&"right"===l&&React.createElement("div",{className:re("flex items-center",p[f])},g(),a),!a&&g())};const ni=xe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var ri=function(e){var t,n,r=e.variant,o=void 0===r?"primary":r,i=e.size,a=void 0===i?"md":i,s=e.icon,l=void 0===s?null:s,c=e.className,u=void 0===c?"":c,d=null===(t={primary:"text-brand-primary-600 bg-background-primary",secondary:"text-background-primary bg-brand-primary-600"})||void 0===t?void 0:t[o],f=null===(n={sm:"[&>svg]:h-4 [&>svg]:w-4",md:"[&>svg]:h-5 [&>svg]:w-5",lg:"[&>svg]:h-6 [&>svg]:w-6",xl:"[&>svg]:h-8 [&>svg]:w-8"})||void 0===n?void 0:n[a];return React.createElement("span",{className:re("flex",f,d,u)},l||React.createElement(ni,{className:"animate-spin"}))},oi=function(e){var t=e.progress,n=void 0===t?0:t,r=e.speed,o=void 0===r?200:r,i=e.className,a=void 0===i?"":i;if(!n)return null;var s=n;n<0&&(s=0),n>100&&(s=100);var l="translateX(-".concat(100-s,"%)"),c="h-2 rounded-full bg-background-brand absolute left-0 top-0 w-full bottom-0 origin-left transition-transform duration-".concat(o," ease-linear");return React.createElement("div",{className:re("h-2 rounded-full bg-misc-progress-background overflow-hidden relative",a),role:"progressbar","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},React.createElement("div",{className:c,style:{transform:l}}))},ii=["slug","text","icon","className","disabled","isFirstChild","isLastChild"];function ai(){return ai=Object.assign?Object.assign.bind():function(e){for(var t=1;tsvg]:size-4",sm:"py-2 px-2 text-base gap-1 [&>svg]:size-4",md:"py-2.5 px-2.5 text-base gap-1 [&>svg]:size-5"}[g],"border-0 border-r border-border-subtle border-solid",h===r?"bg-button-disabled":"",d?"rounded-tl rounded-bl border-0 border-r border-border-subtle":"",f?"rounded-tr rounded-br border-0":"",a);return l().createElement("button",ai({ref:t,className:v,disabled:u,onClick:function(e){p(e,{slug:r,text:o})}},m),"left"===y&&i&&l().createElement("span",{className:"mr-1"},i),o,"right"===y&&i&&l().createElement("span",{className:"ml-1"},i))}));li.displayName="Button";var ci={Group:function(e){var t=e.children,n=e.activeItem,r=void 0===n?null:n,o=e.onChange,i=e.className,a=e.size,c=void 0===a?"md":a,u=e.iconPosition,d=void 0===u?"left":u,f=(0,s.useCallback)((function(e,t){o&&o({event:e,value:t})}),[o]),m=re("box-border flex border border-border-subtle border-solid rounded",i);return l().createElement("div",{className:m},l().createElement(si.Provider,{value:{activeItem:r,onChange:f,size:c,iconPosition:d}},l().Children.map(t,(function(e,n){if(!(0,s.isValidElement)(e))return null;var r=0===n,o=n===l().Children.count(t)-1;return l().cloneElement(e,{index:n,isFirstChild:r,isLastChild:o})}))))},Button:li},ui=ci;function di(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const fi=e=>Array.isArray(e);function mi(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function gi(e,t,n,r){if("function"==typeof t){const[o,i]=pi(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]=pi(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function yi(e,t,n){const r=e.getProps();return gi(r,t,void 0!==n?n:r.custom,e)}const vi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bi=["initial",...vi],wi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xi=new Set(wi),Ei=e=>1e3*e,_i=e=>e/1e3,Si={type:"spring",stiffness:500,damping:25,restSpeed:10},ki={type:"keyframes",duration:.8},Ci={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ni=(e,{keyframes:t})=>t.length>2?ki:xi.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Si:Ci;function Pi(e,t){return e[t]||e.default||e}const Ti=e=>null!==e;function Oi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Ti),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}const Mi=e=>e,Ri=["read","resolveKeyframes","update","preRender","render","postRender"];function Di(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Ri.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){i.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,o=!1,a=!1)=>{const s=a&&r?t:n;return o&&i.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{a=e,r?o=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e)),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=a,m=()=>{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),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:Ri.reduce(((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(m)),s.schedule(t,i,a)),t}),{}),cancel:e=>{for(let t=0;t/^0[^.\s]+$/u.test(e);let zi=Mi,Bi=Mi;const Wi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Vi=e=>t=>"string"==typeof t&&t.startsWith(e),Ui=Vi("--"),$i=Vi("var(--"),Hi=e=>!!$i(e)&&Yi.test(e.split("/*")[0].trim()),Yi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,qi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ki(e,t,n=1){Bi(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=qi.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 Wi(e)?parseFloat(e):e}return Hi(o)?Ki(o,t,n+1):o}const Gi=(e,t,n)=>n>t?t:n"number"==typeof e,parse:parseFloat,transform:e=>e},Zi={...Xi,transform:e=>Gi(0,1,e)},Ji={...Xi,default:1},Qi=e=>Math.round(1e5*e)/1e5,ea=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,ta=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,na=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ra(e){return"string"==typeof e}const oa=e=>({test:t=>ra(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),ia=oa("deg"),aa=oa("%"),sa=oa("px"),la=oa("vh"),ca=oa("vw"),ua={...aa,parse:e=>aa.parse(e)/100,transform:e=>aa.transform(100*e)},da=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),fa=e=>e===Xi||e===sa,ma=(e,t)=>parseFloat(e.split(", ")[t]),ha=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return ma(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?ma(t[1],e):0}},pa=new Set(["x","y","z"]),ga=wi.filter((e=>!pa.has(e))),ya={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:ha(4,13),y:ha(5,14)};ya.translateX=ya.x,ya.translateY=ya.y;const va=e=>t=>t.test(e),ba=[Xi,sa,aa,ia,ca,la,{test:e=>"auto"===e,parse:e=>e}],wa=e=>ba.find(va(e)),xa=new Set;let Ea=!1,_a=!1;function Sa(){if(_a){const e=Array.from(xa).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 ga.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)}))}_a=!1,Ea=!1,xa.forEach((e=>e.complete())),xa.clear()}function ka(){xa.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(_a=!0)}))}class Ca{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?(xa.add(this),Ea||(Ea=!0,Ai.read(ka),Ai.resolveKeyframes(Sa))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;on=>Boolean(ra(n)&&na.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Pa=(e,t,n)=>r=>{if(!ra(r))return r;const[o,i,a,s]=r.match(ea);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Ta={...Xi,transform:e=>Math.round((e=>Gi(0,255,e))(e))},Oa={test:Na("rgb","red"),parse:Pa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ta.transform(e)+", "+Ta.transform(t)+", "+Ta.transform(n)+", "+Qi(Zi.transform(r))+")"},Ma={test:Na("#"),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:Oa.transform},Ra={test:Na("hsl","hue"),parse:Pa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+aa.transform(Qi(t))+", "+aa.transform(Qi(n))+", "+Qi(Zi.transform(r))+")"},Da={test:e=>Oa.test(e)||Ma.test(e)||Ra.test(e),parse:e=>Oa.test(e)?Oa.parse(e):Ra.test(e)?Ra.parse(e):Ma.parse(e),transform:e=>ra(e)?e:e.hasOwnProperty("red")?Oa.transform(e):Ra.transform(e)},Aa="number",ja="color",Ia=/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 Fa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Ia,(e=>(Da.test(e)?(r.color.push(i),o.push(ja),n.push(Da.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Aa),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:a,indexes:r,types:o}}function La(e){return Fa(e).values}function za(e){const{split:t,types:n}=Fa(e),r=t.length;return e=>{let o="";for(let i=0;i"number"==typeof e?0:e,Wa={test:function(e){var t,n;return isNaN(e)&&ra(e)&&((null===(t=e.match(ea))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(ta))||void 0===n?void 0:n.length)||0)>0},parse:La,createTransformer:za,getAnimatableNone:function(e){const t=La(e);return za(e)(t.map(Ba))}},Va=new Set(["brightness","contrast","saturate","opacity"]);function Ua(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ea)||[];if(!r)return e;const o=n.replace(r,"");let i=Va.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const $a=/\b([a-z-]*)\(.*?\)/gu,Ha={...Wa,getAnimatableNone:e=>{const t=e.match($a);return t?t.map(Ua).join(" "):e}},Ya={...Xi,transform:Math.round},qa={borderWidth:sa,borderTopWidth:sa,borderRightWidth:sa,borderBottomWidth:sa,borderLeftWidth:sa,borderRadius:sa,radius:sa,borderTopLeftRadius:sa,borderTopRightRadius:sa,borderBottomRightRadius:sa,borderBottomLeftRadius:sa,width:sa,maxWidth:sa,height:sa,maxHeight:sa,size:sa,top:sa,right:sa,bottom:sa,left:sa,padding:sa,paddingTop:sa,paddingRight:sa,paddingBottom:sa,paddingLeft:sa,margin:sa,marginTop:sa,marginRight:sa,marginBottom:sa,marginLeft:sa,rotate:ia,rotateX:ia,rotateY:ia,rotateZ:ia,scale:Ji,scaleX:Ji,scaleY:Ji,scaleZ:Ji,skew:ia,skewX:ia,skewY:ia,distance:sa,translateX:sa,translateY:sa,translateZ:sa,x:sa,y:sa,z:sa,perspective:sa,transformPerspective:sa,opacity:Zi,originX:ua,originY:ua,originZ:sa,zIndex:Ya,backgroundPositionX:sa,backgroundPositionY:sa,fillOpacity:Zi,strokeOpacity:Zi,numOctaves:Ya},Ka={...qa,color:Da,backgroundColor:Da,outlineColor:Da,fill:Da,stroke:Da,borderColor:Da,borderTopColor:Da,borderRightColor:Da,borderBottomColor:Da,borderLeftColor:Da,filter:Ha,WebkitFilter:Ha},Ga=e=>Ka[e];function Xa(e,t){let n=Ga(e);return n!==Ha&&(n=Wa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Za=new Set(["auto","none","0"]);class Ja extends Ca{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 n=0;n{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function Qa(e){let t;return()=>(void 0===t&&(t=e()),t)}let es;function ts(){es=void 0}const ns={now:()=>(void 0===es&&ns.set(Ii.isProcessing?Ii.timestamp:performance.now()),es),set:e=>{es=e,queueMicrotask(ts)}},rs=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Wa.test(e)&&"0"!==e||e.startsWith("url(")));class os{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=ns.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||(ka(),Sa()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=ns.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=rs(o,t),s=rs(i,t);return zi(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{this.resolveFinishedPromise=e}))}}function is(e,t){return t?e*(1e3/t):0}function as(e,t,n){const r=Math.max(t-5,0);return is(n-e(r),t-r)}const ss=.001;function ls(e,t){return e*Math.sqrt(1-t*t)}const cs=["duration","bounce"],us=["stiffness","damping","mass"];function ds(e,t){return t.some((t=>void 0!==e[t]))}function fs({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ds(e,us)&&ds(e,cs)){const n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;zi(e<=Ei(10),"Spring duration must be 10 seconds or less");let a=1-t;a=Gi(.05,1,a),e=Gi(.01,10,_i(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=ls(t,a),l=Math.exp(-o);return ss-i/s*l},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=ls(Math.pow(t,2),a);return(-o(t)+ss>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-ss,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=Ei(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-_i(r.velocity||0)}),m=d||0,h=l/(2*Math.sqrt(s*c)),p=i-o,g=_i(Math.sqrt(s/c)),y=Math.abs(p)<5;let v;if(n||(n=y?.01:2),t||(t=y?.005:.5),h<1){const e=ls(g,h);v=t=>{const n=Math.exp(-h*g*t);return i-n*((m+h*g*p)/e*Math.sin(e*t)+p*Math.cos(e*t))}}else if(1===h)v=e=>i-Math.exp(-g*e)*(p+(m+g*p)*e);else{const e=g*Math.sqrt(h*h-1);v=t=>{const n=Math.exp(-h*g*t),r=Math.min(e*t,300);return i-n*((m+h*g*p)*Math.sinh(r)+e*p*Math.cosh(r))/e}}return{calculatedDuration:f&&u||null,next:e=>{const r=v(e);if(f)a.done=e>=u;else{let o=0;h<1&&(o=0===e?Ei(m):as(v,e,r));const s=Math.abs(o)<=n,l=Math.abs(i-r)<=t;a.done=s&&l}return a.value=a.done?i:r,a}}}function ms({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],f={done:!1,value:d},m=e=>void 0===s?l:void 0===l||Math.abs(s-e)-h*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let w,x;const E=e=>{(e=>void 0!==s&&el)(f.value)&&(w=e,x=fs({keyframes:[f.value,m(f.value)],velocity:as(v,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),E(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),f)}}}const hs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function ps(e,t,n,r){return e===t&&n===r?Mi:o=>0===o||1===o?o:hs(function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=hs(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(o,0,1,e,n),t,r)}const gs=ps(.42,0,1,1),ys=ps(0,0,.58,1),vs=ps(.42,0,.58,1),bs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ws=e=>t=>1-e(1-t),xs=e=>1-Math.sin(Math.acos(e)),Es=ws(xs),_s=bs(xs),Ss=ps(.33,1.53,.69,.99),ks=ws(Ss),Cs=bs(ks),Ns={linear:Mi,easeIn:gs,easeInOut:vs,easeOut:ys,circIn:xs,circInOut:_s,circOut:Es,backIn:ks,backInOut:Cs,backOut:Ss,anticipate:e=>(e*=2)<1?.5*ks(e):.5*(2-Math.pow(2,-10*(e-1)))},Ps=e=>{if(Array.isArray(e)){Bi(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ps(t,n,r,o)}return"string"==typeof e?(Bi(void 0!==Ns[e],`Invalid easing type '${e}'`),Ns[e]):e},Ts=(e,t)=>n=>t(e(n)),Os=(...e)=>e.reduce(Ts),Ms=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Rs=(e,t,n)=>e+(t-e)*n;function Ds(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 As(e,t){return n=>n>0?t:e}const js=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Is=[Ma,Oa,Ra];function Fs(e){const t=(e=>Is.find((t=>t.test(e))))(e);if(zi(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let n=t.parse(e);return t===Ra&&(n=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=Ds(s,r,e+1/3),i=Ds(s,r,e),a=Ds(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}}(n)),n}const Ls=(e,t)=>{const n=Fs(e),r=Fs(t);if(!n||!r)return As(e,t);const o={...n};return e=>(o.red=js(n.red,r.red,e),o.green=js(n.green,r.green,e),o.blue=js(n.blue,r.blue,e),o.alpha=Rs(n.alpha,r.alpha,e),Oa.transform(o))},zs=new Set(["none","hidden"]);function Bs(e,t){return n=>Rs(e,t,n)}function Ws(e){return"number"==typeof e?Bs:"string"==typeof e?Hi(e)?As:Da.test(e)?Ls:$s:Array.isArray(e)?Vs:"object"==typeof e?Da.test(e)?Ls:Us:As}function Vs(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>Ws(e)(e,t[n])));return e=>{for(let t=0;t{for(const t in r)n[t]=r[t](e);return n}}const $s=(e,t)=>{const n=Wa.createTransformer(t),r=Fa(e),o=Fa(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?zs.has(e)&&!o.values.length||zs.has(t)&&!r.values.length?function(e,t){return zs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Os(Vs(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;iArray.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ps):Ps(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ms(0,t,r);e.push(Rs(n,1,o))}}(t,e.length-1),t}(t),e),s=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Bi(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],o=n||Hs,i=e.length-1;for(let n=0;n{let n=0;if(s>1)for(;nl(Gi(e[0],e[i-1],t)):l}(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||vs)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const qs=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Ai.update(t,!0),stop:()=>ji(t),now:()=>Ii.isProcessing?Ii.timestamp:ns.now()}},Ks={decay:ms,inertia:ms,tween:Ys,keyframes:Ys,spring:fs},Gs=e=>e/100;class Xs extends os{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,i=(null==r?void 0:r.KeyframeResolver)||Ca;this.resolver=new i(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=Ks[t]||Ys;let s,l;a!==Ys&&"number"!=typeof e[0]&&(s=Os(Gs,Hs(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=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(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:f,repeatType:m,repeatDelay:h,onUpdate:p}=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)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=o;if(f){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,f+1),Boolean(t%2)&&("reverse"===m?(n=1-n,h&&(n-=h/u)):"mirror"===m&&(b=i)),v=Gi(0,1,n)*u}const w=y?{done:!1,value:s[0]}:b.next(v);a&&(w.value=a(w.value));let{done:x}=w;y||null===l||(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return E&&void 0!==r&&(w.value=Oi(s,this.options,r)),p&&p(w.value),E&&this.finish(),w}get duration(){const{resolved:e}=this;return e?_i(e.calculatedDuration):0}get time(){return _i(this.currentTime)}set time(e){e=Ei(e),this.currentTime=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=_i(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=qs,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 Zs=new Set(["opacity","clipPath","filter","transform"]),Js=e=>Array.isArray(e)&&"number"==typeof e[0];function Qs(e){return Boolean(!e||"string"==typeof e&&e in tl||Js(e)||Array.isArray(e)&&e.every(Qs))}const el=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,tl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:el([0,.65,.55,1]),circOut:el([.55,0,1,.45]),backIn:el([.31,.01,.66,-.59]),backOut:el([.33,1.53,.69,.99])};function nl(e){return rl(e)||tl.easeOut}function rl(e){return e?Js(e)?el(e):Array.isArray(e)?e.map(nl):tl[e]:void 0}const ol=Qa((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class il extends os{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Ja(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(!(null===(n=s.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(u=this.options).type||!Qs(u.ease)){const{onComplete:t,onUpdate:n,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new Xs({...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]),r=u.duration,o=u.times,i=u.ease,a="keyframes"}var u;const d=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=rl(s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(s.owner.current,l,e,{...this.options,duration:r,times:o,ease:i});return d.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(d.timeline=this.pendingTimeline,this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:n}=this.options;s.set(Oi(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:o,type:a,ease:i,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return _i(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return _i(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Ei(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 Mi;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Mi}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 Xs({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),d=Ei(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;return ol()&&n&&Zs.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const al=Qa((()=>void 0!==window.ScrollTimeline));class sl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n{if(!al()||!t.attachTimeline)return t.pause(),function(e,n){let r;const o=()=>{const{currentTime:e}=n,o=(null===e?0:e.value)/100;r!==o&&(e=>{t.time=t.duration*e})(o),r=o};return Ai.update(o,!0),()=>ji(o)}(0,e);t.attachTimeline(e)}));return()=>{t.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;tt[e]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const ll=(e,t,n,r={},o,i,a)=>s=>{const l=Pi(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u-=Ei(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{s(),l.onComplete&&l.onComplete(),a&&a()},onStop:a,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})(l)||(d={...d,...Ni(e,d)}),d.duration&&(d.duration=Ei(d.duration)),d.repeatDelay&&(d.repeatDelay=Ei(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let f=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(f=!0)),f&&!i&&void 0!==t.get()){const e=Oi(d.keyframes,l);if(void 0!==e)return Ai.update((()=>{d.onUpdate(e),d.onComplete()})),new sl([])}return!i&&il.supports(d)?new il(d):new Xs(d)},cl=e=>fi(e)?e[e.length-1]||0:e;function ul(e,t){-1===e.indexOf(t)&&e.push(t)}function dl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class fl{constructor(){this.subscriptions=[]}add(e){return ul(this.subscriptions,e),()=>dl(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{const n=ns.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){var t;this.current=e,this.updatedAt=ns.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new fl);const n=this.events[e].add(t);return"change"===e?()=>{n(),Ai.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 ml.current&&ml.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=ns.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return is(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 pl(e,t){return new hl(e,t)}function gl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,pl(n))}const yl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vl="data-"+yl("framerAppearId");function bl(e){return e.props[vl]}function wl(e){return xi.has(e)?"transform":Zs.has(e)?yl(e):void 0}class xl extends hl{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const t=wl(e);if(!t)return;const n=this.counts.get(t)||0;this.counts.set(t,n+1),0===n&&(this.output.push(t),this.update());let r=!1;return()=>{if(r)return;r=!0;const e=this.counts.get(t)-1;this.counts.set(t,e),0===e&&(dl(this.output,t),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const El=e=>Boolean(e&&e.getVelocity);function _l(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");return r||(null===(n=e.props.style)||void 0===n?void 0:n.willChange)||(r=new xl("auto"),e.addValue("willChange",r)),o=r,Boolean(El(o)&&o.add)?r.add(t):void 0;var o}function Sl({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function kl(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 t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&Sl(u,t))continue;const s={delay:n,...Pi(a||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=bl(e);if(n){const e=window.MotionHandoffAnimation(n,t,Ai);null!==e&&(s.startTime=e,d=!0)}}r.start(ll(t,r,o,e.shouldReduceMotion&&xi.has(t)?{type:!1}:s,e,d,_l(e,t)));const f=r.animation;f&&c.push(f)}return s&&Promise.all(c).then((()=>{Ai.update((()=>{s&&function(e,t){const n=yi(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)gl(e,t,cl(i[t]))}(e,s)}))})),c}function Cl(e,t,n={}){var r;const o=yi(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(kl(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(Nl).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Cl(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 Nl(e,t){return e.sortNodePosition(t)}const Pl=[...vi].reverse(),Tl=vi.length;function Ol(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ml(){return{animate:Ol(!0),whileInView:Ol(),whileHover:Ol(),whileTap:Ol(),whileDrag:Ol(),whileFocus:Ol(),exit:Ol()}}class Rl{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Dl=0;const Al={animation:{Feature:class extends Rl{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=function(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=>Cl(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Cl(e,t,n);else{const o="function"==typeof t?yi(e,t,n.custom):t;r=Promise.all(kl(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}(e),n=Ml(),r=!0;const o=t=>(n,r)=>{var o;const i=yi(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 a=e.getProps(),s=e.getVariantContext(!0)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;td&&y),x=!1;const E=Array.isArray(g)?g:[g];let _=E.reduce(o(h),{});!1===v&&(_={});const{prevResolvedValues:S={}}=p,k={...S,..._},C=t=>{w=!0,c.has(t)&&(x=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in k){const t=_[e],n=S[e];if(u.hasOwnProperty(e))continue;let r=!1;r=fi(t)&&fi(n)?!mi(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):p.protectedKeys[e]=!0}p.prevProp=g,p.prevResolvedValues=_,p.isActive&&(u={...u,..._}),r&&e.blockInitialAnimation&&(w=!1),!w||b&&!x||l.push(...E.map((e=>({animation:e,options:{type:h}}))))}var f,m;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 h=Boolean(l.length);return!r||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?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=Ml(),r=!0}}}(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();di(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 Rl{constructor(){super(...arguments),this.id=Dl++}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}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},jl=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Il(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}function Fl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ll(e,t,n,r){return Fl(e,t,(e=>t=>jl(t)&&e(t,Il(t)))(n),r)}const zl=(e,t)=>Math.abs(e-t);class Bl{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=Ul(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=zl(e.x,t.x),r=zl(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}=Ii;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=Wl(t,this.transformPagePoint),Ai.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=Ul("pointercancel"===e.type?this.lastMoveEventInfo:Wl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!jl(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Wl(Il(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=Ii;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,Ul(i,this.history)),this.removeListeners=Os(Ll(this.contextWindow,"pointermove",this.handlePointerMove),Ll(this.contextWindow,"pointerup",this.handlePointerUp),Ll(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ji(this.updatePoint)}}function Wl(e,t){return t?{point:t(e.point)}:e}function Vl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ul({point:e},t){return{point:e,delta:Vl(e,Hl(t)),offset:Vl(e,$l(t)),velocity:Yl(t,.1)}}function $l(e){return e[0]}function Hl(e){return e[e.length-1]}function Yl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Hl(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ei(t)));)n--;if(!r)return{x:0,y:0};const i=_i(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 ql(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}const Kl=ql("dragHorizontal"),Gl=ql("dragVertical");function Xl(e){let t=!1;if("y"===e)t=Gl();else if("x"===e)t=Kl();else{const e=Kl(),n=Gl();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Zl(){const e=Xl(!0);return!e||(e(),!1)}function Jl(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Ql(e){return e.max-e.min}function ec(e,t,n,r=.5){e.origin=r,e.originPoint=Rs(t.min,t.max,e.origin),e.scale=Ql(n)/Ql(t),e.translate=Rs(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 tc(e,t,n,r){ec(e.x,t.x,n.x,r?r.originX:void 0),ec(e.y,t.y,n.y,r?r.originY:void 0)}function nc(e,t,n){e.min=n.min+t.min,e.max=e.min+Ql(t)}function rc(e,t,n){e.min=t.min-n.min,e.max=e.min+Ql(t)}function oc(e,t,n){rc(e.x,t.x,n.x),rc(e.y,t.y,n.y)}function ic(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 ac(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min({x:{min:0,max:0},y:{min:0,max:0}});function dc(e){return[e("x"),e("y")]}function fc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function mc(e){return void 0===e||1===e}function hc({scale:e,scaleX:t,scaleY:n}){return!mc(e)||!mc(t)||!mc(n)}function pc(e){return hc(e)||gc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gc(e){return yc(e.x)||yc(e.y)}function yc(e){return e&&"0%"!==e}function vc(e,t,n){return n+t*(e-n)}function bc(e,t,n,r,o){return void 0!==o&&(e=vc(e,o,r)),vc(e,n,r)+t}function wc(e,t=0,n=1,r,o){e.min=bc(e.min,t,n,r,o),e.max=bc(e.max,t,n,r,o)}function xc(e,{x:t,y:n}){wc(e.x,t.translate,t.scale,t.originPoint),wc(e.y,n.translate,n.scale,n.originPoint)}const Ec=.999999999999,_c=1.0000000000001;function Sc(e,t){e.min=e.min+t,e.max=e.max+t}function kc(e,t,n,r,o=.5){wc(e,t,n,Rs(e.min,e.max,o),r)}function Cc(e,t){kc(e.x,t.x,t.scaleX,t.scale,t.originX),kc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Nc(e,t){return fc(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 Pc=({current:e})=>e?e.ownerDocument.defaultView:null,Tc=new WeakMap;class Oc{constructor(e){this.openGlobalLock=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 Bl(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Il(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:o,onDragStart:i}=this.getProps();if(r&&!o&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Xl(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dc((e=>{let t=this.getAxisMotionValue(e).get()||0;if(aa.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Ql(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),i&&Ai.postRender((()=>i(e,t))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=_l(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.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),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:()=>dc((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:Pc(this.visualElement)})}stop(e,t){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=t;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&Ai.postRender((()=>i(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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Mc(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&&en&&(e=r?Rs(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&&Jl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:ic(e.x,n,o),y:ic(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=sc){return!1===e?e=0:!0===e&&(e=sc),{x:lc(e,"left","right"),y:lc(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dc((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||!Jl(e))return!1;const n=e.current;Bi(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=Nc(e,n),{scroll:o}=t;return o&&(Sc(r.x,o.offset.x),Sc(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:ac(e.x,t.x),y:ac(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=fc(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=dc((a=>{if(!Mc(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(ll(e,n,0,t,this.visualElement,!1,_l(this.visualElement,e)))}stopAnimation(){dc((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){dc((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();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){dc((t=>{const{drag:n}=this.getProps();if(!Mc(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]-Rs(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Jl(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};dc((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=Ql(e),o=Ql(t);return o>r?n=Ms(t.min,t.max-r,e.min):r>o&&(n=Ms(e.min,e.max-o,t.min)),Gi(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(),dc((t=>{if(!Mc(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Rs(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Tc.set(this.visualElement,this);const e=Ll(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Jl(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()),Ai.read(t);const o=Fl(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(dc((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=sc,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Mc(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Rc=e=>(t,n)=>{e&&Ai.postRender((()=>e(t,n)))};var Dc=n(848);const Ac=(0,s.createContext)(null),jc=(0,s.createContext)({}),Ic=(0,s.createContext)({}),Fc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Lc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const zc={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!sa.test(e))return e;e=parseFloat(e)}return`${Lc(e,t.target.x)}% ${Lc(e,t.target.y)}%`}},Bc={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Wa.parse(e);if(o.length>5)return r;const i=Wa.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=Rs(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},Wc={},{schedule:Vc,cancel:Uc}=Di(queueMicrotask,!1);class $c extends s.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Yc,Object.assign(Wc,i),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()})),Fc.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()||Ai.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Vc.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 Hc(e){const[t,n]=function(){const e=(0,s.useContext)(Ac);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=(0,s.useId)();(0,s.useEffect)((()=>r(o)),[]);const i=(0,s.useCallback)((()=>n&&n(o)),[o,n]);return!t&&n?[!1,i]:[!0]}(),r=(0,s.useContext)(jc);return(0,Dc.jsx)($c,{...e,layoutGroup:r,switchLayoutGroup:(0,s.useContext)(Ic),isPresent:t,safeToRemove:n})}const Yc={borderRadius:{...zc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zc,borderTopRightRadius:zc,borderBottomLeftRadius:zc,borderBottomRightRadius:zc,boxShadow:Bc},qc=["TopLeft","TopRight","BottomLeft","BottomRight"],Kc=qc.length,Gc=e=>"string"==typeof e?parseFloat(e):e,Xc=e=>"number"==typeof e||sa.test(e);function Zc(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Jc=eu(0,.5,Es),Qc=eu(.5,.95,Mi);function eu(e,t,n){return r=>rt?1:n(Ms(e,t,r))}function tu(e,t){e.min=t.min,e.max=t.max}function nu(e,t){tu(e.x,t.x),tu(e.y,t.y)}function ru(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ou(e,t,n,r,o){return e=vc(e-=t,1/n,r),void 0!==o&&(e=vc(e,1/o,r)),e}function iu(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){if(aa.test(t)&&(t=parseFloat(t),t=Rs(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=Rs(i.min,i.max,r);e===i&&(s-=t),e.min=ou(e.min,t,n,s,o),e.max=ou(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const au=["x","scaleX","originX"],su=["y","scaleY","originY"];function lu(e,t,n,r){iu(e.x,t,au,n?n.x:void 0,r?r.x:void 0),iu(e.y,t,su,n?n.y:void 0,r?r.y:void 0)}function cu(e){return 0===e.translate&&1===e.scale}function uu(e){return cu(e.x)&&cu(e.y)}function du(e,t){return e.min===t.min&&e.max===t.max}function fu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function mu(e,t){return fu(e.x,t.x)&&fu(e.y,t.y)}function hu(e){return Ql(e.x)/Ql(e.y)}function pu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class gu{constructor(){this.members=[]}add(e){ul(this.members,e),e.scheduleRender()}remove(e){if(dl(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 e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;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 yu=(e,t)=>e.depth-t.depth;class vu{constructor(){this.children=[],this.isDirty=!1}add(e){ul(this.children,e),this.isDirty=!0}remove(e){dl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(yu),this.isDirty=!1,this.children.forEach(e)}}function bu(e){const t=El(e)?e.get():e;return(e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const wu={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},xu="undefined"!=typeof window&&void 0!==window.MotionDebug,Eu=["","X","Y","Z"],_u={visibility:"hidden"};let Su=0;function ku(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Cu(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=bl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ai,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Cu(r)}function Nu({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Su++,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,xu&&(wu.totalNodes=wu.resolvedTargetDeltas=wu.recalculatedProjection=0),this.nodes.forEach(Ou),this.nodes.forEach(Fu),this.nodes.forEach(Lu),this.nodes.forEach(Mu),xu&&window.MotionDebug.record(wu)},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 e=0;ethis.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e){const t=ns.now(),n=({timestamp:r})=>{const o=r-t;o>=250&&(ji(n),e(o-250))};return Ai.read(n,!0),()=>ji(n)}(r),Fc.hasAnimatedSinceResize&&(Fc.hasAnimatedSinceResize=!1,this.nodes.forEach(Iu))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||$u,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!mu(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Pi(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Iu(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,ji(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(zu),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&&Cu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;eEc&&(t.x=1),t.y<_c&&t.y>Ec&&(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?(ru(this.prevProjectionDelta.x,this.projectionDelta.x),ru(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),tc(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&pu(this.projectionDelta.x,this.prevProjectionDelta.x)&&pu(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),xu&&wu.recalculatedProjection++):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(Uu));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,m,h,p,g;Wu(i.x,e.x,n),Wu(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oc(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,h=this.relativeTargetOrigin,p=a,g=n,Vu(m.x,h.x,p.x,g),Vu(m.y,h.y,p.y,g),d&&(l=this.relativeTarget,f=d,du(l.x,f.x)&&du(l.y,f.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),nu(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Rs(0,void 0!==n.opacity?n.opacity:1,Jc(r)),e.opacityExit=Rs(void 0!==t.opacity?t.opacity:1,0,Qc(r))):i&&(e.opacity=Rs(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o{Fc.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=El(0)?0:pl(0);return r.start(ll("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},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&&Ku(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Ql(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ql(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}nu(t,n),Cc(t,o),tc(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new gu),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&&ku("z",e,r,this.animationValues);for(let t=0;t{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Du),this.root.sharedNodes.clear()}}}function Pu(e){e.updateLayout()}function Tu(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?dc((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Ql(r);r.min=t[e].min,r.max=r.min+o})):Ku(o,n.layoutBox,t)&&dc((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=Ql(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}};tc(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?tc(s,e.applyTransform(r,!0),n.measuredBox):tc(s,t,n.layoutBox);const l=!uu(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}};oc(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};oc(s,t,i.layoutBox),mu(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,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ou(e){xu&&wu.totalNodes++,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 Mu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ru(e){e.clearSnapshot()}function Du(e){e.clearMeasurements()}function Au(e){e.isLayoutDirty=!1}function ju(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Iu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Fu(e){e.resolveTargetDelta()}function Lu(e){e.calcProjection()}function zu(e){e.resetSkewAndRotation()}function Bu(e){e.removeLeadSnapshot()}function Wu(e,t,n){e.translate=Rs(t.translate,0,n),e.scale=Rs(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Vu(e,t,n,r){e.min=Rs(t.min,n.min,r),e.max=Rs(t.max,n.max,r)}function Uu(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const $u={duration:.45,ease:[.4,0,.1,1]},Hu=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yu=Hu("applewebkit/")&&!Hu("chrome/")?Math.round:Mi;function qu(e){e.min=Yu(e.min),e.max=Yu(e.max)}function Ku(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=hu(t),o=hu(n),!(Math.abs(r-o)<=.2));var r,o}function Gu(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Xu=Nu({attachResizeListener:(e,t)=>Fl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zu={current:void 0},Ju=Nu({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zu.current){const e=new Xu({});e.mount(window),e.setOptions({layoutScroll:!0}),Zu.current=e}return Zu.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Qu={pan:{Feature:class extends Rl{constructor(){super(...arguments),this.removePointerDownListener=Mi}onPointerDown(e){this.session=new Bl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Pc(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Rc(e),onStart:Rc(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Ai.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Ll(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 Rl{constructor(e){super(e),this.removeGroupControls=Mi,this.removeListeners=Mi,this.controls=new Oc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Mi}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ju,MeasureLayout:Hc}};function ed(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Ll(e.current,n,((n,o)=>{if("touch"===n.pointerType||Zl())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);const a=i[r];a&&Ai.postRender((()=>a(n,o)))}),{passive:!e.getProps()[r]})}const td=(e,t)=>!!t&&(e===t||td(e,t.parentElement));function nd(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Il(n))}const rd=new WeakMap,od=new WeakMap,id=e=>{const t=rd.get(e.target);t&&t(e)},ad=e=>{e.forEach(id)},sd={some:0,all:1},ld={inView:{Feature:class extends Rl{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,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:sd[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;od.has(n)||od.set(n,{});const r=od.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(ad,{root:e,...t})),r[o]}(t);return rd.set(e,n),r.observe(e),()=>{rd.delete(e),r.unobserve(e)}}(this.node.current,i,(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 Rl{constructor(){super(...arguments),this.removeStartListeners=Mi,this.removeEndListeners=Mi,this.removeAccessibleListeners=Mi,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=Ll(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:o}=this.node.getProps(),i=o||td(this.node.current,e.target)?n:r;i&&Ai.update((()=>i(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),o=Ll(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Os(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Fl(this.node.current,"keydown",(e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=Fl(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&nd("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Ai.postRender((()=>n(e,t)))}))})),nd("down",((e,t)=>{this.startPress(e,t)})))})),t=Fl(this.node.current,"blur",(()=>{this.isPressing&&nd("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Os(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Ai.postRender((()=>n(e,t)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Zl()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Ai.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Ll(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Fl(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Os(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Rl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){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=Os(Fl(this.node.current,"focus",(()=>this.onFocus())),Fl(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Rl{mount(){this.unmount=Os(ed(this.node,!0),ed(this.node,!1))}unmount(){}}}},cd={layout:{ProjectionNode:Ju,MeasureLayout:Hc}},ud=(0,s.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),dd=(0,s.createContext)({}),fd="undefined"!=typeof window,md=fd?s.useLayoutEffect:s.useEffect,hd=(0,s.createContext)({strict:!1});let pd=!1;function gd(e,t,n,r,o){var i;const{visualElement:a}=(0,s.useContext)(dd),l=(0,s.useContext)(hd),c=(0,s.useContext)(Ac),u=(0,s.useContext)(ud).reducedMotion,d=(0,s.useRef)();r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u}));const f=d.current,m=(0,s.useContext)(Ic);!f||f.projection||!o||"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:vd(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&Jl(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(d.current,n,o,m),(0,s.useInsertionEffect)((()=>{f&&f.update(n,c)}));const h=n[vl],p=(0,s.useRef)(Boolean(h)&&!window.MotionHandoffIsComplete&&(null===(i=window.MotionHasOptimisedAnimation)||void 0===i?void 0:i.call(window,h)));return md((()=>{f&&(f.updateFeatures(),Vc.render(f.render),p.current&&f.animationState&&f.animationState.animateChanges())})),(0,s.useEffect)((()=>{f&&(!p.current&&f.animationState&&f.animationState.animateChanges(),p.current=!1,pd||(pd=!0,queueMicrotask(yd)))})),f}function yd(){window.MotionHandoffIsComplete=!0}function vd(e){if(e)return!1!==e.options.allowProjection?e.projection:vd(e.parent)}function bd(e,t,n){return(0,s.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Jl(n)&&(n.current=r))}),[t])}function wd(e){return di(e.animate)||bi.some((t=>hi(e[t])))}function xd(e){return Boolean(wd(e)||e.variants)}function Ed(e){return Array.isArray(e)?e.join(" "):e}const _d={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"]},Sd={};for(const e in _d)Sd[e]={isEnabled:t=>_d[e].some((e=>!!t[e]))};const kd=Symbol.for("motionComponentSymbol");function Cd({layoutId:e}){const t=(0,s.useContext)(jc).id;return t&&void 0!==e?t+"-"+e:e}const Nd=["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 Pd(e){return"string"==typeof e&&!e.includes("-")&&!!(Nd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Td(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Od=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 Md(e,t,n,r){Td(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Od.has(n)?n:yl(n),t.attrs[n])}function Rd(e,{layout:t,layoutId:n}){return xi.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Wc[e]||"opacity"===e)}function Dd(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(El(o[a])||t.style&&El(t.style[a])||Rd(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 n&&o&&"string"==typeof o.willChange&&(n.applyWillChange=!1),i}function Ad(e,t,n){const r=Dd(e,t,n);for(const n in e)(El(e[n])||El(t[n]))&&(r[-1!==wi.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}function jd(e){const t=(0,s.useRef)(null);return null===t.current&&(t.current=e()),t.current}const Id=e=>(t,n)=>{const r=(0,s.useContext)(dd),o=(0,s.useContext)(Ac),i=()=>function({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,a,s){const l={latestValues:zd(o,i,a,!s&&e,t),renderState:n()};return r&&(l.mount=e=>r(o,e,l)),l}(e,t,r,o,n);return n?i():jd(i)};function Fd(e,t){const n=wl(t);n&&ul(e,n)}function Ld(e,t,n){const r=Array.isArray(t)?t:[t];for(let t=0;t{for(const t in e){let n=e[t];Array.isArray(n)&&(n=n[h?n.length-1:0]),null!==n&&(a[t]=n)}for(const e in t)a[e]=t[e]})),l&&(d&&!1!==u&&!di(d)&&Ld(e,d,(e=>{for(const t in e)Fd(s,t)})),s.length&&(a.willChange=s.join(","))),a}const Bd=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Wd=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Vd=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Ud={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$d=wi.length;function Hd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(xi.has(e))a=!0;else if(Ui(e))o[e]=n;else{const t=Vd(n,qa[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<$d;i++){const a=wi[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=Vd(s,qa[a]);l||(o=!1,r+=`${Ud[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}`}}function Yd(e,t,n){return"string"==typeof e?e:sa.transform(t+n*e)}const qd={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kd={offset:"strokeDashoffset",array:"strokeDasharray"};function Gd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(Hd(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:h}=e;f.transform&&(h&&(m.transform=f.transform),delete f.transform),h&&(void 0!==o||void 0!==i||m.transform)&&(m.transformOrigin=function(e,t,n){return`${Yd(t,e.x,e.width)} ${Yd(n,e.y,e.height)}`}(h,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?qd:Kd;e[i.offset]=sa.transform(-r);const a=sa.transform(t),s=sa.transform(n);e[i.array]=`${a} ${s}`}(f,a,s,l,!1)}const Xd=e=>"string"==typeof e&&"svg"===e.toLowerCase(),Zd={useVisualState:Id({scrapeMotionValuesFromProps:Ad,createRenderState:Wd,onMount:(e,t,{renderState:n,latestValues:r})=>{Ai.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),Ai.render((()=>{Gd(n,r,Xd(t.tagName),e.transformTemplate),Md(t,n)}))}})},Jd={useVisualState:Id({applyWillChange:!0,scrapeMotionValuesFromProps:Dd,createRenderState:Bd})};function Qd(e,t,n){for(const r in t)El(t[r])||Rd(r,n)||(e[r]=t[r])}function ef(e,t){const n={},r=function(e,t){const n={};return Qd(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,s.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Hd(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}(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 tf=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 nf(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tf.has(e)}let rf=e=>!nf(e);try{(of=n(316).A)&&(rf=e=>e.startsWith("on")?!nf(e):of(e))}catch(e){}var of;function af(e,t,n,r){const o=(0,s.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Gd(n,t,Xd(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Qd(t,e.style,e),o.style={...t,...o.style}}return o}function sf(e=!1){return(t,n,r,{latestValues:o},i)=>{const a=(Pd(t)?af:ef)(n,o,i,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(rf(o)||!0===n&&nf(o)||!t&&!nf(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c=t!==s.Fragment?{...l,...a,ref:r}:{},{children:u}=n,d=(0,s.useMemo)((()=>El(u)?u.get():u),[u]);return(0,s.createElement)(t,{...c,children:d})}}const lf={current:null},cf={current:!1},uf=new WeakMap,df=[...ba,Da,Wa],ff=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],mf=bi.length;class hf{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ca,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,Ai.render(this.render,!1,!0))};const{latestValues:s,renderState:l}=i;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=wd(t),this.isVariantNode=xd(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==s[e]&&El(t)&&t.set(s[e],!1)}}mount(e){this.current=e,uf.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))),cf.current||function(){if(cf.current=!0,fd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>lf.current=e.matches;e.addListener(t),t()}else lf.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||lf.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){uf.delete(this.current),this.projection&&this.projection.unmount(),ji(this.notifyUpdate),ji(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=xi.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Ai.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 Sd){const t=Sd[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 t=0;tt.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=pl(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&&(Wi(r)||Li(r))?r=parseFloat(r):!(e=>df.find(va(e)))(r)&&Wa.test(t)&&(r=Xa(e,t)),this.setBaseTarget(e,El(r)?r.get():r)),El(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=gi(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||El(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 fl),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class pf extends hf{constructor(){super(...arguments),this.KeyframeResolver=Ja}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]}}class gf extends pf{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Td}readValueFromInstance(e,t){if(xi.has(t)){const e=Ga(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Ui(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Nc(e,t)}build(e,t,n){Hd(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Dd(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;El(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class yf extends pf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=uc}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(xi.has(t)){const e=Ga(t);return e&&e.default||0}return t=Od.has(t)?t:yl(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ad(e,t,n)}build(e,t,n){Gd(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Md(e,t,0,r)}mount(e){this.isSVGTag=Xd(e.tagName),super.mount(e)}}const vf=function(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(e,{get:(n,r)=>(t.has(r)||t.set(r,e(r)),t.get(r))})}(function(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return function({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&function(e){for(const t in e)Sd[t]={...Sd[t],...e[t]}}(e);const i=(0,s.forwardRef)((function(e,i){let a;const l={...(0,s.useContext)(ud),...e,layoutId:Cd(e)},{isStatic:c}=l,u=function(e){const{initial:t,animate:n}=function(e,t){if(wd(e)){const{initial:t,animate:n}=e;return{initial:!1===t||hi(t)?t:void 0,animate:hi(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,s.useContext)(dd));return(0,s.useMemo)((()=>({initial:t,animate:n})),[Ed(t),Ed(n)])}(e),d=r(e,c);if(!c&&fd){(0,s.useContext)(hd).strict;const e=function(e){const{drag:t,layout:n}=Sd;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}}(l);a=e.MeasureLayout,u.visualElement=gd(o,d,l,t,e.ProjectionNode)}return(0,Dc.jsxs)(dd.Provider,{value:u,children:[a&&u.visualElement?(0,Dc.jsx)(a,{visualElement:u.visualElement,...l}):null,n(o,e,bd(d,u.visualElement,i),d,c,u.visualElement)]})}));return i[kd]=o,i}({...Pd(n)?Zd:Jd,preloadedFeatures:e,useRender:sf(r),createVisualElement:t,Component:n})}}({...Al,...ld,...Qu,...cd},((e,t)=>Pd(e)?new yf(t):new gf(t,{allowProjection:e!==s.Fragment}))));var bf=["slug","text","icon","className","disabled","badge"];function wf(){return wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t*]:box-border flex items-center ".concat("full"===v?"w-full":""," ").concat(_),k=re(S,w,x,t,E,"underline"!==h?"bg-tab-background":"",a);return l().createElement("div",{className:k},l().createElement(xf.Provider,{value:{activeItem:o,onChange:b,size:u,variant:h,orientation:f,iconPosition:g,width:v}},l().Children.map(n,(function(e){return(0,s.isValidElement)(e)?l().cloneElement(e):null}))))};Ef.displayName="Tabs.Group";var _f=(0,s.forwardRef)((function(e,t){var n=(0,s.useContext)(xf),r=e.slug,o=e.text,i=e.icon,a=e.className,c=e.disabled,u=void 0!==c&&c,d=e.badge,f=void 0===d?null:d,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;rsvg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-sm font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-sm font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"[&>svg]:size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-xs font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"[&>svg]:size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"[&>svg]:size-5",label:"text-base font-medium"}},Tf="group-disabled:text-field-color-disabled",Of=["value","selected","children","className"];function Mf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||Af(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rf(){return Rf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);nsvg]:shrink-0",Pf[y].icon)},M())))}function Uf(e){var t=e.children,n=e.searchBy,r=void 0===n?"id":n,o=e.searchPlaceholder,i=void 0===o?"Search...":o,a=e.dropdownPortalRoot,l=void 0===a?null:a,c=e.dropdownPortalId,u=void 0===c?"":c,d=e.className,f=Wf(),m=f.isOpen,h=f.context,p=f.refs,g=f.combobox,y=f.floatingStyles,v=f.getFloatingProps,b=f.sizeValue,w=f.setSearchKeyword,x=f.setActiveIndex,E=f.setSelectedIndex,_=f.value,S=f.selected,k=f.getValues,C=f.searchKeyword,N=f.listContentRef,P=f.by,T=(0,s.useMemo)((function(){var e=k(),n=0;return e&&(n=s.Children.toArray(t).findIndex((function(t){return"object"===If(t.props.value)?t.props.value[P]===e[P]:t.props.value===e}))),-1===n?0:n}),[_,S,t]);(0,s.useLayoutEffect)((function(){x(T),E(T)}),[]);var O=(0,s.useMemo)((function(){return s.Children.map(t,(function(e,t){if(!(0,s.isValidElement)(e))return null;if(C){var n=e.props.value;if("object"===If(n)){if(-1===n[r].toLowerCase().indexOf(C.toLowerCase()))return null}else if(-1===n.toLowerCase().indexOf(C.toLowerCase()))return null}return(0,s.cloneElement)(e,Lf(Lf({},e.props),{},{index:t}))}))}),[C,_,S,t]),M=s.Children.count(O);return(0,s.useEffect)((function(){N.current=[],s.Children.forEach(t,(function(e){if((0,s.isValidElement)(e)&&e.props.value){if(C){var t=e.props.value;if("object"===If(t)){if(-1===t[r].toLowerCase().indexOf(C.toLowerCase()))return}else if(-1===t.toLowerCase().indexOf(C.toLowerCase()))return}N.current.push(e.props.value)}}))}),[C]),React.createElement(React.Fragment,null,m&&React.createElement(Cr,{id:u,root:l},React.createElement(Ar,{context:h,modal:!1},React.createElement("div",Rf({ref:p.setFloating,className:re("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",g&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",Pf[b].dropdown,!g&&"h-auto",g?"overflow-hidden":"overflow-y-auto",d),style:Lf({},y)},v()),g&&React.createElement("div",{className:re(Pf[b].searchbarWrapper)},React.createElement(Nf,{className:re("text-icon-secondary shrink-0",Pf[b].searchbarIcon)}),React.createElement("input",{className:re("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",Pf[b].searchbar),type:"search",name:"keyword",placeholder:i,onChange:function(e){return w(e.target.value)},autoComplete:"off"})),React.createElement("div",{className:re("overflow-y-auto",!g&&"w-full h-full",Pf[b].dropdownItemsWrapper)},!!M&&O,!M&&React.createElement("div",{className:"p-2 text-center text-base font-medium text-field-placeholder"},"No items found"))))))}function $f(e){var t=e.value,n=e.selected,r=e.children,o=e.className,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:m=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b,orientation:w="vertical",cols:x=1,scrollItemIntoView:E=!0,virtualItemRef:_,itemSizes:S,dense:k=!1}=t,C=or(Tr(o.floating)),N=tr(),P=nr(),T=Mn(l),O=s.useRef(g),M=s.useRef(null!=u?u:-1),R=s.useRef(null),D=s.useRef(!0),A=s.useRef(T),j=s.useRef(!!o.floating),I=s.useRef(n),F=s.useRef(!1),L=s.useRef(!1),z=or(b),B=or(n),W=or(E),V=or(u),[U,$]=s.useState(),[H,Y]=s.useState(),q=Mn((function(e,t,n){function r(e){p?($(e.id),null==P||P.events.emit("virtualfocus",e),_&&(_.current=e)):Hn(e,{preventScroll:!0,sync:!(!st()||!it())&&(qr||F.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame((()=>{const i=e.current[t.current]||o;if(!i)return;o||r(i);const a=W.current;a&&G&&(n||!D.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof a?{block:"nearest",inline:"nearest"}:a))}))}));Yn((()=>{document.createElement("div").focus({get preventScroll(){return qr=!0,!1}})}),[]),Yn((()=>{c&&(n&&o.floating?O.current&&null!=u&&(L.current=!0,M.current=u,T(u)):j.current&&(M.current=-1,A.current(null)))}),[c,n,o.floating,u,T]),Yn((()=>{if(c&&n&&o.floating)if(null==a){if(F.current=!1,null!=V.current)return;if(j.current&&(M.current=-1,q(i,M)),(!I.current||!j.current)&&O.current&&(null!=R.current||!0===O.current&&null==R.current)){let e=0;const t=()=>{null==i.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(M.current=null==R.current||Xr(R.current,w,h)||m?Ln(i,z.current):zn(i,z.current),R.current=null,T(M.current))};t()}}else Fn(i,a)||(M.current=a,q(i,M,L.current),L.current=!1)}),[c,n,o.floating,a,V,m,i,w,h,T,q,z]),Yn((()=>{var e;if(!c||o.floating||!P||p||!j.current)return;const t=P.nodesRef.current,n=null==(e=t.find((e=>e.id===N)))||null==(e=e.context)?void 0:e.elements.floating,r=Qe(ct(o.floating)),i=t.some((e=>e.context&&et(e.context.elements.floating,r)));n&&!i&&D.current&&n.focus({preventScroll:!0})}),[c,o.floating,P,N,p]),Yn((()=>{if(c&&P&&p&&!N)return P.events.on("virtualfocus",e),()=>{P.events.off("virtualfocus",e)};function e(e){Y(e.id),_&&(_.current=e)}}),[c,P,p,N,_]),Yn((()=>{A.current=T,j.current=!!o.floating})),Yn((()=>{n||(R.current=null)}),[n]),Yn((()=>{I.current=n}),[n]);const K=null!=a,G=s.useMemo((()=>{function e(e){if(!n)return;const t=i.current.indexOf(e);-1!==t&&T(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...y&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;D.current&&"touch"!==t&&(M.current=-1,q(i,M),T(null),p||Hn(C.current,{preventScroll:!0}))}}}}),[n,C,q,y,i,T,p]),X=Mn((e=>{if(D.current=!1,F.current=!0,!B.current&&e.currentTarget===C.current)return;if(m&&Zr(e.key,w,h))return mt(e),r(!1,e.nativeEvent,"list-navigation"),void(ze(o.domReference)&&!p&&o.domReference.focus());const t=M.current,a=Ln(i,b),s=zn(i,b);if("Home"===e.key&&(mt(e),M.current=a,T(M.current)),"End"===e.key&&(mt(e),M.current=s,T(M.current)),x>1){const t=S||Array.from({length:i.current.length},(()=>({width:1,height:1}))),n=function(e,t,n){const r=[];let o=0;return e.forEach(((e,i)=>{let{width:a,height:s}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;nnull==r[e]))?(e.forEach((e=>{r[e]=i})),l=!0):o++}})),[...r]}(t,x,k),r=n.findIndex((e=>null!=e&&!Un(i.current,e,b))),o=n.reduce(((e,t,n)=>null==t||Un(i.current,t,b)?e:n),-1),l=n[function(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===Rn){if(u&&mt(n),-1===c)d=l;else if(d=Bn(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(c-ie?n:n-i}Fn(e,d)&&(d=c)}if(n.key===Dn&&(u&&mt(n),-1===c?d=s:(d=Bn(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(d=Bn(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Fn(e,d)&&(d=c)),"both"===r){const t=vt(c/i);n.key===jn&&(u&&mt(n),c%i!=i-1?(d=Bn(e,{startingIndex:c,disabledIndices:a}),o&&In(d,i,t)&&(d=Bn(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(d=Bn(e,{startingIndex:c-c%i-1,disabledIndices:a})),In(d,i,t)&&(d=c)),n.key===An&&(u&&mt(n),c%i!=0?(d=Bn(e,{startingIndex:c,decrement:!0,disabledIndices:a}),o&&In(d,i,t)&&(d=Bn(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(d=Bn(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),In(d,i,t)&&(d=c));const r=vt(l/i)===t;Fn(e,d)&&(d=o&&r?n.key===An?l:Bn(e,{startingIndex:c-c%i-1,disabledIndices:a}):c)}return d}({current:n.map((e=>null!=e?i.current[e]:null))},{event:e,orientation:w,loop:f,cols:x,disabledIndices:Vn([...b||i.current.map(((e,t)=>Un(i.current,t)?t:void 0)),void 0],n),minIndex:r,maxIndex:o,prevIndex:Wn(M.current>s?a:M.current,t,n,x,e.key===Dn?"bl":e.key===jn?"tr":"tl"),stopEvent:!0})];if(null!=l&&(M.current=l,T(M.current)),"both"===w)return}if(Gr(e.key,w)){if(mt(e),n&&!p&&Qe(e.currentTarget.ownerDocument)===e.currentTarget)return M.current=Xr(e.key,w,h)?a:s,void T(M.current);Xr(e.key,w,h)?M.current=f?t>=s?d&&t!==i.current.length?-1:a:Bn(i,{startingIndex:t,disabledIndices:b}):Math.min(s,Bn(i,{startingIndex:t,disabledIndices:b})):M.current=f?t<=a?d&&-1!==t?i.current.length:s:Bn(i,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(a,Bn(i,{startingIndex:t,decrement:!0,disabledIndices:b})),Fn(i,M.current)?T(null):T(M.current)}})),Z=s.useMemo((()=>p&&n&&K&&{"aria-activedescendant":H||U}),[p,n,K,H,U]),J=s.useMemo((()=>({"aria-orientation":"both"===w?void 0:w,...!ht(o.domReference)&&Z,onKeyDown:X,onPointerMove(){D.current=!0}})),[Z,X,o.domReference,w]),Q=s.useMemo((()=>{function e(e){"auto"===g&&rt(e.nativeEvent)&&(O.current=!0)}return{...Z,onKeyDown(e){D.current=!1;const t=0===e.key.indexOf("Arrow"),o=function(e,t,n){return Kr(t,n?e===An:e===jn,e===Dn)}(e.key,w,h),a=Zr(e.key,w,h),s=Gr(e.key,w),l=(m?o:s)||"Enter"===e.key||""===e.key.trim();if(p&&n){const n=null==P?void 0:P.nodesRef.current.find((e=>null==e.parentId)),r=P&&n?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),sr(e,o).forEach((e=>{t(e.id,i+1)}))}(t,0),e.find((e=>e.id===n))}(P.nodesRef.current,n.id):null;if(t&&r&&_){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(o||a){var c,d;const n=(null==(c=r.context)?void 0:c.elements.domReference)===e.currentTarget,s=a&&!n?null==(d=r.context)?void 0:d.elements.domReference:o?i.current.find((e=>(null==e?void 0:e.id)===U)):null;s&&(mt(e),s.dispatchEvent(t),Y(void 0))}var f;if(s&&r.context&&r.context.open&&r.parentId&&e.currentTarget!==r.context.elements.domReference)return mt(e),void(null==(f=r.context.elements.domReference)||f.dispatchEvent(t))}return X(e)}(n||v||!t)&&(l&&(R.current=m&&s?null:e.key),m?o&&(mt(e),n?(M.current=Ln(i,z.current),T(M.current)):r(!0,e.nativeEvent,"list-navigation")):s&&(null!=u&&(M.current=u),mt(e),!n&&v?r(!0,e.nativeEvent,"list-navigation"):X(e),n&&T(M.current)))},onFocus(){n&&!p&&T(null)},onPointerDown:function(e){O.current=g,"auto"===g&&ot(e.nativeEvent)&&(O.current=!0)},onMouseDown:e,onClick:e}}),[U,Z,X,z,g,i,m,T,r,n,v,w,h,u,P,p,_]);return s.useMemo((()=>c?{reference:Q,floating:J,item:G}:{}),[c,Q,J,G])}(z,{listRef:B,activeIndex:O,selectedIndex:D,onNavigate:M,loop:!0}),q=function(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:l,onTypingChange:c,enabled:u=!0,findMatch:d=null,resetMs:f=750,ignoreKeys:m=[],selectedIndex:h=null}=t,p=s.useRef(),g=s.useRef(""),y=s.useRef(null!=(n=null!=h?h:a)?n:-1),v=s.useRef(null),b=Mn(l),w=Mn(c),x=or(d),E=or(m);Yn((()=>{r&&(clearTimeout(p.current),v.current=null,g.current="")}),[r]),Yn((()=>{var e;r&&""===g.current&&(y.current=null!=(e=null!=h?h:a)?e:-1)}),[r,h,a]);const _=Mn((e=>{e?o.current.typing||(o.current.typing=e,w(e)):o.current.typing&&(o.current.typing=e,w(e))})),S=Mn((e=>{function t(e,t,n){const r=x.current?x.current(t,n):t.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))));return r?e.indexOf(r):-1}const n=i.current;if(g.current.length>0&&" "!==g.current[0]&&(-1===t(n,n,g.current)?_(!1):" "===e.key&&mt(e)),null==n||E.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&(mt(e),_(!0)),n.every((e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())}))&&g.current===e.key&&(g.current="",y.current=v.current),g.current+=e.key,clearTimeout(p.current),p.current=setTimeout((()=>{g.current="",y.current=v.current,_(!1)}),f);const o=y.current,a=t(n,[...n.slice((o||0)+1),...n.slice(0,(o||0)+1)],g.current);-1!==a?(b(a),v.current=a):" "!==e.key&&(g.current="",_(!1))})),k=s.useMemo((()=>({onKeyDown:S})),[S]),C=s.useMemo((()=>({onKeyDown:S,onKeyUp(e){" "===e.key&&_(!1)}})),[S,_]);return s.useMemo((()=>u?{reference:k,floating:C}:{}),[u,k,C])}(z,{listRef:W,activeIndex:O,selectedIndex:D,onMatch:N?M:A,onTypingChange:function(e){V.current=e}}),K=Yr([$,H,Y,U].concat(Df(h?[]:[q]))),G=K.getReferenceProps,X=K.getFloatingProps,Z=K.getItemProps,J=function(e,t){if(f)return function(e,t){var n,r=Df(null!==(n=k())&&void 0!==n?n:[]);-1===r.findIndex((function(e){return"object"===If(e)?e[c]===t[c]:e===t}))&&(r.push(t),v||x(r),A(e),F.reference.current.focus(),P(!1),S(""),"function"==typeof a&&a(r))}(e,t);A(e),v||x(t),F.reference.current.focus(),P(!1),S(""),"function"==typeof a&&a(t)},Q=(0,s.useCallback)((function(e,t){B.current[e]=t}),[]);return React.createElement(Bf.Provider,{value:{selectedIndex:D,setSelectedIndex:A,activeIndex:O,setActiveIndex:M,selected:w,setSelected:x,handleSelect:J,combobox:h,sizeValue:r,multiple:f,onChange:a,isTypingRef:V,getItemProps:Z,onClickItem:function(e,t){J(e,t)},onKeyDownItem:function(e,t,n){"Enter"===e.key&&(e.preventDefault(),J(t,n))," "!==e.key||V.current||(e.preventDefault(),J(t,n))},getValues:k,selectId:y,getReferenceProps:G,isOpen:N,value:o,updateListRef:Q,refs:F,listContentRef:W,by:c,getFloatingProps:X,floatingStyles:L,context:z,searchKeyword:_,setSearchKeyword:S,disabled:g}},u)};Vf.displayName="Select.Button",Uf.displayName="Select.Options",$f.displayName="Select.Item",Hf.Button=Vf,Hf.Options=Uf,Hf.Option=$f;var Yf=Hf,qf=["id","message","jsx"];function Kf(e){return Kf="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},Kf(e)}function Gf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xf(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({message:e,type:"neutral"},t))}},{key:"success",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({message:e,type:"success"},t))}},{key:"error",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({message:e,type:"error"},t))}},{key:"warning",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({message:e,type:"warning"},t))}},{key:"info",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({message:e,type:"info"},t))}},{key:"custom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.create(Xf({jsx:e,type:"custom"},t))}}],t&&function(e,t){for(var n=0;n{const{width:e,height:a,top:s,left:l}=o.current;if(t||!r.current||!e||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${a}px !important;\n top: ${s}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}}),[t]),(0,Dc.jsx)(hm,{isPresent:t,childRef:r,sizeRef:o,children:s.cloneElement(e,{ref:r})})}const gm=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a})=>{const l=jd(ym),c=(0,s.useId)(),u=(0,s.useMemo)((()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:e=>{l.set(e,!0);for(const e of l.values())if(!e)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))})),i?[Math.random()]:[n]);return(0,s.useMemo)((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[n]),s.useEffect((()=>{!n&&!l.size&&r&&r()}),[n]),"popLayout"===a&&(e=(0,Dc.jsx)(pm,{isPresent:n,children:e})),(0,Dc.jsx)(Ac.Provider,{value:u,children:e})};function ym(){return new Map}const vm=e=>e.key||"";function bm(e){const t=[];return s.Children.forEach(e,(e=>{(0,s.isValidElement)(e)&&t.push(e)})),t}const wm=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync"})=>{Bi(!t,"Replace exitBeforeEnter with mode='wait'");const l=(0,s.useMemo)((()=>bm(e)),[e]),c=l.map(vm),u=(0,s.useRef)(!0),d=(0,s.useRef)(l),f=jd((()=>new Map)),[m,h]=(0,s.useState)(l),[p,g]=(0,s.useState)(l);md((()=>{u.current=!1,d.current=l;for(let e=0;e{const t=vm(e),s=l===p||c.includes(t);return(0,Dc.jsx)(gm,{isPresent:s,initial:!(u.current&&!r)&&void 0,custom:s?void 0:n,presenceAffectsLayout:i,mode:a,onExitComplete:s?void 0:()=>{if(!f.has(t))return;f.set(t,!0);let e=!0;f.forEach((t=>{t||(e=!1)})),e&&(null==v||v(),g(d.current),o&&o())},children:e},t)}))})};function xm(e){return xm="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},xm(e)}function Em(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _m(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:u;if(l&&!(u<0))return w.current=(new Date).getTime(),setTimeout((function(){b(e.id)}),t)};(0,s.useEffect)((function(){var e=u;return E.current=_(t,e),function(){clearTimeout(E.current)}}),[]),(0,s.useEffect)((function(){null!=t&&t.dismiss&&b(t.id)}),[t]);var S,k,C,N,P,T,O,M,R,D,A=function(){var e,n;null==t||null===(e=t.action)||void 0===e||null===(n=e.onClick)||void 0===n||n.call(e,(function(){return b(t.id)}))},j=null;return"stack"===h&&(j=React.createElement("div",{className:re("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===f?fm:null===(S=dm)||void 0===S?void 0:S[v],"w-[22.5rem]"),onMouseEnter:function(){clearTimeout(E.current),x.current=(new Date).getTime()},onMouseLeave:function(){E.current=_(t,u-(x.current-w.current))}},"custom"!==t.type?React.createElement(React.Fragment,null,React.createElement("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0"},co({variant:v,icon:g,theme:f})),React.createElement("div",{className:"flex flex-col items-start justify-start gap-0.5"},fo({title:r,theme:f}),mo({content:i,theme:f}),(null==t||null===(k=t.action)||void 0===k?void 0:k.label)&&"function"==typeof(null==t||null===(C=t.action)||void 0===C?void 0:C.onClick)&&React.createElement("div",{className:"mt-2.5"},uo({actionLabel:null==t||null===(N=t.action)||void 0===N?void 0:N.label,actionType:null!==(P=null==t||null===(T=t.action)||void 0===T?void 0:T.type)&&void 0!==P?P:"button",onAction:A,theme:f}))),React.createElement("div",{className:"absolute right-4 top-4 [&_svg]:size-5"},React.createElement("button",{className:re("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",null!==(O=mm[f])&&void 0!==O?O:mm.light),onClick:function(){return b(t.id)}},React.createElement(jo,null)))):null==t||null===(M=t.jsx)||void 0===M?void 0:M.call(t,{close:function(){return b(t.id)},action:null!=t&&t.action?_m(_m({},null==t?void 0:t.action),{},{onClick:A}):null}))),"inline"===h&&(j=React.createElement("div",{className:re("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===f?fm:null===(R=dm)||void 0===R?void 0:R[v],"lg:w-[47.5rem] w-full")},React.createElement("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0"},co({variant:v,icon:g,theme:f})),React.createElement("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0"},fo({title:r,theme:f}),mo({content:i,theme:f})),React.createElement("div",{className:"absolute right-3 top-3 [&_svg]:size-5"},React.createElement("button",{className:re("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",null!==(D=mm[f])&&void 0!==D?D:mm.light),onClick:function(){return b(t.id)}},React.createElement(jo,null))))),j},Tm=(Nm=function(e){var t,n,r=e.position,o=void 0===r?"top-right":r,i=e.design,a=void 0===i?"stack":i,l=e.theme,c=void 0===l?"light":l,u=e.className,d=void 0===u?"":u,f=e.autoDismiss,m=void 0===f||f,h=e.dismissAfter,p=void 0===h?5e3:h,g=function(e){if(Array.isArray(e))return e}(n=(0,s.useState)([]))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(n)||km(n,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=g[0],v=g[1];(0,s.useEffect)((function(){sm.subscribe((function(e){null!=e&&e.dismiss?v((function(t){return t.map((function(t){return t.id===e.id?_m(_m({},t),{},{dismiss:!0}):t}))})):setTimeout((function(){(0,Gt.flushSync)((function(){return v((function(t){return-1!==t.findIndex((function(t){return t.id===e.id}))?t.map((function(t){return t.id===e.id?_m(_m({},t),e):t})):[].concat(function(e){return function(e){if(Array.isArray(e))return Cm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||km(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),[e])}))}))}))}))}),[]);var b=function(e){v((function(t){return t.filter((function(t){return t.id!==e}))}))};return React.createElement("ul",{className:re("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",null!==(t=um[o])&&void 0!==t?t:um["top-right"],d)},React.createElement(wm,{initial:!1},y.map((function(e){var t,n,r,o,i;return React.createElement(vf.li,{key:e.id,positionTransition:!0,initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:"toast-".concat(e.id)},React.createElement(Pm,{toastItem:e,title:e.title,content:null==e?void 0:e.description,icon:null!==(t=null==e?void 0:e.icon)&&void 0!==t?t:null,design:null!==(n=null==e?void 0:e.design)&&void 0!==n?n:a,autoDismiss:null!==(r=null==e?void 0:e.autoDismiss)&&void 0!==r?r:m,dismissAfter:null!==(o=null==e?void 0:e.dismissAfter)&&void 0!==o?o:p,removeToast:b,variant:e.type,theme:null!==(i=null==e?void 0:e.theme)&&void 0!==i?i:c}))}))))},(0,s.memo)((function(e){var t=e.singleTon;return cm&&t?null:(cm=!0,React.createElement(Nm,e))}))),Om={sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},Mm={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},Rm={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},Dm={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},Am={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},jm={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},Im={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},Fm={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},Lm={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},zm={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},Bm={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},Wm={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},Vm={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},Um={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},$m={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},Hm={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},Ym={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}};function qm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n3&&void 0!==arguments[3]?arguments[3]:"sm",d=[];switch(Km(e)){case"object":for(var f=0,m=Object.entries(e);fspan:first-child]:shrink-0 px-1"},fo({title:g,theme:u}),mo({content:v,theme:u}))),React.createElement("div",{className:"flex items-center justify-start gap-4 [&_svg]:size-4"},(null==S?void 0:S.label)&&"function"==typeof(null==S?void 0:S.onClick)&&React.createElement("div",{className:"flex h-5"},uo({actionLabel:null==S?void 0:S.label,actionType:null!==(n=null==S?void 0:S.type)&&void 0!==n?n:"button",onAction:T,theme:u})),React.createElement("button",{className:re("bg-transparent m-0 border-none p-0.5 focus:outline-none active:outline-none cursor-pointer size-5",null!==(r=P[u])&&void 0!==r?r:P.light),onClick:function(){return k()}},React.createElement(jo,null))))},fh=(ch=function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e{t.focus((()=>{const e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})}),{defaultSelection:e})}),[e,t]),null}const gh={},yh={},vh={},bh={},wh={},xh={},Eh={},_h={},Sh={},kh={},Ch={},Nh={},Ph={},Th={},Oh={},Mh={},Rh={},Dh={},Ah={},jh={},Ih={},Fh={},Lh={},zh={},Bh={},Wh={},Vh={},Uh={},$h={},Hh={},Yh={},qh={},Kh={},Gh={},Xh={},Zh={},Jh={},Qh={},ep={},tp={},np="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,rp=np&&"documentMode"in document?document.documentMode:null,op=np&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ip=np&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ap=!(!np||!("InputEvent"in window)||rp)&&"getTargetRanges"in new window.InputEvent("input"),sp=np&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),lp=np&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,cp=np&&/Android/.test(navigator.userAgent),up=np&&/^(?=.*Chrome).*/i.test(navigator.userAgent),dp=np&&cp&&up,fp=np&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!up,mp=0,hp=1,pp=2,gp=1,yp=2,vp=3,bp=4,wp=5,xp=6,Ep=sp||lp||fp?" ":"​",_p="\n\n",Sp=ip?" ":Ep,kp="֑-߿יִ-﷽ﹰ-ﻼ",Cp="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Np=new RegExp("^[^"+Cp+"]*["+kp+"]"),Pp=new RegExp("^[^"+kp+"]*["+Cp+"]"),Tp={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},Op={directionless:1,unmergeable:2},Mp={center:2,end:6,justify:4,left:1,right:3,start:5},Rp={[yp]:"center",[xp]:"end",[bp]:"justify",[gp]:"left",[vp]:"right",[wp]:"start"},Dp={normal:0,segmented:2,token:1},Ap={[mp]:"normal",[pp]:"segmented",[hp]:"token"};var jp,Ip=(jp=function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e100;try{Ob(e,(()=>{const o=tb()||function(e){return e.getEditorState().read((()=>{const e=tb();return null!==e?e.clone():null}))}(e),i=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n0){let t=0;for(let o=0;o0)for(const[t,n]of i)if(Rb(n)){const r=n.getChildrenKeys();let o=t.firstChild;for(let n=0;n0){for(let t=0;t{$p(e,t,n)}))}function qp(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,a=t.__format,s=t.__style;return!(null!==n&&n!==i||null!==r&&r!==a||null!==o&&o!==s)}function Kp(e,t){const n=e.mergeWithSibling(t),r=bb()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Gp(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&Rv(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(qp(t,r)){r=Kp(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&Rv(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(qp(r,n)){r=Kp(r,n);break}break}n.remove()}}else r.remove()}function Xp(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),Rv(r)){e.set(r.__key,o?r.getTextContentSize():0,"text");break}if(!Rb(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element")}}let Zp=1;const Jp="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function Qp(e){const t=document.activeElement;if(null===t)return!1;const n=t.nodeName;return jb(hg(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==rg(t))}function eg(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!Qp(t)&&ng(t)===e}catch(e){return!1}}function tg(e){return e instanceof qb}function ng(e){let t=e;for(;null!=t;){const e=rg(t);if(tg(e))return e;t=Ug(t)}return null}function rg(e){return e?e.__lexicalEditor:null}function og(e){return e.isToken()||e.isSegmented()}function ig(e){return 3===e.nodeType}function ag(e){let t=e;for(;null!=t;){if(ig(t))return t;t=t.firstChild}return null}function sg(e,t,n){const r=Tp[t];if(null!==n&&(e&r)==(n&r))return e;let o=e^r;return"subscript"===t?o&=~Tp.superscript:"superscript"===t&&(o&=~Tp.subscript),o}function lg(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling();if(null===o)if(null!==i){const e=i.getWritable();r.__first=i.__key,e.__prev=null}else r.__first=null;else{const e=o.getWritable();if(null!==i){const t=i.getWritable();t.__prev=e.__key,e.__next=t.__key}else e.__next=null;n.__prev=null}if(null===i)if(null!==o){const e=o.getWritable();r.__last=o.__key,e.__next=null}else r.__last=null;else{const e=i.getWritable();if(null!==o){const t=o.getWritable();t.__next=e.__key,e.__prev=t.__key}else e.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function cg(e){yb();const t=e.getLatest(),n=t.__parent,r=vb(),o=bb(),i=r._nodeMap,a=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,a);const s=t.__key;o._dirtyType=1,Rb(e)?a.set(s,!0):o._dirtyLeaves.add(s)}function ug(e){gb();const t=bb(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=fg(n);null!==e&&e.getWritable()}if(null!==e){const t=fg(e);null!==t&&t.getWritable()}}}function dg(){return pb()?null:bb()._compositionKey}function fg(e,t){const n=(t||vb())._nodeMap.get(e);return void 0===n?null:n}function mg(e,t){const n=e[`__lexicalKey_${bb()._key}`];return void 0!==n?fg(n,t):null}function hg(e,t){let n=e;for(;null!=n;){const e=mg(n,t);if(null!==e)return e;n=Ug(n)}return null}function pg(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function gg(e){return e.read((()=>yg().getTextContent()))}function yg(){return vg(vb())}function vg(e){return e._nodeMap.get("root")}function bg(e){gb();const t=vb();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function wg(e){const t=bb(),n=function(e,t){let n=e;for(;null!=n;){const e=n[`__lexicalKey_${t._key}`];if(void 0!==e)return e;n=Ug(n)}return null}(e,t);return null===n?e===t.getRootElement()?fg("root"):null:fg(n)}function xg(e,t){return t?e.getTextContentSize():0}function Eg(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function _g(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function Sg(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function kg(e){return 3===e.nodeType?e.nodeValue:null}function Cg(e,t,n){const r=Zg(t._window);if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:a}=r;if(null!==o){let t=kg(o);const r=hg(o);if(null!==t&&Rv(r)){if(t===Ep&&n){const e=n.length;t=n,i=e,a=e}null!==t&&Ng(r,t,i,a,e)}}}function Ng(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const a=i.isComposing();let s=t;(a||o)&&t[t.length-1]===Ep&&(s=t.slice(0,-1));const l=i.getTextContent();if(o||s!==l){if(""===s){if(ug(null),sp||lp||fp)i.remove();else{const e=bb();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}return}const t=i.getParent(),o=nb(),l=i.getTextContentSize(),c=dg(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!a||Vv(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!a||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!a))return void i.markDirty();const d=tb();if(!Vv(d)||null===n||null===r)return void i.setTextContent(s);if(d.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=Mv(i.getTextContent());i.replace(e),i=e}i.setTextContent(s)}}}function Pg(e){return"ArrowLeft"===e}function Tg(e){return"ArrowRight"===e}function Og(e,t){return op?e:t}function Mg(e){return"Enter"===e}function Rg(e){return"Backspace"===e}function Dg(e){return"Delete"===e}function Ag(e,t,n){return"a"===e.toLowerCase()&&Og(t,n)}function jg(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=Fp(o);return n[t]=e,e}return o}function Ig(e,t,n,r,o){if(0===n.size)return;const i=r.__type,a=r.__key,s=t.get(i);void 0===s&&Ip(33,i);const l=s.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(a),d="destroyed"===u&&"created"===o;(void 0===u||d)&&c.set(a,d?"updated":o)}function Fg(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function Lg(e,t){const n=e.offset;if("element"===e.type)return Fg(e.getNode(),t,n);{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?Fg(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function zg(e){const t=Hg(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function Bg(e,t,n){return Nb(e,t,n)}function Wg(e){return!Fb(e)&&!e.isLastChild()&&!e.isInline()}function Vg(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&Ip(75,t),n}function Ug(e){const t=e.assignedSlot||e.parentElement;return null!==t&&11===t.nodeType?t.host:t}function $g(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function Hg(e){const t=e._window;return null===t&&Ip(78),t}function Yg(e){return Fb(e)||Rb(e)&&e.isShadowRoot()}function qg(e){const t=bb(),n=e.constructor.getType(),r=t._nodes.get(n);void 0===r&&Ip(97);const o=r.replace;if(null!==o){const t=o(e);return t instanceof e.constructor||Ip(98),t}return e}function Kg(e,t){!Fb(e.getParent())||Rb(t)||jb(t)||Ip(99)}function Gg(e){return(jb(e)||Rb(e)&&!e.canBeEmpty())&&!e.isInline()}function Xg(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function Zg(e){return np?(e||window).getSelection():null}function Jg(e){return 1===e.nodeType}function Qg(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function ey(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function ty(e){if(Fb(e)||jb(e)&&!e.isInline())return!0;if(!Rb(e)||Yg(e))return!1;const t=e.getFirstChild(),n=null===t||hv(t)||Rv(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function ny(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const ry=new WeakMap,oy=new Map;function iy(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function ay(e,t,n,r,o,i){let a=e.getFirstChild();for(;null!==a;){const e=a.__key;a.__parent===t&&(Rb(a)&&ay(a,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),a=a.getNextSibling()}}let sy,ly,cy,uy,dy,fy,my,hy,py,gy,yy="",vy="",by=null,wy="",xy="",Ey=!1,_y=!1,Sy=null;function ky(e,t){const n=my.get(e);if(null!==t){const n=By(e);n.parentNode===t&&t.removeChild(n)}if(hy.has(e)||ly._keyToDOMMap.delete(e),Rb(n)){const e=Iy(n,my);Cy(e,0,e.length-1,null)}void 0!==n&&Ig(gy,cy,uy,n,"destroyed")}function Cy(e,t,n,r){let o=t;for(;o<=n;++o){const t=e[o];void 0!==t&&ky(t,r)}}function Ny(e,t){e.setProperty("text-align",t)}const Py="40px";function Ty(e,t){const n=sy.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||Py;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function Oy(e,t){const n=e.style;0===t?Ny(n,""):1===t?Ny(n,"left"):2===t?Ny(n,"center"):3===t?Ny(n,"right"):4===t?Ny(n,"justify"):5===t?Ny(n,"start"):6===t&&Ny(n,"end")}function My(e,t,n){const r=hy.get(e);void 0===r&&Ip(60);const o=r.createDOM(sy,ly);if(function(e,t,n){const r=n._keyToDOMMap;t["__lexicalKey_"+n._key]=e,r.set(e,t)}(e,o,ly),Rv(r)?o.setAttribute("data-lexical-text","true"):jb(r)&&o.setAttribute("data-lexical-decorator","true"),Rb(r)){const e=r.__indent,t=r.__size;if(0!==e&&Ty(o,e),0!==t){const e=t-1;!function(e,t,n,r){const o=vy;vy="",Ry(e,n,0,t,r,null),jy(n,r),vy=o}(Iy(r,hy),e,r,o)}const n=r.__format;0!==n&&Oy(o,n),r.isInline()||Ay(null,r,o),Wg(r)&&(yy+=_p,xy+=_p)}else{const t=r.getTextContent();if(jb(r)){const t=r.decorate(ly,sy);null!==t&&Ly(e,t),o.contentEditable="false"}else Rv(r)&&(r.isDirectionless()||(vy+=t));yy+=t,xy+=t}if(null!==t)if(null!=n)t.insertBefore(o,n);else{const e=t.__lexicalLineBreak;null!=e?t.insertBefore(o,e):t.appendChild(o)}return Ig(gy,cy,uy,r,"created"),o}function Ry(e,t,n,r,o,i){const a=yy;yy="";let s=n;for(;s<=r;++s){My(e[s],o,i);const t=hy.get(e[s]);null!==t&&Rv(t)&&(null===by&&(by=t.getFormat()),""===wy&&(wy=t.getStyle()))}Wg(t)&&(yy+=_p),o.__lexicalTextContent=yy,yy=a+yy}function Dy(e,t){const n=t.get(e);return hv(n)||jb(n)&&n.isInline()}function Ay(e,t,n){const r=null!==e&&(0===e.__size||Dy(e.__last,my)),o=0===t.__size||Dy(t.__last,hy);if(r){if(!o){const e=n.__lexicalLineBreak;if(null!=e)try{n.removeChild(e)}catch(t){if("object"==typeof t&&null!=t){const r=`${t.toString()} Parent: ${n.tagName}, child: ${e.tagName}.`;throw new Error(r)}throw t}n.__lexicalLineBreak=null}}else if(o){const e=document.createElement("br");n.__lexicalLineBreak=e,n.appendChild(e)}}function jy(e,t){const n=t.__lexicalDirTextContent,r=t.__lexicalDir;if(n!==vy||r!==Sy){const n=""===vy,i=n?Sy:(o=vy,Np.test(o)?"rtl":Pp.test(o)?"ltr":null);if(i!==r){const o=t.classList,a=sy.theme;let s=null!==r?a[r]:void 0,l=null!==i?a[i]:void 0;if(void 0!==s){if("string"==typeof s){const e=Fp(s);s=a[r]=e}o.remove(...s)}if(null===i||n&&"ltr"===i)t.removeAttribute("dir");else{if(void 0!==l){if("string"==typeof l){const e=Fp(l);l=a[i]=e}void 0!==l&&o.add(...l)}t.dir=i}_y||(e.getWritable().__dir=i)}Sy=i,t.__lexicalDirTextContent=vy,t.__lexicalDir=i}var o}function Iy(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&Ip(101),n.push(r),r=e.__next}return n}function Fy(e,t){const n=my.get(e);let r=hy.get(e);void 0!==n&&void 0!==r||Ip(61);const o=Ey||fy.has(e)||dy.has(e),i=Vg(ly,e);if(n===r&&!o){if(Rb(n)){const e=i.__lexicalTextContent;void 0!==e&&(yy+=e,xy+=e);const t=i.__lexicalDirTextContent;void 0!==t&&(vy+=t)}else{const e=n.getTextContent();Rv(n)&&!n.isDirectionless()&&(vy+=e),xy+=e,yy+=e}return i}if(n!==r&&o&&Ig(gy,cy,uy,r,"updated"),r.updateDOM(n,i,sy)){const n=My(e,null,null);return null===t&&Ip(62),t.replaceChild(n,i),ky(e,null),n}if(Rb(n)&&Rb(r)){const e=r.__indent;e!==n.__indent&&Ty(i,e);const t=r.__format;t!==n.__format&&Oy(i,t),o&&(function(e,t,n){const r=vy;var o;vy="",by=null,wy="",function(e,t,n){const r=yy,o=e.__size,i=t.__size;if(yy="",1===o&&1===i){const r=e.__first,o=t.__first;if(r===o)Fy(r,n);else{const e=By(r),t=My(o,null,null);try{n.replaceChild(t,e)}catch(i){if("object"==typeof i&&null!=i){const a=`${i.toString()} Parent: ${n.tagName}, new child: {tag: ${t.tagName} key: ${o}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw new Error(a)}throw i}ky(r,null)}const a=hy.get(o);Rv(a)&&(null===by&&(by=a.getFormat()),""===wy&&(wy=a.getStyle()))}else{const r=Iy(e,my),a=Iy(t,hy);if(0===o)0!==i&&Ry(a,t,0,i-1,n,null);else if(0===i){if(0!==o){const e=null==n.__lexicalLineBreak;Cy(r,0,o-1,e?null:n),e&&(n.textContent="")}}else!function(e,t,n,r,o,i){const a=r-1,s=o-1;let l,c,u=i.firstChild,d=0,f=0;for(;d<=a&&f<=s;){const e=t[d],r=n[f];if(e===r)u=zy(Fy(r,i)),d++,f++;else{void 0===l&&(l=new Set(t)),void 0===c&&(c=new Set(n));const o=c.has(e),a=l.has(r);if(o)if(a){const e=Vg(ly,r);e===u?u=zy(Fy(r,i)):(null!=u?i.insertBefore(e,u):i.appendChild(e),Fy(r,i)),d++,f++}else My(r,i,u),f++;else u=zy(By(e)),ky(e,i),d++}const o=hy.get(r);null!==o&&Rv(o)&&(null===by&&(by=o.getFormat()),""===wy&&(wy=o.getStyle()))}const m=d>a,h=f>s;if(m&&!h){const t=n[s+1];Ry(n,e,f,s,i,void 0===t?null:ly.getElementByKey(t))}else h&&!m&&Cy(t,d,a,i)}(t,r,a,o,i,n)}Wg(t)&&(yy+=_p),n.__lexicalTextContent=yy,yy=r+yy}(e,t,n),jy(t,n),Hb(o=t)&&null!=by&&by!==o.__textFormat&&!_y&&(o.setTextFormat(by),o.setTextStyle(wy)),function(e){Hb(e)&&""!==wy&&wy!==e.__textStyle&&!_y&&e.setTextStyle(wy)}(t),vy=r}(n,r,i),Fb(r)||r.isInline()||Ay(n,r,i)),Wg(r)&&(yy+=_p,xy+=_p)}else{const t=r.getTextContent();if(jb(r)){const t=r.decorate(ly,sy);null!==t&&Ly(e,t)}else Rv(r)&&!r.isDirectionless()&&(vy+=t);yy+=t,xy+=t}if(!_y&&Fb(r)&&r.__cachedText!==xy){const e=r.getWritable();e.__cachedText=xy,r=e}return i}function Ly(e,t){let n=ly._pendingDecorators;const r=ly._decorators;if(null===n){if(r[e]===t)return;n=pg(ly)}n[e]=t}function zy(e){let t=e.nextSibling;return null!==t&&t===ly._blockCursorElement&&(t=t.nextSibling),t}function By(e){const t=py.get(e);return void 0===t&&Ip(75,e),t}const Wy=Object.freeze({}),Vy=[["keydown",function(e,t){if(Uy=e.timeStamp,$y=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:a}=e;Bg(t,Th,e)||null!=n&&(function(e,t,n,r){return Tg(e)&&!t&&!r&&!n}(n,o,a,i)?Bg(t,Oh,e):function(e,t,n,r,o){return Tg(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?Bg(t,Mh,e):function(e,t,n,r){return Pg(e)&&!t&&!r&&!n}(n,o,a,i)?Bg(t,Rh,e):function(e,t,n,r,o){return Pg(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?Bg(t,Dh,e):function(e,t,n){return function(e){return"ArrowUp"===e}(e)&&!t&&!n}(n,o,i)?Bg(t,Ah,e):function(e,t,n){return function(e){return"ArrowDown"===e}(e)&&!t&&!n}(n,o,i)?Bg(t,jh,e):function(e,t){return Mg(e)&&t}(n,r)?(Xy=!0,Bg(t,Ih,e)):function(e){return" "===e}(n)?Bg(t,Fh,e):function(e,t){return op&&t&&"o"===e.toLowerCase()}(n,o)?(e.preventDefault(),Xy=!0,Bg(t,bh,!0)):function(e,t){return Mg(e)&&!t}(n,r)?(Xy=!1,Bg(t,Ih,e)):function(e,t,n,r){return op?!t&&!n&&(Rg(e)||"h"===e.toLowerCase()&&r):!(r||t||n)&&Rg(e)}(n,a,i,o)?Rg(n)?Bg(t,Lh,e):(e.preventDefault(),Bg(t,vh,!0)):function(e){return"Escape"===e}(n)?Bg(t,zh,e):function(e,t,n,r,o){return op?!(n||r||o)&&(Dg(e)||"d"===e.toLowerCase()&&t):!(t||r||o)&&Dg(e)}(n,o,r,a,i)?Dg(n)?Bg(t,Bh,e):(e.preventDefault(),Bg(t,vh,!1)):function(e,t,n){return Rg(e)&&(op?t:n)}(n,a,o)?(e.preventDefault(),Bg(t,Sh,!0)):function(e,t,n){return Dg(e)&&(op?t:n)}(n,a,o)?(e.preventDefault(),Bg(t,Sh,!1)):function(e,t){return op&&t&&Rg(e)}(n,i)?(e.preventDefault(),Bg(t,kh,!0)):function(e,t){return op&&t&&Dg(e)}(n,i)?(e.preventDefault(),Bg(t,kh,!1)):function(e,t,n,r){return"b"===e.toLowerCase()&&!t&&Og(n,r)}(n,a,i,o)?(e.preventDefault(),Bg(t,Ch,"bold")):function(e,t,n,r){return"u"===e.toLowerCase()&&!t&&Og(n,r)}(n,a,i,o)?(e.preventDefault(),Bg(t,Ch,"underline")):function(e,t,n,r){return"i"===e.toLowerCase()&&!t&&Og(n,r)}(n,a,i,o)?(e.preventDefault(),Bg(t,Ch,"italic")):function(e,t,n,r){return"Tab"===e&&!t&&!n&&!r}(n,a,o,i)?Bg(t,Wh,e):function(e,t,n,r){return"z"===e.toLowerCase()&&!t&&Og(n,r)}(n,r,i,o)?(e.preventDefault(),Bg(t,Nh,void 0)):function(e,t,n,r){return op?"z"===e.toLowerCase()&&n&&t:"y"===e.toLowerCase()&&r||"z"===e.toLowerCase()&&r&&t}(n,r,i,o)?(e.preventDefault(),Bg(t,Ph,void 0)):$v(t._editorState._selection)?function(e,t,n,r){return!t&&"c"===e.toLowerCase()&&(op?n:r)}(n,r,i,o)?(e.preventDefault(),Bg(t,Yh,e)):function(e,t,n,r){return!t&&"x"===e.toLowerCase()&&(op?n:r)}(n,r,i,o)?(e.preventDefault(),Bg(t,qh,e)):Ag(n,i,o)&&(e.preventDefault(),Bg(t,Kh,e)):!ip&&Ag(n,i,o)&&(e.preventDefault(),Bg(t,Kh,e)),function(e,t,n,r){return e||t||n||r}(o,r,a,i)&&Bg(t,tp,e))}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;n instanceof Node&&"touch"!==r&&Ob(t,(()=>{jb(hg(n))||(Gy=!0)}))}],["compositionstart",function(e,t){Ob(t,(()=>{const n=tb();if(Vv(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();ug(r.key),(e.timeStamp{rv(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),Ob(t,(()=>{const n=tb(),r=e.data,o=nv(e);if(null!=r&&Vv(n)&&Qy(n,o,r,e.timeStamp,!1)){Zy&&(rv(t,r),Zy=!1);const o=n.anchor.getNode(),i=Zg(t._window);if(null===i)return;const a=n.isBackward(),s=a?n.anchor.offset:n.focus.offset,l=a?n.focus.offset:n.anchor.offset;ap&&!n.isCollapsed()&&Rv(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,s)+r+o.getTextContent().slice(s+l)===kg(i.anchorNode)||Bg(t,xh,r);const c=r.length;ip&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),sp||lp||fp||!t.isComposing()||(Uy=0,ug(null))}else Cg(!1,t,null!==r?r:void 0),Zy&&(rv(t,r||void 0),Zy=!1);gb(),Hp(bb())})),Yy=null}],["click",function(e,t){Ob(t,(()=>{const n=tb(),r=Zg(t._window),o=nb();if(r)if(Vv(n)){const t=n.anchor,i=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!Fb(i)&&1===yg().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):3!==e.detail||n.isCollapsed()||i!==n.focus.getNode()&&(Rb(i)?i.select(0):i.getParentOrThrow().select(0))}else if("touch"===e.pointerType){const n=r.anchorNode;if(null!==n){const i=n.nodeType;1!==i&&3!==i||bg(eb(o,r,t,e))}}Bg(t,yh,e)}))}],["cut",Wy],["copy",Wy],["dragstart",Wy],["dragover",Wy],["dragend",Wy],["paste",Wy],["focus",Wy],["blur",Wy],["drop",Wy]];ap&&Vy.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType,r=nv(e);"deleteCompositionText"===n||ip&&zg(t)||"insertCompositionText"!==n&&Ob(t,(()=>{const o=tb();if("deleteContentBackward"===n){if(null===o){const e=nb();if(!Vv(e))return;bg(e.clone())}if(Vv(o)){const n=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===$y&&i{Ob(t,(()=>{ug(null)}))}),30),Vv(o)){const e=o.anchor.getNode();e.markDirty(),o.format=e.getFormat(),Rv(e)||Ip(142),o.style=e.getStyle()}}else{ug(null),e.preventDefault();const r=o.anchor.getNode().getTextContent(),i=0===o.anchor.offset&&o.focus.offset===r.length;dp&&n&&!i||Bg(t,vh,!0)}return}}var i;if(!Vv(o))return;const a=e.data;null!==Yy&&Cg(!1,t,Yy),o.dirty&&null===Yy||!o.isCollapsed()||Fb(o.anchor.getNode())||null===r||o.applyDOMRange(r),Yy=null;const s=o.anchor,l=o.focus,c=s.getNode(),u=l.getNode();if("insertText"!==n&&"insertTranspose"!==n)switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Bg(t,xh,e);break;case"insertFromComposition":ug(null),Bg(t,xh,e);break;case"insertLineBreak":ug(null),Bg(t,bh,!1);break;case"insertParagraph":ug(null),Xy&&!lp?(Xy=!1,Bg(t,bh,!1)):Bg(t,wh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Bg(t,Eh,e);break;case"deleteByComposition":(function(e,t){return e!==t||Rb(e)||Rb(t)||!e.isToken()||!t.isToken()})(c,u)&&Bg(t,_h,e);break;case"deleteByDrag":case"deleteByCut":Bg(t,_h,e);break;case"deleteContent":Bg(t,vh,!1);break;case"deleteWordBackward":Bg(t,Sh,!0);break;case"deleteWordForward":Bg(t,Sh,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Bg(t,kh,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Bg(t,kh,!1);break;case"formatStrikeThrough":Bg(t,Ch,"strikethrough");break;case"formatBold":Bg(t,Ch,"bold");break;case"formatItalic":Bg(t,Ch,"italic");break;case"formatUnderline":Bg(t,Ch,"underline");break;case"historyUndo":Bg(t,Nh,void 0);break;case"historyRedo":Bg(t,Ph,void 0)}else{if("\n"===a)e.preventDefault(),Bg(t,bh,!1);else if(a===_p)e.preventDefault(),Bg(t,wh,void 0);else if(null==a&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=a&&Qy(o,r,a,e.timeStamp,!0)?(e.preventDefault(),Bg(t,xh,a)):Yy=a;Hy=e.timeStamp}}))}(e,t)]);let Uy=0,$y=null,Hy=0,Yy=null;const qy=new WeakMap;let Ky=!1,Gy=!1,Xy=!1,Zy=!1,Jy=[0,"",0,"root",0];function Qy(e,t,n,r,o){const i=e.anchor,a=e.focus,s=i.getNode(),l=bb(),c=Zg(l._window),u=null!==c?c.anchorNode:null,d=i.key,f=l.getElementByKey(d),m=n.length;return d!==a.key||!Rv(s)||(!o&&(!ap||Hy1||(o||!ap)&&null!==f&&!s.isComposing()&&u!==ag(f)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=t.isToken();return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(Rv(t)||Rb(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,s)}function ev(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function tv(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}=e;Ky&&(Ky=!1,ev(r,o)&&ev(i,a))||Ob(t,(()=>{if(!n)return void bg(null);if(!eg(t,r,i))return;const s=tb();if(Vv(s)){const n=s.anchor,r=n.getNode();if(s.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(s.dirty=!0);const o=Hg(t).event,i=o?o.timeStamp:performance.now(),[a,l,c,u,d]=Jy,f=yg(),m=!1===t.isComposing()&&""===f.getTextContent();if(i{const t=nb(),o=n.anchorNode;if(null===o)return;const i=o.nodeType;1!==i&&3!==i||bg(eb(t,n,r,e))})));const o=_g(r),i=o[o.length-1],a=i._key,s=iv.get(a),l=s||i;l!==r&&tv(n,l,!1),tv(n,r,!0),r!==i?iv.set(a,r):s&&iv.delete(a)}function sv(e){e._lexicalHandled=!0}function lv(e){return!0===e._lexicalHandled}function cv(e,t,n){gb();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=tb();if(!Vv(t)||!Rb(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();return $g(o,e)&&n.set(e.__key,0,"element"),$g(i,e)&&r.set(e.__key,0,"element"),t}(e);let a=!1;if(Vv(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(ib(t,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0),n.key===r&&(ib(n,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else $v(i)&&t&&e.isSelected()&&e.selectPrevious();if(Vv(i)&&t&&!a){const t=e.getIndexWithinParent();lg(e),rb(i,o,t,-1)}else lg(e);n||Yg(o)||o.canBeEmpty()||!o.isEmpty()||cv(o,t),t&&Fb(o)&&o.isEmpty()&&o.selectEnd()}class uv{static getType(){Ip(64,this.name)}static clone(e){Ip(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,function(e,t){if(null!=t)return void(e.__key=t);gb(),yb();const n=bb(),r=vb(),o=""+Zp++;r._nodeMap.set(o,e),Rb(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType=1,e.__key=o}(this,e)}getType(){return this.__type}isInline(){Ip(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=fg(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||tb();if(null==t)return!1;const n=t.getNodes().some((e=>e.__key===this.__key));if(Rv(this))return n;if(Vv(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(jb(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor,r=n.getNode();if(n.offset===r.getChildrenSize()&&r.is(e)&&r.getLastChildOrThrow().is(this))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:fg(e)}getParentOrThrow(){const e=this.getParent();return null===e&&Ip(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(Yg(t))return Rb(e)||e===this&&jb(e)||Ip(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&Ip(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:fg(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:fg(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),n=e.getParents();Rb(this)&&t.unshift(this),Rb(e)&&n.unshift(e);const r=t.length,o=n.length;if(0===r||0===o||t[r-1]!==n[o-1])return null;const i=new Set(n);for(let e=0;e{a.append(e)}))),Vv(n)){bg(n);const e=n.anchor,t=n.focus;e.key===o&&zv(e,a),t.key===o&&zv(t,a)}return dg()===o&&ug(i),a}insertAfter(e,t=!0){gb(),Kg(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=tb();let a=!1,s=!1;if(null!==o){const t=e.getIndexWithinParent();if(lg(r),Vv(i)){const e=o.__key,n=i.anchor,r=i.focus;a="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(null===l?c.__last=u:l.getWritable().__prev=u,c.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&Vv(i)){const e=this.getIndexWithinParent();rb(i,c,e+1);const t=c.__key;a&&i.anchor.set(t,e+2,"element"),s&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){gb(),Kg(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;lg(r);const i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;const c=tb();return t&&Vv(c)&&rb(c,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return $b()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){gb();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(Rb(n))return n.select();if(!Rv(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){gb();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(Rb(n))return n.select(0,0);if(!Rv(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}}class dv extends uv{static getType(){return"linebreak"}static clone(e){return new dv(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&ey(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&pv(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&pv(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&ey(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&pv(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&pv(r))return!0}return!1}(e)?null:{conversion:fv,priority:0}}}static importJSON(e){return mv()}exportJSON(){return{type:"linebreak",version:1}}}function fv(e){return{node:mv()}}function mv(){return qg(new dv)}function hv(e){return e instanceof dv}function pv(e){return 3===e.nodeType&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function gv(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function yv(e,t){return 1&t?"strong":2&t?"em":"span"}function vv(e,t,n,r,o){const i=r.classList;let a=jg(o,"base");void 0!==a&&i.add(...a),a=jg(o,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;void 0!==a&&(8&n&&4&n?(s=!0,l||i.add(...a)):l&&i.remove(...a));for(const e in Tp){const r=Tp[e];if(a=jg(o,e),void 0!==a)if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...a);continue}t&r&&(!l||"underline"!==e)&&"strikethrough"!==e||i.add(...a)}else t&r&&i.remove(...a)}}function bv(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?Ep:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||ip){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o({conversion:Nv,priority:0}),b:()=>({conversion:Sv,priority:0}),code:()=>({conversion:Ov,priority:0}),em:()=>({conversion:Ov,priority:0}),i:()=>({conversion:Ov,priority:0}),s:()=>({conversion:Ov,priority:0}),span:()=>({conversion:_v,priority:0}),strong:()=>({conversion:Ov,priority:0}),sub:()=>({conversion:Ov,priority:0}),sup:()=>({conversion:Ov,priority:0}),u:()=>({conversion:Ov,priority:0})}}static importJSON(e){const t=Mv(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){let{element:t}=super.exportDOM(e);return null!==t&&Jg(t)||Ip(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=xv(t,"b")),this.hasFormat("italic")&&(t=xv(t,"i")),this.hasFormat("strikethrough")&&(t=xv(t,"s")),this.hasFormat("underline")&&(t=xv(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?Tp[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?Op[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=sg(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=Dp[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){gb();let n=e,r=t;const o=tb(),i=this.getTextContent(),a=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!Vv(o))return Jv(a,n,a,r,"text","text");{const e=dg();e!==o.anchor.key&&e!==o.focus.key||ug(a),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,a=n.length;let s=e;s<0&&(s=a+s,s<0&&(s=0));const l=tb();if(r&&Vv(l)){const t=e+a;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,s)+n+i.slice(s+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){gb();const t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=dg(),i=new Set(e),a=[],s=n.length;let l="";for(let e=0;eb&&e.offset<=l&&(e.key=s,e.offset-=b,y.dirty=!0),t.key===r&&"text"===t.type&&t.offset>b&&t.offset<=l&&(t.key=s,t.offset-=b,y.dirty=!0)}o===r&&ug(s),b=l,v.push(i)}if(null!==d){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&cg(t),null!==n&&cg(n)}(this);const e=d.getWritable(),t=this.getIndexWithinParent();g?(e.splice(t,0,v),this.remove()):e.splice(t,1,v),Vv(y)&&rb(y,d,t,c-1)}return v}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||Ip(50);const n=this.__key,r=e.__key,o=this.__text,i=o.length;dg()===r&&ug(n);const a=tb();if(Vv(a)){const o=a.anchor,s=a.focus;null!==o&&o.key===r&&(ab(o,t,n,e,i),a.dirty=!0),null!==s&&s.key===r&&(ab(s,t,n,e,i),a.dirty=!0)}const s=e.__text,l=t?s+o:o+s;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function _v(e){return{forChild:Dv(e.style),node:null}}function Sv(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:Dv(t.style,n?void 0:"bold"),node:null}}const kv=new WeakMap;function Cv(e){return"PRE"===e.nodeName||1===e.nodeType&&void 0!==e.style&&void 0!==e.style.whiteSpace&&e.style.whiteSpace.startsWith("pre")}function Nv(e){const t=e;null===e.parentElement&&Ip(129);let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=kv.get(n))&&!Cv(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=Pv(e,!0));)if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Mv(n)}}function Pv(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,1===n.nodeType){const e=n.style.display;if(""===e&&!Qg(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(3===n.nodeType)return n;if("BR"===n.nodeName)return null}}const Tv={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ov(e){const t=Tv[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:Dv(e.style,t),node:null}}function Mv(e=""){return qg(new Ev(e))}function Rv(e){return e instanceof Ev}function Dv(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),a="italic"===e.fontStyle,s=r.includes("underline"),l=e.verticalAlign;return e=>Rv(e)?(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),a&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}class Av extends Ev{static getType(){return"tab"}static clone(e){return new Av(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){const t=jv();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(e){Ip(126)}setDetail(e){Ip(127)}setMode(e){Ip(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function jv(){return qg(new Av)}class Iv{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode();const r=this.offset,o=e.offset;if(Rb(t)){const e=t.getDescendantByIndex(r);t=null!=e?e:t}if(Rb(n)){const e=n.getDescendantByIndex(o);n=null!=e?e:n}return t===n?re&&(r=e)}else if(!Rb(t)){const e=t.getNextSibling();if(Rv(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function zv(e,t){if(Rb(t)){const n=t.getLastDescendant();Rb(n)||Rv(n)?Lv(e,n):Lv(e,t)}else Lv(e,t)}function Bv(e,t,n,r){e.key=t,e.offset=n,e.type=r}class Wv{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!$v(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new Wv(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(Rv(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e0?[]:[a]:a.getNodesBetween(s),pb()||(this._cachedNodes=u),u}setTextNodeRange(e,t,n,r){Bv(this.anchor,e.__key,t,"text"),Bv(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,s]=Yv(this);let l="",c=!0;for(let u=0;u=0;e--){const t=i[e];if(t.is(d)||Rb(t)&&t.isParentOf(d))break;t.isAttached()&&(!m.has(t)||t.is(o)?p||g.insertAfter(t,!1):t.remove())}if(!p){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(d.isToken())if(s===f)d.select();else{const t=Mv(e);t.select(),d.replace(t)}else d=d.spliceText(s,f-s,e,!0),""===d.getTextContent()?d.remove():d.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e0&&(p===h.getTextContentSize()||og(h)||([h]=h.splitText(p)),h.setFormat(g));for(let t=c+1;t(Rb(e)||jb(e))&&!e.isInline()))){Rb(t)||Ip(135);const r=sb(this);return t.splice(r,0,e),void n.selectEnd()}const r=function(e){const t=$b();let n=null;for(let r=0;rl?l:s,t=s>l?s:l,n=i.splitText(e,t),r=0===e?n[0]:n[1];return null!=r?[r]:[]}return[i]}const c=r.isBefore(o);if(Rv(i)){const t=c?s:l;t===i.getTextContentSize()?e.shift():0!==t&&([,i]=i.splitText(t),e[0]=i)}if(Rv(a)){const t=a.getTextContent().length,r=c?l:s;0===r?e.pop():r!==t&&([a]=a.splitText(r),e[n]=a)}return e}modify(e,t,n){const r=this.focus,o=this.anchor,i="move"===e,a=Lg(r,t);if(jb(a)&&!a.isIsolated()){if(i&&a.isKeyboardSelectable()){const e=Qv();return e.add(a.__key),void bg(e)}const e=t?a.getPreviousSibling():a.getNextSibling();if(Rv(e)){const n=e.__key,a=t?e.getTextContent().length:0;return r.set(n,a,"text"),void(i&&o.set(n,a,"text"))}{const n=a.getParentOrThrow();let s,l;return Rb(e)?(l=e.__key,s=t?e.getChildrenSize():0):(s=a.getIndexWithinParent(),l=n.__key,t||s++),r.set(l,s,"element"),void(i&&o.set(l,s,"element"))}}const s=bb(),l=Zg(s._window);if(!l)return;const c=s._blockCursorElement,u=s._rootElement;if(null===u||null===c||!Rb(a)||a.isInline()||a.canBeEmpty()||Xg(c,s,u),function(e,t,n,r){e.modify(t,n,r)}(l,e,t?"backward":"forward",n),l.rangeCount>0){const e=l.getRangeAt(0),n=this.anchor.getNode(),r=Fb(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(Yg(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!i){const n=this.getNodes(),o=[];let i=!1;for(let e=0;e0)if(t){const e=o[0];Rb(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=o[o.length-1];Rb(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;Bv(n,t.key,t.offset,t.type),Bv(t,r,o,i),e._cachedNodes=null}(this)}}}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&Rb(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(Rb(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=this.focus,o=Lg(r,e);if(jb(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&Rb(n)&&0===n.getChildrenSize()){n.remove();const e=Qv();e.add(o.__key),bg(e)}else o.remove(),bb().dispatchCommand(gh,void 0);return}if(!e&&Rb(o)&&Rb(n)&&n.isEmpty())return n.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&("element"===t.type?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===t.type?t.getNode():null,null!==o&&o.isSegmented()){const t=r.offset,i=o.getTextContentSize();if(o.is(n)||e&&t!==i||!e&&0!==t)return void qv(o,e,t)}else if(null!==n&&n.isSegmented()){const r=t.offset,i=n.getTextContentSize();if(n.is(o)||e&&0!==r||!e&&r!==i)return void qv(n,e,r)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode();if(o===r.getNode()&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,a=en||r){o.splice(e,1),r&&(s=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(s,s))}function Kv(e,t,n,r){let o,i=t;if(1===e.nodeType){let a=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;i===l&&(a=!0,i=l-1);let u=s[i],d=!1;if(u===c)u=s[i+1],d=!0;else if(null!==c){const n=c.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,c)&&i--}if(o=wg(u),Rv(o))i=xg(o,a);else{let r=wg(e);if(null===r)return null;if(Rb(r)){i=Math.min(r.getChildrenSize(),i);let e=r.getChildAtIndex(i);if(Rb(e)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(e,0,n)){const t=a?e.getLastDescendant():e.getFirstDescendant();null===t?r=e:(e=t,r=Rb(e)?e:e.getParentOrThrow()),i=0}Rv(e)?(o=e,r=null,i=xg(e,a)):e!==r&&a&&!d&&i++}else{const n=r.getIndexWithinParent();i=0===t&&jb(r)&&wg(e)===r?n:n+1,r=r.getParentOrThrow()}if(Rb(r))return Fv(r.__key,i,"element")}}else o=wg(e);return Rv(o)?Fv(o.__key,i,"text"):null}function Gv(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&Rb(i)&&i.isInline()){const t=i.getPreviousSibling();Rv(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)}}else Rb(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Rv(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&Rb(r)&&r.isInline())e.key=r.__key,e.offset=0,e.type="element";else if((n||t)&&null===r&&Rb(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();Rv(t)&&(e.key=t.__key,e.offset=0)}}}function Xv(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);Gv(e,r,o),Gv(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const i=bb();if(i.isComposing()&&i._compositionKey!==e.key&&Vv(n)){const r=n.anchor,o=n.focus;Bv(e,r.key,r.offset,r.type),Bv(t,o.key,o.offset,o.type)}}}function Zv(e,t,n,r,o,i){if(null===e||null===n||!eg(o,e,n))return null;const a=Kv(e,t,Vv(i)?i.anchor:null,o);if(null===a)return null;const s=Kv(n,r,Vv(i)?i.focus:null,o);if(null===s)return null;if("element"===a.type&&"element"===s.type){const t=wg(e),r=wg(n);if(jb(t)&&jb(r))return null}return Xv(a,s,i),[a,s]}function Jv(e,t,n,r,o,i){const a=vb(),s=new Uv(Fv(e,t,o),Fv(n,r,i),0,"");return s.dirty=!0,a._selection=s,s}function Qv(){return new Wv(new Set)}function eb(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,a=i?i.type:void 0,s="selectionchange"===a,l=!Lp&&(s||"beforeinput"===a||"compositionstart"===a||"compositionend"===a||"click"===a&&i&&3===i.detail||"drop"===a||void 0===a);let c,u,d,f;if(Vv(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,s&&Vv(e)&&!eg(n,c,u))return e.clone();const m=Zv(c,d,u,f,n,e);if(null===m)return null;const[h,p]=m;return new Uv(h,p,Vv(e)?e.format:0,Vv(e)?e.style:"")}function tb(){return vb()._selection}function nb(){return bb()._editorState._selection}function rb(e,t,n,r=1){const o=e.anchor,i=e.focus,a=o.getNode(),s=i.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n0||n0||n=e,a=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Rv(a)){let e=0;o&&(e=a.getTextContentSize()),t.set(a.__key,e,"text"),r.set(a.__key,e,"text")}}else{if(Rb(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Rv(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(Rb(a)){const e=a.getChildrenSize(),t=o>=e,n=t?a.getChildAtIndex(e-1):a.getChildAtIndex(o);if(Rv(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}}function ib(e,t,n,r,o){let i=null,a=0,s=null;null!==r?(i=r.__key,Rv(r)?(a=r.getTextContentSize(),s="text"):Rb(r)&&(a=r.getChildrenSize(),s="element")):null!==o&&(i=o.__key,Rv(o)?s="text":Rb(o)&&(s="element")),null!==i&&null!==s?e.set(i,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function ab(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function sb(e){let t=e;e.isCollapsed()||t.removeText();const n=tb();Vv(n)&&(t=n),Vv(t)||Ip(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!ty(o);)[o,i]=lb(o,i);return i}function lb(e,t){const n=e.getParent();if(!n){const e=$b();return yg().append(e),e.select(),[yg(),0]}if(Rv(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!Rb(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new Uv(Fv(e.__key,t,"element"),Fv(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let cb=null,ub=null,db=!1,fb=!1,mb=0;const hb={characterData:!0,childList:!0,subtree:!0};function pb(){return db||null!==cb&&cb._readOnly}function gb(){db&&Ip(13)}function yb(){mb>99&&Ip(14)}function vb(){return null===cb&&Ip(195,wb()),cb}function bb(){return null===ub&&Ip(196,wb()),ub}function wb(){let e=0;const t=new Set,n=qb.version;if("undefined"!=typeof window)for(const r of document.querySelectorAll("[contenteditable]")){const o=rg(r);if(tg(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function xb(e,t,n){const r=t.__type,o=function(e,t){const n=e._nodes.get(t);return void 0===n&&Ip(30,t),n}(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const a=i.length;for(let e=0;e0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=n.ownerDocument,o=r.defaultView;if(null===o)return;let{top:i,bottom:a}=t,s=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)s=0,l=Hg(e).innerHeight;else{const e=c.getBoundingClientRect();s=e.top,l=e.bottom}let n=0;if(il&&(n=a-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,a-=t}if(t)break;c=Ug(c)}}(n,t,i)}}Ky=!0}}(a,s,e,w,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(Vv(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),a=o.offset;let s=!1,l=null;if(a===i.getChildrenSize())Gg(i.getChildAtIndex(a-1))&&(s=!0);else{const t=i.getChildAtIndex(a);if(Gg(t)){const n=t.getPreviousSibling();(null===n||Gg(n))&&(s=!0,l=e.getElementByKey(t.__key))}}if(s){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=Fp(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&Xg(r,e,t)})(e,r,s),null!==m&&m.observe(r,hb)}finally{ub=d,cb=c}}null!==h&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),a=i.length;for(let e=0;e{r=Nb(e,t,n)})),r}const r=_g(e);for(let o=4;o>=0;o--)for(let i=0;i0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of s){const r=o.get(e);Rv(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&Gp(r),void 0!==r&&Eb(r,i)&&xb(t,r,a),n.add(e)}if(s=t._dirtyLeaves,l=s.size,l>0){mb++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(const e of c){const n=e[0],s=e[1];if("root"!==n&&!s)continue;const l=o.get(n);void 0!==l&&Eb(l,i)&&xb(t,l,a),r.set(n,s)}s=t._dirtyLeaves,l=s.size,c=t._dirtyElements,u=c.size,mb++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),Pb(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,a=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(Rb(t)&&ay(t,e,o,i,a,r),o.has(e)||r.delete(e),a.push(e)))}for(const e of a)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(l,c,e._dirtyLeaves,e._dirtyElements)),n!==e._compositionKey&&(c._flushSync=!0);const r=c._selection;if(Vv(r)){const e=c._nodeMap,t=r.anchor.key,n=r.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||Ip(19)}else $v(r)&&0===r._nodes.size&&(c._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=l,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void kb(e)}finally{cb=d,db=f,ub=m,e._updating=h,mb=0}const p=0!==e._dirtyType||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(c,e);p?c._flushSync?(c._flushSync=!1,kb(e)):u&&Jp((()=>{kb(e)})):(c._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Ob(e,t,n){e._updating?e._updates.push([t,n]):Tb(e,t,n)}class Mb extends uv{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return Rp[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){const e=bb()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(Rv(t)&&e.push(t),Rb(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;Rb(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;Rb(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return Rb(e)&&e.getLastDescendant()||e||null}const r=t[e];return Rb(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:fg(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&Ip(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:fg(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&Ip(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;re.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?Mp[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){const r=n.length,o=this.getChildrenSize(),i=this.getWritable(),a=i.__key,s=[],l=[],c=this.getChildAtIndex(e+t);let u=null,d=o-t+r;if(0!==e)if(e===o)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(t>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let n=0;n({root:zb(yg())})))}}class Wb extends Mb{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Vb extends Mb{constructor(e){super(e),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}hasTextFormat(e){const t=Tp[e];return!!(this.getTextFormat()&t)}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}static clone(e){return new Vb(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}createDOM(e){const t=document.createElement("p"),n=jg(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:Ub,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(t&&Jg(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n);const r=this.getIndent();r>0&&(t.style.textIndent=20*r+"px")}return{element:t}}static importJSON(e){const t=$b();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t.setTextFormat(e.textFormat),t}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(e,t){const n=$b();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getTextStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||Rv(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Ub(e){const t=$b();if(e.style){t.setFormat(e.style.textAlign);const n=parseInt(e.style.textIndent,10)/20;n>0&&t.setIndent(n)}return{node:t}}function $b(){return qg(new Vb)}function Hb(e){return e instanceof Vb}function Yb(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=Lb(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}class qb{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Sg(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&Ip(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&Ip(36,String(e));const i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(t,r);const i=n&&n.skipInitialization;return void 0===i||i||this.initializeMutationListener(t,r),()=>{o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&Ip(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=function(e){if(!e._readOnly&&e.isEmpty())return oy;e._readOnly||Ip(192);let t=ry.get(e);if(!t){t=new Map,ry.set(e,t);for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}}return t}(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}var i;return i=e.getType(),Ob(this,(()=>{const e=vb();if(e.isEmpty())return;if("root"===i)return void yg().markDirty();const t=e._nodeMap;for(const[,e]of t)e.markDirty()}),null===this._pendingEditorState?{tag:"history-merge"}:void 0),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return Bg(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=jg(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,Yb(this,t,e,r),null!==t&&(this._config.disableEvents||function(e){const t=e.ownerDocument,n=qy.get(t);void 0===n&&Ip(162);const r=n-1;r>=0||Ip(164),qy.set(t,r),0===r&&t.removeEventListener("selectionchange",av);const o=rg(e);tg(o)?(function(e){if(null!==e._parentEditor){const t=_g(e),n=t[t.length-1]._key;iv.get(n)===e&&iv.delete(n)}else iv.delete(e._key)}(o),e.__lexicalEditor=null):o&&Ip(198);const i=ov(e);for(let e=0;e{lv(e)||(sv(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if(lv(e))return;sv(e);const n=t.isEditable();switch(r){case"cut":return n&&Bg(t,qh,e);case"copy":return Bg(t,Yh,e);case"paste":return n&&Bg(t,Eh,e);case"dragstart":return n&&Bg(t,Uh,e);case"dragover":return n&&Bg(t,$h,e);case"dragend":return n&&Bg(t,Hh,e);case"focus":return n&&Bg(t,Qh,e);case"blur":return n&&Bg(t,ep,e);case"drop":return n&&Bg(t,Vh,e)}};e.addEventListener(r,a),o.push((()=>{e.removeEventListener(r,a)}))}}(e,this),null!=n&&e.classList.add(...n)}else this._editorState=r,this._pendingEditorState=null,this._window=null;Cb("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&Ip(38),Hp(this);const n=this._pendingEditorState,r=this._updateTags,o=void 0!==t?t.tag:null;null===n||n.isEmpty()||(null!=o&&r.add(o),kb(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=o&&r.add(o),kb(this)}parseEditorState(e,t){return function(e,t,n){const r=Lb(),o=cb,i=db,a=ub,s=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,cb=r,db=!1,ub=t;try{const o=t._nodes;_b(e.root,o),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,cb=o,db=i,ub=a}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return kb(this),this.getEditorState().read(e,{editor:this})}update(e,t){Ob(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Ob(this,(()=>{const e=tb(),n=yg();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=Zg(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Cb("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}qb.version="0.17.1+prod.esm";const Kb="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Gb=Kb?s.useLayoutEffect:s.useEffect,Xb={tag:"history-merge"};function Zb({initialConfig:e,children:t}){const n=(0,s.useMemo)((()=>{const{theme:t,namespace:n,nodes:r,onError:o,editorState:i,html:a}=e,s=function(e,t){return{getTheme:function(){return null!=t?t:null}}}(0,t),l=function(e){const t=e||{},n=ub,r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=Lb(),s=t.namespace||(null!==o?o._config.namespace:Sg()),l=t.editorState,c=[Ib,Ev,dv,Av,Vb,Wb,...t.nodes||[]],{onError:u,html:d}=t,f=void 0===t.editable||t.editable;let m;if(void 0===e&&null!==n)m=n._nodes;else{m=new Map;for(let e=0;e{Object.keys(e).forEach((t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])}))};return e.forEach((e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)})),t&&o(t),n}(m,d?d.import:void 0),f);return void 0!==l&&(h._pendingEditorState=l,h._dirtyType=2),h}({editable:e.editable,html:a,namespace:n,nodes:r,onError:e=>o(e,l),theme:t});return function(e,t){if(null!==t)if(void 0===t)e.update((()=>{const t=yg();if(t.isEmpty()){const n=$b();t.append(n);const r=Kb?document.activeElement:null;(null!==tb()||null!==r&&r===e.getRootElement())&&n.select()}}),Xb);else if(null!==t)switch(typeof t){case"string":{const n=e.parseEditorState(t);e.setEditorState(n,Xb);break}case"object":e.setEditorState(t,Xb);break;case"function":e.update((()=>{yg().isEmpty()&&t(e)}),Xb)}}(l,i),[l,s]}),[]);return Gb((()=>{const t=e.editable,[r]=n;r.setEditable(void 0===t||t)}),[]),(0,Dc.jsx)(mh.Provider,{value:n,children:t})}const Jb="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function Qb(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function ew(e){return()=>function(e){if(!function(e,t=!0){if(e)return!1;let n=yg().getTextContent();return t&&(n=n.trim()),""===n}(e,!1))return!1;const t=yg().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function ow(e,t){const n=Lg(e.focus,t);return jb(n)&&!n.isIsolated()||Rb(n)&&!n.isInline()&&!n.canBeEmpty()}function iw(e,t,n){const r=function(e){const t=e.anchor.getNode();return"rtl"===(Fb(t)?t:t.getParentOrThrow()).getDirection()}(e);!function(e,t,n){e.modify(t?"extend":"move",n,"character")}(e,t,n?!r:r)}function aw(e,t,n,r=null){let o=null===r||t.isSelected(r);const i=Rb(t)&&t.excludeFromCopy("html");let a=t;if(null!==r){let e=iy(t);e=Rv(e)&&null!==r?function(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[r,o]=n,i=e.isBackward(),a=r.getNode(),s=o.getNode(),l=t.is(a),c=t.is(s);if(l||c){const[n,r]=Yv(e),o=a.is(s),l=t.is(i?s:a),c=t.is(i?a:s);let u,d=0;return o?(d=n>r?r:n,u=n>r?n:r):l?(d=i?r:n,u=void 0):c&&(d=0,u=i?n:r),t.__text=t.__text.slice(d,u),t}}return t}(r,e):e,a=e}const s=Rb(a)?a.getChildren():[],l=e._nodes.get(a.getType());let c;c=l&&void 0!==l.exportDOM?l.exportDOM(e,a):a.exportDOM(e);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let n=0;n{if(null!==e){const r=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}(e,KeyboardEvent)?null:e.clipboardData,o=tb();if(null!==o&&null!=r){e.preventDefault();const i=function(e,t=tb()){return null==t&&sw(166),Vv(t)&&t.isCollapsed()||0===t.getNodes().length?"":function(e,t){if("undefined"==typeof document||"undefined"==typeof window&&void 0===n.g.window)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const r=document.createElement("div"),o=yg().getChildren();for(let n=0;ne.getDecorators()));return yw((()=>e.registerDecoratorListener((e=>{(0,Gt.flushSync)((()=>{r(e)}))}))),[e]),(0,s.useEffect)((()=>{r(e.getDecorators())}),[e]),(0,s.useMemo)((()=>{const r=[],o=Object.keys(n);for(let i=0;ie._onError(t),children:(0,Dc.jsx)(s.Suspense,{fallback:null,children:n[a]})}),c=e.getElementByKey(a);null!==c&&r.push((0,Gt.createPortal)(l,c,a))}return r}),[t,n,e])}(r,n);return function(e){yw((()=>rw(function(e){return rw(e.registerCommand(vh,(e=>{const t=tb();return!!Vv(t)&&(t.deleteCharacter(e),!0)}),0),e.registerCommand(Sh,(e=>{const t=tb();return!!Vv(t)&&(t.deleteWord(e),!0)}),0),e.registerCommand(kh,(e=>{const t=tb();return!!Vv(t)&&(t.deleteLine(e),!0)}),0),e.registerCommand(xh,(e=>{const t=tb();if(!Vv(t))return!1;if("string"==typeof e)t.insertText(e);else{const n=e.dataTransfer;if(null!=n)lw(n,t);else{const n=e.data;n&&t.insertText(n)}}return!0}),0),e.registerCommand(_h,(()=>{const e=tb();return!!Vv(e)&&(e.removeText(),!0)}),0),e.registerCommand(bh,(e=>{const t=tb();return!!Vv(t)&&(t.insertLineBreak(e),!0)}),0),e.registerCommand(wh,(()=>{const e=tb();return!!Vv(e)&&(e.insertLineBreak(),!0)}),0),e.registerCommand(Rh,(e=>{const t=tb();if(!Vv(t))return!1;const n=e,r=n.shiftKey;return!!ow(t,!0)&&(n.preventDefault(),iw(t,r,!0),!0)}),0),e.registerCommand(Oh,(e=>{const t=tb();if(!Vv(t))return!1;const n=e,r=n.shiftKey;return!!ow(t,!1)&&(n.preventDefault(),iw(t,r,!1),!0)}),0),e.registerCommand(Lh,(t=>!!Vv(tb())&&(t.preventDefault(),e.dispatchCommand(vh,!0))),0),e.registerCommand(Bh,(t=>!!Vv(tb())&&(t.preventDefault(),e.dispatchCommand(vh,!1))),0),e.registerCommand(Ih,(t=>{if(!Vv(tb()))return!1;if(null!==t){if((mw||fw||pw)&&dw)return!1;t.preventDefault()}return e.dispatchCommand(bh,!1)}),0),e.registerCommand(Kh,(()=>(function(){const e=yg();bg(function(e){return Xp(e.anchor),Xp(e.focus),e}(e.select(0,e.getChildrenSize())))}(),!0)),0),e.registerCommand(Yh,(t=>!!Vv(tb())&&(gw(t,e),!0)),0),e.registerCommand(qh,(t=>!!Vv(tb())&&(function(e,t){gw(e,t),t.update((()=>{const e=tb();Vv(e)&&e.removeText()}))}(t,e),!0)),0),e.registerCommand(Eh,(t=>!!Vv(tb())&&(function(e,t){e.preventDefault(),t.update((()=>{const t=tb(),{clipboardData:n}=e;null!=n&&Vv(t)&&lw(n,t)}),{tag:"paste"})}(t,e),!0)),0),e.registerCommand(Vh,(e=>!!Vv(tb())&&(e.preventDefault(),!0)),0),e.registerCommand(Uh,(e=>!!Vv(tb())&&(e.preventDefault(),!0)),0))}(e),function(e){const t=window.location.origin,n=n=>{if(n.origin!==t)return;const r=e.getRootElement();if(document.activeElement!==r)return;const o=n.data;if("string"==typeof o){let t;try{t=JSON.parse(o)}catch(e){return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){const r=t.payload;if(r&&"makeChanges"===r.functionId){const t=r.args;if(t){const[r,o,i,a,s,l]=t;e.update((()=>{const e=tb();if(Vv(e)){const t=e.anchor;let l=t.getNode(),c=0,u=0;if(Rv(l)&&r>=0&&o>=0&&(c=r,u=r+o,e.setTextNodeRange(l,c,l,u)),c===u&&""===i||(e.insertRawText(i),l=t.getNode()),Rv(l)){c=a,u=a+s;const t=l.getTextContentSize();c=c>t?t:c,u=u>t?t:u,e.setTextNodeRange(l,c,l,u)}n.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}(e))),[e])}(r),(0,Dc.jsxs)(Dc.Fragment,{children:[e,(0,Dc.jsx)(ww,{content:t}),o]})}function ww({content:e}){const[t]=hh(),n=function(e){const[t,n]=(0,s.useState)((()=>vw(e)));return yw((()=>{function t(){const t=vw(e);n(t)}return t(),rw(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t),r=function(e){const[t]=hh(),n=(0,s.useMemo)((()=>e(t)),[t,e]),r=(0,s.useRef)(n.initialValueFn()),[o,i]=(0,s.useState)(r.current);return Jb((()=>{const{initialValueFn:e,subscribe:t}=n,o=e();return r.current!==o&&(r.current=o,i(o)),t((e=>{r.current=e,i(e)}))}),[n,e]),o}(Qb);return n?"function"==typeof e?e(r):e:null}const xw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect,Ew=(0,s.forwardRef)((function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaExpanded:i,ariaLabel:a,ariaLabelledBy:l,ariaMultiline:c,ariaOwns:u,ariaRequired:d,autoCapitalize:f,className:m,id:h,role:p="textbox",spellCheck:g=!0,style:y,tabIndex:v,"data-testid":b,...w},x){const[E,_]=(0,s.useState)(e.isEditable()),S=(0,s.useCallback)((t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)}),[e]),k=(0,s.useMemo)((()=>function(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}(x,S)),[S,x]);return xw((()=>(_(e.isEditable()),e.registerEditableListener((e=>{_(e)})))),[e]),(0,Dc.jsx)("div",{...w,"aria-activedescendant":E?t:void 0,"aria-autocomplete":E?n:"none","aria-controls":E?r:void 0,"aria-describedby":o,"aria-expanded":E&&"combobox"===p?!!i:void 0,"aria-label":a,"aria-labelledby":l,"aria-multiline":c,"aria-owns":E?u:void 0,"aria-readonly":!E||void 0,"aria-required":d,autoCapitalize:f,className:m,contentEditable:E,"data-testid":b,id:h,ref:k,role:E?p:void 0,spellCheck:g,style:y,tabIndex:v})}));function _w(e){return e.getEditorState().read(ew(e.isComposing()))}const Sw=(0,s.forwardRef)((function(e,t){const{placeholder:n,...r}=e,[o]=hh();return(0,Dc.jsxs)(Dc.Fragment,{children:[(0,Dc.jsx)(Ew,{editor:o,...r,ref:t}),null!=n&&(0,Dc.jsx)(kw,{editor:o,content:n})]})}));function kw({content:e,editor:t}){const n=function(e){const[t,n]=(0,s.useState)((()=>_w(e)));return xw((()=>{function t(){const t=_w(e);n(t)}return t(),rw(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t),[r,o]=(0,s.useState)(t.isEditable());if((0,s.useLayoutEffect)((()=>(o(t.isEditable()),t.registerEditableListener((e=>{o(e)})))),[t]),!n)return null;let i=null;return"function"==typeof e?i=e(r):null!==e&&(i=e),null===i?null:(0,Dc.jsx)("div",{"aria-hidden":!0,children:i})}function Cw(e){e.undoStack=[],e.redoStack=[],e.current=null}function Nw({delay:e,externalHistoryState:t}){const[n]=hh();return function(e,t,n=1e3){const r=(0,s.useMemo)((()=>t||{current:null,redoStack:[],undoStack:[]}),[t]);(0,s.useEffect)((()=>function(e,t,n){const r=function(e,t){let n=Date.now(),r=0;return(o,i,a,s,l,c)=>{const u=Date.now();if(c.has("historic"))return r=0,n=u,2;const d=function(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;const i=t._selection,a=e._selection;if(o)return 1;if(!(Vv(i)&&Vv(a)&&a.isCollapsed()&&i.isCollapsed()))return 0;const s=function(e,t,n){const r=e._nodeMap,o=[];for(const e of t){const t=r.get(e);void 0!==t&&o.push(t)}for(const[e,t]of n){if(!t)continue;const n=r.get(e);void 0===n||Fb(n)||o.push(n)}return o}(t,n,r);if(0===s.length)return 0;if(s.length>1){const n=t._nodeMap,r=n.get(i.anchor.key),o=n.get(a.anchor.key);return r&&o&&!e._nodeMap.has(r.__key)&&Rv(r)&&1===r.__text.length&&1===i.anchor.offset?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!Rv(c)||!Rv(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const f=i.anchor,m=a.anchor;if(f.key!==m.key||"text"!==f.type)return 0;const h=f.offset,p=m.offset,g=d.length-u.length;return 1===g&&p===h-1?2:-1===g&&p===h+1?3:-1===g&&p===h?4:0}(o,i,s,l,e.isComposing()),f=(()=>{const f=null===a||a.editor===e,m=c.has("history-push");if(!m&&f&&c.has("history-merge"))return 0;if(null===o)return 1;const h=i._selection;return s.size>0||l.size>0?!1===m&&0!==d&&d===r&&ur.exportJSON())))===JSON.stringify(n.read((()=>o.exportJSON())))}(Array.from(s)[0],o,i)?0:1:null!==h?0:2})();return n=u,r=d,f}}(e,n),o=rw(e.registerCommand(Nh,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==r.length){const o=t.current,i=r.pop();null!==o&&(n.push(o),e.dispatchCommand(Zh,!0)),0===r.length&&e.dispatchCommand(Jh,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(Ph,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==n.length){const o=t.current;null!==o&&(r.push(o),e.dispatchCommand(Jh,!0));const i=n.pop();0===n.length&&e.dispatchCommand(Zh,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(Gh,(()=>(Cw(t),!1)),0),e.registerCommand(Xh,(()=>(Cw(t),e.dispatchCommand(Zh,!1),e.dispatchCommand(Jh,!1),!0)),0),e.registerUpdateListener((({editorState:n,prevEditorState:o,dirtyLeaves:i,dirtyElements:a,tags:s})=>{const l=t.current,c=t.redoStack,u=t.undoStack,d=null===l?null:l.editorState;if(null!==l&&n===d)return;const f=r(o,n,l,i,a,s);if(1===f)0!==c.length&&(t.redoStack=[],e.dispatchCommand(Zh,!1)),null!==l&&(u.push({...l}),e.dispatchCommand(Jh,!0));else if(2===f)return;t.current={editor:e,editorState:n}})));return o}(e,r,n)),[n,e,r])}(n,t,e),null}function Pw(e,t){return Pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pw(e,t)}var Tw={error:null},Ow=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o{if(n)return r.registerUpdateListener((({editorState:o,dirtyElements:i,dirtyLeaves:a,prevEditorState:s,tags:l})=>{t&&0===i.size&&0===a.size||e&&l.has("history-merge")||s.isEmpty()||n(o,r,l)}))}),[r,e,t,n]),null}function Aw({editorRef:e}){const[t]=hh();return s.useEffect((()=>{"function"==typeof e?e(t):"object"==typeof e&&(e.current=t)}),[t]),null}var jw={xs:"py-1 px-2 pr-2 rounded [&_.editor-content>p]:text-xs [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-xs",sm:"px-3 py-2 rounded [&_.editor-content>p]:text-xs [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-xs [&_.pointer-events-none]:font-normal",md:"px-3.5 py-2.5 rounded-md [&_.editor-content>p]:text-sm [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-sm [&_.pointer-events-none]:font-normal",lg:"px-4 py-3 rounded-md [&_.editor-content>p]:text-base [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-base [&_.pointer-events-none]:font-normal"},Iw={xs:"p-1 rounded-md max-h-[8.75rem]",sm:"p-1.5 rounded-md max-h-[10.75rem]",md:"p-2 rounded-lg max-h-[13.5rem]",lg:"p-2 rounded-lg max-h-[13.5rem]"},Fw={xs:"p-1 rounded text-xs leading-4 font-normal",sm:"p-1.5 rounded text-xs leading-5 font-normal",md:"p-2 rounded-md text-sm leading-6 font-normal",lg:"p-2 rounded-md text-base leading-6 font-normal"};const Lw="startTransition",zw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect,Bw=e=>{const t=document.getElementById("typeahead-menu");if(!t)return;const n=t.getBoundingClientRect();n.top+n.height>window.innerHeight&&t.scrollIntoView({block:"center"}),n.top<0&&t.scrollIntoView({block:"center"}),e.scrollIntoView({block:"nearest"})};function Ww(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>r.top&&n.top{d(0)}),[f]);const m=(0,s.useCallback)((n=>{t.update((()=>{const t=null!=r.match&&l?function(e){const t=tb();if(!Vv(t)||!t.isCollapsed())return null;const n=t.anchor;if("text"!==n.type)return null;const r=n.getNode();if(!r.isSimpleText())return null;const o=n.offset,i=r.getTextContent().slice(0,o),a=e.replaceableString.length,s=o-function(e,t,n){let r=n;for(let n=r;n<=t.length;n++)e.substr(-n)===t.substr(0,n)&&(r=n);return r}(i,e.matchingString,a);if(s<0)return null;let l;return 0===s?[l]=r.splitText(o):[,l]=r.splitText(s,o),l}(r.match):null;a(n,t,e,r.match?r.match.matchingString:"")}))}),[t,l,r.match,a,e]),h=(0,s.useCallback)((e=>{const n=t.getRootElement();null!==n&&(n.setAttribute("aria-activedescendant","typeahead-item-"+e),d(e))}),[t]);return(0,s.useEffect)((()=>()=>{const e=t.getRootElement();null!==e&&e.removeAttribute("aria-activedescendant")}),[t]),zw((()=>{null===o?d(null):null===u&&h(0)}),[o,u,h]),(0,s.useEffect)((()=>rw(t.registerCommand(Vw,(({option:e})=>!(!e.ref||null==e.ref.current||(Bw(e.ref.current),0))),c))),[t,h,c]),(0,s.useEffect)((()=>rw(t.registerCommand(jh,(e=>{const n=e;if(null!==o&&o.length&&null!==u){const e=u!==o.length-1?u+1:0;h(e);const r=o[e];null!=r.ref&&r.ref.current&&t.dispatchCommand(Vw,{index:e,option:r}),n.preventDefault(),n.stopImmediatePropagation()}return!0}),c),t.registerCommand(Ah,(e=>{const t=e;if(null!==o&&o.length&&null!==u){const e=0!==u?u-1:o.length-1;h(e);const n=o[e];null!=n.ref&&n.ref.current&&Bw(n.ref.current),t.preventDefault(),t.stopImmediatePropagation()}return!0}),c),t.registerCommand(zh,(t=>{const n=t;return n.preventDefault(),n.stopImmediatePropagation(),e(),!0}),c),t.registerCommand(Wh,(e=>{const t=e;return null!==o&&null!==u&&null!=o[u]&&(t.preventDefault(),t.stopImmediatePropagation(),m(o[u]),!0)}),c),t.registerCommand(Ih,(e=>null!==o&&null!==u&&null!=o[u]&&(null!==e&&(e.preventDefault(),e.stopImmediatePropagation()),m(o[u]),!0)),c))),[m,e,t,o,u,h,c]),i(n,(0,s.useMemo)((()=>({options:o,selectOptionAndCleanUp:m,selectedIndex:u,setHighlightedIndex:d})),[m,u,o]),r.match?r.match.matchingString:"")}function $w({options:e,onQueryChange:t,onSelectOption:n,onOpen:r,onClose:o,menuRenderFn:i,triggerFn:a,anchorClassName:c,commandPriority:u=1,parent:d}){const[f]=hh(),[m,h]=(0,s.useState)(null),p=function(e,t,n,r=document.body){const[o]=hh(),i=(0,s.useRef)(document.createElement("div")),a=(0,s.useCallback)((()=>{i.current.style.top=i.current.style.bottom;const t=o.getRootElement(),a=i.current,s=a.firstChild;if(null!==t&&null!==e){const{left:o,top:l,width:c,height:u}=e.getRect(),d=i.current.offsetHeight;if(a.style.top=`${l+window.pageYOffset+d+3}px`,a.style.left=`${o+window.pageXOffset}px`,a.style.height=`${u}px`,a.style.width=`${c}px`,null!==s){s.style.top=`${l}`;const e=s.getBoundingClientRect(),n=e.height,r=e.width,i=t.getBoundingClientRect();o+r>i.right&&(a.style.left=`${i.right-r+window.pageXOffset}px`),(l+n>window.innerHeight||l+n>i.bottom)&&l-i.top>n+u&&(a.style.top=l-n+window.pageYOffset-u+"px")}a.isConnected||(null!=n&&(a.className=n),a.setAttribute("aria-label","Typeahead menu"),a.setAttribute("id","typeahead-menu"),a.setAttribute("role","listbox"),a.style.display="block",a.style.position="absolute",r.append(a)),i.current=a,t.setAttribute("aria-controls","typeahead-menu")}}),[o,e,n,r]);(0,s.useEffect)((()=>{const t=o.getRootElement();if(null!==e)return a(),()=>{null!==t&&t.removeAttribute("aria-controls");const e=i.current;null!==e&&e.isConnected&&e.remove()}}),[o,a,e]);const l=(0,s.useCallback)((n=>{null!==e&&(n||t(null))}),[e,t]);return function(e,t,n,r){const[o]=hh();(0,s.useEffect)((()=>{if(null!=t&&null!=e){const e=o.getRootElement(),i=null!=e?function(e){let t=getComputedStyle(e);const n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.body;for(let o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.body}(e):document.body;let a=!1,s=Ww(t,i);const l=function(){a||(window.requestAnimationFrame((function(){n(),a=!1})),a=!0);const e=Ww(t,i);e!==s&&(s=e,null!=r&&r(e))},c=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",l,{capture:!0,passive:!0}),c.observe(t),()=>{c.unobserve(t),window.removeEventListener("resize",n),document.removeEventListener("scroll",l,!0)}}}),[t,o,r,n,e])}(e,i.current,a,l),i}(m,h,c,d),g=(0,s.useCallback)((()=>{h(null),null!=o&&null!==m&&o()}),[o,m]),y=(0,s.useCallback)((e=>{h(e),null!=r&&null===m&&r(e)}),[r,m]);return(0,s.useEffect)((()=>{const e=f.registerUpdateListener((()=>{f.getEditorState().read((()=>{const e=f._window||window,n=e.document.createRange(),r=tb(),o=function(e){let t=null;return e.getEditorState().read((()=>{const e=tb();Vv(e)&&(t=function(e){const t=e.anchor;if("text"!==t.type)return null;const n=t.getNode();if(!n.isSimpleText())return null;const r=t.offset;return n.getTextContent().slice(0,r)}(e))})),t}(f);if(!Vv(r)||!r.isCollapsed()||null===o||null===n)return void g();const i=a(o,f);if(t(i?i.matchingString:null),null!==i&&!function(e,t){return 0===t&&e.getEditorState().read((()=>{const e=tb();if(Vv(e)){const t=e.anchor.getNode().getPreviousSibling();return Rv(t)&&t.isTextEntity()}return!1}))}(f,i.leadOffset)){const t=function(e,t,n){const r=n.getSelection();if(null===r||!r.isCollapsed)return!1;const o=r.anchorNode,i=e,a=r.anchorOffset;if(null==o||null==a)return!1;try{t.setStart(o,i),t.setEnd(o,a)}catch(e){return!1}return!0}(i.leadOffset,n,e);if(null!==t)return s=()=>y({getRect:()=>n.getBoundingClientRect(),match:i}),void(Lw in l()?l()[Lw](s):s())}var s;g()}))}));return()=>{e()}}),[f,a,t,m,g,y]),null===m||null===f?null:(0,Dc.jsx)(Uw,{close:g,resolution:m,editor:f,anchorElementRef:p,options:e,menuRenderFn:i,shouldSplitNodeWithQuery:!0,onSelectOption:n,commandPriority:u})}function Hw(e){return Hw="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},Hw(e)}function Yw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&void 0!==arguments[2]?arguments[2]:"name",r=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,l=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){l=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e)||function(e){if(e){if("string"==typeof e)return ux(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ux(e,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.useState)([])),o=r[0],i=r[1];return(0,s.useEffect)((function(){if(null!==t){var r=dx.get(t);null!==r&&(void 0===r?(dx.set(t,null),function(e,t,n,r){setTimeout((function(){var o=e.filter((function(e){var n;if("string"==typeof e)return e.toLowerCase().includes(t.toLowerCase());var o=null==e||null===(n=e[r])||void 0===n?void 0:n.toString();return!!o&&o.toLowerCase().includes(t.toLowerCase())}));n(o)}),500)}(e,t,(function(e){dx.set(t,e),i(e)}),n)):i(r))}else i([])}),[t]),o},mx=["size","children","selected","className"];function hx(){return hx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n_:;",y=[l].join(""),v="[^"+y+g+"\\s]",b="(?:\\.[ |$]| |["+g+"]|)",w=new RegExp("(^|\\s|\\()([".concat(y,"]((?:").concat(v).concat(b,"){0,").concat(75,"}))$")),x=new RegExp("(^|\\s|\\()([".concat(y,"]((?:").concat(v,"){0,").concat(50,"}))$")),E=yx(hh(),1)[0],_=yx((0,s.useState)(null),2),S=_[0],k=_[1],C=fx(t,S,r),N=(0,s.useCallback)((function(e,t,n){E.update((function(){var o=rx(e.data,r,i);t&&t.replace(o),n()}))}),[E]),P=(0,s.useMemo)((function(){return C.map((function(e){return new cx(e)}))}),[E,C]),T=(0,s.useCallback)((function(e){if(!h)return!1;var t=e.key,n=e.ctrlKey,r=e.metaKey;if(n||r||" "===t||t.length>1||p.current)return p.current&&(p.current=!1),!1;var o=tb(),i=o.focus,a=o.anchor,s=yx(o.getNodes(),1)[0];if(!a||!i||(null==a?void 0:a.key)!==(null==i?void 0:i.key)||(null==a?void 0:a.offset)!==(null==i?void 0:i.offset)||!s)return!1;if(function(e){return e instanceof nx}(s)){var l=Mv(" ");s.insertAfter(l)}}),[E,l,h]),O=(0,s.useCallback)((function(e){"Backspace"===e.key&&(p.current=!0)}),[p]);return(0,s.useEffect)((function(){if(E)return rw(E.registerCommand(Th,T,1),E.registerCommand(Lh,O,1))}),[E,T]),React.createElement($w,{onQueryChange:k,onSelectOption:N,triggerFn:function(e){var t=w.exec(e);if(null===t&&(t=x.exec(e)),null!==t){var n=t[1],r=t[3];if(r.length>=0)return{leadOffset:t.index+n.length,matchingString:r,replaceableString:t[2]}}return null},options:P,menuRenderFn:function(e,t){var n=t.selectedIndex,o=t.selectOptionAndCleanUp,a=t.setHighlightedIndex;return e.current&&!(null==P||!P.length)&&React.createElement(u,{size:i},P.map((function(e,t){var s;return React.createElement(f,{key:t,ref:e.ref,size:i,selected:t===n,onMouseEnter:function(){a(t)},onClick:function(){return o(e)}},"string"==typeof e.data?e.data:null===(s=e.data)||void 0===s?void 0:s[r])})))}})},wx={ltr:"ltr",rtl:"rtl",paragraph:"editor-paragraph",quote:"editor-quote",heading:{h1:"editor-heading-h1",h2:"editor-heading-h2",h3:"editor-heading-h3",h4:"editor-heading-h4",h5:"editor-heading-h5",h6:"editor-heading-h6"},list:{nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul",listitem:"editor-listItem",listitemChecked:"editor-listItemChecked",listitemUnchecked:"editor-listItemUnchecked"},hashtag:"editor-hashtag",image:"editor-image",link:"editor-link",text:{bold:"editor-textBold",code:"editor-textCode",italic:"editor-textItalic",strikethrough:"editor-textStrikethrough",subscript:"editor-textSubscript",superscript:"editor-textSuperscript",underline:"editor-textUnderline",underlineStrikethrough:"editor-textUnderlineStrikethrough"},code:"editor-code",codeHighlight:{atrule:"editor-tokenAttr",attr:"editor-tokenAttr",boolean:"editor-tokenProperty",builtin:"editor-tokenSelector",cdata:"editor-tokenComment",char:"editor-tokenSelector",class:"editor-tokenFunction","class-name":"editor-tokenFunction",comment:"editor-tokenComment",constant:"editor-tokenProperty",deleted:"editor-tokenProperty",doctype:"editor-tokenComment",entity:"editor-tokenOperator",function:"editor-tokenFunction",important:"editor-tokenVariable",inserted:"editor-tokenSelector",keyword:"editor-tokenAttr",namespace:"editor-tokenVariable",number:"editor-tokenProperty",operator:"editor-tokenOperator",prolog:"editor-tokenComment",property:"editor-tokenProperty",punctuation:"editor-tokenPunctuation",regex:"editor-tokenVariable",selector:"editor-tokenSelector",string:"editor-tokenSelector",symbol:"editor-tokenProperty",tag:"editor-tokenProperty",url:"editor-tokenOperator",variable:"editor-tokenVariable"}},xx=function(e){var t=e.content;return React.createElement("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-start text-field-placeholder"},t)};function Ex(e){console.error(e)}var _x=(0,s.forwardRef)((function(e,t){var n,r,o=e.defaultValue,i=void 0===o?"":o,a=e.placeholder,l=void 0===a?"Press @ to view variable suggestions":a,c=e.onChange,u=e.size,d=void 0===u?"md":u,f=e.autoFocus,m=void 0!==f&&f,h=e.options,p=void 0===h?[]:h,g=e.by,y=void 0===g?"name":g,v=e.trigger,b=void 0===v?"@":v,w=e.menuComponent,x=e.menuItemComponent,E=e.className,_=e.wrapperClassName,S=e.disabled,k=void 0!==S&&S,C=e.autoSpaceAfterMention,N=void 0!==C&&C,P={namespace:"Editor",editorTheme:wx,onError:Ex,nodes:[ox],editorState:i||'{\n "root": {\n "children": [\n {\n "children": [],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "paragraph",\n "version": 1,\n "textFormat": 0,\n "textStyle": ""\n }\n ],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "root",\n "version": 1\n }\n}',editable:!k};return(0,s.isValidElement)(w)&&(n=w),(0,s.isValidElement)(x)&&(r=x),React.createElement("div",{className:re("relative w-full","focus-within:ring-2 focus-within:ring-offset-2 hover:border-border-strong focus-within:!border-focus-border focus-within:ring-focus transition duration-150 ease-in-out outline outline-1 outline-field-border",jw[d],k&&"bg-field-secondary-background border-field-border-disabled hover:border-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",_)},React.createElement(Zb,{initialConfig:P},React.createElement("div",{className:"relative w-full [&_p]:m-0"},React.createElement(bw,{contentEditable:React.createElement(Sw,{className:re("editor-content focus-visible:outline-none outline-none","w-full [&>p]:w-full [&>p]:m-0",E)}),placeholder:React.createElement(xx,{content:l}),ErrorBoundary:Mw})),React.createElement(Nw,null),React.createElement(bx,{menuComponent:n,menuItemComponent:r,size:d,by:y,optionsArray:p,trigger:b,autoSpace:N}),React.createElement(Dw,{onChange:function(e,t){"function"==typeof c&&c(e,t)},ignoreSelectionChange:!0}),t&&React.createElement(Aw,{editorRef:t}),m&&React.createElement(ph,null)))}));_x.displayName="EditorInput";var Sx=_x;const kx=xe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var Cx=function(e,t){return re("rounded-full text-brand-primary-600 transition-colors duration-300",e[t].dot,e[t].ring)},Nx=["variant","size","type","currentStep","children","className","lineProps"],Px=["labelText","icon","stepClasses","isCurrent","isCompleted","className","type","variant","sizeClasses","size","isLast","index","lineProps"];function Tx(){return Tx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);nsvg]:size-4",md:"[&>svg]:size-5"})||void 0===n?void 0:n[x],S=function(){y(!g),f&&f(!g)};return l().createElement("div",null,l().createElement("div",{role:"button",tabIndex:"0",onClick:S,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||S()},onMouseEnter:function(){return c&&w(!0)},onMouseLeave:function(){return c&&w(!1)},className:re("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",E,r?"p-1":"p-0",h),"aria-expanded":g},l().createElement("span",{className:"text-text-tertiary"},r),i&&l().createElement(vf.span,{variants:{open:{rotate:180},closed:{rotate:0}},animate:g?"open":"closed",transition:{duration:.15},className:re("flex items-center text-border-strong",_)},l().createElement(vf.div,{initial:"hidden",animate:g||b?"visible":"hidden",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15}},l().createElement(Cf,null)))),l().createElement(wm,{initial:!1},g&&l().createElement(vf.ul,{variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:"overflow flex gap-0.5 flex-col m-0 bg-white rounded p-0"},m)))};Ux.displayName="Menu.List";var $x=function(e){var t,n=e.disabled,r=void 0!==n&&n,o=e.active,i=e.onClick,a=e.children,s=e.className,c=Wx().size,u=null===(t={sm:"[&>svg]:size-4 [&>svg]:m-1 [&>*:not(svg)]:mx-1 [&>*:not(svg)]:my-0.5 text-sm",md:"[&>svg]:size-5 [&>svg]:m-1.5 [&>*:not(svg)]:m-1 text-base"})||void 0===t?void 0:t[c],d=r?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",f=o?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"";return l().createElement("li",{role:"menuitem",tabIndex:"0",onClick:i,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||i()},className:re("flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",u,"hover:bg-background-secondary hover:text-text-primary",d,f,"transition-colors duration-300 ease-in-out",s)},a)};$x.displayName="Menu.Item";var Hx=function(e){var t,n=e.variant,r=void 0===n?"solid":n,o=e.className,i=null===(t={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"})||void 0===t?void 0:t[r];return l().createElement(l().Fragment,null,l().createElement("hr",{className:re("w-full border-0 border-t border-border-subtle",i,o)}))};Hx.displayName="Menu.Separator";var Yx=Object.assign(Vx,{List:Ux,Item:$x,Separator:Hx});const qx=xe("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),Kx=xe("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);var Gx=["children","className","onCollapseChange","collapsible","screenHeight","borderOn"];function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);nsvg]:block h-full",n)},t)};XE.displayName="Topbar.Item";var ZE=Object.assign(YE,{Left:qE,Middle:KE,Right:GE,Item:XE}),JE={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},QE={input:{sm:"py-1.5 px-2 rounded",md:"p-2.5 rounded-md",lg:"p-3 rounded-md"},content:{sm:"p-1.5",md:"p-1.5",lg:"p-2"},title:{sm:"p-2 text-xs",md:"p-2 text-sm",lg:"p-2 text-sm"},item:{sm:"text-sm text-text-secondary rounded",md:"text-base text-text-secondary rounded-md",lg:"text-base text-text-secondary rounded-md"},icon:{sm:"p-1 text-sm [&>svg]:size-4 text-icon-secondary",md:"p-2 text-base [&>svg]:size-5 text-icon-secondary",lg:"p-2 text-base [&>svg]:size-5 text-icon-secondary"},dialog:{sm:"mt-1 rounded-md",md:"mt-1.5 rounded-lg",lg:"mt-1.5 rounded-lg"},slashIcon:{sm:"px-2 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1"}},e_={primary:"bg-field-primary-background outline outline-1 outline-field-border hover:outline-border-strong",secondary:"bg-field-secondary-background outline outline-1 outline-field-border hover:outline-border-strong",ghost:"bg-field-secondary-background outline outline-1 outline-transparent"},t_={ghost:"cursor-not-allowed text-text-disabled placeholder:text-text-disabled",primary:"border-border-disabled hover:border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled",secondary:"border-border-disabled hover:border-border-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled"};function n_(e){return n_="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},n_(e)}var r_=["className","size","open","onOpenChange","loading"],o_=["className","type","placeholder","variant","disabled","onChange"],i_=["className","dropdownPortalRoot","dropdownPortalId","children"],a_=["className","icon","children"],s_=["className"];function l_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c_(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0?(0,s.cloneElement)(e,{children:t}):null}return e})).filter(Boolean);return a?React.createElement(S_,null):React.createElement("div",null,l.some((function(e){return e.type!==k_}))?l:React.createElement(x_,null))};w_.displayName="SearchBox.List";var x_=function(e){var t=e.children,n=void 0===t?"No results found.":t,r=g_().size;return React.createElement("div",{className:re("flex justify-center items-center",QE.item[r],"text-text-tertiary p-4")},n)};x_.displayName="SearchBox.Empty";var E_=function(e){var t=e.heading,n=e.children,r=g_().size;return React.createElement("div",{className:re(QE.content[r],QE.item[r])},t&&React.createElement("div",{className:re(QE.title[r],"text-text-secondary")},t),n)};E_.displayName="SearchBox.Group";var __=(0,s.forwardRef)((function(e,t){var n=e.className,r=e.icon,o=e.children,i=h_(e,a_),a=g_().size;return React.createElement("div",d_({ref:t,className:re("flex items-center justify-start gap-1 p-1 hover:bg-background-secondary focus:bg-background-secondary cursor-pointer",QE.item[a])},i),r&&React.createElement("span",{className:re(QE.icon[a],"flex items-center justify-center")},r),React.createElement("span",{className:re("flex-grow p-1 font-normal cursor-pointer",QE.item[a],n)},o))}));__.displayName="SearchBox.Item";var S_=function(e){var t=e.loadingIcon,n=void 0===t?React.createElement(ri,null):t,r=g_().size,o=(0,s.cloneElement)(n,{size:r});return React.createElement("div",{className:re("flex justify-center p-4",JE[r],QE.item[r])},o)};S_.displayName="SearchBox.Loading";var k_=(0,s.forwardRef)((function(e,t){var n=e.className,r=h_(e,s_);return React.createElement("hr",d_({ref:t,className:re("border-0 border-t border-border-subtle border-solid m-0",n)},r))}));k_.displayName="SearchBox.Separator",y_.Input=v_,y_.Loading=S_,y_.Separator=k_,y_.Content=b_,y_.List=w_,y_.Empty=x_,y_.Group=E_,y_.Item=__;var C_=y_;function N_(e){return N_="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},N_(e)}var P_=["children","className"],T_=["children"],O_=["children","as"];function M_(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;re.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n{n.focused&&o.current?.focus()}),[n.focused]),s.createElement("button",{ref:o,...r})}function XS(e){const{options:t,className:n,components:r,classNames:o,...i}=e,a=[o[WS.Dropdown],n].join(" "),l=t?.find((({value:e})=>e===i.value));return s.createElement("span",{"data-disabled":i.disabled,className:o[WS.DropdownRoot]},s.createElement(r.Select,{className:a,...i},t?.map((({value:e,label:t,disabled:n})=>s.createElement(r.Option,{key:e,value:e,disabled:n},t)))),s.createElement("span",{className:o[WS.CaptionLabel],"aria-hidden":!0},l?.label,s.createElement(r.Chevron,{orientation:"down",size:18,className:o[WS.Chevron]})))}function ZS(e){return s.createElement("div",{...e})}function JS(e){return s.createElement("div",{...e})}function QS(e){const{calendarMonth:t,displayIndex:n,...r}=e;return s.createElement("div",{...r},e.children)}function ek(e){const{calendarMonth:t,displayIndex:n,...r}=e;return s.createElement("div",{...r})}function tk(e){return s.createElement("table",{...e})}function nk(e){return s.createElement("div",{...e})}!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(WS||(WS={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(VS||(VS={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(US||(US={}));const rk=(0,s.createContext)(void 0);function ok(){const e=(0,s.useContext)(rk);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}function ik(e){const{components:t}=ok();return s.createElement(t.Dropdown,{...e})}function ak(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...i}=e,{components:a,classNames:l,labels:{labelPrevious:c,labelNext:u}}=ok();return s.createElement("nav",{...i},s.createElement(a.PreviousMonthButton,{type:"button",className:l[WS.PreviousMonthButton],tabIndex:r?void 0:-1,disabled:!r||void 0,"aria-label":c(r),onClick:e.onPreviousClick},s.createElement(a.Chevron,{disabled:!r||void 0,className:l[WS.Chevron],orientation:"left"})),s.createElement(a.NextMonthButton,{type:"button",className:l[WS.NextMonthButton],tabIndex:o?void 0:-1,disabled:!o||void 0,"aria-label":u(o),onClick:e.onNextClick},s.createElement(a.Chevron,{disabled:!o||void 0,orientation:"right",className:l[WS.Chevron]})))}function sk(e){const{components:t}=ok();return s.createElement(t.Button,{...e})}function lk(e){return s.createElement("option",{...e})}function ck(e){const{components:t}=ok();return s.createElement(t.Button,{...e})}function uk(e){return s.createElement("div",{...e})}function dk(e){return s.createElement("select",{...e})}function fk(e){const{week:t,...n}=e;return s.createElement("tr",{...n})}function mk(e){return s.createElement("th",{...e})}function hk(e){return s.createElement("thead",null,s.createElement("tr",{...e}))}function pk(e){const{week:t,...n}=e;return s.createElement("th",{...n})}function gk(e){return s.createElement("th",{...e})}function yk(e){return s.createElement("tbody",{...e})}function vk(e){const{components:t}=ok();return s.createElement(t.Dropdown,{...e})}Math.pow(10,8);const bk=6048e5,wk=Symbol.for("constructDateFrom");function xk(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&wk in e?e[wk](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ek(e,t){return xk(t||e,e)}function _k(e,t,n){const r=Ek(e,n?.in);return isNaN(t)?xk(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function Sk(e,t,n){const r=Ek(e,n?.in);if(isNaN(t))return xk(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),i=xk(n?.in||e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function kk(e,t,n){return _k(e,7*t,n)}function Ck(e){const t=Ek(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 Nk(e,...t){const n=xk.bind(null,e||t.find((e=>"object"==typeof e)));return t.map(n)}function Pk(e,t){const n=Ek(e,t?.in);return n.setHours(0,0,0,0),n}function Tk(e,t,n){const[r,o]=Nk(n?.in,e,t),i=Pk(r),a=Pk(o),s=+i-Ck(i),l=+a-Ck(a);return Math.round((s-l)/864e5)}let Ok={};function Mk(){return Ok}function Rk(e,t){const n=Mk(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ek(e,t?.in),i=o.getDay(),a=6+(i{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ik={date:jk({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:jk({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:jk({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Fk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Lk(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]}}const zk={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:Lk({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Lk({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:Lk({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:Lk({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:Lk({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 Bk(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e){for(let t=0;tparseInt(e,10)},(e,t={})=>{const n=e.match(Vk.matchPattern);if(!n)return null;const r=n[0],o=e.match(Vk.parsePattern);if(!o)return null;let i=Vk.valueCallback?Vk.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:Bk({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:Bk({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:Bk({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:Bk({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:Bk({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"})};var Vk;const Uk={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Ak[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:Ik,formatRelative:(e,t,n,r)=>Fk[e],localize:zk,match:Wk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function $k(e,t){const n=Ek(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Hk(e,t){const n=Mk(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Ek(e,t?.in),i=o.getDay(),a=(i=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Kk(e,t){const n=Ek(e,t?.in),r=+Yk(n)-+function(e,t){const n=qk(e,t),r=xk(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Yk(r)}(n);return Math.round(r/bk)+1}function Gk(e,t){const n=Ek(e,t?.in),r=n.getFullYear(),o=Mk(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=xk(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Hk(a,t),l=xk(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Hk(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Xk(e,t){const n=Ek(e,t?.in),r=+Hk(n,t)-+function(e,t){const n=Mk(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Gk(e,t),i=xk(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Hk(i,t)}(n,t);return Math.round(r/bk)+1}function Zk(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Jk={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Zk("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Zk(n+1,2)},d:(e,t)=>Zk(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)=>Zk(e.getHours()%12||12,t.length),H:(e,t)=>Zk(e.getHours(),t.length),m:(e,t)=>Zk(e.getMinutes(),t.length),s:(e,t)=>Zk(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Zk(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Qk={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(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Jk.y(e,t)},Y:function(e,t,n,r){const o=Gk(e,r),i=o>0?o:1-o;return"YY"===t?Zk(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Zk(i,t.length)},R:function(e,t){return Zk(qk(e),t.length)},u:function(e,t){return Zk(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 Zk(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 Zk(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 Jk.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 Zk(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=Xk(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Zk(o,t.length)},I:function(e,t,n){const r=Kk(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Zk(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Jk.d(e,t)},D:function(e,t,n){const r=function(e){const t=Ek(e,undefined);return Tk(t,$k(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Zk(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 Zk(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 Zk(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 Zk(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?"noon":0===r?"midnight":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?"evening":r>=12?"afternoon":r>=4?"morning":"night",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 Jk.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Jk.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Zk(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Zk(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Jk.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Jk.s(e,t)},S:function(e,t){return Jk.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return tC(r);case"XXXX":case"XX":return nC(r);default:return nC(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tC(r);case"xxxx":case"xx":return nC(r);default:return nC(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+eC(r,":");default:return"GMT"+nC(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+eC(r,":");default:return"GMT"+nC(r,":")}},t:function(e,t,n){return Zk(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Zk(+e,t.length)}};function eC(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+Zk(i,2)}function tC(e,t){return e%60==0?(e>0?"-":"+")+Zk(Math.abs(e)/60,2):nC(e,t)}function nC(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Zk(Math.trunc(r/60),2)+t+Zk(r%60,2)}const rC=(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"})}},oC=(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"})}},iC={p:oC,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return rC(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}}",rC(r,t)).replace("{{time}}",oC(o,t))}},aC=/^D+$/,sC=/^Y+$/,lC=["D","DD","YY","YYYY"];function cC(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}const uC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fC=/^'([^]*?)'?$/,mC=/''/g,hC=/[a-zA-Z]/;function pC(e,t,n){const r=Mk(),o=n?.locale??r.locale??Uk,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Ek(e,n?.in);if(!function(e){return!(!cC(e)&&"number"!=typeof e||isNaN(+Ek(e)))}(s))throw new RangeError("Invalid time value");let l=t.match(dC).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,iC[t])(e,o.formatLong):e})).join("").match(uC).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:gC(e)};if(Qk[t])return{isToken:!0,value:e};if(t.match(hC))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((r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return sC.test(e)}(i)||!n?.useAdditionalDayOfYearTokens&&function(e){return aC.test(e)}(i))&&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(console.warn(r),lC.includes(e))throw new RangeError(r)}(i,t,String(e)),(0,Qk[i[0]])(s,i,o.localize,c)})).join("")}function gC(e){const t=e.match(fC);return t?t[1].replace(mC,"'"):e}function yC(e,t){const n=Ek(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}const vC={addDays:_k,addMonths:Sk,addWeeks:kk,addYears:function(e,t,n){return Sk(e,12*t,n)},differenceInCalendarDays:Tk,differenceInCalendarMonths:function(e,t,n){const[r,o]=Nk(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())},endOfISOWeek:function(e,t){return Rk(e,{...t,weekStartsOn:1})},endOfMonth:Dk,endOfWeek:Rk,endOfYear:function(e,t){const n=Ek(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n},format:pC,getISOWeek:Kk,getWeek:Xk,isAfter:function(e,t){return+Ek(e)>+Ek(t)},isBefore:function(e,t){return+Ek(e)<+Ek(t)},isDate:cC,isSameDay:function(e,t,n){const[r,o]=Nk(n?.in,e,t);return+Pk(r)==+Pk(o)},isSameMonth:function(e,t,n){const[r,o]=Nk(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()},isSameYear:function(e,t,n){const[r,o]=Nk(n?.in,e,t);return r.getFullYear()===o.getFullYear()},max:function(e,t){let n,r=t?.in;return e.forEach((e=>{r||"object"!=typeof e||(r=xk.bind(null,e));const t=Ek(e,r);(!n||n{r||"object"!=typeof e||(r=xk.bind(null,e));const t=Ek(e,r);(!n||n>t||isNaN(+t))&&(n=t)})),xk(r,n||NaN)},setMonth:function(e,t,n){const r=Ek(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=xk(n?.in||e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=function(e){const t=Ek(e,undefined),n=t.getFullYear(),r=t.getMonth(),o=xk(t,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return r.setMonth(t,Math.min(i,s)),r},setYear:function(e,t,n){const r=Ek(e,n?.in);return isNaN(+r)?xk(n?.in||e,NaN):(r.setFullYear(t),r)},startOfDay:Pk,startOfISOWeek:Yk,startOfMonth:yC,startOfWeek:Hk,startOfYear:$k};function bC(){const e={};for(const t in WS)e[WS[t]]=`rdp-${WS[t]}`;for(const t in VS)e[VS[t]]=`rdp-${VS[t]}`;for(const t in US)e[US[t]]=`rdp-${US[t]}`;return e}Symbol.for("constructDateFrom");const wC={},xC={};function EC(e,t){try{const n=(wC[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return n in xC?xC[n]:SC(n,n.split(":"))}catch{if(e in xC)return xC[e];const t=e?.match(_C);return t?SC(e,t.slice(1)):NaN}}const _C=/([+-]\d\d):?(\d\d)?/;function SC(e,t){const n=+t[0],r=+(t[1]||0);return xC[e]=n>0?60*n+r:60*n-r}class kC extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(EC(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),PC(this)):this.setTime(Date.now()),NC(this)}static tz(e,...t){return t.length?new kC(...t,e):new kC(Date.now(),e)}withTimeZone(e){return new kC(+this,e)}getTimezoneOffset(){return-EC(this.timeZone,this)}[Symbol.for("constructDateFrom")](e){return new kC(+new Date(e),this.timeZone)}}const CC=/^(get|set)(?!UTC)/;function NC(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function PC(e){const t=EC(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=r- -new Date(+n).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const a=r-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);const s=EC(e.timeZone,e),l=-new Date(+e).getTimezoneOffset()-s-a;if(s!==t&&l){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const t=s-EC(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!CC.test(e))return;const t=e.replace(CC,"$1UTC");kC.prototype[t]&&(e.startsWith("get")?kC.prototype[e]=function(){return this.internal[t]()}:(kC.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),PC(e),+this},kC.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),NC(this),+this}))}));class TC extends kC{static tz(e,...t){return t.length?new TC(...t,e):new TC(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${o=this.timeZone,new Intl.DateTimeFormat("en-GB",{timeZone:o,timeZoneName:"long"}).format(this).slice(12)})`;var o}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new TC(+this,e)}[Symbol.for("constructDateFrom")](e){return new TC(+new Date(e),this.timeZone)}}function OC(e,t,n=vC){return n.format(e,"LLLL y",t)}const MC=OC;function RC(e,t,n=vC){return n.format(e,"d",t)}function DC(e,t=Uk){return t.localize?.month(e)}function AC(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function jC(){return""}function IC(e,t,n=vC){return n.format(e,"cccccc",t)}function FC(e){return e.toString()}const LC=FC;function zC(e,t,n=vC){return n.format(e,"LLLL y",t)}const BC=zC;function WC(e,t,n,r=vC){let o=r.format(e,"PPPP",n);return t?.today&&(o=`Today, ${o}`),o}function VC(e,t,n,r=vC){let o=r.format(e,"PPPP",n);return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const UC=VC;function $C(){return""}function HC(e){return"Choose the Month"}function YC(e){return"Go to the Next Month"}function qC(e){return"Go to the Previous Month"}function KC(e,t,n=vC){return n.format(e,"cccc",t)}function GC(e,t){return`Week ${e}`}function XC(e){return"Week Number"}function ZC(e){return"Choose the Year"}function JC(e,t){const{month:n,defaultMonth:r,today:o=(e.timeZone?TC.tz(e.timeZone):t.Date?new t.Date:new Date),numberOfMonths:i=1,endMonth:a,startMonth:s}=e;let l=n||r||o;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:d}=t;return a&&c(a,l)<0&&(l=u(a,-1*(i-1))),s&&c(l,s)<0&&(l=s),d(l)}class QC{constructor(e,t,n=vC){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class eN{constructor(e,t){this.date=e,this.weeks=t}}class tN{constructor(e,t){this.days=t,this.weekNumber=e}}function nN(e,t){const[n,r]=(0,s.useState)(e);return[void 0===t?n:t,r]}function rN(e,t,n=!1,r=vC){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:s}=r;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?s(i,t):!(n||!o)&&s(o,t)}function oN(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function iN(e,t,n=vC){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=n;return r.some((t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(function(e,t){return Array.isArray(e)&&e.every(t.isDate)}(t,n))return t.includes(e);if(oN(t))return rN(t,e,!1,n);if(r=t,Boolean(r&&"object"==typeof r&&"dayOfWeek"in r))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();var r;if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){const n=i(t.before,e)>0,r=i(t.after,e)<0;return a(t.before,t.after)?r&&n:n||r}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?i(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?i(t.before,e)>0:"function"==typeof t&&t(e)}))}function aN(e,t,n,r,o,i,a,s=0){if(s>365)return;const l=function(e,t,n,r,o,i,a){const{weekStartsOn:s,locale:l,ISOWeek:c}=i,{addDays:u,addMonths:d,addYears:f,addWeeks:m,startOfISOWeek:h,endOfISOWeek:p,startOfWeek:g,endOfWeek:y,max:v,min:b}=a;let w={day:u,week:m,month:d,year:f,startOfWeek:e=>c?h(e):g(e,{locale:l,weekStartsOn:s}),endOfWeek:e=>c?p(e):y(e,{locale:l,weekStartsOn:s})}[e](n,"after"===t?1:-1);return"before"===t&&r?w=v([r,w]):"after"===t&&o&&(w=b([o,w])),w}(e,t,n.date,r,o,i,a),c=Boolean(i.disabled&&iN(l,i.disabled,a)),u=Boolean(i.hidden&&iN(l,i.hidden,a)),d=new QC(l,l,a);return c||u?aN(e,t,d,r,o,i,a,s+1):d}function sN(e,t,n,r,o){const{autoFocus:i}=e,[a,l]=(0,s.useState)(),c=function(e,t,n,r){let o,i=0,a=!1;for(;i{const n=t(e);return!n[VS.disabled]&&!n[VS.hidden]&&!n[VS.outside]}))),o}(t.days,n,r||(()=>!1),a),[u,d]=(0,s.useState)(i?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(n,r)=>{if(!u)return;const i=aN(n,r,u,t.navStart,t.navEnd,e,o);i&&(t.goToDay(i),d(i))}}}function lN(e){const{components:t,formatters:n,labels:r,dateLib:l,locale:c,classNames:u}=(0,s.useMemo)((()=>{return{dateLib:(r=e.dateLib,{...vC,...r}),components:(n=e.components,{...o,...n}),formatters:(t=e.formatters,t?.formatMonthCaption&&!t.formatCaption&&(t.formatCaption=t.formatMonthCaption),t?.formatYearCaption&&!t.formatYearDropdown&&(t.formatYearDropdown=t.formatYearCaption),{...i,...t}),labels:{...a,...e.labels},locale:{...Uk,...e.locale},classNames:{...bC(),...e.classNames}};var t,n,r}),[e.classNames,e.components,e.dateLib,e.formatters,e.labels,e.locale]),{captionLayout:d,firstWeekContainsDate:f,mode:m,onDayBlur:h,onDayClick:p,onDayFocus:g,onDayKeyDown:y,onDayMouseEnter:v,onDayMouseLeave:b,onNextClick:w,onPrevClick:x,showWeekNumber:E,styles:_,useAdditionalDayOfYearTokens:S,useAdditionalWeekYearTokens:k,weekStartsOn:C}=e,N={locale:c,weekStartsOn:C,firstWeekContainsDate:f,useAdditionalWeekYearTokens:k,useAdditionalDayOfYearTokens:S},P=N,{formatCaption:T,formatDay:O,formatMonthDropdown:M,formatWeekNumber:R,formatWeekNumberHeader:D,formatWeekdayName:A,formatYearDropdown:j}=n,I=function(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:s,addYears:l,endOfYear:c}=t,{fromYear:u,toYear:d,fromMonth:f,toMonth:m}=e;!n&&f&&(n=f),!n&&u&&(n=new Date(u,0,1)),!r&&m&&(r=m),!r&&d&&(r=new Date(d,11,31));const h=e.captionLayout?.startsWith("dropdown");return n?n=a(n):u?n=new Date(u,0,1):!n&&h&&(n=o(l(e.today??(e.timeZone?TC.tz(e.timeZone):t.Date?new t.Date:new Date),-100))),r?r=s(r):d?r=new Date(d,11,31):!r&&h&&(r=c(e.today??(e.timeZone?TC.tz(e.timeZone):t.Date?new t.Date:new Date))),[n?i(n):n,r?i(r):r]}(e,t),{startOfMonth:o,endOfMonth:i}=t,a=JC(e,t),[l,c]=nN(a,e.month?o(e.month):void 0);(0,s.useEffect)((()=>{const n=JC(e,t);c(n)}),[e.timeZone]);const u=function(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let n=0;nt)break;i.push(o)}return i}(l,r,e,t),d=function(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:s,locale:l,weekStartsOn:c}=n??{},{startOfWeek:u,endOfWeek:d,startOfISOWeek:f,endOfISOWeek:m,addDays:h,differenceInCalendarDays:p,differenceInCalendarMonths:g,isAfter:y,endOfMonth:v}=r,b=a?f(o):u(o,{weekStartsOn:c,locale:l}),w=p(a?m(v(i)):d(v(i),{weekStartsOn:c,locale:l}),b),x=g(i,o)+1,E=[];for(let e=0;e<=w;e++){const n=h(b,e);if(t&&y(n,t))break;E.push(n)}const _=42*x;if(s&&E.length<_)for(let e=0;e<7;e++){const e=h(E[E.length-1],1);E.push(e)}return E}(u,e.endMonth?i(e.endMonth):void 0,e,t),f=function(e,t,n,r){const{startOfWeek:o,endOfWeek:i,startOfISOWeek:a,endOfISOWeek:s,endOfMonth:l,addDays:c,getWeek:u,getISOWeek:d}=r,f=e.reduce(((e,f)=>{const m=n.ISOWeek?a(f):o(f,{locale:n.locale,weekStartsOn:n.weekStartsOn}),h=n.ISOWeek?s(l(f)):i(l(f),{locale:n.locale,weekStartsOn:n.weekStartsOn}),p=t.filter((e=>e>=m&&e<=h));if(n.fixedWeeks&&p.length<42){const e=t.filter((e=>e>h&&e<=c(h,7)));p.push(...e)}const g=p.reduce(((e,t)=>{const o=n.ISOWeek?d(t):u(t,{locale:n.locale,weekStartsOn:n.weekStartsOn,firstWeekContainsDate:n.firstWeekContainsDate}),i=e.find((e=>e.weekNumber===o)),a=new QC(t,f,r);return i?i.days.push(a):e.push(new tN(o,[a])),e}),[]),y=new eN(f,g);return e.push(y),e}),[]);return n.reverseMonths?f.reverse():f}(u,d,e,t),m=function(e){return e.reduce(((e,t)=>[...e,...t.weeks]),[])}(f),h=f.reduce(((e,t)=>[...e,...t.weeks.reduce(((e,t)=>[...e,...t.days]),[])]),[]),p=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,c=o?i??1:1,u=a(e);return t&&l(u,t)<=0?void 0:s(u,-c)}(l,n,e,t),g=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,c=o?i:1,u=a(e);return t&&l(t,e){if(y)return;let t=o(e);n&&to(r)&&(t=o(r)),c(t),v?.(t)};return{months:f,weeks:m,days:h,navStart:n,navEnd:r,previousMonth:p,nextMonth:g,goToMonth:b,goToDay:e=>{(e=>m.some((t=>t.days.some((t=>t.isEqualTo(e))))))(e)||b(e.date)}}}(e,l),{days:F,months:L,navStart:z,navEnd:B,previousMonth:W,nextMonth:V,goToMonth:U}=I,$=function(e,t,n){const{disabled:r,hidden:o,modifiers:i,showOutsideDays:a,today:s}=t,{isSameDay:l,isSameMonth:c}=n,u={[VS.focused]:[],[VS.outside]:[],[VS.disabled]:[],[VS.hidden]:[],[VS.today]:[]},d={},f={[US.range_end]:[],[US.range_middle]:[],[US.range_start]:[],[US.selected]:[]};for(const f of e){const{date:e,displayMonth:m}=f,h=Boolean(m&&!c(e,m)),p=Boolean(r&&iN(e,r,n)),g=Boolean(o&&iN(e,o,n))||!a&&h,y=l(e,s??(t.timeZone?TC.tz(t.timeZone):n.Date?new n.Date:new Date));h&&u.outside.push(f),p&&u.disabled.push(f),g&&u.hidden.push(f),y&&u.today.push(f),i&&Object.keys(i).forEach((t=>{const r=i?.[t];r&&iN(e,r,n)&&(d[t]?d[t].push(f):d[t]=[f])}))}return e=>{const t={[VS.focused]:!1,[VS.disabled]:!1,[VS.hidden]:!1,[VS.outside]:!1,[VS.today]:!1},n={[US.range_end]:!1,[US.range_middle]:!1,[US.range_start]:!1,[US.selected]:!1},r={};for(const n in u){const r=u[n];t[n]=r.some((t=>t===e))}for(const t in f){const r=f[t];n[t]=r.some((t=>t===e))}for(const t in d)r[t]=d[t].some((t=>t===e));return{...n,...t,...r}}}(F,e,l),{isSelected:H,select:Y,selected:q}=function(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=nN(n,o?n:void 0),s=o?n:i,{isSameDay:l}=t;return{selected:s,select:(e,t,n)=>{let i=e;return!r&&s&&s&&l(e,s)&&(i=void 0),o||a(i),o?.(i,e,t,n),i},isSelected:e=>!!s&&l(s,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=nN(n,o?n:void 0),s=o?n:i,{isSameDay:l}=t,c=e=>s?.some((t=>l(t,e)))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let i=[...s??[]];if(c(e)){if(s?.length===u)return;if(r&&1===s?.length)return;i=s?.filter((t=>!l(t,e)))}else i=s?.length===d?[e]:[...i,e];return o||a(i),o?.(i,e,t,n),i},isSelected:c}}(e,t),o=function(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:i,onSelect:a}=e,[s,l]=nN(o,a?o:void 0),c=a?o:s;return{selected:c,select:(o,s,u)=>{const{min:d,max:f}=e,m=o?function(e,t,n=0,r=0,o=!1,i=vC){const{from:a,to:s}=t||{},{isSameDay:l,isAfter:c,isBefore:u}=i;let d;if(a||s){if(a&&!s)d=l(a,e)?o?{from:a,to:void 0}:void 0:u(e,a)?{from:e,to:a}:{from:a,to:e};else if(a&&s)if(l(a,e)&&l(s,e))d=o?{from:a,to:s}:void 0;else if(l(a,e))d={from:a,to:n>0?void 0:e};else if(l(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,a))d={from:e,to:s};else if(c(e,a))d={from:a,to:e};else{if(!c(e,s))throw new Error("Invalid range");d={from:a,to:e}}}else d={from:e,to:n>0?void 0:e};if(d?.from&&d?.to){const t=i.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t0;)if(e=t.addDays(e,1),r&&n&&iN(e,n,t)){m.from=o,m.to=void 0;break}}return a||l(m),a?.(m,o,s,u),m},isSelected:e=>c&&rN(c,e,!1,t)}}(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}(e,l)??{},{blur:K,focused:G,isFocusTarget:X,moveFocus:Z,setFocused:J}=sN(e,I,$,H??(()=>!1),l),{labelDayButton:Q,labelGridcell:ee,labelGrid:te,labelMonthDropdown:ne,labelNav:re,labelWeekday:oe,labelWeekNumber:ie,labelWeekNumberHeader:ae,labelYearDropdown:se}=r,le=(0,s.useMemo)((()=>function(e,t,n,r,o=vC){const i=r?TC.tz(r):o.Date?new o.Date:new Date,a=n?o.startOfISOWeek(i):o.startOfWeek(i,{locale:e,weekStartsOn:t}),s=[];for(let e=0;e<7;e++){const t=o.addDays(a,e);s.push(t)}return s}(c,e.weekStartsOn,e.ISOWeek,e.timeZone,l)),[l,c,e.ISOWeek,e.timeZone,e.weekStartsOn]),ce=void 0!==m||void 0!==p,ue=(0,s.useCallback)((()=>{W&&(U(W),x?.(W))}),[W,U,x]),de=(0,s.useCallback)((()=>{V&&(U(V),w?.(V))}),[U,V,w]),fe=(0,s.useCallback)(((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),J(e),Y?.(e.date,t,n),p?.(e.date,t,n)}),[Y,p,J]),me=(0,s.useCallback)(((e,t)=>n=>{J(e),g?.(e.date,t,n)}),[g,J]),he=(0,s.useCallback)(((e,t)=>n=>{K(),h?.(e.date,t,n)}),[K,h]),pe=(0,s.useCallback)(((t,n)=>r=>{const o={ArrowLeft:["day","rtl"===e.dir?"after":"before"],ArrowRight:["day","rtl"===e.dir?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[r.shiftKey?"year":"month","before"],PageDown:[r.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[r.key]){r.preventDefault(),r.stopPropagation();const[e,t]=o[r.key];Z(e,t)}y?.(t.date,n,r)}),[Z,y,e.dir]),ge=(0,s.useCallback)(((e,t)=>n=>{v?.(e.date,t,n)}),[v]),ye=(0,s.useCallback)(((e,t)=>n=>{b?.(e.date,t,n)}),[b]),{className:ve,style:be}=(0,s.useMemo)((()=>({className:[u[WS.Root],e.className].filter(Boolean).join(" "),style:{..._?.[WS.Root],...e.style}})),[u,e.className,e.style,_]),we=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0};return Object.entries(e).forEach((([e,n])=>{e.startsWith("data-")&&(t[e]=n)})),t}(e),xe={selected:q,select:Y,isSelected:H,months:L,nextMonth:V,previousMonth:W,goToMonth:U,getModifiers:$,components:t,classNames:u,styles:_,labels:r,formatters:n};return s.createElement(rk.Provider,{value:xe},s.createElement(t.Root,{className:ve,style:be,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,...we},s.createElement(t.Months,{className:u[WS.Months],style:_?.[WS.Months]},!e.hideNavigation&&s.createElement(t.Nav,{className:u[WS.Nav],style:_?.[WS.Nav],"aria-label":re(),onPreviousClick:ue,onNextClick:de,previousMonth:W,nextMonth:V}),L.map(((r,o)=>{const i=function(e,t,n,r,o,i){if(!t)return;if(!n)return;const{addMonths:a,startOfMonth:s,isBefore:l}=i,c=e.getFullYear(),u=[];let d=t;for(;u.length<12&&l(d,a(n,1));)u.push(d.getMonth()),d=a(d,1);const f=u.sort(((e,t)=>e-t)).map((e=>{const a=r.formatMonthDropdown(e,o),l=i.Date?new i.Date(c,e):new Date(c,e);return{value:e,label:a,disabled:t&&ls(n)||!1}}));return f}(r.date,z,B,n,c,l),a=function(e,t,n,r,o){if(!t)return;if(!n)return;const{startOfMonth:i,startOfYear:a,endOfYear:s,addYears:l,isBefore:c,isSameYear:u}=o,d=e.getMonth(),f=a(t),m=s(n),h=[];let p=f;for(;c(p,m)||u(p,m);)h.push(p.getFullYear()),p=l(p,1);return h.map((e=>{const a=o.Date?new o.Date(e,d):new Date(e,d),s=t&&ai(n)||!1;return{value:e,label:r.formatYearDropdown(e),disabled:s}}))}(L[0].date,z,B,n,l);return s.createElement(t.Month,{className:u[WS.Month],style:_?.[WS.Month],key:o,displayIndex:o,calendarMonth:r},s.createElement(t.MonthCaption,{className:u[WS.MonthCaption],style:_?.[WS.MonthCaption],calendarMonth:r,displayIndex:o},d?.startsWith("dropdown")?s.createElement(t.DropdownNav,{className:u[WS.Dropdowns],style:_?.[WS.Dropdowns]},"dropdown"===d||"dropdown-months"===d?s.createElement(t.MonthsDropdown,{className:u[WS.MonthsDropdown],"aria-label":ne(),classNames:u,components:t,disabled:Boolean(e.disableNavigation),onChange:e=>{const t=Number(e.target.value),n=l.setMonth(l.startOfMonth(r.date),t);U(n)},options:i,style:_?.[WS.Dropdown],value:r.date.getMonth()}):s.createElement("span",{role:"status","aria-live":"polite"},M(r.date.getMonth())),"dropdown"===d||"dropdown-years"===d?s.createElement(t.YearsDropdown,{className:u[WS.YearsDropdown],"aria-label":se(P),classNames:u,components:t,disabled:Boolean(e.disableNavigation),onChange:e=>{const t=l.setYear(l.startOfMonth(r.date),Number(e.target.value));U(t)},options:a,style:_?.[WS.Dropdown],value:r.date.getFullYear()}):s.createElement("span",{role:"status","aria-live":"polite"},j(r.date.getFullYear()))):s.createElement(t.CaptionLabel,{className:u[WS.CaptionLabel],role:"status","aria-live":"polite"},T(r.date,N,l))),s.createElement(t.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===m||"range"===m,"aria-label":te(r.date,P,l)||void 0,className:u[WS.MonthGrid],style:_?.[WS.MonthGrid]},!e.hideWeekdays&&s.createElement(t.Weekdays,{className:u[WS.Weekdays],style:_?.[WS.Weekdays]},E&&s.createElement(t.WeekNumberHeader,{"aria-label":ae(P),className:u[WS.WeekNumberHeader],style:_?.[WS.WeekNumberHeader],scope:"col"},D()),le.map(((e,n)=>s.createElement(t.Weekday,{"aria-label":oe(e,P,l),className:u[WS.Weekday],key:n,style:_?.[WS.Weekday],scope:"col"},A(e,N,l))))),s.createElement(t.Weeks,{className:u[WS.Weeks],style:_?.[WS.Weeks]},r.weeks.map(((n,r)=>s.createElement(t.Week,{className:u[WS.Week],key:n.weekNumber,style:_?.[WS.Week],week:n},E&&s.createElement(t.WeekNumber,{week:n,style:_?.[WS.WeekNumber],"aria-label":ie(n.weekNumber,{locale:c}),className:u[WS.WeekNumber],scope:"row"},R(n.weekNumber)),n.days.map((n=>{const{date:r}=n,o=$(n);if(o[VS.focused]=!o.hidden&&Boolean(G?.isEqualTo(n)),o[US.selected]=!o.disabled&&(H?.(r)||o.selected),oN(q)){const{from:e,to:t}=q;o[US.range_start]=Boolean(e&&t&&l.isSameDay(r,e)),o[US.range_end]=Boolean(e&&t&&l.isSameDay(r,t)),o[US.range_middle]=rN(q,r,!0,l)}const i=function(e,t={},n={}){let r={...t?.[WS.Day]};return Object.entries(e).filter((([,e])=>!0===e)).forEach((([e])=>{r={...r,...n?.[e]}})),r}(o,_,e.modifiersStyles),a=function(e,t,n={}){return Object.entries(e).filter((([,e])=>!0===e)).reduce(((e,[r])=>(n[r]?e.push(n[r]):t[VS[r]]?e.push(t[VS[r]]):t[US[r]]&&e.push(t[US[r]]),e)),[t[WS.Day]])}(o,u,e.modifiersClassNames),c=ce?void 0:ee(r,o,P,l);return s.createElement(t.Day,{key:`${l.format(r,"yyyy-MM-dd")}_${l.format(n.displayMonth,"yyyy-MM")}`,day:n,modifiers:o,className:a.join(" "),style:i,"aria-hidden":o.hidden||void 0,"aria-selected":o.selected||void 0,"aria-label":c,"data-day":l.format(r,"yyyy-MM-dd"),"data-month":n.outside?l.format(r,"yyyy-MM"):void 0,"data-selected":o.selected||void 0,"data-disabled":o.disabled||void 0,"data-hidden":o.hidden||void 0,"data-outside":n.outside||void 0,"data-focused":o.focused||void 0,"data-today":o.today||void 0},ce?s.createElement(t.DayButton,{className:u[WS.DayButton],style:_?.[WS.DayButton],type:"button",day:n,modifiers:o,disabled:o.disabled||void 0,tabIndex:X(n)?0:-1,"aria-label":Q(r,o,P,l),onClick:fe(n,o),onBlur:he(n,o),onFocus:me(n,o),onKeyDown:pe(n,o),onMouseEnter:ge(n,o),onMouseLeave:ye(n,o)},O(r,N,l)):O(n.date,N,l))}))))))))}))),e.footer&&s.createElement(t.Footer,{className:u[WS.Footer],style:_?.[WS.Footer],role:"status","aria-live":"polite"},e.footer)))}function cN(e,t,n){return Sk(e,-t,n)}var uN=function(){return React.createElement("span",{className:"bg-icon-interactive h-1 w-1 absolute rounded-full inline-block bottom-0 left-1/2 right-1/2"})},dN=function(e){return pC(e,"E").slice(0,1)};function fN(e){return fN="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},fN(e)}var mN=["width","className","classNames","selectedDates","setSelectedDates","showOutsideDays","mode","variant","alignment","onBlur","onChange"];function hN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pN(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1||(b?(_(!0),w(!1)):E?_(!1):w(!b))}},c),l().createElement(ue,{variant:"ghost",onClick:function(){if(E)T(P+24);else if(b){var t=new Date(k+1,e.calendarMonth.date.getMonth());C(t.getFullYear()),n(t)}else n(r)},className:"bg-background-primary border-none cursor-pointer"},l().createElement(iE,{className:"h-4 w-4"}))),E&&l().createElement("div",{className:"grid grid-cols-4 w-full"},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;return Array.from({length:t},(function(t,n){return e+n}))}(P).map((function(t){return l().createElement(ue,{key:t,variant:"ghost",onClick:function(){return function(t){C(t),_(!1),w(!0),n(new Date(t,e.calendarMonth.date.getMonth()))}(t)},className:re("h-10 w-full text-center font-normal relative",t===k&&t!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black")},t,t===(new Date).getFullYear()&&uN())}))),b&&!E&&l().createElement("div",{className:"grid grid-cols-4 gap-2 my-12"},Array.from({length:12},(function(t,r){return l().createElement(ue,{key:r,variant:"ghost",onClick:function(){w(!1),n(new Date(k,r))},className:re("px-1.5 py-2 h-10 w-[4.375rem] text-center font-normal relative",r===e.calendarMonth.date.getMonth()&&r!==(new Date).getMonth()&&k===e.calendarMonth.date.getFullYear()&&e.calendarMonth.date.getFullYear()!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black")},pC(new Date(0,r),"MMM"),(new Date).getMonth()===r&&(new Date).getFullYear()===k&&uN())}))),!b&&!E&&l().createElement(O,{weekdays:u}))},Day:function(e){return l().createElement(R,yN({},e,{onSelect:A}))},Weekdays:function(){return null},Months:function(e){return l().createElement(l().Fragment,null,l().createElement("div",{className:j},e.children.map((function(e,t){return e?l().createElement(l().Fragment,{key:t},e.map((function(e,t){return l().createElement(l().Fragment,{key:t},t>0&&l().createElement("div",{className:"border border-solid border-border-subtle border-l-0"}),e)}))):null}))))},MonthGrid:function(e){return!b&&!E&&l().createElement(D,{monthGridProps:e,onSelect:A})}}},g)))};function EN(e){return Pk(Date.now(),e)}function _N(e){return xk(e,Date.now())}function SN(e){const t=_N(e?.in),n=t.getFullYear(),r=t.getMonth(),o=t.getDate(),i=_N(e?.in);return i.setFullYear(n,r,o-1),i.setHours(0,0,0,0),i}function kN(e,t,n){return kk(e,-t,n)}var CN=["selectionType","variant","presets","onCancel","onApply","applyButtonText","cancelButtonText","showOutsideDays"];function NN(){return NN=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0?a:x,_=function(){w("multiple"===n?[]:{from:null,to:null}),c&&c()},S=function(){u&&u(b)};return"normal"===o?l().createElement(xN,NN({},y,{mode:n,variant:o,width:"w-[18.5rem]",selectedDates:b,showOutsideDays:g,setSelectedDates:w})):"dualdate"===o?l().createElement(xN,{mode:n,numberOfMonths:2,alignment:"horizontal",selectedDates:b,setSelectedDates:w,showOutsideDays:g,variant:o,width:"w-auto",footer:l().createElement("div",{className:"flex justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none"},l().createElement(ue,{variant:"outline",onClick:_},h),l().createElement(ue,{onClick:S},f))}):"presets"===o?l().createElement("div",{className:"flex flex-row shadow-datepicker-wrapper"},l().createElement("div",{className:"flex flex-col gap-1 p-3 items-start border border-solid border-border-subtle border-r-0 rounded-tl-md rounded-bl-md"},E.map((function(e,t){return l().createElement(ue,{key:t,onClick:function(){return t=e.range,void w(t);var t},variant:"ghost",className:"font-medium text-sm"},e.label)}))),l().createElement(xN,NN({},y,{mode:n,selectedDates:b,setSelectedDates:w,variant:o,showOutsideDays:g,width:"w-auto",numberOfMonths:2,footer:l().createElement("div",{className:"flex justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-br-md"},l().createElement(ue,{variant:"outline",onClick:_},h),l().createElement(ue,{onClick:S},f))}))):void 0};return r}()},67:(e,t)=>{"use strict";t.YW=function(e,t={}){const{decode:m=decodeURIComponent,delimiter:h=n}=t,{regexp:p,keys:g}=function(e,t={}){const{delimiter:m=n,end:h=!0,sensitive:p=!1,trailing:g=!0}=t,y=[],v=[],b=p?"":"i",w=(Array.isArray(e)?e:[e]).map((e=>e instanceof u?e:function(e,t={}){const{encodePath:n=r}=t,l=new c(function*(e){const t=[...e];let n=0;function r(){let e="";if(o.test(t[++n]))for(e+=t[n];i.test(t[++n]);)e+=t[n];else if('"'===t[n]){let r=n;for(;n!1===m?r:"param"===e.type?m:e=>e.split(h).map(m)));return function(e){const t=p.exec(e);if(!t)return!1;const n=t[0],r=Object.create(null);for(let e=1;ee,o=/^[$_\p{ID_Start}]$/u,i=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",s={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function l(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class c{constructor(e){this.tokens=e}peek(){if(!this._peek){const e=this.tokens.next();this._peek=e.value}return this._peek}tryConsume(e){const t=this.peek();if(t.type===e)return this._peek=void 0,t.value}consume(e){const t=this.tryConsume(e);if(void 0!==t)return t;const{type:n,index:r}=this.peek();throw new TypeError(`Unexpected ${n} at ${r}, expected ${e}: ${a}`)}text(){let e,t="";for(;e=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)t+=e;return t}}class u{constructor(e){this.tokens=e}}function*d(e,t,n){if(t===e.length)return yield n;const r=e[t];if("group"===r.type){const o=n.slice();for(const n of d(r.tokens,0,o))yield*d(e,t+1,n)}else n.push(r);yield*d(e,t+1,n)}function f(e,t,n){let r="",o="",i=!0;for(let s=0;s{"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,i,a=[];for(i in"string"!=typeof t&&(t="?"),e)if(n.call(e,i)){if((r=e[i])||null!=r&&!isNaN(r)||(r=""),i=o(i),r=o(r),null===i||null===r)continue;a.push(i+"="+r)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,o={};t=n.exec(e);){var i=r(t[1]),a=r(t[2]);null===i||null===a||i in o||(o[i]=a)}return o}},338:(e,t,n)=>{"use strict";var r=n(795);t.H=r.createRoot,r.hydrateRoot},795:e=>{"use strict";e.exports=window.ReactDOM},942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(338);const t=window.wp.domReady;var r=n.n(t);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function h(e,t){return[{usr:e.state,key:e.key,idx:t},f(e)]}function p(e,t,n){return!d.length||(d.call({action:e,location:t,retry:n}),!1)}function y(e){a=e;var t=o();l=t[0],c=t[1],u.call({action:a,location:c})}function v(e){r.go(e)}return null==l&&(l=0,r.replaceState(b({},r.state,{idx:l}),"")),{get action(){return a},get location(){return c},createHref:f,push:function e(t,o){var i=g.Push,a=m(t,o);if(p(i,a,(function(){e(t,o)}))){var s=h(a,l+1),c=s[0],u=s[1];try{r.pushState(c,"",u)}catch(e){n.location.assign(u)}y(i)}},replace:function e(t,n){var o=g.Replace,i=m(t,n);if(p(o,i,(function(){e(t,n)}))){var a=h(i,l),s=a[0],c=a[1];r.replaceState(s,"",c),y(o)}},go:v,back:function(){v(-1)},forward:function(){v(1)},listen:function(e){return u.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&n.addEventListener(w,x),function(){t(),d.length||n.removeEventListener(w,x)}}}}(),S=wp.element.createContext({route:v(_.location)}),k=n(67),C=wp.element.useContext,N="";function P(e){var t=e.path,n=e.onRoute,r=e.children,o=C(S).route,i=(0,k.YW)("".concat(t))("".concat(o.hash.substr(1)));return i?(n&&(N!==i.path&&n(),N=i.path),React.createElement("div",null,wp.element.cloneElement(r,{route:i}))):null}var T=n(942),O=n.n(T);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var R=wp.element.useContext;function D(e){var t=e.to,n=e.onClick,r=e.children,o=e.activeClassName,i=R(S).route,a=function(e){for(var t=1;te.filter(((e,t,n)=>Boolean(e)&&n.indexOf(e)===t)).join(" ");var L={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const z=(0,s.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},c)=>(0,s.createElement)("svg",{ref:c,...L,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:F("lucide",o),...l},[...a.map((([e,t])=>(0,s.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),B=(e,t)=>{const n=(0,s.forwardRef)((({className:n,...r},o)=>{return(0,s.createElement)(z,{ref:o,iconNode:t,className:F(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i}));return n.displayName=`${e}`,n},W=B("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),V=B("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),U=B("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),$=B("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]),H=B("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Y=window.wp.i18n;var q={dashboard:{path:"dashboard"},widgets:{path:"widgets"},templates:{path:"templates"},settings:{path:"settings"},upgrade:{path:"upgrade"}},K=function(){return K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]\n\t\n\t\t\n\t\n\t',viewAll:{link:"",label:"View All"},triggerButton:{icon:'',beforeBtn:"",afterBtn:"",className:"",onClick:function(){}},notification:{setLastPostUnixTime:null,getLastPostUnixTime:null},flyout:{title:"What's New?",innerContent:{titleLink:!0,additionalClasses:[]},excerpt:{wordLimit:500,moreSymbol:"…",readMore:{label:"Read More",className:""}},className:"",closeOnEsc:!0,closeOnOverlayClick:!0,closeBtnIcon:'',formatDate:null,onOpen:function(){},onClose:function(){},onReady:function(){}}},J=function(){function e(e){this.rssFeedURLs=[],this.lastPostUnixTime=0,this.multiLastPostUnixTime={},this.notificationsCount=0,this.multiNotificationCount={},this.hasNewFeeds=!1,this.multiHasNewFeeds={},this.validateArgs(e),this.parseDefaults(e),this.setElement(),this.getElement()?(this.setID(),this.setRSSFeedURLs(),Q.setInstanceID(this.getID()),this.RSS_Fetch_Instance=new ee(this),this.RSS_View_Instance=new te(this),this.setNotificationsCount(),this.setTriggers()):console.warn("WNR: Cannot find element with",this.getArgs().selector)}return e.prototype.validateArgs=function(e){["rssFeedURL","selector"].map((function(t){if(!e[t])throw new Error("".concat(t," is a required argument. It cannot be empty or undefined."));if("rssFeedURL"===t){var n=e[t];Array.isArray(n)&&n.forEach((function(e){if(!(null==e?void 0:e.key))throw new Error('The parameter "key" is required for "'.concat(t,'" parameter in multi-feed mode.'));if(e.key.includes(" "))throw new Error('The parameter "key" cannot have spaces for "'.concat(t,'" parameter in multi-feed mode. Ref Key: "').concat(e.key,'"'))}))}}))},e.prototype.parseDefaults=function(e){var t,n;this.args=K(K(K({},Z),e),{viewAll:K(K({},Z.viewAll),null==e?void 0:e.viewAll),triggerButton:K(K({},Z.triggerButton),null==e?void 0:e.triggerButton),flyout:K(K(K({},Z.flyout),null==e?void 0:e.flyout),{innerContent:K(K({},Z.flyout.innerContent),null===(t=null==e?void 0:e.flyout)||void 0===t?void 0:t.innerContent),excerpt:K(K({},Z.flyout.excerpt),null===(n=null==e?void 0:e.flyout)||void 0===n?void 0:n.excerpt)})})},e.prototype.getArgs=function(){return this.args},e.prototype.setElement=function(){this.element=document.querySelector(this.args.selector)},e.prototype.getElement=function(){return this.element},e.prototype.setID=function(){var e=[this.getArgs().selector],t=this.getArgs().rssFeedURL;Array.isArray(t)?t.forEach((function(t){e.push(t.key)})):e.push(t),this.ID=btoa(e.join("-")).slice(-12).replace(/=/g,"")},e.prototype.isMultiFeedRSS=function(){return"string"!=typeof this.getArgs().rssFeedURL},e.prototype.setRSSFeedURLs=function(){var e=this,t=this.getArgs().rssFeedURL;this.isMultiFeedRSS()?Array.isArray(t)&&t.forEach((function(t){e.rssFeedURLs.push(t)})):this.rssFeedURLs.push({key:null,label:"",url:t.toString()})},e.prototype.getRSSFeedURLs=function(){return this.rssFeedURLs},e.prototype.getID=function(){return this.ID},e.prototype.setNotificationsCount=function(){return G(this,void 0,void 0,(function(){var e=this;return X(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.getRSSFeedURLs().map((function(t){var n=t.key;return G(e,void 0,void 0,(function(){var e;return X(this,(function(t){switch(t.label){case 0:return e=0,"function"!=typeof this.getArgs().notification.getLastPostUnixTime?[3,2]:[4,this.getArgs().notification.getLastPostUnixTime(n,this)];case 1:return e=t.sent(),[3,3];case 2:e=Q.getLastPostUnixTime(n),t.label=3;case 3:return this.isMultiFeedRSS()?this.multiLastPostUnixTime[n]=+e:this.lastPostUnixTime=+e,[2]}}))}))})))];case 1:return t.sent(),[4,this.RSS_Fetch_Instance.fetchData().then((function(t){Object.keys(t).forEach((function(n){var r=t[n];if(r.length){e.multiNotificationCount[n]=0;var o=+r[0].date,i=e.isMultiFeedRSS()?e.multiLastPostUnixTime[n]:e.lastPostUnixTime;o>i&&(r.forEach((function(t){t.date>i&&(e.isMultiFeedRSS()&&(e.multiNotificationCount[n]++,e.multiHasNewFeeds[n]=!0),e.notificationsCount++,e.hasNewFeeds=!0)})),e.RSS_View_Instance.setNotification(e.notificationsCount))}}))}))];case 2:return t.sent(),[2]}}))}))},e.prototype.getNotificationsCount=function(){return this.notificationsCount},e.prototype.setTriggers=function(){var e=this,t=document.getElementById(this.RSS_View_Instance.getTriggerButtonID()),n=document.getElementById(this.RSS_View_Instance.getFlyoutID()),r=n.querySelector(".whats-new-rss-flyout-inner-content"),o=document.getElementById(this.RSS_View_Instance.getFlyoutCloseBtnID()),i=document.getElementById(this.RSS_View_Instance.getFlyoutMultiFeedNavID()),a=function(t){e.RSS_Fetch_Instance.fetchData().then((function(o){r.innerHTML="";var i=o[t];if(i.length){var a=+i[0].date,s=e.isMultiFeedRSS()?e.multiLastPostUnixTime[t]:e.lastPostUnixTime;i.forEach((function(n){var o=!!s&&n.date>s,i=e.getArgs().flyout.innerContent.titleLink?'\n\t\t\t\t\t\t\t\t

').concat(n.title,"

\n\t\t\t\t\t\t\t
"):"

".concat(n.title,"

"),a='\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t

'.concat(e.RSS_View_Instance.formatDate(new Date(n.date)),"

\n\t\t\t\t\t\t\t\t\t").concat(i,"\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t").concat(e.RSS_View_Instance.createExcerpt(n.description,n.postLink,e.getArgs().flyout.excerpt),"\n\t\t\t\t\t\t\t\t").concat(e.RSS_View_Instance.listChildrenPosts(n.children),"\n\t\t\t\t\t\t\t"),l=e.getArgs().flyout.innerContent.additionalClasses;t&&l.push("`inner-content-item-feed-key-${key}`"),r.innerHTML+=e.RSS_View_Instance.innerContentWrapper(a,o,l.join(" "))})),e.getArgs().viewAll.link&&(r.innerHTML+=e.RSS_View_Instance.innerContentWrapper('\n\t\t\t\t\t\t\t').concat(e.getArgs().viewAll.label,"\n\t\t\t\t\t\t\t"))),e.RSS_View_Instance.setIsLoading(!1),n.classList.add("ready"),e.getArgs().flyout.onReady(e),n.focus(),e.isMultiFeedRSS()||(e.lastPostUnixTime=a,e.hasNewFeeds&&("function"==typeof e.getArgs().notification.setLastPostUnixTime?e.getArgs().notification.setLastPostUnixTime(a,t):Q.setLastPostUnixTime(a,t)))}}))};t.addEventListener("click",(function(t){if(t.preventDefault(),e.getArgs().triggerButton.onClick(e),e.RSS_View_Instance.setIsLoading(!0),n.classList.remove("closed"),n.classList.add("open"),document.body.classList.add("whats-new-rss-is-active"),e.getArgs().flyout.onOpen(e),!e.isMultiFeedRSS())return a(null);var r=i.querySelectorAll("button");r.forEach((function(t){e.RSS_View_Instance.setMultiFeedTabNotificationCount(t.dataset.feedKey,e.multiNotificationCount[t.dataset.feedKey]),t.addEventListener("click",(function(n){n.preventDefault();var o=t.dataset.feedKey;e.multiNotificationCount[o]=0,e.RSS_Fetch_Instance.fetchData().then((function(t){var n=t[o][0].date;e.multiLastPostUnixTime[o]=n,!0===e.multiHasNewFeeds[o]&&("function"==typeof e.getArgs().notification.setLastPostUnixTime?e.getArgs().notification.setLastPostUnixTime(n,o):Q.setLastPostUnixTime(n,o)),e.multiHasNewFeeds[o]=!1})),r.forEach((function(e){e.classList.remove("selected");var t=e.dataset.feedKey,n=".inner-content-item-feed-key-".concat(t);document.querySelectorAll(n).forEach((function(e){o!==t?e.classList.add("hidden"):e.classList.remove("hidden")}))})),t.classList.add("selected"),a(o)}))})),r[0].click()}));var s=function(){n.classList.add("closed"),n.classList.remove("open"),n.classList.remove("ready"),document.body.classList.remove("whats-new-rss-is-active"),e.isMultiFeedRSS()?e.RSS_View_Instance.setNotification(Object.values(e.multiNotificationCount).filter(Boolean).length):(e.hasNewFeeds=!1,e.RSS_View_Instance.setNotification(!1)),r.innerHTML="",e.getArgs().flyout.onClose(e),t.focus()};this.getArgs().flyout.closeOnEsc&&document.addEventListener("keydown",(function(e){"Escape"===e.key&&n.classList.contains("open")&&s()})),this.getArgs().flyout.closeOnOverlayClick&&n.querySelector(".whats-new-rss-flyout-overlay").addEventListener("click",s),o.addEventListener("click",s)},e}(),Q=function(){function e(){}return e.setInstanceID=function(e){this.instanceID||(this.instanceID=e)},e.prefixer=function(e,t){if(void 0===t&&(t=""),!this.instanceID)throw new Error("Instance ID not set.");return t?"".concat(this.keys[e],"-").concat(this.instanceID,"-").concat(t):"".concat(this.keys[e],"-").concat(this.instanceID)},e._setDataExpiry=function(e){void 0===e&&(e="");var t=(new Date).getTime()+864e5;sessionStorage.setItem(this.prefixer("SESSION_DATA_EXPIRY",e),JSON.stringify(t))},e._isDataExpired=function(e){void 0===e&&(e="");var t=this.prefixer("SESSION_DATA_EXPIRY",e),n=window.sessionStorage.getItem(t);if(!n)return!0;var r=JSON.parse(n);return(new Date).getTime()>r&&(window.sessionStorage.removeItem(t),!0)},e.setSessionData=function(e,t){return void 0===t&&(t=""),this._setDataExpiry(t),window.sessionStorage.setItem(this.prefixer("SESSION",t),e)},e.getSessionData=function(e){return void 0===e&&(e=""),this._isDataExpired(e)?"{}":window.sessionStorage.getItem(this.prefixer("SESSION",e))},e.setLastPostUnixTime=function(e,t){return void 0===t&&(t=""),window.localStorage.setItem(this.prefixer("LAST_LATEST_POST",t),e.toString())},e.getLastPostUnixTime=function(e){return void 0===e&&(e=""),+window.localStorage.getItem(this.prefixer("LAST_LATEST_POST",e))},e.keys={SESSION_DATA_EXPIRY:"whats-new-cache-expiry",LAST_LATEST_POST:"whats-new-last-unixtime",SESSION:"whats-new-cache"},e}(),ee=function(){function e(e){var t=this;this.data={},this.RSS=e,this.RSS.getRSSFeedURLs().forEach((function(e){var n=JSON.parse(Q.getSessionData(e.key));n&&n.length&&(t.data[e.key]=n)}))}return e.prototype.fetchData=function(){return G(this,void 0,void 0,(function(){var e,t=this;return X(this,(function(n){switch(n.label){case 0:return Object.keys(this.data).length?[2,this.data]:(e=this.RSS.getRSSFeedURLs().map((function(e){return G(t,void 0,void 0,(function(){var t,n,r=this;return X(this,(function(o){switch(o.label){case 0:return this.data[e.key]=[],[4,fetch(e.url)];case 1:return[4,o.sent().text()];case 2:return t=(t=o.sent()).replace(/»/g,"&raquo;"),n=new DOMParser,n.parseFromString(t,"text/xml").querySelectorAll("item").forEach((function(t){var n,o=t.querySelector("title").textContent,i=t.querySelector("link").textContent,a=t.querySelector("content\\:encoded, encoded"),s=a?a.textContent:"",l=t.querySelector("pubDate").innerHTML;r.data[e.key].push({title:o,date:l?+new Date(l):null,postLink:i,description:s.replace(/])*)>/g,'').replace(/

\s*<\/p>/g,""),children:JSON.parse((null===(n=t.querySelector("children"))||void 0===n?void 0:n.innerHTML)||"{}")})})),Q.setSessionData(JSON.stringify(this.data[e.key]),e.key),[2]}}))}))})),[4,Promise.all(e)]);case 1:return n.sent(),[2,this.data]}}))}))},e}(),te=function(){function e(e){this.RSS=e,this.createTriggerButton(),this.createFlyOut()}return e.prototype.getTriggerButtonID=function(){return"whats-new-rss-btn-".concat(this.RSS.getID())},e.prototype.getFlyoutID=function(){return"whats-new-rss-flyout-".concat(this.RSS.getID())},e.prototype.getFlyoutCloseBtnID=function(){return"whats-new-rss-flyout-close-".concat(this.RSS.getID())},e.prototype.getFlyoutMultiFeedNavID=function(){return"whats-new-rss-flyout-multi-feed-nav-".concat(this.RSS.getID())},e.prototype.setIsLoading=function(e){void 0===e&&(e=!1);var t=document.getElementById(this.getFlyoutID());e?t.classList.add("is-loading"):t.classList.remove("is-loading")},e.prototype.setNotification=function(e){var t=document.querySelector("#".concat(this.getTriggerButtonID()," .whats-new-rss-notification-badge"));e?(this.RSS.isMultiFeedRSS()?(t.innerHTML="",t.classList.add("is-multi-feed")):t.innerHTML=e>9?"9+":e.toString(),t.classList.remove("hide")):t.classList.add("hide")},e.prototype.createTriggerButton=function(){var e="\n\t\t".concat(this.RSS.getArgs().triggerButton.beforeBtn,'\n\t\t\n\t\t\t').concat(this.RSS.getArgs().triggerButton.icon,'\n\t\t\t

\n\t\t\n\t\t').concat(this.RSS.getArgs().triggerButton.afterBtn,"\n\t\t");this.RSS.getElement().innerHTML+=e},e.prototype.createFlyOut=function(){var e=["whats-new-rss-flyout","closed"];this.RSS.getArgs().flyout.className&&e.push(this.RSS.getArgs().flyout.className);var t=[];this.RSS.isMultiFeedRSS()&&(t.push('"));var n=document.createElement("div");n.setAttribute("id",this.getFlyoutID()),n.setAttribute("class",e.join(" ")),n.setAttribute("role","dialog"),n.innerHTML='\n\t\t
\n\n\t\t\t
\n\n\t\t\t\t
\n\t\t\t\t\t

'.concat(this.RSS.getArgs().flyout.title,'

\n\n\t\t\t\t\t\n\t\t\t\t\t').concat(this.RSS.getArgs().loaderIcon,'\n\t\t\t\t\t\n\t\t\t\t
\n\n\t\t\t\t\n\t\t\t
\n\n\t\t\t").concat(t.join(""),'\n\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\n\t\t
\n\n\t\t
\n\t\t'),document.body.appendChild(n)},e.prototype.setMultiFeedTabNotificationCount=function(e,t){void 0===t&&(t=0);var n=document.querySelector("#".concat(this.getFlyoutMultiFeedNavID(),' button[data-feed-key="').concat(e,'"]'));if(n){var r=n.querySelector(".new-notification-count");if(t){var o=t>9?"9+":t;r.innerHTML=o.toString()}else r.innerHTML=""}},e.prototype.innerContentWrapper=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n="");var r=["whats-new-rss-flyout-inner-content-item"];return t&&r.push("rss-new-post"),n&&r.push(n),'\n\t\t
\n\t\t\t').concat(t?'New ✨':"","\n\t\t\t").concat(e,"\n\t\t
\n\t\t")},e.prototype.createExcerpt=function(e,t,n){var r=n.wordLimit,o=n.moreSymbol,i=n.readMore;if(!r)return e;var a=e.replace(/<[^>]*>/g,"").split(/\s+/),s=a.slice(0,r).join(" ");return o&&(s+=o),r>a.length?e:t&&(null==i?void 0:i.label)?"

".concat(s,' ').concat(i.label,"

"):"

".concat(s,"

")},e.prototype.listChildrenPosts=function(e){var t=this,n=Object.values(e);if(!n.length)return"";var r=document.createElement("details"),o=document.createElement("summary"),i=document.createElement("div");return n.forEach((function(e){var n=(new DOMParser).parseFromString(e.post_content,"text/html"),r=document.createElement("div");r.classList.add("sub-version-item"),r.innerHTML='\n\t\t\t\t
\n\t\t\t\t\t

'.concat(e.post_title,'

\n\t\t\t\t\t').concat(t.formatDate(new Date(e.post_date)),'\n\t\t\t\t
\n\t\t\t\t
').concat(n.documentElement.textContent,"
\n\t\t\t"),i.appendChild(r)})),o.innerHTML='

See More

See Less

',r.appendChild(o),r.appendChild(i),i.classList.add("sub-version-items-wrapper"),r.classList.add("whats-new-rss-sub-version-details"),r.outerHTML},e.prototype.formatDate=function(e){if("function"==typeof this.RSS.getArgs().flyout.formatDate)return this.RSS.getArgs().flyout.formatDate(e);var t=new Date,n=e.getTime(),r=t.getTime()-n,o=36e5,i=24*o,a=7*i,s=30*i;if(r<6e4)return"Just now";if(r1?"s":""," ago")}if(r1?"s":""," ago")}if(r1?"s":""," ago")}if(r1?"s":""," ago")}var f=Math.floor(r/s);return"".concat(f," month").concat(f>1?"s":""," ago")},e}();function ne(){var e=window.location.hash;document.querySelectorAll("#adminmenu #toplevel_page_hfe a").forEach((function(t){var n=t.getAttribute("href"),r=t.closest("li"),o=t.textContent.trim();n&&(e.includes(n.split("#")[1])||"#dashboard"===e&&"Dashboard"===o)?r.classList.add("current"):r.classList.remove("current")}))}const re=function(){var e=a((0,s.useState)(!1),2),t=e[0],n=e[1];(0,s.useEffect)((function(){return ne(),window.addEventListener("hashchange",ne),function(){window.removeEventListener("hashchange",ne)}}),[]);var r=window.location.hash,o=function(e){return r.includes(e)},i=function(e){return{color:o(e)?"#111827":"#4B5563",borderBottom:o(e)?"2px solid #6005FF":"none",paddingBottom:"22px",marginBottom:"-16px"}},c=function(e){window.open(e,"_blank"),n(!1)};return function({selector:e,...t}){const n=(0,s.useRef)(null);(0,s.useEffect)((()=>{var r;return async function(){const e="whats-new-rss-styles";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.innerHTML=await async function(){return".whats-new-rss-is-active{overflow:hidden}.whats-new-rss-trigger-button{display:flex;align-items:center;position:relative;width:auto;padding:5px;cursor:pointer}.whats-new-rss-trigger-button .whats-new-rss-notification-badge{position:absolute;top:-8px;right:-5px;width:20px;font-size:10px;line-height:20px;text-align:center;border-radius:10px;color:#fff;background:red;transition:transform .2s ease-in-out}.whats-new-rss-trigger-button .whats-new-rss-notification-badge.is-multi-feed{top:-2px;right:-2px;font-size:0;width:10px;height:10px}.whats-new-rss-trigger-button .whats-new-rss-notification-badge.hide{display:none}.whats-new-rss-trigger-button:hover .whats-new-rss-notification-badge{transform:scale(1.2)}.whats-new-rss-flyout{position:fixed;top:0;right:0;bottom:0;width:100%;z-index:99999;transition:visibility .3s ease-in-out;font-family:Arial,Helvetica,sans-serif}.whats-new-rss-flyout .lightbox-trigger,.whats-new-rss-flyout.hidden{display:none}.whats-new-rss-flyout.is-loading .whats-new-rss-flyout-inner-header__loading-icon{display:block;margin:auto}.whats-new-rss-flyout.is-loading .whats-new-rss-flyout-inner-header__loading-icon svg{display:block;background:0 0;width:25px;height:25px}.whats-new-rss-flyout .whats-new-rss-flyout-contents{position:fixed;display:flex;right:0;width:30%;height:100%;flex-direction:column;background-color:#fff;transition:transform .3s ease-in-out;z-index:9999}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px 16px 24px;border-bottom:1px solid #ccc}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header button{border:none;background:0 0;font-size:30px;cursor:pointer;color:#94a3b8;padding:0;margin:0;box-shadow:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header .whats-new-rss-flyout-inner-header__title-icon-wrapper{display:flex;gap:10px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header .whats-new-rss-flyout-inner-header__title-icon-wrapper h3{margin:0;padding:0;color:#0f172a;font-weight:600;font-size:16px;line-height:24px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav{display:flex;padding:0 30px;border-bottom:1px solid #ccc;gap:2em;overflow:auto;white-space:nowrap}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button{position:relative;background:0 0;color:inherit;padding:15px 0;border-bottom:2px solid transparent}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button:focus,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button:hover{border-color:inherit}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button.selected{border-color:#5d5d5d}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button .new-notification-count{position:absolute;top:0;right:-10px;width:20px;font-size:10px;line-height:20px;text-align:center;border-radius:10px;color:#fff;background:red}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content{flex:1;overflow-y:auto}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .skeleton-container{margin:30px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item{border-bottom:1px solid #d8dfe9;padding:30px 24px;color:#475569;font-weight:400;font-size:14px;line-height:20px;display:flex;flex-direction:column;gap:13px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item>*{margin:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.skeleton-row{height:25vh;margin:40px 0;background:linear-gradient(90deg,#eee 25%,#ddd 50%,#eee 75%);background-size:200% 100%;animation:shimmer 1.5s infinite}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.rss-new-post{position:relative}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.rss-new-post .new-post-badge{background:#ff3d3d;border-radius:5px;position:absolute;right:45px;padding:0 5px;color:#fff}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header{display:flex;flex-direction:column;gap:15px;padding:0 0 8px 0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header p{color:#94a3b8;margin:0;padding:0;font-weight:600;font-size:14px;line-height:16px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header h2{margin:0;color:#0f172a;font-weight:700;line-height:28px;font-size:20px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h2{font-weight:700;font-size:18px;line-height:24px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h3{font-weight:700;font-size:16px;line-height:22px;margin-top:12px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h4{font-weight:700;font-size:15px;line-height:20px;margin-top:12px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h5{font-weight:700;font-size:14px;line-height:18px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h6{font-weight:700;font-size:13px;line-height:16px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item p{padding:0;font-size:14px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item p:last-child{margin-bottom:0;padding-bottom:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item a{color:#1170ff;text-decoration:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure{margin:10px 0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure.wp-block-embed.is-type-video{position:relative;width:100%;height:0;padding-bottom:56.25%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item video{vertical-align:middle;width:100%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item strong{font-weight:600}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul{padding-inline-start:20px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol li,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul li{margin-bottom:5px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul{list-style-type:disc}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol{list-style-type:decimal}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details{line-height:20px;font-size:.9em;margin:10px 0;background:#f9fafb}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary{display:flex;justify-content:space-between;cursor:pointer;padding:20px 15px;height:1em;line-height:20px;font-weight:800}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary::after{content:'⌃';font-size:20px;transform:rotateX(180deg);font-weight:800}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary .text-see-more{display:block}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary .text-see-less{display:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary{border-bottom:1px solid #e2e8f0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary::after{transform:rotateX(45deg)}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary .text-see-more{display:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary .text-see-less{display:block}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item{position:relative;padding:1em;border-bottom:1px solid #e2e8f0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item .sub-version-header{display:flex;justify-content:space-between}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item .sub-version-content{margin-top:1em}.whats-new-rss-flyout .whats-new-rss-flyout-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);transition:all .3s ease-in-out}.whats-new-rss-flyout.closed{visibility:hidden}.whats-new-rss-flyout.closed .whats-new-rss-flyout-overlay{opacity:0;visibility:hidden}.whats-new-rss-flyout.closed .whats-new-rss-flyout-contents{transform:translateX(100%)}.whats-new-rss-flyout .whats-new-rss-flyout-inner-header__loading-icon{display:none}@keyframes shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}@media screen and (max-width:1024px){.whats-new-rss-flyout .whats-new-rss-flyout-contents{width:40%}}@media screen and (max-width:768px){.whats-new-rss-flyout .whats-new-rss-flyout-contents{width:85%}}"}(),document.head.appendChild(t)}}(),n.current||(n.current=(r={selector:e,...t},new J(r))),()=>{n.current&&"function"==typeof n.current.destroy&&n.current.destroy()}}),[e,...Object.values(t)]),n.current}({rssFeedURL:"https://ultimateelementor.com/whats-new/feed/",selector:"#hfe-whats-new",triggerButton:{beforeBtn:'
',icon:'',afterBtn:"
"},flyout:{title:(0,Y.__)("What's New?","astra-sites"),formatDate:function(e){var t=e.toLocaleDateString("en-US",{weekday:"long"}),n=e.toLocaleDateString("en-US",{month:"long"}),r=e.getDate(),o=e.getFullYear();return"".concat(t," ").concat(n," ").concat(r,", ").concat(o)}}}),l().createElement(I.Topbar,{className:"hfe-nav-menu relative",style:{width:"unset",padding:"0.5rem",zIndex:"9",paddingTop:"1rem"}},l().createElement("div",{className:"flex flex-col lg:flex-row items-start md:items-center w-full"},l().createElement("div",{className:"flex flex-row md:items-center md:gap-8 w-full"},l().createElement(I.Topbar.Left,null,l().createElement(I.Topbar.Item,null,l().createElement(D,{to:q.dashboard.path},l().createElement("img",{src:"".concat(hfeSettingsData.icon_url),alt:"Icon",className:"ml-4 cursor-pointer",style:{height:"35px",width:"35px"}})))),l().createElement(I.Topbar.Middle,{className:"flex-grow",align:"left"},l().createElement(I.Topbar.Item,null,l().createElement("nav",{className:"flex flex-wrap gap-6 mt-2 md:mt-0 cursor-pointer"},l().createElement(D,{to:q.dashboard.path,className:"".concat(o("dashboard")?"active-link":""),style:i("dashboard")},(0,Y.__)("Dashboard","header-footer-elementor")),l().createElement("a",{style:{color:"rgb(75, 85, 99)",paddingBottom:"22px",marginBottom:"-16px",cursor:"pointer"},onClick:function(){window.location.href=hfe_admin_data.hfe_edit_url}},(0,Y.__)("Header & Footer Builder","header-footer-elementor")),l().createElement(D,{to:q.widgets.path,className:"".concat(o("widgets")?"active-link":""),style:i("widgets")},(0,Y.__)("Widgets","header-footer-elementor")),l().createElement(D,{to:q.templates.path,className:"".concat(o("templates")?"active-link":""),style:i("templates")},(0,Y.__)("Templates","header-footer-elementor")),l().createElement(D,{to:q.settings.path,className:"".concat(o("settings")?"active-link":""),style:i("settings")},(0,Y.__)("Settings","header-footer-elementor")),l().createElement(D,{to:q.upgrade.path,className:"".concat(o("upgrade")?"active-link":""),style:i("upgrade")},(0,Y.__)("Free vs Pro","header-footer-elementor")))),l().createElement(I.Topbar.Item,null,l().createElement(I.Button,{icon:l().createElement(W,null),iconPosition:"right",variant:"ghost",className:"hfe-remove-ring mb-2",style:{color:"#6005FF",background:"none",border:"none",padding:0,cursor:"pointer"},onClick:function(){return c("https://ultimateelementor.com/pricing/?utm_source=uae-lite-dashboard&utm_medium=navigation-bar&utm_campaign=uae-lite-upgrade")}},(0,Y.__)("Get Pro","header-footer-elementor")))),l().createElement(I.Topbar.Right,{className:"gap-4"},l().createElement(I.Topbar.Item,null,l().createElement(I.DropdownMenu,{placement:"bottom-start",isOpen:t,onOpenChange:n},l().createElement(I.DropdownMenu.Trigger,null,l().createElement(I.Badge,{label:(0,Y.__)("Free","header-footer-elementor"),size:"xs",variant:"neutral"})),l().createElement(I.DropdownMenu.Content,{className:"w-52"},l().createElement(I.DropdownMenu.List,null,l().createElement(I.DropdownMenu.Item,null,(0,Y.__)("Version","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,null,l().createElement("div",{className:"flex justify-between w-full"},"".concat(hfeSettingsData.uaelite_current_version),l().createElement(I.Badge,{label:(0,Y.__)("Free","header-footer-elementor"),size:"xs",variant:"neutral"}))))))),l().createElement(I.Topbar.Item,{className:"gap-4 cursor-pointer"},l().createElement(I.DropdownMenu,{placement:"bottom-start",isOpen:t,onOpenChange:n},l().createElement(I.DropdownMenu.Trigger,null,l().createElement(V,null)),l().createElement(I.DropdownMenu.Content,{className:"w-60"},l().createElement(I.DropdownMenu.List,null,l().createElement(I.DropdownMenu.Item,null,(0,Y.__)("Useful Resources","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,{className:"text-text-primary",style:{color:"black"},onClick:function(){return c("https://ultimateelementor.com/docs/getting-started-with-ultimate-addons-for-elementor-lite/")}},l().createElement(U,{style:{color:"black"}}),(0,Y.__)("Getting Started","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,{onClick:function(){return c("https://ultimateelementor.com/docs-category/widgets/")}},l().createElement(U,null),(0,Y.__)("How to use widgets","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,{onClick:function(){return c("https://ultimateelementor.com/docs-category/features/")}},l().createElement(U,null),(0,Y.__)("How to use features","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,{onClick:function(){return c("https://ultimateelementor.com/docs-category/templates/")}},l().createElement(U,null),(0,Y.__)("How to use templates","header-footer-elementor")),l().createElement(I.DropdownMenu.Item,{onClick:function(){return c("https://ultimateelementor.com/contact/")}},l().createElement($,null),(0,Y.__)("Contact us","header-footer-elementor"))))),l().createElement("div",{className:"pb-1",id:"hfe-whats-new"})),l().createElement(D,{to:q.settings.path},l().createElement(H,{className:"cursor-pointer hfe-user-icon",style:{color:"black"}}))))))};function oe(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const ie=B("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),ae=window.wp.apiFetch;var se=n.n(ae),le=[],ce=function(){0!==le.length&&le.shift()()};const ue=function(e){var t=e.widget,n=e.updateCounter,r=t.id,o=t.icon,i=t.title,c=(t.infoText,t.is_pro),u=(t.is_active,t.slug,t.demo_url),d=t.doc_url,f=t.description,m=(t.is_new,a((0,s.useState)(t.is_active),2)),h=m[0],p=m[1],g=a((0,s.useState)(!1),2),y=g[0],v=g[1];(0,s.useEffect)((function(){p(t.is_active)}),[t.is_active,n]);var b=function(e){var t=e?"hfe_deactivate_widget":"hfe_activate_widget",n=new window.FormData;n.append("action",t),n.append("nonce",hfe_admin_data.nonce),n.append("module_id",r),n.append("is_pro",c);try{var o=se()({url:hfe_admin_data.ajax_url,method:"POST",body:n});o.success?p(h):o.error}catch(e){}finally{v(!1),ce()}};return l().createElement(I.Container,{align:"center",containerType:"flex",direction:"column",justify:"between",gap:""},l().createElement("div",{className:"flex items-center justify-between w-full"},l().createElement("div",{className:"h-10 w-10 mb-5 ".concat(null==o?void 0:o.props),style:{fontSize:"22px"}},o),l().createElement("div",{className:"flex items-center gap-x-2",style:{marginBottom:"15px"}},c&&l().createElement(I.Badge,{label:"PRO",size:"xs",type:"pill",variant:"inverse"}),!c&&l().createElement(I.Switch,{onChange:function(){y||(v(!0),h?(p(!1),le.push((function(){return b(h)}))):(p(!0),le.push((function(){return b(h)}))),1===le.length&&ce())},size:"sm",value:h,className:"hfe-remove-ring"}))),l().createElement("div",{className:"flex flex-col w-full"},l().createElement("p",{className:"text-sm font-medium text-text-primary pt-3 m-0 pb-1"},i),l().createElement("div",{className:"flex items-center justify-between w-full"},u&&l().createElement("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-text-tertiary m-0 mb-1 hfe-remove-ring",style:{textDecoration:"none",lineHeight:"1.5rem"}},(0,Y.__)("View Demo","header-footer-elementor")),l().createElement("div",{className:"".concat(u?"":"hfe-tooltip-wrap")},l().createElement(I.Tooltip,{arrow:!0,content:l().createElement("div",null,l().createElement("span",{className:"font-semibold block mb-2"},i),l().createElement("span",{className:"block mb-2"},f),d&&l().createElement("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"cursor-pointer",style:{color:"#B498E5",textDecoration:"none"}},l().createElement(U,{style:{color:"#B498E5",width:"11px",height:"11px",marginRight:"3px"}}),(0,Y.__)("Read Documentation","header-footer-elementor"))),placement:"bottom",title:"",triggers:["click"],variant:"dark",size:"xs"},l().createElement(ie,{className:"h-5 w-5",size:18,color:"#A0A5B2"}))))))},de=function(){var e=a((0,s.useState)(null),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2),o=r[0],i=r[1];return(0,s.useEffect)((function(){i(!0),se()({path:"/hfe/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}}).then((function(e){var t=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t.push({id:n,slug:r.slug,title:r.title,keywords:r.keywords,icon:l().createElement("i",{className:r.icon}),title_url:r.title_url,default:r.default,doc_url:r.doc_url,is_pro:r.is_pro,description:r.description,is_active:void 0===r.is_activate||r.is_activate,demo_url:void 0!==r.demo_url?r.demo_url:r.doc_url})}return t}(e);n(t),i(!1)})).catch((function(e){i(!1)}))}),[]),l().createElement("div",{className:"rounded-lg bg-white w-full mb-6"},l().createElement("div",{className:"flex items-center justify-between p-4",style:{paddingBottom:"0"}},l().createElement("p",{className:"m-0 text-sm font-semibold text-text-primary"},"Widgets / Features"),l().createElement("div",{className:"flex items-center gap-x-2 mr-7"},l().createElement(D,{to:q.widgets.path,className:"text-sm text-text-primary cursor-pointer",style:{lineHeight:"1rem"}},"View All",l().createElement(W,{className:"ml-1",size:13})))),l().createElement("div",{className:"flex bg-black flex-col rounded-lg p-4"},o?l().createElement(I.Container,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-2 md:grid-cols-4",style:{backgroundColor:"#F9FAFB"},containerType:"grid",gap:"",justify:"start"},oe(Array(16)).map((function(e,t){return l().createElement(I.Container.Item,{key:t,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-6 space-y-2"},l().createElement(I.Skeleton,{className:"w-12 h-2 rounded-md"}),l().createElement(I.Skeleton,{className:"w-16 h-2 rounded-md"}),l().createElement(I.Skeleton,{className:"w-12 h-2 rounded-md"}))}))):l().createElement(I.Container,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-2 md:grid-cols-4",style:{backgroundColor:"#F9FAFB"},containerType:"grid",gap:"",justify:"start"},null==t?void 0:t.slice(0,16).map((function(e){return l().createElement(I.Container.Item,{key:e.id,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},l().createElement(ue,{widget:e,key:e.id,updateCounter:0}))})))))},fe=function(){var e=a((0,s.useState)(!0),2),t=e[0],n=e[1],r=a((0,s.useState)(null),2),o=r[0],i=r[1],c=a((0,s.useState)(null),2),u=c[0],d=c[1];if((0,s.useEffect)((function(){n(!0),se()({path:"/hfe/v1/templates",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.uael_nonce_action}}).then((function(e){i(e.templates_status),e.redirect_url&&d(e.redirect_url),n(!1)})).catch((function(e){n(!1)}))}),[]),!t)return l().createElement("div",{className:"box-border hfe-dashboard-templates p-4 bg-white rounded-lg shadow-md mb-6 hfe-subheading"},l().createElement("div",{className:"mb-4"},l().createElement("img",{src:"".concat(hfeSettingsData.templates_url),alt:"Template Showcase",className:"w-full h-auto rounded"})),l().createElement(I.Title,{className:"mt-2",icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,Y.__)("Build Websites 10x Faster with Templates","header-footer-elementor")}),l().createElement("p",{className:"text-text-secondary text-text-tertiary mt-2 mb-2 text-sm"},(0,Y.__)("Choose from our professionally designed websites to build your site faster, with easy customization options.","header-footer-elementor")),"Activated"!==o?l().createElement(D,{to:q.templates.path,className:"w-full"},l().createElement(I.Button,{className:"w-full mt-4",icon:null,iconPosition:"left",size:"md",variant:"secondary"},(0,Y.__)("View Templates","header-footer-elementor"))):l().createElement(I.Button,{className:"w-full mt-4",icon:null,iconPosition:"left",size:"md",variant:"secondary",onClick:function(e){"Activated"===o&&u&&window.open(u,"_blank")}},(0,Y.__)("View Templates","header-footer-elementor")))},me=B("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]),he=B("NotepadText",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"16",height:"18",x:"4",y:"4",rx:"2",key:"1u9h20"}],["path",{d:"M8 10h6",key:"3oa6kw"}],["path",{d:"M8 14h8",key:"1fgep2"}],["path",{d:"M8 18h5",key:"17enja"}]]),pe=function(){return l().createElement("div",{className:"box-border hfe-dashboard-quick-access p-4 bg-white rounded-lg shadow-md",style:{width:"-webkit-fill-available"}},l().createElement(I.Title,{className:"mb-2",icon:null,iconPosition:"right",size:"xs",tag:"h3",title:(0,Y.__)("Quick Access","header-footer-elementor")}),l().createElement(I.Container,{align:"stretch",className:"p-1 rounded-lg gap-1",containerType:"flex",direction:"column",gap:"",justify:"start",style:{width:"100%",backgroundColor:"#F9FAFB"}},l().createElement(I.Container.Item,{alignSelf:"auto",className:"p-4 bg-white rounded-lg shadow-container-item",order:"none",shrink:1},l().createElement(I.Button,{className:"text-black hfe-remove-ring",icon:l().createElement(me,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ultimateelementor.com/contact/","_blank")}},(0,Y.__)("Contact Us","header-footer-elementor"))),l().createElement(I.Container.Item,{className:"p-4 bg-white rounded-lg shadow-container-item"},l().createElement(I.Button,{className:"text-black hfe-remove-ring",icon:l().createElement(V,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ultimateelementor.com/docs/","_blank")}},(0,Y.__)("Help Centre","header-footer-elementor"))),l().createElement(I.Container.Item,{className:"p-4 bg-white rounded-lg shadow-container-item"},l().createElement(I.Button,{className:"text-black hfe-remove-ring",icon:l().createElement(he,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ideas.ultimateelementor.com/boards/feature-requests","_blank")}},(0,Y.__)("Request a Feature","header-footer-elementor")))))},ge=B("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ye=B("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),ve=function(){return l().createElement(I.Title,{className:"hfe-header-title my-4",description:"",icon:null,iconPosition:"right",size:"xs",tag:"h6",title:(0,Y.__)("Formerly Elementor Header & Footer Builder","header-footer-elementor")})},be=function(){return l().createElement("div",null,l().createElement(I.Container,{align:"center",className:"bg-background-primary border-[0.5px] border-subtle rounded-xl shadow-sm mb-6 p-8 flex flex-col lg:flex-row",containerType:"flex",direction:"row",gap:"sm"},l().createElement(I.Container.Item,{shrink:1},l().createElement(I.Title,{description:"",icon:null,iconPosition:"right",className:"max-w-lg",size:"lg",tag:"h3",title:(0,Y.__)("Welcome to Ultimate Addons for Elementor!","header-footer-elementor")}),l().createElement(ve,null),l().createElement("p",{className:"text-sm font-medium text-text-tertiary m-0 mt-2"},(0,Y.__)("We're excited to help you supercharge your website-building experience. Effortlessly design stunning websites with our comprehensive range of free and premium widgets and features.","header-footer-elementor")),l().createElement("div",{className:"flex items-center pt-6 gap-2"},l().createElement(I.Button,{iconPosition:"right",variant:"primary",className:"bg-[#6005FF] hfe-remove-ring",style:{backgroundColor:"#6005FF",transition:"background-color 0.3s ease"},onMouseEnter:function(e){return e.currentTarget.style.backgroundColor="#4B00CC"},onMouseLeave:function(e){return e.currentTarget.style.backgroundColor="#6005FF"},onClick:function(){window.open(hfeSettingsData.hfe_post_url,"_blank")}},(0,Y.__)("Create Header/Footer","header-footer-elementor")),l().createElement(I.Button,{icon:l().createElement(ge,null),iconPosition:"right",variant:"outline",className:"hfe-remove-ring",style:{color:"#7D4CDB",borderColor:"#E9DFFC"},onMouseEnter:function(e){return e.currentTarget.style.color="#000000"},onMouseLeave:function(e){return(e.currentTarget.style.color="#7D4CDB")&&(e.currentTarget.style.borderColor="#E9DFFC")},onClick:function(){window.open(hfeSettingsData.elementor_page_url,"_blank")}},(0,Y.__)("Create New Page","header-footer-elementor")),l().createElement("div",{style:{color:"black",background:"none",border:"none",padding:0,cursor:"pointer"},onMouseEnter:function(e){return e.currentTarget.style.color="#6005ff"},onMouseLeave:function(e){return e.currentTarget.style.color="black"},onClick:function(){window.open("https://ultimateelementor.com/docs/getting-started-with-ultimate-addons-for-elementor-lite/","_blank")}},l().createElement(I.Button,{icon:l().createElement(ye,null),iconPosition:"right",variant:"link",className:"hfe-remove-ring text-black"},(0,Y.__)("Read full guide","header-footer-elementor")))))))},we=B("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),xe=B("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ee=function(){var e=[{id:1,icon:"",title:(0,Y.__)("Modal Popup","header-footer-elementor")},{id:2,icon:"",title:(0,Y.__)("Advanced Heading","header-footer-elementor")},{id:3,icon:"",title:(0,Y.__)("Post Layouts","header-footer-elementor")},{id:4,icon:"",title:(0,Y.__)("Info Box","header-footer-elementor")},{id:5,icon:"",title:(0,Y.__)("Pricing Cards","header-footer-elementor")},{id:6,icon:"",title:(0,Y.__)("Form Stylers and more...","header-footer-elementor")}];return l().createElement("div",null,l().createElement(I.Container,{className:"bg-background-primary p-4 border-[0.5px] border-subtle rounded-xl shadow-sm",containerType:"flex",direction:"row",justify:"between",gap:"xs"},l().createElement(I.Container.Item,{className:"flex flex-col pt-6 pb-3 justify-between",style:{width:"65%"}},l().createElement("div",null,l().createElement(I.Title,{description:"",icon:l().createElement(we,null),iconPosition:"left",size:"xs",tag:"h6",title:(0,Y.__)("Unlock Ultimate Features","header-footer-elementor"),className:"text-xs font-semibold text-brand-primary-600"}),l().createElement(I.Title,{description:"",icon:"",iconPosition:"left",tag:"h6",title:(0,Y.__)("Create Stunning Designs with the Pro Version!","header-footer-elementor"),className:"py-1 text-[12px]"}),l().createElement("p",{className:"text-sm m-0 text-text-secondary"},(0,Y.__)("Get access to advanced widgets and features to create the website that stands out!","header-footer-elementor"))),l().createElement("div",{className:"grid grid-cols-2 grid-flow-row gap-1 my-4"},e.map((function(e){return l().createElement(I.Title,{key:e.id,description:"",icon:l().createElement(xe,{className:"text-brand-primary-600 mr-1 h-3 w-3"}),iconPosition:"left",size:"xs",tag:"h6",title:(0,Y.__)(e.title,"header-footer-elementor"),className:"text-[14px]"})}))),l().createElement("div",{className:"flex items-center pb-3 gap-4"},l().createElement(I.Button,{variant:"secondary",className:"hfe-remove-ring",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-dashboard&utm_medium=unlock-ultimate-feature&utm_campaign=uae-lite-upgrade","_blank")}},(0,Y.__)("Upgrade Now","header-footer-elementor")),l().createElement(D,{className:"text-black cursor-pointer",to:q.upgrade.path},(0,Y.__)("Compare Free vs Pro","header-footer-elementor")))),l().createElement(I.Container.Item,{className:"flex justify-center items-center",style:{width:"34%"}},l().createElement("img",{src:"".concat(hfeSettingsData.column_url),alt:(0,Y.__)("Column Showcase","header-footer-elementor"),className:"w-full h-auto rounded"}))))};function _e(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function Se(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_e(i,r,o,a,s,"next",e)}function s(e){_e(i,r,o,a,s,"throw",e)}a(void 0)}))}}const ke=window.regeneratorRuntime;var Ce=n.n(ke);const Ne=function(e){var t=e.plugin,n=e.setUpdateCounter,r=t.path,o=t.slug,i=t.siteUrl,c=t.icon,u=t.type,d=t.name,f=t.zipUrl,m=t.desc,h=(t.wporg,t.isFree),p=(t.action,t.status),g=t.settings_url,y=a((0,s.useState)(!1),2),v=y[0],b=y[1],w=a((0,s.useState)(null),2),x=w[0],E=w[1],_=function(e){b(!1);var t=new window.FormData;t.append("action","hfe_recommended_plugin_activate"),t.append("nonce",hfe_admin_data.nonce),t.append("plugin",e.init),t.append("type",e.type),t.append("slug",e.slug);var r=document.querySelector('[data-slug="'.concat(e.slug,'"]')),o=r.querySelector("span");o.innerText=(0,Y.__)("Activating..","header-footer-elementor"),se()({url:hfe_admin_data.ajax_url,method:"POST",body:t}).then((function(t){if(t.success)o&&(r.style.color="#16A34A",r.dataset.action="site_redirect",r.classList.add("hfe-plugin-activated"),o.innerText=(0,Y.__)("Activated","header-footer-elementor"),window.open(g,"_blank"),setTimeout((function(){n((function(e){return e+1}))}),5e3));else{e.type;var i=document.querySelector('[data-slug="'.concat(e.slug,'"]'));if(i){var a=i.querySelector("span");a&&(a.innerText=(0,Y.__)("Activate","header-footer-elementor"))}}}))};return l().createElement(I.Container,{align:"center",containerType:"flex",direction:"column",justify:"between",gap:"lg"},l().createElement("div",{className:"flex items-center justify-between w-full"},l().createElement("div",{className:"h-5 w-5"},l().createElement("img",{src:c,alt:"Recommended Plugins/Themes",className:"w-full h-auto rounded",style:{width:"24px",height:"24px"}})),l().createElement("div",{className:"flex items-center gap-x-2"},h&&l().createElement(I.Badge,{label:(0,Y.__)("Free","header-footer-elementor"),size:"xs",type:"pill",variant:"green"}),l().createElement(I.Button,{size:"xs",variant:"link",className:"cursor-pointer hfe-remove-ring",onClick:function(e){var t=e.currentTarget.dataset.action,n=new window.FormData,r={init:e.currentTarget.dataset.init,type:e.currentTarget.dataset.type,slug:e.currentTarget.dataset.slug,name:e.currentTarget.dataset.pluginname};switch(t){case"hfe_recommended_plugin_activate":"theme"===r.type?(E(r),b(!0)):_(r);break;case"hfe_recommended_plugin_install":n.append("action","theme"===r.type?"hfe_recommended_theme_install":"hfe_recommended_plugin_install"),n.append("_ajax_nonce",hfe_admin_data.installer_nonce),n.append("slug",r.slug),e.target.innerText=(0,Y.__)("Installing..","header-footer-elementor"),se()({url:hfe_admin_data.ajax_url,method:"POST",body:n}).then((function(t){t.success||"folder_exists"===t.errorCode?(e.target.innerText=(0,Y.__)("Installed","header-footer-elementor"),function(e){var t=(new Date).toISOString().split("T")[0],n=new URLSearchParams({source:"UAE Lite",target_plugin:e.name,date:t});fetch("".concat("https://webhook.suretriggers.com/suretriggers/a7ac4b20-18f9-4ec6-9813-dfac83328d00","?").concat(n.toString()),{method:"GET"}).then((function(e){return e.json()})).then((function(e){})).catch((function(e){}))}(r),"theme"===r.type?(document.querySelector('[data-slug="'.concat(r.slug,'"]')).dataset.action="hfe_recommended_plugin_activate",e.target.innerText=(0,Y.__)("Activate","header-footer-elementor")):_(r)):(e.target.innerText=(0,Y.__)("Install","header-footer-elementor"),alert("theme"===r.type?(0,Y.__)("Theme Installation failed, Please try again later.","header-footer-elementor"):(0,Y.__)("Plugin Installation failed, Please try again later.","header-footer-elementor")))}));break;case"site_redirect":window.open(i,"_blank")}},"data-plugin":f,"data-type":u,"data-pluginname":d,"data-slug":o,"data-site":i,"data-init":r,"data-action":function(e){return"Activated"===e?"site_redirect":"Installed"===e?"hfe_recommended_plugin_activate":"hfe_recommended_plugin_install"}(p),style:{color:"Activated"===p?"#16A34A":"#6005FF"}},"Activated"===p?(0,Y.__)("Visit Site","header-footer-elementor"):"Installed"===p?"Activate":p),l().createElement(I.Dialog,{design:"simple",open:v,setOpen:b},l().createElement(I.Dialog.Backdrop,null),l().createElement(I.Dialog.Panel,null,l().createElement(I.Dialog.Header,null,l().createElement("div",{className:"flex items-center justify-between"},l().createElement(I.Dialog.Title,null,(0,Y.__)("Activate Theme","header-footer-elementor"))),l().createElement(I.Dialog.Description,null,(0,Y.__)("Are you sure you want to switch your current theme to Astra?","header-footer-elementor"))),l().createElement(I.Dialog.Footer,null,l().createElement(I.Button,{onClick:function(){return _(x)}},(0,Y.__)("Yes","header-footer-elementor")),l().createElement(I.Button,{variant:"outline",onClick:function(){return b(!1)}},(0,Y.__)("Close","header-footer-elementor"))))))),l().createElement("div",{className:"flex flex-col w-full pb-4"},l().createElement("p",{className:"text-sm font-medium text-text-primary pb-1 m-0 cursor-pointer",onClick:function(){return window.open(t.siteurl,"_blank")}},(0,Y.__)(d,"header-footer-elementor")),l().createElement("p",{className:"text-sm font-medium text-text-tertiary m-0"},(0,Y.__)(m,"header-footer-elementor"))))};function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Te=function(){var e=a((0,s.useState)([]),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2),o=r[0],i=r[1],c=a((0,s.useState)(0),2),u=c[0],d=c[1],f=a((0,s.useState)(!1),2),m=f[0],p=f[1];function g(e){return Object.keys(e).map((function(t){return function(e){for(var t=1;t"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Ve,$e=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,He=/\/\*[^]*?\*\/| +/g,Ye=/\n+/g,qe=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?qe(a,i):i+"{"+qe(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=qe(a,t?t.replace(/([^,])+/g,(e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=qe.p?qe.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Ke={},Ge=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+Ge(e[n]);return t}return e},Xe=(e,t,n,r,o)=>{let i=Ge(e),a=Ke[i]||(Ke[i]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(i));if(!Ke[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=$e.exec(e.replace(He,""));)t[4]?r.shift():t[3]?(n=t[3].replace(Ye," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(Ye," ").trim();return r[0]})(e);Ke[a]=qe(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&Ke.g?Ke.g:null;return n&&(Ke.g=Ke[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Ke[a],t,r,s),a};function Ze(e){let t=this||{},n=e.call?e(t.p):e;return Xe(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":qe(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,Ue(t.target),t.g,t.o,t.k)}Ze.bind({g:1});let Je,Qe,et,tt=Ze.bind({k:1});function nt(e,t){let n=this||{};return function(){let r=arguments;function o(i,a){let s=Object.assign({},i),l=s.className||o.className;n.p=Object.assign({theme:Qe&&Qe()},s),n.o=/ *go\d+/.test(l),s.className=Ze.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),et&&c[0]&&et(s),Je(c,s)}return t?t(o):o}}var rt=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,ot=(()=>{let e=0;return()=>(++e).toString()})(),it=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),at=new Map,st=e=>{if(at.has(e))return;let t=setTimeout((()=>{at.delete(e),dt({type:4,toastId:e})}),1e3);at.set(e,t)},lt=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,20)};case 1:return t.toast.id&&(e=>{let t=at.get(e);t&&clearTimeout(t)})(t.toast.id),{...e,toasts:e.toasts.map((e=>e.id===t.toast.id?{...e,...t.toast}:e))};case 2:let{toast:n}=t;return e.toasts.find((e=>e.id===n.id))?lt(e,{type:1,toast:n}):lt(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?st(r):e.toasts.forEach((e=>{st(e.id)})),{...e,toasts:e.toasts.map((e=>e.id===r||void 0===r?{...e,visible:!1}:e))};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter((e=>e.id!==t.toastId))};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map((e=>({...e,pauseDuration:e.pauseDuration+o})))}}},ct=[],ut={toasts:[],pausedAt:void 0},dt=e=>{ut=lt(ut,e),ct.forEach((e=>{e(ut)}))},ft={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},mt=e=>(t,n)=>{let r=((e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(null==n?void 0:n.id)||ot()}))(t,e,n);return dt({type:2,toast:r}),r.id},ht=(e,t)=>mt("blank")(e,t);ht.error=mt("error"),ht.success=mt("success"),ht.loading=mt("loading"),ht.custom=mt("custom"),ht.dismiss=e=>{dt({type:3,toastId:e})},ht.remove=e=>dt({type:4,toastId:e}),ht.promise=(e,t,n)=>{let r=ht.loading(t.loading,{...n,...null==n?void 0:n.loading});return e.then((e=>(ht.success(rt(t.success,e),{id:r,...n,...null==n?void 0:n.success}),e))).catch((e=>{ht.error(rt(t.error,e),{id:r,...n,...null==n?void 0:n.error})})),e};var pt=(e,t)=>{dt({type:1,toast:{id:e,height:t}})},gt=()=>{dt({type:5,time:Date.now()})},yt=tt` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,vt=tt` from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; }`,bt=tt` from { transform: scale(0) rotate(90deg); opacity: 0; } to { transform: scale(1) rotate(90deg); opacity: 1; }`,wt=nt("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#ff4b4b"}; position: relative; transform: rotate(45deg); animation: ${yt} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after, &:before { content: ''; animation: ${vt} 0.15s ease-out forwards; animation-delay: 150ms; position: absolute; border-radius: 3px; opacity: 0; background: ${e=>e.secondary||"#fff"}; bottom: 9px; left: 4px; height: 2px; width: 12px; } &:before { animation: ${bt} 0.15s ease-out forwards; animation-delay: 180ms; transform: rotate(90deg); } `,xt=tt` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,Et=nt("div")` width: 12px; height: 12px; box-sizing: border-box; border: 2px solid; border-radius: 100%; border-color: ${e=>e.secondary||"#e0e0e0"}; border-right-color: ${e=>e.primary||"#616161"}; animation: ${xt} 1s linear infinite; `,_t=tt` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,St=tt` 0% { height: 0; width: 0; opacity: 0; } 40% { height: 0; width: 6px; opacity: 1; } 100% { opacity: 1; height: 10px; }`,kt=nt("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#61d345"}; position: relative; transform: rotate(45deg); animation: ${_t} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after { content: ''; box-sizing: border-box; animation: ${St} 0.2s ease-out forwards; opacity: 0; animation-delay: 200ms; position: absolute; border-right: 2px solid; border-bottom: 2px solid; border-color: ${e=>e.secondary||"#fff"}; bottom: 6px; left: 6px; height: 10px; width: 6px; } `,Ct=nt("div")` position: absolute; `,Nt=nt("div")` position: relative; display: flex; justify-content: center; align-items: center; min-width: 20px; min-height: 20px; `,Pt=tt` from { transform: scale(0.6); opacity: 0.4; } to { transform: scale(1); opacity: 1; }`,Tt=nt("div")` position: relative; transform: scale(0.6); opacity: 0.4; min-width: 20px; animation: ${Pt} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; `,Ot=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return void 0!==t?"string"==typeof t?s.createElement(Tt,null,t):t:"blank"===n?null:s.createElement(Nt,null,s.createElement(Et,{...r}),"loading"!==n&&s.createElement(Ct,null,"error"===n?s.createElement(wt,{...r}):s.createElement(kt,{...r})))},Mt=e=>`\n0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,Rt=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}\n`,Dt=nt("div")` display: flex; align-items: center; background: #fff; color: #363636; line-height: 1.3; will-change: transform; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); max-width: 350px; pointer-events: auto; padding: 8px 10px; border-radius: 8px; `,At=nt("div")` display: flex; justify-content: center; margin: 4px 10px; color: inherit; flex: 1 1 auto; white-space: pre-line; `,jt=s.memo((({toast:e,position:t,style:n,children:r})=>{let o=e.height?((e,t)=>{let n=e.includes("top")?1:-1,[r,o]=it()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[Mt(n),Rt(n)];return{animation:t?`${tt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${tt(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},i=s.createElement(Ot,{toast:e}),a=s.createElement(At,{...e.ariaProps},rt(e.message,e));return s.createElement(Dt,{className:e.className,style:{...o,...n,...e.style}},"function"==typeof r?r({icon:i,message:a}):s.createElement(s.Fragment,null,i,a))}));!function(e){qe.p=void 0,Je=e,Qe=void 0,et=void 0}(s.createElement);var It=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=s.useCallback((t=>{if(t){let n=()=>{let n=t.getBoundingClientRect().height;r(e,n)};n(),new MutationObserver(n).observe(t,{subtree:!0,childList:!0,characterData:!0})}}),[e,r]);return s.createElement("div",{ref:i,className:t,style:n},o)},Ft=Ze` z-index: 9999; > * { pointer-events: auto; } `,Lt=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:i,containerClassName:a})=>{let{toasts:l,handlers:c}=(e=>{let{toasts:t,pausedAt:n}=((e={})=>{let[t,n]=(0,s.useState)(ut);(0,s.useEffect)((()=>(ct.push(n),()=>{let e=ct.indexOf(n);e>-1&&ct.splice(e,1)})),[t]);let r=t.toasts.map((t=>{var n,r;return{...e,...e[t.type],...t,duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||ft[t.type],style:{...e.style,...null==(r=e[t.type])?void 0:r.style,...t.style}}}));return{...t,toasts:r}})(e);(0,s.useEffect)((()=>{if(n)return;let e=Date.now(),r=t.map((t=>{if(t.duration===1/0)return;let n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(n<0))return setTimeout((()=>ht.dismiss(t.id)),n);t.visible&&ht.dismiss(t.id)}));return()=>{r.forEach((e=>e&&clearTimeout(e)))}}),[t,n]);let r=(0,s.useCallback)((()=>{n&&dt({type:6,time:Date.now()})}),[n]),o=(0,s.useCallback)(((e,n)=>{let{reverseOrder:r=!1,gutter:o=8,defaultPosition:i}=n||{},a=t.filter((t=>(t.position||i)===(e.position||i)&&t.height)),s=a.findIndex((t=>t.id===e.id)),l=a.filter(((e,t)=>te.visible)).slice(...r?[l+1]:[0,l]).reduce(((e,t)=>e+(t.height||0)+o),0)}),[t]);return{toasts:t,handlers:{updateHeight:pt,startPause:gt,endPause:r,calculateOffset:o}}})(n);return s.createElement("div",{style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...i},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map((n=>{let i=n.position||t,a=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:it()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}})(i,c.calculateOffset(n,{reverseOrder:e,gutter:r,defaultPosition:t}));return s.createElement(It,{id:n.id,key:n.id,onHeightUpdate:c.updateHeight,className:n.visible?Ft:"",style:a},"custom"===n.type?rt(n.message,n):o?o(n):s.createElement(jt,{toast:n,position:i}))})))},zt=ht,Bt=[{id:"1",title:(0,Y.__)("Option 1 (Recommended)","header-footer-elementor"),description:(0,Y.__)("This option will automatically replace your theme's header and footer files with custom templates from the plugin. It works with most themes and is selected by default.","header-footer-elementor"),value:"1"},{id:"2",title:(0,Y.__)("Option 2","header-footer-elementor"),description:(0,Y.__)("This option will automatically replace your theme's header and footer files with custom templates from the plugin. It works with most themes and is selected by default.","header-footer-elementor"),value:"2"}];const Wt=function(){if("no"===hfeSettingsData.show_theme_support)return null;var e=a((0,s.useState)(hfeSettingsData.theme_option),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2),o=r[0],i=r[1];(0,s.useEffect)((function(){i(!1)}),[]);var c=function(e){var t=e.target.value;n(t),o||u(t)},u=function(){var e=Se(Ce().mark((function e(t){var n;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(hfe_admin_data.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"save_theme_compatibility_option",hfe_compatibility_option:t,nonce:hfe_admin_data.nonce})});case 3:return n=e.sent,e.next=6,n.json();case 6:e.sent.success?zt.success((0,Y.__)("Settings saved successfully!","header-footer-elementor")):zt.error((0,Y.__)("Failed to save settings!","header-footer-elementor")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),zt.error((0,Y.__)("Failed to save settings!","header-footer-elementor"));case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}();return l().createElement(l().Fragment,null,l().createElement(I.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,Y.__)("Theme Support","header-footer-elementor")}),l().createElement(I.Container,{align:"stretch",className:"bg-background-primary p-6 rounded-lg",containerType:"flex",direction:"column",gap:"sm",justify:"start",style:{marginTop:"24px",maxWidth:"696px"}},l().createElement(I.Container.Item,{className:"flex flex-col space-y-1"},l().createElement("p",{className:"text-base font-semibold m-0"},(0,Y.__)("Select Option to Add Theme Support","header-footer-elementor")),l().createElement("p",{className:"text-sm font-normal m-0"},(0,Y.__)("To ensure compatibility between the header/footer and your theme, please choose one of the following options to enable theme support:","header-footer-elementor"))),l().createElement(I.Container.Item,{className:"p-2 space-y-4",alignSelf:"auto",order:"none"},Bt.map((function(e){return l().createElement("div",{key:e.id,className:"flex items-start gap-1 justify-center cursor-pointer"},l().createElement("input",{id:e.id,value:e.value,type:"radio",className:"mt-1 cursor-pointer hfe-radio-field",name:"theme-support-option",onChange:c,checked:t===e.value}),l().createElement("div",{className:"flex flex-col cursor-pointer"},l().createElement(I.Label,{size:"sm",variant:"neutral",className:"text-sm font-semibold text-text-secondary cursor-pointer flex flex-col items-start justify-start",htmlFor:e.id},e.title,":",l().createElement("p",{className:"m-0 text-sm font-normal text-text-secondary cursor-pointer"},e.description))))}))),l().createElement("div",{className:"flex items-center p-4 border rounded-lg text-start",style:{paddingTop:"16px",paddingBottom:"16px",backgroundColor:"#F3F0FF"}},l().createElement("p",{className:"m-0 text-sm"},l().createElement("strong",null,(0,Y.__)("Note:","header-footer-elementor"))," ",(0,Y.__)("If neither option works, please contact your theme author to add support for this plugin.","header-footer-elementor")))),l().createElement(Lt,{position:"top-right",reverseOrder:!1,gutter:8,containerStyle:{top:20,right:20,marginTop:"80px"},toastOptions:{duration:5e3,style:{background:"white"},success:{duration:3e3,style:{color:""},iconTheme:{primary:"#6005ff",secondary:"#fff"}}}}))},Vt=function(){var e=hfeSettingsData.uaelite_versions,t=(0,s.useRef)(e?e[0].value:""),n=a((0,s.useState)(e?e[0].value:""),2),r=n[0],o=n[1],i=a((0,s.useState)("elementor-header-footer"),2),c=(i[0],i[1]),u=a((0,s.useState)(!1),2),d=u[0],f=u[1];return(0,s.useEffect)((function(){}),[d]),l().createElement(l().Fragment,null,l().createElement(I.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,Y.__)("Version Control","header-footer-elementor")}),l().createElement("div",{className:"box-border bg-background-primary p-6 rounded-lg",style:{marginTop:"24px"}},l().createElement(I.Container,{align:"center",className:"flex flex-col lg:flex-row",containerType:"flex",direction:"column",gap:"sm",justify:"start"},l().createElement(I.Container.Item,{className:"shrink flex flex-col space-y-1"},l().createElement("p",{className:"text-base font-semibold m-0"},(0,Y.__)("Rollback to Previous Version","header-footer-elementor")),l().createElement("p",{className:"text-sm font-normal m-0"},(0,Y.__)("Experiencing an issue with current version? Roll back to a previous version to help troubleshoot the issue.","header-footer-elementor"))),l().createElement(I.Container.Item,{className:"p-2 flex space-y-4",alignSelf:"auto",order:"none"},l().createElement("div",{className:"bsf-rollback-version"},l().createElement("input",{type:"hidden",name:"product-name",id:"bsf-product-name",value:"header-footer-elementor"}),l().createElement("select",{id:"uaeliteVersionRollback",ref:t,onBlur:function(){c("elementor-header-footer")},onChange:function(e){o(e.target.value)},style:{padding:"8px",marginRight:"10px",marginTop:"16px",cursor:"pointer",borderRadius:"4px",height:"40px",width:"100px",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"}},e.map((function(e){return l().createElement("option",{key:e.value,value:e.value},e.label)})))),l().createElement("div",{className:"flex flex-col cursor-pointer"},l().createElement(I.Dialog,{design:"simple",exitOnEsc:!0,scrollLock:!0,open:d,setOpen:f,trigger:l().createElement(I.Button,{style:{backgroundColor:"#6005ff"}},(0,Y.__)("Rollback","header-footer-elementor"))},l().createElement(I.Dialog.Backdrop,null),l().createElement(I.Dialog.Panel,null,l().createElement(I.Dialog.Header,null,l().createElement("div",{className:"flex items-center justify-between"},l().createElement(I.Dialog.Title,null,(0,Y.__)("Rollback to Previous Version","header-footer-elementor")),l().createElement(I.Dialog.CloseButton,null))),l().createElement(I.Dialog.Body,null,(0,Y.__)("Are you sure you want to rollback to Ultimate Addons for Elementor v".concat(r,"?"),"header-footer-elementor")),l().createElement(I.Dialog.Footer,null,l().createElement(I.Button,{onClick:function(){var e=hfeSettingsData.uaelite_rollback_url.replace("VERSION",r);f(!1),window.location.href=e}},(0,Y.__)("Rollback","header-footer-elementor")),l().createElement(I.Button,{onClick:function(){f(!1)}},(0,Y.__)("Cancel","header-footer-elementor"))))))))))},Ut=function(){return l().createElement(l().Fragment,null,l().createElement(I.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,Y.__)("My Account","header-footer-elementor")}),l().createElement(I.Container,{align:"stretch",className:"bg-background-primary p-6 rounded-lg",containerType:"flex",direction:"column",gap:"sm",justify:"start",style:{marginTop:"24px"}},l().createElement(I.Container.Item,{className:"flex flex-col space-y-2"},l().createElement("p",{className:"text-base font-semibold m-0"},(0,Y.__)("License Key","header-footer-elementor")),l().createElement("p",{className:"text-sm font-normal m-0"},(0,Y.__)("You are using the free version of Ultimate Addons for Elementor, no license key is needed.. "))),l().createElement("div",{className:"flex items-center justify-between px-4 rounded-xl",style:{paddingTop:"6px",paddingBottom:"6px",backgroundColor:"#F3F0FF"}},l().createElement("span",{className:"flex items-center gap-x-2 text-base font-semibold"},(0,Y.__)("Unlock Pro Features","header-footer-elementor"),l().createElement("p",{className:"text-base font-normal"},(0,Y.__)("Get access to advanced blocks and premium features.","header-footer-elementor"))),l().createElement(I.Button,{icon:l().createElement(W,null),iconPosition:"right",variant:"link",style:{color:"#6005FF",borderColor:"#6005FF",transition:"color 0.3s ease, border-color 0.3s ease",fontSize:"16px"},className:"hfe-remove-ring text-[#6005FF]",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-settings&utm_medium=My-accounts&utm_campaign=uae-lite-upgrade","_blank")}},(0,Y.__)("Upgrade Now","header-footer-elementor")))))},$t=function(){var e=[{id:1,icon:l().createElement("img",{src:"".concat(hfeSettingsData.user_url),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),selected:l().createElement("img",{src:"".concat(hfeSettingsData.user__selected_url),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),title:(0,Y.__)("My Account","header-footer-elementor"),content:l().createElement(Ut,null)},{id:2,icon:l().createElement("img",{src:"".concat(hfeSettingsData.theme_url),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),selected:l().createElement("img",{src:"".concat(hfeSettingsData.theme_url_selected),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),main:(0,Y.__)("Editor","header-footer-elementor"),title:(0,Y.__)("Theme Support","header-footer-elementor"),content:l().createElement(Wt,null)},{id:3,icon:l().createElement("img",{src:"".concat(hfeSettingsData.version_url),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),selected:l().createElement("img",{src:"".concat(hfeSettingsData.version__selected_url),alt:(0,Y.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),main:(0,Y.__)("Utilities","header-footer-elementor"),title:(0,Y.__)("Version Control","header-footer-elementor"),content:l().createElement(Vt,null)}].filter((function(e){return"no"!==hfeSettingsData.show_theme_support||2!==e.id})),t=a((0,s.useState)((function(){var t=localStorage.getItem("hfeSelectedItemId");return e.find((function(e){return e.id===Number(t)}))||e[0]})),2),n=t[0],r=t[1];return(0,s.useEffect)((function(){localStorage.setItem("hfeSelectedItemId",n.id.toString())}),[n]),(0,s.useEffect)((function(){var t=new URLSearchParams(window.location.search).get("tab");if(t){var n=Number(t),o=e.find((function(e){return e.id===n}));o&&r(o)}}),[]),l().createElement(l().Fragment,null,l().createElement(re,{onSettingsTabClick:function(){r(e[0])}}),l().createElement("div",{className:""},l().createElement(I.Container,{align:"stretch",className:"p-1 flex-col lg:flex-row hfe-settings-page",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{height:"100%"}},l().createElement(I.Container.Item,{className:"p-2 hfe-sticky-outer-wrapper",alignSelf:"auto",order:"none",shrink:1,style:{backgroundColor:"#ffffff"}},l().createElement("div",{className:"hfe-sticky-sidebar"},l().createElement(Be,{items:e,onSelectItem:function(e){r(e)},selectedItemId:n.id}))),l().createElement(I.Container.Item,{className:"p-2 flex w-full justify-center items-start hfe-hide-scrollbar",alignSelf:"auto",order:"none",shrink:1,style:{height:"calc(100vh - 1px)",overflowY:"auto"}},l().createElement("div",{className:"hfe-78-width"},l().createElement(We,{selectedItem:n}))))))},Ht=B("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Yt=function(){var e=[{title:(0,Y.__)("Essentials","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("White Label Option","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("24/7 Premium Support","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Dynamic Header & Footer Widgets","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Post Info","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:2,content:(0,Y.__)("Scroll to Top","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:3,content:(0,Y.__)("Breadcrumbs","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:4,content:(0,Y.__)("Retina Logo","header-footer-elementor"),iconFree:!0,iconPro:!0},{id:5,content:(0,Y.__)("Copyright","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:6,content:(0,Y.__)("Page Title","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:7,content:(0,Y.__)("Site Tagline","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:8,content:(0,Y.__)("Site Logo","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:9,content:(0,Y.__)("Search","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:10,content:(0,Y.__)("Navigation Menu","header-footer-elementor"),iconFree:!0,iconPro:!1}]},{title:(0,Y.__)("Creative & Advanced Design Widgets","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Advanced Heading","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Dual Color Heading","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Fancy Heading","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Party Propz","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("Image Hotspots","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Content & Media Widgets","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Image Gallery","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Video","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Video Gallery","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Table","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("Timeline","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("Image Comparison (Before & After)","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Marketing & Engagement Widgets","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Marketing Button","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Pricing Table","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Countdown Timer","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Business Hours","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("Modal Popup","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:6,content:(0,Y.__)("Notification Bar","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("E-Commerce Integration","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("WooCommerce: Add to Cart","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("WooCommerce: Product Category","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("WooCommerce: Mini Cart","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("WooCommerce: Product Display","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("WooCommerce: Checkout","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Forms Integration","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Contact Form 7","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Gravity Forms","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("WPForms","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Fluent Forms","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Schema & Navigation Widgets","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("FAQ/Accordion with Schema","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("How-To Schema","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Table of Contents","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Creative Features","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Particles","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Shape Divider","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Cross-Domain Copy-Paste","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,Y.__)("Multi-Button","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,Y.__)("Tooltip","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:6,content:(0,Y.__)("Off-Canvas","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Social Media Integration","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Instagram Feed","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,Y.__)("Twitter Feed","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Social Share","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,Y.__)("Advanced Features","header-footer-elementor"),items:[{id:1,content:(0,Y.__)("Team Member","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,Y.__)("Post Layout","header-footer-elementor"),iconFree:!1,iconPro:!0}]}],t=function(e){return e?l().createElement(xe,{color:"#16A34A"}):l().createElement(Ht,{color:"#DC2626"})};return l().createElement("div",{className:"rounded-lg bg-white w-full mb-6"},l().createElement("div",{className:"flex items-center justify-between p-5",style:{paddingBottom:"0"}},l().createElement("div",{className:"flex flex-col"},l().createElement("p",{className:"m-0 text-xl font-semibold pt-4 text-text-primary"},(0,Y.__)("Free Vs Pro","header-footer-elementor")),l().createElement("p",{className:"m-0 text-sm font-normal pt-1 text-text-secondary"},(0,Y.__)("Ultimate Addons for Elementor Pro offers 50+ widgets and features!","header-footer-elementor")),l().createElement("p",{className:"m-0 text-sm font-normal pt-1 text-text-secondary"},(0,Y.__)("Compare the popular features/widgets to find the best option for your website.","header-footer-elementor"))),l().createElement("div",{className:"flex items-center gap-x-2 mr-7"},l().createElement(I.Button,{iconPosition:"right",variant:"primary",style:{color:"white",borderColor:"#6005FF",transition:"color 0.3s ease, border-color 0.3s ease",backgroundColor:"#6005ff"},className:"hfe-remove-ring text-[#6005FF]",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-FreevsPro&utm_medium=get-uae-pro&utm_campaign=uae-lite-upgrade","_blank")}},(0,Y.__)("Upgrade Now","header-footer-elementor")))),l().createElement("div",{className:"px-4"},l().createElement("div",{className:"flex flex-col space-y-2 pt-5"},e.map((function(e){return l().createElement(l().Fragment,{key:e.title},l().createElement("div",{className:"flex fle-row py-4 px-5 items-center h-4 justify-between rounded-lg shadow-container-item",style:{backgroundColor:"#F9FAFB"}},l().createElement("p",{className:"text-sm text-text-primary font-medium"},e.title),l().createElement("div",{className:"flex flex-row items-center",style:{gap:"12rem"}},l().createElement("p",{className:"text-sm text-text-primary font-medium"},(0,Y.__)("Free","header-footer-elementor")),l().createElement("p",{className:"text-sm text-text-primary font-medium",style:{marginRight:"50px"}},(0,Y.__)("Pro","header-footer-elementor")))),e.items.map((function(e){return l().createElement("div",{key:e.id,className:"flex fle-row py-4 px-5 items-center h-4 justify-between rounded-lg shadow-container-item"},l().createElement("p",{className:"text-sm text-text-secondary font-medium"},e.content),l().createElement("div",{className:"flex flex-row items-center justify-between",style:{gap:10===e.id&&e.content===(0,Y.__)("Navigation Menu","header-footer-elementor")?"10.7rem":"12rem"}},l().createElement("p",{className:"text-sm text-text-primary font-medium"},10===e.id&&e.content===(0,Y.__)("Navigation Menu","header-footer-elementor")?e.iconPro?(0,Y.__)("Advanced","header-footer-elementor"):(0,Y.__)("Basic","header-footer-elementor"):t(e.iconFree)),l().createElement("p",{className:"text-sm text-text-primary font-medium",style:{marginRight:10===e.id&&e.content===(0,Y.__)("Navigation Menu","header-footer-elementor")?"25px":"50px"}},10===e.id&&e.content===(0,Y.__)("Navigation Menu","header-footer-elementor")?e.iconPro?(0,Y.__)("Basic","header-footer-elementor"):(0,Y.__)("Advanced","header-footer-elementor"):t(e.iconPro))))})))})))))},qt=function(){var e=[{id:1,icon:"",title:(0,Y.__)("Modal Popup","header-footer-elementor")},{id:2,icon:"",title:(0,Y.__)("Advanced Heading","header-footer-elementor")},{id:3,icon:"",title:(0,Y.__)("Post Layouts","header-footer-elementor")},{id:4,icon:"",title:(0,Y.__)("Info Box","header-footer-elementor")},{id:5,icon:"",title:(0,Y.__)("Pricing Cards","header-footer-elementor")},{id:6,icon:"",title:(0,Y.__)("Form Stylers and more...","header-footer-elementor")}];return l().createElement("div",{className:"",style:{paddingBottom:"16px"}},l().createElement(I.Container,{className:"bg-background-primary gap-1 p-4 border-[0.5px] border-subtle rounded-xl shadow-sm",containerType:"flex",direction:"column",justify:"between",gap:"xs"},l().createElement(I.Container.Item,{className:"flex flex-col justify-center items-center"},l().createElement("img",{src:"".concat(hfeSettingsData.column_url),alt:(0,Y.__)("Column Showcase","header-footer-elementor"),className:"h-auto rounded w-1/2"})),l().createElement(I.Container.Item,{className:"flex flex-col justify-between"},l().createElement("div",null,l().createElement(I.Title,{description:"",icon:l().createElement(we,null),iconPosition:"left",size:"xs",tag:"h6",title:(0,Y.__)("Unlock Ultimate Features","header-footer-elementor"),className:"text-xs font-semibold text-brand-primary-600"}),l().createElement(I.Title,{description:"",icon:"",iconPosition:"left",tag:"h6",title:(0,Y.__)("Create Stunning Designs with the Pro Version!","header-footer-elementor"),className:"py-1 text-sm"}),l().createElement("p",{className:"text-md m-0 text-text-secondary"},(0,Y.__)("Get access to advanced widgets and features to create the website that stands out!","header-footer-elementor"))),l().createElement("div",{className:"grid grid-cols-2 grid-flow-row gap-1 my-4"},e.map((function(e){return l().createElement(I.Title,{key:e.id,description:"",icon:l().createElement(xe,{className:"text-brand-primary-600 mr-1 h-3 w-3"}),iconPosition:"left",size:"xs",tag:"h6",title:e.title,className:"text-md m-0 text-text-secondary hfe-compare-section"})}))),l().createElement("div",{className:""},l().createElement(I.Button,{iconPosition:"right",variant:"secondary",className:"hfe-remove-ring",style:{width:"100%"},onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-free-vs-pro&utm_medium=My-accounts&utm_campaign=uae-lite-upgrade","_blank")}},(0,Y.__)("Upgrade Now","header-footer-elementor"))))))},Kt=function(){return l().createElement(l().Fragment,null,l().createElement(re,null),l().createElement("div",null,l().createElement(I.Container,{align:"stretch",className:"p-6 flex-col lg:flex-row box-border",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{width:"100%"}},l().createElement(I.Container.Item,{className:"p-2 hfe-65-width",alignSelf:"auto",order:"none",shrink:0},l().createElement(Yt,null)),l().createElement(I.Container.Item,{className:"p-2 w-full hfe-35-width",shrink:1},l().createElement(qt,null),l().createElement(Te,null),l().createElement(pe,null)))))},Gt=function(){var e;return React.createElement(j,{routes:q,defaultRoute:null==q||null===(e=q.dashboard)||void 0===e?void 0:e.path},React.createElement(P,{path:q.dashboard.path},React.createElement(Oe,null)),React.createElement(P,{path:q.widgets.path},React.createElement(Fe,null)),React.createElement(P,{path:q.templates.path},React.createElement(ze,null)),React.createElement(P,{path:q.settings.path},React.createElement($t,null)),React.createElement(P,{path:q.upgrade.path},React.createElement(Kt,null)))},Xt=function(){var e=a((0,s.useState)(!1),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2);return r[0],r[1],window.onhashchange=function(){window.scrollTo(0,0)},(0,s.useEffect)((function(){setTimeout((function(){n(!0)}),1e3)}),[]),t?React.createElement("div",{className:"app-container font-figtree"},React.createElement(Gt,null)):React.createElement("div",{className:"loading-spinner flex items-center justify-center h-screen",style:{background:"#F9FAFB"}},React.createElement(I.Loader,{icon:null,size:"lg",variant:"primary"}))};r()((function(){var t=document.getElementById("hfe-settings-app");t&&(0,e.H)(t).render(React.createElement(Xt,null))}))})()})(); //# sourceMappingURL=main.js.map