File: /home/deshuvsd/www/wp-content/plugins/ultimate-elementor/build/main.js
/*! For license information please see main.js.LICENSE.txt */
!function(){var e={67:function(e,t){"use strict";t.YW=function(e,t={}){const{decode:m=decodeURIComponent,delimiter:p=n}=t,{regexp:h,keys:g}=function(e,t={}){const{delimiter:m=n,end:p=!0,sensitive:h=!1,trailing:g=!0}=t,y=[],v=[],b=h?"":"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<t.length;){if('"'===t[++n]){n++,r=0;break}e+="\\"===t[n]?t[++n]:t[n]}if(r)throw new TypeError(`Unterminated quote at ${r}: ${a}`)}if(!e)throw new TypeError(`Missing parameter name at ${n}: ${a}`);return e}for(;n<t.length;){const e=t[n],o=s[e];if(o)yield{type:o,index:n++,value:e};else if("\\"===e)yield{type:"ESCAPED",index:n++,value:t[n++]};else if(":"===e){const e=r();yield{type:"PARAM",index:n,value:e}}else if("*"===e){const e=r();yield{type:"WILDCARD",index:n,value:e}}else yield{type:"CHAR",index:n,value:t[n++]}}return{type:"END",index:n,value:""}}(e)),d=function e(t){const r=[];for(;;){const o=l.text();o&&r.push({type:"text",value:n(o)});const i=l.tryConsume("PARAM");if(i){r.push({type:"param",name:i});continue}const a=l.tryConsume("WILDCARD");if(a)r.push({type:"wildcard",name:a});else{if(!l.tryConsume("{"))return l.consume(t),r;r.push({type:"group",tokens:e("}")})}}}("END");return new u(d)}(e,t)));for(const{tokens:e}of w)for(const t of d(e,0,[])){const e=f(t,m,y);v.push(e)}let x=`^(?:${v.join("|")})`;return g&&(x+=`(?:${l(m)}$)?`),x+=p?"$":`(?=${l(m)}|$)`,{regexp:new RegExp(x,b),keys:y}}(e,t),y=g.map((e=>!1===m?r:"param"===e.type?m:e=>e.split(p).map(m)));return function(e){const t=h.exec(e);if(!t)return!1;const n=t[0],r=Object.create(null);for(let e=1;e<t.length;e++){if(void 0===t[e])continue;const n=g[e-1],o=y[e-1];r[n.name]=o(t[e])}return{path:n,params:r}}};const n="/",r=e=>e,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<e.length;s++){const c=e[s];if("text"!==c.type)if("param"!==c.type&&"wildcard"!==c.type);else{if(!i&&!o)throw new TypeError(`Missing text after "${c.name}": ${a}`);"param"===c.type?r+=`(${m(t,i?"":o)}+)`:r+="([\\s\\S]+)",n.push(c),o="",i=!1}else r+=l(c.value),o+=c.value,i||(i=c.value.includes(t))}return r}function m(e,t){return t.length<2?e.length<2?`[^${l(e+t)}]`:`(?:(?!${l(e)})[^${l(t)}])`:e.length<2?`(?:(?!${l(t)})[^${l(e)}])`:`(?:(?!${l(t)}|${l(e)})[\\s\\S])`}},181:function(e,t,n){var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype.toString,f=Math.max,m=Math.min,p=function(){return u.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function w(){var e=p();if(b(e))return x(e);s=setTimeout(w,function(e){var n=t-(e-l);return d?m(n,i-(e-c)):n}(e))}function x(e){return s=void 0,y&&r?v(e):(r=o=void 0,a)}function _(){var e=p(),n=b(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(w,t),u?v(e):a}(l);if(d)return s=setTimeout(w,t),v(l)}return void 0===s&&(s=setTimeout(w,t)),a}return t=g(t)||0,h(n)&&(u=!!n.leading,i=(d="maxWait"in n)?f(g(n.maxWait)||0,t):i,y="trailing"in n?!!n.trailing:y),_.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},_.flush=function(){return void 0===s?a:x(p())},_}},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 dp},Avatar:function(){return Uo},Badge:function(){return Fo},Breadcrumb:function(){return v_},Button:function(){return ue},ButtonGroup:function(){return ui},Checkbox:function(){return Te},Container:function(){return up},DatePicker:function(){return PN},Dialog:function(){return U_},Drawer:function(){return wS},DropdownMenu:function(){return HE},EditorInput:function(){return Sx},Input:function(){return Xo},Label:function(){return ei},Loader:function(){return ri},Menu:function(){return Yx},Pagination:function(){return HS},ProgressBar:function(){return oi},ProgressSteps:function(){return Mx},RadioButton:function(){return Mo},SearchBox:function(){return CE},Select:function(){return Yf},Sidebar:function(){return o_},Skeleton:function(){return Fx},Switch:function(){return ye},Tabs:function(){return Sf},TextArea:function(){return Vo},Title:function(){return ti},Toaster:function(){return Pm},Tooltip:function(){return xo},Topbar:function(){return J_},toast:function(){return lm}});var o={};n.r(o),n.d(o,{Button:function(){return $S},CaptionLabel:function(){return YS},Chevron:function(){return qS},Day:function(){return KS},DayButton:function(){return GS},Dropdown:function(){return XS},DropdownNav:function(){return JS},Footer:function(){return ZS},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 hk},WeekNumberHeader:function(){return gk},Weekday:function(){return mk},Weekdays:function(){return pk},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 DC},formatMonthDropdown:function(){return jC},formatWeekNumber:function(){return MC},formatWeekNumberHeader:function(){return AC},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 $C},labelNav:function(){return HC},labelNext:function(){return YC},labelPrevious:function(){return qC},labelWeekNumber:function(){return GC},labelWeekNumberHeader:function(){return XC},labelWeekday:function(){return KC},labelYearDropdown:function(){return JC}});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])=>{p(n,r,e,t)})),r},p=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return g(e)?void p(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{p(o,h(t,e),n,r)}))}else(""===e?t:h(t,e)).classGroupId=n}))},h=(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;c<e.length;c++){let u=e[c];if(0===s){if(u===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===u){a=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?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 _(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=E(e))&&(r&&(r+=" "),r+=t);return r}const E=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=E(e[r]))&&(n&&(n+=" "),n+=t);return n};const S=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},k=/^\[(?:([a-z-]+):)?(.+)\]$/i,C=/^\d+\/\d+$/,N=new Set(["px","full","screen"]),T=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,P=/\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))\(.+\)$/,D=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,j=e=>A(e)||N.has(e)||C.test(e),M=e=>K(e,"length",G),A=e=>Boolean(e)&&!Number.isNaN(Number(e)),I=e=>K(e,"number",A),F=e=>Boolean(e)&&Number.isInteger(Number(e)),L=e=>e.endsWith("%")&&A(e.slice(0,-1)),z=e=>k.test(e),B=e=>T.test(e),W=new Set(["length","size","percentage"]),V=e=>K(e,W,X),U=e=>K(e,"position",X),H=new Set(["image","url"]),$=e=>K(e,H,Z),Y=e=>K(e,"",J),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=>P.test(e)&&!O.test(e),X=()=>!1,J=e=>D.test(e),Z=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"),p=S("gradientColorStopPositions"),h=S("inset"),g=S("margin"),y=S("opacity"),v=S("padding"),b=S("saturate"),w=S("scale"),x=S("sepia"),_=S("skew"),E=S("space"),k=S("translate"),C=()=>["auto",z,t],N=()=>[z,t],T=()=>["",j,M],P=()=>["auto",A,z],O=()=>["","0",z],D=()=>[A,z];return{cacheSize:500,separator:":",theme:{colors:[q],spacing:[j,M],blur:["none","",B,z],brightness:D(),borderColor:[e],borderRadius:["none","","full",B,z],borderSpacing:N(),borderWidth:T(),contrast:D(),grayscale:O(),hueRotate:D(),invert:O(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[L,M],inset:C(),margin:C(),opacity:D(),padding:N(),saturate:D(),scale:D(),sepia:O(),skew:D(),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:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],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":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[q]}],"row-start-end":[{row:["auto",{span:[F,z]},z]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"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":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"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,M]}],"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",A,I]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",j,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",j,M]}],"underline-offset":[{"underline-offset":["auto",j,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"]},$]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"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":[j,z]}],"outline-w":[{outline:[j,M]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[j,M]}],"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:D()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:D()}],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":[_]}],"skew-y":[{"skew-y":[_]}],"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:[j,M,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 p=w(l).join(":"),h=c?p+"!":p,g=h+m;if(i.includes(g))continue;i.push(g);const y=o(m,f);for(let e=0;e<y.length;++e){const t=y[e];i.push(h+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(_.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;t<o;t++)e[t]&&(n=te(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ne(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=te(e))&&(r&&(r+=" "),r+=t);return r}var re=function(){return ee(ne.apply(void 0,arguments))},oe=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.forEach((function(e){return null==e?void 0:e.apply(void 0,n)}))}},ie=function(e){var t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},ae={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"},se=["variant","size","type","tag","className","children","disabled","destructive","icon","iconPosition","loading"];function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(null,arguments)}var ce=(0,s.forwardRef)((function(e,t){var n,r,o,i,a=e.variant,s=void 0===a?"primary":a,c=e.size,u=void 0===c?"md":c,d=e.type,f=void 0===d?"button":d,m=e.tag,p=void 0===m?"button":m,h=e.className,g=e.children,y=e.disabled,v=void 0!==y&&y,b=e.destructive,w=void 0!==b&&b,x=e.icon,_=void 0===x?null:x,E=e.iconPosition,S=void 0===E?"left":E,k=e.loading,C=void 0!==k&&k,N=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,se),T=C?"opacity-50 disabled:cursor-not-allowed":"",P=null===(n={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"})||void 0===n?void 0:n[s],O=w&&!v?null===(r={primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"})||void 0===r?void 0:r[s]:"",D=null===(o={xs:"p-1 rounded [&>svg]: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,j="";_&&(j="flex items-center justify-center","left"===S?i=_:R=_);var M=p;return l().createElement(M,le({ref:t,type:f,className:re(j,"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",D,P,O,T,h),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;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},me.apply(null,arguments)}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var he=function(e){var t=e.label,n=e.switchId,r=e.disabled,o=void 0!==r&&r,i=e.children,a=e.size;if((0,s.isValidElement)(t))return React.createElement("div",{className:re("inline-flex items-center gap-3","items-start")},i,t);var l,c,u,d,f,m=!(null!=t&&t.heading||null!=t&&t.description),p=null!=t&&t.heading&&null!=t&&t.description?"items-start":"items-center";return m?i:React.createElement("div",{className:re("inline-flex",p,"gap-3")},i,React.createElement("label",{htmlFor:n,className:re(!o&&"cursor-pointer")},(u=void 0===(c=(l=t||{}).heading)?"":c,f=void 0===(d=l.description)?"":d,React.createElement("div",{className:"space-y-1.5"},u&&React.createElement("p",{className:re("text-text-primary m-0",{sm:"text-sm leading-4 font-medium",md:"text-base leading-5 font-medium",lg:"text-lg leading-6 font-medium"}[a],o&&"text-text-disabled")},u),f&&React.createElement("p",{className:re("text-text-secondary text-sm font-normal leading-5 m-0",o&&"text-text-disabled")},f)))))},ge=(0,s.forwardRef)((function(e,t){var n,r=e.id,o=e.onChange,i=e.value,a=e.defaultValue,l=void 0!==a&&a,c=e.size,u=void 0===c?"lg":c,d=e.disabled,f=void 0!==d&&d,m=e.label,p=void 0===m?{heading:"",description:""}:m,h=e.name,g=e.className,y=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,fe),v=(0,s.useMemo)((function(){return void 0!==i}),[i]),b=(0,s.useMemo)((function(){return r||"switch-".concat(de())}),[]),w=function(e){if(Array.isArray(e))return e}(n=(0,s.useState)(l))||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)||function(e){if(e){if("string"==typeof e)return pe(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)?pe(e,2):void 0}}(n)||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.")}(),x=w[0],_=w[1],E="primary",S=(0,s.useCallback)((function(){return v?i:x}),[v,i,x]),k={primary:{input:"bg-toggle-off hover:bg-toggle-off-hover checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-4 checked:hover:bg-toggle-on border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border",toggleDial:"bg-toggle-dial-background shadow-toggleDial"}},C={lg:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},md:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"},sm:{container:"w-8 h-4",toggleDial:"size-2.5 peer-checked:translate-x-3.5"}};return React.createElement(he,{label:p,switchId:b,disabled:f,size:u},React.createElement("div",{className:re("relative inline-block cursor-pointer rounded-full shrink-0",C[u].container,g)},React.createElement("input",me({ref:t,id:b,type:"checkbox",className:re("peer appearance-none absolute bg-blue-gray-100 rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",k[E].input,f&&"bg-toggle-off-disabled disabled:border-transparent shadow-none disabled:cursor-not-allowed"),checked:S(),onChange:function(e){if(!f){var t=e.target.checked;v||_(t),"function"==typeof o&&o(t)}},disabled:f,name:h},y)),React.createElement("label",{htmlFor:b,className:re("bg-white border border-blue-gray-100 rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 left-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 before:left-2/4 before:-translate-y-2/4 before:-translate-x-2/4",C[u].toggleDial,k[E].toggleDial,f&&"peer-disabled:cursor-not-allowed")})))}));ge.displayName="Switch";var ye=ge;const ve=(...e)=>e.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},_e=xe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Ee=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;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(null,arguments)}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ne=(0,s.forwardRef)((function(e,t){var n,r,o,i=e.id,a=e.label,l=e.defaultChecked,c=void 0!==l&&l,u=e.checked,d=e.onChange,f=(e.value,e.indeterminate),m=e.disabled,p=e.size,h=void 0===p?"md":p,g=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Se),y=(0,s.useMemo)((function(){return i||"checkbox-".concat(de())}),[i]),v=(0,s.useMemo)((function(){return void 0!==u}),[u]),b=function(e){if(Array.isArray(e))return e}(o=(0,s.useState)(c||!1))||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}}(o)||function(e){if(e){if("string"==typeof e)return Ce(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)?Ce(e,2):void 0}}(o)||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.")}(),w=b[0],x=b[1],_="primary",E={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-xs",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},S={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-4 focus:ring-focus",icon:"text-white"}},k=(0,s.useCallback)((function(){return v?u:w}),[v,u,w]),C=(0,s.useCallback)((function(){return(0,s.isValidElement)(a)?a:a.heading||a.description?React.createElement("div",{className:E[h].gap},a.heading&&React.createElement("p",{className:re("text-text-primary font-medium leading-4 m-0",E[h].text,E[h].gap)},a.heading),a.description&&React.createElement("p",{className:re("text-text-secondary font-normal leading-5 m-0",E[h].description)},a.description)):null}),[a,h]);return React.createElement("div",{className:re("inline-flex items-center gap-2",!!a&&"items-start")},React.createElement("label",{className:re("relative flex items-center rounded-full p-0.5",!m&&"cursor-pointer"),htmlFor:y},React.createElement("input",ke({ref:t,id:y,type:"checkbox",className:re("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",S[_].checkbox,E[h].checkbox,m&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled"),checked:k(),onChange:function(e){if(!m){var t=e.target.checked;v||x(t),"function"==typeof d&&d(t)}},disabled:m},g)),React.createElement("span",{className:re("pointer-events-none inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",S[_].icon,m&&"peer-disabled:text-border-disabled")},f?React.createElement(_e,{className:re(null===(n=E[h])||void 0===n?void 0:n.icon)}):React.createElement(Ee,{className:re(null===(r=E[h])||void 0===r?void 0:r.icon)}))),!!a&&React.createElement("label",{className:re(!m&&"cursor-pointer"),htmlFor:y},C()))}));Ne.displayName="Checkbox";var Te=Ne;const Pe=xe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var Oe={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-4 focus:ring-focus",icon:"text-white"}},De={sm:"text-sm leading-5",md:"text-base leading-6"},Re={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},je={xs:"py-1 px-1 text-sm gap-0.5 [&>svg]: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 Me(e){return Fe(e)?(e.nodeName||"").toLowerCase():"#document"}function Ae(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 Ae(e).Node}function Le(e){return e instanceof Element||e instanceof Ae(e).Element}function ze(e){return e instanceof HTMLElement||e instanceof Ae(e).HTMLElement}function Be(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Ae(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(Me(e))}function Ue(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function He(e){const t=$e(),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 $e(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ye(e){return["html","body","#document"].includes(Me(e))}function qe(e){return Ae(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"===Me(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 Je(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=Ae(o);if(i){const e=Ze(a);return t.concat(a,a.visualViewport||[],We(o)?o:[],e&&n?Je(e):[])}return t.concat(o,Je(o,[],n))}function Ze(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 pt(e){return!!e&&"combobox"===e.getAttribute("role")&&ft(e)}const ht=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 _t(e,t,n){return gt(e,ht(t,n))}function Et(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 Tt(e){return["top","bottom"].includes(St(e))?"y":"x"}function Pt(e){return Ct(Tt(e))}function Ot(e){return e.replace(/start|end/g,(e=>xt[e]))}function Dt(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 jt(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 Mt=["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(","),At="undefined"==typeof Element,It=At?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ft=!At&&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,Mt)&&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},Ht=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},$t=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;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||Wt(t)<0||!function(e,t){return!(t.disabled||Lt(t)||function(e){return Ut(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=It.call(e,"details>summary: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 Ht(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 Ht(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<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!It.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))}(e,t))},Yt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=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:$t.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(Mt));return t&&It.call(e,Mt)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,$t.bind(null,t)),qt(n)},Gt=window.ReactDOM;function Xt(e,t,n){let{reference:r,floating:o}=e;const i=Tt(t),a=Pt(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 Jt(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}=Et(t,e),p=Rt(m),h=s[f?"floating"===d?"reference":"floating":d],g=jt(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.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=jt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-w.top+p.top)/b.y,bottom:(w.bottom-g.bottom+p.bottom)/b.y,left:(g.left-w.left+p.left)/b.x,right:(w.right-g.right+p.right)/b.x}}function Zt(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}=Zt(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=Ae(e);return $e()&&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!==Ae(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=Ae(i),t=r&&Le(r)?Ae(r):r;let n=e,o=Ze(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=Ae(o),o=Ze(n)}}return jt({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=Ae(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=$e();(!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 jt(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"!==Me(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=Ae(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)&&!He(r)?n:r||function(e){let t=Ge(e);for(;ze(t)&&!Ye(t);){if(He(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"!==Me(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=Je(e,[],!1).filter((e=>Le(e)&&"body"!==Me(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=He(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=ht(r.right,e.right),e.bottom=ht(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}=Zt(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?Je(c):[],...Je(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,ht(1,l))||1};let p=!0;function h(e){const t=e[0].intersectionRatio;if(t!==l){if(!p)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}p=!1}try{r=new IntersectionObserver(h,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(h,m)}r.observe(e)}(!0),i}(c,n):null;let f,m=-1,p=null;a&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),c&&!l&&p.observe(c),p.observe(t));let h=l?rn(e):null;return l&&function t(){const r=rn(e);!h||r.x===h.x&&r.y===h.y&&r.width===h.width&&r.height===h.height||n(),h=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=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(f)}}const pn=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"===Tt(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=Et(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof p&&(m="end"===s?-1*p:p),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}}}}},hn=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}=Et(e,t),c={x:n,y:r},u=await Jt(t,l),d=Tt(St(o)),f=Ct(d);let m=c[f],p=c[d];if(i){const e="y"===f?"bottom":"right";m=_t(m+u["y"===f?"top":"left"],m,m-u[e])}if(a){const e="y"===d?"bottom":"right";p=_t(p+u["y"===d?"top":"left"],p,p-u[e])}const h=s.fn({...t,[f]:m,[d]:p});return{...h,data:{x:h.x-n,y:h.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:p="none",flipAlignment:h=!0,...g}=Et(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=St(o),v=Tt(s),b=St(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!h?[Dt(s)]:function(e){const t=Dt(e);return[Ot(e),t,Ot(t)]}(s)),_="none"!==p;!f&&_&&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,h,p,w));const E=[s,...x],S=await Jt(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=Pt(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=Dt(a)),[a,Dt(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,T;const e=((null==(N=i.flip)?void 0:N.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(T=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(m){case"bestFit":{var P;const e=null==(P=C.filter((e=>{if(_){const t=Tt(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:P[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}=Et(e,t),l=await Jt(t,s),c=St(n),u=kt(n),d="y"===Tt(n),{width:f,height:m}=r.floating;let p,h;"top"===c||"bottom"===c?(p=c,h=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(h=c,p="end"===u?"top":"bottom");const g=m-l.top-l.bottom,y=f-l.left-l.right,v=ht(m-l[p],g),b=ht(f-l[h],y),w=!t.middlewareData.shift;let x=v,_=b;if(d?_=u||w?ht(b,y):y:x=u||w?ht(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?_=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:_,availableHeight:x});const E=await o.getDimensions(i.floating);return f!==E.width||m!==E.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}=Et(e,t)||{};if(null==c)return{};const d=Rt(u),f={x:n,y:r},m=Pt(o),p=Nt(m),h=await a.getDimensions(c),g="y"===m,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[m]-f[m]-i.floating[p],x=f[m]-i.reference[m],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let E=_?_[b]:0;E&&await(null==a.isElement?void 0:a.isElement(_))||(E=s.floating[b]||i.floating[p]);const S=w/2-x/2,k=E/2-h[p]/2-1,C=ht(d[y],k),N=ht(d[v],k),T=C,P=E-h[p]-N,O=E/2-h[p]/2+S,D=_t(T,O,P),R=!l.arrow&&null!=kt(o)&&O!==D&&i.reference[p]/2-(O<T?C:N)-h[p]/2<0,j=R?O<T?O-T:O-P:0;return{[m]:f[m]+j,data:{[m]:D,centerOffset:O-D-j,...R&&{alignmentOffset:j}},reset:R}}});var bn="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;function wn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!wn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||wn(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function xn(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _n(e,t){const n=xn(e);return Math.round(t*n)/n}function En(e){const t=s.useRef(e);return bn((()=>{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)=>({...pn(e),options:[e,t]}),Cn=(e,t)=>({...hn(e),options:[e,t]}),Nn=(e,t)=>({...gn(e),options:[e,t]}),Tn=(e,t)=>({...yn(e),options:[e,t]}),Pn={...s},On=Pn.useInsertionEffect||(e=>e());function Dn(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;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}const Rn="ArrowUp",jn="ArrowDown",Mn="ArrowLeft",An="ArrowRight";function In(e,t,n){return Math.floor(e/t)!==n}function Fn(e,t){return t<0||t>=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 Hn=0;function $n(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Hn);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Hn=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<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qn.apply(this,arguments)}let Kn=!1,Gn=0;const Xn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Gn++,Jn=Pn.useId||function(){const[e,t]=s.useState((()=>Kn?Xn():void 0));return Yn((()=>{null==e&&t(Xn())}),[]),s.useEffect((()=>{Kn=!0}),[]),e},Zn=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:p,...h}={},...g}=e,y=Jn(),[v,b]=s.useState(!1);if(Yn((()=>{r&&"rtl"===qe(r).direction&&b(!0)}),[r]),!r)return null;const[w,x]=n.split("-"),_="top"===w||"bottom"===w;let E=d;(_&&null!=i&&i.x||!_&&null!=i&&i.y)&&(E=null);const S=2*u,k=S/2,C=a/2*(c/-8+1),N=l/2*c/4,T=!!m,P=E&&"end"===x?"bottom":"top";let O=E&&"end"===x?"right":"left";E&&v&&(O="end"===x?"left":"right");const D=null!=(null==o?void 0:o.x)?E||o.x:"",R=null!=(null==o?void 0:o.y)?E||o.y:"",j=m||"M0,0 H"+a+" L"+(a-C)+","+(l-N)+" Q"+a/2+","+l+" "+C+","+(l-N)+" Z",M={top:T?"rotate(180deg)":"",left:T?"rotate(90deg)":"rotate(-90deg)",bottom:T?"":"rotate(180deg)",right:T?"rotate(-90deg)":"rotate(90deg)"}[w];return s.createElement("svg",qn({},g,{"aria-hidden":!0,ref:t,width:T?a:a+S,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[O]:D,[P]:R,[w]:_||T?"100%":"calc(100% - "+S/2+"px)",transform:""+M+(null!=p?p:""),...h}}),S>0&&s.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:S+(m?0:1),d:j}),s.createElement("path",{stroke:S&&!m?g.fill:"none",d:j}),s.createElement("clipPath",{id:y},s.createElement("rect",{x:-k,y:k*(T?-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"!==Me(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 pr=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function hr(e,t){const n=Kt(e,pr());"prev"===t&&n.reverse();const r=n.indexOf(Qe(ct(e)));return n.slice(r+1)[0]}function gr(){return hr(document.body,"next")}function yr(){return hr(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,pr()).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 _r(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const Er=s.forwardRef((function(e,t){const[n,r]=s.useState();Yn((()=>(it()&&r("button"),document.addEventListener("keydown",_r),()=>{document.removeEventListener("keydown",_r)})),[]);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=Jn(),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,p=null==a?void 0:a.open,h=!!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&&(p||wr(i))}),[p,i]),s.createElement(Sr.Provider,{value:s.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:f,portalNode:i,setFocusManagerState:l})),[o,i])},h&&i&&s.createElement(Er,{"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()}}}),h&&i&&s.createElement("span",{"aria-owns":i.id,style:xr}),i&&Gt.createPortal(t,i),h&&i&&s.createElement(Er,{"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),Tr="data-floating-ui-focusable";function Pr(e){return e?e.hasAttribute(Tr)?e:e.querySelector("["+Tr+"]")||e:null}let Or=[];function Dr(e){Or=Or.filter((e=>e.isConnected));let t=e;if(t&&"body"!==Me(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==It.call(e,Mt)&&$t(t,e)}(t,pr())){const e=Kt(t,pr())[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 jr=s.forwardRef((function(e,t){return s.createElement("button",qn({},e,{type:"button",ref:t,tabIndex:-1,style:xr}))}));function Mr(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:p,nodeId:h,onOpenChange:g,events:y,dataRef:v,floatingId:b,elements:{domReference:w,floating:x}}=t,_="number"==typeof a&&a<0,E=pt(w)&&_,S=!("undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype)||i,k=or(o),C=or(a),N=or(l),T=nr(),P=Nr(),O=s.useRef(null),D=s.useRef(null),R=s.useRef(!1),j=s.useRef(!1),M=s.useRef(-1),A=null!=P,I=Pr(x),F=Dn((function(e){return void 0===e&&(e=I),e?Kt(e,pr()):[]})),L=Dn((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(jr,{ref:"start"===e?O:D,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&&!E&&mt(e);const t=L(),n=dt(e);"reference"===k.current[0]&&n===w&&(mt(e),e.shiftKey?$n(t[t.length-1]):$n(t[1])),"floating"===k.current[1]&&n===I&&e.shiftKey&&(mt(e),$n(t[0]))}}const t=ct(I);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,w,I,u,k,E,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&&(M.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(){j.current=!0,setTimeout((()=>{j.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(et(w,t)||et(x,t)||et(t,x)||et(null==P?void 0:P.portalNode,t)||null!=t&&t.hasAttribute(rr("focus-guard"))||T&&(sr(T.nodesRef.current,h).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}(T.nodesRef.current,h).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=M.current,t=F(),n=t[e]||t[t.length-1]||I;ze(n)&&n.focus()}!E&&u||!t||!n||j.current||t===Rr()||(R.current=!0,g(!1,e,"focus-out"))}))}}),[r,w,x,I,u,h,T,P,g,f,c,F,E]),s.useEffect((()=>{var e;if(r)return;const t=Array.from((null==P||null==(e=P.portalNode)?void 0:e.querySelectorAll("["+rr("portal")+"]"))||[]);if(x){const e=[x,...t,O.current,D.current,k.current.includes("reference")||E?w:null].filter((e=>null!=e)),n=u||E?mr(e,S,!S):mr(e);return()=>{n()}}}),[r,w,x,u,k,P,E,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);_||o||!m||$n(r,{preventScroll:r===I})}))}),[r,m,I,_,L,C]),Yn((()=>{if(r||!I)return;let e=!1;const t=ct(I),n=Qe(t);let o=v.current.openEvent;const i=p.domReference.current;function a(t){let{open:n,reason:r,event:i,nested:a}=t;n&&(o=i),"escape-key"===r&&p.domReference.current&&Dr(p.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 Dr(n),y.on("openchange",a),()=>{y.off("openchange",a);const r=Qe(t),s=et(x,r)||T&&sr(T.nodesRef.current,h).some((e=>{var t;return et(null==(t=e.context)?void 0:t.elements.floating,r)}));(s||o&&["click","mousedown"].includes(o.type))&&p.domReference.current&&Dr(p.domReference.current);const l=i||n,c=Kt(ct(l).body,pr());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,p,y,T,h]),Yn((()=>{if(!r&&P)return P.setFocusManagerState({modal:u,closeOnFocusOut:f,open:m,onOpenChange:g,refs:p}),()=>{P.setFocusManagerState(null)}}),[r,P,u,m,g,p,f]),Yn((()=>{if(r)return;if(!I)return;if("function"!=typeof MutationObserver)return;if(_)return;const e=()=>{const e=I.getAttribute("tabindex"),t=F(),n=Qe(ct(x)),r=t.indexOf(n);-1!==r&&(M.current=r),k.current.includes("floating")||n!==p.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,p,k,F,_]);const B=!r&&S&&(!u||!E)&&(A||u);return s.createElement(s.Fragment,null,B&&s.createElement(Er,{"data-type":"inside",ref:null==P?void 0:P.beforeInsideRef,onFocus:e=>{if(u){const e=L();$n("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(R.current=!1,vr(e,P.portalNode)){const e=gr()||w;null==e||e.focus()}else{var t;null==(t=P.beforeOutsideRef.current)||t.focus()}}}),!E&&z("start"),n,z("end"),B&&s.createElement(Er,{"data-type":"inside",ref:null==P?void 0:P.afterInsideRef,onFocus:e=>{if(u)$n(L()[0]);else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(f&&(R.current=!0),vr(e,P.portalNode)){const e=yr()||w;null==e||e.focus()}else{var t;null==(t=P.afterOutsideRef.current)||t.focus()}}}))}function Ar(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),p=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||Ar(e)||(" "!==e.key||Ir(i)||(e.preventDefault(),m.current=!0),"Enter"===e.key&&r(!n||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Ar(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:p}:{}),[a,p])}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:p,capture:h}=t,g=nr(),y=Dn("function"==typeof c?c:()=>!1),v="function"==typeof c?y:c,b=s.useRef(!1),w=s.useRef(!1),{escapeKey:x,outsidePress:_}=Br(p),{escapeKey:E,outsidePress:S}=Br(h),k=Dn((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=Dn((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=Dn((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 p=g?sr(g.nodesRef.current,f):[];if(p.length>0){let e=!0;if(p.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),T=Dn((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=_;const t=ct(o.floating);l&&t.addEventListener("keydown",E?C:k,E),v&&t.addEventListener(u,S?T:N,S);let s=[];return m&&(Le(o.domReference)&&(s=Je(o.domReference)),Le(o.floating)&&(s=s.concat(Je(o.floating))),!Le(o.reference)&&o.reference&&o.reference.contextElement&&(s=s.concat(Je(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",E?C:k,E),v&&t.removeEventListener(u,S?T:N,S),s.forEach((t=>{t.removeEventListener("scroll",e)}))}}),[i,o,l,v,u,n,r,m,a,x,_,k,E,C,N,S,T]),s.useEffect((()=>{b.current=!1}),[v,u]);const P=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:P,floating:O}:{}),[a,P,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=Jn(),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=Dn(((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,p]=s.useState(r);wn(m,r)||p(r);const[h,g]=s.useState(null),[y,v]=s.useState(null),b=s.useCallback((e=>{e!==E.current&&(E.current=e,g(e))}),[]),w=s.useCallback((e=>{e!==S.current&&(S.current=e,v(e))}),[]),x=i||h,_=a||y,E=s.useRef(null),S=s.useRef(null),k=s.useRef(d),C=null!=c,N=En(c),T=En(o),P=s.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:m};T.current&&(e.platform=T.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={},p=0;for(let n=0;n<s.length;n++){const{name:i,fn:h}=s[n],{x:g,y:y,data:v,reset:b}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,m={...m,[i]:{...m[i],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Xt(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})})(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};O.current&&!wn(k.current,t)&&(k.current=t,Gt.flushSync((()=>{f(t)})))}))}),[m,t,n,T]);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&&(E.current=x),_&&(S.current=_),x&&_){if(N.current)return N.current(x,_,P);P()}}),[x,_,P,N,C]);const D=s.useMemo((()=>({reference:E,floating:S,setReference:b,setFloating:w})),[b,w]),R=s.useMemo((()=>({reference:x,floating:_})),[x,_]),j=s.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=_n(R.floating,d.x),r=_n(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:P,refs:D,elements:R,floatingStyles:j})),[d,P,D,R,j])}({...e,elements:{...o,...l&&{reference:l}}}),p=s.useCallback((e=>{const t=Le(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),m.refs.setReference(t)}),[m.refs]),h=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:h,setPositionReference:p,domReference:d})),[m.refs,h,p]),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",Hr="selected";function $r(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Ur]:t,[Hr]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Tr]:""},...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,Hr].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;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...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=>$r(t,e,"reference")),t),i=s.useCallback((t=>$r(t,e,"floating")),n),a=s.useCallback((t=>$r(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===jn,e===Mn||e===An)}function Xr(e,t,n){return Kr(t,e===jn,n?e===Mn:e===An)||"Enter"===e||" "===e||""===e}function Jr(e,t,n){return Kr(t,n?e===An:e===Mn,e===Rn)}const Zr=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=Zr.get(a))?n:a,c=Jn(),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,[p,h]=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&&h((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===y&&h({transitionProperty:Object.keys(r).map(eo).join(","),transitionDuration:f+"ms",...n,...r}),"close"===y){const r=t||e;h({transitionProperty:Object.keys(r).map(eo).join(","),transitionDuration:m+"ms",...n,...r})}}),[m,w,v,b,x,f,y,u]),{isMounted:g,styles:p}}function ro(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e<i;a=e++){const[i,s]=t[e]||[0,0],[l,c]=t[a]||[0,0];s>=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:p}=e;return function(e){function h(){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),_=et(d.domReference,b),E=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,T=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,E),P=S.width>E.width,O=S.height>E.height,D=(P?E:S).left,R=(P?E:S).right,j=(O?E:S).top,M=(O?E:S).bottom;if(x&&(i=!0,!w))return;if(_&&(i=!1),_&&!w)return void(i=!0);if(w&&Le(e.relatedTarget)&&et(d.floating,e.relatedTarget))return;if(p&&sr(p.nodesRef.current,m).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===k&&c>=E.bottom-1||"bottom"===k&&c<=E.top+1||"left"===k&&n>=E.right-1||"right"===k&&n<=E.left+1)return h();let A=[];switch(k){case"top":A=[[D,E.top+1],[D,S.bottom-1],[R,S.bottom-1],[R,E.top+1]];break;case"bottom":A=[[D,S.top+1],[D,E.bottom-1],[R,E.bottom-1],[R,S.top+1]];break;case"left":A=[[S.right-1,M],[S.right-1,j],[E.left+1,j],[E.left+1,M]];break;case"right":A=[[E.right-1,M],[E.right-1,j],[S.left+1,j],[S.left+1,M]]}if(!ro([g,y],A)){if(i&&!T)return h();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 h()}ro([g,y],function(e){let[n,r]=e;switch(k){case"top":return[[P?n+t/2:C?n+4*t:n-4*t,r+t+1],[P?n-t/2:C?n+4*t:n-4*t,r+t+1],[S.left,C||P?S.bottom-t:S.top],[S.right,C?P?S.bottom-t:S.top:S.bottom-t]];case"bottom":return[[P?n+t/2:C?n+4*t:n-4*t,r-t],[P?n-t/2:C?n+4*t:n-4*t,r-t],[S.left,C||P?S.top+t:S.bottom],[S.right,C?P?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(h,40)):h()}}};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(Pe,{className:re(l,c)}),info:React.createElement(Pe,{className:re(l,c)}),success:React.createElement(Ee,{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)},po=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}};function ho(e){return ho="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},ho(e)}function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},go.apply(null,arguments)}function yo(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 vo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yo(Object(n),!0).forEach((function(t){bo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bo(e,t,n){return(t=function(e){var t=function(e){if("object"!=ho(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ho(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ho(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var xo=function(e){var t,n,r,o=e.variant,i=void 0===o?"dark":o,a=e.placement,c=void 0===a?"bottom":a,u=e.title,d=void 0===u?"":u,f=e.content,m=e.arrow,p=void 0!==m&&m,h=e.open,g=e.setOpen,y=e.children,v=e.className,b=e.tooltipPortalRoot,w=void 0===b?null:b,x=e.tooltipPortalId,_=void 0===x?"":x,E=e.boundary,S=void 0===E?"clippingAncestors":E,k=e.strategy,C=void 0===k?"fixed":k,N=e.offset,T=void 0===N?8:N,P=e.triggers,O=void 0===P?["hover","focus"]:P,D=e.interactive,R=void 0!==D&&D,j=(0,s.useMemo)((function(){return"boolean"==typeof h&&"function"==typeof g}),[h,g]),M=function(e){if(Array.isArray(e))return e}(r=(0,s.useState)(!1))||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}}(r)||function(e){if(e){if("string"==typeof e)return wo(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)?wo(e,2):void 0}}(r)||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.")}(),A=M[0],I=M[1],F=(0,s.useRef)(null),L=Vr({open:j?h:A,onOpenChange:j?g:I,placement:c,strategy:C,middleware:[kn(T),Nn({boundary:S}),Cn({boundary:S}),(n={element:F},{...Sn(n),options:[n,void 0]})],whileElementsMounted:mn}),z=L.refs,B=L.floatingStyles,W=L.context,V=Fr(W,{enabled:!j&&O.includes("click")}),U=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:l=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:m=!0}=t,p=nr(),h=tr(),g=or(u),y=or(c),v=or(n),b=s.useRef(),w=s.useRef(-1),x=s.useRef(),_=s.useRef(-1),E=s.useRef(!0),S=s.useRef(!1),k=s.useRef((()=>{})),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(_.current),E.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]),T=Dn((()=>{k.current(),x.current=void 0})),P=Dn((()=>{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),E.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(_.current),g.current&&o.current.floatingContext){n||clearTimeout(w.current),x.current=g.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){P(),T(),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:p,x:e.clientX,y:e.clientY,onClose(){P(),T(),N(e)}})(e))}}),[a,l,e,d,f,m,N,T,P,r,n,v,p,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==p||null==(t=p.nodesRef.current.find((e=>e.id===h)))||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,h,a,p,g,C]),Yn((()=>{n||(b.current=void 0,T(),P())}),[n,T,P]),s.useEffect((()=>()=>{T(),clearTimeout(w.current),clearTimeout(_.current),P()}),[l,a.domReference,T,P]);const O=s.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){E.current||v.current||r(!0,t,"hover")}d&&!lt(b.current)||n||0===f||(clearTimeout(_.current),"touch"===b.current?o():_.current=window.setTimeout(o,f))}}}),[d,r,n,v,f]),D=s.useMemo((()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(e){N(e.nativeEvent,!1)}})),[N]);return s.useMemo((()=>l?{reference:O,floating:D}:{}),[l,O,D])}(W,vo({move:!1,enabled:!j&&O.includes("hover")},R&&{handleClose:oo()})),H=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=Ae(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:!j&&O.includes("focus")}),$=Yr([V,U,H,Wr(W),Qr(W,{role:"tooltip"})]),Y=$.getReferenceProps,q=$.getFloatingProps,K=no(W,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),G=K.isMounted,X=K.styles,J=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],Z="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:po(y.ref,z.setReference),className:re(y.props.className)},Y())),l().createElement(Cr,{id:_,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",J,"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)),p&&l().createElement(Zn,{ref:F,context:W,placement:c,className:re("fill-current",Z)}))))},_o=["id","label","value","children","disabled","icon","inlineIcon","hideSelection","reversePosition","borderOn","borderOnActive","badgeItem","useSwitch","info","minWidth"],Eo=["id","children","value","disabled","size"];function So(){return So=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},So.apply(null,arguments)}function ko(e){return ko="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},ko(e)}function Co(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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function No(e,t){if(e){if("string"==typeof e)return To(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?To(e,t):void 0}}function To(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Po=(0,s.createContext)(),Oo=function(){return(0,s.useContext)(Po)},Do=function(e){var t,n=e.children,r=e.name,o=e.style,i=void 0===o?"simple":o,a=e.size,c=void 0===a?"md":a,u=e.value,d=e.defaultValue,f=e.by,m=void 0===f?"id":f,p=e.as,h=void 0===p?"div":p,g=e.onChange,y=e.className,v=e.disableGroup,b=void 0!==v&&v,w=e.vertical,x=void 0!==w&&w,_=e.columns,E=void 0===_?4:_,S=e.multiSelection,k=void 0!==S&&S,C=e.gapClassname,N=void 0===C?"gap-2":C,T=(0,s.useMemo)((function(){return void 0!==u}),[u]),P=(0,s.useMemo)((function(){return r||"radio-button-group-".concat(de())}),[r]);t=T?u:k?null!=d?d:[]:d;var O,D=function(e){if(Array.isArray(e))return e}(O=(0,s.useState)(t))||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}}(O)||No(O,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.")}(),R=D[0],j=D[1],M=(0,s.useCallback)((function(e){if(k)j((function(t){var n=t.includes(e)?t.filter((function(t){return t!==e})):[].concat(function(e){return function(e){if(Array.isArray(e))return To(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||No(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]);return"function"==typeof g&&g(n),n}));else{if(T||j(e),"function"!=typeof g)return;g(e)}}),[g]);y=re("grid grid-cols-4",ae[E],N,"tile"===i&&"gap-0",x&&"grid-cols-1",y);var A=re("tile"===i?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",y),I=function(){return l().createElement(Po.Provider,{value:{name:P,value:T?u:R,by:m,onChange:M,isControlled:T,disableAll:b,style:i,columns:E,multiSelection:k,size:c}},l().Children.map(n,(function(e){return(0,s.isValidElement)(e)?e:null})))};return l().createElement(l().Fragment,null,"tile"===i?l().createElement("div",{className:A},I()):l().createElement(h,h===s.Fragment?{}:{className:y},I()))};Do.displayName="RadioButton.Group";var Ro=(0,s.forwardRef)((function(e,t){var n,r,o=e.id,i=e.label,a=e.value,c=e.children,u=e.disabled,d=e.icon,f=void 0===d?null:d,m=e.inlineIcon,p=void 0!==m&&m,h=e.hideSelection,g=void 0!==h&&h,y=e.reversePosition,v=void 0!==y&&y,b=e.borderOn,w=void 0!==b&&b,x=e.borderOnActive,_=void 0===x||x,E=e.badgeItem,S=void 0===E?null:E,k=e.useSwitch,C=void 0!==k&&k,N=e.info,T=void 0===N?null:N,P=e.minWidth,O=void 0===P||P,D=Co(e,_o),R=D.buttonWrapperClasses,j=Oo(),M=j.name,A=j.value,I=j.by,F=j.onChange,L=j.disableAll,z=j.checked,B=j.multiSelection,W=j.size,V="primary",U=(0,s.useMemo)((function(){return o||"radio-button-".concat(de())}),[o]),H=(0,s.useMemo)((function(){return L||u}),[L,u]),$=(0,s.useMemo)((function(){return B?Array.isArray(A)&&A.includes(a):void 0!==z?z:ko(A)===ko(a)&&("string"==typeof A?A===a:Array.isArray(A)?A.includes(a):A[I]===a[I])}),[A,a,z]),Y=(0,s.useCallback)((function(){return(0,s.isValidElement)(i)?i:i.heading?l().createElement("div",{className:re(!p&&"space-y-1.5 mt-[2px]",v&&(C?"ml-10":"ml-4"),p&&"flex gap-2",p&&!i.description&&"items-center")},f&&l().createElement(l().Fragment,null,f),l().createElement("div",{className:re("space-y-1.5")},l().createElement("p",{className:re("text-text-primary font-medium m-0",De[W],u&&"text-text-disabled cursor-not-allowed")},i.heading),i.description&&l().createElement("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0"},i.description))):null}),[i]);if("tile"===j.style)return l().createElement(jo,{id:o,label:i,value:a,disabled:u,size:W},c);var q=function(){H||(B?C&&F(a,!$):F(a))};return l().createElement("label",{className:re("inline-flex items-center relative cursor-pointer transition-all duration-300",!!i&&"items-start justify-between",O&&"min-w-[180px]",w&&"border border-border-subtle border-solid rounded-md shadow-sm hover:ring-2 hover:ring-border-interactive",_&&w&&$&&"ring-2 ring-border-interactive","sm"===W?"px-3 py-3":"px-4 py-4","pr-12",H&&"cursor-not-allowed opacity-40",R),htmlFor:U,onClick:q},!!i&&l().createElement("label",{className:re("cursor-pointer",H&&"cursor-not-allowed"),htmlFor:U},Y()),!!T&&l().createElement("div",{className:"absolute mr-0.5 bottom-1.5 right-3"},l().createElement(xo,{arrow:!0,triggers:["hover","focus"],placement:"top",title:null==T?void 0:T.heading,content:null==T?void 0:T.description},l().createElement(Pe,{className:re("text-text-primary",null===(n=Re[W])||void 0===n?void 0:n.info)}))),l().createElement("label",{className:re("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",v&&"left-0",H&&"cursor-not-allowed",p&&"mr-3"),onClick:q},!!S&&S,!g&&(C?l().createElement(ye,{defaultValue:!1,size:"md"===W?"lg":"sm",onChange:function(){B?F(a,!$):F(a)},checked:$}):l().createElement("span",{className:"relative p-0.5"},l().createElement("input",So({ref:t,id:U,type:B?"checkbox":"radio",className:re("peer flex relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",!B&&"rounded-full",Oe[V].checkbox,Re[W].checkbox,H&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed"),name:M,value:a,onChange:function(e){return F(e.target.value)},checked:$,disabled:H},D)),l().createElement("span",{className:re("inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",Oe[V].icon,H&&"peer-disabled:text-border-disabled cursor-not-allowed")},B?l().createElement(Ee,{className:"sm"===W?"size-3":"size-4"}):l().createElement("div",{className:re("rounded-full bg-current","sm"===W&&"mt-[0.5px]",null===(r=Re[W])||void 0===r?void 0:r.icon)}))))))}));Ro.displayName="RadioButton.Button";var jo=function(e){var t=e.id,n=e.children,r=e.value,o=e.disabled,i=e.size,a=void 0===i?"md":i,c=Co(e,Eo),u=Oo()||{},d=u.name,f=u.value,m=u.by,p=u.onChange,h=u.disableAll,g=u.checked,y=(0,s.useMemo)((function(){return t||"radio-button-".concat(de())}),[t]),v=(0,s.useMemo)((function(){return h||o}),[h,o]),b=(0,s.useMemo)((function(){return void 0!==g?g:ko(f)===ko(r)&&("string"==typeof f?f===r:Array.isArray(f)?f.includes(r):f[m]===r[m])}),[f,r,g,m]),w=re("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",v?"text-text-disabled cursor-not-allowed":"",je[a],"border-0 border-r border-border-subtle border-solid");return l().createElement(l().Fragment,null,l().createElement("button",So({type:"button",id:y,className:re(w,"first:rounded-tl first:rounded-bl first:border-0 first:border-r first:border-border-subtle last:rounded-tr last:rounded-br last:border-0",b&&"bg-button-disabled"),onClick:function(){p&&p(r)},disabled:v},c),l().createElement("input",{type:"hidden",value:r,name:d,checked:b,onChange:p}),n))},Mo=Object.assign(Ro,{Group:Do,Button:Ro});const Ao=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Io=(0,s.forwardRef)((function(e,t){var n=e.label,r=void 0===n?"":n,o=e.size,i=void 0===o?"sm":o,a=e.className,s=void 0===a?"":a,l=e.type,c=void 0===l?"pill":l,u=e.variant,d=void 0===u?"neutral":u,f=e.icon,m=void 0===f?null:f,p=e.disabled,h=void 0!==p&&p,g=e.onClose,y=void 0===g?function(){}:g,v=e.closable,b=void 0!==v&&v,w=e.onMouseDown,x=void 0===w?function(){}:w,_={neutral:"bg-badge-background-gray hover:bg-badge-hover-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red hover:bg-badge-hover-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow hover:bg-badge-hover-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green hover:bg-badge-hover-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky hover:bg-badge-hover-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse hover:bg-badge-hover-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled hover:bg-badge-hover-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"},E="",S="group relative justify-center flex items-center cursor-pointer",k={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return h?(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",E,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:h?null:y,onMouseDown:x,role:"button",tabIndex:0},React.createElement("span",{className:"sr-only"},"Remove ".concat(r)),React.createElement(Ao,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;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zo.apply(null,arguments)}function Bo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Wo=(0,s.forwardRef)((function(e,t){var n,r=e.id,o=e.defaultValue,i=void 0===o?"":o,a=e.value,l=e.size,c=void 0===l?"sm":l,u=e.className,d=void 0===u?"":u,f=e.disabled,m=void 0!==f&&f,p=e.onChange,h=void 0===p?function(){}:p,g=e.error,y=void 0!==g&&g,v=e.onError,b=void 0===v?function(){}:v,w=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Lo),x=(0,s.useMemo)((function(){return r||"input-textarea-".concat(de())}),[r]),_=(0,s.useMemo)((function(){return void 0!==a}),[a]),E=function(e){if(Array.isArray(e))return e}(n=(0,s.useState)(i))||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)||function(e){if(e){if("string"==typeof e)return Bo(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)?Bo(e,2):void 0}}(n)||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.")}(),S=E[0],k=E[1],C=(0,s.useCallback)((function(){return _?a:S}),[_,a,S]),N=m?"hover:border-border-disabled":"hover:border-border-strong",T=y?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"",P=m?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"";return React.createElement("textarea",zo({ref:t,id:x,className:re("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none",P,{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[c],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",N,T,d),disabled:m,onChange:function(e){if(!m){var t=e.target.value;_||k(t),"function"==typeof h&&h(t)}},onInvalid:b,value:C()},w))}));Wo.displayName="TextArea";var Vo=Wo,Uo=function(e){var t,n,r,o,i=e.variant,a=void 0===i?"primary":i,s=e.size,l=void 0===s?"md":s,c=e.border,u=void 0===c?"subtle":c,d=e.url,f=void 0===d?"":d,m=e.children,p=e.className,h=null===(t={white:"text-text-primary bg-background-primary",gray:"text-text-primary bg-background-secondary",primary:"text-text-on-color bg-background-brand",primaryLight:"text-text-primary bg-brand-background-50",dark:"text-text-on-color bg-button-secondary"})||void 0===t?void 0:t[a],g=null===(n={xxs:"size-5 [&>svg]: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&&h,g,y,v,p),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 Ho=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 $o=["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;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yo.apply(null,arguments)}function qo(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)||function(e,t){if(e){if("string"==typeof e)return Ko(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ko(e,t):void 0}}(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 Ko(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Go=(0,s.forwardRef)((function(e,t){var n=e.id,r=e.type,o=void 0===r?"text":r,i=e.defaultValue,a=void 0===i?"":i,l=e.value,c=e.size,u=void 0===c?"sm":c,d=e.className,f=void 0===d?"":d,m=e.disabled,p=void 0!==m&&m,h=e.onChange,g=void 0===h?function(){}:h,y=e.error,v=void 0!==y&&y,b=e.onError,w=void 0===b?function(){}:b,x=e.prefix,_=void 0===x?null:x,E=e.suffix,S=void 0===E?null:E,k=e.label,C=void 0===k?"":k,N=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,$o),T=(0,s.useRef)(null),P=(0,s.useMemo)((function(){return n||"input-".concat(o,"-").concat(de())}),[n]),O=(0,s.useMemo)((function(){return void 0!==l}),[l]),D=qo((0,s.useState)(a),2),R=D[0],j=D[1],M=qo((0,s.useState)(null),2),A=M[0],I=M[1],F=(0,s.useCallback)((function(){return O?l:R}),[O,l,R]),L=function(e){var t;p||("file"===o?(t=e.target.files).length>0?I(t[0].name):I(null):t=e.target.value,O||"file"===o||j(t),"function"==typeof g&&g(t))},z=function(){I(null),T.current&&(T.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"},H={sm:_?"pl-8":"",md:_?"pl-9":"",lg:_?"pl-10":""},$={sm:S?"pr-8":"",md:S?"pr-9":"",lg:S?"pr-10":""},Y=p?"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=p?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",J=p?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",Z="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=p?"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=A?"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:P},C),React.createElement("div",{className:re("w-full relative flex focus-within:z-10",f)},React.createElement("input",Yo({ref:t,id:P,type:"file",className:re(B,J,W[u],U[u],q,Y,G,te),disabled:p,onChange:L,onInvalid:w},N)),React.createElement("div",{className:re(Q,"right-0 pr-3",ee[u])},React.createElement(Ho,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:P},C),React.createElement("div",{className:re("w-full relative flex focus-within:z-10",f)},_?React.createElement("div",{className:re(Z,"left-0 pl-3",U[u])},_):null,React.createElement("input",Yo({ref:T,id:P,type:o,className:re(B,X,W[u],U[u],H[u],$[u],q,Y,K),disabled:p,onChange:L,onInvalid:w,value:F()},N)),"file"===o?A?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(Ao,null)):React.createElement("div",{className:re(Q,"right-0 pr-3",ee[u])},React.createElement(Ho,null)):S?React.createElement("div",{className:re(Z,"right-0 pr-3",U[u])},S):null))}));Go.displayName="Input";var Xo=Go,Jo=["children","tag","size","className","variant","required"];function Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zo.apply(null,arguments)}var Qo=(0,s.forwardRef)((function(e,t){var n=e.children,r=void 0===n?null:n,o=e.tag,i=void 0===o?"label":o,a=e.size,s=void 0===a?"sm":a,c=e.className,u=void 0===c?"":c,d=e.variant,f=void 0===d?"neutral":d,m=e.required,p=void 0!==m&&m,h=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Jo);if(!r)return null;var g="";p&&(g="after:content-['*'] after:text-field-required after:ml-0.5");var y=i;return l().createElement(y,Zo({ref:t,className:re("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]: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)},h),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,p=void 0===m?"":m,h={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:p},React.createElement("div",null,a&&"left"===l&&React.createElement("div",{className:re("flex items-center",h[f])},a,g()),a&&"right"===l&&React.createElement("div",{className:re("flex items-center",h[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:p},a&&"left"===l&&React.createElement("div",{className:re("flex items-center",h[f])},a,g()),a&&"right"===l&&React.createElement("div",{className:re("flex items-center",h[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;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ai.apply(null,arguments)}var si=(0,s.createContext)(),li=(0,s.forwardRef)((function(e,t){var n=(0,s.useContext)(si),r=e.slug,o=e.text,i=e.icon,a=e.className,c=e.disabled,u=void 0!==c&&c,d=e.isFirstChild,f=e.isLastChild,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;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ii);if(!n)throw new Error("Button should be used inside Button Group");var p=n.activeItem,h=n.onChange,g=n.size,y=n.iconPosition,v=re("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",u?"text-text-disabled cursor-not-allowed":"",{xs:"py-1 px-1 text-sm gap-0.5 [&>svg]: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",p===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){h(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<n;r++)if(t[r]!==e[r])return!1;return!0}function pi(e){return"string"==typeof e||Array.isArray(e)}function hi(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function gi(e,t,n,r){if("function"==typeof t){const[o,i]=hi(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]=hi(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),_i=e=>1e3*e,Ei=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 Ti(e,t){return e[t]||e.default||e}const Pi=e=>null!==e;function Oi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Pi),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}const Di=e=>e,Ri=["read","resolveKeyframes","update","preRender","render","postRender"];function ji(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<Ri.length;t++)a[Ri[t]].cancel(e)},state:o,steps:a}}const{schedule:Mi,cancel:Ai,state:Ii,steps:Fi}=ji("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Di,!0),Li=e=>/^0[^.\s]+$/u.test(e);let zi=Di,Bi=Di;const Wi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Vi=e=>t=>"string"==typeof t&&t.startsWith(e),Ui=Vi("--"),Hi=Vi("var(--"),$i=e=>!!Hi(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 $i(o)?Ki(o,t,n+1):o}const Gi=(e,t,n)=>n>t?t:n<e?e:n,Xi={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Ji={...Xi,transform:e=>Gi(0,1,e)},Zi={...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]),pa=(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}},ha=new Set(["x","y","z"]),ga=wi.filter((e=>!ha.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:pa(4,13),y:pa(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 _a=!1,Ea=!1;function Sa(){if(Ea){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)}))}Ea=!1,_a=!1,xa.forEach((e=>e.complete())),xa.clear()}function ka(){xa.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Ea=!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),_a||(_a=!0,Mi.read(ka),Mi.resolveKeyframes(Sa))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),xa.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,xa.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Na=(e,t)=>n=>Boolean(ra(n)&&na.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ta=(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}},Pa={...Xi,transform:e=>Math.round((e=>Gi(0,255,e))(e))},Oa={test:Na("rgb","red"),parse:Ta("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Pa.transform(e)+", "+Pa.transform(t)+", "+Pa.transform(n)+", "+Qi(Ji.transform(r))+")"},Da={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:Ta("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(Ji.transform(r))+")"},ja={test:e=>Oa.test(e)||Da.test(e)||Ra.test(e),parse:e=>Oa.test(e)?Oa.parse(e):Ra.test(e)?Ra.parse(e):Da.parse(e),transform:e=>ra(e)?e:e.hasOwnProperty("red")?Oa.transform(e):Ra.transform(e)},Ma="number",Aa="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=>(ja.test(e)?(r.color.push(i),o.push(Aa),n.push(ja.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Ma),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<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Ma?Qi(e[i]):t===Aa?ja.transform(e[i]):e[i]}return o}}const Ba=e=>"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 Ha=/\b([a-z-]*)\(.*?\)/gu,$a={...Wa,getAnimatableNone:e=>{const t=e.match(Ha);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:Zi,scaleX:Zi,scaleY:Zi,scaleZ:Zi,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:Ji,originX:ua,originY:ua,originZ:sa,zIndex:Ya,backgroundPositionX:sa,backgroundPositionY:sa,fillOpacity:Ji,strokeOpacity:Ji,numOctaves:Ya},Ka={...qa,color:ja,backgroundColor:ja,outlineColor:ja,fill:ja,stroke:ja,borderColor:ja,borderTopColor:ja,borderRightColor:ja,borderBottomColor:ja,borderLeftColor:ja,filter:$a,WebkitFilter:$a},Ga=e=>Ka[e];function Xa(e,t){let n=Ga(e);return n!==$a&&(n=Wa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ja=new Set(["auto","none","0"]);class Za 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<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),$i(r))){const o=Ki(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!da.has(n)||2!==e.length)return;const[r,o]=e,i=wa(r),a=wa(o);if(i!==a)if(fa(i)&&fa(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||Li(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Ja.has(t)&&Fa(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=Xa(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ya[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=ya[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}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<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,n,r,o)){if(!i)return null==s||s(Oi(e,this.options,t)),null==a||a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{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<=_i(10),"Spring duration must be 10 seconds or less");let a=1-t;a=Gi(.05,1,a),e=Gi(.01,10,Ei(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=_i(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:-Ei(r.velocity||0)}),m=d||0,p=l/(2*Math.sqrt(s*c)),h=i-o,g=Ei(Math.sqrt(s/c)),y=Math.abs(h)<5;let v;if(n||(n=y?.01:2),t||(t=y?.005:.5),p<1){const e=ls(g,p);v=t=>{const n=Math.exp(-p*g*t);return i-n*((m+p*g*h)/e*Math.sin(e*t)+h*Math.cos(e*t))}}else if(1===p)v=e=>i-Math.exp(-g*e)*(h+(m+g*h)*e);else{const e=g*Math.sqrt(p*p-1);v=t=>{const n=Math.exp(-p*g*t),r=Math.min(e*t,300);return i-n*((m+p*g*h)*Math.sinh(r)+e*h*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;p<1&&(o=0===e?_i(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)<Math.abs(l-e)?s:l;let p=n*t;const h=d+p,g=void 0===a?h:a(h);g!==h&&(p=g-d);const y=e=>-p*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=>void 0!==s&&e<s||void 0!==l&&e>l)(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 _(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),_(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),f)}}}const ps=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function hs(e,t,n,r){return e===t&&n===r?Di:o=>0===o||1===o?o:ps(function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=ps(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=hs(.42,0,1,1),ys=hs(0,0,.58,1),vs=hs(.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)),_s=ws(xs),Es=bs(xs),Ss=hs(.33,1.53,.69,.99),ks=ws(Ss),Cs=bs(ks),Ns={linear:Di,easeIn:gs,easeInOut:vs,easeOut:ys,circIn:xs,circInOut:Es,circOut:_s,backIn:ks,backInOut:Cs,backOut:Ss,anticipate:e=>(e*=2)<1?.5*ks(e):.5*(2-Math.pow(2,-10*(e-1)))},Ts=e=>{if(Array.isArray(e)){Bi(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return hs(t,n,r,o)}return"string"==typeof e?(Bi(void 0!==Ns[e],`Invalid easing type '${e}'`),Ns[e]):e},Ps=(e,t)=>n=>t(e(n)),Os=(...e)=>e.reduce(Ps),Ds=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Rs=(e,t,n)=>e+(t-e)*n;function js(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 Ms(e,t){return n=>n>0?t:e}const As=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Is=[Da,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=js(s,r,e+1/3),i=js(s,r,e),a=js(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 Ms(e,t);const o={...n};return e=>(o.red=As(n.red,r.red,e),o.green=As(n.green,r.green,e),o.blue=As(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?$i(e)?Ms:ja.test(e)?Ls:Hs:Array.isArray(e)?Vs:"object"==typeof e?ja.test(e)?Ls:Us:Ms}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<r;t++)n[t]=o[t](e);return n}}function Us(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Ws(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Hs=(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;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[i]=l,o[a]++}return r}(r,o),o.values),n):(zi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ms(e,t))};function $s(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Rs(e,t,n):Ws(e)(e,t)}function Ys({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ts):Ts(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=Ds(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||$s,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Di:t;i=Os(e,i)}r.push(i)}return r}(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Ds(e[n],e[n+1],t);return a[n](r)};return n?t=>l(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:()=>Mi.update(t,!0),stop:()=>Ai(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,$s(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:p,onUpdate:h}=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,p&&(n-=p/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 _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return _&&void 0!==r&&(w.value=Oi(s,this.options,r)),h&&h(w.value),_&&this.finish(),w}get duration(){const{resolved:e}=this;return e?Ei(e.calculatedDuration):0}get time(){return Ei(this.currentTime)}set time(e){e=_i(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=Ei(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 Js=new Set(["opacity","clipPath","filter","transform"]),Zs=e=>Array.isArray(e)&&"number"==typeof e[0];function Qs(e){return Boolean(!e||"string"==typeof e&&e in tl||Zs(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?Zs(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 Za(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 Ei(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Ei(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=_i(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 Di;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Di}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=_i(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&&Js.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<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){const t=this.animations.map((t=>{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 Mi.update(o,!0),()=>Ai(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;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[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=Ti(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u-=_i(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=_i(d.duration)),d.repeatDelay&&(d.repeatDelay=_i(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 Mi.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<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ml={current:void 0};class pl{constructor(e,t={}){this.version="11.4.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{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(),Mi.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 hl(e,t){return new pl(e,t)}function gl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,hl(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":Js.has(e)?yl(e):void 0}class xl extends pl{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 _l=e=>Boolean(e&&e.getVelocity);function El(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(_l(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,...Ti(a||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=bl(e);if(n){const e=window.MotionHandoffAnimation(n,t,Mi);null!==e&&(s.startTime=e,d=!0)}}r.start(ll(t,r,o,e.shouldReduceMotion&&xi.has(t)?{type:!1}:s,e,d,El(e,t)));const f=r.animation;f&&c.push(f)}return s&&Promise.all(c).then((()=>{Mi.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 Tl=[...vi].reverse(),Pl=vi.length;function Ol(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Dl(){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 jl=0;const Ml={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=Dl(),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;t<Pl;t++){const p=Tl[t],h=n[p],g=void 0!==a[p]?a[p]:s[p],y=pi(g),v=p===i?h.isActive:null;!1===v&&(d=t);let b=g===s[p]&&g!==a[p]&&y;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),h.protectedKeys={...u},!h.isActive&&null===v||!g&&!h.prevProp||di(g)||"boolean"==typeof g)continue;let w=(f=h.prevProp,("string"==typeof(m=g)?m!==f:!!Array.isArray(m)&&!mi(m,f))||p===i&&h.isActive&&!b&&y||t>d&&y),x=!1;const _=Array.isArray(g)?g:[g];let E=_.reduce(o(p),{});!1===v&&(E={});const{prevResolvedValues:S={}}=h,k={...S,...E},C=t=>{w=!0,c.has(t)&&(x=!0,c.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in k){const t=E[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):h.protectedKeys[e]=!0}h.prevProp=g,h.prevResolvedValues=E,h.isActive&&(u={...u,...E}),r&&e.blockInitialAnimation&&(w=!1),!w||b&&!x||l.push(..._.map((e=>({animation:e,options:{type:p}}))))}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 p=Boolean(l.length);return!r||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Dl(),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=jl++}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(){}}}},Al=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=>Al(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),Mi.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)},!Al(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(),Ai(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,$l(t)),offset:Vl(e,Hl(t)),velocity:Yl(t,.1)}}function Hl(e){return e[0]}function $l(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=$l(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>_i(t)));)n--;if(!r)return{x:0,y:0};const i=Ei(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 Jl(){const e=Xl(!0);return!e||(e(),!1)}function Zl(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<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const sc=.35;function lc(e,t,n){return{min:cc(e,t),max:cc(e,n)}}function cc(e,t){return"number"==typeof e?e:e[t]||0}const uc=()=>({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 pc({scale:e,scaleX:t,scaleY:n}){return!mc(e)||!mc(t)||!mc(n)}function hc(e){return pc(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 _c=.999999999999,Ec=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 Tc=({current:e})=>e?e.ownerDocument.defaultView:null,Pc=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&&Mi.postRender((()=>i(e,t))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=El(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:Tc(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&&Mi.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||!Dc(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Rs(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(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&&Zl(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||!Zl(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(!Dc(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,El(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(!Dc(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(!Zl(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=Ds(t.min,t.max-r,e.min):r>o&&(n=Ds(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(!Dc(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;Pc.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();Zl(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()),Mi.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 Dc(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Rc=e=>(t,n)=>{e&&Mi.postRender((()=>e(t,n)))};var jc=n(848);const Mc=(0,s.createContext)(null),Ac=(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}=ji(queueMicrotask,!1);class Hc 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()||Mi.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 $c(e){const[t,n]=function(){const e=(0,s.useContext)(Mc);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)(Ac);return(0,jc.jsx)(Hc,{...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 Jc(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Zc=eu(0,.5,_s),Qc=eu(.5,.95,Di);function eu(e,t,n){return r=>r<e?0:r>t?1:n(Ds(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 pu(e){return Ql(e.x)/Ql(e.y)}function hu(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=_l(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,_u=["","X","Y","Z"],Eu={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",Mi,!(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(Du),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;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new vu)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new fl),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e){const t=ns.now(),n=({timestamp:r})=>{const o=r-t;o>=250&&(Ai(n),e(o-250))};return Mi.read(n,!0),()=>Ai(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()||Hu,{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={...Ti(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,Ai(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.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ju);this.isUpdating||this.nodes.forEach(Mu),this.isUpdating=!1,this.nodes.forEach(Au),this.nodes.forEach(Tu),this.nodes.forEach(Pu),this.clearAllSnapshots();const e=ns.now();Ii.delta=Gi(0,1e3/60,e-Ii.timestamp),Ii.timestamp=e,Ii.isProcessing=!0,Fi.update.process(Ii),Fi.preRender.process(Ii),Fi.render.process(Ii),Ii.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ru),this.sharedNodes.forEach(Bu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Mi.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Mi.postRender((()=>{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;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!uu(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||hc(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),qu((r=n).x),qu(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Gu)){const{scroll:e}=this.root;e&&(Sc(n.x,e.offset.x),Sc(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(nu(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&nu(n,e),Sc(n.x,o.offset.x),Sc(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};nu(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Cc(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),hc(r.latestValues)&&Cc(n,r.latestValues)}return hc(this.latestValues)&&Cc(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};nu(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!hc(n.latestValues))continue;pc(n.latestValues)&&n.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};nu(r,n.measurePageBox()),lu(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return hc(this.latestValues)&&lu(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ii.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Ii.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},oc(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),nu(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,nc(a.x,s.x,l.x),nc(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):nu(this.target,this.layout.layoutBox),xc(this.target,this.targetDelta)):nu(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},oc(this.relativeTargetOrigin,this.target,e.target),nu(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}xu&&wu.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!pc(this.parent.latestValues)&&!gc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Ii.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;nu(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Cc(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,xc(e,a)),r&&hc(i.latestValues)&&Cc(e,i.latestValues))}t.x<Ec&&t.x>_c&&(t.x=1),t.y<Ec&&t.y>_c&&(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&&hu(this.projectionDelta.x,this.prevProjectionDelta.x)&&hu(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,p,h,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,p=this.relativeTargetOrigin,h=a,g=n,Vu(m.x,p.x,h.x,g),Vu(m.y,p.y,h.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,Zc(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<Kc;o++){const i=`border${qc[o]}Radius`;let a=Jc(t,i),s=Jc(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Xc(a)===Xc(s)?(e[i]=Math.max(Rs(Gc(a),Gc(s),r),0),(aa.test(s)||aa.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Rs(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ai(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Mi.update((()=>{Fc.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=_l(0)?0:hl(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<_u.length;t++)ku(`rotate${_u[t]}`,e,r,this.animationValues),ku(`skew${_u[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Eu;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=bu(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=bu(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!hc(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in Wc){if(void 0===a[e])continue;const{correct:t,applyTo:n}=Wc[e],o="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?bu(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(ju),this.root.sharedNodes.clear()}}}function Tu(e){e.updateLayout()}function Pu(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 Du(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ru(e){e.clearSnapshot()}function ju(e){e.clearMeasurements()}function Mu(e){e.isLayoutDirty=!1}function Au(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 Hu={duration:.45,ease:[.4,0,.1,1]},$u=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yu=$u("applewebkit/")&&!$u("chrome/")?Math.round:Di;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=pu(t),o=pu(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}),Ju={current:void 0},Zu=Nu({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ju.current){const e=new Xu({});e.mount(window),e.setOptions({layoutScroll:!0}),Ju.current=e}return Ju.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=Di}onPointerDown(e){this.session=new Bl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Tc(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&&Mi.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=Di,this.removeListeners=Di,this.controls=new Oc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Di}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Zu,MeasureLayout:$c}};function ed(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Ll(e.current,n,((n,o)=>{if("touch"===n.pointerType||Jl())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);const a=i[r];a&&Mi.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=Di,this.removeEndListeners=Di,this.removeAccessibleListeners=Di,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&&Mi.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&&Mi.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&&Mi.postRender((()=>n(e,t)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Jl()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Mi.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:Zu,MeasureLayout:$c}},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,pd=(0,s.createContext)({strict:!1});let hd=!1;function gd(e,t,n,r,o){var i;const{visualElement:a}=(0,s.useContext)(dd),l=(0,s.useContext)(pd),c=(0,s.useContext)(Mc),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&&Zl(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 p=n[vl],h=(0,s.useRef)(Boolean(p)&&!window.MotionHandoffIsComplete&&(null===(i=window.MotionHasOptimisedAnimation)||void 0===i?void 0:i.call(window,p)));return md((()=>{f&&(f.updateFeatures(),Vc.render(f.render),h.current&&f.animationState&&f.animationState.animateChanges())})),(0,s.useEffect)((()=>{f&&(!h.current&&f.animationState&&f.animationState.animateChanges(),h.current=!1,hd||(hd=!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):Zl(n)&&(n.current=r))}),[t])}function wd(e){return di(e.animate)||bi.some((t=>pi(e[t])))}function xd(e){return Boolean(wd(e)||e.variants)}function _d(e){return Array.isArray(e)?e.join(" "):e}const Ed={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 Ed)Sd[e]={isEnabled:t=>Ed[e].some((e=>!!t[e]))};const kd=Symbol.for("motionComponentSymbol");function Cd({layoutId:e}){const t=(0,s.useContext)(Ac).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 Td(e){return"string"==typeof e&&!e.includes("-")&&!!(Nd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Pd(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 Dd(e,t,n,r){Pd(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 jd(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(_l(o[a])||t.style&&_l(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 Md(e,t,n){const r=jd(e,t,n);for(const n in e)(_l(e[n])||_l(t[n]))&&(r[-1!==wi.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}function Ad(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)(Mc),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():Ad(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<r.length;t++){const o=gi(e,r[t]);if(o){const{transitionEnd:e,transition:t,...r}=o;n(r,e)}}}function zd(e,t,n,r,o){var i;const a={},s=[],l=r&&void 0===(null===(i=e.style)||void 0===i?void 0:i.willChange),c=o(e,{});for(const e in c)a[e]=bu(c[e]);let{initial:u,animate:d}=e;const f=wd(e),m=xd(e);t&&m&&!f&&!1!==e.inherit&&(void 0===u&&(u=t.initial),void 0===d&&(d=t.animate));let p=!!n&&!1===n.initial;p=p||!1===u;const h=p?d:u;return h&&"boolean"!=typeof h&&!di(h)&&Ld(e,h,((e,t)=>{for(const t in e){let n=e[t];Array.isArray(n)&&(n=n[p?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"},Hd=wi.length;function $d(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<Hd;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($d(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:p}=e;f.transform&&(p&&(m.transform=f.transform),delete f.transform),p&&(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)}`}(p,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(),Jd={useVisualState:Id({scrapeMotionValuesFromProps:Md,createRenderState:Wd,onMount:(e,t,{renderState:n,latestValues:r})=>{Mi.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),Mi.render((()=>{Gd(n,r,Xd(t.tagName),e.transformTemplate),Dd(t,n)}))}})},Zd={useVisualState:Id({applyWillChange:!0,scrapeMotionValuesFromProps:jd,createRenderState:Bd})};function Qd(e,t,n){for(const r in t)_l(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 $d(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=(Td(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)((()=>_l(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,ja,Wa],ff=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],mf=bi.length;class pf{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,Mi.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]&&_l(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(),Ai(this.notifyUpdate),Ai(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&&Mi.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;t<ff.length;t++){const n=ff[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(_l(o))e.addValue(r,o);else if(_l(i))e.addValue(r,hl(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,hl(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<mf;e++){const n=bi[e],r=this.props[n];(pi(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=hl(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,_l(r)?r.get():r)),_l(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||_l(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 hf extends pf{constructor(){super(...arguments),this.KeyframeResolver=Za}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 hf{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Pd}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){$d(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return jd(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;_l(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class yf extends hf{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 Md(e,t,n)}build(e,t,n){Gd(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Dd(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||pi(t)?t:void 0,animate:pi(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,s.useContext)(dd));return(0,s.useMemo)((()=>({initial:t,animate:n})),[_d(t),_d(n)])}(e),d=r(e,c);if(!c&&fd){(0,s.useContext)(pd).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,jc.jsxs)(dd.Provider,{value:u,children:[a&&u.visualElement?(0,jc.jsx)(a,{visualElement:u.visualElement,...l}):null,n(o,e,bd(d,u.visualElement,i),d,c,u.visualElement)]})}));return i[kd]=o,i}({...Td(n)?Jd:Zd,preloadedFeatures:e,useRender:sf(r),createVisualElement:t,Component:n})}}({...Ml,...ld,...Qu,...cd},((e,t)=>Td(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<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wf.apply(null,arguments)}var xf=(0,s.createContext)(),_f=function(e){var t,n=e.children,r=e.activeItem,o=void 0===r?null:r,i=e.onChange,a=e.className,c=e.size,u=void 0===c?"sm":c,d=e.orientation,f=void 0===d?"horizontal":d,m=e.variant,p=void 0===m?"pill":m,h=e.iconPosition,g=void 0===h?"left":h,y=e.width,v=void 0===y?"full":y,b=(0,s.useCallback)((function(e,t){i&&i({event:e,value:t})}),[i]),w="rounded-full",x="p-1",_="ring-1 ring-tab-border";"vertical"===f?t="gap-0.5":"rounded"!==p&&"pill"!==p||("xs"===u||"sm"===u?t="gap-0.5":"md"!==u&&"lg"!==u||(t="gap-1")),"rounded"===p||"vertical"===f?w="rounded-md":"underline"===p&&(w="rounded-none",x="p-0",_="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===u?t="gap-0":"sm"===u?t="gap-2.5":"md"!==u&&"lg"!==u||(t="gap-3"));var E="vertical"===f?"flex-col":"",S="box-border [&>*]:box-border flex items-center ".concat("full"===v?"w-full":""," ").concat(E),k=re(S,w,x,t,_,"underline"!==p?"bg-tab-background":"",a);return l().createElement("div",{className:k},l().createElement(xf.Provider,{value:{activeItem:o,onChange:b,size:u,variant:p,orientation:f,iconPosition:g,width:v}},l().Children.map(n,(function(e){return(0,s.isValidElement)(e)?l().cloneElement(e):null}))))};_f.displayName="Tabs.Group";var Ef=(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;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,bf);if(!n)throw new Error("Tab should be used inside Tabs Group");var p=n.activeItem,h=n.onChange,g=n.size,y=n.variant,v=n.orientation,b=n.iconPosition,w=n.width,x={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===y?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===y?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===y?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[g],_=re("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===w?"flex-1":"","vertical"===v?"w-full justify-between":""),E="rounded-full";"rounded"===y?E="rounded-md":"underline"===y&&(E="rounded-none");var S=re(_,"border-none",E,"hover:text-text-primary group","focus:outline-none",u?"text-text-disabled cursor-not-allowed":"",x,p===r?"bg-background-primary text-text-primary shadow-sm":"",a);return l().createElement("button",wf({ref:t,className:S,disabled:u,onClick:function(e){h(e,{slug:r,text:o})}},m),p===r&&"underline"===y&&l().createElement(vf.span,{layoutId:"underline",className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),l().createElement("span",{className:"flex items-center gap-1"},"left"===b&&i&&l().createElement("span",{className:"mr-1 contents center-center group-hover:text-text-primary"},i),o,"right"===b&&i&&l().createElement("span",{className:"ml-1 contents center-center group-hover:text-text-primary"},i)),f&&(0,s.isValidElement)(f)&&f)}));Ef.displayName="Tabs.Tab";var Sf={Group:_f,Tab:Ef};const kf=xe("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Cf=xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Nf=xe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var Tf={sm:{icon:"[&>svg]: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"}},Pf="group-disabled:text-field-color-disabled",Of=["value","selected","children","className"];function Df(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)||Mf(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;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rf.apply(null,arguments)}function jf(e){return function(e){if(Array.isArray(e))return Af(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Mf(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.")}()}function Mf(e,t){if(e){if("string"==typeof e)return Af(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Af(e,t):void 0}}function Af(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function If(e){return If="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},If(e)}function Ff(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 Lf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ff(Object(n),!0).forEach((function(t){zf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ff(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zf(e,t,n){return(t=function(e){var t=function(e){if("object"!=If(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=If(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==If(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bf=(0,s.createContext)(),Wf=function(){return(0,s.useContext)(Bf)};function Vf(e){var t,n,r,o=e.children,i=e.icon,a=void 0===i?null:i,l=e.placeholder,c=void 0===l?"Select an option":l,u=e.optionIcon,d=void 0===u?null:u,f=e.displayBy,m=void 0===f?"name":f,p=e.label,h=e.className,g=Wf(),y=g.sizeValue,v=g.getReferenceProps,b=g.getValues,w=g.selectId,x=g.refs,_=g.isOpen,E=g.multiple,S=g.combobox,k=g.setSelected,C=g.onChange,N=g.isControlled,T=g.disabled,P=g.by,O=null===(t={sm:"xs",md:"sm",lg:"md"})||void 0===t?void 0:t[y],D=(0,s.useCallback)((function(){if(a)return a;var e="text-field-placeholder group-disabled:text-icon-disabled";return S?React.createElement(kf,{className:e}):React.createElement(Cf,{className:e})}),[a]),R=(0,s.useCallback)((function(){var e=b();if(!e)return null;if("function"==typeof o){var t=Lf({value:e},E?{onClose:j}:{});return o(t)}if(E)return e.map((function(e,t){return React.createElement(Fo,{icon:d,type:"rounded",key:t,size:O,onMouseDown:j(e),label:"object"===If(e)?e[m]:e,closable:!0,disabled:T})}));var n="object"===If(e)?e[m]:e;return(0,s.isValidElement)(o)&&(n=o),React.createElement("span",{className:re("truncate",Tf[y].displaySelected,Pf)},n)}),[b]),j=function(e){return function(t){var n;null==t||t.preventDefault(),null==t||t.stopPropagation();var r=jf(null!==(n=b())&&void 0!==n?n:[]),o=r.findIndex((function(t){return"object"===If(t)?t[P]===e[P]:t===e}));-1!==o&&(r.splice(o,1),N||k(r),"function"==typeof C&&C(r))}};return React.createElement("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border"},!!p&&React.createElement("label",{className:re(null===(n=Tf[y])||void 0===n?void 0:n.label,"text-field-label"),htmlFor:w},p),React.createElement("button",Rf({id:w,ref:x.setReference,className:re("flex items-center justify-between w-full box-border transition-colors duration-150 bg-white","outline outline-1 outline-field-border border-none",!_&&"focus:ring-2 focus:ring-offset-4 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",Tf[y].selectButton,E&&Tf[y].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled",h),"aria-labelledby":"select-label",tabIndex:0,disabled:T},v()),React.createElement("div",{className:re("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",b()&&"flex flex-wrap")},R(),(E?!(null!==(r=b())&&void 0!==r&&r.length):!b())&&React.createElement("div",{className:re("[grid-area:1/1/2/3] text-field-input px-1",Tf[y].displaySelected,Pf)},c)),React.createElement("div",{className:re("flex items-center [&>svg]:shrink-0",Tf[y].icon)},D())))}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,p=f.context,h=f.refs,g=f.combobox,y=f.floatingStyles,v=f.getFloatingProps,b=f.sizeValue,w=f.setSearchKeyword,x=f.setActiveIndex,_=f.setSelectedIndex,E=f.value,S=f.selected,k=f.getValues,C=f.searchKeyword,N=f.listContentRef,T=f.by,P=(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[T]===e[T]:t.props.value===e}))),-1===n?0:n}),[E,S,t]);(0,s.useLayoutEffect)((function(){x(P),_(P)}),[]);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,E,S,t]),D=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(Mr,{context:p,modal:!1},React.createElement("div",Rf({ref:h.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",Tf[b].dropdown,!g&&"h-auto",g?"overflow-hidden":"overflow-y-auto",d),style:Lf({},y)},v()),g&&React.createElement("div",{className:re(Tf[b].searchbarWrapper)},React.createElement(Nf,{className:re("text-icon-secondary shrink-0",Tf[b].searchbarIcon)}),React.createElement("input",{className:re("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",Tf[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",Tf[b].dropdownItemsWrapper)},!!D&&O,!D&&React.createElement("div",{className:"p-2 text-center text-base font-medium text-field-placeholder"},"No items found"))))))}function Hf(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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Of),a=Wf(),l=a.sizeValue,c=a.getItemProps,u=a.onKeyDownItem,d=a.onClickItem,f=a.activeIndex,m=a.selectedIndex,p=a.updateListRef,h=a.getValues,g=a.by,y=a.multiple,v=i.index,b=(0,s.useMemo)((function(){if(!y)return!1;var e=h();return!!e&&e.some((function(e){return"object"===If(e)?e[g]===t[g]:e===t}))}),[t,h]),w=(0,s.useMemo)((function(){return"boolean"==typeof n?n:y?b:v===m}),[b,m,n]);return React.createElement("div",Rf({className:re("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",{sm:"py-1.5 px-2 text-sm font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"}[l],v===f&&"bg-button-tertiary-hover",o),ref:function(e){p(v,e)},role:"option",tabIndex:v===f?0:-1,"aria-selected":w&&v===f},c({onClick:function(){d(v,t)},onKeyDown:function(e){u(e,v,t)}})),React.createElement("span",{className:"w-full truncate"},r),w&&React.createElement(Ee,{className:re("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[l])}))}Vf.displayName="Select.Button",Uf.displayName="Select.Options",Hf.displayName="Select.Option";var $f=function(e){var t=e.id,n=e.size,r=void 0===n?"md":n,o=e.value,i=e.defaultValue,a=e.onChange,l=e.by,c=void 0===l?"id":l,u=e.children,d=e.multiple,f=void 0!==d&&d,m=e.combobox,p=void 0!==m&&m,h=e.disabled,g=void 0!==h&&h,y=(0,s.useMemo)((function(){return t||"select-".concat(de())}),[t]),v=(0,s.useMemo)((function(){return void 0!==o}),[o]),b=Df((0,s.useState)(i),2),w=b[0],x=b[1],_=Df((0,s.useState)(""),2),E=_[0],S=_[1],k=(0,s.useCallback)((function(){return v?o:w}),[v,o,w]),C=Df((0,s.useState)(!1),2),N=C[0],T=C[1],P=Df((0,s.useState)(),2),O=P[0],D=P[1],R=Df((0,s.useState)(),2),j=R[0],M=R[1],A={sm:p?256:172,md:p?256:216,lg:p?256:216},I=Vr({placement:"bottom-start",open:N,onOpenChange:T,whileElementsMounted:mn,middleware:[kn(5),Nn({padding:10}),Tn({apply:function(e){var t=e.rects,n=e.elements,o=e.availableHeight;Object.assign(n.floating.style,{maxHeight:"min(".concat(o,"px, ").concat(A[r],"px)"),maxWidth:"".concat(t.reference.width,"px")})},padding:10})]}),F=I.refs,L=I.floatingStyles,z=I.context,B=(0,s.useRef)([]),W=(0,s.useRef)([]),V=(0,s.useRef)(!1),U=Fr(z,{event:"mousedown"}),H=Wr(z),$=Qr(z,{role:"listbox"}),Y=function(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:m=!1,rtl:p=!1,virtual:h=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b,orientation:w="vertical",cols:x=1,scrollItemIntoView:_=!0,virtualItemRef:E,itemSizes:S,dense:k=!1}=t,C=or(Pr(o.floating)),N=tr(),T=nr(),P=Dn(l),O=s.useRef(g),D=s.useRef(null!=u?u:-1),R=s.useRef(null),j=s.useRef(!0),M=s.useRef(P),A=s.useRef(!!o.floating),I=s.useRef(n),F=s.useRef(!1),L=s.useRef(!1),z=or(b),B=or(n),W=or(_),V=or(u),[U,H]=s.useState(),[$,Y]=s.useState(),q=Dn((function(e,t,n){function r(e){h?(H(e.id),null==T||T.events.emit("virtualfocus",e),E&&(E.current=e)):$n(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||!j.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,D.current=u,P(u)):A.current&&(D.current=-1,M.current(null)))}),[c,n,o.floating,u,P]),Yn((()=>{if(c&&n&&o.floating)if(null==a){if(F.current=!1,null!=V.current)return;if(A.current&&(D.current=-1,q(i,D)),(!I.current||!A.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++):(D.current=null==R.current||Xr(R.current,w,p)||m?Ln(i,z.current):zn(i,z.current),R.current=null,P(D.current))};t()}}else Fn(i,a)||(D.current=a,q(i,D,L.current),L.current=!1)}),[c,n,o.floating,a,V,m,i,w,p,P,q,z]),Yn((()=>{var e;if(!c||o.floating||!T||h||!A.current)return;const t=T.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&&j.current&&n.focus({preventScroll:!0})}),[c,o.floating,T,N,h]),Yn((()=>{if(c&&T&&h&&!N)return T.events.on("virtualfocus",e),()=>{T.events.off("virtualfocus",e)};function e(e){Y(e.id),E&&(E.current=e)}}),[c,T,h,N,E]),Yn((()=>{M.current=P,A.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&&P(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;j.current&&"touch"!==t&&(D.current=-1,q(i,D),P(null),h||$n(C.current,{preventScroll:!0}))}}}}),[n,C,q,y,i,P,h]),X=Dn((e=>{if(j.current=!1,F.current=!0,!B.current&&e.currentTarget===C.current)return;if(m&&Jr(e.key,w,p))return mt(e),r(!1,e.nativeEvent,"list-navigation"),void(ze(o.domReference)&&!h&&o.domReference.focus());const t=D.current,a=Ln(i,b),s=zn(i,b);if("Home"===e.key&&(mt(e),D.current=a,P(D.current)),"End"===e.key&&(mt(e),D.current=s,P(D.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;n<a;n++)for(let r=0;r<s;r++)e.push(o+n+r*t);o%t+a<=t&&e.every((e=>null==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-i<s||d<0)){const e=c%i,t=l%i,n=l-(t-e);d=t===e?l:t>e?n:n-i}Fn(e,d)&&(d=c)}if(n.key===jn&&(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===An&&(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===Mn&&(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===Mn?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(D.current>s?a:D.current,t,n,x,e.key===jn?"bl":e.key===An?"tr":"tl"),stopEvent:!0})];if(null!=l&&(D.current=l,P(D.current)),"both"===w)return}if(Gr(e.key,w)){if(mt(e),n&&!h&&Qe(e.currentTarget.ownerDocument)===e.currentTarget)return D.current=Xr(e.key,w,p)?a:s,void P(D.current);Xr(e.key,w,p)?D.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})):D.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,D.current)?P(null):P(D.current)}})),J=s.useMemo((()=>h&&n&&K&&{"aria-activedescendant":$||U}),[h,n,K,$,U]),Z=s.useMemo((()=>({"aria-orientation":"both"===w?void 0:w,...!pt(o.domReference)&&J,onKeyDown:X,onPointerMove(){j.current=!0}})),[J,X,o.domReference,w]),Q=s.useMemo((()=>{function e(e){"auto"===g&&rt(e.nativeEvent)&&(O.current=!0)}return{...J,onKeyDown(e){j.current=!1;const t=0===e.key.indexOf("Arrow"),o=function(e,t,n){return Kr(t,n?e===Mn:e===An,e===jn)}(e.key,w,p),a=Jr(e.key,w,p),s=Gr(e.key,w),l=(m?o:s)||"Enter"===e.key||""===e.key.trim();if(h&&n){const n=null==T?void 0:T.nodesRef.current.find((e=>null==e.parentId)),r=T&&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))}(T.nodesRef.current,n.id):null;if(t&&r&&E){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?(D.current=Ln(i,z.current),P(D.current)):r(!0,e.nativeEvent,"list-navigation")):s&&(null!=u&&(D.current=u),mt(e),!n&&v?r(!0,e.nativeEvent,"list-navigation"):X(e),n&&P(D.current)))},onFocus(){n&&!h&&P(null)},onPointerDown:function(e){O.current=g,"auto"===g&&ot(e.nativeEvent)&&(O.current=!0)},onMouseDown:e,onClick:e}}),[U,J,X,z,g,i,m,P,r,n,v,w,p,u,T,h,E]);return s.useMemo((()=>c?{reference:Q,floating:Z,item:G}:{}),[c,Q,Z,G])}(z,{listRef:B,activeIndex:O,selectedIndex:j,onNavigate:D,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:p=null}=t,h=s.useRef(),g=s.useRef(""),y=s.useRef(null!=(n=null!=p?p:a)?n:-1),v=s.useRef(null),b=Dn(l),w=Dn(c),x=or(d),_=or(m);Yn((()=>{r&&(clearTimeout(h.current),v.current=null,g.current="")}),[r]),Yn((()=>{var e;r&&""===g.current&&(y.current=null!=(e=null!=p?p:a)?e:-1)}),[r,p,a]);const E=Dn((e=>{e?o.current.typing||(o.current.typing=e,w(e)):o.current.typing&&(o.current.typing=e,w(e))})),S=Dn((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)?E(!1):" "===e.key&&mt(e)),null==n||_.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&(mt(e),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(h.current),h.current=setTimeout((()=>{g.current="",y.current=v.current,E(!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="",E(!1))})),k=s.useMemo((()=>({onKeyDown:S})),[S]),C=s.useMemo((()=>({onKeyDown:S,onKeyUp(e){" "===e.key&&E(!1)}})),[S,E]);return s.useMemo((()=>u?{reference:k,floating:C}:{}),[u,k,C])}(z,{listRef:W,activeIndex:O,selectedIndex:j,onMatch:N?D:M,onTypingChange:function(e){V.current=e}}),K=Yr([H,$,Y,U].concat(jf(p?[]:[q]))),G=K.getReferenceProps,X=K.getFloatingProps,J=K.getItemProps,Z=function(e,t){if(f)return function(e,t){var n,r=jf(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),M(e),F.reference.current.focus(),T(!1),S(""),"function"==typeof a&&a(r))}(e,t);M(e),v||x(t),F.reference.current.focus(),T(!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:j,setSelectedIndex:M,activeIndex:O,setActiveIndex:D,selected:w,setSelected:x,handleSelect:Z,combobox:p,sizeValue:r,multiple:f,onChange:a,isTypingRef:V,getItemProps:J,onClickItem:function(e,t){Z(e,t)},onKeyDownItem:function(e,t,n){"Enter"===e.key&&(e.preventDefault(),Z(t,n))," "!==e.key||V.current||(e.preventDefault(),Z(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:E,setSearchKeyword:S,disabled:g}},u)};Vf.displayName="Select.Button",Uf.displayName="Select.Options",Hf.displayName="Select.Item",$f.Button=Vf,$f.Options=Uf,$f.Option=Hf;var Yf=$f,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;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gf(Object(n),!0).forEach((function(t){Jf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jf(e,t,n){return(t=Zf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zf(e){var t=function(e){if("object"!=Kf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Kf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kf(t)?t:t+""}function Qf(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function em(e,t){return e.get(nm(e,t))}function tm(e,t,n){return e.set(nm(e,t),n),n}function nm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var rm=1,om=new WeakMap,im=new WeakMap,am=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Qf(this,om,void 0),Qf(this,im,void 0),tm(om,this,[]),tm(im,this,[])},t=[{key:"subscribe",value:function(e){var t=this;return em(im,this).push(e),function(){tm(im,t,em(im,t).filter((function(t){return t!==e})))}}},{key:"notify",value:function(){var e=this;em(im,this).forEach((function(t){return t(em(om,e))}))}},{key:"publish",value:function(e){em(im,this).forEach((function(t){return t(e)}))}},{key:"add",value:function(e){em(om,this).push(e),this.publish(e)}},{key:"remove",value:function(e){return tm(om,this,em(om,this).filter((function(t){return t.id!==e}))),e}},{key:"create",value:function(e){var t=this,n=e.id,r=void 0===n?void 0:n,o=e.message,i=void 0===o?"":o,a=e.jsx,s=void 0===a?void 0:a,l=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,qf);if(i||"function"==typeof s){var c="number"==typeof r?r:rm++,u=em(om,this).find((function(e){return e.id===c}));return u&&tm(om,this,em(om,this).map((function(e){return e.id===c?(t.publish(Xf(Xf({},e),{},{title:i,jsx:s},l)),Xf(Xf({},e),{},{title:i,jsx:s},l)):e}))),this.add(Xf({id:c,title:i,jsx:s},l)),c}}},{key:"update",value:function(e,t){var n=this,r=t.render,o=void 0===r?void 0:r,i=t;switch(Kf(o)){case"function":i=Xf({jsx:o},t);break;case"string":i=Xf({title:o},t)}tm(om,this,em(om,this).map((function(t){return t.id===e?(n.publish(Xf(Xf({},t),i)),Xf(Xf({},t),i)):t})))}},{key:"dismiss",value:function(e){var t=this;return e||em(om,this).forEach((function(e){return em(im,t).forEach((function(t){return t({id:e.id,dismiss:!0})}))})),em(im,this).forEach((function(t){return t({id:e,dismiss:!0})})),e}},{key:"history",value:function(){return em(om,this)}},{key:"default",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:"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<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Zf(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),sm=new am,lm=Object.seal(Object.assign((function(e,t){return sm.default(e,t)}),{success:sm.success.bind(sm),error:sm.error.bind(sm),warning:sm.warning.bind(sm),info:sm.info.bind(sm),custom:sm.custom.bind(sm),dismiss:sm.dismiss.bind(sm),update:sm.update.bind(sm)},{getHistory:sm.history.bind(sm)})),cm=!1,um={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},dm={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},fm="bg-background-inverse border-background-inverse",mm={light:"text-icon-secondary",dark:"text-icon-inverse"};class pm extends s.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function hm({children:e,isPresent:t}){const n=(0,s.useId)(),r=(0,s.useRef)(null),o=(0,s.useRef)({width:0,height:0,top:0,left:0}),{nonce:i}=(0,s.useContext)(ud);return(0,s.useInsertionEffect)((()=>{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,jc.jsx)(pm,{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=Ad(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,jc.jsx)(hm,{isPresent:n,children:e})),(0,jc.jsx)(Mc.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=Ad((()=>new Map)),[m,p]=(0,s.useState)(l),[h,g]=(0,s.useState)(l);md((()=>{u.current=!1,d.current=l;for(let e=0;e<h.length;e++){const t=vm(h[e]);c.includes(t)?f.delete(t):!0!==f.get(t)&&f.set(t,!1)}}),[h,c.length,c.join("-")]);const y=[];if(l!==m){let e=[...l];for(let t=0;t<h.length;t++){const n=h[t],r=vm(n);c.includes(r)||(e.splice(t,0,n),y.push(n))}return"wait"===a&&y.length&&(e=y),g(bm(e)),void p(l)}const{forceRender:v}=(0,s.useContext)(Ac);return(0,jc.jsx)(jc.Fragment,{children:h.map((e=>{const t=vm(e),s=l===h||c.includes(t);return(0,jc.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 _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}function Em(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_m(Object(n),!0).forEach((function(t){Sm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sm(e,t,n){return(t=function(e){var t=function(e){if("object"!=xm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xm(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function km(e,t){if(e){if("string"==typeof e)return Cm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cm(e,t):void 0}}function Cm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Nm,Tm=function(e){var t=e.toastItem,n=e.title,r=void 0===n?null:n,o=e.content,i=void 0===o?null:o,a=e.autoDismiss,l=void 0===a||a,c=e.dismissAfter,u=void 0===c?5e3:c,d=e.theme,f=void 0===d?"light":d,m=e.design,p=void 0===m?"stack":m,h=e.icon,g=void 0===h?null:h,y=e.variant,v=void 0===y?"neutral":y,b=e.removeToast,w=(0,s.useRef)(0),x=(0,s.useRef)(0),_=(0,s.useRef)(0),E=function(e){var t=arguments.length>1&&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 _.current=E(t,e),function(){clearTimeout(_.current)}}),[]),(0,s.useEffect)((function(){null!=t&&t.dismiss&&b(t.id)}),[t]);var S,k,C,N,T,P,O,D,R,j,M=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)}))},A=null;return"stack"===p&&(A=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(_.current),x.current=(new Date).getTime()},onMouseLeave:function(){_.current=E(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!==(T=null==t||null===(P=t.action)||void 0===P?void 0:P.type)&&void 0!==T?T:"button",onAction:M,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(Ao,null)))):null==t||null===(D=t.jsx)||void 0===D?void 0:D.call(t,{close:function(){return b(t.id)},action:null!=t&&t.action?Em(Em({},null==t?void 0:t.action),{},{onClick:M}):null}))),"inline"===p&&(A=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!==(j=mm[f])&&void 0!==j?j:mm.light),onClick:function(){return b(t.id)}},React.createElement(Ao,null))))),A},Pm=(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,p=e.dismissAfter,h=void 0===p?5e3:p,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?Em(Em({},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?Em(Em({},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(Tm,{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:h,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"}},Dm={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"}},jm={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"}},Mm={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"}},Am={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"}},Hm={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"}},$m={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);n<t;n++)r[n]=e[n];return r}function Km(e){return Km="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},Km(e)}var Gm=function(e,t,n){var r,o,i,a,s,l,c,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"sm",d=[];switch(Km(e)){case"object":for(var f=0,m=Object.entries(e);f<m.length;f++){var p,h,g,y,v=function(e){if(Array.isArray(e))return e}(c=m[f])||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}}(c)||function(e){if(e){if("string"==typeof e)return qm(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)?qm(e,2):void 0}}(c)||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.")}(),b=v[0],w=v[1];t[b]&&d.push(null!==(p=null!==(h=null==t||null===(g=t[b])||void 0===g?void 0:g[w])&&void 0!==h?h:null==t||null===(y=t[b])||void 0===y?void 0:y[null==n?void 0:n[b]])&&void 0!==p?p:"")}break;case"string":case"number":var x=u;d.push(null!==(r=null!==(o=null==t||null===(i=t[x])||void 0===i?void 0:i[e])&&void 0!==o?o:null==t||null===(a=t[x])||void 0===a?void 0:a[null==n?void 0:n[x]])&&void 0!==r?r:"");break;default:d.push(null!==(s=null==t||null===(l=t[u])||void 0===l?void 0:l[n])&&void 0!==s?s:"")}return d.join(" ")},Xm=["className","cols","gap","gapX","gapY","align","justify","gridFlow","colsSubGrid","rowsSubGrid","autoRows","autoCols","children"],Jm=["className","children","colSpan","colStart","alignSelf","justifySelf"];function Zm(){return Zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zm.apply(null,arguments)}function Qm(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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ep=function(e){var t=e.className,n=e.cols,r=e.gap,o=e.gapX,i=e.gapY,a=e.align,s=e.justify,c=e.gridFlow,u=void 0===c?"":c,d=e.colsSubGrid,f=void 0!==d&&d,m=e.rowsSubGrid,p=void 0!==m&&m,h=e.autoRows,g=void 0!==h&&h,y=e.autoCols,v=void 0!==y&&y,b=e.children,w=Qm(e,Xm),x=Gm(n,Om,1),_=Gm(r,Dm,"sm"),E=Gm(o,Rm,""),S=Gm(i,jm,""),k=Gm(a,Lm,""),C=Gm(s,Fm,""),N=Gm(u,Im,"");return l().createElement("div",Zm({className:re("grid",{"grid-cols-subgrid":f,"grid-rows-subgrid":p,"auto-cols-auto":v,"auto-rows-auto":g},x,_,E,S,k,C,N,t)},w),b)};Object.assign(ep,{Item:function(e){var t=e.className,n=e.children,r=e.colSpan,o=e.colStart,i=e.alignSelf,a=e.justifySelf,s=Qm(e,Jm),c=Gm(r,Mm,0),u=Gm(o,Am,0),d=Gm(i,zm,""),f=Gm(a,Bm,"");return l().createElement("div",Zm({className:re(c,u,d,f,t)},s),n)}});var tp=ep,np=["containerType","gap","gapX","gapY","direction","justify","align","wrap","cols","className","children"],rp=["containerType"],op=["grow","shrink","order","alignSelf","justifySelf","className","children"];function ip(){return ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ip.apply(null,arguments)}function ap(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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sp=(0,s.createContext)(),lp=function(e){var t=e.containerType,n=void 0===t?"flex":t,r=e.gap,o=void 0===r?"sm":r,i=e.gapX,a=void 0===i?"":i,s=e.gapY,c=void 0===s?"":s,u=e.direction,d=void 0===u?"":u,f=e.justify,m=void 0===f?"":f,p=e.align,h=void 0===p?"":p,g=e.wrap,y=e.cols,v=void 0===y?"":y,b=e.className,w=e.children,x=ap(e,np);if("grid"===n){var _=e.containerType,E=ap(e,rp);return l().createElement(sp.Provider,{value:{containerType:_}},l().createElement(tp,E))}var S=Gm(g,Vm,""),k=Gm(o,Dm,"sm"),C=Gm(a,Rm,""),N=Gm(c,jm,""),T=Gm(d,Wm,""),P=Gm(m,Fm,""),O=Gm(h,Lm,""),D=re("flex",S,k,C,N,T,P,O,b);return l().createElement(sp.Provider,{value:{containerType:n,cols:v}},"grid"===n?l().createElement(tp,e):l().createElement("div",ip({className:D},x),w))};lp.Item=function(e){var t=e.grow,n=e.shrink,r=e.order,o=e.alignSelf,i=e.justifySelf,a=e.className,c=e.children,u=ap(e,op),d=(0,s.useContext)(sp),f=d.containerType,m=d.cols;if("grid"===f){var p=ip({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return l().createElement(tp.Item,p)}var h=Gm(o,zm,""),g=Gm(i,Bm,""),y=Gm(t,$m,0),v=Gm(n,Ym,0),b=Gm(r,Hm,0),w=Gm(m,Um,1);return l().createElement("div",ip({className:re("box-border",y,v,b,h,g,w,a)},u),c)},lp.displayName="Container",lp.Item.displayName="Container.Item";var cp,up=lp,dp=function(e){var t,n,r,o,i,a,s=e.design,l=void 0===s?"inline":s,c=e.theme,u=void 0===c?"light":c,d=e.variant,f=void 0===d?"neutral":d,m=e.className,p=void 0===m?"":m,h=e.title,g=void 0===h?"Title":h,y=e.content,v=void 0===y?"Description":y,b=e.icon,w=void 0===b?null:b,x=e.onClose,_=void 0===x?function(){}:x,E=e.action,S=void 0===E?{label:"",onClick:function(){},type:"link"}:E,k=function(){_()},C={neutral:"ring-alert-border-neutral bg-alert-background-neutral",custom:"ring-alert-border-neutral bg-alert-background-neutral",info:"ring-alert-border-info bg-alert-background-info",success:"ring-alert-border-green bg-alert-background-green",warning:"ring-alert-border-warning bg-alert-background-warning",error:"ring-alert-border-danger bg-alert-background-danger"},N="bg-background-inverse ring-background-inverse",T={light:"text-icon-secondary",dark:"text-icon-inverse"},P=function(){var e;null==S||null===(e=S.onClick)||void 0===e||e.call(S,(function(){return k()}))};return"stack"===l?React.createElement("div",{className:re("flex items-center justify-start p-4 gap-2 relative ring-1 rounded-md shadow-lg","dark"===u?N:null===(o=C)||void 0===o?void 0:o[f],p)},React.createElement(React.Fragment,null,React.createElement("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0"},co({variant:f,icon:w,theme:u})),React.createElement("div",{className:"flex flex-col items-start justify-start gap-0.5"},fo({title:g,theme:u}),mo({content:v,theme:u}),(null==S?void 0:S.label)&&"function"==typeof(null==S?void 0:S.onClick)&&React.createElement("div",{className:"mt-2.5"},uo({actionLabel:null==S?void 0:S.label,actionType:null!==(i=null==S?void 0:S.type)&&void 0!==i?i:"button",onAction:P,theme:u}))),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!==(a=T[u])&&void 0!==a?a:T.light),onClick:function(){return k()}},React.createElement(Ao,null))))):React.createElement("div",{className:re("flex items-center justify-between p-3 gap-2 relative ring-1 rounded-lg shadow-lg","dark"===u?N:null===(t=C)||void 0===t?void 0:t[f],p)},React.createElement("div",{className:"flex items-center justify-start gap-2"},React.createElement("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0"},co({variant:f,icon:w,theme:u})),React.createElement("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span: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:P,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=T[u])&&void 0!==r?r:T.light),onClick:function(){return k()}},React.createElement(Ao,null))))},fp=(cp=function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)},cp&&cp.__esModule&&Object.prototype.hasOwnProperty.call(cp,"default")?cp.default:cp);const mp=(0,s.createContext)(null);function pp(){const e=(0,s.useContext)(mp);return null==e&&fp(8),e}function hp({defaultSelection:e}){const[t]=pp();return(0,s.useEffect)((()=>{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 gp={},yp={},vp={},bp={},wp={},xp={},_p={},Ep={},Sp={},kp={},Cp={},Np={},Tp={},Pp={},Op={},Dp={},Rp={},jp={},Mp={},Ap={},Ip={},Fp={},Lp={},zp={},Bp={},Wp={},Vp={},Up={},Hp={},$p={},Yp={},qp={},Kp={},Gp={},Xp={},Jp={},Zp={},Qp={},eh={},th={},nh="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,rh=nh&&"documentMode"in document?document.documentMode:null,oh=nh&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ih=nh&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ah=!(!nh||!("InputEvent"in window)||rh)&&"getTargetRanges"in new window.InputEvent("input"),sh=nh&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),lh=nh&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ch=nh&&/Android/.test(navigator.userAgent),uh=nh&&/^(?=.*Chrome).*/i.test(navigator.userAgent),dh=nh&&ch&&uh,fh=nh&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!uh,mh=0,ph=1,hh=2,gh=1,yh=2,vh=3,bh=4,wh=5,xh=6,_h=sh||lh||fh?" ":"",Eh="\n\n",Sh=ih?" ":_h,kh="֑-߿יִ-﷽ﹰ-ﻼ",Ch="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Nh=new RegExp("^[^"+Ch+"]*["+kh+"]"),Th=new RegExp("^[^"+kh+"]*["+Ch+"]"),Ph={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},Oh={directionless:1,unmergeable:2},Dh={center:2,end:6,justify:4,left:1,right:3,start:5},Rh={[yh]:"center",[xh]:"end",[bh]:"justify",[gh]:"left",[vh]:"right",[wh]:"start"},jh={normal:0,segmented:2,token:1},Mh={[mh]:"normal",[hh]:"segmented",[ph]:"token"};var Ah,Ih=(Ah=function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)},Ah&&Ah.__esModule&&Object.prototype.hasOwnProperty.call(Ah,"default")?Ah.default:Ah);function Fh(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}let Lh=!1,zh=0;function Bh(e){zh=e.timeStamp}function Wh(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function Vh(e,t,n){const r=Jg(n._window);let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const a=e.nodeValue;null!==a&&Ng(t,a,o,i,!1)}function Uh(e,t,n){if(Vv(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return 3===t.nodeType&&n.isAttached()}function Hh(e,t,n){Lh=!0;const r=performance.now()-zh>100;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;n<t.length;n++){const d=t[n],f=d.type,m=d.target;let p=pg(m,s);if(!(null===p&&m!==a||Ab(p)))if("characterData"===f)r&&Rv(p)&&Uh(o,m,p)&&Vh(m,p,e);else if("childList"===f){c=!0;const t=d.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=mg(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&("BR"!==r.nodeName||!Wh(r,i,e))){if(ih){const e=r.innerText||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];("BR"===r.nodeName&&Wh(r,m,e)||l===r)&&(m.appendChild(r),t++)}r!==t&&(m===a&&(p=vg(s)),i.set(m,p))}}}if(i.size>0)for(const[t,n]of i)if(Rb(n)){const r=n.getChildrenKeys();let o=t.firstChild;for(let n=0;n<r.length;n++){const i=r[n],a=e.getElementByKey(i);null!==a&&(null==o?(t.appendChild(a),o=a):o!==a&&t.replaceChild(a,o),o=o.nextSibling)}}else Rv(n)&&n.markDirty();const d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){const n=d[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||Wh(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&(o.dirty=!0,bg(o)),ih&&zg(e)&&o.insertRawText(u))}))}finally{Lh=!1}}function $h(e){const t=e._observer;null!==t&&Hh(e,t.takeRecords(),t)}function Yh(e){!function(e){0===zh&&$g(e).addEventListener("textInput",Bh,!0)}(e),e._observer=new MutationObserver(((t,n)=>{Hh(e,t,n)}))}function qh(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 Kh(e,t){const n=e.mergeWithSibling(t),r=bb()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Gh(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(qh(t,r)){r=Kh(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&Rv(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(qh(r,n)){r=Kh(r,n);break}break}n.remove()}}else r.remove()}function Xh(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 Jh=1;const Zh="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function Qh(e){const t=document.activeElement;if(null===t)return!1;const n=t.nodeName;return Ab(pg(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&&!Qh(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=Ph[t];if(null!==n&&(e&r)==(n&r))return e;let o=e^r;return"subscript"===t?o&=~Ph.superscript:"superscript"===t&&(o&=~Ph.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 hb()?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 pg(e,t){let n=e;for(;null!=n;){const e=mg(n,t);if(null!==e)return e;n=Ug(n)}return null}function hg(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 _g(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Eg(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=Jg(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=pg(o);if(null!==t&&Rv(r)){if(t===_h&&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]===_h&&(s=t.slice(0,-1));const l=i.getTextContent();if(o||s!==l){if(""===s){if(ug(null),sh||lh||fh)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=Dv(i.getTextContent());i.replace(e),i=e}i.setTextContent(s)}}}function Tg(e){return"ArrowLeft"===e}function Pg(e){return"ArrowRight"===e}function Og(e,t){return oh?e:t}function Dg(e){return"Enter"===e}function Rg(e){return"Backspace"===e}function jg(e){return"Delete"===e}function Mg(e,t,n){return"a"===e.toLowerCase()&&Og(t,n)}function Ag(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=Fh(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&&Ih(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=$g(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&&Ih(75,t),n}function Ug(e){const t=e.assignedSlot||e.parentElement;return null!==t&&11===t.nodeType?t.host:t}function Hg(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function $g(e){const t=e._window;return null===t&&Ih(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&&Ih(97);const o=r.replace;if(null!==o){const t=o(e);return t instanceof e.constructor||Ih(98),t}return e}function Kg(e,t){!Fb(e.getParent())||Rb(t)||Ab(t)||Ih(99)}function Gg(e){return(Ab(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 Jg(e){return nh?(e||window).getSelection():null}function Zg(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)||Ab(e)&&!e.isInline())return!0;if(!Rb(e)||Yg(e))return!1;const t=e.getFirstChild(),n=null===t||pv(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,py,hy,gy,yy="",vy="",by=null,wy="",xy="",_y=!1,Ey=!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(py.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 Ty="40px";function Py(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")||Ty;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 Dy(e,t,n){const r=py.get(e);void 0===r&&Ih(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"):Ab(r)&&o.setAttribute("data-lexical-decorator","true"),Rb(r)){const e=r.__indent,t=r.__size;if(0!==e&&Py(o,e),0!==t){const e=t-1;!function(e,t,n,r){const o=vy;vy="",Ry(e,n,0,t,r,null),Ay(n,r),vy=o}(Iy(r,py),e,r,o)}const n=r.__format;0!==n&&Oy(o,n),r.isInline()||My(null,r,o),Wg(r)&&(yy+=Eh,xy+=Eh)}else{const t=r.getTextContent();if(Ab(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){Dy(e[s],o,i);const t=py.get(e[s]);null!==t&&Rv(t)&&(null===by&&(by=t.getFormat()),""===wy&&(wy=t.getStyle()))}Wg(t)&&(yy+=Eh),o.__lexicalTextContent=yy,yy=a+yy}function jy(e,t){const n=t.get(e);return pv(n)||Ab(n)&&n.isInline()}function My(e,t,n){const r=null!==e&&(0===e.__size||jy(e.__last,my)),o=0===t.__size||jy(t.__last,py);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 Ay(e,t){const n=t.__lexicalDirTextContent,r=t.__lexicalDir;if(n!==vy||r!==Sy){const n=""===vy,i=n?Sy:(o=vy,Nh.test(o)?"rtl":Th.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=Fh(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=Fh(l);l=a[i]=e}void 0!==l&&o.add(...l)}t.dir=i}Ey||(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&&Ih(101),n.push(r),r=e.__next}return n}function Fy(e,t){const n=my.get(e);let r=py.get(e);void 0!==n&&void 0!==r||Ih(61);const o=_y||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=Dy(e,null,null);return null===t&&Ih(62),t.replaceChild(n,i),ky(e,null),n}if(Rb(n)&&Rb(r)){const e=r.__indent;e!==n.__indent&&Py(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=Dy(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=py.get(o);Rv(a)&&(null===by&&(by=a.getFormat()),""===wy&&(wy=a.getStyle()))}else{const r=Iy(e,my),a=Iy(t,py);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 Dy(r,i,u),f++;else u=zy(By(e)),ky(e,i),d++}const o=py.get(r);null!==o&&Rv(o)&&(null===by&&(by=o.getFormat()),""===wy&&(wy=o.getStyle()))}const m=d>a,p=f>s;if(m&&!p){const t=n[s+1];Ry(n,e,f,s,i,void 0===t?null:ly.getElementByKey(t))}else p&&!m&&Cy(t,d,a,i)}(t,r,a,o,i,n)}Wg(t)&&(yy+=Eh),n.__lexicalTextContent=yy,yy=r+yy}(e,t,n),Ay(t,n),$b(o=t)&&null!=by&&by!==o.__textFormat&&!Ey&&(o.setTextFormat(by),o.setTextStyle(wy)),function(e){$b(e)&&""!==wy&&wy!==e.__textStyle&&!Ey&&e.setTextStyle(wy)}(t),vy=r}(n,r,i),Fb(r)||r.isInline()||My(n,r,i)),Wg(r)&&(yy+=Eh,xy+=Eh)}else{const t=r.getTextContent();if(Ab(r)){const t=r.decorate(ly,sy);null!==t&&Ly(e,t)}else Rv(r)&&!r.isDirectionless()&&(vy+=t);yy+=t,xy+=t}if(!Ey&&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=hg(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=hy.get(e);return void 0===t&&Ih(75,e),t}const Wy=Object.freeze({}),Vy=[["keydown",function(e,t){if(Uy=e.timeStamp,Hy=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:a}=e;Bg(t,Pp,e)||null!=n&&(function(e,t,n,r){return Pg(e)&&!t&&!r&&!n}(n,o,a,i)?Bg(t,Op,e):function(e,t,n,r,o){return Pg(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?Bg(t,Dp,e):function(e,t,n,r){return Tg(e)&&!t&&!r&&!n}(n,o,a,i)?Bg(t,Rp,e):function(e,t,n,r,o){return Tg(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?Bg(t,jp,e):function(e,t,n){return function(e){return"ArrowUp"===e}(e)&&!t&&!n}(n,o,i)?Bg(t,Mp,e):function(e,t,n){return function(e){return"ArrowDown"===e}(e)&&!t&&!n}(n,o,i)?Bg(t,Ap,e):function(e,t){return Dg(e)&&t}(n,r)?(Xy=!0,Bg(t,Ip,e)):function(e){return" "===e}(n)?Bg(t,Fp,e):function(e,t){return oh&&t&&"o"===e.toLowerCase()}(n,o)?(e.preventDefault(),Xy=!0,Bg(t,bp,!0)):function(e,t){return Dg(e)&&!t}(n,r)?(Xy=!1,Bg(t,Ip,e)):function(e,t,n,r){return oh?!t&&!n&&(Rg(e)||"h"===e.toLowerCase()&&r):!(r||t||n)&&Rg(e)}(n,a,i,o)?Rg(n)?Bg(t,Lp,e):(e.preventDefault(),Bg(t,vp,!0)):function(e){return"Escape"===e}(n)?Bg(t,zp,e):function(e,t,n,r,o){return oh?!(n||r||o)&&(jg(e)||"d"===e.toLowerCase()&&t):!(t||r||o)&&jg(e)}(n,o,r,a,i)?jg(n)?Bg(t,Bp,e):(e.preventDefault(),Bg(t,vp,!1)):function(e,t,n){return Rg(e)&&(oh?t:n)}(n,a,o)?(e.preventDefault(),Bg(t,Sp,!0)):function(e,t,n){return jg(e)&&(oh?t:n)}(n,a,o)?(e.preventDefault(),Bg(t,Sp,!1)):function(e,t){return oh&&t&&Rg(e)}(n,i)?(e.preventDefault(),Bg(t,kp,!0)):function(e,t){return oh&&t&&jg(e)}(n,i)?(e.preventDefault(),Bg(t,kp,!1)):function(e,t,n,r){return"b"===e.toLowerCase()&&!t&&Og(n,r)}(n,a,i,o)?(e.preventDefault(),Bg(t,Cp,"bold")):function(e,t,n,r){return"u"===e.toLowerCase()&&!t&&Og(n,r)}(n,a,i,o)?(e.preventDefault(),Bg(t,Cp,"underline")):function(e,t,n,r){return"i"===e.toLowerCase()&&!t&&Og(n,r)}(n,a,i,o)?(e.preventDefault(),Bg(t,Cp,"italic")):function(e,t,n,r){return"Tab"===e&&!t&&!n&&!r}(n,a,o,i)?Bg(t,Wp,e):function(e,t,n,r){return"z"===e.toLowerCase()&&!t&&Og(n,r)}(n,r,i,o)?(e.preventDefault(),Bg(t,Np,void 0)):function(e,t,n,r){return oh?"z"===e.toLowerCase()&&n&&t:"y"===e.toLowerCase()&&r||"z"===e.toLowerCase()&&r&&t}(n,r,i,o)?(e.preventDefault(),Bg(t,Tp,void 0)):Hv(t._editorState._selection)?function(e,t,n,r){return!t&&"c"===e.toLowerCase()&&(oh?n:r)}(n,r,i,o)?(e.preventDefault(),Bg(t,Yp,e)):function(e,t,n,r){return!t&&"x"===e.toLowerCase()&&(oh?n:r)}(n,r,i,o)?(e.preventDefault(),Bg(t,qp,e)):Mg(n,i,o)&&(e.preventDefault(),Bg(t,Kp,e)):!ih&&Mg(n,i,o)&&(e.preventDefault(),Bg(t,Kp,e)),function(e,t,n,r){return e||t||n||r}(o,r,a,i)&&Bg(t,th,e))}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;n instanceof Node&&"touch"!==r&&Ob(t,(()=>{Ab(pg(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<Uy+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||Rv(o)&&o.getStyle()!==n.style)&&Bg(t,xp,Sh)}}))}],["compositionend",function(e,t){ih?Jy=!0:Ob(t,(()=>{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)){Jy&&(rv(t,r),Jy=!1);const o=n.anchor.getNode(),i=Jg(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;ah&&!n.isCollapsed()&&Rv(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,s)+r+o.getTextContent().slice(s+l)===kg(i.anchorNode)||Bg(t,xp,r);const c=r.length;ih&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),sh||lh||fh||!t.isComposing()||(Uy=0,ug(null))}else Cg(!1,t,null!==r?r:void 0),Jy&&(rv(t,r||void 0),Jy=!1);gb(),$h(bb())})),Yy=null}],["click",function(e,t){Ob(t,(()=>{const n=tb(),r=Jg(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,yp,e)}))}],["cut",Wy],["copy",Wy],["dragstart",Wy],["dragover",Wy],["dragend",Wy],["paste",Wy],["focus",Wy],["blur",Wy],["drop",Wy]];ah&&Vy.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType,r=nv(e);"deleteCompositionText"===n||ih&&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"===Hy&&i<Uy+30&&t.isComposing()&&n){if(ug(null),Uy=0,setTimeout((()=>{Ob(t,(()=>{ug(null)}))}),30),Vv(o)){const e=o.anchor.getNode();e.markDirty(),o.format=e.getFormat(),Rv(e)||Ih(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;dh&&n&&!i||Bg(t,vp,!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,xp,e);break;case"insertFromComposition":ug(null),Bg(t,xp,e);break;case"insertLineBreak":ug(null),Bg(t,bp,!1);break;case"insertParagraph":ug(null),Xy&&!lh?(Xy=!1,Bg(t,bp,!1)):Bg(t,wp,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Bg(t,_p,e);break;case"deleteByComposition":(function(e,t){return e!==t||Rb(e)||Rb(t)||!e.isToken()||!t.isToken()})(c,u)&&Bg(t,Ep,e);break;case"deleteByDrag":case"deleteByCut":Bg(t,Ep,e);break;case"deleteContent":Bg(t,vp,!1);break;case"deleteWordBackward":Bg(t,Sp,!0);break;case"deleteWordForward":Bg(t,Sp,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Bg(t,kp,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Bg(t,kp,!1);break;case"formatStrikeThrough":Bg(t,Cp,"strikethrough");break;case"formatBold":Bg(t,Cp,"bold");break;case"formatItalic":Bg(t,Cp,"italic");break;case"formatUnderline":Bg(t,Cp,"underline");break;case"historyUndo":Bg(t,Np,void 0);break;case"historyRedo":Bg(t,Tp,void 0)}else{if("\n"===a)e.preventDefault(),Bg(t,bp,!1);else if(a===Eh)e.preventDefault(),Bg(t,wp,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,xp,a)):Yy=a;$y=e.timeStamp}}))}(e,t)]);let Uy=0,Hy=null,$y=0,Yy=null;const qy=new WeakMap;let Ky=!1,Gy=!1,Xy=!1,Jy=!1,Zy=[0,"",0,"root",0];function Qy(e,t,n,r,o){const i=e.anchor,a=e.focus,s=i.getNode(),l=bb(),c=Jg(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&&(!ah||$y<r+50)||s.isDirty()&&m<2||_g(n))&&i.offset!==a.offset&&!s.isComposing()||og(s)||s.isDirty()&&m>1||(o||!ah)&&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=$g(t).event,i=o?o.timeStamp:performance.now(),[a,l,c,u,d]=Zy,f=yg(),m=!1===t.isComposing()&&""===f.getTextContent();if(i<d+200&&n.offset===c&&n.key===u)s.format=a,s.style=l;else if("text"===n.type)Rv(r)||Ih(141),s.format=r.getFormat(),s.style=r.getStyle();else if("element"===n.type&&!m){const e=n.getNode();s.style="",e instanceof Vb&&0===e.getChildrenSize()?(s.format=e.getTextFormat(),s.style=e.getTextStyle()):s.format=0}}else{const e=n.key,t=s.focus.key,r=s.getNodes(),i=r.length,l=s.isBackward(),c=l?a:o,u=l?o:a,d=l?t:e,f=l?e:t;let m=255,p=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(Rv(t)&&0!==n&&!(0===e&&t.__key===d&&c===n||e===i-1&&t.__key===f&&0===u)&&(p=!0,m&=t.getFormat(),0===m))break}s.format=p?m:0}}Bg(t,gp,void 0)}))}function nv(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function rv(e,t){const n=e._compositionKey;if(ug(null),null!==n&&null!=t){if(""===t){const t=fg(n),r=ag(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&Rv(t)&&Ng(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=tb();if(Vv(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void Bg(e,Ip,null)}}}Cg(!0,e,t)}function ov(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const iv=new Map;function av(e){const t=e.target,n=Jg(null==t?null:9===t.nodeType?t.defaultView:t.ownerDocument.defaultView);if(null===n)return;const r=ng(n.anchorNode);if(null===r)return;Gy&&(Gy=!1,Ob(r,(()=>{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=Eg(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 Hg(o,e)&&n.set(e.__key,0,"element"),Hg(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 Hv(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(){Ih(64,this.name)}static clone(e){Ih(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=""+Jh++;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(){Ih(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(Ab(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&&Ih(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(Yg(t))return Rb(e)||e===this&&Ab(e)||Ih(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&Ih(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<r;e++){const n=t[e];if(i.has(n))return n}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let n=0,r=0,o=this;for(;;){const e=o.getParentOrThrow();if(e===t){n=o.getIndexWithinParent();break}o=e}for(o=e;;){const e=o.getParentOrThrow();if(e===t){r=o.getIndexWithinParent();break}o=e}return n<r}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let n=e;for(;null!==n;){if(n.__key===t)return!0;n=n.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const a=Rb(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}const s=t?o.getNextSibling():o.getPreviousSibling();if(null!==s){o=s;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&Ih(68),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=bb()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){const e=fg(this.__key);return null===e&&Ih(113),e}getWritable(){gb();const e=vb(),t=bb(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,a=tb();if(null!==a&&a.setCachedNodes(null),i.has(r))return cg(o),o;const s=iy(o);return i.add(r),cg(s),n.set(r,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){Ih(70)}updateDOM(e,t,n){Ih(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){Ih(72)}static importJSON(e){Ih(18,this.name)}static transform(){return null}remove(e){cv(this,!0,e)}replace(e,t){gb();let n=tb();null!==n&&(n=n.clone()),Kg(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),s=this.getParentOrThrow().getWritable(),l=s.__size;lg(a);const c=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,f=r.__next,m=r.__parent;if(cv(r,!1,!0),null===c?s.__first=i:c.getWritable().__next=i,a.__prev=d,null===u?s.__last=i:u.getWritable().__prev=i,a.__next=f,a.__parent=m,s.__size=l,t&&(Rb(this)&&Rb(a)||Ih(139),this.getChildren().forEach((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 Hb()}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&&hv(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&hv(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&&hv(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&hv(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 pv(e){return e instanceof dv}function hv(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=Ag(o,"base");void 0!==a&&i.add(...a),a=Ag(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 Ph){const r=Ph[e];if(a=Ag(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?_h:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||ih){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function wv(e,t,n,r,o,i){bv(o,e,t);const a=i.theme.text;void 0!==a&&vv(0,0,r,e,a)}function xv(e,t){const n=document.createElement(t);return n.appendChild(e),n}class _v extends uv{static getType(){return"text"}static clone(e){return new _v(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return Mh[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===dg()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=Ph[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return sg(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const n=this.__format,r=gv(0,n),o=yv(0,n),i=null===r?o:r,a=document.createElement(i);let s=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(o),a.appendChild(s)),wv(s,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(a.style.cssText=l),a}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,a=gv(0,o),s=gv(0,i),l=yv(0,o),c=yv(0,i);if((null===a?l:a)!==(null===s?c:s))return!0;if(a===s&&l!==c){const e=t.firstChild;null==e&&Ih(48);const o=document.createElement(c);return wv(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==s&&null!==a&&(u=t.firstChild,null==u&&Ih(49)),bv(r,u,this);const d=n.theme.text;void 0!==d&&o!==i&&vv(0,o,i,u,d);const f=e.__style,m=this.__style;return f!==m&&(t.style.cssText=m),!1}static importDOM(){return{"#text":()=>({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:Ev,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=Dv(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&&Zg(t)||Ih(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?Ph[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?Oh[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=jh[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 Zv(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;e<s;e++)""!==l&&i.has(e)&&(a.push(l),l=""),l+=n[e];""!==l&&a.push(l);const c=a.length;if(0===c)return[];if(a[0]===n)return[t];const u=a[0],d=t.getParent();let f;const m=t.getFormat(),p=t.getStyle(),h=t.__detail;let g=!1;t.isSegmented()?(f=Dv(u),f.__format=m,f.__style=p,f.__detail=h,g=!0):(f=t.getWritable(),f.__text=u);const y=tb(),v=[f];let b=u.length;for(let e=1;e<c;e++){const t=a[e],n=t.length,i=Dv(t).getWritable();i.__format=m,i.__style=p,i.__detail=h;const s=i.__key,l=b+n;if(Vv(y)){const e=y.anchor,t=y.focus;e.key===r&&"text"===e.type&&e.offset>b&&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()||Ih(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 Ev(e){return{forChild:jv(e.style),node:null}}function Sv(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:jv(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&&Ih(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;e<r.length;e++)kv.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(mv()):"\t"===r?t.push(Av()):""!==r&&t.push(Dv(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=Tv(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \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=Tv(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:Dv(n)}}function Tv(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 Pv={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ov(e){const t=Pv[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:jv(e.style,t),node:null}}function Dv(e=""){return qg(new _v(e))}function Rv(e){return e instanceof _v}function jv(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 Mv extends _v{static getType(){return"tab"}static clone(e){return new Mv(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=Av();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(e){Ih(126)}setDetail(e){Ih(127)}setMode(e){Ih(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Av(){return qg(new Mv)}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?r<o:t.isBefore(n)}getNode(){const e=fg(this.key);return null===e&&Ih(20),e}set(e,t,n){const r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,hb()||(dg()===o&&ug(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0))}}function Fv(e,t,n){return new Iv(e,t,n)}function Lv(e,t){let n=t.__key,r=e.offset,o="element";if(Rv(t)){o="text";const e=t.getTextContentSize();r>e&&(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(!Hv(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;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=fg(e);null!==t&&n.push(t)}return hb()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Vv(e){return e instanceof Uv}class Uv{constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Vv(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this.anchor,n=this.focus,r=t.isBefore(n),o=r?t:n,i=r?n:t;let a=o.getNode(),s=i.getNode();const l=o.offset,c=i.offset;if(Rb(a)){const e=a.getDescendantByIndex(l);a=null!=e?e:a}if(Rb(s)){let e=s.getDescendantByIndex(c);null!==e&&e!==a&&s.getChildAtIndex(c)===e&&(e=e.getPreviousSibling()),s=null!=e?e:s}let u;return u=a.is(s)?Rb(a)&&a.getChildrenSize()>0?[]:[a]:a.getNodesBetween(s),hb()||(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<e.length;u++){const d=e[u];if(Rb(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,Rv(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<s?e.slice(a,s):e.slice(s,a)):e=i?e.slice(a):e.slice(s):d===n&&(e=i?e.slice(0,s):e.slice(0,a)),l+=e}else!Ab(d)&&!pv(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){const t=bb(),n=t.getEditorState()._selection,r=Jv(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;Bv(this.anchor,o.key,o.offset,o.type),Bv(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new Uv(Fv(e.key,e.offset,e.type),Fv(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=sg(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=Ph[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(mv()):"\t"===r?n.push(Av()):n.push(Dv(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,a=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,a=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),a=Dv(),s=Fb(o)?Hb().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(s):i.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}(i,a,r,o);const s=i.offset;let l=a.offset;const c=this.getNodes(),u=c.length;let d=c[0];Rv(d)||Ih(26);const f=d.getTextContent().length,m=d.getParentOrThrow();let p=c[u-1];if(1===u&&"element"===a.type&&(l=f,a.set(i.key,l,"text")),this.isCollapsed()&&s===f&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!m.canInsertTextAfter()&&null===d.getNextSibling())){let t=d.getNextSibling();if(Rv(t)&&t.canInsertTextBefore()&&!og(t)||(t=Dv(),t.setFormat(r),t.setStyle(o),m.canInsertTextAfter()?d.insertAfter(t):m.insertAfter(t)),t.select(0,0),d=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===s&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!m.canInsertTextBefore()&&null===d.getPreviousSibling())){let t=d.getPreviousSibling();if(Rv(t)&&!og(t)||(t=Dv(),t.setFormat(r),m.canInsertTextBefore()?d.insertBefore(t):m.insertBefore(t)),t.select(),d=t,""!==e)return void this.insertText(e)}else if(d.isSegmented()&&s!==f){const e=Dv(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&""!==e){const t=p.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||Rb(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),Xv(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(d.isToken()){const t=Dv(e);return t.select(),void d.replace(t)}const t=d.getFormat(),n=d.getStyle();if(s!==l||t===r&&n===o){if(function(e){return e instanceof Mv}(d)){const t=Dv(e);return t.setFormat(r),t.setStyle(o),t.select(),void d.replace(t)}}else{if(""!==d.getTextContent()){const t=Dv(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===s)d.insertBefore(t,!1);else{const[e]=d.splitText(s);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}d.setFormat(r),d.setStyle(o)}const i=l-s;d=d.spliceText(s,i,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...d.getParentKeys(),...p.getParentKeys()]),n=Rb(d)?d:d.getParentOrThrow();let r=Rb(p)?p:p.getParentOrThrow(),o=p;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===a.type&&(0!==l||""===p.getTextContent())||"element"===a.type&&p.getIndexWithinParent()<l)if(Rv(p)&&!p.isToken()&&l!==p.getTextContentSize()){if(p.isSegmented()){const e=Dv(p.getTextContent());p.replace(e),p=e}Fb(a.getNode())||"text"!==a.type||(p=p.spliceText(0,l,"")),t.add(p.__key)}else{const e=p.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?p.remove():e.remove()}else t.add(p.__key);const i=r.getChildren(),m=new Set(c),h=n.is(r),g=n.isInline()&&null===d.getNextSibling()?n:d;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(d)||Rb(t)&&t.isParentOf(d))break;t.isAttached()&&(!m.has(t)||t.is(o)?h||g.insertAfter(t,!1):t.remove())}if(!h){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=Dv(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;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())return this.toggleFormat(e),void ug(null);const t=this.getNodes(),n=[];for(const e of t)Rv(e)&&n.push(e);const r=n.length;if(0===r)return this.toggleFormat(e),void ug(null);const o=this.anchor,i=this.focus,a=this.isBackward(),s=a?i:o,l=a?o:i;let c=0,u=n[0],d="element"===s.type?0:s.offset;if("text"===s.type&&d===u.getTextContentSize()&&(c=1,u=n[1],d=0),null==u)return;const f=u.getFormatFlags(e,null),m=r-1;let p=n[m];const h="text"===l.type?l.offset:p.getTextContentSize();if(u.is(p)){if(d===h)return;if(og(u)||0===d&&h===u.getTextContentSize())u.setFormat(f);else{const e=u.splitText(d,h),t=0===d?e[0]:e[1];t.setFormat(f),"text"===s.type&&s.set(t.__key,0,"text"),"text"===l.type&&l.set(t.__key,h-d,"text")}return void(this.format=f)}0===d||og(u)||([,u]=u.splitText(d),d=0),u.setFormat(f);const g=p.getFormatFlags(e,f);h>0&&(h===p.getTextContentSize()||og(p)||([p]=p.splitText(h)),p.setFormat(g));for(let t=c+1;t<m;t++){const r=n[t],o=r.getFormatFlags(e,g);r.setFormat(o)}"text"===s.type&&s.set(u.__key,d,"text"),"text"===l.type&&l.set(p.__key,h,"text"),this.format=f|g}insertNodes(e){if(0===e.length)return;if("root"===this.anchor.key){this.insertParagraph();const t=tb();return Vv(t)||Ih(134),t.insertNodes(e)}const t=ny((this.isBackward()?this.focus:this.anchor).getNode(),ty),n=e[e.length-1];if("__language"in t&&Rb(t)){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const r=sb(this);t.splice(r,0,e),n.selectEnd()}return}if(!e.some((e=>(Rb(e)||Ab(e))&&!e.isInline()))){Rb(t)||Ih(135);const r=sb(this);return t.splice(r,0,e),void n.selectEnd()}const r=function(e){const t=Hb();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=pv(o);if(i||Ab(o)&&o.isInline()||Rb(o)&&o.isInline()||Rv(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),o=r.getLastDescendant(),i=r.getChildren(),a=Rb(t)&&t.isEmpty()?null:this.insertParagraph(),s=i[i.length-1];let l=i[0];var c;Rb(c=l)&&ty(c)&&!c.isEmpty()&&Rb(t)&&(!t.isEmpty()||t.canMergeWhenEmpty())&&(Rb(t)||Ih(135),t.append(...l.getChildren()),l=i[1]),l&&function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||Ih(140),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(t,l);const u=ny(o,ty);a&&Rb(u)&&(a.canMergeWhenEmpty()||ty(s))&&(u.append(...a.getChildren()),a.remove()),Rb(t)&&t.isEmpty()&&t.remove(),o.selectEnd();const d=Rb(t)?t.getLastChild():null;pv(d)&&u!==t&&d.remove()}insertParagraph(){if("root"===this.anchor.key){const e=Hb();return yg().splice(this.anchor.offset,0,[e]),e.select(),e}const e=sb(this),t=ny(this.anchor.getNode(),ty);Rb(t)||Ih(136);const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=mv();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=this.getNodes(),t=e.length,n=t-1,r=this.anchor,o=this.focus;let i=e[0],a=e[n];const[s,l]=Yv(this);if(0===t)return[];if(1===t){if(Rv(i)&&!this.isCollapsed()){const e=s>l?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(Ab(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=Jg(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;e<n.length;e++){const t=n[e];Hg(t,r)?o.push(t):i=!0}if(i&&o.length>0)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(Ab(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(gp,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=e<i,s=a?e:i,l=a?i:e,c=l-1;s!==c&&(_g(o.getTextContent().slice(s,l))||(t?r.offset=c:n.offset=c))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&Fb(e.getParent())&&0===e.getIndexWithinParent()&&e.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t="element"===this.anchor.type;if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character"),t){const t=e?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Hv(e){return e instanceof Wv}function $v(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Yv(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[$v(n),$v(r)]}function qv(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let a=0,s=0;for(let e=0;e<i;e++){const r=e===i-1;if(s=a,a+=o[e].length,t&&a===n||a>n||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&&Ab(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 Jv(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(Ab(t)&&Ab(r))return null}return Xv(a,s,i),[a,s]}function Zv(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=!Lh&&(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=Jv(c,d,u,f,n,e);if(null===m)return null;const[p,h]=m;return new Uv(p,h,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||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),ob(e)}}else{const a=e.isBackward(),s=a?i:o,c=s.getNode(),u=a?o:i,d=u.getNode();if(t.is(c)){const e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(l,Math.max(0,e+r),"element")}if(t.is(d)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}ob(e)}function ob(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!Rb(i))return;const e=i.getChildrenSize(),o=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)||Ih(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=Hb();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 pb={characterData:!0,childList:!0,subtree:!0};function hb(){return db||null!==cb&&cb._readOnly}function gb(){db&&Ih(13)}function yb(){mb>99&&Ih(14)}function vb(){return null===cb&&Ih(195,wb()),cb}function bb(){return null===ub&&Ih(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&&Ih(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;e<a&&(i[e](t),t.isAttached());e++);}function _b(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function Eb(e,t){const n=e.type,r=t.get(n);void 0===r&&Ih(17,n);const o=r.klass;e.type!==o.getType()&&Ih(18,o.name);const i=o.importJSON(e),a=e.children;if(Rb(i)&&Array.isArray(a))for(let e=0;e<a.length;e++){const n=Eb(a[e],t);i.append(n)}return i}function Sb(e,t,n){const r=cb,o=db,i=ub;cb=t,db=!0,ub=e;try{return n()}finally{cb=r,db=o,ub=i}}function kb(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,a=i._selection,s=n._selection,l=0!==e._dirtyType,c=cb,u=db,d=ub,f=e._updating,m=e._observer;let p=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==m){ub=e,cb=n,db=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;m.disconnect(),p=function(e,t,n,r,o,i){yy="",xy="",vy="",_y=2===r,Sy=null,ly=n,sy=n._config,cy=n._nodes,uy=ly._listeners.mutation,dy=o,fy=i,my=e._nodeMap,py=t._nodeMap,Ey=t._readOnly,hy=new Map(n._keyToDOMMap);const a=new Map;return gy=a,Fy("root",null),ly=void 0,cy=void 0,dy=void 0,fy=void 0,my=void 0,py=void 0,sy=void 0,hy=void 0,gy=void 0,a}(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),fb)throw t;return Yb(e,null,r,n),Yh(e),e._dirtyType=2,fb=!0,kb(e,i),void(fb=!1)}finally{m.observe(r,pb),e._updating=f,cb=c,db=u,ub=d}}n._readOnly||(n._readOnly=!0);const h=e._dirtyLeaves,g=e._dirtyElements,y=e._normalizedNodes,v=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=hg(e)),delete r[i])}(e,n);const w=o?null:Jg(e._window);if(e._editable&&null!==w&&(l||null===s||s.dirty)){ub=e,cb=n;try{if(null!==m&&m.disconnect(),l||null===s||s.dirty){const t=e._blockCursorElement;null!==t&&Xg(t,e,r),function(e,t,n,r,o,i){const a=r.anchorNode,s=r.focusNode,l=r.anchorOffset,c=r.focusOffset,u=document.activeElement;if(o.has("collaboration")&&u!==i||null!==u&&Qh(u))return;if(!Vv(t))return void(null!==e&&eg(n,a,s)&&r.removeAllRanges());const d=t.anchor,f=t.focus,m=d.key,p=f.key,h=Vg(n,m),g=Vg(n,p),y=d.offset,v=f.offset,b=t.format,w=t.style,x=t.isCollapsed();let _=h,E=g,S=!1;if("text"===d.type){_=ag(h);const e=d.getNode();S=e.getFormat()!==b||e.getStyle()!==w}else Vv(e)&&"text"===e.anchor.type&&(S=!0);var k,C,N,T,P;if("text"===f.type&&(E=ag(g)),null!==_&&null!==E&&(x&&(null===e||S||Vv(e)&&(e.format!==b||e.style!==w))&&(k=b,C=w,N=y,T=m,P=performance.now(),Zy=[k,C,N,T,P]),l!==y||c!==v||a!==_||s!==E||"Range"===r.type&&x||(null!==u&&i.contains(u)||i.focus({preventScroll:!0}),"element"===d.type))){try{r.setBaseAndExtent(_,y,E,v)}catch(e){}if(!o.has("skip-scroll-into-view")&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=t instanceof Uv&&"element"===t.anchor.type?_.childNodes[y]||null:r.rangeCount>0?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=$g(e).innerHeight;else{const e=c.getBoundingClientRect();s=e.top,l=e.bottom}let n=0;if(i<s?n=-(s-i):a>l&&(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=Fh(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,pb)}finally{ub=d,cb=c}}null!==p&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),a=i.length;for(let e=0;e<a;e++){const[a,s]=i[e],l=t.get(s);void 0!==l&&a(l,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}(e,p,v,h,i),Vv(s)||null===s||null!==a&&a.is(s)||e.dispatchCommand(gp,void 0);const x=e._pendingDecorators;null!==x&&(e._decorators=x,e._pendingDecorators=null,Cb("decorator",e,!0,x)),function(e,t,n){const r=gg(t),o=gg(n);r!==o&&Cb("textcontent",e,!0,o)}(e,t||i,n),Cb("update",e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,normalizedNodes:y,prevEditorState:t||i,tags:v}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,b),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;Pb(e,t,r)}}}(e)}function Cb(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function Nb(e,t,n){if(!1===e._updating||ub!==e){let r=!1;return e.update((()=>{r=Nb(e,t,n)})),r}const r=Eg(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const a=r[i]._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;for(let t=0;t<o;t++)if(!0===r[t](n,e))return!0}}}return!1}function Tb(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t;let i,a;if(void 0!==o){if(i=o.onUpdate,a=o.tag,o.skipTransforms&&(r=!0),o.discrete){const t=e._pendingEditorState;null===t&&Ih(191),t._flushSync=!0}i&&e._deferred.push(i),a&&e._updateTags.add(a)}n()}}return r}function Pb(e,t,n){const r=e._updateTags;let o,i,a=!1,s=!1;void 0!==n&&(o=n.onUpdate,i=n.tag,null!=i&&r.add(i),a=n.skipTransforms||!1,s=n.discrete||!1),o&&e._deferred.push(o);const l=e._editorState;let c=e._pendingEditorState,u=!1;(null===c||c._readOnly)&&(c=e._pendingEditorState=new Bb(new Map((c||l)._nodeMap)),u=!0),c._flushSync=s;const d=cb,f=db,m=ub,p=e._updating;cb=c,db=!1,e._updating=!0,ub=e;try{u&&(e._headless?null!==l._selection&&(c._selection=l._selection.clone()):c._selection=function(e){const t=e.getEditorState()._selection,n=Jg(e._window);return Vv(t)||null==t?eb(t,n,e,null):t.clone()}(e));const n=e._compositionKey;t(),a=Tb(e,a),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(Vv(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(c,e),0!==e._dirtyType&&(a?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);Rv(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&Gh(t)}}(c,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=dg(),a=new Map;let s=n,l=s.size,c=r,u=c.size;for(;l>0||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()&&Gh(r),void 0!==r&&_b(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&&_b(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),Tb(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)||Ih(19)}else Hv(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=p,mb=0}const h=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);h?c._flushSync?(c._flushSync=!1,kb(e)):u&&Zh((()=>{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]):Pb(e,t,n)}class Db 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 Rh[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&&Ih(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:fg(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&Ih(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=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;r<n;r++){const o=t[r];e+=o.getTextContent(),Rb(o)&&r!==n-1&&!o.isInline()&&(e+=Eh)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),Rb(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){if(""!==e){const t=Dh[e];return!!(this.getFormat()&t)}return!1}select(e,t){gb();const n=tb();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(Rv(e)||Rb(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(Rv(e)||Rb(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const a=this.__key;return Vv(n)?(n.anchor.set(a,r,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):Zv(a,r,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach((e=>e.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?Dh[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<t;n++){null===e&&Ih(100);const t=e.getNextSibling(),n=e.__key;lg(e.getWritable()),l.push(n),e=t}}let f=u;for(let e=0;e<r;e++){const t=n[e];null!==f&&t.is(f)&&(u=f=f.getPreviousSibling());const r=t.getWritable();r.__parent===a&&d--,lg(r);const o=t.__key;if(null===f)i.__first=o,r.__prev=null;else{const e=f.getWritable();e.__next=o,r.__prev=e.__key}t.__key===a&&Ih(76),r.__parent=a,s.push(o),f=t}if(e+t===o)null!==f&&(f.getWritable().__next=null,i.__last=f.__key);else if(null!==c){const e=c.getWritable();if(null!==f){const t=f.getWritable();e.__prev=f.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=d,l.length){const e=tb();if(Vv(e)){const t=new Set(l),n=new Set(s),{anchor:r,focus:o}=e;jb(r,t,n)&&ib(r,r.getNode(),this,u,c),jb(o,t,n)&&ib(o,o.getNode(),this,u,c),0!==d||this.canBeEmpty()||Yg(this)||this.remove()}}return i}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}}function Rb(e){return e instanceof Db}function jb(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class Mb extends uv{constructor(e){super(e)}decorate(e,t){Ih(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ab(e){return e instanceof Mb}class Ib extends Db{static getType(){return"root"}static clone(){return new Ib}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Ih(51)}getTextContent(){const e=this.__cachedText;return!hb()&&0!==bb()._dirtyType||null===e?super.getTextContent():e}remove(){Ih(52)}replace(e){Ih(53)}insertBefore(e){Ih(54)}insertAfter(e){Ih(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];Rb(n)||Ab(n)||Ih(56)}return super.append(...e)}static importJSON(e){const t=yg();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Fb(e){return e instanceof Ib}function Lb(){return new Bb(new Map([["root",new Ib]]))}function zb(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&Ih(130,n.name),Rb(e)){const r=t.children;Array.isArray(r)||Ih(59,n.name);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=zb(o[e]);r.push(t)}}return t}class Bb{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return Sb(t&&t.editor||null,this,e)}clone(e){const t=new Bb(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return Sb(null,this,(()=>({root:zb(yg())})))}}class Wb extends Db{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Vb extends Db{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=Ph[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=Ag(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&&Zg(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=Hb();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=Hb();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=Hb();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 Hb(){return qg(new Vb)}function $b(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&&Ih(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&&Ih(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&&Ih(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||Ih(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=Ag(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&&Ih(162);const r=n-1;r>=0||Ih(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=Eg(e),n=t[t.length-1]._key;iv.get(n)===e&&iv.delete(n)}else iv.delete(e._key)}(o),e.__lexicalEditor=null):o&&Ih(198);const i=ov(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){const t=function(e){const t=e.ownerDocument;return t&&t.defaultView||null}(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,Yh(this),this._updateTags.add("history-merge"),kb(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument,r=qy.get(n);(void 0===r||r<1)&&n.addEventListener("selectionchange",av),qy.set(n,(r||0)+1),e.__lexicalEditor=t;const o=ov(e);for(let n=0;n<Vy.length;n++){const[r,i]=Vy[n],a="function"==typeof i?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,qp,e);case"copy":return Bg(t,Yp,e);case"paste":return n&&Bg(t,_p,e);case"dragstart":return n&&Bg(t,Up,e);case"dragover":return n&&Bg(t,Hp,e);case"dragend":return n&&Bg(t,$p,e);case"focus":return n&&Bg(t,Qp,e);case"blur":return n&&Bg(t,eh,e);case"drop":return n&&Bg(t,Vp,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()&&Ih(38),$h(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;Eb(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=Jg(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 Jb({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,_v,dv,Mv,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<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}const o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),m.set(o,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,transforms:a})}}const p=new qb(a,o,m,{disableEvents:i,namespace:s,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=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&&(p._pendingEditorState=l,p._dirtyType=2),p}({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=Hb();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,jc.jsx)(mp.Provider,{value:n,children:t})}const Zb="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<n;e++){const n=t[e];if(Ab(n))return!1;if(Rb(n)){if(!$b(n))return!1;if(0!==n.__indent)return!1;const t=n.getChildren(),r=t.length;for(let n=0;n<r;n++)if(!Rv(t[e]))return!1}}return!0}(e)}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const tw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,nw=tw&&"documentMode"in document?document.documentMode:null;function rw(...e){return()=>{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 Ab(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<s.length;n++){const i=s[n],a=aw(e,i,f,r);!o&&Rb(t)&&a&&t.extractWithChild(i,r,"html")&&(o=!0)}if(o&&!i){if(Zg(u)&&u.append(f),n.append(u),d){const e=d.call(a,u);e&&u.replaceWith(e)}}else n.append(f);return o}tw&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),tw&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),!(!tw||!("InputEvent"in window)||nw)&&new window.InputEvent("input"),tw&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),tw&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,tw&&/Android/.test(navigator.userAgent),tw&&/^(?=.*Chrome).*/i.test(navigator.userAgent),tw&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})),new Map,new Set(["STYLE","SCRIPT"]);var sw=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function lw(e,t){const n=e.getData("text/plain")||e.getData("text/uri-list");null!=n&&t.insertRawText(n)}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;const cw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,uw=cw&&"documentMode"in document?document.documentMode:null,dw=!(!cw||!("InputEvent"in window)||uw)&&"getTargetRanges"in new window.InputEvent("input"),fw=cw&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),mw=cw&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,pw=cw&&/^(?=.*Chrome).*/i.test(navigator.userAgent),hw=cw&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!pw;function gw(e,t){t.update((()=>{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;n<o.length;n++)aw(e,o[n],r,t);return r.innerHTML}(e,t)}(t);null!==i&&r.setData("text/html",i),r.setData("text/plain",o.getTextContent())}}}))}const yw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function vw(e){return e.getEditorState().read(ew(e.isComposing()))}function bw({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=pp(),o=function(e,t){const[n,r]=(0,s.useState)((()=>e.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;i<o.length;i++){const a=o[i],l=(0,jc.jsx)(t,{onError:t=>e._onError(t),children:(0,jc.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(vp,(e=>{const t=tb();return!!Vv(t)&&(t.deleteCharacter(e),!0)}),0),e.registerCommand(Sp,(e=>{const t=tb();return!!Vv(t)&&(t.deleteWord(e),!0)}),0),e.registerCommand(kp,(e=>{const t=tb();return!!Vv(t)&&(t.deleteLine(e),!0)}),0),e.registerCommand(xp,(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(Ep,(()=>{const e=tb();return!!Vv(e)&&(e.removeText(),!0)}),0),e.registerCommand(bp,(e=>{const t=tb();return!!Vv(t)&&(t.insertLineBreak(e),!0)}),0),e.registerCommand(wp,(()=>{const e=tb();return!!Vv(e)&&(e.insertLineBreak(),!0)}),0),e.registerCommand(Rp,(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(Op,(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(Lp,(t=>!!Vv(tb())&&(t.preventDefault(),e.dispatchCommand(vp,!0))),0),e.registerCommand(Bp,(t=>!!Vv(tb())&&(t.preventDefault(),e.dispatchCommand(vp,!1))),0),e.registerCommand(Ip,(t=>{if(!Vv(tb()))return!1;if(null!==t){if((mw||fw||hw)&&dw)return!1;t.preventDefault()}return e.dispatchCommand(bp,!1)}),0),e.registerCommand(Kp,(()=>(function(){const e=yg();bg(function(e){return Xh(e.anchor),Xh(e.focus),e}(e.select(0,e.getChildrenSize())))}(),!0)),0),e.registerCommand(Yp,(t=>!!Vv(tb())&&(gw(t,e),!0)),0),e.registerCommand(qp,(t=>!!Vv(tb())&&(function(e,t){gw(e,t),t.update((()=>{const e=tb();Vv(e)&&e.removeText()}))}(t,e),!0)),0),e.registerCommand(_p,(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(Vp,(e=>!!Vv(tb())&&(e.preventDefault(),!0)),0),e.registerCommand(Up,(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,jc.jsxs)(jc.Fragment,{children:[e,(0,jc.jsx)(ww,{content:t}),o]})}function ww({content:e}){const[t]=pp(),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]=pp(),n=(0,s.useMemo)((()=>e(t)),[t,e]),r=(0,s.useRef)(n.initialValueFn()),[o,i]=(0,s.useState)(r.current);return Zb((()=>{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,_w=(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:p,role:h="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(e.isEditable()),e.registerEditableListener((e=>{E(e)})))),[e]),(0,jc.jsx)("div",{...w,"aria-activedescendant":_?t:void 0,"aria-autocomplete":_?n:"none","aria-controls":_?r:void 0,"aria-describedby":o,"aria-expanded":_&&"combobox"===h?!!i:void 0,"aria-label":a,"aria-labelledby":l,"aria-multiline":c,"aria-owns":_?u:void 0,"aria-readonly":!_||void 0,"aria-required":d,autoCapitalize:f,className:m,contentEditable:_,"data-testid":b,id:p,ref:k,role:_?h:void 0,spellCheck:g,style:y,tabIndex:v})}));function Ew(e){return e.getEditorState().read(ew(e.isComposing()))}const Sw=(0,s.forwardRef)((function(e,t){const{placeholder:n,...r}=e,[o]=pp();return(0,jc.jsxs)(jc.Fragment,{children:[(0,jc.jsx)(_w,{editor:o,...r,ref:t}),null!=n&&(0,jc.jsx)(kw,{editor:o,content:n})]})}));function kw({content:e,editor:t}){const n=function(e){const[t,n]=(0,s.useState)((()=>Ew(e)));return xw((()=>{function t(){const t=Ew(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,jc.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]=pp();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 p=f.offset,h=m.offset,g=d.length-u.length;return 1===g&&h===p-1?2:-1===g&&h===p+1?3:-1===g&&h===p?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 p=i._selection;return s.size>0||l.size>0?!1===m&&0!==d&&d===r&&u<n+t&&f||1===s.size&&function(e,t,n){const r=t._nodeMap.get(e),o=n._nodeMap.get(e),i=t._selection,a=n._selection;return!(Vv(i)&&Vv(a)&&"element"===i.anchor.type&&"element"===i.focus.type&&"text"===a.anchor.type&&"text"===a.focus.type||!Rv(r)||!Rv(o)||r.__parent!==o.__parent)&&JSON.stringify(t.read((()=>r.exportJSON())))===JSON.stringify(n.read((()=>o.exportJSON())))}(Array.from(s)[0],o,i)?0:1:null!==p?0:2})();return n=u,r=d,f}}(e,n),o=rw(e.registerCommand(Np,(()=>(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(Jp,!0)),0===r.length&&e.dispatchCommand(Zp,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(Tp,(()=>(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(Zp,!0));const i=n.pop();0===n.length&&e.dispatchCommand(Jp,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(Gp,(()=>(Cw(t),!1)),0),e.registerCommand(Xp,(()=>(Cw(t),e.dispatchCommand(Jp,!1),e.dispatchCommand(Zp,!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(Jp,!1)),null!==l&&(u.push({...l}),e.dispatchCommand(Zp,!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 Tw(e,t){return Tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tw(e,t)}var Pw={error:null},Ow=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=Pw,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Tw(t,n),r.getDerivedStateFromError=function(e){return{error:e}};var o=r.prototype;return o.reset=function(){this.setState(Pw)},o.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},o.componentDidUpdate=function(e,t){var n,r,o,i,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(o=e.resetKeys)&&(o=[]),void 0===(i=s)&&(i=[]),o.length!==i.length||o.some((function(e,t){return!Object.is(e,i[t])})))&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,s),this.reset())},o.render=function(){var e=this.state.error,t=this.props,n=t.fallbackRender,r=t.FallbackComponent,o=t.fallback;if(null!==e){var i={error:e,resetErrorBoundary:this.resetErrorBoundary};if(s.isValidElement(o))return o;if("function"==typeof n)return n(i);if(r)return s.createElement(r,i);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(s.Component);function Dw({children:e,onError:t}){return(0,jc.jsx)(Ow,{fallback:(0,jc.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const Rw="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function jw({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=pp();return Rw((()=>{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 Mw({editorRef:e}){const[t]=pp();return s.useEffect((()=>{"function"==typeof e?e(t):"object"==typeof e&&(e.current=t)}),[t]),null}var Aw={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<r.bottom}const Vw={};function Uw({close:e,editor:t,anchorElementRef:n,resolution:r,options:o,menuRenderFn:i,onSelectOption:a,shouldSplitNodeWithQuery:l=!1,commandPriority:c=1}){const[u,d]=(0,s.useState)(null),f=r.match&&r.match.matchingString;(0,s.useEffect)((()=>{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]),p=(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&&p(0)}),[o,u,p]),(0,s.useEffect)((()=>rw(t.registerCommand(Vw,(({option:e})=>!(!e.ref||null==e.ref.current||(Bw(e.ref.current),0))),c))),[t,p,c]),(0,s.useEffect)((()=>rw(t.registerCommand(Ap,(e=>{const n=e;if(null!==o&&o.length&&null!==u){const e=u!==o.length-1?u+1:0;p(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(Mp,(e=>{const t=e;if(null!==o&&o.length&&null!==u){const e=0!==u?u-1:o.length-1;p(e);const n=o[e];null!=n.ref&&n.ref.current&&Bw(n.ref.current),t.preventDefault(),t.stopImmediatePropagation()}return!0}),c),t.registerCommand(zp,(t=>{const n=t;return n.preventDefault(),n.stopImmediatePropagation(),e(),!0}),c),t.registerCommand(Wp,(e=>{const t=e;return null!==o&&null!==u&&null!=o[u]&&(t.preventDefault(),t.stopImmediatePropagation(),m(o[u]),!0)}),c),t.registerCommand(Ip,(e=>null!==o&&null!==u&&null!=o[u]&&(null!==e&&(e.preventDefault(),e.stopImmediatePropagation()),m(o[u]),!0)),c))),[m,e,t,o,u,p,c]),i(n,(0,s.useMemo)((()=>({options:o,selectOptionAndCleanUp:m,selectedIndex:u,setHighlightedIndex:d})),[m,u,o]),r.match?r.match.matchingString:"")}function Hw({options:e,onQueryChange:t,onSelectOption:n,onOpen:r,onClose:o,menuRenderFn:i,triggerFn:a,anchorClassName:c,commandPriority:u=1,parent:d}){const[f]=pp(),[m,p]=(0,s.useState)(null),h=function(e,t,n,r=document.body){const[o]=pp(),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]=pp();(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,p,c,d),g=(0,s.useCallback)((()=>{p(null),null!=o&&null!==m&&o()}),[o,m]),y=(0,s.useCallback)((e=>{p(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,jc.jsx)(Uw,{close:g,resolution:m,editor:f,anchorElementRef:h,options:e,menuRenderFn:i,shouldSplitNodeWithQuery:!0,onSelectOption:n,commandPriority:u})}function $w(e){return $w="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},$w(e)}function Yw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var qw=function(e){switch(e){case"sm":return"xs";case"md":default:return"sm";case"lg":return"md"}},Kw=function(e){var t=e.data,n=e.by,r=e.size,o=e.nodeKey,i=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,!1;!(s=(n=o.call(t)).done)&&(a.push(n.value),1!==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 Yw(e,1);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)?Yw(e,1):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.")}()}(pp())[0],a=!i.isEditable(),l=t;"object"===$w(t)&&(l=t[n]);var c=(0,s.useCallback)((function(e){var t=fg(o);if(!t||!t.isSelected())return!1;var n=!1,r=t.getPreviousSibling();return Rb(r)&&(r.selectEnd(),n=!0),Rv(r)&&(r.select(),n=!0),Ab(r)&&(r.selectNext(),n=!0),null===r&&(t.selectPrevious(),n=!0),n&&e.preventDefault(),n}),[o]),u=(0,s.useCallback)((function(e){var t=fg(o);if(!t||!t.isSelected())return!1;var n=!1,r=t.getNextSibling();return Rb(r)&&(r.selectStart(),n=!0),Rv(r)&&(r.select(0,0),n=!0),Ab(r)&&(r.selectPrevious(),n=!0),null===r&&(t.selectNext(),n=!0),n&&e.preventDefault(),n}),[o]);return(0,s.useEffect)((function(){var e=rw(i.registerCommand(Rp,c,1),i.registerCommand(Op,u,1));return function(){e()}}),[i,c,u]),React.createElement(Fo,{className:"inline-flex mr-0.5",type:"rounded",size:qw(r),label:l,icon:null,closable:!0,onClose:function(e){e.stopPropagation(),e.preventDefault(),a||i.update((function(){var e=fg(o);e&&e.remove()}))},disabled:a})};function Gw(e){return Gw="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},Gw(e)}function Xw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tx(r.key),r)}}function Jw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Jw=function(){return!!e})()}function Zw(e){return Zw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zw(e)}function Qw(e,t){return Qw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qw(e,t)}function ex(e,t,n){return(t=tx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tx(e){var t=function(e){if("object"!=Gw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gw(t)?t:t+""}var nx=function(e){function t(e,n,r,o){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ex(i=function(e,t,n){return t=Zw(t),function(e,t){if(t&&("object"==Gw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Jw()?Reflect.construct(t,n||[],Zw(e).constructor):t.apply(e,n))}(this,t,[o]),"__data",void 0),ex(i,"__by",void 0),ex(i,"__size",void 0),i.__data=e,i.__by=n,i.__size=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qw(e,t)}(t,e),function(e,t,n){return t&&Xw(e.prototype,t),n&&Xw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createDOM",value:function(){return document.createElement("span")}},{key:"updateDOM",value:function(){return!1}},{key:"exportDOM",value:function(){return{element:document.createElement("span")}}},{key:"exportJSON",value:function(){return{type:t.getType(),data:this.__data,by:this.__by,size:this.__size,version:1}}},{key:"decorate",value:function(){return React.createElement(Kw,{data:this.__data,by:this.__by,size:this.__size,nodeKey:this.__key})}}],[{key:"getType",value:function(){return"mention"}},{key:"clone",value:function(e){return new t(e.__data,e.__by,e.__size,e.__key)}},{key:"importJSON",value:function(e){return rx(e.data,e.by,e.size)}}])}(Mb),rx=function(e,t,n){return new nx(e,t,n)},ox=nx;function ix(e){return ix="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},ix(e)}function ax(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lx(r.key),r)}}function sx(e,t,n){return(t=lx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lx(e){var t=function(e){if("object"!=ix(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ix(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ix(t)?t:t+""}var cx=function(e,t,n){return t&&ax(e.prototype,t),n&&ax(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),sx(this,"data",void 0),sx(this,"ref",{current:null}),this.data=t}));function ux(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var dx=new Map,fx=function(e,t){var n=arguments.length>2&&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 px(){return px=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},px.apply(null,arguments)}var hx=(0,s.forwardRef)((function(e,t){var n=e.size,r=e.children,o=e.selected,i=void 0!==o&&o,a=e.className,s=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,mx);return React.createElement("li",px({role:"option",ref:t,className:re("m-0 text-text-primary cursor-pointer",Fw[n],i&&"bg-button-tertiary-hover",a)},s),r)}));hx.displayName="Item";var gx=Object.assign((function(e){var t=e.size,n=e.className,r=e.children;return React.createElement("ul",{role:"menu",className:re("absolute inset-x-0 top-full mt-2 mx-0 mb-0 w-full h-auto overflow-y-auto overflow-x-hidden z-10 bg-background-primary border border-solid border-border-subtle shadow-lg",Iw[t],n)},r)}),{Item:hx});function yx(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)||function(e,t){if(e){if("string"==typeof e)return vx(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vx(e,t):void 0}}(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 vx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var bx=function(e){var t=e.optionsArray,n=e.by,r=void 0===n?"name":n,o=e.size,i=void 0===o?"md":o,a=e.trigger,l=void 0===a?"@":a,c=e.menuComponent,u=void 0===c?gx:c,d=e.menuItemComponent,f=void 0===d?gx.Item:d,m=e.autoSpace,p=void 0===m||m,h=(0,s.useRef)(!1),g="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;",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,"}))$")),_=yx(pp(),1)[0],E=yx((0,s.useState)(null),2),S=E[0],k=E[1],C=fx(t,S,r),N=(0,s.useCallback)((function(e,t,n){_.update((function(){var o=rx(e.data,r,i);t&&t.replace(o),n()}))}),[_]),T=(0,s.useMemo)((function(){return C.map((function(e){return new cx(e)}))}),[_,C]),P=(0,s.useCallback)((function(e){if(!p)return!1;var t=e.key,n=e.ctrlKey,r=e.metaKey;if(n||r||" "===t||t.length>1||h.current)return h.current&&(h.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=Dv(" ");s.insertAfter(l)}}),[_,l,p]),O=(0,s.useCallback)((function(e){"Backspace"===e.key&&(h.current=!0)}),[h]);return(0,s.useEffect)((function(){if(_)return rw(_.registerCommand(Pp,P,1),_.registerCommand(Lp,O,1))}),[_,P]),React.createElement(Hw,{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:T,menuRenderFn:function(e,t){var n=t.selectedIndex,o=t.selectOptionAndCleanUp,a=t.setHighlightedIndex;return e.current&&!(null==T||!T.length)&&React.createElement(u,{size:i},T.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 _x(e){console.error(e)}var Ex=(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,p=e.options,h=void 0===p?[]:p,g=e.by,y=void 0===g?"name":g,v=e.trigger,b=void 0===v?"@":v,w=e.menuComponent,x=e.menuItemComponent,_=e.className,E=e.wrapperClassName,S=e.disabled,k=void 0!==S&&S,C=e.autoSpaceAfterMention,N=void 0!==C&&C,T={namespace:"Editor",editorTheme:wx,onError:_x,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",Aw[d],k&&"bg-field-secondary-background border-field-border-disabled hover:border-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",E)},React.createElement(Jb,{initialConfig:T},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",_)}),placeholder:React.createElement(xx,{content:l}),ErrorBoundary:Dw})),React.createElement(Nw,null),React.createElement(bx,{menuComponent:n,menuItemComponent:r,size:d,by:y,optionsArray:h,trigger:b,autoSpace:N}),React.createElement(jw,{onChange:function(e,t){"function"==typeof c&&c(e,t)},ignoreSelectionChange:!0}),t&&React.createElement(Mw,{editorRef:t}),m&&React.createElement(hp,null)))}));Ex.displayName="EditorInput";var Sx=Ex;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"],Tx=["labelText","icon","stepClasses","isCurrent","isCompleted","className","type","variant","sizeClasses","size","isLast","index","lineProps"];function Px(){return Px=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Px.apply(null,arguments)}function Ox(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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Dx=function(e){var t=e.variant,n=void 0===t?"dot":t,r=e.size,o=void 0===r?"sm":r,i=e.type,a=void 0===i?"inline":i,s=e.currentStep,c=void 0===s?1:s,u=e.children,d=e.className,f=e.lineProps,m=void 0===f?"min-w-10":f,p=Ox(e,Nx),h=l().Children.count(u),g={sm:{dot:"size-2.5",ring:"size-5",numberIcon:"size-5 text-tiny",icon:"size-5",label:"text-xs"},md:{dot:"size-3",ring:"size-6",numberIcon:"size-6 text-sm",icon:"size-6",label:"text-sm"},lg:{dot:"size-3.5",ring:"size-7",numberIcon:"size-7 text-md",icon:"size-7",label:"text-sm"}},y=l().Children.map(u,(function(e,t){var r={isCompleted:t+1<c,isCurrent:t+1===c,sizeClasses:g,size:o,variant:n,type:a,isLast:t+1===h,index:t,lineProps:m};return l().createElement(l().Fragment,{key:t},l().cloneElement(e,r))}));return l().createElement("div",Px({className:re("flex w-full",d,"inline"===a?"items-center justify-between":"")},p),y)},Rx=function(e){var t=e.labelText,n=void 0===t?"":t,r=e.icon,o=void 0===r?l().createElement(kx,null):r,i=(e.stepClasses,e.isCurrent),a=e.isCompleted,s=e.className,c=e.type,u=e.variant,d=e.sizeClasses,f=e.size,m=e.isLast,p=e.index,h=e.lineProps,g=Ox(e,Tx),y=jx(u,a,i,d,f,o,p),v={lg:"left-[calc(50%+14px)] right-[calc(-50%+14px)]",md:"left-[calc(50%+12px)] right-[calc(-50%+12px)]",sm:"left-[calc(50%+10px)] right-[calc(-50%+10px)]"},b={lg:"top-3.5",md:"top-3",sm:"top-2.5"},w=function(){if(n){var e=re(d[f].label,"text-text-tertiary",i?"text-brand-primary-600":"","break-word","stack"===c?"mt-2 transform max-w-xs":"mx-2 max-w-32");return l().createElement("span",{className:e},n)}return null},x=function(){if(!m){var e=re("block",a?"border-brand-primary-600":"border-border-subtle",h);return"stack"===c?l().createElement("div",{className:re("relative","flex","border-solid","border-y","absolute",a?"border-brand-primary-600":"border-border-subtle",b[f],v[f])},l().createElement("span",{className:"block"})):l().createElement("div",{className:"flex-1"},l().createElement("span",{className:re(e,"mr-2 border-y border-solid",!n&&"ml-2")}))}return null};return"stack"===c?l().createElement("div",{className:"relative flex-1 justify-center"},l().createElement("div",Px({className:re("flex items-center flex-col",s)},g),y,w()),x()):l().createElement(l().Fragment,null,l().createElement("div",Px({className:re("flex items-center",s)},g),y,w()),x())};Rx.displayName="ProgressSteps.Step";var jx=function(e,t,n,r,o,i,a){if(t)return l().createElement(Ee,{className:Cx(r,o)});var s=function(e,t,n){return re("relative flex items-center rounded-full justify-center transition-colors z-10 duration-500 ring-1",e?"ring-brand-primary-600":"ring-border-subtle",t[n].ring)}(n,r,o),c=function(e,t,n,r){var o="absolute rounded-full transition-colors duration-500 ".concat(n[r].dot);return"dot"===e?re(o,n[r].dot,t?"bg-brand-primary-600":"bg-text-tertiary"):"number"===e?re(o,n[r].dot,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):"icon"===e?re(o,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):""}(e,n,r,o),u=null;return"number"===e?u=a+1:"icon"===e&&i&&(u=i),l().createElement("span",{className:s},l().createElement("span",{className:c},u))};Dx.Step=Rx;var Mx=Dx,Ax=["variant","className"];function Ix(){return Ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ix.apply(null,arguments)}var Fx=function(e){var t,n,r=e.variant,o=void 0===r?"rectangular":r,i=e.className,a=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Ax),s=null===(t={circular:"rounded-full bg-gray-200 ",rectangular:"rounded-md bg-gray-200"})||void 0===t?void 0:t[o],c=null===(n={circular:"size-10",rectangular:"w-96 h-3"})||void 0===n?void 0:n[o];return l().createElement("div",Ix({className:re(s,"animate-pulse",c,i)},a))};function Lx(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)||function(e,t){if(e){if("string"==typeof e)return zx(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zx(e,t):void 0}}(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 zx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Bx=(0,s.createContext)(),Wx=function(){return(0,s.useContext)(Bx)},Vx=function(e){var t=e.size,n=void 0===t?"md":t,r=e.children,o=e.className;return l().createElement(Bx.Provider,{value:{size:n}},l().createElement("div",{className:re("flex flex-col bg-background-primary p-2",o)},r))};Vx.displayName="Menu";var Ux=function(e){var t,n,r=e.heading,o=e.arrow,i=void 0!==o&&o,a=e.showArrowOnHover,c=void 0===a||a,u=e.open,d=void 0===u||u,f=e.onClick,m=e.children,p=e.className,h=Lx((0,s.useState)(d),2),g=h[0],y=h[1],v=Lx((0,s.useState)(!1),2),b=v[0],w=v[1],x=Wx().size,_=null===(t={sm:"text-xs",md:"text-sm"})||void 0===t?void 0:t[x],E=null===(n={sm:"[&>svg]: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",_,r?"p-1":"p-0",p),"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",E)},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 Hx=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)};Hx.displayName="Menu.Item";var $x=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)}))};$x.displayName="Menu.Separator";var Yx=Object.assign(Vx,{List:Ux,Item:Hx,Separator:$x});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;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xx.apply(null,arguments)}function Jx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Zx=(0,s.createContext)(),Qx=function(e){var t=e.children,n=e.className,r=e.onCollapseChange,o=e.collapsible,i=void 0===o||o,a=e.screenHeight,c=void 0===a||a,u=e.borderOn,d=void 0===u||u,f=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Gx),m=(0,s.useRef)(null),p=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 Jx(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)?Jx(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)((function(){var e=localStorage.getItem("sidebar-collapsed"),t=window.innerWidth<1280;return e?JSON.parse(e):t}))),h=p[0],g=p[1];return(0,s.useEffect)((function(){r&&r(h)}),[h,r]),(0,s.useEffect)((function(){var e=function(){var e=window.innerWidth<1280;if(i)if(e)g(!0),localStorage.setItem("sidebar-collapsed",JSON.stringify(!0));else{var t=localStorage.getItem("sidebar-collapsed");g(!!t&&JSON.parse(t))}else g(!1),localStorage.removeItem("sidebar-collapsed");m.current&&(m.current.style.height=c?"".concat(window.innerHeight,"px"):"auto")};return window.addEventListener("resize",e),e(),function(){window.removeEventListener("resize",e)}}),[c,i]),l().createElement(Zx.Provider,{value:{isCollapsed:h,setIsCollapsed:g,collapsible:i}},l().createElement("div",Xx({ref:m,className:re("overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",d&&"border-0 border-r border-solid border-border-subtle",!!c&&"h-screen","transition-all duration-200",h&&"w-16 px-2",n)},f),t))};Qx.displayName="Sidebar";var e_=function(e){var t=e.children;return l().createElement("div",{className:"space-y-2"},t)};e_.displayName="Sidebar.Header";var t_=function(e){var t=e.children;return l().createElement("div",{className:re("space-y-4 grow items-start")},t)};t_.displayName="Sidebar.Body";var n_=function(e){var t=e.children,n=(0,s.useContext)(Zx),r=n.isCollapsed,o=n.setIsCollapsed,i=n.collapsible;return l().createElement("div",{className:"space-y-4"},t,i&&l().createElement("button",{className:re("bg-transparent w-full border-0 p-0 m-0 flex items-center gap-2 text-base cursor-pointer",r&&"justify-center"),onClick:function(){o(!r),localStorage.setItem("sidebar-collapsed",JSON.stringify(!r))},"aria-label":r?"Expand sidebar":"Collapse sidebar"},r?l().createElement(l().Fragment,null,l().createElement(xo,{title:"Expand",placement:"right"},l().createElement(qx,{className:"size-5"}))):l().createElement(l().Fragment,null,l().createElement(Kx,{className:"size-5"})," Collapse")))};n_.displayName="Sidebar.Footer";var r_=function(e){var t=e.children,n=e.className;return l().createElement("div",{className:re("w-full",n)},t)};r_.displayName="Sidebar.Item";var o_=Object.assign(Qx,{Header:e_,Body:t_,Footer:n_,Item:r_});const i_=xe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),a_=xe("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);var s_=["href","children","className","as"];function l_(){return l_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l_.apply(null,arguments)}var c_=(0,s.createContext)(),u_={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},d_=function(e){var t=e.children,n=e.size,r=u_[void 0===n?"sm":n]||u_.sm;return l().createElement(c_.Provider,{value:{sizes:r}},l().createElement("nav",{className:"flex m-0","aria-label":"Breadcrumb"},l().createElement("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1"},t)))};d_.displayName="Breadcrumb";var f_=function(e){var t=e.children;return l().createElement(l().Fragment,null,t)};f_.displayName="Breadcrumb.List";var m_=function(e){var t=e.children;return l().createElement("li",{className:"m-0 inline-flex items-center gap-2"},t)};m_.displayName="Breadcrumb.Item";var p_=function(e){var t=e.href,n=e.children,r=e.className,o=e.as,i=void 0===o?"a":o,a=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,s_),c=(0,s.useContext)(c_).sizes;return l().createElement(i,l_({href:t,className:re(c.text,"px-1 font-medium no-underline text-text-tertiary hover:text-text-primary hover:underline","focus:outline-none focus:ring-1 focus:ring-border-interactive focus:border-border-interactive focus:rounded-sm","transition-all duration-200",r)},a),n)};p_.displayName="Breadcrumb.Link";var h_=function(e){var t=e.type,n=(0,s.useContext)(c_).sizes,r={slash:l().createElement("span",{className:re("mx-1",n.separator)},"/"),arrow:l().createElement(i_,{size:n.separatorIconSize})};return l().createElement("span",{className:"flex items-center text-text-tertiary mx-2"},r[t]||r.arrow)};h_.displayName="Breadcrumb.Separator";var g_=function(){var e=(0,s.useContext)(c_).sizes;return l().createElement(a_,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};g_.displayName="Breadcrumb.Ellipsis";var y_=function(e){var t=e.children,n=(0,s.useContext)(c_).sizes;return l().createElement("span",{className:re(n.text,"font-medium text-text-primary")},t)};y_.displayName="Breadcrumb.Page";var v_=Object.assign(d_,{List:f_,Item:m_,Link:p_,Separator:h_,Ellipsis:g_,Page:y_}),b_=["className"],w_=["children","className"],x_=["children","as","className"],__=["children","as","className"],E_=["className"],S_=["children","as"],k_=["children","className"];function C_(){return C_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C_.apply(null,arguments)}function N_(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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function T_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var P_=(0,s.createContext)(),O_=function(){return(0,s.useContext)(P_)},D_={open:{opacity:1},exit:{opacity:0}},R_={duration:.2},j_=function(e){var t=e.open,n=e.setOpen,r=e.children,o=e.trigger,i=e.className,a=e.exitOnClickOutside,l=void 0!==a&&a,c=e.exitOnEsc,u=void 0===c||c,d=e.design,f=void 0===d?"simple":d,m=e.scrollLock,p=void 0===m||m,h=void 0!==t&&void 0!==n,g=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 T_(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)?T_(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)(!1)),y=g[0],v=g[1],b=(0,s.useRef)(null),w=(0,s.useRef)(null),x=(0,s.useMemo)((function(){return h?t:y}),[t,y]),_=(0,s.useMemo)((function(){return h?n:v}),[v,v]),E=function(){x||_(!0)},S=function(){x&&_(!1)},k=(0,s.useCallback)((function(){return(0,s.isValidElement)(o)?(0,s.cloneElement)(o,{onClick:oe(E,o.props.onClick)}):"function"==typeof o?o({onClick:E}):null}),[o,E,S]),C=function(e){"Escape"===e.key&&u&&S()},N=function(e){l&&b.current&&!b.current.contains(e.target)&&S()};return(0,s.useEffect)((function(){return window.addEventListener("keydown",C),document.addEventListener("mousedown",N),function(){window.removeEventListener("keydown",C),document.removeEventListener("mousedown",N)}}),[x]),(0,s.useEffect)((function(){if(p)return x&&(document.querySelector("html").style.overflow="hidden"),function(){document.querySelector("html").style.overflow=""}}),[x]),React.createElement(React.Fragment,null,k(),React.createElement(P_.Provider,{value:{open:x,setOpen:_,handleClose:S,design:f,dialogContainerRef:w,dialogRef:b}},React.createElement("div",{ref:w,className:re("fixed z-999999 w-0 h-0 overflow-visible",i)},r)))};j_.displayName="Dialog";var M_=function(e){var t=e.children,n=e.className,r=O_(),o=r.open,i=r.handleClose,a=r.dialogRef;return React.createElement(wm,null,o&&React.createElement(vf.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:D_,role:"dialog",transition:R_},React.createElement("div",{className:"flex items-center justify-center min-h-full"},React.createElement("div",{ref:a,className:re("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",n)},"function"==typeof t?t({close:i}):t))))};M_.displayName="Dialog.Panel";var A_=function(e){var t=e.className,n=N_(e,b_),r=O_(),o=r.open,i=r.dialogContainerRef;return i.current&&(0,Gt.createPortal)(React.createElement(wm,null,o&&React.createElement(vf.div,C_({className:re("fixed inset-0 -z-10 bg-background-inverse/90 backdrop-blur-sm",t)},n,{initial:"exit",animate:"open",exit:"exit",variants:D_,transition:R_}))),i.current)};A_.displayName="Dialog.Backdrop";var I_=function(e){var t=e.children,n=e.className,r=N_(e,w_);return React.createElement("div",C_({className:re("space-y-2 px-5 pt-5 pb-1",n)},r),t)};I_.displayName="Dialog.Header";var F_=function(e){var t=e.children,n=e.as,r=void 0===n?"h3":n,o=e.className,i=N_(e,x_);return React.createElement(r,C_({className:re("text-base font-semibold text-text-primary m-0 p-0",o)},i),t)};F_.displayName="Dialog.Title";var L_=function(e){var t=e.children,n=e.as,r=void 0===n?"p":n,o=e.className,i=N_(e,__);return React.createElement(r,C_({className:re("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",o)},i),t)};L_.displayName="Dialog.Description";var z_=function(e){var t=e.className,n=N_(e,E_);return React.createElement("button",C_({className:re("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",t),"aria-label":"Close dialog"},n),React.createElement(Ao,{className:"size-4 text-text-primary shrink-0"}))},B_=function(e){var t=e.children,n=e.as,r=void 0===n?s.Fragment:n,o=N_(e,S_),i=O_().handleClose;return(0,s.isValidElement)(t)&&t?r===s.Fragment?"function"==typeof t?t({close:i}):(0,s.cloneElement)(t,{onClick:i}):React.createElement(r,C_({},o,{onClick:i}),t):React.createElement(z_,C_({onClick:i},o))};B_.displayName="Dialog.CloseButton";var W_=function(e){var t=e.children,n=e.className,r=N_(e,k_);return React.createElement("div",C_({className:re("px-5",n)},r),t)};W_.displayName="Dialog.Body";var V_=function(e){var t=e.children,n=e.className,r=O_(),o=r.design,i=r.handleClose;return React.createElement("div",{className:re("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===o},n)},t?"function"==typeof t?t({close:i}):t:null)};V_.displayName="Dialog.Footer";var U_=Object.assign(j_,{Panel:M_,Backdrop:A_,Title:F_,Description:L_,CloseButton:B_,Header:I_,Body:W_,Footer:V_}),H_=["children","gap","className"];function $_(){return $_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$_.apply(null,arguments)}var Y_=function(e){var t=e.children,n=e.gap,r=void 0===n?"lg":n,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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,H_);return l().createElement("div",$_({className:re("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",ie(r),o)},i),t)};Y_.displayName="Topbar";var q_=function(e){var t=e.gap,n=void 0===t?"sm":t,r=e.children,o=e.className;return l().createElement("div",{className:re("flex items-center",ie(n),o)},r)};q_.displayName="Topbar.Left";var K_=function(e){var t,n=e.gap,r=void 0===n?"md":n,o=e.children,i=e.align,a=void 0===i?"center":i,s=e.className,c=null===(t={left:"justify-start",center:"justify-center",right:"justify-end"})||void 0===t?void 0:t[a];return l().createElement("div",{className:re("flex items-center grow",ie(r),c,s)},o)};K_.displayName="Topbar.Middle";var G_=function(e){var t=e.gap,n=void 0===t?"sm":t,r=e.children,o=e.className;return l().createElement("div",{className:re("flex items-center",ie(n),o)},r)};G_.displayName="Topbar.Right";var X_=function(e){var t=e.children,n=e.className;return l().createElement("div",{className:re("flex items-center [&>svg]:block h-full",n)},t)};X_.displayName="Topbar.Item";var J_=Object.assign(Y_,{Left:q_,Middle:K_,Right:G_,Item:X_}),Z_={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},Q_={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"}},eE={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"},tE={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 nE(e){return nE="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},nE(e)}var rE=["className","size","open","onOpenChange","loading"],oE=["className","type","placeholder","variant","disabled","onChange"],iE=["className","dropdownPortalRoot","dropdownPortalId","children"],aE=["className","icon","children"],sE=["className"];function lE(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 cE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lE(Object(n),!0).forEach((function(t){uE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uE(e,t,n){return(t=function(e){var t=function(e){if("object"!=nE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nE(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dE(){return dE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dE.apply(null,arguments)}function fE(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)||function(e,t){if(e){if("string"==typeof e)return mE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mE(e,t):void 0}}(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 mE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pE(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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hE=(0,s.createContext)(),gE=function(){return(0,s.useContext)(hE)},yE=(0,s.forwardRef)((function(e,t){var n=e.className,r=e.size,o=void 0===r?"sm":r,i=e.open,a=void 0!==i&&i,l=e.onOpenChange,c=void 0===l?function(){}:l,u=e.loading,d=void 0!==u&&u,f=pE(e,rE),m=fE((0,s.useState)(""),2),p=m[0],h=m[1],g=fE((0,s.useState)(null!=d&&d),2),y=g[0],v=g[1],b=Vr({open:a,onOpenChange:c,placement:"bottom-start",whileElementsMounted:mn,middleware:[kn("sm"===o?4:6),Nn({padding:10}),Tn({apply:function(e){var t=e.rects,n=e.elements,r=e.availableHeight;n.floating.style.maxHeight="".concat(r,"px"),n.floating.style.width="".concat(t.reference.width,"px"),n.floating.style.fontFamily=window.getComputedStyle(n.reference).fontFamily}})]}),w=b.refs,x=b.floatingStyles,_=b.context,E=Yr([Wr(_)]),S=E.getReferenceProps,k=E.getFloatingProps;return React.createElement(hE.Provider,{value:{size:o,open:a,onOpenChange:c,refs:w,floatingStyles:x,context:_,getReferenceProps:S,getFloatingProps:k,searchTerm:p,setSearchTerm:h,isLoading:y,setIsLoading:v}},React.createElement("div",dE({className:re("searchbox-wrapper box-border relative w-full",n)},f,{ref:t})))}));yE.displayName="SearchBox";var vE=(0,s.forwardRef)((function(e,t){var n=e.className,r=e.type,o=void 0===r?"text":r,i=e.placeholder,a=void 0===i?"Search...":i,s=e.variant,l=void 0===s?"primary":s,c=e.disabled,u=void 0!==c&&c,d=e.onChange,f=void 0===d?function(){}:d,m=pE(e,oE),p=gE(),h=p.size,g=p.onOpenChange,y=p.refs,v=p.getReferenceProps,b=p.searchTerm,w=p.setSearchTerm,x="lg"===h?"sm":"xs";return React.createElement("div",dE({tabIndex:0,ref:y.setReference,className:re("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-colors ease-in-out duration-150",eE[l],Q_.input[h],u?tE[l]:"focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:border-focus-border focus-within:hover:border-focus-border")},v),React.createElement("span",{className:re(Z_[h],u?"text-icon-disabled":"text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary","flex justify-center items-center")},React.createElement(Nf,null)),React.createElement("input",dE({type:o,ref:t,className:re(Z_[h],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 py-0",u?tE[l]:["text-field-placeholder focus-within:text-field-input group-hover:text-field-input","placeholder:text-field-placeholder"],n),disabled:u,value:b,onChange:function(e){var t=e.target.value;w(t),f(t),"function"==typeof g&&(t.trim()?g(!0):g(!1))},placeholder:a},m)),React.createElement(Fo,{label:"/",size:x,type:"rounded",variant:"neutral"}))}));vE.displayName="SearchBox.Input";var bE=function(e){var t=e.className,n=e.dropdownPortalRoot,r=void 0===n?null:n,o=e.dropdownPortalId,i=void 0===o?"":o,a=e.children,s=pE(e,iE),l=gE(),c=l.size,u=l.open,d=l.refs,f=l.floatingStyles,m=l.getFloatingProps;return u?React.createElement(Cr,{id:i,root:r},React.createElement("div",dE({ref:d.setFloating,style:cE({},f),className:re("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap",Q_.dialog[c],t)},m(),s),a)):null};bE.displayName="SearchBox.Content";var wE=function(e){var t=e.filter,n=void 0===t||t,r=e.children,o=gE(),i=o.searchTerm,a=o.isLoading;if(!n)return React.createElement("div",null,r);var l=s.Children.toArray(r).map((function(e){if(e.type===_E){var t=s.Children.toArray(e.props.children).filter((function(e){return e.props.children.toLowerCase().includes(i.toLowerCase())}));return t.length>0?(0,s.cloneElement)(e,{children:t}):null}return e})).filter(Boolean);return a?React.createElement(SE,null):React.createElement("div",null,l.some((function(e){return e.type!==kE}))?l:React.createElement(xE,null))};wE.displayName="SearchBox.List";var xE=function(e){var t=e.children,n=void 0===t?"No results found.":t,r=gE().size;return React.createElement("div",{className:re("flex justify-center items-center",Q_.item[r],"text-text-tertiary p-4")},n)};xE.displayName="SearchBox.Empty";var _E=function(e){var t=e.heading,n=e.children,r=gE().size;return React.createElement("div",{className:re(Q_.content[r],Q_.item[r])},t&&React.createElement("div",{className:re(Q_.title[r],"text-text-secondary")},t),n)};_E.displayName="SearchBox.Group";var EE=(0,s.forwardRef)((function(e,t){var n=e.className,r=e.icon,o=e.children,i=pE(e,aE),a=gE().size;return React.createElement("div",dE({ref:t,className:re("flex items-center justify-start gap-1 p-1 hover:bg-background-secondary focus:bg-background-secondary cursor-pointer",Q_.item[a])},i),r&&React.createElement("span",{className:re(Q_.icon[a],"flex items-center justify-center")},r),React.createElement("span",{className:re("flex-grow p-1 font-normal cursor-pointer",Q_.item[a],n)},o))}));EE.displayName="SearchBox.Item";var SE=function(e){var t=e.loadingIcon,n=void 0===t?React.createElement(ri,null):t,r=gE().size,o=(0,s.cloneElement)(n,{size:r});return React.createElement("div",{className:re("flex justify-center p-4",Z_[r],Q_.item[r])},o)};SE.displayName="SearchBox.Loading";var kE=(0,s.forwardRef)((function(e,t){var n=e.className,r=pE(e,sE);return React.createElement("hr",dE({ref:t,className:re("border-0 border-t border-border-subtle border-solid m-0",n)},r))}));kE.displayName="SearchBox.Separator",yE.Input=vE,yE.Loading=SE,yE.Separator=kE,yE.Content=bE,yE.List=wE,yE.Empty=xE,yE.Group=_E,yE.Item=EE;var CE=yE;function NE(e){return NE="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},NE(e)}var TE=["children","className"],PE=["children"],OE=["children","as"];function DE(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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function RE(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 jE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RE(Object(n),!0).forEach((function(t){ME(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ME(e,t,n){return(t=function(e){var t=function(e){if("object"!=NE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=NE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==NE(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AE(){return AE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AE.apply(null,arguments)}function IE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var FE=(0,s.createContext)(),LE=function(e){var t=e.placement,n=void 0===t?"bottom":t,r=e.offset,o=void 0===r?10:r,i=e.boundary,a=void 0===i?"clippingAncestors":i,c=e.dropdownPortalRoot,u=void 0===c?null:c,d=e.dropdownPortalId,f=void 0===d?"":d,m=e.children,p=e.className,h=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 IE(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)?IE(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)(!1)),g=h[0],y=h[1],v=Vr({open:g,onOpenChange:y,placement:n,strategy:"absolute",middleware:[kn(o),Nn({boundary:a}),Cn({boundary:a})],whileElementsMounted:mn}),b=v.refs,w=v.floatingStyles,x=v.context,_=Yr([Fr(x),Wr(x),Qr(x,{role:"menu"})]),E=_.getReferenceProps,S=_.getFloatingProps,k=no(x,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),C=k.isMounted,N=k.styles;return l().createElement(FE.Provider,{value:{handleClose:function(){return y(!1)}}},l().createElement("div",{className:re("relative inline-block",p)},l().createElement("div",AE({ref:b.setReference,onClick:function(){return y((function(e){return!e}))},role:"button",tabIndex:0},E(),{className:"cursor-pointer"}),l().Children.map(m,(function(e){var t;return"DropdownMenu.Trigger"===(null===(t=e.type)||void 0===t?void 0:t.displayName)?e:null}))),C&&l().createElement(Cr,{id:f,root:u},l().createElement("div",AE({ref:b.setFloating,style:jE(jE({},w),N)},S()),l().Children.map(m,(function(e){var t;return"DropdownMenu.Content"===(null===(t=e.type)||void 0===t?void 0:t.displayName)?e:null}))))))};LE.displayName="DropdownMenu";var zE=l().forwardRef((function(e,t){var n=e.children,r=e.className;return l().createElement("div",{ref:t,role:"button",tabIndex:0,className:r},n)}));zE.displayName="DropdownMenu.Trigger";var BE=function(e){var t=e.children,n=e.className,r=DE(e,TE);return l().createElement("div",{className:re("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",n)},l().createElement(Yx,r,t))};BE.displayName="DropdownMenu.Content";var WE=function(e){var t=e.children,n=DE(e,PE);return l().createElement(Yx.List,n,t)};WE.displayName="DropdownMenu.List";var VE=function(e){var t,n=e.children,r=e.as,o=void 0===r?Yx.Item:r,i=DE(e,OE),a=(0,s.useContext)(FE).handleClose;return n?o===s.Fragment?(0,s.cloneElement)(n,{onClick:oe(null===(t=n.props)||void 0===t?void 0:t.onClick,a)}):l().createElement(o,AE({},i,{className:"px-2",onClick:oe(i.onClick,a)}),n):null};VE.displayName="DropdownMenu.Item";var UE=function(e){var t=AE({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return l().createElement(Yx.Separator,t)};UE.displayName="DropdownMenu.Separator";var HE=Object.assign(LE,{Trigger:zE,Content:BE,List:WE,Item:VE,Separator:UE});function $E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var YE=(0,s.createContext)(),qE=function(){return(0,s.useContext)(YE)},KE=Object.assign((function(e){var t=e.open,n=e.setOpen,r=e.children,o=e.trigger,i=e.className,a=e.exitOnClickOutside,l=void 0!==a&&a,c=e.exitOnEsc,u=void 0===c||c,d=e.design,f=void 0===d?"simple":d,m=e.position,p=void 0===m?"right":m,h=e.transitionDuration,g=void 0===h?.2:h,y=e.scrollLock,v=void 0===y||y,b=void 0!==t&&void 0!==n,w=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 $E(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)?$E(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)(!1)),x=w[0],_=w[1],E=(0,s.useRef)(null),S=(0,s.useRef)(null),k=(0,s.useMemo)((function(){return b?t:x}),[t,x]),C=(0,s.useMemo)((function(){return b?n:_}),[_,_]),N=function(){k||C(!0)},T=function(){k&&C(!1)},P=(0,s.useCallback)((function(){return(0,s.isValidElement)(o)?(0,s.cloneElement)(o,{onClick:oe(N,o.props.onClick)}):"function"==typeof o?o({onClick:N}):null}),[o,N,T]),O=function(e){"Escape"===e.key&&u&&T()},D=function(e){l&&E.current&&!E.current.contains(e.target)&&T()};return(0,s.useEffect)((function(){return window.addEventListener("keydown",O),document.addEventListener("mousedown",D),function(){window.removeEventListener("keydown",O),document.removeEventListener("mousedown",D)}}),[k]),(0,s.useEffect)((function(){if(v)return k&&(document.querySelector("html").style.overflow="hidden"),function(){document.querySelector("html").style.overflow=""}}),[k]),React.createElement(React.Fragment,null,P(),React.createElement(YE.Provider,{value:{open:k,setOpen:C,handleClose:T,design:f,position:p,drawerContainerRef:S,drawerRef:E,transitionDuration:{duration:g}}},React.createElement("div",{className:re("fixed z-999999 w-0 h-0 overflow-visible",i),role:"dialog",ref:S},r)))}),{displayName:"Drawer"}),GE={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},XE=Object.assign((function(e){var t=e.children,n=e.className,r=qE(),o=r.open,i=r.position,a=r.handleClose,s=r.drawerRef,l=r.transitionDuration;return React.createElement(wm,null,o&&React.createElement("div",{className:"fixed inset-0"},React.createElement("div",{className:re("flex items-center justify-center h-full",{"justify-start":"left"===i,"justify-end":"right"===i})},React.createElement(vf.div,{ref:s,className:re("flex flex-col gap-5 w-120 h-full bg-background-primary shadow-2xl my-5 overflow-hidden",n),initial:"exit",animate:"open",exit:"exit",variants:GE[i],transition:l},"function"==typeof t?t({close:a}):t))))}),{displayName:"Drawer.Panel"}),JE=["children","className"];function ZE(){return ZE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZE.apply(null,arguments)}var QE=Object.assign((function(e){var t=e.children,n=e.className,r=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,JE);return React.createElement("div",ZE({className:re("space-y-2 px-5 pt-5 pb-1",n)},r),t)}),{displayName:"Drawer.Header"}),eS=["children","as","className"];function tS(){return tS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tS.apply(null,arguments)}var nS=Object.assign((function(e){var t=e.children,n=e.as,r=void 0===n?"h3":n,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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,eS);return React.createElement(r,tS({className:re("text-base font-semibold text-text-primary m-0 p-0",o)},i),t)}),{displayName:"Drawer.Title"}),rS=["children","as","className"];function oS(){return oS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oS.apply(null,arguments)}var iS=Object.assign((function(e){var t=e.children,n=e.as,r=void 0===n?"p":n,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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,rS);return React.createElement(r,oS({className:re("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",o)},i),t)}),{displayName:"Drawer.Description"}),aS=["children","className"];function sS(){return sS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sS.apply(null,arguments)}var lS=Object.assign((function(e){var t=e.children,n=e.className,r=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,aS);return React.createElement("div",sS({className:re("px-5 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",n)},r),t)}),{displayName:"Drawer.Body"}),cS=Object.assign((function(e){var t=e.children,n=e.className,r=qE(),o=r.design,i=r.handleClose;return React.createElement("div",{className:re("p-5 flex justify-end gap-3 mt-auto",{"bg-background-secondary":"footer-divided"===o},n)},t?"function"==typeof t?t({close:i}):t:null)}),{displayName:"Drawer.Footer"}),uS=["className"],dS=["children","as"];function fS(){return fS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fS.apply(null,arguments)}function mS(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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var pS=function(e){var t=e.className,n=mS(e,uS);return React.createElement("button",fS({className:re("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",t),"aria-label":"Close drawer"},n),React.createElement(Ao,{className:"size-4 text-text-primary shrink-0"}))},hS=Object.assign((function(e){var t=e.children,n=e.as,r=void 0===n?s.Fragment:n,o=mS(e,dS),i=qE().handleClose;return(0,s.isValidElement)(t)&&t?r===s.Fragment?"function"==typeof t?t({close:i}):(0,s.cloneElement)(t,{onClick:i}):React.createElement(r,fS({},o,{onClick:i}),t):React.createElement(pS,fS({onClick:i},o))}),{displayName:"Drawer.CloseButton"}),gS=["className"];function yS(){return yS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yS.apply(null,arguments)}var vS={open:{opacity:1},exit:{opacity:0}},bS=Object.assign((function(e){var t=e.className,n=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,gS),r=qE(),o=r.open,i=r.drawerContainerRef,a=r.transitionDuration;return i.current&&(0,Gt.createPortal)(React.createElement(wm,null,o&&React.createElement(vf.div,yS({className:re("fixed inset-0 -z-10 bg-background-inverse/90 backdrop-blur-sm",t)},n,{initial:"exit",animate:"open",exit:"exit",variants:vS,transition:a}))),i.current)}),{displayName:"Drawer.Backdrop"}),wS=Object.assign(KE,{Panel:XE,Header:QE,Title:nS,Description:iS,Body:lS,CloseButton:hS,Footer:cS,Backdrop:bS});const xS=xe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var _S={xs:{general:"px-2 text-xs",ellipse:"px-1.5 text-xs",icon:"px-1 text-xs"},sm:{general:"px-3 text-xs",ellipse:"px-2.5 text-xs",icon:"px-2 text-xs"},md:{general:"px-4 text-sm",ellipse:"px-2.5 text-sm",icon:"px-2.5 text-sm"},lg:{general:"px-5 text-base",ellipse:"px-4 text-base",icon:"px-3 text-base"}},ES="group disabled:border-field-border-disabled opacity-50",SS=["size","disabled","children","className"],kS=["className"],CS=["isActive","className","children"],NS=["icon","isActive","tag","children","className"],TS=["icon"],PS=["icon"];function OS(){return OS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OS.apply(null,arguments)}function DS(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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var RS=(0,s.createContext)(),jS=function(){return(0,s.useContext)(RS)},MS=function(e){var t=e.size,n=void 0===t?"sm":t,r=e.disabled,o=void 0!==r&&r,i=e.children,a=e.className,s=DS(e,SS);return React.createElement(RS.Provider,{value:{size:n,disabled:o}},React.createElement("nav",OS({role:"navigation","aria-label":"pagination",className:re("flex w-full justify-center box-border m-0",a)},s),i))};MS.displayName="Pagination";var AS=(0,s.forwardRef)((function(e,t){var n=e.className,r=DS(e,kS);return React.createElement("ul",OS({ref:t,className:re("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",n)},r))}));AS.displayName="Pagination.Content";var IS=(0,s.forwardRef)((function(e,t){var n=e.isActive,r=void 0!==n&&n,o=e.className,i=e.children,a=DS(e,CS),s=jS().disabled;return React.createElement("li",{ref:t,tabIndex:0,className:re("flex",s&&ES)},React.createElement(FS,OS({isActive:r,disabled:s,className:o},a),i))}));IS.displayName="Pagination.Item";var FS=function(e){var t=e.icon,n=void 0===t?null:t,r=e.isActive,o=void 0!==r&&r,i=e.tag,a=void 0===i?"a":i,s=e.children,l=e.className,c=DS(e,NS),u=jS(),d=u.size,f=u.disabled;return React.createElement(ue,OS({tag:a,size:d,variant:"ghost",className:re("no-underline bg-transparent p-0 m-0 border-none","flex justify-center items-center rounded text-button-secondary","focus:outline focus:outline-1 focus:outline-border-subtle focus:bg-button-tertiary-hover",_S[d].general,!f&&o&&"text-button-primary active:text-button-primary bg-brand-background-50",f&&[ES,"group-disabled:text-icon-disabled","group-disabled:text-field-color-disabled","focus:ring-transparent cursor-not-allowed"],l),disabled:f,icon:n},c),s)},LS=function(e){var t=e.icon,n=void 0===t?React.createElement(xS,null):t,r=DS(e,TS),o=jS(),i=o.size,a=o.disabled;return React.createElement("li",{tabIndex:0,className:re("flex",a&&ES)},React.createElement(FS,OS({icon:n,"aria-label":"Go to previous page",className:_S[i].icon},r)))};LS.displayName="Pagination.Previous";var zS=function(e){var t=e.icon,n=void 0===t?React.createElement(i_,null):t,r=DS(e,PS),o=jS(),i=o.size,a=o.disabled;return React.createElement("li",{tabIndex:0,className:re("flex",a&&ES)},React.createElement(FS,OS({icon:n,"aria-label":"Go to next page",className:_S[i].icon},r)))};zS.displayName="Pagination.Next";var BS=function(e){var t=jS(),n=t.size,r=t.disabled;return React.createElement("li",{tabIndex:0,className:re("flex",r&&ES)},React.createElement("span",OS({className:re(_S[n].ellipse,r&&ES)},e),"..."))};BS.displayName="Pagination.Ellipsis",MS.Content=AS,MS.Item=IS,MS.Previous=LS,MS.Next=zS,MS.Ellipsis=BS;var WS,VS,US,HS=MS;function $S(e){return s.createElement("button",{...e})}function YS(e){return s.createElement("span",{...e})}function qS(e){const{size:t=24,orientation:n="left",className:r}=e;return s.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&s.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&s.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&s.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&s.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))}function KS(e){const{day:t,modifiers:n,...r}=e;return s.createElement("td",{...r})}function GS(e){const{day:t,modifiers:n,...r}=e,o=s.useRef(null);return s.useEffect((()=>{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 JS(e){return s.createElement("div",{...e})}function ZS(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 pk(e){return s.createElement("thead",null,s.createElement("tr",{...e}))}function hk(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 _k(e,t){return xk(t||e,e)}function Ek(e,t,n){const r=_k(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=_k(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 Ek(e,7*t,n)}function Ck(e){const t=_k(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 Tk(e,t){const n=_k(e,t?.in);return n.setHours(0,0,0,0),n}function Pk(e,t,n){const[r,o]=Nk(n?.in,e,t),i=Tk(r),a=Tk(o),s=+i-Ck(i),l=+a-Ck(a);return Math.round((s-l)/864e5)}let Ok={};function Dk(){return Ok}function Rk(e,t){const n=Dk(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=_k(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function jk(e,t){const n=_k(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}const Mk={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Ak(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ik={date:Ak({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ak({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:Ak({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;t<e.length;t++)if(e[t].test(a))return t}(s):function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(a))return t}(s);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const Wk={ordinalNumber:(Vk={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(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=Mk[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 Hk(e,t){const n=_k(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $k(e,t){const n=Dk(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=_k(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Yk(e,t){return $k(e,{...t,weekStartsOn:1})}function qk(e,t){const n=_k(e,t?.in),r=n.getFullYear(),o=xk(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Yk(o),a=xk(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Yk(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Kk(e,t){const n=_k(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=_k(e,t?.in),r=n.getFullYear(),o=Dk(),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=$k(a,t),l=xk(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=$k(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Xk(e,t){const n=_k(e,t?.in),r=+$k(n,t)-+function(e,t){const n=Dk(),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),$k(i,t)}(n,t);return Math.round(r/bk)+1}function Jk(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Zk={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Jk("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Jk(n+1,2)},d(e,t){return Jk(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){return Jk(e.getHours()%12||12,t.length)},H(e,t){return Jk(e.getHours(),t.length)},m(e,t){return Jk(e.getMinutes(),t.length)},s(e,t){return Jk(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds();return Jk(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 Zk.y(e,t)},Y:function(e,t,n,r){const o=Gk(e,r),i=o>0?o:1-o;return"YY"===t?Jk(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Jk(i,t.length)},R:function(e,t){return Jk(qk(e),t.length)},u:function(e,t){return Jk(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 Jk(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 Jk(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 Zk.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 Jk(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"}):Jk(o,t.length)},I:function(e,t,n){const r=Kk(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Jk(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Zk.d(e,t)},D:function(e,t,n){const r=function(e){const t=_k(e,undefined);return Pk(t,Hk(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Jk(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 Jk(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 Jk(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 Jk(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 Zk.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Zk.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Jk(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Jk(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Zk.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Zk.s(e,t)},S:function(e,t){return Zk.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 Jk(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Jk(+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+Jk(i,2)}function tC(e,t){return e%60==0?(e>0?"-":"+")+Jk(Math.abs(e)/60,2):nC(e,t)}function nC(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Jk(Math.trunc(r/60),2)+t+Jk(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,pC=/[a-zA-Z]/;function hC(e,t,n){const r=Dk(),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=_k(e,n?.in);if(!function(e){return!(!cC(e)&&"number"!=typeof e||isNaN(+_k(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(pC))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=_k(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}const vC={addDays:Ek,addMonths:Sk,addWeeks:kk,addYears:function(e,t,n){return Sk(e,12*t,n)},differenceInCalendarDays:Pk,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:jk,endOfWeek:Rk,endOfYear:function(e,t){const n=_k(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n},format:hC,getISOWeek:Kk,getWeek:Xk,isAfter:function(e,t){return+_k(e)>+_k(t)},isBefore:function(e,t){return+_k(e)<+_k(t)},isDate:cC,isSameDay:function(e,t,n){const[r,o]=Nk(n?.in,e,t);return+Tk(r)==+Tk(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=_k(e,r);(!n||n<t||isNaN(+t))&&(n=t)})),xk(r,n||NaN)},min:function(e,t){let n,r=t?.in;return e.forEach((e=>{r||"object"!=typeof e||(r=xk.bind(null,e));const t=_k(e,r);(!n||n>t||isNaN(+t))&&(n=t)})),xk(r,n||NaN)},setMonth:function(e,t,n){const r=_k(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=_k(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=_k(e,n?.in);return isNaN(+r)?xk(n?.in||e,NaN):(r.setFullYear(t),r)},startOfDay:Tk,startOfISOWeek:Yk,startOfMonth:yC,startOfWeek:$k,startOfYear:Hk};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 _C(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(EC);return t?SC(e,t.slice(1)):NaN}}const EC=/([+-]\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(_C(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)),TC(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-_C(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 TC(e){const t=_C(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=_C(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-_C(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()),TC(e),+this},kC.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),NC(this),+this}))}));class PC extends kC{static tz(e,...t){return t.length?new PC(...t,e):new PC(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 PC(+this,e)}[Symbol.for("constructDateFrom")](e){return new PC(+new Date(e),this.timeZone)}}function OC(e,t,n=vC){return n.format(e,"LLLL y",t)}const DC=OC;function RC(e,t,n=vC){return n.format(e,"d",t)}function jC(e,t=Uk){return t.localize?.month(e)}function MC(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function AC(){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 HC(){return""}function $C(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 JC(e){return"Choose the Year"}function ZC(e,t){const{month:n,defaultMonth:r,today:o=(e.timeZone?PC.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:p,endOfISOWeek:h,startOfWeek:g,endOfWeek:y,max:v,min:b}=a;let w={day:u,week:m,month:d,year:f,startOfWeek:e=>c?p(e):g(e,{locale:l,weekStartsOn:s}),endOfWeek:e=>c?h(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<e.length&&!a;){const s=e[i],l=t(s);l[VS.disabled]||l[VS.hidden]||l[VS.outside]||(l[VS.focused]||r?.isEqualTo(s)||n(s.date)||l[VS.today])&&(o=s,a=!0),i++}return o||(o=e.find((e=>{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:p,onDayClick:h,onDayFocus:g,onDayKeyDown:y,onDayMouseEnter:v,onDayMouseLeave:b,onNextClick:w,onPrevClick:x,showWeekNumber:_,styles:E,useAdditionalDayOfYearTokens:S,useAdditionalWeekYearTokens:k,weekStartsOn:C}=e,N={locale:c,weekStartsOn:C,firstWeekContainsDate:f,useAdditionalWeekYearTokens:k,useAdditionalDayOfYearTokens:S},T=N,{formatCaption:P,formatDay:O,formatMonthDropdown:D,formatWeekNumber:R,formatWeekNumberHeader:j,formatWeekdayName:M,formatYearDropdown:A}=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 p=e.captionLayout?.startsWith("dropdown");return n?n=a(n):u?n=new Date(u,0,1):!n&&p&&(n=o(l(e.today??(e.timeZone?PC.tz(e.timeZone):t.Date?new t.Date:new Date),-100))),r?r=s(r):d?r=new Date(d,11,31):!r&&p&&(r=c(e.today??(e.timeZone?PC.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=ZC(e,t),[l,c]=nN(a,e.month?o(e.month):void 0);(0,s.useEffect)((()=>{const n=ZC(e,t);c(n)}),[e.timeZone]);const u=function(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)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:p,differenceInCalendarDays:h,differenceInCalendarMonths:g,isAfter:y,endOfMonth:v}=r,b=a?f(o):u(o,{weekStartsOn:c,locale:l}),w=h(a?m(v(i)):d(v(i),{weekStartsOn:c,locale:l}),b),x=g(i,o)+1,_=[];for(let e=0;e<=w;e++){const n=p(b,e);if(t&&y(n,t))break;_.push(n)}const E=42*x;if(s&&_.length<E)for(let e=0;e<7;e++){const e=p(_[_.length-1],1);_.push(e)}return _}(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}),p=n.ISOWeek?s(l(f)):i(l(f),{locale:n.locale,weekStartsOn:n.weekStartsOn}),h=t.filter((e=>e>=m&&e<=p));if(n.fixedWeeks&&h.length<42){const e=t.filter((e=>e>p&&e<=c(p,7)));h.push(...e)}const g=h.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),p=f.reduce(((e,t)=>[...e,...t.weeks.reduce(((e,t)=>[...e,...t.days]),[])]),[]),h=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)<i?void 0:s(u,c)}(l,r,e,t),{disableNavigation:y,onMonthChange:v}=e,b=e=>{if(y)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),c(t),v?.(t)};return{months:f,weeks:m,days:p,navStart:n,navEnd:r,previousMonth:h,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,H=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,p=Boolean(m&&!c(e,m)),h=Boolean(r&&iN(e,r,n)),g=Boolean(o&&iN(e,o,n))||!a&&p,y=l(e,s??(t.timeZone?PC.tz(t.timeZone):n.Date?new n.Date:new Date));p&&u.outside.push(f),h&&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:$,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&&t<n)&&(d={from:e,to:void 0})}return d}(o,c,d,f,i,t):void 0;if(m?.from&&m.to){let e=m.from;for(;t.differenceInCalendarDays(m.to,e)>0;)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:J,setFocused:Z}=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?PC.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!==h,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(),Z(e),Y?.(e.date,t,n),h?.(e.date,t,n)}),[Y,h,Z]),me=(0,s.useCallback)(((e,t)=>n=>{Z(e),g?.(e.date,t,n)}),[g,Z]),pe=(0,s.useCallback)(((e,t)=>n=>{K(),p?.(e.date,t,n)}),[K,p]),he=(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];J(e,t)}y?.(t.date,n,r)}),[J,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:{...E?.[WS.Root],...e.style}})),[u,e.className,e.style,E]),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:$,months:L,nextMonth:V,previousMonth:W,goToMonth:U,getModifiers:H,components:t,classNames:u,styles:E,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:E?.[WS.Months]},!e.hideNavigation&&s.createElement(t.Nav,{className:u[WS.Nav],style:E?.[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&&l<s(t)||n&&l>s(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),p=[];let h=f;for(;c(h,m)||u(h,m);)p.push(h.getFullYear()),h=l(h,1);return p.map((e=>{const a=o.Date?new o.Date(e,d):new Date(e,d),s=t&&a<i(t)||d&&n&&a>i(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:E?.[WS.Month],key:o,displayIndex:o,calendarMonth:r},s.createElement(t.MonthCaption,{className:u[WS.MonthCaption],style:E?.[WS.MonthCaption],calendarMonth:r,displayIndex:o},d?.startsWith("dropdown")?s.createElement(t.DropdownNav,{className:u[WS.Dropdowns],style:E?.[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:E?.[WS.Dropdown],value:r.date.getMonth()}):s.createElement("span",{role:"status","aria-live":"polite"},D(r.date.getMonth())),"dropdown"===d||"dropdown-years"===d?s.createElement(t.YearsDropdown,{className:u[WS.YearsDropdown],"aria-label":se(T),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:E?.[WS.Dropdown],value:r.date.getFullYear()}):s.createElement("span",{role:"status","aria-live":"polite"},A(r.date.getFullYear()))):s.createElement(t.CaptionLabel,{className:u[WS.CaptionLabel],role:"status","aria-live":"polite"},P(r.date,N,l))),s.createElement(t.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===m||"range"===m,"aria-label":te(r.date,T,l)||void 0,className:u[WS.MonthGrid],style:E?.[WS.MonthGrid]},!e.hideWeekdays&&s.createElement(t.Weekdays,{className:u[WS.Weekdays],style:E?.[WS.Weekdays]},_&&s.createElement(t.WeekNumberHeader,{"aria-label":ae(T),className:u[WS.WeekNumberHeader],style:E?.[WS.WeekNumberHeader],scope:"col"},j()),le.map(((e,n)=>s.createElement(t.Weekday,{"aria-label":oe(e,T,l),className:u[WS.Weekday],key:n,style:E?.[WS.Weekday],scope:"col"},M(e,N,l))))),s.createElement(t.Weeks,{className:u[WS.Weeks],style:E?.[WS.Weeks]},r.weeks.map(((n,r)=>s.createElement(t.Week,{className:u[WS.Week],key:n.weekNumber,style:E?.[WS.Week],week:n},_&&s.createElement(t.WeekNumber,{week:n,style:E?.[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=H(n);if(o[VS.focused]=!o.hidden&&Boolean(G?.isEqualTo(n)),o[US.selected]=!o.disabled&&($?.(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,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,T,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:E?.[WS.DayButton],type:"button",day:n,modifiers:o,disabled:o.disabled||void 0,tabIndex:X(n)?0:-1,"aria-label":Q(r,o,T,l),onClick:fe(n,o),onBlur:pe(n,o),onFocus:me(n,o),onKeyDown:he(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:E?.[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 hC(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 pN(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 hN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pN(Object(n),!0).forEach((function(t){gN(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gN(e,t,n){return(t=function(e){var t=function(e){if("object"!=fN(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=fN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fN(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yN(){return yN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yN.apply(null,arguments)}function vN(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)||bN(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 bN(e,t){if(e){if("string"==typeof e)return wN(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wN(e,t):void 0}}function wN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var xN=function(e){var t=e.width,n=e.className,r=e.classNames,o=e.selectedDates,i=e.setSelectedDates,a=e.showOutsideDays,c=void 0===a||a,u=e.mode,d=void 0===u?"single":u,f=e.variant,m=void 0===f?"normal":f,p=e.alignment,h=void 0===p?"horizontal":p,g=(e.onBlur,e.onChange,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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,mN)),y=g.numberOfMonths,v=vN((0,s.useState)(!1),2),b=v[0],w=v[1],x=vN((0,s.useState)(!1),2),_=x[0],E=x[1],S=vN((0,s.useState)((new Date).getFullYear()),2),k=S[0],C=S[1],N=vN((0,s.useState)(k-k%24),2),T=N[0],P=N[1];null==o&&(o="multiple"===d?[]:"range"===d?{from:null,to:null}:null);var O=function(e){var t=e.weekdays;return l().createElement("div",{className:"flex justify-between"},t.map((function(e,t){return l().createElement("button",{key:t,className:"h-10 w-10 px-1.5 py-2 text-center text-muted-foreground text-[0.8rem] font-normal content-center bg-transparent border-none"},e)})))},D=function(e){var t,n=e.day,r=e.modifiers,i=e.onSelect,a=r.selected,s=r.today,u=r.disabled,d=r.outside,f=r.range_middle,m=r.range_start,p=r.range_end,h=m||p||f,g=new Date,y=null===(t=o)||void 0===t?void 0:t.to,v=hC(n.displayMonth,"yyyy-MM")===hC(g,"yyyy-MM"),b=y&&hC(y,"yyyy-MM")===hC(n.date,"yyyy-MM"),w=cN(g,1),x=hC(n.date,"yyyy-MM")===hC(w,"yyyy-MM"),_=v||b||h,E=!c&&d,S=re("h-10 w-10 flex items-center justify-center transition text-text-secondary relative","border-none rounded",!a&&!h||d&&!x?"bg-transparent hover:bg-button-tertiary-hover":"bg-background-brand text-text-on-color",f&&_&&(!d||h)?"bg-brand-background-50 text-text-secondary rounded-none":"",u?"opacity-50 cursor-not-allowed text-text-disabled":"cursor-pointer",d&&!h||!_&&d||d&&!x?"bg-transperant opacity-50 text-text-disabled cursor-auto":"");return l().createElement("button",{onClick:function(){return!u&&i(n.date)},className:S,disabled:u||d,"aria-label":hC(n.date,"EEEE, MMMM do, yyyy")},(!E||h&&_)&&hC(n.date,"d"),s&&l().createElement("span",{className:"absolute h-1 w-1 bg-background-brand rounded-full bottom-1"}))},R=function(e){var t=e.day,n=e.modifiers,r=e.className,o=e.onSelect;return l().createElement("td",{className:r},l().createElement(D,{day:t,modifiers:n,onSelect:o}))},j=function(e){var t=e.monthGridProps,n=e.onSelect;return l().createElement("div",{className:"flex flex-col"},t.children[1].props.children.map((function(e,t){return l().createElement("div",{key:t,className:"flex flex-row justify-between"},e.props.children[1].map((function(e,t){return l().createElement("div",{key:t,className:"flex gap-1"},l().createElement(D,yN({},e.props,{onSelect:n})))})))})))},M=function(e){var t;"range"===d?!o.from||o.from&&o.to?i({from:e,to:null}):i({from:o.from,to:e}):"multiple"===d?o.some((function(t){return hC(t,"yyyy-MM-dd")===hC(e,"yyyy-MM-dd")}))?i(o.filter((function(t){return hC(t,"yyyy-MM-dd")!==hC(e,"yyyy-MM-dd")}))):i([].concat(function(e){if(Array.isArray(e))return wN(e)}(t=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||bN(t)||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.")}(),[e])):"single"===d&&i([e])},A=re("relative bg-background-primary shadow-datepicker-wrapper",t,"vertical"===h?"flex flex-col":"flex flex-row gap-3","normal"===m?"rounded-md border border-solid border-border-subtle":"","presets"===m?"rounded-tr-md border border-solid border-border-subtle":"","dualdate"===m?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"");return l().createElement(l().Fragment,null,l().createElement(lN,yN({mode:d,selected:o,onSelect:M,hideNavigation:!0,captionLayout:"label",className:re(n),formatters:{formatWeekdayName:dN},showHead:!1,classNames:hN({months:A,month:"flex flex-col p-2 gap-1 text-center border border-border-subtle rounded-md w-full",caption:"relative flex justify-center items-center",table:"w-full border-separate border-spacing-[0_0.25rem] border-spacing-0",head_row:"flex mb-1",head_cell:"text-muted-foreground rounded-md w-10 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-10 w-10 text-center text-sm p-0 relative",day:"h-10 w-10 p-0 font-normal bg-background-primary text-current"},r),components:{MonthCaption:function(e){var t=ok(),n=t.goToMonth,r=t.nextMonth,o=t.previousMonth,i=hC(e.calendarMonth.date,"yyyy"),a=hC(e.calendarMonth.date,"MMMM"),s=new Date(e.calendarMonth.date);s.setDate(s.getDate()-s.getDay());var c,u=Array.from({length:7},(function(e,t){var n=new Date(s);return n.setDate(s.getDate()+t),dN(n)}));return c=_?"".concat(T," - ").concat(T+23):b?i:"".concat(a," ").concat(i),l().createElement(l().Fragment,null,l().createElement("div",{className:"flex justify-between"},l().createElement(ue,{variant:"ghost",onClick:function(){if(_)P(T-24);else if(b){var t=new Date(k-1,e.calendarMonth.date.getMonth());C(t.getFullYear()),n(t)}else n(o)},className:"bg-background-primary border-none cursor-pointer"},l().createElement(xS,{className:"h-4 w-4"})),l().createElement(ue,{variant:"ghost",onClick:function(){y>1||(b?(E(!0),w(!1)):_?E(!1):w(!b))}},c),l().createElement(ue,{variant:"ghost",onClick:function(){if(_)P(T+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(i_,{className:"h-4 w-4"}))),_&&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}))}(T).map((function(t){return l().createElement(ue,{key:t,variant:"ghost",onClick:function(){return function(t){C(t),E(!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&&!_&&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")},hC(new Date(0,r),"MMM"),(new Date).getMonth()===r&&(new Date).getFullYear()===k&&uN())}))),!b&&!_&&l().createElement(O,{weekdays:u}))},Day:function(e){return l().createElement(R,yN({},e,{onSelect:M}))},Weekdays:function(){return null},Months:function(e){return l().createElement(l().Fragment,null,l().createElement("div",{className:A},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&&!_&&l().createElement(j,{monthGridProps:e,onSelect:M})}}},g)))};function _N(e){return Tk(Date.now(),e)}function EN(e){return xk(e,Date.now())}function SN(e){const t=EN(e?.in),n=t.getFullYear(),r=t.getMonth(),o=t.getDate(),i=EN(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;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NN.apply(null,arguments)}function TN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var PN=function(e){var t=e.selectionType,n=void 0===t?"single":t,r=e.variant,o=void 0===r?"normal":r,i=e.presets,a=void 0===i?[]:i,c=e.onCancel,u=e.onApply,d=e.applyButtonText,f=void 0===d?"Apply":d,m=e.cancelButtonText,p=void 0===m?"Cancel":m,h=e.showOutsideDays,g=void 0===h||h,y=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<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,CN),v=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 TN(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)?TN(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)((function(){return"multiple"===n?[]:"range"===n?{from:null,to:null}:null}))),b=v[0],w=v[1],x=[{label:"Today",range:{from:_N(),to:_N()}},{label:"Yesterday",range:{from:SN(),to:SN()}},{label:"This Week",range:{from:$k(new Date,{weekStartsOn:1}),to:Rk(new Date,{weekStartsOn:1})}},{label:"Last Week",range:{from:$k(kN(new Date,1),{weekStartsOn:1}),to:Rk(kN(new Date,1),{weekStartsOn:1})}},{label:"This Month",range:{from:yC(new Date),to:jk(new Date)}},{label:"Last Month",range:{from:yC(cN(new Date,1)),to:jk(cN(new Date,1))}}],_=a.length>0?a:x,E=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:E},p),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"},_.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:E},p),l().createElement(ue,{onClick:S},f))}))):void 0};return r}()},338:function(e,t,n){"use strict";var r=n(795);t.H=r.createRoot,r.hydrateRoot},795:function(e){"use strict";e.exports=window.ReactDOM},942:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},992:function(e,t){"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}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,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)},function(){"use strict";var e=n(338),t=window.wp.domReady,r=n.n(t);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function a(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)||i(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.")}()}var s=window.React,l=n.n(s),c=n(282);const u=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&n.indexOf(e)===t)).join(" ");var d={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 f=(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,...d,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:u("lucide",o),...l},[...a.map((([e,t])=>(0,s.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),m=(e,t)=>{const n=(0,s.forwardRef)((({className:n,...r},o)=>{return(0,s.createElement)(f,{ref:o,iconNode:t,className:u(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i}));return n.displayName=`${e}`,n},p=m("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"}]]),h=m("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"}]]),g=m("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"}]]),y=m("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"}]]);var v=window.wp.i18n,b={dashboard:{path:"dashboard"},widgets:{path:"widgets"},settings:{path:"settings"},headerFooterBuilder:{path:"elementor-hf"},onboarding:{path:"onboarding"}};function w(e){return w="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},w(e)}function x(e){var t=function(e){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x(r.key),r)}}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function k(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C,N=window.wp.element,T=n(992);function P(e){return{path:e.pathname,hash:e.hash,query:T.parse(e.search)}}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(null,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(C||(C={}));var D="beforeunload";function R(e){e.preventDefault(),e.returnValue=""}function j(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}var M=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function o(){var e=n.location,t=e.pathname,o=e.search,i=e.hash,a=r.state||{};return[a.idx,{pathname:t,search:o,hash:i,state:a.usr||null,key:a.key||"default"}]}var i=null;n.addEventListener("popstate",(function(){if(i)d.call(i),i=null;else{var e=C.Pop,t=o(),n=t[0],r=t[1];if(d.length){if(null!=n){var a=l-n;a&&(i={action:e,location:r,retry:function(){y(-1*a)}},y(a))}}else g(e)}}));var a=C.Pop,s=o(),l=s[0],c=s[1],u=j(),d=j();function f(e){return"string"==typeof e?e:(n=(t=e).pathname,r=void 0===n?"/":n,o=t.search,i=void 0===o?"":o,a=t.hash,s=void 0===a?"":a,i&&"?"!==i&&(r+="?"===i.charAt(0)?i:"?"+i),s&&"#"!==s&&(r+="#"===s.charAt(0)?s:"#"+s),r);var t,n,r,o,i,a,s}function m(e,t){return void 0===t&&(t=null),O({pathname:c.pathname,hash:"",search:""},"string"==typeof e?function(e){var t={};if(e){var n=e.indexOf("#");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 p(e,t){return[{usr:e.state,key:e.key,idx:t},f(e)]}function h(e,t,n){return!d.length||(d.call({action:e,location:t,retry:n}),!1)}function g(e){a=e;var t=o();l=t[0],c=t[1],u.call({action:a,location:c})}function y(e){r.go(e)}return null==l&&(l=0,r.replaceState(O({},r.state,{idx:l}),"")),{get action(){return a},get location(){return c},createHref:f,push:function e(t,o){var i=C.Push,a=m(t,o);if(h(i,a,(function(){e(t,o)}))){var s=p(a,l+1),c=s[0],u=s[1];try{r.pushState(c,"",u)}catch(e){n.location.assign(u)}g(i)}},replace:function e(t,n){var o=C.Replace,i=m(t,n);if(h(o,i,(function(){e(t,n)}))){var a=p(i,l),s=a[0],c=a[1];r.replaceState(s,"",c),g(o)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return u.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&n.addEventListener(D,R),function(){t(),d.length||n.removeEventListener(D,R)}}}}(),A=wp.element.createContext({route:P(M.location)}),I=n(67),F=wp.element.useContext,L="";function z(e){var t=e.path,n=e.onRoute,r=e.children,o=F(A).route,i=(0,I.YW)("".concat(t))("".concat(o.hash.substr(1)));return i?(n&&(L!==i.path&&n(),L=i.path),React.createElement("div",null,wp.element.cloneElement(r,{route:i}))):null}var B=n(942),W=n.n(B);function V(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 U=wp.element.useContext;function H(e){var t=e.to,n=e.onClick,r=e.children,o=e.activeClassName,i=U(A).route,a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete a.activeClassName,React.createElement("a",O({},a,{className:W()(k({},o,(0,I.YW)("".concat(t))("".concat(i.hash.substr(1)))),e.className),onClick:function(e){if(e.preventDefault(),i.path!==t||e.target.classList.contains("uae-user-icon"))if(n&&n(e),"elementor-hf"===t&&uaelSettingsData.header_footer_builder)window.location.href=uaelSettingsData.header_footer_builder;else{var r=M.location.search,o=window.location.hash;if(r.includes("admin.php?page=uaepro")&&o.includes(t))if(t.includes("settings")){var a=r+"&tab=1";e.target.classList.contains("uae-user-icon")&&window.location.hash.includes("settings")?window.location.href="".concat(a,"#").concat(t):M.push("".concat(r,"#").concat(t))}else{var s=r.replace(/&tab=[^&]*/,"");M.push("".concat(s,"#").concat(t))}else window.location.href="".concat(uaelSettingsData.uaepro_settings_url,"#").concat(t)}}}),r)}function $(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($=function(){return!!e})()}var Y=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t,n){return t=E(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$()?Reflect.construct(t,n||[],E(e).constructor):t.apply(e,n))}(this,t,[e]),k(n,"handleRouteChange",(function(e){localStorage.setItem("selectedItemId","1");var t=P(null==e?void 0:e.location);n.setState({route:t})})),n.routes=Object.keys(e.routes).map((function(t){return e.routes[t].path})),n.unlisten=M.listen(n.handleRouteChange);var r=P(M.location),o=M.location.search;return n.state={route:r,defaultRoute:null!=e&&e.defaultRoute?"".concat(o,"#").concat(null==e?void 0:e.defaultRoute):"".concat(o,"#/")},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),function(e,t){return t&&_(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentWillUnmount",value:function(){this.unlisten()}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.NotFound,this.state),r=n.route,o=n.defaultRoute;if(!r.hash)return M.push(o),React.createElement("div",null);var i=!1;(this.routes||[]).forEach((function(e){var t=(0,I.YW)(r.hash.substr(1))("".concat(r.hash.substr(1)));t&&(i={name:e,data:t})}));var a={route:r,matched:i},s=!i;return React.createElement(A.Provider,{value:a},s?React.createElement("div",null,"Not found"):t)}}])}(N.Component),q=function(){return q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},q.apply(this,arguments)},K=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},G=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},X={rssFeedURL:"",selector:"",loaderIcon:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">\n\t<circle cx="50" cy="50" fill="none" stroke="#9f9f9f" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138">\n\t\t<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform>\n\t</circle>\n\t</svg>',viewAll:{link:"",label:"View All"},triggerButton:{icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.61703 13.1998C8.04294 13.1503 7.46192 13.125 6.875 13.125H6.25C4.17893 13.125 2.5 11.4461 2.5 9.375C2.5 7.30393 4.17893 5.625 6.25 5.625H6.875C7.46192 5.625 8.04294 5.59972 8.61703 5.55018M8.61703 13.1998C8.82774 14.0012 9.1031 14.7764 9.43719 15.5195C9.64341 15.9782 9.48685 16.5273 9.05134 16.7787L8.50441 17.0945C8.04492 17.3598 7.45466 17.1921 7.23201 16.7106C6.70983 15.5811 6.30451 14.3866 6.03155 13.1425M8.61703 13.1998C8.29598 11.9787 8.125 10.6968 8.125 9.375C8.125 8.05316 8.29598 6.77125 8.61703 5.55018M8.61703 13.1998C11.25 13.427 13.737 14.1643 15.9789 15.3124M8.61703 5.55018C11.25 5.323 13.737 4.58569 15.9789 3.43757M15.9789 3.43757C15.8808 3.12162 15.7751 2.80903 15.662 2.5M15.9789 3.43757C16.4247 4.87356 16.7131 6.37885 16.8238 7.93326M15.9789 15.3124C15.8808 15.6284 15.7751 15.941 15.662 16.25M15.9789 15.3124C16.4247 13.8764 16.7131 12.3711 16.8238 10.8167M16.8238 7.93326C17.237 8.2772 17.5 8.79539 17.5 9.375C17.5 9.95461 17.237 10.4728 16.8238 10.8167M16.8238 7.93326C16.8578 8.40942 16.875 8.8902 16.875 9.375C16.875 9.8598 16.8578 10.3406 16.8238 10.8167" stroke="#94A3B8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',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:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 18L18 6M6 6L18 18" stroke="#94A3B8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',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(),Z.setInstanceID(this.getID()),this.RSS_Fetch_Instance=new Q(this),this.RSS_View_Instance=new ee(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=q(q(q({},X),e),{viewAll:q(q({},X.viewAll),null==e?void 0:e.viewAll),triggerButton:q(q({},X.triggerButton),null==e?void 0:e.triggerButton),flyout:q(q(q({},X.flyout),null==e?void 0:e.flyout),{innerContent:q(q({},X.flyout.innerContent),null===(t=null==e?void 0:e.flyout)||void 0===t?void 0:t.innerContent),excerpt:q(q({},X.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 K(this,void 0,void 0,(function(){var e=this;return G(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.getRSSFeedURLs().map((function(t){var n=t.key;return K(e,void 0,void 0,(function(){var e;return G(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=Z.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?'<a href="'.concat(n.postLink,'" target="_blank">\n\t\t\t\t\t\t\t\t<h2>').concat(n.title,"</h2>\n\t\t\t\t\t\t\t</a>"):"<h2>".concat(n.title,"</h2>"),a='\n\t\t\t\t\t\t\t\t<div class="rss-content-header">\n\t\t\t\t\t\t\t\t\t<p>'.concat(e.RSS_View_Instance.formatDate(new Date(n.date)),"</p>\n\t\t\t\t\t\t\t\t\t").concat(i,"\n\t\t\t\t\t\t\t\t</div>\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<a href="'.concat(e.getArgs().viewAll.link,'" class="button view-all">').concat(e.getArgs().viewAll.label,"</a>\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):Z.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):Z.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}(),Z=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}(),Q=function(){function e(e){var t=this;this.data={},this.RSS=e,this.RSS.getRSSFeedURLs().forEach((function(e){var n=JSON.parse(Z.getSessionData(e.key));n&&n.length&&(t.data[e.key]=n)}))}return e.prototype.fetchData=function(){return K(this,void 0,void 0,(function(){var e,t=this;return G(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 K(t,void 0,void 0,(function(){var t,n,r=this;return G(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(/<a\b((?:(?!target=)[^>])*)>/g,'<a$1 target="_blank">').replace(/<p>\s*<\/p>/g,""),children:JSON.parse((null===(n=t.querySelector("children"))||void 0===n?void 0:n.innerHTML)||"{}")})})),Z.setSessionData(JSON.stringify(this.data[e.key]),e.key),[2]}}))}))})),[4,Promise.all(e)]);case 1:return n.sent(),[2,this.data]}}))}))},e}(),ee=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<a class="whats-new-rss-trigger-button" id="').concat(this.getTriggerButtonID(),'">\n\t\t\t').concat(this.RSS.getArgs().triggerButton.icon,'\n\t\t\t<div class="whats-new-rss-notification-badge hide">0</div>\n\t\t</a>\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('<nav id="'.concat(this.getFlyoutMultiFeedNavID(),'" class="whats-new-rss-multi-feed-nav">')),this.RSS.getRSSFeedURLs().forEach((function(e){t.push('<button type="button" data-feed-key="'.concat(e.key,'">\n\t\t\t\t\t\t').concat(e.label,'\n\t\t\t\t\t\t<div class="new-notification-count"></div>\n\t\t\t\t\t</button>\n\t\t\t\t\t'))})),t.push("</nav>"));var n=document.createElement("div");n.setAttribute("id",this.getFlyoutID()),n.setAttribute("class",e.join(" ")),n.setAttribute("role","dialog"),n.innerHTML='\n\t\t<div class="whats-new-rss-flyout-contents">\n\n\t\t\t<div class="whats-new-rss-flyout-inner-header">\n\n\t\t\t\t<div class="whats-new-rss-flyout-inner-header__title-icon-wrapper">\n\t\t\t\t\t<h3>'.concat(this.RSS.getArgs().flyout.title,'</h3>\n\n\t\t\t\t\t<span class="whats-new-rss-flyout-inner-header__loading-icon">\n\t\t\t\t\t').concat(this.RSS.getArgs().loaderIcon,'\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\n\t\t\t\t<button type="button" id="').concat(this.getFlyoutCloseBtnID(),'">').concat(this.RSS.getArgs().flyout.closeBtnIcon,"</button>\n\t\t\t</div>\n\n\t\t\t").concat(t.join(""),'\n\n\t\t\t<div class="whats-new-rss-flyout-inner-content">\n\t\t\t\t<div class="skeleton-container">\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<div class="whats-new-rss-flyout-overlay"></div>\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<div class="'.concat(r.join(" "),'">\n\t\t\t').concat(t?'<small class="new-post-badge">New ✨</small>':"","\n\t\t\t").concat(e,"\n\t\t</div>\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)?"<p>".concat(s,' <a href="').concat(t,'" target="_blank" class="').concat(i.className,'">').concat(i.label,"</a></p>"):"<p>".concat(s,"</p>")},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<div class="sub-version-header">\n\t\t\t\t\t<h4 class="sub-version-title">'.concat(e.post_title,'</h4>\n\t\t\t\t\t<span class="sub-version-date">').concat(t.formatDate(new Date(e.post_date)),'</span>\n\t\t\t\t</div>\n\t\t\t\t<div class="sub-version-content">').concat(n.documentElement.textContent,"</div>\n\t\t\t"),i.appendChild(r)})),o.innerHTML='<p class="text-see-more">See More</p><p class="text-see-less">See Less</p>',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(r<o){var l=Math.floor(r/6e4);return"".concat(l," minute").concat(l>1?"s":""," ago")}if(r<i){var c=Math.floor(r/o);return"".concat(c," hour").concat(c>1?"s":""," ago")}if(r<a){var u=Math.floor(r/i);return"".concat(u," day").concat(u>1?"s":""," ago")}if(r<s){var d=Math.floor(r/a);return"".concat(d," week").concat(d>1?"s":""," ago")}var f=Math.floor(r/s);return"".concat(f," month").concat(f>1?"s":""," ago")},e}();function te(){var e=window.location.hash;document.querySelectorAll("#adminmenu #toplevel_page_uaepro 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")}))}function ne(){var e=a((0,s.useState)(!1),2),t=e[0],n=e[1],r=a((0,s.useState)(!1),2),o=r[0],i=r[1];(0,s.useEffect)((function(){return te(),window.addEventListener("hashchange",te),function(){window.removeEventListener("hashchange",te)}}),[]),(0,s.useEffect)((function(){var e=function(e){e.target.closest(".uae-help-dropdown")||i(!1)};return document.addEventListener("click",e),function(){return document.removeEventListener("click",e)}}),[]);var u=window.location.hash,d=function(e){return u.includes(e)},f=function(e){return{color:d(e)?"#111827":"#4B5563",borderBottom:d(e)?"2px solid #6005FF":"none",paddingBottom:"22px",marginBottom:"-16px"}},m=function(e){window.open(e,"_blank"),i(!1),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:"#uae-whats-new",triggerButton:{beforeBtn:'<div class="w-4 sm:w-8 h-8 sm:h-10 flex items-center whitespace-nowrap justify-center cursor-pointer rounded-full border border-slate-200">',icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#434141" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-megaphone"><path d="m3 11 18-5v12L3 14v-3z"></path><path d="M11.6 16.8a3 3 0 1 1-5.8-1.6"></path></svg>',afterBtn:"</div>"},flyout:{title:(0,v.__)("What's New?","uael"),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(c.Topbar,{className:"uae-nav-menu relative",style:{width:"unset",padding:"0.5rem",zIndex:"9"}},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(c.Topbar.Left,null,l().createElement(c.Topbar.Item,null,uaelSettingsData.icon_url&&l().createElement(H,{to:b.dashboard.path},l().createElement("img",{src:"".concat(uaelSettingsData.icon_url),alt:"Logo",className:"ml-4 cursor-pointer",style:{height:"35px",width:"35px"}})))),l().createElement(c.Topbar.Middle,{className:"flex-grow",align:"left"},l().createElement("nav",{className:"flex flex-wrap gap-6 mt-2 md:mt-0 cursor-pointer"},l().createElement(H,{to:b.dashboard.path,className:"".concat(d("dashboard")?"active-link":""),style:f("dashboard")},(0,v.__)("Dashboard","uael")),uaelSettingsData.is_lite_active&&l().createElement(H,{to:b.headerFooterBuilder.path,className:"".concat(d("edit.php?post_type=elementor-hf")?"active-link":""),style:f("edit.php?post_type=elementor-hf")},(0,v.__)("Header & Footer","uael")),l().createElement(H,{to:b.widgets.path,className:"".concat(d("widgets")?"active-link":""),style:f("widgets")},(0,v.__)("Widgets","uael")),l().createElement(H,{to:b.settings.path,className:"".concat(d("settings")?"active-link":""),style:f("settings")},(0,v.__)("Settings","uael")))),l().createElement(c.Topbar.Right,{className:"flex flex-col lg:flex-row gap-4 mt-4 md:mt-0"},l().createElement(c.Topbar.Item,null,l().createElement(c.DropdownMenu,{placement:"bottom-start",isOpen:t,onOpenChange:n},l().createElement(c.DropdownMenu.Trigger,null,l().createElement(c.Badge,{label:(0,v.__)("PRO","uael"),size:"md",variant:"neutral",className:"bg-gradient-to-r from-[#A78BFA] to-[#6005FF] text-white hidden md:flex"})),l().createElement(c.DropdownMenu.ContentWrapper,null,l().createElement(c.DropdownMenu.Content,{className:"w-52"},l().createElement(c.DropdownMenu.List,null,l().createElement(c.DropdownMenu.Item,null,(0,v.__)("Version","uael")),uaelSettingsData.is_lite_active&&l().createElement(c.DropdownMenu.Item,null,l().createElement("div",{className:"flex justify-between w-full"},"".concat(uaelSettingsData.uaelite_current_version),l().createElement("img",{src:"".concat(uaelSettingsData.core_badge),alt:"CORE",style:{height:"30px",width:"38px"}}))),l().createElement(c.DropdownMenu.Item,null,l().createElement("div",{className:"flex justify-between w-full"},"".concat(uaelSettingsData.uael_current_version),l().createElement("img",{src:"".concat(uaelSettingsData.pro_badge),alt:"PRO",style:{height:"30px",width:"38px"}})))))))),!uaelSettingsData.hide_settings&&l().createElement(c.Topbar.Item,{className:"gap-4 flex items-center uae-help-dropdown relative"},l().createElement("div",{onClick:function(){return i((function(e){return!e}))},className:"cursor-pointer",title:"Help"},l().createElement(p,null)),o&&l().createElement("div",{className:"absolute right-0 top-8 w-64 bg-white border border-gray-200 rounded shadow-md z-50"},l().createElement("ul",{className:"text-sm text-gray-700"},l().createElement("li",{className:"px-4 py-2 border-b font-semibold"},(0,v.__)("Useful Resources","uael")),l().createElement("li",{className:"px-4 py-2 hover:bg-gray-100 cursor-pointer flex gap-2 items-center",onClick:function(){return m("https://ultimateelementor.com/docs/getting-started-uael/")}},l().createElement(h,null),(0,v.__)("Getting Started","uael")),l().createElement("li",{className:"px-4 py-2 hover:bg-gray-100 cursor-pointer flex gap-2 items-center",onClick:function(){return m("https://ultimateelementor.com/docs-category/widgets/")}},l().createElement(h,null),(0,v.__)("How to use widgets","uael")),l().createElement("li",{className:"px-4 py-2 hover:bg-gray-100 cursor-pointer flex gap-2 items-center",onClick:function(){return m("https://ultimateelementor.com/docs-category/features/")}},l().createElement(h,null),(0,v.__)("How to use features","uael")),l().createElement("li",{className:"px-4 py-2 hover:bg-gray-100 cursor-pointer flex gap-2 items-center",onClick:function(){return m("https://ultimateelementor.com/docs-category/templates/")}},l().createElement(h,null),(0,v.__)("How to use templates","uael")),l().createElement("li",{className:"px-4 py-2 hover:bg-gray-100 cursor-pointer flex gap-2 items-center",onClick:function(){return m("https://ultimateelementor.com/contact/")}},l().createElement(g,null),(0,v.__)("Contact us","uael")))),l().createElement("div",{className:"pb-1",id:"uae-whats-new"}),l().createElement(H,{to:b.settings.path},l().createElement(y,{className:"cursor-pointer uae-user-icon",style:{color:"black"}})))))))}var re=function(){return l().createElement(c.Title,{className:"hfe-header-title m-4",description:"",icon:null,iconPosition:"right",size:"xs",tag:"h6"})};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=m("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var ae=window.wp.apiFetch,se=n.n(ae),le=[],ce=function(){0!==le.length&&le.shift()()},ue=function(e){var t=e.widget,n=e.updateCounter,r=e.showTooltip,o=t.id,i=t.icon,u=t.title,d=(t.infoText,t.is_pro),f=(t.is_active,t.slug,t.demo_url),m=t.doc_url,p=t.description,g=a((0,s.useState)(t.is_active),2),y=g[0],b=g[1],w=a((0,s.useState)(!1),2),x=w[0],_=w[1];(0,s.useEffect)((function(){b(t.is_active)}),[t.is_active,n]);var E=function(e){var t=e?"uael_deactivate_widget":"uael_activate_widget",n=new window.FormData;n.append("action",t),n.append("nonce",uaelSettingsData.ajax_nonce),n.append("module_id",o),n.append("is_pro",d);try{var r=se()({url:uaelSettingsData.ajax_url,method:"POST",body:n});r.success?b(y):r.error}catch(e){}finally{_(!1),ce()}};return l().createElement(c.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==i?void 0:i.props),style:{fontSize:"22px"}},i),l().createElement("div",{className:"flex items-center gap-x-2",style:{marginBottom:"15px"}},l().createElement(c.Switch,{onChange:function(){x||(_(!0),y?(b(!1),le.push((function(){return E(y)}))):(b(!0),le.push((function(){return E(y)}))),1===le.length&&ce())},size:"sm",value:y,className:"uael-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"},(0,v.__)(u,"uael")),l().createElement("div",{className:"flex items-center justify-between w-full"},!uaelSettingsData.hide_settings&&f&&l().createElement("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-text-tertiary m-0 mb-1 uael-remove-ring",style:{textDecoration:"none",lineHeight:"1.5rem"}},(0,v.__)("View Demo","uael")),r&&l().createElement("div",{className:"".concat(f?"":"uae-tooltip-wrap")},l().createElement(c.Tooltip,{arrow:!0,content:l().createElement("div",null,l().createElement("span",{className:"font-semibold block mb-2"},(0,v.__)(u,"uael")),l().createElement("span",{className:"block mb-2"},(0,v.__)(p,"uael")),!uaelSettingsData.hide_settings&&m&&l().createElement("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"cursor-pointer",style:{color:"#C8AEFF",textDecoration:"none"}},l().createElement(h,{style:{color:"#C8AEFF",width:"11px",height:"11px",marginRight:"3px"}}),(0,v.__)("Read Documentation","uael"))),placement:"bottom",title:"",triggers:["click"],variant:"dark",size:"xs"},l().createElement(ie,{className:"h-5 w-5",size:18,color:"#A0A5B2"}))))))};const de=m("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);var fe=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],u=a((0,s.useState)(!0),2),d=u[0];return u[1],(0,s.useEffect)((function(){i(!0),se()({path:"/uael/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_nonce_action}}).then((function(e){var t=function(e){var t=[];for(var n in e)if(null!=e&&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"},(0,v.__)("Popular Widgets & Features","uael")),l().createElement("div",{className:"flex items-center gap-x-2 mr-7"},l().createElement(H,{to:b.widgets.path,className:"text-sm text-text-primary cursor-pointer",style:{lineHeight:"1rem"}},(0,v.__)("View All","uael"),l().createElement(de,{className:"ml-1",size:13})))),l().createElement("div",{className:"flex bg-black flex-col rounded-lg p-4"},o?l().createElement(c.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(20)).map((function(e,t){return l().createElement(c.Container.Item,{key:t,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-6 space-y-2"},l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-16 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}))}))):l().createElement(c.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(c.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,showTooltip:d,key:e.id,updateCounter:0}))})))))},me=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],r[1]),i=a((0,s.useState)(null),2),u=(i[0],i[1]);if((0,s.useEffect)((function(){n(!0),se()({path:"/uael/v1/templates",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_nonce_action}}).then((function(e){o(e.templates_status),e.redirect_url&&u(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 uae-subheading"},l().createElement("div",{className:"mb-4"},l().createElement("img",{src:"".concat(uaelSettingsData.templates_url),alt:"Template Showcase",className:"w-full h-auto rounded"})),l().createElement(c.Title,{className:"mt-2",icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Build Websites 10x Faster with Templates","uael")}),l().createElement("p",{className:"text-text-secondary mt-2 mb-2 text-sm"},(0,v.__)("Choose from our professionally designed websites to build your site faster, with easy customization options.","uael")),l().createElement(c.Button,{className:"w-full mt-4",icon:null,iconPosition:"left",size:"md",variant:"secondary",onClick:function(){window.open("https://startertemplates.com/","_blank")}},(0,v.__)("Explore Templates","uael")))};const pe=m("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=m("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"}]]);var ge=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(c.Title,{className:"mb-2",icon:null,iconPosition:"right",size:"xs",tag:"h3",title:(0,v.__)("Quick Access","uael")}),l().createElement(c.Container,{align:"stretch",className:"p-1 rounded-lg bg-[#F9FAFB] gap-1",containerType:"flex",direction:"column",gap:"",justify:"start",style:{width:"100%",backgroundColor:"#F9FAFB"}},l().createElement(c.Container.Item,{alignSelf:"auto",className:"p-4 bg-white rounded-lg shadow-container-item",order:"none",shrink:1},l().createElement(c.Button,{className:"text-black uael-remove-ring",icon:l().createElement(pe,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://store.brainstormforce.com/support/","_blank")}},(0,v.__)("VIP Priority Support","uael"))),l().createElement(c.Container.Item,{alignSelf:"auto",className:"p-4 bg-white rounded-lg shadow-container-item",order:"none",shrink:1},l().createElement(c.Button,{className:"text-black uael-remove-ring",icon:l().createElement(pe,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ultimateelementor.com/docs/getting-started-uael/","_blank")}},(0,v.__)("Knowledge Base","uael"))),l().createElement(c.Container.Item,{className:"p-4 bg-white rounded-lg shadow-container-item"},l().createElement(c.Button,{className:"text-black uael-remove-ring",icon:l().createElement(p,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ultimateelementor.com/docs/","_blank")}},(0,v.__)("Help Centre","uael"))),l().createElement(c.Container.Item,{className:"p-4 bg-white rounded-lg shadow-container-item"},l().createElement(c.Button,{className:"text-black uael-remove-ring",icon:l().createElement(he,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ideas.ultimateelementor.com/boards/feature-requests","_blank")}},(0,v.__)("Request a Feature","uael")))))};const ye=m("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ve=m("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"}]]);var be=function(){return l().createElement("div",null,l().createElement(c.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(c.Container.Item,{shrink:1},l().createElement(c.Title,{description:"",icon:null,iconPosition:"right",className:"max-w-lg",size:"lg",tag:"h3",title:(0,v.__)("Hello,","uael")}),l().createElement("p",{className:"text-sm font-medium text-text-tertiary m-0 mt-2"},(0,v.__)("Thanks for choosing "+uaelSettingsData.plugin_short_name+" Pro! You're now part of an exclusive community of website builders. Explore the features and enjoy creating something amazing. Let's take your site to the next level together.","uael")),l().createElement("div",{className:"flex items-center pt-6 gap-2"},uaelSettingsData.is_lite_active?l().createElement(l().Fragment,null,l().createElement(c.Button,{iconPosition:"right",variant:"primary",className:"bg-[#6005FF] uael-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(uaelSettingsData.uael_hfe_post_url,"_blank")}},(0,v.__)("Create Header/Footer","uael")),l().createElement(c.Button,{icon:l().createElement(ye,null),iconPosition:"right",variant:"outline",className:"uael-remove-ring",style:{color:"#6005FF",borderColor:"#6005FF"},onMouseEnter:function(e){return(e.currentTarget.style.color="#000000")&&(e.currentTarget.style.borderColor="#000000")},onMouseLeave:function(e){return(e.currentTarget.style.color="#6005FF")&&(e.currentTarget.style.borderColor="#6005FF")},onClick:function(){window.open(uaelSettingsData.elementor_page_url,"_blank")}},(0,v.__)("Create New Page","uael"))):l().createElement(c.Button,{icon:l().createElement(ye,null),iconPosition:"right",variant:"primary",className:"bg-[#6005FF]",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(uaelSettingsData.elementor_page_url,"_blank")}},(0,v.__)("Create New Page","uael")),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-uael/","_blank")}},l().createElement(c.Button,{icon:l().createElement(ve,null),iconPosition:"right",variant:"link",className:"uael-remove-ring text-black"},(0,v.__)("Read full guide","uael")))))))};function we(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 xe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){we(i,r,o,a,s,"next",e)}function s(e){we(i,r,o,a,s,"throw",e)}a(void 0)}))}}var _e=window.regeneratorRuntime,Ee=n.n(_e),Se=function(e){var t=e.plugin,n=e.setUpdateCounter,r=t.path,o=t.slug,i=t.siteUrl,u=t.icon,d=t.type,f=t.name,m=t.zipUrl,p=t.desc,h=(t.wporg,t.isFree),g=(t.action,t.status),y=t.settings_url,b=a((0,s.useState)(!1),2),w=b[0],x=b[1],_=a((0,s.useState)(null),2),E=_[0],S=_[1],k=function(e){x(!1);var t=new window.FormData;t.append("action","uael_recommended_plugin_activate"),t.append("nonce",uaelSettingsData.ajax_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,v.__)("Activating..","uael"),se()({url:uaelSettingsData.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("uae-plugin-activated"),o.innerText=(0,v.__)("Activated","uael"),window.open(y,"_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,v.__)("Activate","uael"))}}}))};return l().createElement(c.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:u,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(c.Badge,{label:(0,v.__)("Free","uael"),size:"xs",type:"pill",variant:"green"}),l().createElement(c.Button,{size:"xs",variant:"link",className:"cursor-pointer uael-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"uael_recommended_plugin_activate":"theme"===r.type?(S(r),x(!0)):k(r);break;case"uael_recommended_plugin_install":n.append("action","theme"===r.type?"uael_recommended_theme_install":"uael_recommended_plugin_install"),n.append("_ajax_nonce",uaelSettingsData.installer_nonce),n.append("slug",r.slug),e.target.innerText=(0,v.__)("Installing..","uael"),se()({url:uaelSettingsData.ajax_url,method:"POST",body:n}).then((function(t){t.success||"folder_exists"===t.errorCode?(e.target.innerText=(0,v.__)("Installed","uael"),function(e){var t=(new Date).toISOString().split("T")[0],n=new URLSearchParams({source:"UAE Pro",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="uael_recommended_plugin_activate",e.target.innerText=(0,v.__)("Activate","uael")):k(r)):(e.target.innerText=(0,v.__)("Install","uael"),alert("theme"===r.type?(0,v.__)("Theme Installation failed, Please try again later.","uael"):(0,v.__)("Plugin Installation failed, Please try again later.","uael")))}));break;case"site_redirect":window.open(i,"_blank")}},"data-plugin":m,"data-type":d,"data-pluginname":f,"data-slug":o,"data-site":i,"data-init":r,"data-action":function(e){return"Activated"===e?"site_redirect":"Installed"===e?"uael_recommended_plugin_activate":"uael_recommended_plugin_install"}(g),style:{color:"Activated"===g?"#16A34A":"#6005FF"}},"Activated"===g?(0,v.__)("Visit Site","uael"):"Installed"===g?"Activate":g),l().createElement(c.Dialog,{design:"simple",open:w,setOpen:x},l().createElement(c.Dialog.Backdrop,null),l().createElement(c.Dialog.Panel,null,l().createElement(c.Dialog.Header,null,l().createElement("div",{className:"flex items-center justify-between"},l().createElement(c.Dialog.Title,null,(0,v.__)("Activate Theme","uael"))),l().createElement(c.Dialog.Description,null,(0,v.__)("Are you sure you want to switch your current theme to Astra?","uael"))),l().createElement(c.Dialog.Footer,null,l().createElement(c.Button,{onClick:function(){return k(E)}},(0,v.__)("Yes","uael")),l().createElement(c.Button,{variant:"outline",onClick:function(){return x(!1)}},(0,v.__)("Close","uael"))))))),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,v.__)(f,"uael")),l().createElement("p",{className:"text-sm font-medium text-text-tertiary m-0"},(0,v.__)(p,"uael"))))};function ke(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 Ce=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],u=a((0,s.useState)(0),2),d=u[0],f=u[1],m=a((0,s.useState)(!1),2),p=m[0],h=m[1];function g(e){return Object.keys(e).map((function(t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({path:t},e[t])}))}return(0,s.useEffect)((function(){var e=function(){var e=xe(Ee().mark((function e(){var t,r,o;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),e.prev=1,e.next=4,se()({path:"/uael/v1/plugins",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_nonce_action}});case 4:t=e.sent,r=g(t),n(r),o=r.every((function(e){return e.is_installed})),h(o),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching plugins:",e.t0);case 14:return e.prev=14,i(!1),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})));return function(){return e.apply(this,arguments)}}();e()}),[d]),p?null: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"},(0,v.__)("Extend Your Website","uael")),l().createElement("div",{className:"flex items-center gap-x-2 mr-7"})),l().createElement("div",{className:"flex flex-col rounded-lg p-4",style:{backgroundColor:"white"}},o?l().createElement(c.Container,{align:"stretch",className:"gap-1 p-1 grid grid-cols-1 md:grid-cols-2",containerType:"grid",justify:"start"},oe(Array(2)).map((function(e,t){return l().createElement(c.Container.Item,{key:t,alignSelf:"auto",style:{height:"150px"},className:"text-wrap rounded-md shadow-container-item bg-[#F9FAFB] p-4"},l().createElement("div",{className:"flex flex-col gap-6",style:{marginTop:"40px"}},l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-16 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"})))}))):l().createElement(c.Container,{align:"stretch",className:"gap-1 p-1 grid grid-cols-1 md:grid-cols-2",containerType:"grid",justify:"start",style:{backgroundColor:"#F9FAFB"}},t.slice(0,4).map((function(e){return l().createElement(c.Container.Item,{key:e.slug,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},l().createElement(Se,{plugin:e,setUpdateCounter:f}))})))))};const Ne=m("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Te=m("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var Pe=[{id:1,videoId:"kXuXfaetch4",title:(0,v.__)("Video Tutorial 1","uael")},{id:2,videoId:"8fu8W4quFg0",title:(0,v.__)("Video Tutorial 2","uael")},{id:3,videoId:"wwu4ZzXrhGc",title:(0,v.__)("Video Tutorial 3","uael")},{id:4,videoId:"88kTeBv4mWY",title:(0,v.__)("Video Tutorial 4","uael")},{id:5,videoId:"NovIe5b2EkQ",title:(0,v.__)("Video Tutorial 5","uael")},{id:6,videoId:"kaGfSpGFcnw",title:(0,v.__)("Video Tutorial 6","uael")},{id:7,videoId:"7Q-3fAKKhbg",title:(0,v.__)("Video Tutorial 7","uael")},{id:8,videoId:"qhFfKf2R-SM",title:(0,v.__)("Video Tutorial 8","uael")},{id:9,videoId:"jWzW_oT1iSQ",title:(0,v.__)("Video Tutorial 9","uael")},{id:10,videoId:"-FErpbu2F58",title:(0,v.__)("Video Tutorial 10","uael")},{id:11,videoId:"hrDAFmPTDgg",title:(0,v.__)("Video Tutorial 11","uael")},{id:12,videoId:"2RlvBU_EFV4",title:(0,v.__)("Video Tutorial 12","uael")},{id:13,videoId:"7m6FD8Yk3N0",title:(0,v.__)("Video Tutorial 13","uael")},{id:14,videoId:"OCD3oZas60w",title:(0,v.__)("Video Tutorial 14","uael")},{id:15,videoId:"K4gCczaX-Sg",title:(0,v.__)("Video Tutorial 15","uael")},{id:16,videoId:"Izbr-oO0VkU",title:(0,v.__)("Video Tutorial 16","uael")},{id:17,videoId:"ruGOgho6RQM",title:(0,v.__)("Video Tutorial 17","uael")},{id:18,videoId:"8N_CW1rgvp0",title:(0,v.__)("Video Tutorial 18","uael")},{id:19,videoId:"WmrSMl5g3ac",title:(0,v.__)("Video Tutorial 19","uael")},{id:20,videoId:"BqXOvmpulQQ",title:(0,v.__)("Video Tutorial 20","uael")},{id:21,videoId:"bVfJNMZOsv0",title:(0,v.__)("Video Tutorial 21","uael")},{id:22,videoId:"IigQsUdvcRo",title:(0,v.__)("Video Tutorial 22","uael")},{id:23,videoId:"tZRjCiUFa-o",title:(0,v.__)("Video Tutorial 23","uael")},{id:24,videoId:"TJmcPWToHU0",title:(0,v.__)("Video Tutorial 24","uael")},{id:25,videoId:"XuQZzQJbNas",title:(0,v.__)("Video Tutorial 25","uael")},{id:26,videoId:"Eh8a3skmVDM",title:(0,v.__)("Video Tutorial 26","uael")},{id:27,videoId:"zGvbznihzH8",title:(0,v.__)("Video Tutorial 27","uael")},{id:28,videoId:"lgCG5--xyR4",title:(0,v.__)("Video Tutorial 28","uael")},{id:29,videoId:"p3zlIYoaaG0",title:(0,v.__)("Video Tutorial 29","uael")}],Oe=function(e){var t=e.videoId,n=e.title,r=e.playingVideoId,o=e.setPlayingVideoId,i=r===t;return React.createElement("div",{className:"video-thumbnail-container",onClick:function(){o(t)},style:{cursor:"pointer"}},i?React.createElement("iframe",{width:"250",height:"145",src:"https://www.youtube.com/embed/".concat(t,"?autoplay=1"),frameBorder:"0",style:{borderRadius:"8px"},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,title:n}):React.createElement("div",{style:{position:"relative"}},React.createElement("img",{src:"https://img.youtube.com/vi/".concat(t,"/maxresdefault.jpg"),alt:n,width:"250",height:"145",style:{borderRadius:"8px"}}),React.createElement("img",{src:"".concat(uaelSettingsData.video_control),alt:"Play",style:{left:"43%",top:"50%",transform:"translate(-50%, -50%)"},className:"absolute inset-0 w-11 h-11"})))};function De(){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];return React.createElement("div",{className:"rounded-lg bg-white w-full mb-4"},React.createElement("div",{className:"flex items-center justify-between p-4",style:{paddingBottom:"0"}},React.createElement("p",{className:"m-0 text-sm pt-4 pl-3 font-semibold text-text-primary"},(0,v.__)("Video Tutorials","uael")),React.createElement("div",{className:"flex items-center cursor-pointer gap-x-2 mr-7"},React.createElement(Ne,{className:0===t?"text-gray-300 cursor-not-allowed":"cursor-pointer",onClick:function(){t>0&&n((function(e){return e-1}))}}),React.createElement(Te,{className:t>=Pe.length-3?"text-gray-300 cursor-not-allowed":"cursor-pointer",onClick:function(){t<Pe.length-3&&n((function(e){return e+1}))}}))),React.createElement("div",{className:"overflow-hidden bg-black flex-col rounded-lg px-4 py-2 relative"},React.createElement("div",{className:"flex transition-transform duration-300 ease-in-out",style:{transform:"translateX(-".concat(t*(100/Pe.length),"%)"),width:"".concat(Pe.length/2.95*100,"%")}},Pe.map((function(e){return React.createElement("div",{key:e.id,className:"w-1/3 py-2 px-1"},React.createElement(Oe,{videoId:e.videoId,title:e.title,playingVideoId:o,setPlayingVideoId:i}))})))))}var Re=function(){var e=uaelSettingsData.hide_settings?"w-full":"uael-65-width";return l().createElement(l().Fragment,null,l().createElement(ne,null),l().createElement("div",{className:""},l().createElement(re,null),l().createElement(c.Container,{align:"stretch",className:"p-6 flex flex-col lg:flex-row box-border",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{width:"100%"}},l().createElement(c.Container.Item,{className:"p-2 ".concat(e),alignSelf:"auto",order:"none",shrink:0},!uaelSettingsData.hide_settings&&l().createElement(be,null),l().createElement(fe,null),!uaelSettingsData.hide_settings&&l().createElement(De,null)),!uaelSettingsData.hide_settings&&l().createElement(c.Container.Item,{className:"p-2 w-full uael-35-width",shrink:1},l().createElement(ge,null),l().createElement("div",{className:"pt-5"},l().createElement(me,null)),l().createElement(Ce,null)))))};const je=m("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Me=m("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Ae=m("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"}]]);function Ie(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 Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Le=function(){var e=a((0,s.useState)(null),2),t=e[0],n=e[1],r=a((0,s.useState)(""),2),o=r[0],i=r[1],u=a((0,s.useState)(!1),2),d=u[0],f=u[1],m=a((0,s.useState)(!1),2),p=m[0],h=m[1],g=a((0,s.useState)(!1),2),y=g[0],b=g[1],w=a((0,s.useState)(!0),2),x=w[0],_=w[1],E=a((0,s.useState)(0),2),S=E[0],k=E[1],C=a((0,s.useState)(!0),2),N=C[0];C[1],(0,s.useEffect)((function(){_(!0),se()({path:"/uael/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_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),_(!1)})).catch((function(e){_(!1)}))}),[]);var T=null==t?void 0:t.filter((function(e){var t;return e.title.toLowerCase().includes(o)||(null===(t=e.keywords)||void 0===t?void 0:t.some((function(e){return e.toLowerCase().includes(o)})))})),P=function(){var e=xe(Ee().mark((function e(){var t;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f(!0),(t=new window.FormData).append("action","uael_bulk_activate_widgets"),t.append("nonce",uaelSettingsData.ajax_nonce),se()({url:uaelSettingsData.ajax_url,method:"POST",body:t}).then((function(e){f(!1),e.success?(n((function(e){return e.map((function(e){return Fe(Fe({},e),{},{is_active:!0})}))})),k((function(e){return e+1}))):e.error&&console.error("AJAX request failed:",e.error)})).catch((function(e){f(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=xe(Ee().mark((function e(){var t;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h(!0),(t=new window.FormData).append("action","uael_bulk_deactivate_unused_widgets"),t.append("nonce",uaelSettingsData.ajax_nonce),se()({url:uaelSettingsData.ajax_url,method:"POST",body:t}).then((function(e){var t;if(h(!1),e.success&&Array.isArray(null===(t=e.data)||void 0===t?void 0:t.deactivated)){var r=e.data.deactivated;n((function(e){return e.map((function(e){return r.includes(e.id)?Fe(Fe({},e),{},{is_active:!1}):e}))})),k((function(e){return e+1}))}else e.error?console.error("AJAX request failed:",e.error):console.error("Unexpected response structure:",e)})).catch((function(e){h(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=xe(Ee().mark((function e(){var t;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:b(!0),(t=new window.FormData).append("action","uael_bulk_deactivate_widgets"),t.append("nonce",uaelSettingsData.ajax_nonce),se()({url:uaelSettingsData.ajax_url,method:"POST",body:t}).then((function(e){b(!1),e.success?(n((function(e){return e.map((function(e){return Fe(Fe({},e),{},{is_active:!1})}))})),k((function(e){return e+1}))):e.error&&console.error("AJAX request failed:",e.error)})).catch((function(e){b(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return l().createElement("div",{className:"rounded-lg bg-white w-full mb-4"},l().createElement("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between p-4",style:{paddingBottom:"0"}},l().createElement("p",{className:"m-0 text-sm font-semibold text-text-primary mb-2 md:mb-0"},(0,v.__)("Widgets / Features","uael")),l().createElement("div",{className:"flex flex-col md:flex-row items-center gap-y-2 md:gap-x-2 md:mr-7 relative"},l().createElement(je,{className:"absolute top-1/2 transform -translate-y-1/2 text-gray-400",style:{backgroundColor:"#F9FAFB",left:"2%",width:"18px",height:"18px"}}),l().createElement("input",{type:"search",placeholder:(0,v.__)("Search...","uael"),className:"mr-2 pl-10 w-full md:w-auto",style:{height:"40px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",backgroundColor:"#F9FAFB"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"},onChange:function(e){i(e.target.value.toLowerCase())}}),l().createElement("div",{className:"flex flex-row gap-2 w-full md:w-auto"},l().createElement(c.Tooltip,{arrow:!0,content:l().createElement("div",null,l().createElement("p",null,(0,v.__)("Click here to activate all widgets & extensions.","uael"))),placement:"top",title:"",triggers:["hover"],variant:"dark",size:"xs"},l().createElement(c.Button,{icon:d?l().createElement(Me,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",className:"uae-bulk-action-button",onClick:P,disabled:!!o},d?(0,v.__)("Activating...","uael"):(0,v.__)("Activate All","uael"))),l().createElement(c.Tooltip,{arrow:!0,content:l().createElement("div",null,l().createElement("p",null,(0,v.__)("Click here to deactivate all unused widgets, except Extensions.","uael"))),placement:"top",title:"",triggers:["hover"],variant:"dark",size:"xs"},l().createElement(c.Button,{icon:p?l().createElement(Me,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",onClick:O,className:"uae-bulk-action-button",disabled:!!o},p?(0,v.__)("Deactivating...","uael"):(0,v.__)("Deactivate Unused","uael"))),l().createElement(c.Tooltip,{arrow:!0,content:l().createElement("div",null,l().createElement("p",null,y?(0,v.__)("Deactivating...","uael"):(0,v.__)("Deactivate All ","uael"))),placement:"top",title:"",triggers:["hover"],variant:"dark",size:"xs"},l().createElement(Ae,{className:"relative text-gray-400",onClick:D,style:{backgroundColor:"#F9FAFB",top:"5%",margin:"auto",width:"22px",height:"22px"}},y?(0,v.__)("Deactivating...","uael"):(0,v.__)("Deactivate All","uael")))))),l().createElement("div",{className:"flex bg-black flex-col rounded-lg p-4",style:{minHeight:"800px"}},x?l().createElement(c.Container,{align:"stretch",className:"p-1 gap-1.5 grid-cols-2 md:grid-cols-4",containerType:"grid",gap:"",justify:"start",style:{backgroundColor:"#F9FAFB"}},oe(Array(50)).map((function(e,t){return l().createElement(c.Container.Item,{key:t,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-6 space-y-2"},l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-16 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}))}))):l().createElement(c.Container,{align:"stretch",className:"p-1 gap-1.5 grid-cols-2 md:grid-cols-4",containerType:"grid",gap:"",justify:"start",style:{backgroundColor:"#F9FAFB"}},null==T?void 0:T.map((function(e){return l().createElement(c.Container.Item,{key:e.id,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},l().createElement(ue,{widget:Fe(Fe({},e),{},{updateCounter:S}),showTooltip:N,key:e.id,updateCounter:S}))})))))},ze=function(){var e=uaelSettingsData.hide_settings?"w-full":"uael-65-width";return l().createElement(l().Fragment,null,l().createElement(ne,null),l().createElement("div",{className:""},l().createElement(re,null),l().createElement(c.Container,{align:"stretch",className:"p-6 flex flex-col lg:flex-row box-border",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{width:"100%"}},l().createElement(c.Container.Item,{className:"p-2 ".concat(e),alignSelf:"auto",order:"none",shrink:1},l().createElement(Le,null)),!uaelSettingsData.hide_settings&&l().createElement(c.Container.Item,{className:"p-2 uael-35-width",shrink:1},l().createElement(ge,null),l().createElement("div",{className:"pt-5"},l().createElement(Ce,null))))))},Be=function(e){var t=e.items,n=e.onSelectItem,r=e.selectedItemId;return l().createElement("div",{style:{padding:"1rem",width:"100%"}},t.map((function(e){return l().createElement("div",{key:e.id,className:"mb-2"},e.main&&l().createElement("p",{className:"text-sm text-text-tertiary font-normal mb-2"},(0,v.__)(e.main,"uael")),l().createElement("div",{className:"h-10 flex items-center justify-start gap-2 px-2 rounded-md cursor-pointer ".concat(r===e.id?"bg-gray-100":"bg-background-primary"),style:{backgroundColor:r===e.id?"#F9FAFB":""},onClick:function(){return function(e){n(e)}(e)}},l().createElement("span",null,r===e.id?e.selected:e.icon),l().createElement("p",{className:"m-0 text-base font-normal"},(0,v.__)(e.title,"uael"))))})))},We=function(e){var t=e.selectedItem;return l().createElement("div",{className:"p-6",style:{marginLeft:"4px"}},l().createElement("div",null,null==t?void 0:t.content))};let Ve={data:""},Ue=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Ve,He=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,$e=/\/\*[^]*?\*\/| +/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<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!Ke[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=He.exec(e.replace($e,""));)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 Je(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)}Je.bind({g:1});let Ze,Qe,et,tt=Je.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=Je.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),Ze(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=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,20)};case 1:return{...e,toasts:e.toasts.map((e=>e.id===t.toast.id?{...e,...t.toast}:e))};case 2:let{toast:n}=t;return at(e,{type:e.toasts.find((e=>e.id===n.id))?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map((e=>e.id===r||void 0===r?{...e,dismissed:!0,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})))}}},st=[],lt={toasts:[],pausedAt:void 0},ct=e=>{lt=at(lt,e),st.forEach((e=>{e(lt)}))},ut={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},dt=e=>(t,n)=>{let r=((e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,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 ct({type:2,toast:r}),r.id},ft=(e,t)=>dt("blank")(e,t);ft.error=dt("error"),ft.success=dt("success"),ft.loading=dt("loading"),ft.custom=dt("custom"),ft.dismiss=e=>{ct({type:3,toastId:e})},ft.remove=e=>ct({type:4,toastId:e}),ft.promise=(e,t,n)=>{let r=ft.loading(t.loading,{...n,...null==n?void 0:n.loading});return"function"==typeof e&&(e=e()),e.then((e=>{let o=t.success?rt(t.success,e):void 0;return o?ft.success(o,{id:r,...n,...null==n?void 0:n.success}):ft.dismiss(r),e})).catch((e=>{let o=t.error?rt(t.error,e):void 0;o?ft.error(o,{id:r,...n,...null==n?void 0:n.error}):ft.dismiss(r)})),e};var mt=(e,t)=>{ct({type:1,toast:{id:e,height:t}})},pt=()=>{ct({type:5,time:Date.now()})},ht=new Map,gt=tt`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,yt=tt`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,vt=tt`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,bt=nt("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${gt} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${yt} 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: ${vt} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,wt=tt`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,xt=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: ${wt} 1s linear infinite;
`,_t=tt`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,Et=tt`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,St=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: ${Et} 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;
}
`,kt=nt("div")`
position: absolute;
`,Ct=nt("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,Nt=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: ${Nt} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,Pt=({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(Ct,null,s.createElement(xt,{...r}),"loading"!==n&&s.createElement(kt,null,"error"===n?s.createElement(bt,{...r}):s.createElement(St,{...r})))},Ot=e=>`\n0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,Dt=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}\n`,Rt=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;
`,jt=nt("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,Mt=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;}"]:[Ot(n),Dt(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(Pt,{toast:e}),a=s.createElement(jt,{...e.ariaProps},rt(e.message,e));return s.createElement(Rt,{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,Ze=e,Qe=void 0,et=void 0}(s.createElement);var At=({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)},It=Je`
z-index: 9999;
> * {
pointer-events: auto;
}
`,Ft=({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)(lt),r=(0,s.useRef)(lt);(0,s.useEffect)((()=>(r.current!==lt&&n(lt),st.push(n),()=>{let e=st.indexOf(n);e>-1&&st.splice(e,1)})),[]);let o=t.toasts.map((t=>{var n,r,o;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(n=e[t.type])?void 0:n.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(r=e[t.type])?void 0:r.duration)||(null==e?void 0:e.duration)||ut[t.type],style:{...e.style,...null==(o=e[t.type])?void 0:o.style,...t.style}}}));return{...t,toasts:o}})(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((()=>ft.dismiss(t.id)),n);t.visible&&ft.dismiss(t.id)}));return()=>{r.forEach((e=>e&&clearTimeout(e)))}}),[t,n]);let r=(0,s.useCallback)((()=>{n&&ct({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)=>t<s&&e.visible)).length;return a.filter((e=>e.visible)).slice(...r?[l+1]:[0,l]).reduce(((e,t)=>e+(t.height||0)+o),0)}),[t]);return(0,s.useEffect)((()=>{t.forEach((e=>{if(e.dismissed)((e,t=1e3)=>{if(ht.has(e))return;let n=setTimeout((()=>{ht.delete(e),ct({type:4,toastId:e})}),t);ht.set(e,n)})(e.id,e.removeDelay);else{let t=ht.get(e.id);t&&(clearTimeout(t),ht.delete(e.id))}}))}),[t]),{toasts:t,handlers:{updateHeight:mt,startPause:pt,endPause:r,calculateOffset:o}}})(n);return s.createElement("div",{id:"_rht_toaster",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(At,{id:n.id,key:n.id,onHeightUpdate:c.updateHeight,className:n.visible?It:"",style:a},"custom"===n.type?rt(n.message,n):o?o(n):s.createElement(Mt,{toast:n,position:i}))})))},Lt=ft,zt=[{id:"1",title:(0,v.__)("Option 1 (Recommended)","uael"),description:(0,v.__)("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.","uael"),value:"1"},{id:"2",title:(0,v.__)("Option 2","uael"),description:(0,v.__)("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.","uael"),value:"2"}],Bt=function(){var e=a((0,s.useState)(uaelSettingsData.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 u=function(e){var t=e.target.value;n(t),o||d(t)},d=function(){var e=xe(Ee().mark((function e(t){var n;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(uaelSettingsData.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"save_hfe_compatibility_option",hfe_compatibility_option:t,nonce:uaelSettingsData.ajax_nonce})});case 3:return n=e.sent,e.next=6,n.json();case 6:e.sent.success?Lt.success("Settings saved successfully!"):Lt.error("Failed to save settings"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),Lt.error("Error saving settings");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(c.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:"Theme Support"}),l().createElement(c.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(c.Container.Item,{className:"flex flex-col space-y-1"},l().createElement("p",{className:"text-base font-semibold m-0"},(0,v.__)("Select Option to Add Theme Support","uael")),l().createElement("p",{className:"text-sm font-normal m-0"},(0,v.__)("To ensure compatibility between the ".concat(uaelSettingsData.plugin_short_name,"'s header/footer and your theme, please choose one of the following options to enable theme support:"),"uael"))),l().createElement(c.Container.Item,{className:"p-2 space-y-4",alignSelf:"auto",order:"none"},zt.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 uae-radio-field",name:"hfe_compatibility_option",onChange:u,checked:t===e.value}),l().createElement("div",{className:"flex flex-col cursor-pointer"},l().createElement(c.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-md text-start",style:{paddingTop:"16px",paddingBottom:"16px",backgroundColor:"#F3F0FF"}},l().createElement("p",{className:"m-0"},l().createElement("strong",null,(0,v.__)("Note:","uael"))," ",(0,v.__)("If neither option works, please contact your theme author to add support for this plugin.","uael")))),l().createElement(Ft,{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"}}}}))},Wt=function(){var e=a((0,s.useState)(!1),2),t=e[0],n=e[1],r=uaelSettingsData.license_status,o=uaelSettingsData.uael_versions,i=uaelSettingsData.uaelite_versions,u=(0,s.useRef)(o[0].value),d=(0,s.useRef)(i?i[0].value:""),f=a((0,s.useState)(o[0].value),2),m=f[0],p=f[1],h=a((0,s.useState)(i?i[0].value:""),2),g=h[0],y=h[1],b=a((0,s.useState)("uael"),2),w=(b[0],b[1]),x=a((0,s.useState)("elementor-header-footer"),2),_=(x[0],x[1]),E=a((0,s.useState)(!1),2),S=E[0],k=E[1],C=a((0,s.useState)(!1),2),N=C[0],T=C[1];return(0,s.useEffect)((function(){n("enable"===uaelSettingsData.beta_enabled)}),[S,N]),l().createElement(l().Fragment,null,l().createElement(c.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("Version Control","uael")}),l().createElement("div",{className:"box-border bg-background-primary p-6 rounded-lg",style:{marginTop:"24px"}},uaelSettingsData.is_lite_active&&l().createElement(l().Fragment,null,l().createElement(c.Container,{align:"stretch",className:"flex flex-col lg:flex-row",containerType:"flex",direction:"column",gap:"sm",justify:"start"},l().createElement(c.Container.Item,{className:"shrink flex flex-col space-y-1"},l().createElement("p",{className:"text-base font-semibold m-0"},(0,v.sprintf)((0,v.__)("Rollback %s Lite to Previous Version","uael"),uaelSettingsData.plugin_short_name)),l().createElement("p",{className:"text-sm font-normal m-0"},(0,v.__)("Experiencing an issue with current version? Roll back to a previous version to help troubleshoot the issue.","uael"))),l().createElement(c.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:"uael"}),l().createElement("select",{id:"uaeliteVersionRollback",ref:d,onBlur:function(){_("elementor-header-footer")},onChange:function(e){y(e.target.value)},style:{padding:"8px",marginRight:"10px",marginTop:"16px",cursor:"pointer",borderRadius:"4px",height:"44px",width:"100px"}},i.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(c.Dialog,{design:"simple",exitOnEsc:!0,scrollLock:!0,open:N,setOpen:T,trigger:l().createElement(c.Button,{style:{backgroundColor:"#6005ff"}},(0,v.__)("Rollback","uael"))},l().createElement(c.Dialog.Backdrop,null),l().createElement(c.Dialog.Panel,null,l().createElement(c.Dialog.Header,null,l().createElement("div",{className:"flex items-center justify-between"},l().createElement(c.Dialog.Title,null,(0,v.__)("Rollback to Previous Version","uael")),l().createElement(c.Dialog.CloseButton,null))),l().createElement(c.Dialog.Body,null,(0,v.sprintf)((0,v.__)("Are you sure you want to rollback to %s Lite v%s?","uael"),uaelSettingsData.plugin_short_name,g)),l().createElement(c.Dialog.Footer,null,l().createElement(c.Button,{style:{backgroundColor:"#6005ff"},onClick:function(){var e=uaelSettingsData.uaelite_rollback_url.replace("VERSION",g);T(!1),window.location.href=e}},(0,v.__)("Rollback","uael")),l().createElement(c.Button,{style:{backgroundColor:"#6005ff"},onClick:function(){T(!1)}},(0,v.__)("Cancel","uael")))))))),l().createElement("div",{className:"border border-subtle",style:{height:"2px",backgroundColor:"#E5E7EB",marginTop:"16px",marginBottom:"16px"}})),r&&l().createElement(l().Fragment,null,l().createElement(c.Container,{align:"stretch",className:"flex flex-col lg:flex-row",containerType:"flex",direction:"column",gap:"sm",justify:"start"},l().createElement(c.Container.Item,{className:"shrink flex flex-col space-y-1"},l().createElement("p",{className:"text-base font-semibold m-0"},(0,v.sprintf)((0,v.__)("Rollback %s Pro to Previous Version","uael"),uaelSettingsData.plugin_short_name)),l().createElement("p",{className:"text-sm font-normal m-0"},(0,v.__)("Experiencing an issue with current version? Roll back to a previous version to help troubleshoot the issue.","uael"))),l().createElement(c.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:"uael"}),l().createElement("select",{id:"uaelVersionRollback",ref:u,onBlur:function(e){w("uael"),e.target.style.borderColor="#e0e0e0"},onChange:function(e){p(e.target.value)},style:{padding:"8px",marginRight:"10px",marginTop:"16px",cursor:"pointer",borderRadius:"4px",height:"40px",width:"100px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"}},o.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(c.Dialog,{design:"simple",exitOnEsc:!0,scrollLock:!0,open:S,setOpen:k,trigger:l().createElement(c.Button,{style:{backgroundColor:"#6005ff"}},(0,v.__)("Rollback","uael"))},l().createElement(c.Dialog.Backdrop,null),l().createElement(c.Dialog.Panel,null,l().createElement(c.Dialog.Header,null,l().createElement("div",{className:"flex items-center justify-between"},l().createElement(c.Dialog.Title,null,(0,v.__)("Rollback to Previous Version","uael")),l().createElement(c.Dialog.CloseButton,null))),l().createElement(c.Dialog.Body,null,(0,v.__)("Are you sure you want to rollback to ".concat(uaelSettingsData.plugin_name," v").concat(m,"?"),"uael")),l().createElement(c.Dialog.Footer,null,l().createElement(c.Button,{onClick:function(){var e=uaelSettingsData.uael_rollback_url.replace("VERSION",m);k(!1),window.location.href=e},style:{backgroundColor:"#6005ff"}},(0,v.__)("Rollback","uael")),l().createElement(c.Button,{onClick:function(){k(!1)},style:{backgroundColor:"#6005ff"}},(0,v.__)("Cancel","uael")))))))),l().createElement("div",{className:"border border-subtle",style:{height:"2px",backgroundColor:"#E5E7EB",marginTop:"16px",marginBottom:"16px"}})),l().createElement(c.Container,{align:"stretch",className:"flex flex-col lg:flex-row",containerType:"flex",direction:"column",gap:"sm",justify:"start"},l().createElement(c.Container.Item,{className:"shrink flex flex-col space-y-1"},l().createElement("div",{className:"text-base font-semibold m-0 mb-2"},(0,v.__)("Enable Beta Version","uael")),l().createElement("div",{className:"text-sm font-normal m-0"},(0,v.sprintf)((0,v.__)("Turn this on to get notified when a new beta version of %s is available. The beta version will not install automatically. You will need to install it manually. We recommend using it only in a test environment.","uael"),uaelSettingsData.plugin_name)),l().createElement("div",{className:"text-sm font-normal mt-2 pt-2"},(0,v.__)("Please read ","uael"),l().createElement("a",{href:"https://ultimateelementor.com/docs/enabling-automatic-beta-updates-for-uael/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin",className:"uael-link-color no-underline uael-remove-ring",target:"_blank",rel:"noopener noreferrer"},(0,v.__)("this article","uael")),(0,v.__)(" to know more.","uael"))),l().createElement(c.Container.Item,{className:"shrink-0 p-2 flex space-y-6",alignSelf:"auto",order:"none",style:{marginTop:"40px"}},l().createElement(c.Switch,{size:"lg",value:t,onChange:function(e){var t=e?"enable":"disable";n(e);var r=new window.FormData;r.append("allow_beta",t),r.append("action","uael_allow_beta_updates"),r.append("nonce",uaelSettingsData.ajax_nonce),se()({url:uaelSettingsData.ajax_url,method:"POST",body:r}).then((function(t){t.success||n(!e)})).catch((function(t){n(!e)}))}})))))},Vt=function(){var e=a((0,s.useState)(!0),2),t=e[0],n=e[1];(0,s.useEffect)((function(){n("yes"===uaelSettingsData.analytics_status)}),[]);var r=function(){var e=xe(Ee().mark((function e(){var r,o;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(r=!t),e.prev=2,e.next=5,fetch(uaelSettingsData.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"uael_save_analytics_option",uae_analytics_optin:r?"yes":"no",nonce:uaelSettingsData.ajax_nonce})});case 5:return o=e.sent,e.next=8,o.json();case 8:e.sent.success?Lt.success((0,v.__)("Settings saved successfully!","header-footer-elementor")):Lt.error((0,v.__)("Failed to save settings!","header-footer-elementor")),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),Lt.error((0,v.__)("Failed to save settings!","header-footer-elementor"));case 15:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(){return e.apply(this,arguments)}}();return l().createElement(l().Fragment,null,l().createElement("hr",{className:"w-full border-b-0 border-x-0 border-t border-solid border-t-border-subtle",style:{marginTop:"20px",marginBottom:"20px",borderColor:"#E5E7EB"}}),l().createElement(c.Container,{align:"center",className:"flex flex-col lg:flex-row",containerType:"flex",direction:"column",gap:"sm",justify:"start"},l().createElement(c.Container.Item,{className:"p-2 flex space-y-4",alignSelf:"auto",order:"none",style:{maxWidth:"100%"}},l().createElement("div",{className:"flex flex-row items-start justify-start px-1 gap-3"},l().createElement(c.Switch,{onChange:r,size:"sm",value:t,className:"hfe-remove-ring"}),l().createElement("div",{className:"flex flex-col justify-start px-1 gap-3"},l().createElement("span",{className:"font-normal text-text-primary m-0"},(0,v.__)("Collect non-sensitive information from your website, such as the PHP version and features used, to help us fix bugs faster, make smarter decisions, and build features that actually matter to you. ","header-footer-elementor"),l().createElement("a",{href:"https://store.brainstormforce.com/usage-tracking/?utm_source=wp_dashboard&utm_medium=general_settings&utm_campaign=usage_tracking",target:"_blank",rel:"noopener noreferrer",className:"text-link-primary"},(0,v.__)("Learn More","header-footer-elementor")))),l().createElement(Ft,{position:"top-right",reverseOrder:!1,gutter:8,containerStyle:{top:20,right:20,marginTop:"40px"},toastOptions:{duration:1e3,style:{background:"white"},success:{duration:2e3,style:{color:""},iconTheme:{primary:"#6005ff",secondary:"#fff"}}}})))))},Ut=function(){var e=a((0,s.useState)(""),2),t=e[0],n=e[1],r=a((0,s.useState)(!1),2),o=r[0],i=r[1],u=a((0,s.useState)(""),2),d=u[0],f=u[1],m=uaelSettingsData.license_status,p=m?(0,v.__)("Your license is active.","uael"):(0,v.__)("Paste your license key here","uael");return l().createElement(l().Fragment,null,l().createElement(Ft,{position:"top-right",reverseOrder:!1,gutter:8,containerStyle:{top:20,right:20,marginTop:"40px"},toastOptions:{duration:5e3,style:{background:"white"},success:{duration:3e3,iconTheme:{primary:"#6005ff",secondary:"#fff"}}}}),l().createElement(c.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("My Account","uael")}),l().createElement(c.Container,{align:"stretch",className:"bg-background-primary p-6 rounded-lg uael-78-width",containerType:"flex",direction:"column",gap:"sm",justify:"start",style:{marginTop:"24px"}},l().createElement(c.Container.Item,{className:"flex flex-col space-y-2"},l().createElement("p",{className:"text-base font-semibold m-0"},(0,v.__)("License Key","uael")),l().createElement("p",{className:"text-sm font-normal m-0"},(0,v.__)("Please enter your valid license key below to activate "+uaelSettingsData.plugin_name+"!","uael"))),l().createElement(c.Container.Item,{className:"flex flex-col lg:flex-row gap-2 items-center space-y-2",alignSelf:"auto",order:"none"},l().createElement("input",{value:t,onChange:function(e){return n(e.target.value)},placeholder:p,readOnly:m,size:"md",type:"text",className:"w-full shrink ".concat(m?"uael-green-placeholder":""),style:{height:"48px",outline:"none",boxShadow:"none",borderColor:d?"red":"inherit"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}}),l().createElement("div",{className:"cursor-pointer mb-2 shrink",style:{minWidth:"fit-content"}},l().createElement(c.Button,{icon:o?l().createElement(Me,{className:"animate-spin"}):null,iconPosition:"left",style:{paddingTop:"14px",paddingBottom:"14px"},className:"bg-[#6005FF] mb-2",variant:"primary",onClick:m?function(){i(!0),f("");var e=new window.FormData;e.append("action","uael_license_deactivation"),e.append("security",uaelSettingsData.license_deactivation_nonce),se()({url:uaelSettingsData.ajax_url,method:"POST",body:e}).then((function(e){i(!1),e.success?(ft.success((0,v.__)("License successfully deactivated!","uael")),location.reload()):(ft.error(e.message||(0,v.__)("An error occurred while deactivating license.","uael")),f(e.message||(0,v.__)("An error occurred while deactivating license.","uael")))}))}:function(){if(!t)return ft.error((0,v.__)("Please enter a valid license key!","uael")),void f((0,v.__)("Enter a valid license key!","uael"));i(!0),f("");var e=new window.FormData;e.append("key",t),e.append("action","uael_license_activation"),e.append("security",uaelSettingsData.license_activation_nonce),se()({url:uaelSettingsData.ajax_url,method:"POST",body:e}).then((function(e){i(!1),e.success?(ft.success((0,v.__)("License successfully validated!","uael")),location.reload()):(ft.error(e.message||(0,v.__)("Please enter a valid license key!","uael")),f(e.message||(0,v.__)("Enter a valid license key!","uael")))}))},disabled:o},o?m?(0,v.__)("Deactivating...","uael"):(0,v.__)("Activating...","uael"):m?(0,v.__)("Deactivate License","uael"):(0,v.__)("Activate License","uael")))),d&&l().createElement("p",{className:"text-red-500 text-xs",style:{color:"red",marginTop:"-10px"}},d),l().createElement(Vt,null)))};const Ht=m("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);var $t=n(181),Yt=n.n($t);function qt(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 Kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gt=function(){var e=a((0,s.useState)({google_api:"",developer_mode:!1,language:"",google_places_api:"",yelp_api:"",recaptcha_v3_key:"",recaptcha_v3_secretkey:"",recaptcha_v3_score:"0.5",google_client_id:"",facebook_app_id:"",facebook_app_secret:"",uael_share_button:"",uael_maxmind_geolocation_license_key:"",uael_maxmind_geolocation_db_path:"",uael_twitter_feed_consumer_key:"",uael_twitter_feed_consumer_secret:"",instagram_app_id:"",instagram_app_secret:"",instagram_app_token:""}),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2),o=r[0],i=r[1],u=a((0,s.useState)(null),2),d=u[0],f=u[1],m=a((0,s.useState)(""),2),p=(m[0],m[1]),h=a((0,s.useState)(!1),2),g=h[0],y=h[1],b=a((0,s.useState)(!1),2),x=b[0],_=b[1],E=a((0,s.useState)("success"),2),S=E[0],C=E[1],N="object"===w(window.uaeLanguagesData)&&null!==window.uaeLanguagesData?Object.entries(window.uaeLanguagesData):[];(0,s.useEffect)((function(){i(!0),f(null),se()({path:"/uael/v1/settings",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_nonce_action}}).then((function(e){n(e),i(!1)})).catch((function(e){f(e.message),i(!1)}))}),[]);var T=(0,s.useCallback)(Yt()((function(e,t){if(""!==e&&""!==t){var n="google"===t?"Google Places API Key":"facebook"===t?"Facebook Access Token":"Yelp API Key";se()({path:"/uael/v1/validateApiKey",method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_nonce_action},body:JSON.stringify({apiKey:e,source:t})}).then((function(e){e.success?Lt.success("".concat(n," authenticated successfully!")):Lt.error("Entered ".concat(n," is invalid"))})).catch((function(e){Lt.error(e.message)}))}}),500),[]),P=function(e,t){n((function(n){return Kt(Kt({},n),{},k({},e,t))})),"google_places_api"===e&&T(t,"google"),"yelp_api"===e&&T(t,"yelp"),"uael_share_button"===e&&T(t,"facebook")};return o?l().createElement("div",{className:"h-screen w-screen flex items-center justify-center",style:{position:"relative"}},l().createElement(c.Loader,{icon:null,size:"lg",className:"bg-transparent relative uae-loader-icon"})):d?l().createElement("div",null,"Error: ",d):l().createElement("form",{onSubmit:function(e){e.preventDefault(),f(null),y(!0),fetch("/wp-json/uael/v1/settings",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_nonce_action},body:JSON.stringify(t)}).then((function(e){return e.json()})).then((function(e){"error"===e.maxmind_status?C("error"):C("success"),p("Settings saved successfully!"),Lt.success("Settings saved successfully!")})).catch((function(e){Lt.error("Settings cannot be saved!")})).finally((function(){y(!1)}))}},l().createElement("div",{className:"rounded-lg uael-settings-page"},l().createElement("div",{className:"flex flex-row items-center justify-between",style:{paddingBottom:"24px"}},l().createElement(c.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("Integrations","uael")}),l().createElement("div",{className:"flex items-center justify-between [&_h2]:text-[#6005ff]",style:{gap:"22px"}},l().createElement(c.Button,{type:"submit",style:{backgroundColor:"#6005ff",position:"relative"},className:"flex items-center justify-center",icon:g?l().createElement(Me,{className:"animate-spin"}):null,iconPosition:"left",disabled:g},g?(0,v.__)("Saving...","uael"):(0,v.__)("Save","uael")))),l().createElement(c.Container,{align:"stretch",className:"flex flex-row",containerType:"flex",direction:"column",gap:"sm",justify:"start",style:{marginTop:"24px"}},l().createElement("div",{className:"w-full"},l().createElement(c.Container,{align:"stretch",className:"flex flex-column bg-background-primary",containerType:"flex",direction:"column",style:{padding:"24px",borderRadius:"8px"}},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("Google Map","uael"),description:"",className:""}),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("API Key","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: This setting is required if you wish to use Google Map in your website. ","uael"),l().createElement("a",{href:"".concat(uaelSettingsData.uael_domain,"docs/create-google-map-api-key/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin"),target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael")),"."),className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"google_api",value:t.google_api,onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Paste your API Key here","uael"),className:"w-full border border-subtle",style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",marginTop:"16px"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})),l().createElement("div",{className:"border border-subtle",style:{height:"2px",backgroundColor:"#E5E7EB",marginTop:"16px"}}),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Localization Language","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: This setting sets localization language to google map. The language affects the names of controls, copyright notices, driving directions, and control labels. ","uael"),l().createElement("a",{href:"".concat(uaelSettingsData.uael_domain,"docs/how-to-display-uaels-google-maps-widget-in-your-local-language/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin"),target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael")),"."),className:"uae-subtitle"}),l().createElement("select",{name:"language",value:t.language,onChange:function(e){return P(e.target.name,e.target.value)},className:"border border-subtle rounded p-2 w-full",style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",marginTop:"16px"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}},l().createElement("option",{value:""},"Default"),N.map((function(e){var t=a(e,2),n=t[0],r=t[1];return l().createElement("option",{key:n,value:n},r)}))))),l().createElement(c.Container,{align:"stretch",className:"flex flex-column bg-background-primary",containerType:"flex",direction:"column",style:{padding:"24px",borderRadius:"8px",marginTop:"32px"}},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("Business Reviews","uael"),description:"",className:""}),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Google Places API Key","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: This setting is required if you wish to use Google Places Reviews in your website. ","uael"),l().createElement("a",{href:"".concat(uaelSettingsData.uael_domain,"docs/get-google-places-api-key/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin"),target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael"))),className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"google_places_api",value:t.google_places_api,className:"w-full border border-subtle",onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter Google Places API Key","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",marginTop:"16px"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}}),l().createElement("p",{className:"text-sm font-medium mt-2"},!uaelSettingsData.hide_settings&&l().createElement(l().Fragment,null,(0,v.__)("Google now requires an active billing account associated with your API Key. To enable billing click ","uael"),l().createElement("a",{href:"https://console.cloud.google.com/projectselector2/billing/enable",target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("here!","uael"))))),l().createElement("div",{className:"border border-subtle",style:{height:"2px",backgroundColor:"#E5E7EB",marginTop:"16px"}}),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Yelp API Key","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: This setting is required if you wish to use Yelp Reviews in your website. ","uael"),l().createElement("a",{href:"".concat(uaelSettingsData.uael_domain,"docs/get-yelp-api-key/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin"),target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael"))),className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"yelp_api",value:t.yelp_api,className:"w-full border border-subtle px-2",onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter Yelp API Key","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",marginTop:"16px"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}}))),l().createElement(c.Container,{align:"stretch",className:"flex flex-column bg-background-primary",containerType:"flex",direction:"column",style:{padding:"24px",borderRadius:"8px",marginTop:"32px"}},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("Setup reCAPTCHA v3","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: ","uael"),l().createElement("a",{href:"https://www.google.com/recaptcha/about/",target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("reCAPTCHA v3","uael")),(0,v.__)(" is a free service by Google that protects your website from spam and abuse. It does this while letting your valid users pass through with ease. ","uael"),l().createElement("a",{href:"https://ultimateelementor.com/docs/user-registration-form-with-recaptcha/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin",target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael")))}),l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 space-x-2"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Site key","uael"),description:"",className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"recaptcha_v3_key",value:t.recaptcha_v3_key,className:"w-full border border-subtle px-2",onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter reCAPTCHA v3 Key","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})),l().createElement("div",{className:"flex flex-row items-center mt-1 w-full gap-3"},l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Secret key","uael"),description:"",className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"recaptcha_v3_secretkey",value:t.recaptcha_v3_secretkey,onChange:function(e){return P(e.target.name,e.target.value)},className:"w-full border border-subtle px-2",placeholder:(0,v.__)("Enter reCAPTCHA v3 Secret Key","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})),l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Score Threshold","uael"),description:"",className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"recaptcha_v3_score",value:t.recaptcha_v3_score,onChange:function(e){return P(e.target.name,e.target.value)},className:"w-full border border-subtle px-2",placeholder:(0,v.__)("Enter reCAPTCHA v3 Score","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})))),l().createElement(c.Container,{align:"stretch",className:"flex flex-column bg-background-primary",containerType:"flex",direction:"column",style:{padding:"24px",borderRadius:"8px",marginTop:"32px"}},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("Login Form","uael"),description:"",className:""}),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Google Client ID","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: This setting is required if you wish to use Login with Google in your website. ","uael"),l().createElement("a",{href:"".concat(uaelSettingsData.uael_domain,"docs/create-google-client-id-for-login-form-widget/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin"),target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael"))),className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"google_client_id",value:t.google_client_id,className:"w-full border border-subtle rounded p-2",onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter Google Client ID","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",marginTop:"16px"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})),l().createElement("div",{className:"border border-subtle",style:{height:"2px",backgroundColor:"#E5E7EB",marginTop:"16px"}}),l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Facebook App Details","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: This setting is required if you wish to use Login with Google in your website. ","uael"),l().createElement("a",{href:"".concat(uaelSettingsData.uael_domain,"docs/create-facebook-app-id-for-login-form-widget/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin"),target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael"))),className:""}),l().createElement("div",{className:"flex flex-row items-center mt-1 w-full gap-3"},l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("App ID","uael"),description:"",className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"facebook_app_id",value:t.facebook_app_id,onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter Facebook App ID","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"},className:"w-full border border-subtle px-2"})),l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("App Secret","uael"),description:"",className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"facebook_app_secret",value:t.facebook_app_secret,onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter Facebook App Secret","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"},className:"w-full border border-subtle px-2"})))),l().createElement(c.Container,{align:"stretch",className:"flex flex-column bg-background-primary",containerType:"flex",direction:"column",style:{padding:"24px",borderRadius:"8px",marginTop:"32px"}},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("Social Share","uael"),description:"",className:""}),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Facebook Access Token","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: This setting is required if you wish to fetch share count of your post/page from Facebook. ","uael"),l().createElement("a",{href:"".concat(uaelSettingsData.uael_domain,"docs/display-share-count-for-facebook/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin"),target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael"))),className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"uael_share_button",value:t.uael_share_button,className:"w-full border border-subtle rounded p-2",onChange:function(e){return P(e.target.name,e.target.value)},placeholder:"",style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",marginTop:"16px"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}}))),l().createElement(c.Container,{align:"stretch",className:"flex flex-column bg-background-primary",containerType:"flex",direction:"column",style:{padding:"24px",borderRadius:"8px",marginTop:"32px"}},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("MaxMind Geolocation","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: An integration for utilizing MaxMind to do Geolocation lookups. Please note that this integration will only do Country lookups. ","uael"),l().createElement("a",{href:"".concat(uaelSettingsData.uael_domain,"docs/display-conditions-geolocation/?utm_source=uael-pro-dashboard&utm_medium=uael-menu-page&utm_campaign=uael-pro-plugin"),target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael"))),className:""}),l().createElement("div",{className:"flex flex-row items-center mt-1 w-full gap-3"},l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("License Key","uael"),description:"",className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"uael_maxmind_geolocation_license_key",value:t.uael_maxmind_geolocation_license_key,onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter MaxMind License Key","uael"),className:"w-full border border-subtle px-2",style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})),l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Database File Path","uael"),description:"",className:"uae-subtitle"}),l().createElement("input",{type:"text",disabled:!0,name:"uael_maxmind_geolocation_db_path",placeholder:uaelSettingsData.maxmind_db_path,style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"},className:"w-full border border-subtle px-2"}))),"error"===S&&l().createElement("div",{className:"error-message font-normal my-0 text-sm"},(0,v.__)("The MaxMind license key is invalid. If you have recently created this key, you may need to wait for it to become active.","uael"))),l().createElement(c.Container,{align:"stretch",className:"flex flex-column bg-background-primary",containerType:"flex",direction:"column",style:{padding:"24px",borderRadius:"8px",marginTop:"32px"}},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("Twitter Feed","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: To display your Twitter Feed on your website, you'll need to acquire Twitter's basic plan and obtain your Twitter Consumer Key and Consumer Secret Key. For guidance on obtaining these keys, ","uael"),l().createElement("a",{href:"".concat(uaelSettingsData.uael_domain,"docs/twitter-feed-widget/?utm_source=uael-pro-dashboard&utm_medium=uael-editor-screen&utm_campaign=uael-pro-plugin"),target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael"))),className:""}),l().createElement("div",{className:"flex flex-row items-center mt-1 w-full gap-3"},l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Consumer Key","uael"),className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"uael_twitter_feed_consumer_key",value:t.uael_twitter_feed_consumer_key,onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter Twitter Consumer Key","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"},className:"w-full border border-subtle px-2"})),l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Consumer Secret","uael"),className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"uael_twitter_feed_consumer_secret",value:t.uael_twitter_feed_consumer_secret,onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter Twitter Consumer Secret","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"},className:"w-full border border-subtle px-2"})))),l().createElement(c.Container,{align:"stretch",className:"flex flex-column bg-background-primary",containerType:"flex",direction:"column",style:{padding:"24px",borderRadius:"8px",marginTop:"32px"}},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("Instagram Feed - Instagram Product API Details","uael"),description:uaelSettingsData.hide_settings?"":l().createElement(l().Fragment,null,(0,v.__)("Note: This setting is required if you wish to use Instagram Feed in your website. ","uael"),l().createElement("a",{href:"".concat(uaelSettingsData.uael_domain,"docs/instagram-feed-widget/?utm_source=uael-pro-dashboard&utm_medium=uael-editor-screen&utm_campaign=uael-pro-plugin"),target:"_blank",rel:"noopener noreferrer",className:"uael-link-color no-underline"},(0,v.__)("Need Help?","uael"))),className:""}),l().createElement("div",{className:"flex flex-row items-center mt-1 w-full gap-3"},l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("App ID","uael"),description:"",className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"instagram_app_id",value:t.instagram_app_id,onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter Instagram App ID","uael"),className:"w-full border border-subtle px-2",style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})),l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("App Secret","uael"),description:"",className:"uae-subtitle"}),l().createElement("input",{type:"text",name:"instagram_app_secret",value:t.instagram_app_secret,onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter Instagram App Secret","uael"),className:"w-full border border-subtle px-2",style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}}))),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2 mt-1"},l().createElement("div",{className:"flex flex-row items-center justify-between pb-1"},l().createElement(c.Title,{icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,v.__)("Access Token","uael"),description:"",className:"uae-subtitle"}),l().createElement(c.Button,{icon:x?l().createElement(Me,{className:"animate-spin"}):l().createElement(Ht,{style:{color:"#6005FF"}}),className:"uael-remove-ring",variant:"link",iconPosition:"left",onClick:function(){t.instagram_app_token&&(_(!0),fetch("https://graph.instagram.com/refresh_access_token"+"?grant_type=ig_refresh_token&access_token=".concat(t.instagram_app_token),{method:"GET",headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){_(!1),e.access_token?(n((function(t){return Kt(Kt({},t),{},{instagram_app_token:e.access_token})})),Lt.success("Access token refreshed successfully")):e.error&&Lt.error(e.error.message||"An error occurred while refreshing the token.")})).catch((function(e){_(!1),Lt.error("Failed to refresh the access token. Please try again.")})))},style:{width:"fit-content",outline:"none",textDecoration:"none",color:"#6005FF"}},x?(0,v.__)("Refreshing token...","uael"):(0,v.__)("Refresh Access Token","uael"))),l().createElement("input",{type:"text",name:"instagram_app_token",value:t.instagram_app_token,onChange:function(e){return P(e.target.name,e.target.value)},placeholder:(0,v.__)("Enter Instagram Access Token","uael"),className:"w-full border border-subtle",style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}}))),l().createElement(c.Button,{type:"submit",style:{backgroundColor:"#6005ff"},icon:g?l().createElement(Me,{className:"animate-spin"}):null,iconPosition:"left",disabled:g,className:"w-full mt-4 sticky"},g?(0,v.__)("Saving...","uael"):(0,v.__)("Save","uael")),l().createElement(Ft,{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"}}}})))))};function Xt(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 Jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xt(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zt=function(e){var t=a((0,s.useState)({author:"",author_url:"",plugin_name:"",short_name:"",description:"",hide_branding:!1,logo_url:"",internal_help_links:!1,replace_logo:!1}),2),n=t[0],r=t[1],o=a((0,s.useState)(!0),2),i=o[0],u=o[1],d=a((0,s.useState)(!1),2),f=d[0],m=d[1];if((0,s.useEffect)((function(){u(!0),se()({path:"/uael/v1/branding",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_nonce_action}}).then((function(e){r({author:e.agency.author||"",author_url:e.agency.author_url||"",plugin_name:e.plugin.name||"",short_name:e.plugin.short_name||"",description:e.plugin.description||"",hide_branding:"1"===e.agency.hide_branding||"enable"===e.agency.hide_branding,replace_logo:"enable"===e.replace_logo,logo_url:e.logo_url||"",internal_help_links:"enable"===e.internal_help_links}),u(!1)})).catch((function(e){console.error("Error fetching branding settings:",e),Lt.error((0,v.__)("Error fetching settings. Please try again.","uael")),u(!1)}))}),[]),i)return l().createElement("div",{className:"h-screen w-screen flex items-center justify-center",style:{position:"relative"}},l().createElement(c.Loader,{icon:null,size:"lg",className:"bg-transparent relative uae-loader-icon"}));var p=function(e,t){r((function(n){return Jt(Jt({},n),{},k({},e,t))}))};return l().createElement("form",{onSubmit:function(e){e.preventDefault(),m(!0);var t={agency:{author:n.author,author_url:n.author_url,hide_branding:n.hide_branding?"enable":"disable"},plugin:{name:n.plugin_name,short_name:n.short_name,description:n.description},logo_url:n.logo_url,internal_help_links:n.internal_help_links?"enable":"disable",replace_logo:n.replace_logo?"enable":"disable"};fetch("/wp-json/uael/v1/branding",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_nonce_action},body:JSON.stringify(t)}).then((function(e){if(!e.ok)throw new Error("Network response was not ok");return e.json()})).then((function(){Lt.success((0,v.__)("Settings saved successfully!","uael")),location.reload()})).catch((function(e){console.error("Error saving settings:",e),Lt.error((0,v.__)("Error saving settings. Please try again.","uael"))})).finally((function(){m(!1)}))}},l().createElement("div",{className:"rounded-lg"},l().createElement("div",{className:"flex flex-row items-center justify-between",style:{paddingBottom:"24px"}},l().createElement(c.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("White Label","uael")}),l().createElement("div",{className:"flex items-center justify-between [&_h2]:text-[#6005ff]",style:{gap:"22px"}},l().createElement("div",{className:"flex items-center gap-1 cursor-pointer",style:{position:"relative"}},l().createElement(h,{style:{color:"#6005ff",size:"20px"}}),l().createElement("a",{href:"https://ultimateelementor.com/docs/how-to-white-label-uael/",target:"_blank",className:"text-[#6005ff] text-sm font-medium no-underline",style:{color:"#6005ff",boxShadow:"none"}},(0,v.__)("Read Documentation","uael"))),l().createElement(c.Button,{type:"submit",style:{backgroundColor:"#6005ff",position:"relative"},className:"flex items-center justify-center",icon:f?l().createElement(Me,{className:"animate-spin"}):null,iconPosition:"left",disabled:f},f?(0,v.__)("Saving...","uael"):(0,v.__)("Save","uael")))),l().createElement(c.Container,{align:"stretch",className:"flex flex-row",containerType:"flex",direction:"column",gap:"sm",justify:"start"},l().createElement("div",null,l().createElement(c.Container,{align:"stretch",className:"flex flex-column bg-background-primary",containerType:"flex",direction:"column",style:{padding:"24px",borderRadius:"8px"}},l().createElement(c.Title,{size:"sm",tag:"h2",title:(0,v.__)("Plugins Details","uael"),description:(0,v.__)("You can change the author name and plugin details that are displayed in the WordPress backend.","uael")}),l().createElement("div",{className:"flex flex-row items-center mt-1 w-full gap-3"},l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement("div",{className:"text-base text-field-label font-semibold m-0 mb-2"},"Author"),l().createElement("input",{label:(0,v.__)("Author:","uael"),name:"author",type:"text",value:n.author,className:"w-full border border-subtle px-2",onChange:function(e){return p(e.target.name,e.target.value)},placeholder:(0,v.__)("Brainstorm Force","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})),l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement("div",{className:"text-base text-field-label font-semibold m-0 mb-2"},"Author URL"),l().createElement("input",{label:(0,v.__)("Author URL:","uael"),name:"author_url",className:"w-full border border-subtle px-2",type:"url",value:n.author_url,onChange:function(e){return p(e.target.name,e.target.value)},placeholder:(0,v.__)("https://www.brainstormforce.com","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}}))),l().createElement("div",{className:"flex flex-row items-center mt-1 w-full gap-3"},l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement("div",{className:"text-base text-field-label font-semibold m-0 mb-2"},"Plugin Name"),l().createElement("input",{label:(0,v.__)("Plugin Name:","uael"),name:"plugin_name",type:"text",className:"w-full border border-subtle px-2",value:n.plugin_name,onChange:function(e){return p(e.target.name,e.target.value)},placeholder:(0,v.__)("Ultimate Addons","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})),l().createElement(c.Container.Item,{className:"flex flex-col space-y-1 basis-1/2 flex-1"},l().createElement("div",{className:"text-base text-field-label font-semibold m-0 mb-2"},"Plugin Short Name"),l().createElement("input",{label:(0,v.__)("Plugin Short Name:","uael"),name:"short_name",type:"text",className:"w-full border border-subtle px-2",value:n.short_name,onChange:function(e){return p(e.target.name,e.target.value)},placeholder:(0,v.__)("UAE","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}}))),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement("div",{className:"text-base text-field-label font-semibold m-0"},"Plugin Description"),l().createElement("input",{label:(0,v.__)("Plugin Description:","uael"),name:"description",type:"text",className:"w-full border border-subtle",value:n.description,onChange:function(e){return p(e.target.name,e.target.value)},placeholder:(0,v.__)("Ultimate Addons is a premium extension for Elementor...","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",marginTop:"16px"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})),l().createElement("div",{className:"border border-subtle",style:{height:"2px",backgroundColor:"#E5E7EB",marginTop:"6px"}}),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement("div",{className:"flex flex-row items-center justify-between px-1"},l().createElement("div",null,l().createElement(c.Title,{size:"xs",tag:"h3",title:(0,v.__)("Replace or Hide Logo","uael"),className:"mt-4",description:(0,v.__)("Enable this option to hide the default logo or replace it with your own logo. (Note: To hide the logo, leave the logo URL field empty.)","uael")})),l().createElement(c.Switch,{onChange:function(e){return p("replace_logo",e)},size:"md",value:n.replace_logo,className:"uael-remove-ring"}))),n.replace_logo&&l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement("div",{className:"text-base text-field-label font-semibold m-0"},(0,v.__)("Enter logo URL to replace","uael")),l().createElement("input",{label:(0,v.__)("Replace Plugin Logo URL:","uael"),name:"logo_url",type:"url",className:"w-full border border-subtle",value:n.logo_url,onChange:function(e){return p(e.target.name,e.target.value)},placeholder:(0,v.__)("https://www.example.com/logo.svg","uael"),style:{height:"48px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",marginTop:"16px"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"}})),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement("div",{className:"flex flex-row items-center justify-between px-1"},l().createElement("div",null,l().createElement(c.Title,{size:"xs",tag:"h3",title:(0,v.__)("Hide White Label Settings","uael"),className:"mt-4",description:(0,v.__)("Enabling this option will hide the White Label settings. To access it again, re-activate the plugin.","uael")})),l().createElement(c.Switch,{onChange:function(e){return p("hide_branding",e)},size:"md",value:n.hide_branding}))),l().createElement("div",{className:"border border-subtle",style:{height:"2px",backgroundColor:"#E5E7EB",marginTop:"6px"}}),l().createElement(c.Container.Item,{className:"flex flex-col w-full space-y-1 space-x-2"},l().createElement(c.Title,{size:"sm",tag:"h2",title:(0,v.__)("Elementor Editor Area","uael"),className:"mt-1"}),l().createElement("div",{className:"flex flex-row items-center justify-between px-1"},l().createElement(c.Title,{size:"xs",tag:"h3",title:(0,v.__)("Show Help Links","uael"),className:"mt-4",description:(0,v.__)("Display internal help links in widget editor area.","uael")}),l().createElement(c.Switch,{onChange:function(e){return p("internal_help_links",e)},size:"md",value:n.internal_help_links}))))),l().createElement(Ft,{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"}}}}))))},Qt=[],en=function(){0!==Qt.length&&Qt.shift()()},tn=function(e){var t=e.widget,n=e.updateCounter,r=t.id,o=t.image,i=t.title,u=a((0,s.useState)(t.is_active),2),d=u[0],f=u[1],m=a((0,s.useState)(!1),2),p=m[0],h=m[1];(0,s.useEffect)((function(){f(t.is_active)}),[t.is_active,n]);var g=function(e){var t=e?"uael_deactivate_widget":"uael_activate_widget",n=new window.FormData;n.append("action",t),n.append("nonce",uaelSettingsData.ajax_nonce),n.append("module_id",r);try{var o=se()({url:uaelSettingsData.ajax_url,method:"POST",body:n});o.success?f(d):o.error}catch(e){}finally{h(!1),en()}};return l().createElement(c.Container,{align:"center",containerType:"flex",direction:"row",justify:"between",gap:""},l().createElement("div",{className:"flex flex-col w-full"},l().createElement("div",{className:"flex items-center justify-between 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"},l().createElement(c.Switch,{onChange:function(){p||(h(!0),d?(f(!1),Qt.push((function(){return g(d)}))):(f(!0),Qt.push((function(){return g(d)}))),1===Qt.length&&en())},size:"sm",value:d}))),l().createElement("img",{src:o,alt:"Custom SVG",className:"mt-2"})))};function nn(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 rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var on=function(){var e=a((0,s.useState)(null),2),t=e[0],n=e[1],r=a((0,s.useState)(!1),2),o=r[0],i=r[1],u=a((0,s.useState)(!1),2),d=u[0],f=u[1],m=a((0,s.useState)(0),2),p=m[0],h=m[1],g=a((0,s.useState)(!0),2),y=g[0],b=g[1];(0,s.useEffect)((function(){b(!0),se()({path:"/uael/v1/postskins",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_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,image:r.image,default:r.default,is_active:void 0===r.is_activate||r.is_activate})}return t}(e);n(t),b(!1)})).catch((function(e){b(!1)}))}),[]);var w=function(){var e=xe(Ee().mark((function e(){var t;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i(!0),(t=new window.FormData).append("action","uael_bulk_activate_skins"),t.append("nonce",uaelSettingsData.ajax_nonce),se()({url:uaelSettingsData.ajax_url,method:"POST",body:t}).then((function(e){i(!1),e.success?(n((function(e){return e.map((function(e){return rn(rn({},e),{},{is_active:!0})}))})),h((function(e){return e+1})),Lt.success((0,v.__)("All skins activated successfully!.","uael"))):e.error&&(console.error("AJAX request failed:",e.error),Lt.error((0,v.__)("Failed to activate all skins.","uael")))})).catch((function(e){i(!1),console.error("Error during AJAX request:",e),Lt.error((0,v.__)("An error occurred while activating all skins.","uael"))}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){var e=xe(Ee().mark((function e(){var t;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f(!0),(t=new window.FormData).append("action","uael_bulk_deactivate_skins"),t.append("nonce",uaelSettingsData.ajax_nonce),se()({url:uaelSettingsData.ajax_url,method:"POST",body:t}).then((function(e){f(!1),e.success?(n((function(e){return e.map((function(e){return rn(rn({},e),{},{is_active:!1})}))})),h((function(e){return e+1})),Lt.success((0,v.__)("All skins deactivated successfully!.","uael"))):e.error&&(console.error("AJAX request failed:",e.error),Lt.error((0,v.__)("Failed to deactivate all skins.","uael")))})).catch((function(e){f(!1),console.error("Error during AJAX request:",e),Lt.error((0,v.__)("An error occurred while deactivating all skins.","uael"))}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return y?l().createElement("div",{className:"h-screen w-screen flex items-center justify-center",style:{position:"relative"}},l().createElement(c.Loader,{icon:null,size:"lg",className:"bg-transparent relative uae-loader-icon"})):l().createElement(l().Fragment,null,l().createElement(Ft,{position:"top-right",reverseOrder:!1,gutter:8,containerStyle:{top:20,right:20,marginTop:"40px"},toastOptions:{duration:5e3,style:{background:"white"},success:{duration:3e3,iconTheme:{primary:"#6005ff",secondary:"#fff"}}}}),l().createElement(c.Title,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,v.__)("Post Widget Skins","uael")}),l().createElement("div",{className:"rounded-lg bg-white mb-4"},l().createElement("div",{className:"flex flex-col md:flex-row items-center justify-between p-4",style:{paddingBottom:"0",marginTop:"16px"}},l().createElement("p",{className:"m-0 text-sm font-semibold text-text-primary"},"Skins"),l().createElement("div",{className:"flex items-center gap-x-2 mr-7"},l().createElement(c.Button,{icon:o?l().createElement(Me,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",className:"uae-bulk-action-button",onClick:w},o?"Activating...":"Activate All"),l().createElement(c.Button,{icon:d?l().createElement(Me,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",onClick:x,className:"uae-bulk-action-button"},d?"Deactivating...":"Deactivate All"))),l().createElement("div",{className:"flex bg-black flex-col rounded-lg p-4"},y?l().createElement(c.Container,{align:"stretch",className:"p-2 gap-1.5",cols:1,style:{backgroundColor:"#F9FAFB",height:"380px"},containerType:"grid",gap:"",justify:"start"},oe(Array(4)).map((function(e,t){return l().createElement(c.Container.Item,{key:t,alignSelf:"auto",className:"text-wrap rounded-md bg-background-primary p-6 space-y-2"},l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-16 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}))}))):l().createElement(c.Container,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-1 md:grid-cols-2",containerType:"grid",gap:"",justify:"start",style:{backgroundColor:"#F9FAFB"}},null==t?void 0:t.slice(0,4).map((function(e){return l().createElement(c.Container.Item,{key:e.id,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},l().createElement(tn,{widget:rn(rn({},e),{},{updateCounter:p}),key:e.id,updateCounter:p}))}))))))},an=function(){var e=[{id:1,icon:l().createElement("img",{src:"".concat(uaelSettingsData.user_url),alt:"Custom SVG",className:"object-contain"}),selected:l().createElement("img",{src:"".concat(uaelSettingsData.user__selected_url),alt:"Custom SVG",className:"object-contain"}),title:(0,v.__)("My Account","uael"),content:l().createElement(Ut,null)},{id:2,icon:l().createElement("img",{src:"".concat(uaelSettingsData.theme_url),alt:"Custom SVG",className:"object-contain"}),selected:l().createElement("img",{src:"".concat(uaelSettingsData.theme__selected_url),alt:"Custom SVG",className:"object-contain"}),main:(0,v.__)("Editor","uael"),title:(0,v.__)("Theme Support","uael"),content:l().createElement(Bt,null)},{id:3,icon:l().createElement("img",{src:"".concat(uaelSettingsData.version_url),alt:"Custom SVG",className:"object-contain"}),selected:l().createElement("img",{src:"".concat(uaelSettingsData.version__selected_url),alt:"Custom SVG",className:"object-contain"}),main:(0,v.__)("Utilities","uael"),title:(0,v.__)("Version Control","uael"),content:l().createElement(Wt,null)},{id:4,icon:l().createElement("img",{src:"".concat(uaelSettingsData.branding_url),alt:"Custom SVG",className:"object-contain"}),selected:l().createElement("img",{src:"".concat(uaelSettingsData.branding__selected_url),alt:"Custom SVG",className:"object-contain"}),main:"",title:(0,v.__)("Branding","uael"),content:l().createElement(Zt,null)},{id:5,icon:l().createElement("img",{src:"".concat(uaelSettingsData.integrations_url),alt:"Custom SVG",className:"object-contain"}),selected:l().createElement("img",{src:"".concat(uaelSettingsData.integrations__selected_url),alt:"Custom SVG",className:"object-contain"}),main:(0,v.__)("Preferences","uael"),title:(0,v.__)("Integrations","uael"),content:l().createElement(Gt,null)},{id:6,icon:l().createElement("img",{src:"".concat(uaelSettingsData.postskins_url),alt:"Custom SVG",className:"object-contain"}),selected:l().createElement("img",{src:"".concat(uaelSettingsData.postskins_selected_url),alt:"Custom SVG",className:"object-contain"}),main:(0,v.__)("Skins","uael"),title:(0,v.__)("Post Widget Skins","uael"),content:l().createElement(on,null)}].filter((function(e){return("no"!==uaelSettingsData.show_theme_support||2!==e.id)&&(!uaelSettingsData.hide_settings||3!==e.id&&4!==e.id)})),t=a((0,s.useState)((function(){var t=localStorage.getItem("selectedItemId");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("selectedItemId",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(ne,{onSettingsTabClick:function(){r(e[0])}})," ",l().createElement("div",null,l().createElement(re,null),l().createElement(c.Container,{align:"stretch",className:"p-1 flex-col lg:flex-row uae-settings-page",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{height:"100%"}},l().createElement(c.Container.Item,{className:"p-2 uae-sticky-outer-wrapper",alignSelf:"auto",order:"none",shrink:1,style:{backgroundColor:"#ffffff"}},l().createElement("div",{className:"uae-sticky-sidebar"},l().createElement(Be,{items:e,onSelectItem:function(e){r(e)},selectedItemId:n.id}))),l().createElement(c.Container.Item,{className:"p-2 flex w-full justify-center items-start uae-hide-scrollbar",alignSelf:"auto",order:"none",shrink:1,style:{height:"calc(100vh - 1px)",overflowY:"auto"}},l().createElement("div",{className:"uael-78-width"},l().createElement(We,{selectedItem:n}))))))};const sn=m("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ln=m("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);function cn(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 un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dn=function(){var e=a((0,s.useState)(null),2),t=e[0],n=e[1],r=a((0,s.useState)(""),2),o=r[0],i=(r[1],a((0,s.useState)(!1),2)),u=i[0],d=i[1],f=a((0,s.useState)(!1),2),m=f[0],p=f[1],h=a((0,s.useState)(!0),2),g=h[0],y=h[1],b=a((0,s.useState)(0),2),w=b[0],x=b[1];(0,s.useEffect)((function(){y(!0),se()({path:"/uael/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_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),y(!1)})).catch((function(e){y(!1)}))}),[]);var _=null==t?void 0:t.filter((function(e){var t;return e.title.toLowerCase().includes(o)||(null===(t=e.keywords)||void 0===t?void 0:t.some((function(e){return e.toLowerCase().includes(o)})))})),E=function(){var e=xe(Ee().mark((function e(){var t;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d(!0),(t=new window.FormData).append("action","uael_bulk_activate_widgets"),t.append("nonce",uaelSettingsData.ajax_nonce),se()({url:uaelSettingsData.ajax_url,method:"POST",body:t}).then((function(e){d(!1),e.success?(n((function(e){return e.map((function(e){return un(un({},e),{},{is_active:!0})}))})),x((function(e){return e+1}))):e.error&&(d(!1),console.error("Error during AJAX request:",error))})).catch((function(e){d(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=xe(Ee().mark((function e(){var t;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p(!0),(t=new window.FormData).append("action","uael_bulk_deactivate_widgets"),t.append("nonce",uaelSettingsData.ajax_nonce),se()({url:uaelSettingsData.ajax_url,method:"POST",body:t}).then((function(e){p(!1),e.success?(n((function(e){return e.map((function(e){return un(un({},e),{},{is_active:!1})}))})),x((function(e){return e+1}))):e.error&&console.error("AJAX request failed:",e.error)})).catch((function(e){p(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return l().createElement("div",{className:"rounded-lg w-full mb-4"},l().createElement("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between p-4",style:{paddingTop:"1.5rem"}},l().createElement("h4",{className:"m-0 font-semibold text-text-primary mb-2 md:mb-0"},(0,v.__)("WIDGETS","header-footer-elementor")),l().createElement("div",{className:"flex flex-col md:flex-row items-center gap-y-2 md:gap-x-2 md:mr-7 relative",style:{paddingRight:"0.75rem"}},l().createElement("div",{className:"flex flex-row w-full md:w-auto"},l().createElement(c.Button,{icon:u?l().createElement(Me,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",className:"uael-bulk-action-button uael-remove-ring",onClick:E,disabled:!!o,style:{borderTopRightRadius:"0px",borderBottomRightRadius:"0px",borderRight:"0px",fontSize:"0.9em"}},u?(0,v.__)("Activating...","header-footer-elementor"):(0,v.__)("Activate All","header-footer-elementor")),l().createElement(c.Button,{icon:m?l().createElement(Me,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",onClick:S,className:"uael-bulk-action-button uael-remove-ring",disabled:!!o,style:{borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px",fontSize:"0.9em"}},m?(0,v.__)("Deactivating...","header-footer-elementor"):(0,v.__)("Deactivate All","header-footer-elementor"))))),l().createElement("div",{className:"uael-custom-scrollbar bg-background-secondary p-1 rounded-lg max-h-80",style:{overflow:"auto",maxHeight:"20rem",paddingTop:"0"}},l().createElement("div",{className:"flex bg-black flex-col p-3",style:{minHeight:"800px",paddingTop:"0"}},g?l().createElement(c.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(30)).map((function(e,t){return l().createElement(c.Container.Item,{key:t,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-8 space-y-2"},l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-16 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}))}))):l().createElement(c.Container,{align:"stretch",className:"p-1 gap-1.5 grid-cols-2 md:grid-cols-4",containerType:"grid",gap:"",justify:"start",style:{paddingTop:"0"}},null==_?void 0:_.map((function(e){return l().createElement(c.Container.Item,{key:e.id,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},l().createElement(ue,{widget:un(un({},e),{},{updateCounter:w}),key:e.id,updateCounter:w}))}))))))};function fn(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 mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pn=function(e){e.widgets;var t=e.updateCounter,n=e.setCurrentStep,r=a((0,s.useState)([]),2),o=(r[0],r[1]),i=a((0,s.useState)(!1),2),u=(i[0],i[1]);(0,s.useEffect)((function(){var e=function(){var e=xe(Ee().mark((function e(){var t;return Ee().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,u(!0),e.next=4,se()({path:"/uael/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_nonce_action}});case 4:t=e.sent,o(d(t)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.error("Failed to fetch widgets:",e.t0);case 11:return e.prev=11,u(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[0,8,11,14]])})));return function(){return e.apply(this,arguments)}}();e()}),[t]);var d=function(e){return Object.entries(e).map((function(e){var t=a(e,2),n=t[0],r=t[1];return mn(mn({id:n},r),{},{is_active:void 0===r.is_activate||r.is_activate})}))};return l().createElement("div",{className:"flex flex-col gap-4"},l().createElement("div",{className:"bg-background-secondary uael-min-700"},l().createElement("form",null,l().createElement("div",{className:"md:w-[47rem] box-border mx-auto space-y-4"},l().createElement(dn,null)))),l().createElement("div",{className:"flex justify-between items-center pt-1 px-4 gap-4 uael-onboarding-bottom"},l().createElement(c.Button,{className:"flex items-center gap-1 uael-remove-ring",icon:l().createElement(Ne,null),variant:"outline",onClick:function(){return n(1)}},(0,v.__)("Back","header-footer-elementor")),l().createElement("div",{className:"flex justify-end items-center gap-3"},l().createElement(c.Button,{className:"uael-remove-ring",variant:"ghost",onClick:function(){return n(3)}}," ",(0,v.__)("Skip","header-footer-elementor")),l().createElement(c.Button,{className:"flex items-center gap-1 uael-remove-ring",icon:l().createElement(ln,null),iconPosition:"right",style:{backgroundColor:"#6005FF",transition:"background-color 0.3s ease",padding:"12px"},onClick:function(){return n(3)}},(0,v.__)(" Continue Setup","header-footer-elementor")))))},hn=function(e){var t=e.setCurrentStep,n=a((0,s.useState)(null),2),r=n[0],o=n[1],i=a((0,s.useState)(""),2),u=i[0],d=(i[1],a((0,s.useState)(!1),2)),f=(d[0],d[1],a((0,s.useState)(!1),2)),m=(f[0],f[1],a((0,s.useState)(!0),2)),p=m[0],h=m[1],g=a((0,s.useState)(0),2),y=g[0];g[1],(0,s.useEffect)((function(){h(!0),se()({path:"/uael/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":uaelSettingsData.uael_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);o(t),h(!1)})).catch((function(e){h(!1)})),history.pushState(null,"",window.location.href);var e=function(e){e.preventDefault(),localStorage.setItem("currentStep","1"),window.location.reload()};return window.addEventListener("popstate",e),function(){window.removeEventListener("popstate",e)}}),[]);var b=null==r?void 0:r.filter((function(e){var t;return e.title.toLowerCase().includes(u)||(null===(t=e.keywords)||void 0===t?void 0:t.some((function(e){return e.toLowerCase().includes(u)})))}));return l().createElement("div",{className:"rounded-lg bg-white p-6 uae-onboarding-customize"},l().createElement("h1",{className:"text-text-primary m-0 mb-2",style:{fontSize:"1.4rem",lineHeight:"1.3em"}},(0,v.__)("Customize Your UAE Setup","uael")),l().createElement("span",{className:"text-md font-medium text-text-tertiary m-0",style:{lineHeight:"1.6em"}},(0,v.__)("Activate only what you need to keep your website fast and optimized.","uael")),l().createElement("div",{className:"flex bg-black flex-col rounded-lg",style:{marginTop:"2rem"}},p?l().createElement(c.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(30)).map((function(e,t){return l().createElement(c.Container.Item,{key:t,alignSelf:"auto",style:{padding:"3.5rem"},className:"text-wrap rounded-md shadow-container-item bg-background-primary space-y-2"},l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-16 h-2 rounded-md"}),l().createElement(c.Skeleton,{className:"w-12 h-2 rounded-md"}))}))):l().createElement(c.Container,{align:"stretch"},l().createElement(pn,{setCurrentStep:t,widgets:b,updateCounter:y}))))},gn=[{label:"Welcome",component:function(e){var t=e.setCurrentStep;return l().createElement("div",{className:"bg-background-primary border-[0.5px] items-start justify-center border-subtle rounded-xl shadow-sm mb-6 p-8 flex flex-col",style:{maxWidth:"55%"}},l().createElement("div",{className:"px-1"},l().createElement("div",{className:"flex flex-col"},l().createElement("h1",{className:"text-text-primary m-0 mb-2 uael-65-width",style:{fontSize:"1.6rem",lineHeight:"1.3em"}},l().createElement("span",{className:"block"},(0,v.__)("Thank You For Choosing","uael")),l().createElement("span",{className:"block"},(0,v.__)("Ultimate Addons for Elementor","uael"))),l().createElement("span",{className:"text-md font-medium text-text-tertiary m-0 mb-6 uael-88-width",style:{lineHeight:"1.5em"}},(0,v.__)("We're excited to have you onboard. Get ready to create stunning headers, footers, and custom blocks with ease while keeping your website lightweight and fast.","uael"))),l().createElement("img",{alt:"Welcome",className:"w-full h-auto mb-6 mt-2",src:"".concat(uaelSettingsData.welcome_banner),loading:"lazy"}),l().createElement(c.Button,{iconPosition:"right",variant:"primary",className:"bg-[#6005FF] uael-remove-ring p-3 px-5 font-bold mt-2",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(){return t(2)}},(0,v.__)("Let's Get Started","uael"))))}},{label:"Configure",component:function(e){var t=e.setCurrentStep;return l().createElement(hn,{setCurrentStep:t})}},{label:"Create",component:function(e){e.setCurrentStep;var t=a((0,s.useState)(!1),2),n=(t[0],t[1],a((0,s.useState)(""),2)),r=(n[0],n[1]),o=a((0,s.useState)(!1),2);return o[0],o[1],(0,s.useEffect)((function(){r(uaelSettingsData.user_email),history.pushState(null,"",window.location.href);var e=function(e){e.preventDefault(),localStorage.setItem("currentStep","2"),window.location.reload()};return window.addEventListener("popstate",e),function(){window.removeEventListener("popstate",e)}}),[uaelSettingsData.user_email]),l().createElement("div",{className:"bg-background-primary border-[0.5px] border-subtle rounded-xl shadow-sm mb-6 p-8",style:{maxWidth:"55%"}},l().createElement("div",{className:"flex items-start uael-display-flex"},l().createElement("div",{className:"flex flex-col items-start",style:{paddingRight:"35px"}},l().createElement("h1",{className:"text-text-primary m-0 mb-2",style:{fontSize:"1.6rem",lineHeight:"1.3em"}},(0,v.__)("You're all set!🚀","uael")),l().createElement("span",{className:"text-md font-medium text-text-tertiary m-0 mb-4 uael-88-width",style:{lineHeight:"1.6em"}},uaelSettingsData.is_lite_active?l().createElement(l().Fragment,null,(0,v.__)("Start creating headers, footers, or pages with UAE and take your website to the next level","uael")):l().createElement(l().Fragment,null,(0,v.__)("Start creating amazing designs with UAE and take your website to the next level","uael"))),l().createElement("span",{className:"font-bold m-0 pt-2"},(0,v.__)("Here’s how to get started:","uael")),uaelSettingsData.is_lite_active?l().createElement("ol",{className:"list-decimal text-text-tertiary text-sm",style:{marginLeft:"1.4em",lineHeight:"1.6em",paddingBottom:"0.5rem"}},l().createElement("li",null,(0,v.__)("Click on “Create” button","uael")),l().createElement("li",null,(0,v.__)("Use the Elementor editor to customize your header, footer, page or post according to your preferences","uael")),l().createElement("li",null,(0,v.__)("Use UAE widgets for your designs","uael")),l().createElement("li",null,(0,v.__)("Click “Publish” to make it live","uael"))):l().createElement("ol",{className:"list-decimal text-text-tertiary text-sm",style:{marginLeft:"1.4em",lineHeight:"1.6em",paddingBottom:"0.5rem"}},l().createElement("li",null,(0,v.__)("Click on “Create New Page” button","uael")),l().createElement("li",null,(0,v.__)("Use the Elementor editor to customize your page/post according to your preferences","uael")),l().createElement("li",null,(0,v.__)("Use UAE widgets to design your pages.","uael")),l().createElement("li",null,(0,v.__)("Click “Publish” to make it live","uael")))),l().createElement("div",{className:"w-1/2",style:{textAlign:"end"}},l().createElement("img",{alt:"Build",className:"w-full object-contain",style:{height:"210px",width:"auto"},src:"".concat(uaelSettingsData.build_banner),loading:"lazy"}))),l().createElement("div",{className:"flex flex-row gap-1 pb-4 uael-display-flex"},uaelSettingsData.is_lite_active?l().createElement(l().Fragment,null,l().createElement(c.Button,{icon:l().createElement(ln,null),iconPosition:"right",variant:"primary",className:"bg-[#6005FF] uael-remove-ring mr-2",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(uaelSettingsData.uael_hfe_post_url,"_blank")}},(0,v.__)("Create Header/Footer","uael")),l().createElement(c.Button,{icon:l().createElement(ye,null),iconPosition:"right",variant:"outline",className:"uael-remove-ring",style:{color:"#6005FF",borderColor:"#6005FF"},onMouseEnter:function(e){return(e.currentTarget.style.color="#000000")&&(e.currentTarget.style.borderColor="#000000")},onMouseLeave:function(e){return(e.currentTarget.style.color="#6005FF")&&(e.currentTarget.style.borderColor="#6005FF")},onClick:function(){window.open(uaelSettingsData.elementor_page_url,"_blank")}},(0,v.__)("Create New Page","uael"))):l().createElement(c.Button,{icon:l().createElement(ye,null),iconPosition:"right",variant:"primary",className:"bg-[#6005FF] uael-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(uaelSettingsData.elementor_page_url,"_blank")}},(0,v.__)("Create New Page","uael")),l().createElement(H,{to:b.dashboard.path},l().createElement(c.Button,{icon:l().createElement(ln,null),iconPosition:"right",variant:"ghost",className:"uael-remove-ring",onMouseLeave:function(e){return(e.currentTarget.style.color="#000000")&&(e.currentTarget.style.borderColor="#000000")},onMouseEnter:function(e){return(e.currentTarget.style.color="#6005FF")&&(e.currentTarget.style.borderColor="#6005FF")}},(0,v.__)("Go To Dashboard","uael")))))}}],yn=function(){var e,t=a(l().useState((function(){var e=localStorage.getItem("currentStep");return e?parseInt(e,10):1})),2),n=t[0],r=t[1];(0,s.useEffect)((function(){localStorage.setItem("currentStep",n)}),[n]),(0,s.useEffect)((function(){var e=setTimeout((function(){localStorage.removeItem("currentStep")}),18e4);return function(){return clearTimeout(e)}}),[]);var o=null===(e=gn[n-1])||void 0===e?void 0:e.component;return l().createElement("div",null,l().createElement("div",{className:"w-full pb-10"},l().createElement("div",{className:"flex flex-col items-center justify-center"},l().createElement(c.Topbar,{className:"bg-none",style:{background:"none"}},l().createElement(c.Topbar.Left,null,l().createElement(c.Topbar.Item,null,uaelSettingsData.uae_logo&&l().createElement(H,{to:b.dashboard.path},l().createElement("img",{src:"".concat(uaelSettingsData.uae_logo),alt:"Logo",className:"cursor-pointer",style:{height:"35px"}})))),l().createElement(c.Topbar.Middle,null,l().createElement(c.Topbar.Item,null,l().createElement(c.ProgressSteps,{currentStep:n,className:"uae-steps",variant:"number"},gn.map((function(e,t){return l().createElement(c.ProgressSteps.Step,{key:t,className:"font-bold",labelText:e.label,size:"md"})}))))),l().createElement(c.Topbar.Right,null,l().createElement(c.Topbar.Item,null,l().createElement(H,{className:"uael-remove-ring",to:b.dashboard.path,style:{marginLeft:"125px"}},l().createElement(c.Button,{icon:l().createElement(sn,{className:"size-4"}),iconPosition:"right",size:"xs",variant:"ghost",className:"uael-remove-ring"}))))))),l().createElement("div",{className:"flex items-center justify-center"},o&&l().createElement(o,{currentStep:n,setCurrentStep:r})))},vn=function(){return l().createElement(l().Fragment,null,l().createElement(yn,null))},bn=function(){var e,t=a((0,s.useState)(!1),2),n=t[0],r=t[1];return(0,s.useEffect)((function(){setTimeout((function(){r(!0)}),1e3)}),[]),n?React.createElement(Y,{routes:b,defaultRoute:null==b||null===(e=b.dashboard)||void 0===e?void 0:e.path},React.createElement(z,{path:b.dashboard.path},React.createElement(Re,null)),React.createElement(z,{path:b.onboarding.path},React.createElement(vn,null)),React.createElement(z,{path:b.widgets.path},React.createElement(ze,null)),React.createElement(z,{path:b.settings.path},React.createElement(an,null))):React.createElement("div",{className:"loading-spinner flex items-center justify-center h-screen",style:{background:"#F9FAFB"}},React.createElement(c.Loader,{icon:null,size:"lg",variant:"primary"}))},wn=function(){var e=a((0,s.useState)(!1),2),t=e[0],n=e[1];return 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(bn,null)):React.createElement("div",{className:"loading-spinner flex items-center justify-center h-screen",style:{background:"#F9FAFB"}},React.createElement(c.Loader,{icon:null,size:"lg",variant:"primary"}))};r()((function(){var t=document.getElementById("uae-settings-app");if(t&&(0,e.H)(t).render(React.createElement(wn,null)),uaelSettingsData.is_lite_active&&(window.location.href===uaelSettingsData.header_footer_builder||"yes"===uaelSettingsData.is_hfe_post)){var n=document.getElementById("hfe-admin-top-bar-root");if(n){var r=document.createElement("div");r.id="uae-settings-app",n.appendChild(r),(0,e.H)(r).render(React.createElement(ne,null))}}}))}()}();
//# sourceMappingURL=main.js.map